2014-01-01ãã1ã¶æéã®è¨äºä¸è¦§
ãã¡ãã¡user/passãå ¥åããã®ãé¢åãä¸ã¤ã®æ¹æ³ã¨ãã¦~/.hgrcã«user/passãæ¸ãã¦ãã¾ãæãããã [auth] er.prefix = https://example.repository.com er.username = {username} er.password = {password}ãã ãå¹³æã§ãã¹ã¯ã¼ããæ¸ããã¨ã«ãªã å¥ã®â¦
ä»æ¥ããªãã¨ãªãcontainer/listãããã£ã¦ã¦ãã¤ãã§ã«åæ¹åé£çµãªã¹ããæ¸ãã¦ã¿ãã package main import ( "container/list" "fmt" ) type SinglyLinkedListNode struct { next *SinglyLinkedListNode Value interface{} } func (node *SinglyLinkedLisâ¦
container/listã¯åæ¹åé£çµãªã¹ããå®è£ ããã¦ããã 以ä¸ã¯éè¤ããè¦ç´ ãåé¤ããã³ã¼ãã package main import ( "container/list" "fmt" ) // mapã使ããã¿ã¼ã³ func uniquify(l *list.List) { table := make(map[interface{}]bool) element := l.Fronâ¦
dougblack/sleepy ã³ã¼ãã100è¡ã¡ãã£ã¨ããããªã®ã§èªã¿ããããä½ãã¨ãã¦ã¯structã{Method}Supportedã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®è£ ãã¦ããã°ããã®ã¡ã½ãããå¼ã³åºããããã«ãªãæããä¾ãã°POSTããµãã¼ããããã«ã¯PostSupportedã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®è£ â¦
DartEditorã®emacsãã¼ãã¤ã³ã - brainstorm jetbrainsã®Dartãã©ã°ã¤ã³ããã£ãã¯ããªã®ã§ãä»åº¦ããã試ãã¦ã¿ã Pycharmã«Dartãã©ã°ã¤ã³å ¥ãã¦è©¦ãã¦ã¿ãã settingsã§dart-sdkã®ãã¹ãæå®ãã dartãã¡ã¤ã«ãã·ã³ã¿ãã¯ã¹ãã¤ã©ã¤ããããã importã§â¦
CodeEvalæ°åã並ãã ãã¡ã¤ã«ãä¸ããããã®ã§ã1è¡æ¯ã«ããè¦ç´ ãç¶ããæ°ã+ãè¦ç´ ãã®ä¸¦ã³ã«å¤æãã¦åºåãããinput 40 40 40 40 29 29 29 29 29 29 29 29 57 57 92 92 92 92 92 86 86 86 86 86 86 86 86 86 86 73 73 73 73 41 41 41 41 41 41 41 41 41â¦
ããããã°Dartã£ã¦æè¿ã©ããªã®ããªã¨æã£ã¦ããã¥ã¼ããªã¢ã«ããã£ã¦ã¿ã¦ãããEclipseãã¼ã¹ã®DartEditorãªããã®ãç¨æããã¦ããã®ã§ä½¿ã£ããã ãã©ãã¼ãã¤ã³ãã®è¨å®ãxmlãexportãã¦ãèªåã§ç·¨éãã¦importããæ¹å¼ãããã§èªå好ã¿ã®ãã¼ãã¤ã³ãâ¦
æ¨æ¥æ¸ããGoã§æååãé©å½ã«å§ç¸®ããé¢æ°ã®ãã³ããã¼ã¯ãåã£ã¦ã¿ãã package main import "testing" func BenchmarkCompressBadStrA(b *testing.B) { for i := 0; i < b.N; i += 1 { CompressBad(strA) } } func BenchmarkCompressBetterStrA(b *testinâ¦
"aaaabbbbcccc"ã"a4b4c4"ã«ããå¦çããã«ããã¤ãæåã§ãããããruneãbytes.Bufferã®æ±ãã¨ãã«ã¡ãã£ã¨æ £ããã
CodeEval æååã®pangramãã¹ã¦ãåå¾ãã¦ã½ã¼ããã¦è¡¨ç¤ºinput hat abc Zu6output aht,ath,hat,hta,tah,tha abc,acb,bac,bca,cab,cba 6Zu,6uZ,Z6u,Zu6,u6Z,uZ6
ã¨ããããæ¸ãã¦ã¿ã¦åããã®ã§ã¡ã¢ãã¦ããã package main import "fmt" // ãªã¹ãããidxçªç®ã®è¦ç´ ãæããããã®ãåå¾ func delete(idx int, L []interface{}) (result []interface{}) { result = append(result, L[:idx]...) result = append(resultâ¦
package main import ( "bytes" "encoding/json" ) type Person struct { Name string Age int Friend *Person } func main() { friend := Person{"john", 40, nil} person := Person{"paul", 71, &friend} var buf bytes.Buffer b, _ := json.Marshal(persoâ¦
ãã¹ããªã³ãªã¼ãããã¯ã¼ã¯ã®è¨å®ã確èªããã 以ä¸ã®è¨å®ã«ä¿®æ£ãããã¡ããã¨åããã
ã**** With Appsãã¨ãªã£ã¦ããvirtual deviceãã¤ã³ã¹ãã¼ã«ããã°Google Playãæåããå ¥ã£ã¦ãããã¨ããã¨ã³ããªãããè¦ããã©ãªã¹ãã«åºã¦ããªããGenymotionã®ãã¼ã¸ã§ã³ã«ãããã®ãããã ã©ãã«ããã¦Google Playãå ¥ãã¦ãKindleã使ãããã¨æâ¦
package main import ( "bytes" "encoding/xml" ) type Person struct { Name string Age int Friend *Person } func main() { friend := Person{"john", 40, nil} person := Person{"paul", 71, &friend} var buf bytes.Buffer buf.Write([]byte(xml.Headerâ¦
# coding=utf-8 from django.test import TestCase from django.db import connection from apps.models import Person class TestSample(TestCase): def test_sample(self): connection.use_debug_cursor = True connection.queries = [] # do something Peâ¦
Pycharmã®èµ·åæ§æããdjangoã®testãå®è¡ããå ´åãunittest.skipã«unicodeæååã渡ãã¦ããã¨ã¨ã©ã¼ã«ãªãã¿ãããªã®ã§ã¡ã¢ãã¦ããã # coding=utf-8 from django.test import TestCase from django.utils import unittest class TestSample(TestCase):â¦
martini-contribã«authããã±ã¼ã¸ãç¨æããã¦ããã®ã§ããã使ãã Basicèªè¨¼ããããæ©è½ãããªãã $ go get github.com/codegangsta/martini-contrib/auth 使ãæ¹ package main import ( "github.com/codegangsta/martini" "github.com/codegangsta/martâ¦
clipperhouse/gen ã¤ã³ã¹ãã¼ã« $ go get github.com/clipperhouse/gen ã³ãã³ãã©ã¤ã³ãã¼ã«ãgenã ã³ãã³ãã©ã¤ã³ãã¼ã«ãgenããã¤ã³ã¹ãã¼ã«ããã $ gen Usage: gen [[*]package.TypeName] [-[*]all] [-exported] *package.TypeName # generate funcs â¦
bradfitz/goimportsgofmtã§ãã¡ã¤ã«ä¿åããã¨ãã«èªåçã«ãã©ã¼ãããããããã«ãã¦ãã®ã ãã使ã£ã¦ããªãimportã®åé¤ã¯è¡ãããªããgoimportsãgofmtã®ãããã«ä½¿ãã¨ãimportã®fixã¾ã§ãã£ã¦ãããããã«ãªãã ã¤ã³ã¹ãã¼ã« go get code.google.com/â¦
cheggaaa/pb package main import ( "github.com/cheggaaa/pb" "time" ) func main() { count := 100000 bar := pb.StartNew(count) for i := 0; i < count; i++ { bar.Increment() time.Sleep(time.Millisecond) } bar.FinishPrint("The End!") } exampleã«â¦
Goã§.NETã®LINQã®ãããªãã¨ãã§ããgo-linqã¨ããã©ã¤ãã©ãªã試ãã¦ã¿ãã quickstartãåçµããã ãã ãã©ä¾¿å©ã«ãããã¨ããããrubyã§ããcollectã¿ãããªã®ã1è¡ã§æ¸ããã®ãå¬ããã ãã以å¤ã«ãããããªãã¨ãã§ãã¦é¢ç½ãã ahmetalpbalkan/go-linq
martini-congrib/sessionsã§ã»ãã·ã§ã³IDãåå¾ãããããã®ã³ã¼ããèªãã§ãã¦è¦ã¤ããã®ã§ã¡ã¢ãã ããããããªæãã io.ReadFull(rand.Reader, b)ã§ã©ã³ãã ãªãã¤ãé åãåå¾ã§ããã package main import ( "crypto/rand" "encoding/base32" "fmt" "iâ¦
CodeEvalinput.txt .- ...- ..--- .-- .... .. . -.-. -..- ....- ..... -... .... ...--output AV2WHIECX 45 BH3åè : ã¢ã¼ã«ã¹ç¬¦å· - Wikipedia
CodeEval input.txt Rkbs,5453; Wdqiz,1245; Rwds,3890; Ujma,5589; Tbzmo,1303; Vgdfz,70; Mgknxpi,3958; Nsptghk,2626; Wuzp,2559; Jcdwi,3761; Yvnzjwk,5363; Pkabj,5999; Xznvb,3584; Jfksvx,1240; Inwm,5720; Ramytdb,2683; Voclqmb,5236; output 1245,â¦
CodeEvalaããjã¾ã§ã®ã¢ã«ãã¡ãããã¯0-9ã«ç½®ãæãã è¦ãã¦ããæ°åã¯ãã®ã¾ã¾ ãã以å¤ã®æåã¯å ¨ã¦ç¡è¦ æ°åã1æåãæ®ããªãã£ãå ´åã¯NONEãè¿ãinput.txt abcdefghik Xa,}A#5N}{xOBwYBHIlH,#W (ABW>'yy^'M{X-K}q, 6240488 output 012345678 05 NONEâ¦
The Revel Web Framework for Go ã¤ã³ã¹ãã¼ã« $ go get github.com/robfig/revel/revel ã³ãã³ãã©ã¤ã³ãã¼ã« $ revel ~ ~ revel! http://robfig.github.com/revel ~ usage: revel command [arguments] The commands are: new create a skeleton Revel applâ¦
ãã®ããã ãBeegoãã使ã£ã¦ä½ã£ãã²ã¹ãããã¯ã¢ããªã±ã¼ã·ã§ã³ããã®ã¾ã¾ãMartiniãã§ãä½ã£ã¦ã¿ããMartini - Classy web development in Go. ã¤ã³ã¹ãã¼ã« $ go get github.com/codegangsta/martini ã¨ããããåãã Beegoãããæ´ã«ã·ã³ãã«ãªæããâ¦
æ¨æ¥ä½ã£ãbeegoã使ã£ãã²ã¹ãããã¯ã¢ããªã±ã¼ã·ã§ã³ãherokuã«ã¢ãããã¦ã¿ããBeego GuestBook 以ä¸ã®ã¨ã³ããªãåèã«ããã Getting Started with Go on Heroku é©å½ã«ãã£ããã¨ãã¡ã¢ãã ä¾åããã±ã¼ã¸ã®ç®¡çã®ããã«godepãå ¥ããã godeps saveâ¦
Goã®webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ãBeegoãã§Pythonãããã§ãã·ã§ãã«ããã°ã©ãã³ã°ã®2ç« ã®ã²ã¹ãããã¯ã¢ããªã±ã¼ã·ã§ã³ãä½ã£ã¦ã¿ãã (ãã¡ãã®ã¨ã³ããªã®çä¼¼) ã¤ã³ã¹ãã¼ã« $ go get github.com/astaxie/beego $ go get github.com/beego/beebeâ¦