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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
size := 3 | |
list := make([]int, size) | |
for i := 0; i < size; i++ { |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
layout := "01/02/2006, 03:04PM" |
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
package gaeOauth | |
import ( | |
"golang.org/x/net/context" | |
"golang.org/x/oauth2/google" | |
"golang.org/x/oauth2/jwt" | |
) | |
var scopes = []string{} |
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
var pool = ["1", "2", "3", "4", "5"] | |
var getRandomSubsets = function (num) { // num: #of elements in the subset | |
if (num.length > pool) { | |
return null; | |
} | |
var subPool = {}; | |
for (var i = 0; i < num; i++) { | |
var max = pool.length - 1; | |
var min = 0; | |
var pick = Math.floor(Math.random() * (max - min + 1)) + min; |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
array := []int{1, 2, 3, 4, 5, 6, 7} |