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
{"EN/abc":"abc in EN ! Woohoooo !","version":3,"NL/abc":"abc in NL wooooohooooo ! chchchchcha"} |
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 util = require('util'); | |
var express = require('express'); | |
var spawn = require('child_process').spawn; | |
var argv = require('optimist').argv; | |
var command = spawn(argv.command); | |
// mongo.stdin.write("db.mycoll.save(a:'a');"); | |
command.stdout.on('data', function (data) { | |
console.log('stdout: ' + data); |
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
javax.servlet.jsp.JspException | |
at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:133) | |
at booking._0002fbooking_0002fplanner_0002ejspplanner_jsp_0._jspService(_0002fbooking_0002fplanner_0002ejspplanner_jsp_0.java:541) | |
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) | |
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174) | |
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:274) | |
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:387) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) | |
at com.broadvision.servlet.ServletContainer.service(ServletContainer.java:404) |
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
//Consider this as base collection. It is important to know how the MongoDB interprets 'null'. | |
> db.items.find(); | |
{ "_id" : ObjectId("4ec60c984f5c08053610772f"), "attr1" : "a" } | |
{ "_id" : ObjectId("4ec60cb14f5c080536107730"), "attr1" : "b" } | |
{ "_id" : ObjectId("4ec60cb44f5c080536107731"), "attr1" : "c" } | |
{ "_id" : ObjectId("4ec60d0c4f5c080536107732"), "attr2" : "d" } | |
{ "_id" : ObjectId("4ec60d444f5c080536107733"), "attr2" : "d", "attr1" : null } | |
{ "_id" : ObjectId("4ec60fc34f5c080536107734"), "attr1" : "" } |
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'); | |
console.log("Server starting ..."); | |
process.on('uncaughtException', function (err) { | |
console.log( "[Inside 'uncaughtException' event!] " + err.stack || err.message ); | |
process.exit(1); | |
}); | |
if (Math.random() > 0.5) throw new Error('Failed, 50:50'); |
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'); | |
process.on('uncaughtException', function(err) { | |
console.log( " UNCAUGHT EXCEPTION " ); | |
console.log( "[Inside 'uncaughtException' event] " + err.stack || err.message ); | |
}); | |
anHTTPServer = express.createServer(function (req,res){ | |
if (Math.random() > 0.9) throw new Error('fail!'); | |
res.send("Hello World : Express!!"); | |
}); |
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 http = require("http"); | |
var cluster = require("cluster"); | |
anHTTPServer = http.createServer(function (req,res){ | |
res.write("Hello"); | |
res.end(); | |
}); | |
//anHTTPServer.listen(3000); | |
cluster(anHTTPServer) |
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
//some code avoided .... | |
getDatabase = function(host,port,dbname,isAutoReconnect,isStrict) { | |
if (logger) logger.info("Creating database. Details ... host: " + host +", port: "+ port + ", dbname: " + dbname + ". Auto Reconnect: " + isAutoReconnect + ", Strict Mode: " + isStrict); | |
var db = new mongo.Db(dbname, new mongo.Server(host,port, {'auto_reconnect':isAutoReconnect,poolSize: 4}),{strict:isStrict}); | |
return db; | |
} | |
module.exports.getCollection = function (db,collectionName,callback){ |
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 sys = require("sys"); | |
var Spreadsheet = require("spreadsheet"); | |
// Instantiate a spreadsheet using the key directly. | |
var sheet = new Spreadsheet("0AkUwNDE9ftXvdGMxQ2hMS2oySG9HeV9OeUtkZ2xoM1E"); //Works | |
//var sheet = new Spreadsheet("0Aiorqa2o8GY9dGk1MVNIMmhpZGR5YmRfTzlfdzNwZHc"); | |
// Load the worksheets, callback will be called for each worksheet | |
sheet.worksheets(function(err,ws){ |
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
[60550.147454] node invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0 | |
[60550.147473] node cpuset=/ mems_allowed=0 | |
[60550.147480] Pid: 6638, comm: node Not tainted 2.6.35.11-83.9.amzn1.x86_64 #1 | |
[60550.147488] Call Trace: | |
[60550.147503] [<ffffffff8108e818>] ? cpuset_print_task_mems_allowed+0x98/0xa0 | |
[60550.147514] [<ffffffff810bb327>] dump_header.clone.1+0x77/0x1a0 | |
[60550.147525] [<ffffffff8131fd99>] ? _raw_spin_unlock_irqrestore+0x19/0x20 | |
[60550.147535] [<ffffffff811b119f>] ? ___ratelimit+0x9f/0x120 | |
[60550.147543] [<ffffffff810bb4c6>] oom_kill_process.clone.0+0x76/0x140 | |
[60550.147551] [<ffffffff810bb6a8>] __out_of_memory+0x118/0x190 |