Tutorial by Examples: and

In HBase, you can use 4 types of operations Get : retrieves a row Put : inserts one or more row(s) Delete : delete a row Scan : retrieves several rows If you simply want to retrieve a row, given its row_key you can use the Get object: Get get = new Get(Bytes.toBytes("my_row_key")...
(defn print-some-items [[a b :as xs]] (println a) (println b) (println xs)) (print-some-items [2 3]) This example prints the output 2 3 [2 3] The argument is destructured and the items 2 and 3 are assigned to the symbols a and b. The original argument, the entire vector [2 ...
In the node JS command prompt, inside your loopback project, type the following command to create a new model. slc loopback:model If you have installed LoopBack CLI tool, you can create model with: lb model The command prompt will request informations about the model to create. In this examp...
console.dir(object) displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects. var myObject = { "foo":{ "bar":"d...
CDate() CDate() converts something from any datatype to a Date datatype Sub CDateExamples() Dim sample As Date ' Converts a String representing a date and time to a Date sample = CDate("September 11, 2001 12:34") Debug.Print Format$(sample, "yyyy-mm-dd hh:nn:...
How To Install ANTLR in Eclipse (Last tested on Indigo and ANTLR IDE 2.1.2) Install Eclipse. Download ANTLR complete binaries jar that includes ANTLR v2. Extract to a temp directory. Copy the antlr-n.n folder to an appropriate permanent location, for example the same folder that Eclipse is in...
Server Syntax var io = require('socket.io')(80); io.on('connection', function (mysocket) { //custom event called `private message` mysocket.on('private message', function (from, msg) { console.log('I received a private message by ', from, ' saying ', msg); }); //internal `di...
The available commands will be displayed, including a brief description, in tabular format. In Windows 10 the following commands are listed: CommandDescriptionASSOCDisplays or modifies file extension associations.ATTRIBDisplays or changes file attributes.BREAKSets or clears extended CTRL+C checkin...
root: build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.8.0-alpha4' } } allprojects { repositories { jcenter() } } app: build.gradle apply plugin: 'com.andro...
array = [1, 2, 3, 4] [first] = array # 1 [..., last] = array # 4 [first, middle..., last] = array # first is 1, middle is [2, 3], last is 4
The example below will collect the Device's OS version number and the the version of the application (which is defined in each projects' properties) that is entered into Version name on Android and Version on iOS. First make an interface in your PCL project: public interface INativeHelper { /...
Another useful feature is accessing your custom object collections as arrays in PHP. There are two interfaces available in PHP (>=5.0.0) core to support this: ArrayAccess and Iterator. The former allows you to access your custom objects as array. ArrayAccess Assume we have a user class and a da...
You have to create a different strings.xml file for every new language. Right-click on the res folder Choose New → Values resource file Select a locale from the available qualifiers Click on the Next button (>>) Select a language Name the file strings.xml strings.xml <resources&...
Intro An array is a container object that holds a number of values. In the following image you can see an array with size 10, the first element indexed 1 and the last element 10. Autohotkey offers a few ways of defining and creating arrays. Array := [] Array := Array() Creating and initia...
You can use the following code for going back and forward. if (!function_exists('mb_internal_encoding')) { function mb_internal_encoding($encoding = NULL) { return ($from_encoding === NULL) ? iconv_get_encoding() : iconv_set_encoding($encoding); } } if (!function_exists('mb_c...
Each resource directory under the res folder (listed in the example above) can have different variations of the contained resources in similarly named directory suffixed with different qualifier-values for each configuration-type. Example of variations of `` directory with different qualifier value...
Save the session variable as a variable. $session = Yii::$app->session; $sess = $session['keys']; Then create or update the array value you want $sess['first'] = 'abc'; And finally save to the session variable $session['keys'] = $sess
Go to the project.json directory and publish: dotnet publish It will print the output directory of the operation, enter the directory and run the published project: dotnet <project output>.dll The default folder will be: <project root>/bin/<configuration>/<target framewo...
Simple example Assuming that the "HelloWorld.java" contains the following Java source: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello world!"); } } (For an explanation of the above code, please refer to Gettin...
Conjunction (logical AND) is represented by the comma , operator (among other roles). Conjunction between clauses can appear in a query: ?- X = 1, Y = 2. Conjunction can also appear between the subgoal clauses in the body of a rule: triangleSides(X,Y,Z) :- X + Y > Z, X + Z > Y, Y + ...

Page 67 of 153