This file contains hidden or 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
(function test(n){ | |
"use strict"; | |
if(n==0){ | |
return 1; | |
}else{ | |
// return arguments.callee(n-1); <= strictモードではエラー | |
return n* test(n-1); // 名前付き関数を使う。 | |
} | |
})(2); |
This file contains hidden or 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
var hoge = function hogehoge(n){ | |
"use strict"; | |
fuga(n-1,Array.prototype.slice.call(arguments)); | |
fuga(n-1,null); | |
}; | |
var fuga = function fugafuga(n, args){ | |
"use strict"; | |
console.log("--start--"); |
This file contains hidden or 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 json | |
import urllib2 | |
import httplib2 | |
import multiprocessing | |
url='url' | |
data = json.dumps({'id':'username', 'password':'password'}) | |
def start_process(): | |
print 'Starting', multiprocessing.current_process().name |
This file contains hidden or 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
[buildout] | |
parts = app docutils | |
versions = versions | |
extensions = buildout.locallib | |
locallibs = locallibs | |
locallibs_check = false | |
[app] | |
recipe = z3c.recipe.scripts |
This file contains hidden or 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 static play.libs.F.Matcher.*; | |
public class matcher_Test extends UnitTest { | |
@Test | |
public void test_matcher_object() { | |
String value = "Foobar"; | |
for (String s : String.and(StartsWith("Foo")).match(value)) { | |
value = s.toUpperCase(); | |
} |
This file contains hidden or 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
thread 120 | |
Throughput: 163795.39 [#/sec] | |
Throughput: 160400.20 [#/sec] | |
Throughput: 161411.85 [#/sec] | |
epoll f2 | |
Throughput: 137671.49 [#/sec] | |
Throughput: 149201.28 [#/sec] |
This file contains hidden or 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
// 追加する要素のpush | |
cl.list.data[0].data[0].data[0].data.push( | |
{data:[], hasChildren:false, name:"test", value:"foo"} | |
); | |
// クリックしたときに動作するように変更 | |
cl.list.data[0].data[0].data[0].hasChildren=true; | |
// "●"を表示(クリックできるときには、itemの右端に表示する) | |
$("#cl1-column-list-col2-item0 div.cvl-column-item-indicator").css("display","inline") |
This file contains hidden or 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
/* pyuv.h */ | |
#if PY_VERSION_HEX >= 0x03000000 | |
#define PY3 | |
#define PyInt_FromSsize_t PyLong_FromSsize_t | |
#define PyInt_FromLong PyLong_FromLong | |
/* pending start */ | |
#define PyString_FromString PyBytes_FromString | |
#define PyString_AsString PyBytes_AsString | |
#define PyString_FromStringAndSize PyBytes_FromStringAndSize |
This file contains hidden or 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
@unittest.skipIf( sys.platform.startswith('linux'), | |
"not required Linux") | |
def test_fsevent_basic(self): | |
self.errorno = None |
This file contains hidden or 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
# service running on Jenkins | |
BUILD_ID=allow_to_run_as_daemon LANG=ja_JP.UTF-8 sh /etc/init.d/ssb_server start |