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 http = require('http'), | |
sys = require('sys'), | |
path = require('path'), | |
posix = require('posix'), | |
events = require('events'); | |
var Walker = function() { | |
this._counter = 0; | |
}; | |
Walker.prototype = { |
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
// exports defined out here. | |
exports.foo = "bar" | |
require( | |
"sys", "file", "persistence/sqlite3" | |
)(function (sys, file, sqlite) { | |
sys.p(File); | |
// Rest of program here | |
}); |
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 sys = require("sys"), | |
http = require("http"); | |
var google = http.createClient(80, "www.google.com"); | |
var request = google.request("GET", "/", {"host": "www.google.com"}); | |
request.addListener('response', function (response) { | |
response.setBodyEncoding("utf8"); | |
var body = ''; |
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
+ (id)boxEnclosingView:(CPView)aView | |
{ | |
var box = [[self alloc] initWithFrame:CGRectMakeZero()], | |
enclosingView = [aView superview]; | |
[box setFrameFromContentFrame:[aView frame]]; | |
[enclosingView replaceSubview:aView with:box]; | |
[box setContentView:aView]; |
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 B extends A | |
constructor: -> | |
@where_am_i: 'at work' | |
sayWhereYouAre: -> | |
alert 'I am ' + @where_am_i |
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 A = function() {}; | |
A.prototype.over = function() {}; | |
var B = function() { | |
this.where_am_i = 'at work'; | |
A.call(this); | |
}; | |
var _fn = function() {}; |
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
Connection.prototype.query = function (sql, callback) { | |
if (!this._queries) this._queries = []; | |
this._queries.push([sql, callback]); | |
this.maybeDispatchQuery(); | |
}; |
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
asyncFunction: (x, y, z) ~> | |
yield | |
readFirstFile: (dir, ~, error) ~> | |
[err, files]: fs.readdir dir, ~ | |
return error(err) if err | |
[err, out]: fs.readFile files[o], ~ | |
return error(err) if err | |
yield content |
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.paths.unshift('lib'); | |
require('express'); | |
require('express/plugins'); | |
redisclient = require('redis-node-client/lib/redis-client'); | |
redis = redisclient.createClient(); | |
sys = require('sys'); | |
configure(function () { | |
use(Logger); |
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.paths.unshift('lib'); | |
require('express'); | |
require('express/plugins'); | |
redisclient = require('redis-node-client/lib/redis-client'); | |
Parallel = require('parallel').Parallel; | |
redis = redisclient.createClient(); | |
sys = require('sys'); | |
configure(function () { | |
use(Logger); |
OlderNewer