Skip to main content

Posts

Speedometer

Ukulele Chords

Select your Chord and Match your fingers to the diagram.

Sending and email using Telnet

Open up Telnet telnet smtp.yourdomain.com 25 If you need SSL do this instead openssl s_client -connect smtp.yourdomain.com:465 Tell the server where you are coming from. ehlo localhost Login to the server. You will need your username and password converted to Base 64. Base 64 Encode auth login 334 VXNlcm5hbWU6 username 334 UGFzc3dvcmQ6 password Now compose your email. mail from: <your_email@yourdomain.com> rcpt to: <destination@domain.com> data Type in your email .

God is bigger than the Boogie Man - Guitar Chords

This song is called "God is Bigger than the Boogie Man" which came from Veggietales and is quite the hit for the preschoolers at church. There are some more words that are said when played in the movie however for the kids at church this chorus works wonders. G God is bigger than D the boogie man A He is bigger than Godzilla D Or the monsters on TV G Oh God is bigger than D the boogie man A He is watching out for G you and D me.

Robot moving across a NxM matrix.

Lets say I have a matrix that is a 2 dimensional array of NxM elements and the Robot needs to find all the ways from the top left corner all the way to the bottom right corner. Now the Robot it self has some rules to follow on the way. The Robot can move up, down, left, right in order to get there. However the Robot may not move over the same square more than once. def robot (matrix,n ,m) return 0 if n <0 || m <0 || n > matrix . length -1 || m > matrix . length -1 return 0 if matrix [ n ][ m ] == 1 return 1 if n == m && n ==0 count =0 tmp = matrix tmp [ n ][ m ]=1 count += robot(tmp, n +1 , m) #right count += robot(tmp, n -1 , m) #left count += robot(tmp, n, m +1 ) #up count += robot(tmp, n, m -1 ) #down tmp [ n ][ m ]=0 return count end Now lets say that you have the same size matrix but the Robot can only move down and left. def robot (matrix,n ,m) return 0 if n <0 || m <0 || n > matri...