Tutorial by Examples

One of the most common things you'll need to do in the command prompt is navigate your file system. To do this, we'll utilize the cd and dir keywords. Start by opening up a command prompt using one of the methods mentioned here. You most likely see something similar to what's below, where UserNam...
WebGL is a browser technology so there isn't much to set up other than to have a browser. You can get started with WebGL on JSFiddle or Codepen or JSBIn or any number of other sites that let you edit HTML, CSS, and JavaScript online though there will be a few limitations (see below). You can also ho...
Two terms may be compared via the standard ordering: variables @< numbers @< atoms @< strings @< structures @< lists Notes: Structures compare alphabetically by functor first, then by arity and lastly by the comparison of each argument. Lists compare by length first, t...
Equality operatorSucceeds ifX = YX can be unified with YX \= YX cannot be unified with YX == YX and Y are identical (i.e. they unify with no variable bindings occurring)X \== YX and Y are not identicalX =:= YX and Y are arithmetically equalX =\= YX and Y are not arithmetically equal
The pickle module implements an algorithm for turning an arbitrary Python object into a series of bytes. This process is also called serializing the object. The byte stream representing the object can then be transmitted or stored, and later reconstructed to create a new object with the same charact...
Mutex locking in Go allows you to ensure that only one goroutine at a time has a lock: import "sync" func mutexTest() { lock := sync.Mutex{} go func(m *sync.Mutex) { m.Lock() defer m.Unlock() // Automatically unlock when this function returns // D...
Using the calendar module import calendar from datetime import date def monthdelta(date, delta): m, y = (date.month+delta) % 12, date.year + ((date.month)+delta-1) // 12 if not m: m = 12 d = min(date.day, calendar.monthrange(y, m)[1]) return date.replace(day=d,month=m, year=...
#include <stdlib.h> #include <stdio.h> int main(void) { result = EXIT_SUCCESS; char file_name[] = "outbut.bin"; char str[] = "This is a binary file example"; FILE * fp = fopen(file_name, "wb"); if (fp == NULL) /* If an erro...
To install v6.x update the packages curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - Using the apt package manager sudo apt-get install -y nodejs
Download driver via nuget. Using this command in the package manager console Install-Package mongocsharpdriver
#include <stdio.h> #include <stdlib.h> int main (void) { int * pdata; size_t n; printf ("Enter the size of the array: "); fflush(stdout); /* Make sure the prompt gets printed to buffered stdout. */ if (1 != scanf("%zu", &n)) /* If zu is n...
Vectors in R can have different types (e.g. integer, logical, character). The most general way of defining a vector is by using the function vector(). vector('integer',2) # creates a vector of integers of size 2. vector('character',2) # creates a vector of characters of size 2. vector('logical',2...
Detailed instructions on getting pymongo set up or installed. Installing with Pip To install pymongo for the first time: pip install pymongo Installing a specific version of pymongo: Where X.X.X is the version to be installed pip install pymongo==X.X.X Upgrading existing pymon...
Stanford CoreNLP is a popular Natural Language Processing toolkit supporting many core NLP tasks. To download and install the program, either download a release package and include the necessary *.jar files in your classpath, or add the dependency off of Maven central. See the download page for mor...
Adding a Conditional attribute from System.Diagnostics namespace to a method is a clean way to control which methods are called in your builds and which are not. #define EXAMPLE_A using System.Diagnostics; class Program { static void Main() { ExampleA(); // This method will ...
Immutability is common in functional programming and rare in object oriented programming. Create, for example, an address type with mutable state: public class Address () { public string Line1 { get; set; } public string Line2 { get; set; } public string City { get; set; } } ...
Before using your own object as key you must override hashCode() and equals() method of your object. In simple case you would have something like: class MyKey { private String name; MyKey(String name) { this.name = name; } @Override public boolean equals(Object ...
ng-if is a directive similar to ng-show but inserts or removes the element from the DOM instead of simply hiding it. Angular 1.1.5 introduced ng-If directive. You can Use ng-if directive above 1.1.5 versions. This is useful because Angular will not process digests for elements inside a removed ng-if...
Whitespace is handled by the lexical analyzer before being parsed. The lexical analyzer uses a stack to store indentation levels. At the beginning, the stack contains just the value 0, which is the leftmost position. Whenever a nested block begins, the new indentation level is pushed on the stack, ...
-- Drop an index for column 'name' in table 'my_table' DROP INDEX idx_name ON my_table;

Page 327 of 1336