I hereby claim:
- I am xlab on github.
- I am xlab (https://keybase.io/xlab) on keybase.
- I have a public key whose fingerprint is 8F39 7B4E 96AB 1977 5C15 C3C6 DE3F 4FEA 5B0A DCE5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<snippet> | |
<content><![CDATA[ | |
type ${1:type}s []*${1:type} | |
func (s ${1:type}s) Len() int { return len(s) } | |
func (s ${1:type}s) Swap(i, j int) { s[i], s[j] = s[j], s[i] } | |
func (s ${1:type}s) Less(i, j int) bool { return s[i].${2:field} < s[j].${2:field} } | |
]]></content> | |
<tabTrigger>gosort</tabTrigger> | |
<scope>source.go</scope> |
/** Helper functions start **/ | |
var RiakHelper = function() { | |
return { | |
numericSorter: function(first, second) { | |
return first - second; | |
} | |
}; | |
}(); |
$ go test -bench=BenchmarkUint -run=XXX | |
PASS | |
BenchmarkUint32Div7 20000000 126 ns/op | |
BenchmarkUint32Div37 20000000 126 ns/op | |
BenchmarkUint32Div123 20000000 126 ns/op | |
BenchmarkUint32Div763 20000000 126 ns/op | |
BenchmarkUint32Div1247 20000000 126 ns/op | |
BenchmarkUint32Div9305 20000000 126 ns/op | |
BenchmarkUint32Div13307 20000000 126 ns/op | |
BenchmarkUint32Div52513 20000000 126 ns/op |
func arrayToSliceInt32(ptr unsafe.Pointer, size int) (ints []int32) { | |
hdr := reflect.SliceHeader{ | |
Data: uintptr(ptr), | |
Len: size, | |
Cap: size, | |
} | |
cints := *(*[]int32)(unsafe.Pointer(&hdr)) | |
ints = make([]int32, size) | |
// TODO: bech this | |
copy(ints, cints) |
// Package products is an example of calling the Google's Merchant API (content scope) from Go lang. | |
package products | |
import ( | |
"strconv" | |
"code.google.com/p/goauth2/oauth" | |
"code.google.com/p/google-api-go-client/content/v2" | |
) |
#cloud-config | |
hostname: smscloud1 | |
ssh_authorized_keys: | |
- ssh-rsa: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDU/iKFrHQh6/y7QJyeVDJTUjD3u6dlhgLf2SE2pOfdIx9YL06zudlKikR5VekX2hEltdO87XTPOp/yCslC/dHMtndhYQV/gmlCQRbeugI7sg1FcCLjllA8Uiw5UskUUjas9Od1VACzLIC4E1u24JSCJTkz7IonhIrhWTcZAfGxIP/dVQqdBOFjNGSxjSoRZgHsQE8WMQ1oQqBIzZqre0f9VvaB6Q4zKSC0bOQR30CreB6+XdB6NsetQ9pwzQAswXtf1wSj8S8ekic1NCgont1SlxMmF6lH0gDVKNBXkC3o1X063N/N0IxypUdgxp7kzcca3kxv+bIsAeXylXRnmGH9 | |
users: | |
- name: xlab | |
coreos-ssh-import-github: xlab |
panic: invalid memory address or nil pointer dereference | |
fatal error: panic during malloc | |
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x41b8ea] | |
runtime stack: | |
runtime.panic(0x4f2980, 0x671578) | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/runtime/panic.c:233 +0x2b | |
runtime: unexpected return pc for runtime.sigpanic called from 0x6fcaef11 | |
goroutine 4 [syscall]: |
panic: invalid memory address or nil pointer dereference | |
fatal error: panic during malloc | |
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x41b60a] | |
runtime stack: | |
runtime.panic(0x4f2780, 0x671578) | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/runtime/panic.c:233 +0x2b | |
runtime: unexpected return pc for runtime.sigpanic called from 0x6fcaef11 | |
goroutine 4 [syscall]: |
panic: invalid memory address or nil pointer dereference | |
fatal error: panic during malloc | |
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x41b5ea] | |
runtime stack: | |
runtime.panic(0x4f2760, 0x671578) | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/runtime/panic.c:233 +0x2b | |
runtime: unexpected return pc for runtime.sigpanic called from 0x6fcaef11 | |
goroutine 4 [syscall]: |