see Leko/setup-osx.
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
<?php | |
echo <<<T_WADA | |
,、,,,、,,, | |
_,,;' '" '' ;;,, | |
(rヽ,;''""''゛゛;,ノr) | |
,; i ___ 、___iヽ゛;, テスト書いてないとかお前それ@t_wadaの前でも同じ事言えんの? | |
,;'''|ヽ・〉〈・ノ |゙ ';, | |
,;''"| ▼ |゙゛';, | |
,;'' ヽ _人_ / ,;'_ |
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 RECORDER_LANG = 'ja-JP', | |
SPEAKER_LANG = 'ja-JP'; | |
/** | |
* 音声入力を行う関数 | |
* 入力のパース処理は冗長なので内側で処理して、コールバック関数にはパース後の結果を渡す | |
* | |
* @param function onResult 音声解析した結果を受け取って実行する関数 | |
* @param function onError 音声入力中にエラーが有った場合に実行する関数 | |
* @return void |
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
<?php | |
/** | |
* RGBカラーをHueで使用するHSBカラーに変換する | |
* 通常のHSBカラーとの違いはHの値域が0~360ではなく0~65535(16bitカラー)であること | |
* 参考:http://www.technotype.net/tutorial/tutorial.php?fileId=%7BImage%20processing%7D§ionId=%7B-converting-between-rgb-and-hsv-color-space%7D | |
* | |
* @param int $red 赤 | |
* @param int $green 緑 | |
* @param int $blue 青 |
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 each = function(obj, callback) { | |
for(var p in obj) { | |
if(!obj.hasOwnProperty(p)) continue; | |
callback(p, obj[p]); | |
} | |
}; | |
var Model = (function() { | |
function Model(params) { |
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
<?php | |
define('CELL_START', 'S'); | |
define('CELL_GOAL', 'G'); | |
define('CELL_WALL', '#'); | |
define('NA', -1); | |
function search($sx, $sy) { | |
global $maze, $visited; |
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
/** | |
* @class ChatworkExtension | |
*/ | |
var ChatworkExtension = (function() { | |
var config = { | |
ids: { | |
roomInfo: { | |
name: '_roomInfoName', | |
description: '_roomInfoDescription' | |
} |
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 iconClasses = [ | |
'icoFontYahoo', | |
'icoFontWindows', | |
'icoFontVideoChatOff', | |
'icoFontVideoChat', | |
'icoFontTwitter', | |
'icoFontTumblr', | |
'icoFontTriangleTop', | |
'icoFontTriangleRight', | |
'icoFontTriangleLeft', |
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
<?php | |
namespace Observer; | |
require_once __DIR__.'/model.php'; | |
/** | |
* FuelのModelクラスを継承し(という想定で => 継承枠を開けて) | |
* 更にEventModelの機構を使用するシンプルなモデル | |
*/ |
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 parseQuery(query) { | |
return query.split("&").reduce(function(memo, query){ | |
var parts = query.split('='), | |
key = parts[0], | |
val = encodeURIComponent(parts[1]); | |
if(key.indexOf('[]') == key.length-2) { | |
key = key.replace('[]', ''); | |
memo[key] = Array.isArray(memo[key]) ? memo[key] : []; | |
memo[key].push(val); |