Last edited: 2018-06-10
- jQuery HTML
- Angular JS
- React
- React (multi-page)
- Vue.js
- Vue.js (multi-page)
https://share.icloud.com/photos/0w3YqvOVSuD_GWubI9k65WnoA |
Param ( | |
[alias("nl")] | |
[switch] | |
$NoLinks, | |
[alias("v")] | |
[switch] | |
$Verbose, | |
[alias("q")] | |
[switch] | |
$Quiet, |
{ | |
"phases": [ | |
{ | |
"type": "map", | |
"assets": ["/manta/public/kartlytics/bin/video-metadata"], | |
"exec": "/assets/manta/public/kartlytics/bin/video-metadata /$MANTA_USER/public $MANTA_INPUT_FILE" | |
}, | |
{ | |
"type": "reduce", | |
"exec": "json -g | mpipe /$MANTA_USER/public/kartlytics-summary.json" |
mfind -t o -n JPG /$MANTA_USER/stor/pictures | mjob create -w -m 'convert -quality 50 -define webp:lossless=true $MANTA_INPUT_FILE /var/tmp/out.webp && mpipe ${MANTA_INPUT_OBJECT%.*}.webp < /var/tmp/out.webp' |
mfind -t o -n JPG /$MANTA_USER/stor/pictures | mjob create -w -m 'convert -quality 50 -define webp:lossless=true $MANTA_INPUT_FILE /var/tmp/out.webp && mpipe ${MANTA_INPUT_OBJECT%.*}.webp < /var/tmp/out.webp' |
This is the 16th in series of posts leading up Node.js Knockout, and covers provisioning MongoLab for use in your node app.
db.collection('quests', function(er, cl) { | |
cl.insert({'goal': 'Explore', 'lv': 1}, {safe: true}, function(er,rs) { | |
cl.update({'goal': 'Explore'}, | |
{'$set': {'gold': 150}}, {safe: true}, function(er,rs) { | |
cl.find({'lv': {'$lte': 4}}).toArray(function (er,rs) { | |
console.log(rs); | |
}); }); }); }); |
var mongo = require('mongodb'); | |
var mongoUri = 'mongodb://localhost:27017/mongoquest'; | |
mongo.Db.connect(mongoUri, function (err, db) { | |
/* adventure! */ | |
}); |
// make sure we're using the right db; this is the same as "use aggdb;" in shell | |
db = db.getSiblingDB("aggdb"); | |
// simple projection | |
var p1 = db.runCommand( | |
{ aggregate : "article", pipeline : [ | |
{ $project : { | |
tags : 1, | |
pageViews : 1 | |
}} |