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 | |
// Possible example of using the CakePHP Schema callback `after` | |
// to insert content in the database. | |
// Inspiration: https://github.com/majna/schema | |
// Copy schema.php to app/Config/Schema | |
// Run: ./Console/cake schema create | |
App::uses('ClassRegistry', 'Utility'); | |
class AppSchema extends CakeSchema { |
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 | |
require_once 'PHPUnit/Framework/TestCase.php'; | |
require_once 'vfsStream/vfsStream.php'; | |
// require_once 'hoge.php'; | |
/** | |
* ファイルシステムのテストに関してはURL参照 | |
* とりあえずざっくり使う方法メモ | |
* @see http://www.phpunit.de/manual/3.6/ja/test-doubles.html#test-doubles.mocking-the-filesystem.examples.ExampleTest.php |
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 | |
if (isset($_POST['input']) && isset($_POST['mode'])) { | |
ob_start(); | |
// Needs decoding because $_POST is encoded when jQuery.ajax sended the data. | |
$input = urldecode($_POST['input']); | |
switch ($_POST['mode']) { | |
case 'serialize': | |
$output = serialize($input); |
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
val ahoNum = Array( | |
"ぜ~ろ", "い~ち", "にぃ~", "さぁ~ん", | |
"よぉ~ん", "ごぉ~", "ろぉ~く", "ななぁ~", | |
"はぁ~ち", "きゅ~ぅ", "じゅ~ぅ" | |
) | |
class NabeInt(i:Int){ | |
def から(j:Int):List[Int] = (i to j).toList | |
} |
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 | |
/** | |
* Array to Text Table Generation Class | |
* | |
* @author Tony Landis <[email protected]> | |
* @link http://www.tonylandis.com/ | |
* @copyright Copyright (C) 2006-2009 Tony Landis | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
*/ | |
class ArrayToTextTable |
NewerOlder