- private variable
- sinon用非公開変数群
- div documentオブジェクトが定義されていれば、document.createElementで div要素を作成する。
- hasOwn Object.prototype.hasOwnPropertyを参照する。
- sinon
外部に公開するオブジェクト
- function
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
| # | |
| # Apacheのモジュール mod_rewriteを有効にする。(Ubuntu:sudo a2enmod rewrite) | |
| # | |
| RewriteEngine on # 1) | |
| RewriteRule ^([0-9\-]+)\.html$ index.fcgi?date=$1 # 2) | |
| # | |
| # http://www.ryuone.com/diary/20110806.html | |
| # でアクセスした場合、2)で | |
| # http://www.ryuone.com/diary/index.fcgi?date=20110806 |
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
| main(){ | |
| curry(Function fun, carried) => (param) { fun(carried, param); }; | |
| greet(String greeting, String name) => print(greeting + " " + name); | |
| var hi = curry(greet, "Hi!! "); | |
| hi('ryuone.'); | |
| } | |
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
| main(){ | |
| var xxx = {'one':1, "two":2}; // key must be string. | |
| print(xxx["one"]); // NG : xxx.one | |
| print(xxx['two']); | |
| var a,b=100; | |
| final f = 20; | |
| print(a); | |
| print(b); | |
| // f = 100; // error |
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
| http://stackoverflow.com/questions/300855/looking-for-a-better-javascript-unit-test-tool | |
| http://d.hatena.ne.jp/goyoki/20100223/1266939139 | |
| http://d.hatena.ne.jp/babie/20100226/1267158419 | |
| http://d.hatena.ne.jp/Yoshiori/20100224/1267015034 | |
| http://cjohansen.no/talks/2011/xp-meetup/#1 | |
| http://cjohansen.no/talks/2011/javabin-s/#1 | |
| http://cjohansen.no/talks/2011/busterjs/#1 | |
| http://azu.github.com/slide/Kamakura/busterJS.html#slide1 |
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 page = new WebPage(), | |
| url = 'http://www.yahoo.co.jp'; | |
| page.open(url, function (status) { | |
| if (status !== 'success') { | |
| console.log('Unable to access network'); | |
| } else { | |
| var results = page.evaluate(function() { | |
| var list = document.querySelectorAll('a'), pizza = [], i; | |
| for (i = 0; i < list.length; i++) { |
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
| @charset "utf-8"; | |
| @mixin vpcss($key, $val){ | |
| -webkit-#{$key}: $val; | |
| -moz-#{$key}: $val; | |
| -ms-#{$key}: $val; | |
| -o-#{$key}: $val; | |
| #{$key}: $val; | |
| } |
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
| server: http://localhost:4224 | |
| load: | |
| - lib/*.js | |
| - src/*.js | |
| - test/*.js |
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 debuglog($data) | |
| { | |
| $destination = "/tmp/debug.log"; | |
| @ob_start(); | |
| var_dump($data); | |
| $output = @ob_get_contents(); | |
| @ob_end_clean(); | |
| @error_log($output."\n", 3 , $destination); | |
| } |
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
| * autoRun -> function | |
| * envOptions -> function | |
| * run -> function | |
| * reporters -> object | |
| * dots -> object | |
| * create -> function | |
| * endContext -> function | |
| * focusMode -> function | |
| * listen -> function | |
| * log -> function |