Tutorial by Examples

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 ...
These types do not inherit from Array<T> to avoid boxing, however, they have the same attributes and methods. Kotlin typeFactory functionJVM typeBooleanArraybooleanArrayOf(true, false)boolean[]ByteArraybyteArrayOf(1, 2, 3)byte[]CharArraycharArrayOf('a', 'b', 'c')char[]DoubleArraydoubleArrayOf...
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 ...
Theorem my_first_theorem : 1 + 1 = 2. Proof. reflexivity. Qed. Try it in your browser.
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...
See also Common Lisp Learning Resources. Online Books Practical Common Lisp, Peter Seibel. Good for experienced programmers. Common Lisp: A Gentle Introduction to Symbolic Computation Good for people new to programming. Common Lisp, the Language On Lisp, Paul Graham The Common Lisp Cookbook ...
Profiles permit the programmer to organize maps into classes, enhancing code readability and maintainability. Any number of profiles can be created, and added to one or more configurations as needed. Profiles can be used with both the static and instance-based APIs. public class User { public...
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 798 of 1336