This file contains hidden or 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
| def getDayName(day) | |
| dayName = "" | |
| case day | |
| when "Mon" | |
| dayName = "Monday" | |
| when "Tue" | |
| dayName = "Tuesday" | |
| when "Wed" | |
| dayName = "Wednesday" | |
| when "Thu" |
This file contains hidden or 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 Reverse(s string) string { | |
| runes := []rune(s) | |
| for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 { | |
| runes[i], runes[j] = runes[j], runes[i] | |
| } | |
| return string(runes) | |
| } |
This file contains hidden or 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" | |
| "sort" | |
| "time" | |
| ) | |
| type User struct{ | |
| Name string | |
| Email string | |
| age int |
This file contains hidden or 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
| /* | |
| Node.js, express, oauth example using Twitters API | |
| Install Node.js: | |
| curl -0 http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz | |
| tar -zxf node-v0.6.11.tar.gz | |
| cd node-v0.6.11 | |
| ./configure | |
| make | |
| make install |
OlderNewer