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
for (var i=0; i < slides.length; i++) { | |
var slide = slides[i]; | |
redis.incr("ids::slides", function(err, sid) { | |
console.log("we've incremented sid to " + sid); | |
redis.set("slide:"+sid, slide, function(err, ok) { | |
console.log("Adding slide " + "slide:"+sid + " with score " + i); | |
redis.zadd(key, i, "slide:"+sid); | |
}); | |
}); | |
} |
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
no callback to send error: 'ERR wrong number of arguments for \'set\' command' | |
events:12 | |
throw arguments[1]; | |
^ | |
Error: ERR wrong number of arguments for 'set' command | |
at RedisClient.return_error (/Users/davida/lib/node/redis/index.js:495:15) | |
at RedisReplyParser.<anonymous> (/Users/davida/lib/node/redis/index.js:369:18) | |
at RedisReplyParser.emit (events:27:15) | |
at RedisReplyParser.send_error (/Users/davida/lib/node/redis/index.js:253:14) |
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
redis.zrangebyscore(key, pos, "inf", function(error, to_incr) { | |
var cmds = []; | |
if (to_incr) { | |
for (var z = 0; z < to_incr.length; z++) { | |
cmds.push(['zincrby', 1, to_incr[z]]); | |
} | |
} | |
cmds.push(['zadd', key, pos, slideId]); | |
redis.multi(cmds).exec(cmds, function(err, results) { | |
res.writeHead(200, {'Content-Type': 'text/html'}); |
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 x = 'test'; | |
var vm = require('vm'); | |
console.log('in test.js'); | |
var test = "console.log('in test.vm'); console.log('x = ', x);"; | |
vm.runInThisContext(test, 'test.vm'); |
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
TypeError: Object function (err){ | |
if (err === true) { | |
next(); | |
} else if (err) { | |
next(err); | |
} else { | |
pass(req._route_index+1); | |
} | |
} has no method 'render |
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("david exploring view selectors", function(){ | |
var obj = $$({ | |
model: { | |
}, | |
view: { | |
format: '<div id="1" class="grandpa"><div id="2" class="other parent"><div id="3" class="child other andthen">test</div></div></div>', | |
}, | |
controller: {}, | |
myFunction: function(){} | |
}); // obj |
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
Dec 14 23:41:54 socket debug server.lua: accepted new client connection from 127.0.0.1:58480 to 5222 | |
Dec 14 23:41:54 sessionmanager debug open sessions now: 9 | |
Dec 14 23:41:54 c2s7f97d2d2d400 info Client connected | |
Dec 14 23:41:54 c2s7f97d2d2d400 debug Client sent opening <stream:stream> to localhost | |
Dec 14 23:41:54 c2s7f97d2d2d400 debug Sent reply <stream:stream> to client | |
Dec 14 23:41:54 c2s7f97d2d2d400 debug Received[c2s_unauthed]: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'> | |
Dec 14 23:41:54 socket debug server.lua: we need to do tls, but delaying until send buffer empty | |
Dec 14 23:41:54 c2s7f97d2d2d400 debug TLS negotiation started for c2s_unauthed... | |
Dec 14 23:41:54 socket debug server.lua: attempting to start tls on tcp{client}: 0x7f97d3130828 | |
Dec 14 23:41:54 socket debug server.lua: ssl handshake done |
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
Dec 16 20:56:42 suki kernel[0]: PM notification timeout (pid 139, iTunes) | |
Dec 16 20:56:45 suki kernel[0]: en0: BSSID changed to 38:60:77:23:4d:b7 | |
Dec 16 20:56:45 suki kernel[0]: wlEvent: en0 en0 Link DOWN | |
Dec 16 20:56:45 suki kernel[0]: AirPort: Link Down on en0. Reason 8 (Disassociated because station leaving). | |
Dec 16 20:56:46 suki kernel[0]: | |
Dec 16 20:57:02 suki kernel[0]: Wake reason: EC.PowerButton PWRB (User) | |
Dec 16 20:57:02 suki kernel[0]: Previous Sleep Cause: 5 | |
Dec 16 20:57:02 suki kernel[0]: en0: 802.11d country code set to 'X0'. | |
Dec 16 20:57:02 suki kernel[0]: en0: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 | |
Dec 16 20:57:02 suki kernel[0]: AppleUSBMultitouchDriver::checkStatus - received Status Packet, Payload 2: device was reinitialized |
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
// the meteor framework expects calls to be sync: | |
Meteor.methods({ | |
search: function (term) { | |
return searchresults; | |
} | |
}); | |
// the db call that performs the search is async: | |
db.run("SELECT key FROM paragraphs WHERE data MATCH '" + term + "'", function(err, rows) { | |
searchresults = rows; |
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
{"d":{"results":[{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/Composite?Sources=\u0027web\u0027&Query=\u0027tomato\u0027&$skip=0&$top=1","type":"ExpandableSearchResult"},"ID":"def746e4-ca9f-47bc-ab0a-1d419a75b773","WebTotal":"621000","WebOffset":"0","ImageTotal":"","ImageOffset":"","VideoTotal":"","VideoOffset":"","NewsTotal":"","NewsOffset":"","SpellingSuggestionsTotal":"","AlteredQuery":"","AlterationOverrideQuery":"","Web":[{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/ExpandableSearchResultSet(guid\u0027def746e4-ca9f-47bc-ab0a-1d419a75b773\u0027)/Web?$skip=0&$top=1","type":"WebResult"},"ID":"f8d6c3a3-c977-4422-8b4f-ec3d91efb1a6","Title":"Tomato - Wikipedia, the free encyclopedia","Description":"The word \"tomato\" may refer to the plant (Solanum lycopersicum) or the edible, typically red, fruit that it bears. Having originated in America, the tomato was spread ...","DisplayUrl":"en.wikipedia.org/wiki/Tomato","Url":"http://en.wikipedia.or |
OlderNewer