Tutorial by Examples: al

If the built in attributes are not sufficient to validate your model data, then you can place your validation logic in a class derived from ValidationAttribute. In this example only odd numbers are valid values for a model member. Custom Validation Attribute public class OddNumberAttribute : Valid...
How do you handle errors, rather then log them to the console? Bad way: Router.route('/') .get((req, res) => { Request.find((err, r) => { if(err){ console.log(err) } else { res.json(r) } }) }) .post((req, res) => { const reque...
mongodump --db mydb --gzip --out "mydb.dump.$(date +%F_%R)" This command will dump a bson gzipped archive of your local mongod 'mydb' database to the 'mydb.dump.{timestamp}' directory
mongorestore --db mydb mydb.dump.2016-08-27_12:44/mydb --drop --gzip This command will first drop your current 'mydb' database and then restore your gzipped bson dump from the 'mydb mydb.dump.2016-08-27_12:44/mydb' archive dump file.
XML <Dashavatar> <Avatar name="Matsya"/> <Avatar name="Kurma"/> <Avatar name="Varaha"/> <Avatar name="Narasimha"/> <Avatar name="Vamana"/> <Avatar name="Balabhadra"/> ...
XML <Dashavatar> <Avatar name="Matsya"/> <Avatar name="Kurma"/> <Avatar name="Varaha"/> <Avatar name="Narasimha"/> <Avatar name="Vamana"/> <Avatar name="Balabhadra"/> ...
XML <Dashavatar> <Avatar name="Matsya"/> <Avatar name="Kurma"/> <Avatar name="Varaha"/> <Avatar name="Narasimha"/> <Avatar name="Vamana"/> <Avatar name="Balabhadra"/> ...
XML <House> <Rooms>10</Rooms> <People>4</People> <TVs>4</TVs> <Floors>2</Floors> </House> XPATH /House/child::node() OUTPUT <Rooms>10</Rooms> <People>4</People> <TVs>4</TVs&gt...
XML <House> <numRooms>4</numRooms> <Room name="living"/> <Room name="master bedroom"/> <Room name="kids' bedroom"/> <Room name="kitchen"/> </House> XPATH /House/child::Room or /...
XML <House> <numRooms>4</numRooms> <Floor number="1"> <Room name="living"/> <Room name="kitchen"/> </Floor> <Floor number="2"> <Room name="master bedroom&qu...
The first thing you want to do for local development is install ElasticSearch in your machine and test it to see if it is running. It requires Java to be installed. The installation is pretty straightforward: Mac OS X: brew install elasticsearch Ubuntu: sudo apt-get install elasticsearch Then...
Ubuntu binaries are available for both 32-bit and 64-bit architectures source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo a...
Downloading Prerequisites: We provide native 64-bit binaries for Windows 7 and above. A 64-bit version of Windows is required. Download the ZIP archive and unpack it in a directory of your choice. The Windows port of RethinkDB is a recent addition and hasn't received as much tuning as the Linux a...
C source file gcc -Wall -Wextra -o main main.c C++ source file g++ -Wall -Wextra -Wconversion -Woverloaded-virtual -o main main.cpp
The Firebase auth system is the source of a users uid, displayName, photoURL, and maybe email. Password based accounts set these persistent values in the auth system via the .updateProfile method. Storing these values in the Realtime Database, rDB, users node poses the issue of stale data. Displa...
Goto - http://www.jorambarrez.be/blog/2010/08/02/tutorial-a-bpmn-2-0-hello-world-with-activiti-5-0-alpha4-in-5-steps/ A very Good and detailed tutorial by Joram Barrez (one of the core Developer of Activiti)
Create horizontal lines with a label. This could be used to show notable values in the chart data (e.g. min, max, average). JSFiddle Demo var horizonalLinePlugin = { afterDraw: function(chartInstance) { var yScale = chartInstance.scales["y-axis-0"]; var canvas = chartInstance...
Denormalization and a flat database structure is neccessary to efficiently download separate calls. With the following structure, it is also possible to maintain two-way relationships. The disadvantage of this approach is, that you always need to update the data in multiple places. For an example, ...
/_build /cover /deps erl_crash.dump *.ez /rel
To use an Asset Catalog, you need to do the following: Double-click the Info.plist file in the Solution Explorer to open it for editing. Scroll down to the App Icons section. From the Source dropdown list, ensure AppIcons is selected. From the Solution Explorer, double-click the Assets.xcasset...

Page 175 of 269