- インデントレベル0-1、太字、アスタリスク
- インデントレベル1-1、太字、アスタリスク
- インデントレベル1-2、太字、アスタリスク
- インデントレベル2-1、太字、アスタリスク
- インデントレベル2-2、太字、アスタリスク
- インデントレベル1-3、太字、アスタリスク
- インデントレベル1-4、太字、アスタリスク
- インデントレベル2-3、太字、アスタリスク
- インデントレベル2-4、太字、アスタリスク
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
// private なら、同一クラスの他オブジェクトからアクセス可能 | |
scala> class Hoge (private var aho: Int) { def debug(hoge: Hoge) { println(hoge.aho) } } | |
defined class Hoge | |
// private[this] なら、同一クラスの他オブジェクトからアクセス不可 | |
scala> class Huga (private[this] var aho: Int) { def debug(huga: Huga) { println(huga.aho) } } | |
<console>:7: error: value aho is not a member of Huga | |
class Huga (private[this] var aho: Int) { def debug(huga: Huga) { println(huga.aho) } } |
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
object Aho { | |
def main(args: Array[String]) { | |
aaa(1, "2", true) | |
ddd(1, "2", true) | |
} | |
// aaa - ccc, そのまま可変長引数を渡して実行 | |
def aaa(params: Any*) { | |
println("AAA params[%s] params class[%s]".format(params, params.getClass)) |
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 BinarySearch(data []int, find int, from int, to int) int { | |
center := (from + to) / 2 | |
if from > to { | |
return -1 | |
} | |
if find == data[center] { | |
return center | |
} else if find < data[center] { |
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
$ echo "| bindkey | widget|\n|:-----:|:-----|\n$(bindkey -L | awk '{print $2" "$3}' | sed -e 's/ /|/g' | sed -e 's/^/|/g' | sed -e 's/$/|/g')" | |
# https://github.com/defunkt/gist を使用してgistへ投稿 | |
$ echo "| bindkey | widget|\n|:-----:|:-----|\n$(bindkey -L | awk '{print $2" "$3}' | sed -e 's/ /|/g' | sed -e 's/^/|/g' | sed -e 's/$/|/g')" | gist -d "zsh bindkey $(date +'%Y%m%d')" -f zsh_bindkey.md |
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
143 runtime/race/testdata/mop_test.go | |
50 runtime/race/testdata/chan_test.go | |
41 runtime/race/testdata/slice_test.go | |
27 runtime/race/testdata/waitgroup_test.go | |
25 net/http/serve_test.go | |
22 runtime/chan_test.go | |
21 runtime/race/testdata/atomic_test.go | |
21 net/timeout_test.go | |
19 runtime/race/testdata/map_test.go | |
18 runtime/proc_test.go |
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 LimitExector interface { | |
// 同時処理数に上限を設ける | |
// 上限を超えるリクエストは処理しない | |
ByMax(req ReqEntity) | |
// 1秒間の同時処理数に上限を設ける | |
// 上限を超えるリクエストは1秒待つ | |
ByMaxPerSecond(req ReqEntity) | |
// 処理に実行間隔を設ける => x秒間隔に1回処理を行う |
OlderNewer