Tutorial by Examples: ejs

JSON_OBJECT creates JSON Objects: SELECT JSON_OBJECT('key1',col1 , 'key2',col2 , 'key3','col3') as myobj; JSON_ARRAY creates JSON Array as well: SELECT JSON_ARRAY(col1,col2,'col3') as myarray; Note: myobj.key3 and myarray[2] are "col3" as fixed string. Also mixed JSON data: S...
JS es6 (also known as es2015) is a set of new features to JS language aim to make it more intuitive when using OOP or while facing modern development tasks. Prerequisites: Check out the new es6 features at http://es6-features.org - it may clarify to you if you really intend to use it on your n...
var fs = require("fs"); fs.readFileSync(‘abc.txt’,function(err,data){ //Reading File Synchronously if(!err) { console.log(data); } //else //console.log(err); }); console.log("something else"); Here, the program wa...
If all you need is serializing mongo results into json, it is possible to use the json module, provided you define custom handlers to deal with non-serializable fields types. One advantage is that you have full power on how you encode specific fields, like the datetime representation. Here is a ha...
Taken from microsoft's github page with official documentation { "name": String, //The name of the project, used for the assembly name as well as the name of the package. The top level folder name is used if this property is not specified. "version": String, //The Semver versi...
HTML <div :class="classes"> <input v-model="compValue" type="text" class="form-control" @keydown.enter = 'enter' @keydown.down = 'down' @keydown.up = 'up' @input = "cha...
Lightweight simple translation module with dynamic json storage. Supports plain vanilla node.js apps and should work with any framework (like express, restify and probably more) that exposes an app.use() method passing in res and req objects. Uses common __('...') syntax in app and templates. Stores...
<!doctype html> <html> <head> <title>Page Title</title> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0"> <script src="vue.js"></script> <style> ...
<!doctype html> <html> <head> <title>Page Title</title> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0"> <script src="vue.js"></script> <style> ...
{ "id": 89, "name": "Aldous Huxley", "type": "Author", "books":[{ "name": "Brave New World", "date": 1932 }, { &q...
The first major distinction is between the dynamically generated directories which will be used for hosting and source directories. The source directories will have a config file or folder depending on the amount of configuration you may have . This includes the environment configuration and busi...
JavaScript: Vue.component('props-component', { template: '#props-component-template', // array of all props props: ['myprop', 'calcprop'] }); new Vue({ el: '#app' }); HTML: <div id="app"> <template id="props-component-template"> ...
Node js code Sample to start this topic is Node.js server communicating with Arduino via serialport. npm install express --save npm install serialport --save Sample app.js: const express = require('express'); const app = express(); var SerialPort = require("serialport"); var po...
At first initilize the firebase sdk and admin SDK const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp({ credential: admin.credential.cert({ //your admin credential certificate generated from the console. Follow this [link][1]...
<body onload="__init();"> ... <script src="http://requirejs.org/docs/release/2.3.2/comments/require.js"></script> <script> function __init() { require(["view/index.js"]); } </script> </body>...
{ "module": "amd", // Using AMD module code generator which works with requireJS "rootDir": "./src", // Change this to your source folder "outDir": "./view", ... }

Page 3 of 3