Tutorial by Examples: l

PREPARE prepares a statement for execution EXECUTE executes a prepared statement DEALLOCATE PREPARE releases a prepared statement SET @s = 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse'; PREPARE stmt2 FROM @s; SET @a = 6; SET @b = 8; EXECUTE stmt2 USING @a, @b; Result: +------------+ |...
You can get the value of an entry in the dictionary using the 'Item' property: Dim extensions As New Dictionary(Of String, String) From { { "txt", "notepad" }, { "bmp", "paint" }, { "doc", "winword" } } Dim program As St...
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...
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...
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; } } ...
Creating a custom directive with isolated scope will separate the scope inside the directive from the outside scope, in order to prevent our directive from accidentally change the data in the parent scope and restricting it from reading private data from the parent scope. To create an isolated scop...
Python has several functions built into the interpreter. If you want to get information of keywords, built-in functions, modules or topics open a Python console and enter: >>> help() You will receive information by entering keywords directly: >>> help(help) or within the u...
Mongoose populate is used to show data for referenced documents from other collections. Lets say we have a Person model that has referenced documents called Address. Person Model var Person = mongoose.model('Person', { fname: String, mname: String, lname: String, address: {typ...
iex> String.split("Elixir, Antidote, Panacea", ",") ["Elixir", "Antidote", "Panacea"]
If you want to create and send signals in your own code (for example, if you are writing an extension), create a new Signal instance and call send when the subscribers should be notified. Signals are created using a Namespace. from flask import current_app from flask.signals import Namespace n...

Page 205 of 861