Tutorial by Examples: a

@echo off setlocal set /p "_myvar=what is your name?" echo HELLO!>file.txt echo %_myvar%!>>file.txt echo done! pause type file.txt endlocal exit Now file.txt looks like: HELLO! John Smith! (assuming you typed John Smith as your name.) Now your batch file's consol...
The ASCII way This shifts the characters but doesn't care if the new character is not a letter. This is good if you want to use punctuation or special characters, but it won't necessarily give you letters only as an output. For example, "z" 3-shifts to "}". def ceasar(text, shi...
To connect to a mongo database from node application we require mongoose. Installing Mongoose Go to the toot of your application and install mongoose by npm install mongoose Next we connect to the database. var mongoose = require('mongoose'); //connect to the test database running on defau...
With Mongoose, everything is derived from a Schema. Lets create a schema. var mongoose = require('mongoose'); var Schema = mongoose.Schema; var AutoSchema = new Schema({ name : String, countOf: Number, }); // defining the document structure // by default the collection...
Reading Data from the collection is very easy. Getting all data of the collection. var Auto = require('models/auto') Auto.find({}, function (err, autos) { if (err) return console.error(err); // will return a json array of all the documents in the collection console.log(autos)...
For updating collections and documents we can use any of these methods: Methods update() updateOne() updateMany() replaceOne() Update() The update() method modifies one or many documents (update parameters) db.lights.update( { room: "Bedroom" }, { status: "On&quo...
You can use plugman command to install/uninstall custom cordova plugins. To install plugman npm install -g plugman Install plugin command syntax: plugman <install|uninstall> --platform <ios|android|blackberry10|wp8> --project <directory> --plugin <name|url|path> Exa...
To call a list of goals as if it were a conjunction of goals, combine the higher-order predicates call/1 and maplist/2: ?- Gs = [X = a, Y = b], maplist(call, Gs). Gs = [a=a, b=b], X = a, Y = b.
The names of modules follow the filesystem's hierarchical structure. With the following file layout: Foo/ ├── Baz/ │ └── Quux.hs └── Bar.hs Foo.hs Bar.hs the module headers would look like this: -- file Foo.hs module Foo where -- file Bar.hs module Bar where -- file Foo/Bar.hs m...
systemd provides a modern implementation of cron. To execute a script periodical a service and a timer file ist needed. The service and timer files should be placed in /etc/systemd/{system,user}. The service file: [Unit] Description=my script or programm does the very best and this is the descri...
Detailed instructions on getting slick set up or installed. http://kenwheeler.github.io/slick/ Slick Slider is easy to use and to customise. It provides good amount of customisation options including responsive options based on breakpoints. To get started with slick, it is not that difficult. Jus...
C# Visual Studio 2015 (latest update) - you can download the community version here for free: www.VisualStudio.com Important: update all VS extensions to their latest versions Tools->Extensions and Updates->Updates Download the Bot Application template from here: Template Dow...
Below is an example of Gstreamer pipeline embedded in a simple gtk window. When run, a small window should appear like this: import gi gi.require_version('Gtk', '3.0') gi.require_version('Gst', '1.0') from gi.repository import Gtk, Gst Gst.init(None) Gst.init_check(None) class GstWidg...
XML Example The below configuration configures two appenders (log output). The first logs to standard system output (console) and the other logs to file. In this example, the location of the file can be set statically in configuration (appender file) or dynamically via maven filtering feature (<...
Recursive functions can get quite expensive. If they are pure functions (functions that always return the same value when called with the same arguments, and that neither depend on nor modify external state), they can be made considerably faster at the expense of memory by storing the values already...
There are different variable types for different purposes. In Visual Basic 6 the following variable types are available: Array Boolean Byte Currency Date Double Integer Long Single String Variant You declare a variable by using the Dim keyword: Dim RandomNumber As Integer If you ...
FFmpeg (or "Fast Forward MPEG") is a simple yet feature rich command line utility to allow the manipulation (including decoding, encoding, transcoding, muxing, demuxing, streaming, filtering, and playing) of media and video files. This utility differs from other GUI orientated software as ...
update <SCHEMA_NAME>.<TABLE_NAME_1> AS A SET <COLUMN_1> = True FROM <SCHEMA_NAME>.<TABLE_NAME_2> AS B WHERE A.<COLUMN_2> = B.<COLUMN_2> AND A.<COLUMN_3> = B.<COLUMN_3>
Monthwise difference between two dates(timestamp) select ( (DATE_PART('year', AgeonDate) - DATE_PART('year', tmpdate)) * 12 + (DATE_PART('month', AgeonDate) - DATE_PART('month', tmpdate)) ) from dbo."Table1" Yearwise difference between two dates...
Conditions: package should be at least installed. If not loaded in the current session, not a problem. ## Checking package version which was installed at past or ## installed currently but not loaded in the current session packageVersion("seqinr") # [1] ‘3.3.3’ packageVer...

Page 812 of 1099