HomeWorks

HomeWorks Test page for experimenting with FB API and data analitics. Often using open data or Twitte

db.mqtt.find({topic:"rrd/srt"}).forEach(function(doc){ db.subset.insert(doc); });http://krysmann.net/wordpress/?p=62610
17/05/2016

db.mqtt.find({topic:"rrd/srt"}).forEach(function(doc){ db.subset.insert(doc); });

http://krysmann.net/wordpress/?p=62610

db.mqtt.find({topic:”rrd/srt”}).forEach(function(doc){ db.subset.insert(doc); });

Following query will count occurance of users: db.tweets.aggregate([ { $group: { _id: '$user.screen_name', count: {$sum:...
05/05/2016

Following query will count occurance of users: db.tweets.aggregate([ { $group: { _id: '$user.screen_name', count: {$sum: 1} }}, {$sort: { count: -1 }} ], {allowDiskUse: true}); Note the option allowDiskUse is needed if error: { "code" : 16819, "errmsg" : "Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in.", [ 26 more words. ]

http://krysmann.net/wordpress/?p=62606

Following query will count occurance of users: db.tweets.aggregate([ { $group: { _id: ‘$user.screen_name’, count: {$sum: 1} }}, {$sort: { count: -1 }} ], {allowDiskUse: true}); Note the…

Copying selection where field date == 20120105 to new collection subset. If subset not exists then it will be created. d...
03/05/2016

Copying selection where field date == 20120105 to new collection subset. If subset not exists then it will be created. db.my_collection.find({date:"20120105"}).forEach(function(doc){ db.subset.insert(doc); });

http://krysmann.net/wordpress/?p=62601

Copying selection where field date == 20120105 to new collection subset. If subset not exists then it will be created. db.my_collection.find({date:”20120105″}).forEach(function(doc){ db…

Source:  db.tweets.find().sort({_id:-1}).limit(1).forEach(function (doc){ print(doc._id.getTimestamp()) }) will return t...
03/05/2016

Source: db.tweets.find().sort({_id:-1}).limit(1).forEach(function (doc){ print(doc._id.getTimestamp()) }) will return timestamp of most recent record in following format: Tue May 03 2016 08:29:06 GMT+0200 (CEST)

http://krysmann.net/wordpress/?p=62597

Source:  db.tweets.find().sort({_id:-1}).limit(1).forEach(function (doc){ print(doc._id.getTimestamp()) }) will return timestamp of most recent record in following format: Tue May 03 2016 08:29:06 …

Adres

Gouda
1234CB

Meldingen

Wees de eerste die het weet en laat ons u een e-mail sturen wanneer HomeWorks nieuws en promoties plaatst. Uw e-mailadres wordt niet voor andere doeleinden gebruikt en u kunt zich op elk gewenst moment afmelden.

Delen