September 08, 2010

Pro PHP Refactoring

After comparing the lose of Doodad and benefit of margin, here is the result.(continue...)

September 03, 2010

Call back in JavaScript

function a(callback, temp){
temp = "Hello there";
callback(temp);
}
//---------------
function b(callback, arg1, arg2) {
callback('Hi there ' + arg1 + ", " + arg2);
}
b(function(task){
alert(task);
},"arg1","arg2");