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
fmt.Println(bar) | |
p1 := Person{ | |
Name: "太郎", | |
Age: 20, | |
} | |
p2 := Person{ | |
Name: "太郎", | |
Age: 20, |
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 Property struct { | |
Name string | |
Value interface{} | |
NoIndex bool | |
Multiple bool | |
} | |
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
func Slice(slice interface{}, less func(i, j int) bool) |
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" | |
"strings" | |
) | |
func main() { | |
str := "aaabbbcc" | |
// 普通に表示 |
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" | |
"strings" | |
) | |
func main() { | |
str := "Go Java JavaScript Typescript CofeeScript" | |
// 普通に表示 |
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
const array = [0, 1, 2, 3, 4]; | |
console.log(`before : array = ${array}`); | |
array.forEach((item, index) => { | |
if(item === 1) { | |
array.splice(index, 1); | |
} | |
}); |
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
const array1 = [0, 1, 2, 3, 4]; | |
const array2 = [0, 6, 2, 3, 4]; | |
array1.concat(array2) | |
.forEach(item => { | |
if (array1.includes(item) && !array2.includes(item)) { | |
console.log(`array1に含まれていて、array2に含まれていない : ${item}`); | |
} else if (!array1.includes(item) && array2.includes(item)) { | |
console.log(`array1に含まれていなくて、array2に含まれていてる : ${item}`); |
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
version: 2 # バージョン2を指定する | |
jobs: | |
build: # Goのbuildとテストを行う | |
docker: # ベースとなるDocker imageを指定 | |
- image: circleci/golang:1.8 # Dockefileのパスを指定(Go1.8を指定) | |
environment: | |
TZ: /usr/share/zoneinfo/Asia/Tokyo # Time Zoneを指定 | |
working_directory: /home/circleci/go/src/project # コード実行場所 以下のstepsはworking_directoryで実行される | |
steps: # ローカルでも必要なものはshell scriptと言う感じで行う | |
- checkout # working_directoryにcheckout |
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
import {Subject, Observable} from "rxjs"; | |
// Subjectのインスタンスを生成 | |
let subject = new Subject; | |
// 冗長だけれども理解の促進のためにObserverのオブジェクトをここで生成 | |
let observer1 = {next: (value) => console.log(`observer1ですよ : ${value}`)}; | |
let observer2 = {next: (value) => console.log(`observer2ですよ : ${value}`)}; | |
// ObservableとしてのSubjectのsubscribeメソッド |
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
<p class="u-floatLeft">hoge</p> |