Tutorial by Examples: n

Create a file ckeditor.html with the following content: <!DOCTYPE html> <html> <head> <title>CKEditor Demo!</title> </head> <body> <script src="//cdn.ckeditor.com/4.6.1/basic/ckeditor.js"></script> <div id="e...
Select the project you want to add the reference to Moq. Open Nuget for this project. Select "Browse" than type "moq" at the search box. Select "Moq" and than click on Install. Following these steps will install the Moq package and will add a reference to it i...
#include <iostream> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/stats.hpp> #include <boost/accumulators/statistics/mean.hpp> #include <boost/accumulators/statistics/variance.hpp> int main() { using namespace boost...
Detailed instructions on getting quickblox set up or installed. Go to https://admin.quickblox.com and click on “Register” at the top or just follow the link: https://admin.quickblox.com/register.
This example shows how JNDI works in RMI. It has two roles: to provide the server with a bind/unbind/rebind API to the RMI Registry to provide the client with a lookup/list API to the RMI Registry. The RMI Registry is part of RMI, not JNDI. To make this simple, we will use java.rmi.registry....
Detailed instructions on getting oracle11g set up or installed.
A table can be joined onto itself in what is known as a self join, combining records in the table with other records in the same table. Self joins are typically used in queries where a hierarchy in the table's columns is defined. Consider the sample data in a table called Employees: IDNameBoss_ID1...
Generic arrays in Kotlin are represented by Array<T>. To create an empty array, use emptyArray<T>() factory function: val empty = emptyArray<String>() To create an array with given size and initial values, use the constructor: var strings = Array<String>(size = 5, init ...
average() is defined for Byte, Int, Long, Short, Double, Float and always returns Double: val doubles = doubleArrayOf(1.5, 3.0) print(doubles.average()) // prints 2.25 val ints = intArrayOf(1, 4) println(ints.average()) // prints 2.5 component1(), component2(), ... component5() return an it...
# creates a function with no arguments, which returns 3 get_three = () -> return 3 # same as above get_three = -> 3 # creates a function with arguments add_three = (num) -> num + 3 # multiple arguments, etc. add = (a, b) -> a + b
// all variables `s` have the type `String` let s = "hi".to_string(); // Generic way to convert into `String`. This works // for all types that implement `Display`. let s = "hi".to_owned(); // Clearly states the intend of obtaining an owned obje...
We can define a function to perform function composition using anonymous function syntax: f ∘ g = x -> f(g(x)) Note that this definition is equivalent to each of the following definitions: ∘(f, g) = x -> f(g(x)) or function ∘(f, g) x -> f(g(x)) end recalling that in Julia,...
One application of closures is to partially apply a function; that is, provide some arguments now and create a function that takes the remaining arguments. Currying is a specific form of partial application. Let's start with the simple function curry(f, x) that will provide the first argument to a ...
A stream wrapper provides a handler for one or more specific schemes. The example below shows a simple stream wrapper that sends PATCH HTTP requests when the stream is closed. // register the FooWrapper class as a wrapper for foo:// URLs. stream_wrapper_register("foo", FooWrapper::class...
Detailed instructions on getting rcpp set up or installed.
This method works by incrementing an integer from 0 to the greatest index in the array. $colors = ['red', 'yellow', 'blue', 'green']; for ($i = 0; $i < count($colors); $i++) { echo 'I am the color ' . $colors[$i] . '<br>'; } This also allows iterating an array in reverse order wi...
Each array instance contains an internal pointer. By manipulating this pointer, different elements of an array can be retrieved from the same call at different times. Using each Each call to each() returns the key and value of the current array element, and increments the internal array pointer. ...
Direct loop foreach ($colors as $color) { echo "I am the color $color<br>"; } Loop with keys $foods = ['healthy' => 'Apples', 'bad' => 'Ice Cream']; foreach ($foods as $key => $food) { echo "Eating $food is $key"; } Loop by reference In the fo...
Often it is useful to be able to load all of the profiles in one or more assemblies into a configuration. AutoMapper provides the method AddProfiles method, which has several overloads that allow profiles to be loaded by passing the Assembly, specifying the assembly name, or specifying a type contai...
If there is no need for frontend in your next project, you can run sails new with additional flag --no-frontend. sails new NameOfProject --no-frontend This will generate everything needed for backend and will omit view, assets and grunt files. More about command line and sails-new: http://sails...

Page 650 of 1088