Tutorial by Examples: arc

index.html <!doctype html> <html> <head> <title>D3 Sample</title> </head> <body> <!-- This will serve as a container for our chart. This does not have to be a div, and can in fact, just be the body if you want. --> <div id=...
Given the text: foo: bar I would like to replace anything following "foo: " with "baz", but I want to keep "foo: ". This could be done with a capturing group like this: s/(foo: ).*/$1baz/ Which results in the text: foo: baz Example 1 or we could use \K,...
Table Setup CREATE TABLE dbo.Employees ( EmployeeID INT NOT NULL PRIMARY KEY, FirstName NVARCHAR(50) NOT NULL, LastName NVARCHAR(50) NOT NULL, ManagerID INT NULL ) GO INSERT INTO Employees VALUES (101, 'Ken', 'Sánchez', NULL) INSERT INTO Employees VALUES (102, 'Keith', ...
The recommended way (Since ES5) is to use Array.prototype.find: let people = [ { name: "bob" }, { name: "john" } ]; let bob = people.find(person => person.name === "bob"); // Or, more verbose let bob = people.find(function(person) { return person.na...
const auto input = "Some people, when confronted with a problem, think \"I know, I'll use regular expressions.\""s; smatch sm; cout << input << endl; // If input ends in a quotation that contains a word that begins with "reg" and another word begining...
Exception handling occurs based on an exception hierarchy, determined by the inheritance structure of the exception classes. For example, IOError and OSError are both subclasses of EnvironmentError. Code that catches an IOError will not catch an OSError. However, code that catches an EnvironmentErr...
To download the entire repository including the full history and all branches, type: git clone <url> The example above will place it in a directory with the same name as the repository name. To download the repository and save it in a specific directory, type: git clone <url> [dire...
/** * Created by Alex Sullivan on 7/21/16. */ public class Foo implements Parcelable { private final int myFirstVariable; private final String mySecondVariable; private final long myThirdVariable; public Foo(int myFirstVariable, String mySecondVariable, long myThirdVariab...
Sample Data: CREATE TABLE table_name ( id, list ) AS SELECT 1, 'a,b,c,d' FROM DUAL UNION ALL -- Multiple items in the list SELECT 2, 'e' FROM DUAL UNION ALL -- Single item in the list SELECT 3, NULL FROM DUAL UNION ALL -- NULL list SELECT 4, 'f,,g' FROM DUAL; -- NULL item...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. You can use the _cat APIs to get a human readable, tabular output for various reasons. GET /_cat/health?v <1> The ?v is optional, but it implies that you want "verbose" output. _...
name:"john doe"~1 Searches for multiple terms within a specific term distance (~1), i.e will find text containing john anonymous doe but not john second name doe
name:john Searches for a single term (joe) in a single field (name)
+firstname:john +surname:doe Matches documents where firstname is john and surname is doe. + predix indicates that the search term must occur (AND). +firstname:john -surname:doe Matches documents where firstname is john and surname is not doe. - predix indicates that the search term must not occu...
name:"john doe" Searches for multiple terms in specific order.
name:(john doe^5) The ^ indicator can be used to boost a search term to increase it's relevance level meaning that documents containing doe are more relevant than ones containing john
name:john* The * indicator allows you to do a wildcard search matching 0 or more characters after the search term john, will return documents containing john, johnson, john's, johnny and so on. name:do? The ? indicator allows you to do a wildcard search with a single character in the search term,...
age:[50 TO 60] Matches documents where age is between 50 and 60 including 50 and 60 age:{50 TO 60} Matches documents where age is between 50 and 60 excluding 50 and 60 age:[* TO 60] Matches documents where age is less than or equal to 60 age:[50 TO *] Matches documents where age is greater th...
You can search for man pages containing a particular string in their description using: man -k <string> For example: man -k unzip Might return: man -k unzip IO::Uncompress::Bunzip2(3pm) - Read bzip2 files/buffers IO::Uncompress::Gunzip(3pm) - Read RFC 1952 files/buffers IO::Uncom...
Prerequisites In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73. Install Oracle Java 8 sudo add-apt-repository -y ppa:webupd8team/java sudo apt-get update echo "or...
To create minification-safe angular controllers, you will change the controller function parameters. The second argument in the module.controller function should be passed an array, where the last parameter is the controller function, and every parameter before that is the name of each injected val...

Page 2 of 13