Tutorial by Examples: ant

Booleans and other values When dealing with lua it is important to differentiate between the boolean values true and false and values that evaluate to true or false. There are only two values in lua that evaluate to false: nil and false, while everything else, including the numerical 0 evaluate to...
A lexer action is a block of arbitrary code in the target language surrounded by {...}, which is executed during matching: IDENTIFIER: [A-Z]+ { log("matched rule"); }; A semantic predicate is a block of arbitrary code in the target language surrounded by {...}?, which evaluates to a bo...
R has a number of build in constants. The following constants are available: LETTERS: the 26 upper-case letters of the Roman alphabet letters: the 26 lower-case letters of the Roman alphabet month.abb: the three-letter abbreviations for the English month names month.name: the English names fo...
Expires — specifies date when the resource becomes stale. It relies on servers and clients having accurate clocks and supporting time zones correctly. Cache-control: max-age takes precedence over Expires, and is generally more reliable. post-check and pre-check directives are non-standard I...
There are 2 ways of instantiating prefabs: during design time or runtime. Design time instantiation Instantiating prefabs at design time is useful to visually place multiple instances of the same object (e.g. placing trees when designing a level of your game). To visually instantiate a prefab...
You can use gradle to have BuildConfig constants and res values on a per flavor basis. Just add the value to the flavor you want to support. android { defaultConfig { resValue "string", "app_name", "Full App" buildConfigField "boolean",...
Here's an example of a rule that gives each authenticated user a personal node at /users/$user_id where $user_id is the ID of the user obtained through Authentication. // These rules grant access to a node matching the authenticated // user's ID from the Firebase auth token { "rules"...
POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=[APP_KEY]&client_secret=[APP_SECRET] Source
POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=password&username=[USERNAME]&password=[PASSWORD] &client_id=[APP_KEY]&client_secret=[APP_SECRET] Source
Step 1 GET /authorize?response_type=code&client_id=[APP_KEY]&state=[RANDOM_STRING] &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb &scope=[OPTIONAL_SCOPES] HTTP/1.1 Host: server.example.com Step 2 POST /token HTTP/1.1 Host: server.example.com Content-Type: a...
Arrays can be used as plain constants and class constants from version PHP 5.6 onwards: Class constant example class Answer { const C = [2,4]; } print Answer::C[1] . Answer::C[0]; // 42 Plain constant example const ANSWER = [2,4]; print ANSWER[1] . ANSWER[0]; // 42 Also from versi...
Dim Value As Variant 'Explicit Dim Value 'Implicit A Variant is a COM data type that is used for storing and exchanging values of arbitrary types, and any other type in VBA can be assigned to a Variant. Variables declared without an explicit type specified by As [Type] default t...
VBA defines a number of string constants for special characters like: vbCr : Carriage-Return 'Same as "\r" in C style languages. vbLf : Line-Feed 'Same as "\n" in C style languages. vbCrLf : Carriage-Return & Line-Feed (a new-line in Windows) vbTab: Tab Character vbNul...
Const appName As String = "The App For That"
Giving this enumeration as Example: enum Compass { NORTH(0), EAST(90), SOUTH(180), WEST(270); private int degree; Compass(int deg){ degree = deg; } public int getDegree(){ return degree; } } In Java an enum class is like any other c...
let mySwitch: UISwitch = { view.addSubview($0) $0.addTarget(self, action: "action", forControlEvents: .TouchUpInside) return $0 }(UISwitch())
Headers may be used to declare globally used read-only resources, like string tables for example. Declare those in a separate header which gets included by any file ("Translation Unit") which wants to make use of them. It's handy to use the same header to declare a related enumeration to ...
Attributes: normal Default attribute of fonts. small-caps Sets every letter to uppercase, but makes the lowercase letters(from original text) smaller in size than the letters that originally uppercase. CSS: .smallcaps{ font-variant: small-caps; } HTML: <p class="smallcaps&quot...
Constants in Go may be typed or untyped. For instance, given the following string literal: "bar" one might say that the type of the literal is string, however, this is not semantically correct. Instead, literals are Untyped string constants. It is a string (more correctly, its default ...
There are three types of code swaps that Instant run enables to support faster debugging and running app from your code in Android Studio. Hot Swap Warm Swap Cold Swap When are each of these swaps triggered? HOT SWAP is triggered when an existing method's implementation is changed. WARM SW...

Page 5 of 11