- Seiya Konno
- Works at Uniba Inc. (http://uniba.jp)
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
Set<String> keys = map.keySet(); | |
for (String key : keys) { | |
//some condes | |
} | |
//↑が↓になった | |
Set<String> keys = map.keySet(); | |
String[] keyarray = keys.toString().split(","); | |
for(int i=0; i<keyarray.length; i++){ |
明けましておめでとうございます. @susisu2413 です.
この記事は OUCC アドベントカレンダー 2014 21日目の記事です. 昨日は @spring_raining 氏による大学のグループ開発でgitを布教する方法でした.
盛んに「関数型で脱アルゴリズム」などと叫ばれる昨今ですが, その真偽はさておき,
処理の単位として関数を用いるのは処理の一般化や再利用をする場合に役に立つことが多いです (たぶん).
関数型っぽい処理としては, 生の JavaScript では Array
のメソッドに map
, filter
, reduce
などがあります
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
#!/usr/bin/env ruby | |
if ARGV.size != 3 | |
puts "usage: ack-sed <pattern> <replace-string> <dir>" | |
end | |
query, replace, dir = ARGV | |
system("ack #{query} #{dir} | cut -d':' -f1 | uniq | LANG=C xargs sed -i -e 's/#{query}/#{replace}/g'") |
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
class Binding | |
def return_if(name) | |
eval "return #{name}" if local_variable_get(name) | |
end | |
end | |
def foo(v) | |
binding.return_if(:v) | |
'v is nil' | |
end |
- Symbolic execution - Wikipedia
- King, James C. "Symbolic execution and program testing." 1976 (pdf)
- DART: Directed Automated Random Testing
- CUTE: A Concolic Unit Testing Engine for C
- Jeff Foster, "Symbolic Execution," 2011 (pdf)
- シンボリック実行に入門しようとした - 一生あとで読んでろ
- テスト入力値の自動生成と、concolic testing - ソフトウェアの品質を学びまくる
(For English readers: please read https://github.com/sponsors/tk0miya instead)
@tkomiya は、日本在住の OSS 開発者です。
趣味として Sphinx や pycmark、 blockdiag などの OSS の開発やメンテナンスに携わっています。
ここ数年の活動の中心は Sphinx です。 Sphinx は Python や Linux カーネルをはじめとして、数多くの OSS のドキュメントに利用されているドキュメンテーションツールです。 Sphinx プロジェクトはごく少人数のメンテナによって活動しており、(明確な役割として定義はされていないものの) リードメンテナ、メインメンテナとして活動しています。
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
class Number {} | |
class Zero : Number {} | |
class Succ<N:Number> : Number {} | |
typealias One = Succ<Zero> | |
typealias Two = Succ<Succ<Zero>> | |
typealias Three = Succ<Succ<Succ<Zero>>> | |
class Eq<S: Number, T: Number> {} | |
class Add<S: Number, T:Number> : Number {} |
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
// swift/stdlib/public/runtime/Metadata.cpp をプリプロセッサのみ実行した結果から抜粋 | |
struct ValueWitnessTable; | |
namespace value_witness_types { | |
typedef OpaqueValue * (*initializeBufferWithCopyOfBuffer) (ValueBuffer *, ValueBuffer *, const Metadata *); | |
typedef void (*destroy) (OpaqueValue *, const Metadata *); | |
typedef OpaqueValue * (*initializeWithCopy) (OpaqueValue *, OpaqueValue *, const Metadata *); | |
typedef OpaqueValue * (*assignWithCopy) (OpaqueValue *, OpaqueValue *, const Metadata *); | |
typedef OpaqueValue * (*initializeWithTake) (OpaqueValue *, OpaqueValue *, const Metadata *); |