Tutorial by Examples: ee

MongoClient.connect('mongodb://localhost:27017/myNewDB',function (err,db) { if(err) console.log("Unable to connect DB. Error: " + err) else console.log('Connected to DB'); db.close(); }); myNewDB is DB name, if it does not exists in database then it...
/In async.series,all the functions are executed in series and the consolidated outputs of each function is passed to the final callback. e.g/ var async = require('async'); async.series([ function (callback) { console.log('First Execute..'); callback(null, 'userPersonalData'); }, function (cal...
To illustrate this, here is a function that has 3 different "wrong" behaviors the parameter is completely stupid: we use a user-defined expression the parameter has a typo: we use Oracle standard NO_DATA_FOUND error another, but not handled case Feel free to adapt it to your standa...
If you already have access to your Document class from your workspace (Using Workspaces) it is easy to access the root of your Syntax tree. Document document = ... // Get document from workspace or other source var syntaxRoot = await document.GetSyntaxRootAsync();
You can easily navigate the a Syntax Tree using LINQ. For example it is easy to get all the ClassDeclarationSyntax nodes (declared classes), that have a name starting with the letter A: var allClassesWithNameStartingWithA = syntaxRoot.DescendantNodes() .OfType<ClassDeclarationSyntax>()...
The CSharpSyntaxWalker class is out of the box implementation of the Visitor pattern, that we can use to traverse our Syntax Tree. Here is a simple example of a Syntax Walker that collects all the struct-s that have a name, starting with the letter A: public class StructCollector : CSharpSyntaxWa...
Inline expansion (also known as inlining) is compiler optimisation that replaces a call to a function with the body of that function. This saves the function call overhead, but at the cost of space, since the function may be duplicated several times. // source: int process(int value) { ret...
As this documentation explains, Sometimes a resource file will need to contain a value that can only be supplied at build time. To accomplish this in Maven, put a reference to the property that will contain the value into your resource file using the syntax ${<property name>}. The property ...
Simple example from http://search.cpan.org/dist/sapnwrfc/sapnwrfc-cookbook.pod use strict; use warnings; use utf8; use sapnwrfc; SAPNW::Rfc->load_config('sap.yml'); my $conn = SAPNW::Rfc->rfc_connect; my $rd = $conn->function_lookup("RPY_PROGRAM_READ"); my $rc = $rd-&g...
Kernel manages operating system resources. User program can only access to those resources by making system calls to the kernel. System call is similar to an API of kernel, which in term, runs kernel tasks your program needs. str = "something" // run on user space x = x + 1 // run on use...
Use top command to exam CPU time allocation between user space and kernel space. Explanation: 24.8 us (user space): 24.8% of CPU time is spent on user process. 0.5 sy (system): 0.5% of CPU time is spent on kernel space. ni (niceness): the ratio of CPU time spent on low priority processes. i...
Disabling calculation of the worksheet can decrease running time of the macro significantly. Moreover, disabling events, screen updating and page breaks would be beneficial. Following Sub can be used in any macro for this purpose. Sub OptimizeVBA(isOn As Boolean) Application.Calculation = IIf(...
In this app i am directly opening InAppBrowser when the user tap the app icon instead of loading first page of app. So that would look like to user that they are viewing the app of the same website/webapp.
platform.ready().then(() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need. var url= "https://blog.knoldus.com/"; var browserRef = window.cordova.InAppBrowser.open(url, &qu...
<iframe "id="iframe_Login1"> <iframe "id="iframe_Login2"> <iframe "id="iframe_Login3"> </iframe> </iframe> </iframe> To switch into frame in selenium use swithTo() and frame()...
Create a service- import {EventEmitter} from 'angular2/core'; export class NavService { navchange: EventEmitter<number> = new EventEmitter(); constructor() {} emitNavChangeEvent(number) { this.navchange.emit(number); } getNavChangeEmitter() { return...
To complete this objective following tasks are required. Foreach Loop Container: To iterate over a user configured directory for files. Expression Task: To update a variable if file exists. Steps First goto Solution Explorer double click on Project.params and create a parameter FolderPat...
You first must create a "Game" object in Phaser. var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); In the preload callback function load the image. function preload() { game.load.image('thing', 'assets/thing-image.png'); ...
When you have an ajax call, it's extremely difficult to get a log from inside of the callback function. But if you enable the debugging define('WP_DEBUG', true); and then after that add ini_set('log_errors',TRUE); ini_set('error_reporting', E_ALL); ini_set('error_log', dirname(__FILE__) . '/e...
To train a neural network, firstly we need to design a good and efficient idea. There are three types of learning tasks. Supervised Learning Reinforcement Learning Unsupervised Learning In this present time, unsupervised learning is very popular.Unsupervised Learning is a deep learning task...

Page 49 of 54