A snapshot of Bay Area Bike Share data visualized as a stacked bar chart, by city. Shows # of available bikes, # of available docks, and from that you can naturally figured out the total number of bikes in circulation in each city.
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
var express = require('express'), | |
hogan = require('hogan.js'), | |
app = express.createServer(); | |
app.set('view engine', 'hogan'); | |
app.register('hogan', { | |
compile: function() { | |
var t = hogan.compile.apply(hogan, arguments); | |
return function() { | |
return t.render.apply(t, arguments); |
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
#JITSU | |
error: { dev: 65609, | |
error: ino: 62195, | |
error: mode: 33279, | |
error: nlink: 1, | |
error: uid: 113, | |
error: gid: 65534, | |
error: rdev: -1, | |
error: size: 61, | |
error: blksize: 512, |
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
/** | |
* Entry point | |
*/ | |
var express = require('express') | |
, fs = require('fs') | |
, db = require('./db-connect'); | |
//load config stuff | |
var fs = require('fs'); |
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
info: Welcome to Nodejitsu lyaunzbe | |
info: jitsu v0.9.8 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command databases create mongo bangalter | |
info: A new mongo has been created | |
info: Database name: undefined | |
error: Unknown database type: undefined | |
info: Nodejitsu ok |
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
/usr/local/lib/node_modules/jitsu/lib/jitsu/commands/databases.js:184 | |
results.forEach(function (database) { | |
^ | |
TypeError: Object #<Object> has no method 'forEach' | |
at databases.list (/usr/local/lib/node_modules/jitsu/lib/jitsu/commands/databases.js:184:15) | |
at Databases.list (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/lib/client/databases.js:56:5) | |
at Request.Client.request [as _callback] (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/lib/client/client.js:109:5) | |
at Request.request.self.callback (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/node_modules/request/main.js:104:22) | |
at Request.<anonymous> (/usr/local/lib/node_modules/jitsu/node_modules/nodejitsu-api/node_modules/request/main.js:458:18) | |
at Request.EventEmitter.emit (events.js:88:17) |
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
FileInputStream FIS = null; | |
try { | |
FIS = new FileInputStream("src/dataset.dat"); | |
} catch (FileNotFoundException e) { | |
e.printStackTrace(); | |
} | |
BufferedInputStream BIS = new BufferedInputStream(FIS, 1000); | |
DataInputStream DIS = new DataInputStream(BIS); |
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
});
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
var static = require('node-static'); | |
// | |
// Create a node-static server instance to serve the './public' folder | |
// | |
var file = new(static.Server)('./public'); | |
require('http').createServer(function (request, response) { | |
request.addListener('end', function () { | |
// |
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
test('Module definition', function(t){ | |
t.plan(2); | |
t.type(lute, 'function', 'Lute should be a funciton.'); | |
t.type(task,'object', 'Task should be an object.'); | |
t.end(); | |
}); | |
test('Processesing an example task', function(t){ | |
t.plan(1); | |
lute(['rick.ogg'],task, function(err){ |
OlderNewer