Tutorial by Examples: al

Detailed instructions on getting xquery set up or installed.
Partial method consists of the definition in one partial class declaration (as a common scenario - in the auto-generated one) and the implementation in another partial class declaration. using System; namespace PartialClassAndMethods { public partial class PartialClass // Auto-generated ...
Objective c: //this is the dictionary you start with. NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@"name1", @"Sam",@"name2", @"Sanju",nil]; //check if the dictionary contains the key you are going to modify. In this example, @&qu...
From command line: cpan -l From a Perl script: use ExtUtils::Installed; my $inst = ExtUtils::Installed->new(); my @modules = $inst->modules();
Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization. It is al...
curl 'www.example.com:9200/_cat/indices?v' output: health status index pri rep docs.count docs.deleted store.size pri.store.size green open logstash-2016.07.21 5 1 4760 0 4.8mb 2.4mb green open logstash-2016.07.20 5 1 7232 ...
There's two great utilities for black-box analysis of databases. First is variety.js, which will give you a high-level overview. The second is schema.js, which will let you dig into the collections for more detail on the individual fields. When inheriting a production Mongo database, these two util...
This command will create a /dump directory, and store each collection in a separate BSON blob file. This is the best way to backup or transfer databases between systems. mongodump --db meteor
Mongo supports database-to-database copying, which is useful if you have large databases on a staging database that you want to copy into a local development instance. // run mongod so we can create a staging database // note that this is a separate instance from the meteor mongo and minimongo ins...
They're not easily accessible. If you run the 'meteor bundle' command, you can generate a tar.gz file, and then run your app manually. Doing that, you should be able to access the mongo logs... probably in the .meteor/db directory. If you really need to access mongodb log files, set up a regular mo...
db.posts.find().forEach(function(doc){ db.posts.update({_id: doc._id}, {$set:{'version':'v1.0'}}, false, true); });
db.posts.find().forEach(function(doc){ if(doc.arrayOfObjects){ // the false, true at the end refers to $upsert, and $multi, respectively db.accounts.update({_id: doc._id}, {$unset: {'arrayOfObjects': "" }}, false, true); } });
db.posts.find().forEach(function(doc){ if(!doc.foo){ db.posts.update({_id: doc._id}, {$set:{'foo':'bar'}}, false, true); } });
db.posts.find().forEach(function(doc){ if(doc.foo === 'bar'){ db.posts.remove({_id: doc._id}); } });
db.posts.find().forEach(function(doc){ if(doc.foo === 'bar'){ db.posts.update({_id: doc._id}, {$set:{'foo':'squee'}}, false, true); } });
var newvalue = ""; db.posts.find().forEach(function(doc){ if(doc.foo){ newvalue = '"' + doc.foo + '"'; db.accounts.update({_id: doc._id}, {$set: {'doc.foo': newvalue}}); } });
var newvalue = null; db.posts.find().forEach(function(doc){ if(doc.foo){ newvalue = '"' + doc.foo + '"'; db.accounts.update({_id: doc._id}, {$set: {'doc.foo': newvalue}}); } });
What we're doing here is referencing the array index using dot notation db.posts.find({"tags.0": {$exists: true }})
XML fragments, also known under the name of external parsed entities, can be stored in separate files. XML fragments, unlike XML documents, are less restrictive, in that several elements can appear top-level, as well as text nodes. Like an XML document, an external parsed entity may begin with an X...
<script src="example.js"></script> The src attribute works like the href attribute on anchors: you can either specify an absolute or relative URL. The example above links to a file inside the same directory of the HTML document. This is typically added inside the <head&gt...

Page 97 of 269