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
<?php | |
if ( ! function_exists( 'get_the' ) ) { | |
function get_the( $func ) { | |
$func = 'the_' . $func; | |
$args = func_get_args(); | |
array_shift($args); | |
ob_start(); | |
call_user_func_array( $func, $args ); | |
return ob_get_clean(); |
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
package jp.foreignkey.java.io; | |
import java.io.FilterInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
/** | |
* データの流量を監視する InputStream | |
* 監視には、MonitorInputStreamListener を利用する。 | |
* |
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
<?php | |
class ImageLoadingFailedException extends ErrorException {} | |
class UnSupportedImageException extends ErrorException {} | |
/** |
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
"use strict" | |
do -> | |
if !window.Modernizr | |
return | |
ua = new String(window.navigator.userAgent.toLowerCase()) | |
ua.has = (cond) -> | |
@indexOf(cond) != -1 |
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
コンストラクタを用いた継承のアプローチ。 | |
オブジェクト生成の度に、各オブジェクトのメソッドとして関数オブジェクトを生成されるのかしら? |
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
プロトタイプチェーンによる継承で、基本だと思うんですが、16行目で Employee.prototype = new Person; ってやった時に、Personのコンストラクタが走るのが微妙です。 | |
何か認識を間違っているのかしら? |
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
<?php | |
$services_json = getenv('VCAP_SERVICES'); | |
$services = json_decode($services_json, true); | |
$config = null; | |
foreach ($services as $name => $service) { | |
if (0 === stripos($name, 'mysql')) { | |
$config = $service[0]['credentials']; | |
break; | |
} |
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
<?php | |
register_shutdown_function('cconsole::flush'); | |
class cconsole | |
{ | |
private static $logs = array(); | |
private static $prefix = '[php] '; | |
private static $timers = array(); |
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
<?php | |
/** | |
* Output the contents of the variable along with the file and line number. | |
* @param mixed $var output variable of any types. | |
* @param string $label optional. default is null. | |
* @param boolean $echo optional. default is true. | |
* @return void | |
*/ | |
function debug( $var, $label=null, $echo=true ) { |
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
1. svn の trunk の中で git init | |
2. ~/.subversion/config に以下を記述して git リソースなどを svn 管理下から除外する | |
global-ignores = .DS_Store Thumbs.db .git .gitignore | |
OlderNewer