8:00 – 10:00, 12:00 – 4:00 SR
- DB backups
- webapps backups
- The server seems to be running fine after the restart
Class from 10:00 – 12:00 today
8:00 – 10:00, 12:00 – 4:00 SR
Class from 10:00 – 12:00 today
8:00 – 5:00 SR
// Typical way to handle callbacks
var self = this;
setTimeout(function() {self.callbackFn()}, this.delay);
// More clear?
setTimeout(this.callbackFn.bind(this), this.delay);
Interestingly, you can move the inner function out of the callback and into the “Constrictor” (e.g. combination inheritance) so that the function only gets created once:
function MyClass(){
var self = this;
this.boundFunc = function(){self.callbackFn()};
}
This allows for a nicer looking call:
setTimeout(this.boundFunc, this.delay);
On the whole, I think I like the last pattern the best.
8:00 – 4:00 SR
8:00 – 5:00 SR
8:00 – 5:00 SR
8:00 – 5:00 SR
8:00 – 5:00 SR
var myGlobalScoped = 0;
console.log("Hello Block Scope " + myGlobalScoped);
(function (start, stop) {
for (var iBlockScoped = start; iBlockScoped < stop; iBlockScoped++) {
myGlobalScoped += iBlockScoped;
}
})(0, 5);
console.log("Hello Block Scope " + myGlobalScoped);
8:00 – 5:00 SR
8:00 – 5:00 SR
8:00 – 10:00, 1:00 – 5:00 SR
You must be logged in to post a comment.