Skip to content

Instantly share code, notes, and snippets.

View chuckremes's full-sized avatar

Chuck Remes chuckremes

View GitHub Profile
XHR finished loading: "file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Info.plist".
index-debug.html:61Load
file:///Users/cremes/Documents/development/javascript/Pilot2/lib/amqp-js/javascripts/mq.js:240Attempting Connection
file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/Objective-J/Objective-J.js:1495XHR finished loading: "file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/W3C.environment/Project.sj".
file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/Objective-J/Objective-J.js:1495XHR finished loading: "file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/AppKit/Info.plist".
file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/Objective-J/Objective-J.js:14
XHR finished loading: "file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Info.plist".
index-debug.html:61Load
file:///Users/cremes/Documents/development/javascript/Pilot2/lib/amqp-js/javascripts/mq.js:240
Attempting Connection
file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/Objective-J/Objective-J.js:1495XHR finished loading: "file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/W3C.environment/Project.sj".
file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/Objective-J/Objective-J.js:1495XHR finished loading: "file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/AppKit/Info.plist".
file:///Users/cremes/Documents/development/javascript/Pilot2/Build/Debug/Desktop%20Browser/Project/Frameworks/Debug/Objective-J/Objective-J.js:1
@import <Foundation/CPObject.j>
@import <AppKit/CPFlashMovie.j>
@import <AppKit/CPFlashView.j>
@implementation AppController : CPObject
{
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
@outlet theOther;
CPFlashMovie _movie;
#<Bar high=1784.75, timestamp=Thu Dec 17 13:45:00 -0600 2009, open=1784.75, low=1782.25, close=1783.25>
#<Bar high=1784.75, timestamp=Thu Dec 17 14:00:00 -0600 2009, open=1783.25, low=1781.25, close=1781.25>
#<Bar high=1782.75, timestamp=Thu Dec 17 14:15:00 -0600 2009, open=1781.0, low=1781.0, close=1781.25>
#<Bar high=1785.5, timestamp=Thu Dec 17 14:30:00 -0600 2009, open=1781.25, low=1781.25, close=1784.0>
#<Bar high=1784.0, timestamp=Thu Dec 17 14:45:00 -0600 2009, open=1784.0, low=1779.25, close=1780.0>
#<Bar high=1788.5, timestamp=Thu Dec 17 15:00:00 -0600 2009, open=1779.5, low=1777.5, close=1787.25>
#<Bar high=-2147483648.0, timestamp=Fri Dec 18 08:30:00 -0600 2009, open=-2147483648.0, low=-2147483648.0, close=-2147483648.0>
#<Bar high=-2147483648.0, timestamp=Fri Dec 18 08:45:00 -0600 2009, open=-2147483648.0, low=-2147483648.0, close=-2147483648.0>
#<Bar high=-2147483648.0, timestamp=Fri Dec 18 09:00:00 -0600 2009, open=-2147483648.0, low=-2147483648.0, close=-2147483648.0>
#<Bar high=-2147483648.0,
_queue = MQ.queue("auto").bind(exchangeName).callback(function(msg) {
console.log("called callback");
[self processUpdate:msg];
});
{ "_id" : ObjectId("4b4cbf8a870d49043c16625e"), "timestamp" : "2010-01-04T11:09:00.6571", "price" : 1887, "sales_condition_code" : 255, "correction_type" : 0, "contributor_id_code" : 0, "sales_condition_label" : "", "contract_id" : 666730, "units" : 64, "price_type" : "normal", "contributor_id" : "" }
{ "_id" : ObjectId("4b4cbf8a870d49043c16625e"),
"timestamp" : "2010-01-04T11:09:00.6571",
"price" : 1887,
"sales_condition_code" : 255,
"correction_type" : 0,
"contributor_id_code" : 0,
"sales_condition_label" : "",
"contract_id" : 666730,
"units" : 64,
"price_type" : "normal",
I have a collection of documents (10s of millions) with this structure:
{
"_id" : ObjectId("4b4c9287870d49085007b1c7"),
"timestamp" : "2009-12-14T07:47:00.4765",
"price" : 1803,
"contract_id" : 666730,
"volume" : 20
}
> minute.find()
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564420000 }, "value" : { "high" : 71.84, "low" : 71.77, "volume" : 1488 } }
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564480000 }, "value" : { "high" : 71.84, "low" : 71.77, "volume" : 2399 } }
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564540000 }, "value" : { "high" : 71.84, "low" : 71.76, "volume" : 3426 } }
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564600000 }, "value" : { "high" : 71.83, "low" : 71.79, "volume" : 335 } }
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564660000 }, "value" : { "high" : 71.86, "low" : 71.79, "volume" : 1279 } }
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564720000 }, "value" : { "high" : 71.87, "low" : 71.81, "volume" : 1088 } }
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564780000 }, "value" : { "high" : 71.87, "low" : 71.81, "volume" : 855 } }
{ "_id" : { "contract_id" : 265128, "timestamp" : 1260564840000 }, "value" : { "high" : 71.88, "low
> contracts.find({full_name: /CLE/})
{ "_id" : ObjectId("4b55c962870d490f80000001"), "month" : "F", "exchange_name" : "NYMEX on Globex", "expiration_date" : "2010/12/20 00:00:00", "exchange_id" : 67, "symbol" : "F.US.CLEF11", "scale" : 2, "type" : "future", "description" : "Crude Light (Globex), Jan 11", "year" : "2011", "tick_size" : 0.01, "tick_value" : 10, "contract_id" : 265126, "full_name" : "F.US.CLEF11", "currency" : "USD" }
{ "_id" : ObjectId("4b55c963870d490f80000002"), "month" : "F", "exchange_name" : "NYMEX on Globex", "expiration_date" : "2011/12/20 00:00:00", "exchange_id" : 67, "symbol" : "F.US.CLEF12", "scale" : 2, "type" : "future", "description" : "Crude Light (Globex), Jan 12", "year" : "2012", "tick_size" : 0.01, "tick_value" : 10, "contract_id" : 284201, "full_name" : "F.US.CLEF12", "currency" : "USD" }
{ "_id" : ObjectId("4b55c964870d490f80000003"), "month" : "F", "exchange_name" : "NYMEX on Globex", "expiration_date" : "2012/12/19 00:00:00", "exchange_id" : 67, "symbol" : "F.US.CLEF13",