Tutorial by Examples

When you wish to combine the results of multiple tables or queries with similar fields together into a single resulting data set without performing any relational joins (i.e. you want to list one dataset immediately after the other), you will use a UNION query. However, it is notable that these quer...
The BOM (Browser Object Model) contains objects that represent the current browser window and components; objects that model things like history, device's screen, etc The topmost object in BOM is the window object, which represents the current browser window or tab. Document: represents current...
The most important object in the Browser Object Model is the window object. It helps in accessing information about the browser and its components. To access these features, it has various methods and properties. MethodDescriptionwindow.alert()Creates dialog box with message and an OK buttonwindow....
An awk consists of patterns and actions, enclosed in curly brackets, to be taken if a pattern matches. The most basic pattern is the empty pattern, which matches any record. The most basic action is the empty action, which is equivalent to { print }, which is, in turn, equivalent to { print $0 }. If...
The http_build_query() will create a query string from an array or object. These strings can be appended to a URL to create a GET request, or used in a POST request with, for example, cURL. $parameters = array( 'parameter1' => 'foo', 'parameter2' => 'bar', ); $queryString = http_b...
Basic usage If the value of the href-attribute begins with mailto: it will try to open an email client on click: <a href="mailto:[email protected]">Send email</a> This will put the email address [email protected] as the recipient for the newly created email. Cc and ...
When INSERTing, you can use OUTPUT INSERTED.ColumnName to get values from the newly inserted row, for example the newly generated Id - useful if you have an IDENTITY column or any sort of default or calculated value. When programatically calling this (e.g., from ADO.net) you would treat it as a nor...
At the command prompt: $ echo "Hello World" Output: Hello World To create a script, create a text document with the following content: #!/bin/sh echo "Hello World" Save the script with the name hello.sh (or any filename) and make the script executable by giving the f...
<PropertyGroup> <!-- Definition of a Property named "TestCondition". A PropertyGroup may also be placed inside a Target. --> <TestCondition>True</TestCondition> </PropertyGroup> <!-- This Target will run after the "Clean" Target, su...
There is a constructor of the same name: DT <- data.table( x = letters[1:5], y = 1:5, z = (1:5) > 3 ) # x y z # 1: a 1 FALSE # 2: b 2 FALSE # 3: c 3 FALSE # 4: d 4 TRUE # 5: e 5 TRUE Unlike data.frame, data.table will not coerce strings to factors by default: sa...
We can read from a text file: dt <- fread("my_file.csv") Unlike read.csv, fread will read strings as strings, not as factors by default. See the [topic on fread][need_a_link] for more examples.
For efficiency, data.table offers a way of altering a data.frame or list to make a data.table in-place: # example data.frame DF = data.frame(x = letters[1:5], y = 1:5, z = (1:5) > 3) # modification setDT(DF) Note that we do not <- assign the result, since the object DF has been modifi...
# example data DT1 = data.table(x = letters[1:2], y = 1:2, z = (1:2) > 3) Due to the way data.tables are manipulated, DT2 <- DT1 will not make a copy. That is, later modifications to the columns or other attributes of DT2 will affect DT1 as well. When you want a real copy, use DT2 = copy(...
# example data DT = data.table(Titanic) Suppose we only want to see second class: DT[ Class == "2nd" ] # Class Sex Age Survived N # 1: 2nd Male Child No 0 # 2: 2nd Female Child No 0 # 3: 2nd Male Adult No 154 # 4: 2nd Female Adult ...
# example data DT = data.table(Titanic) Suppose we want to see each class only if a majority survived: DT[, if (sum(N[Survived=="Yes"]) > sum(N[Survived=="No"]) ) .SD, by=Class] # Class Sex Age Survived N # 1: 1st Male Child No 0 # 2: 1st Fema...
Delete all nodes MATCH (n) DETACH DELETE n DETACH doesn't work in older versions(less then 2.3), for previous versions use MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n, r Delete all nodes of a specific label MATCH (n:Book) DELETE n
Match (node_name:node_type {}), (node_name_two:node_type_two {}) CREATE (node_name)-[::edge_name{}]->(node_name_two)
The DISTINCT clause after SELECT eliminates duplicate rows from the result set. CREATE TABLE `car` ( `car_id` INT UNSIGNED NOT NULL PRIMARY KEY, `name` VARCHAR(20), `price` DECIMAL(8,2) ); INSERT INTO CAR (`car_id`, `name`, `price`) VALUES (1, 'Audi A1', '20000'); INSERT INTO CA...
A quick note before actually installing RabbitMQ: Ubuntu 14.04's Erlang packages have issues if you are using SSL with RabbitMQ, so you'll need to install a newer version than what the Ubuntu package maintainers provide, so use the binaries at https://www.erlang-solutions.com/resources/download.html...
Monotonic predicates can be debugged by applying declarative reasoning. In pure Prolog, a programming mistake can lead to one or all of the following phenomena: the predicate incorrectly succeeds in a case where it should fail the predicate incorrectly fails in a case where it should succeed t...

Page 535 of 1336