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
/* | |
* join function for Java | |
* | |
* example | |
* List<String> list = new ArrayList<String>(); | |
* list.add("hogehoge"); | |
* list.add("fugafuga"); | |
* list.add("piyopiyo"); | |
* join(list,"&");// hogehoge&fugafuga&piyopiyo | |
* |
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
/* | |
* Brainf**k in JavaScript1.6 | |
*/ | |
function Cell(memory){ | |
this._memory = memory || []; | |
if(!this._memory.length){ | |
this._memory.push(this); | |
} | |
}; | |
Cell.prototype._memory; |
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
(function($,templateStr){ | |
var MiniTemplate = function(template){ | |
this.template = eval(['([\'',template.replace(/\$\{([^${}]+)\}/g,'\',{key:\'$1\'},\''),'\'])'].join('')); | |
}; | |
MiniTemplate.prototype.merge = function(context){ | |
var template = this.template || []; | |
var temp = []; | |
for(var i = 0; i < template.length; i++){ | |
if(typeof template[i] == 'string'){ | |
temp.push(template[i]); |
NewerOlder