2014-06-01ãã1ã¶æéã®è¨äºä¸è¦§
git filter-branch -f --tree-filter 'rm my.conf' ããããªç¥ããå¶ãã¨ããã°ãããã¯æéå¹²æ¸ãªãã¦ã¬ãã«ãããªããå æå¾ãã®ãã®ã«å¯¾ããåéã ã git push --force
èæ¯ ã¿ããªã ãããGitHubã§ãgosseractã¨ããGoè¨èªã®OCRããã±ã¼ã¸ããã¤ãã¤ããªããã¤ãã£ã¦ããããç¥ããªãå¤äººãããã ãããos/execã¡ãããã¦ãªãã§cgo使ãã¸ãã®ï¼ã ã¨ãè¨ãããã®ã§ããã cgoã£ã¦ããã? cgo - The Go Programming Language â¦
Date.parse("%s") ãã©ã¦ã¶ã§ãªããæåã¡ããï¼ %s FireFox Safari Chrome Opera "Jul 20, 2014 10:00:00 GMT+9:00" 1405818000000 1405818000000 1405818000000 1405818000000 "2014-06-20 10:00:00 GMT+9:00" NaN NaN 1403226000000 1403226000000 å ¬å¼ã«â¦
åé¡ length := len(users) var names [length]string ã¨ãããããã© invalid array bound length ã¨å±ããã 解決 é åã«ã¯constantãã渡ããªããå¯å¤é·é åã«ã¯ã¹ã©ã¤ã¹ã使ã Google ã°ã«ã¼ã Goè¨èªã®ã¹ã©ã¤ã¹ãç解ããã length := len(users) namesâ¦
ãããªãã¡ã¢ã§ã Goè¨èªã®ã¹ã©ã¤ã¹ Goè¨èªã«ã¯ãã¡ããé åãããããã©ãã¹ã©ã¤ã¹ã¨ããã®ãããããã£ã¡ãä¹±æ´ã«ããã¨å¯å¤é·é åãããããããã¨ã¯ãããã¾ãããåèã«ãªãã®ã¯ããã§ãã Goè¨èªã®ã¹ã©ã¤ã¹ãç解ããã Arrays, slices (and strings):â¦
åä½ ä»¥ä¸ã®éãé害ãèµ·ãã¾ããã®ã§ãå ±åãããã¾ãã ã¦ã¼ã¶ã®çæ§ã«ã¯ãä¸ä¾¿ãããã大å¤ç³ã訳ãããã¾ããã æé 2014/06/18 05:48 ã åæ¥ 08:47 2014/06/19 03:26 ã åæ¥ 08:37 ç¾è±¡ OCRãµã¼ãã®ã¬ã¹ãã³ã¹ããµã¼ãã¨ã©ã¼ã¨ãªã£ã¦å¤±æãã以ä¸ã®â¦
Goè¨èªã§ã¸ã§ããªã¯ã¹ã£ã½ããã¨ãããã§ãããã®ç¶ããgolangããgenericsã
åã®ã㤠Goè¨èªã§ã¸ã§ããªã¯ã¹ã£ã½ããã¨ããããã§ããããgenericsããgolangã - DRYãªåå¿é² ã®ç¶ãã£ã¦ãããã¡ã¢ /***** * Goè¨èªã§åå¤æ°ãåããCollectionã¿ãããªã® *****/ package main import "fmt" import "reflect" type E struct { element â¦
Goè¨èªã§ã¸ã§ããªã¯ã¹ã¿ãããªãã¨ããããã§ãããã è²ã 調æ»ã®ããã§ãã£ã¦ã¿ãã stringããã¤ã³ã¹ã¿ã³ã¹ãåå¾ å®å ¨ã«æ½è±¡åã¯ç¡çã§ãå ·ä½ã¬ã¤ã¤ã¼ã§å¿ ãåã¢ãµã¼ã·ã§ã³ãããªãããããªãã åã¢ãµã¼ã·ã§ã³ã®ä¾ a := new(A) b, ok := reflect.ValueOfâ¦
rakã£ã¦ããã³ãã³ã便å©ã§ãã grep ã® Ruby çãrakãã便å©ãªä»¶ | JAMâã±ã åé¡ % rak invalid zsh: command not found: rak % which gem gem not found % which ruby ruby not found % Σ(ï¾Ð´ï¾lll)ï¾ï½§!? Rubyããå ¥ãã¾ããã 1) rvmã§Ruby2.0.0ãå ¥ãã %â¦
fmt.Printf("%04d", 20) // "0020" // s := fmt.Sprintf("%04d", 20) Go Playground ã¤ãã§ã« Go Playground
ã¡ã¢ interface Fooer { foo: number; } interface Barer { bar: string; } var AcceptFooer = (fooer: Fooer) => { console.log("Its foo is ", fooer.foo); } var AcceptBarer = (barer: Barer) => { console.log("Its bar is ", barer.bar); } var both =â¦
memo Go Playground package main import "log" func main() { m := make(map[string]string) m["exists"] = "ã¿ã¤ãã£ãã§ããã" // m["not_exists"] = "ã¿ã¤ãããªã" v, ok := m["exists"] println(v, ok) v, ok = m["not_exists"] println(v, ok) // ãâ¦
çå moduleå®ç¾©ã®ä¸ã§exportããã®ã¯çµæåãã exportããªãã¨ã¹ã³ã¼ãã©ããªããã moduleå åç §å¯è½ãªã®ãï¼ ã¡ã¢ module My { export function funcA() { console.log("This is funcA"); } export function funcC() { // call unexported function // â¦
åé¡ interfaceã£ã¦extendsã§ãããã ã£ãï¼ ã¡ã½ããã¨ããããã£ããæºããã¦ãã°åå¶ç´çªç ´ã§ãããã ã£ãï¼ï¼ããã¯ã¿ã¤ãã³ã°ï¼ ã¡ã¢ interface Speaker { Speak(s: string): void; } interface Person extends Speaker { name: string; Greet(): void;â¦
ã¡ã¿ãã¡ã¤ã«ãå¤ããã TypeScriptã«éã£ã話ã§ã¯ãªãã®ã ããã©ãJavaScripté¢é£ã®ããã¸ã§ã¯ãã¤ãã£ã¦ãã¨ããã±ã¼ã¸ç®¡çãªã©ãå®ç¾©ããã¡ã¿ãã¡ã¤ã«ãããããã£ã¬ã¯ããªã«æ£ä¹±ãããã¨ã«ãªãããã¨ãã° otiai10/prisc at freeze/before-chest · GitHubâ¦
ããã gruntã 㨠npm install -g gulp gulpfile.js å®è¡ãã¦ã¿ã gulpfile.coffee TypeScriptã®ãã«ãããã®ã gruntã 㨠gruntã§ããããããã¸ã§ã¯ãã¤ããã¯ã± myproject âââ package.json âââ Gruntfile.coffee âââ build â âââ app.js âââ src âââ samâ¦
ã¡ã¢ CoffeeScript class Foo @hoge: "this is property hoge" @fuga: (p) -> alert "ãµããµã #{p}" piyo: (p) -> alert "ã´ãã´ã #{p}" foo = new Foo(); console.log foo.hoge Foo.fuga "ããã" foo.piyo "ããã" ã³ã³ãã¤ã«å¾ var Foo, foo; Foo = (fâ¦
åç¥ æ¨æ¥ãããæ¸ãã¾ãã ãã¤ãã£ããGoè¨èªã®flagããã±ã¼ã¸ã§ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ãåå¾ã§ããªãæ°ãããã®ã§ - DRYãªåå¿é² ããã«å¯¾ãã¦ãid:hayajo_prpr æ°ãã以ä¸ã®ãããªãææãé ãã¾ããã flagããã±ã¼ã¸ã使ãå ´åã¯ãããªæãã§ãããâ¦
è¿½è¨ ãflaggããããªããã¯ä½ããã§ããã£ãã®ã§ãããGoè¨èªã - DRYãªåå¿é² 以ä¸åæ Goè¨èªã§ã¯cliã®binãç°¡åã«ä½ãã % cd $GOPATH/src % mkdir mytest % vi mytest/main.go main.go package main import "fmt" func main() { fmt.Println("イエーイâ-(ãâ¦