This file contains hidden or 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 middleware = function() { ... } | |
var stack = middleware(function(data1, data2, next) { | |
}, function(data1, data2, next) { | |
}, function(data1, data2, next) { | |
}); |
This file contains hidden or 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
uncaught: Error: ECONNREFUSED, Connection refused | |
at Socket._onConnect (net.js:601:18) | |
at IOWatcher.onWritable (net.js:186:12) |
This file contains hidden or 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 Mage = { | |
cast: function _cast() { | |
console.log(this.name + ' cast ' + magic); | |
} | |
}; | |
var BlackMage = { | |
fira: function _fira() { this.cast('fira') }, | |
watera: function _watera() { this.cast('watera') } | |
blizarra: function _blizarra(){ this.cast('blizarra') } |
This file contains hidden or 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
"prototype": function _prototype(proto) { | |
return this.assert( | |
proto.isPrototypeOf(this.obj), | |
"expected " + this.inspect + " to have " + i(proto) + " in it's prototype chain", | |
"expected " + this.inspect + " to not have "+ i(proto) + " in it's prototype chain" | |
); | |
}, |
This file contains hidden or 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 db = new Db('node-mongo-blog', new Server(host, port, {}), {native_parser:true}); | |
var blogstack = middleware(function(db, data, next) { | |
db.open(function(err, db) { | |
data.db = db; | |
next(); | |
}); | |
}, function(db, data, next) { | |
db.dropDatabase(function(err, result) { | |
next(); |
This file contains hidden or 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
require("http").createServer(function(req, res) { | |
res.end("BROWSER SHARING WITH NODE AND JS"); | |
}).listen(80); |
This file contains hidden or 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
<form> | |
<div class="cb_lnmlbl"><h3>Select a City</h3></div> | |
<div class="wh_citycb"> | |
<select size="1" > | |
<option>Mumbai</option><option>Delhi</option><option>Lucknow</option><option>Indore</option><option>Bengaluru</option><option>Kolkata</option> | |
</select> | |
</div> | |
<div class="wh_citylb"><label name="citynm">Mumbai</label> <label name="citydate"> May 10th</label></div> |
This file contains hidden or 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 request = require("request-middleware"); | |
var errorFunction = function(err, res, body, next) { | |
if (err.type === "timeout") { | |
this.repeat(); | |
} else { | |
next(err); | |
} | |
}; |
This file contains hidden or 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
/* | |
> Database persistence | |
server - | |
> CSS | |
> Server side logic - > HTML | |
> Client side logic (JS) | |
*/ |
This file contains hidden or 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
class Employee | |
class FullTimeEmployee inherits Employee | |
class PartTimeEmployee inherits Employee | |
// versus | |
class Employee |