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 Foo{ | |
public function call($call){ | |
call_user_func(array($this, $call)); | |
} | |
static public function publicmethod(){ | |
echo __METHOD__; | |
} | |
static protected function protectedmethod(){ | |
echo __METHOD__; |
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
/** | |
* Extended HtmlHelper | |
* @author kanonji | |
*/ | |
class ExHtmlHelper extends HtmlHelper { | |
/** | |
* Extended HtmlHelper->link() to understand the url is current or not. | |
* | |
* $options['current'] is additional option key. | |
* If no value set, 'current' is set as default. |
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
<h1>Look see when Undefined variable/offset notice occurs with isset() is_null() empty() if()</h1> | |
<h2>$foo;</h2> | |
<?php $foo;?> | |
<h3>isset($foo)</h3> | |
<p> | |
<?php var_dump(isset($foo)); ?> | |
</p> | |
<h3>is_null($foo)</h3> | |
<p> | |
<?php var_dump(is_null($foo)); ?> |
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 | |
/** | |
* Extended HtmlHelper | |
* @author kanonji | |
*/ | |
class ExHtmlHelper extends HtmlHelper { | |
/** | |
* $.webroot() for jQuery | |
* | |
* To get webroot path when using jQuery. |
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
If you see that this file is exist, file_exists() is not binary safe. |
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 | |
/** | |
* \x00-\x1f\x7f: Controll Characters | |
* \x22 " | |
* \x2a * | |
* \x2f / | |
* \x3a : | |
* \x3c < | |
* \x3e > | |
* \x3f ? |
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
var Time = function( time, type ){ | |
this.hour = 0; | |
this.minute = 0; | |
this.second = 0; | |
this.millisecond = 0; | |
var HOURS = 60 * 60 * 1000; | |
var MINUTES = 60 * 1000; | |
var SECONDS = 1000; | |
this._HOUR = function(){ return HOURS }; | |
this._MINUTE = function(){ return MINUTES }; |
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
var Try = function(){ | |
this.bar = 'bar'; | |
$(window).bind( "load", { self: this }, this.loaded ); | |
}; | |
Try.prototype = { | |
loaded: function( e ){ | |
console.info('------loaded------'); | |
console.debug(this); | |
this.foo = 'loaded'; | |
$('body').append( $('<ul>').attr('id', 'foo').append($('<li>')).append($('<li>')) ); |
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 Bar; | |
use strict; | |
use warnings; | |
use utf8; | |
use Number::Phone::JP; | |
sub invoke { | |
my ( $self ) = @_; |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Gearman::Client; | |
#use Gearman::Task; | |
use Storable qw/freeze/; | |
use Getopt::Long qw/GetOptions/; | |
my %opts = (); |
OlderNewer