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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<fb:login-button width="200" max-rows="1" | |
scope="user_likes, friends_likes, user_groups, friends_groups, read_stream, read_friendlists, user_activities, offline_access, publish_stream"> | |
</fb:login-button> |
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
<fb:login-button show-faces="false" width="200" max-rows="1" | |
scope="user_likes, friends_likes, user_groups, friends_groups, read_stream, read_friendlists, user_activities, offline_access, publish_stream"> | |
</fb:login-button> |
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
<fb:login-button show-faces="true" width="200" max-rows="1" | |
scope="user_likes, friends_likes, user_groups, friends_groups, read_stream, read_friendlists, user_activities, offline_access, publish_stream"> | |
</fb:login-button> |
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
<fb:login-button render-in-iframe="true" width="200" max-rows="1" | |
scope="user_likes, friends_likes, user_groups, friends_groups, read_stream, read_friendlists, user_activities, offline_access, publish_stream"> | |
</fb:login-button> |
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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<fb:login-button width="200" max-rows="1" | |
scope="user_likes, friends_likes, user_groups, friends_groups, read_stream, read_friendlists, user_activities, offline_access, publish_stream"> |
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" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func() uint64 { | |
var x, y, z uint64 = 0, 1, 0 | |
return func() uint64 { | |
z, x, y = x, y, x+y |
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 Merge(ldata []int, rdata []int) (result []int) { | |
result = make([]int, len(ldata) + len(rdata)) | |
lidx, ridx := 0, 0 | |
for i:=0;i<cap(result);i++ { | |
switch { |
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 deferdemo(n int) { | |
fmt.Println(n) | |
defer fmt.Println("a") | |
fmt.Println("b") |
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
type Handler interface { | |
ServeHTTP(ResponseWriter, *Request) | |
} | |
type HandlerFunc func(ResponseWriter, *Request) | |
// ServeHTTP calls f(w, r). | |
func (f HandlerFunc) ServeHTTP(w ResponseWriter, r *Request) { | |
f(w, r) | |
} |
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" | |
uuid "github.com/julianshen/GoUUID" | |
) | |
func main() { | |
_uuid, err := uuid.RandomUUID() |