This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func dumpByteSlice(b []byte) { | |
var a [16]byte | |
n := (len(b) + 15) &^ 15 | |
for i := 0; i < n; i++ { | |
if i%16 == 0 { | |
fmt.Printf("%4d", i) | |
} | |
if i%8 == 0 { | |
fmt.Print(" ") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash completion for rake | |
# | |
# some code from on Jonathan Palardy's http://technotales.wordpress.com/2009/09/18/rake-completion-cache/ | |
# and http://pastie.org/217324 found http://ragonrails.com/post/38905212/rake-bash-completion-ftw | |
# | |
# For details and discussion | |
# http://turadg.aleahmad.net/2011/02/bash-completion-for-rake-tasks/ | |
# | |
# INSTALL | |
# |