Tutorial by Examples: ch

4.0.3 Using a CustomTabsIntent, it is now possible to configure Chrome custom tabs in order to customize key UI components in the browser that is opened from your app. This is a good alternative to using a WebView for some cases. It allows loading of a web page with an Intent, with the added abil...
To get your most recent stash after running git stash, use git stash apply To see a list of your stashes, use git stash list You will get a list that looks something like this stash@{0}: WIP on master: 67a4e01 Merge tests into develop stash@{1}: WIP on master: 70f0d95 Add user role to lo...
Use the speakUtterance: method of AVSpeechSynthesizer to convert text to speech. You need to pass an AVSpeechUtterance object to this method, which contains the text that you want to be spoken. Objective C AVSpeechSynthesizer *speaker = [[AVSpeechSynthesizer alloc] init]; AVSpeechUtterance *speec...
Examples below are given in Ruby, but same matchers should be available in any modern language. Let’s say we have the string "AℵNaïve", produced by Messy Artificial Intelligence. It consists of letters, but generic \w matcher won’t match much: ▶ "AℵNaïve"[/\w+/] #⇒ "A&q...
It is worth noting that in swift, unlike other languages people are familiar with, there is an implicit break at the end of each case statement. In order to follow through to the next case (i.e. have multiple cases execute) you need to use fallthrough statement. switch(value) { case 'one': //...
\bfoo\b will match the complete word with no alphanumeric and _ preceding or following by it. Taking from regularexpression.info There are three different positions that qualify as word boundaries: Before the first character in the string, if the first character is a word character. After...
[a-b] where a and b are digits in the range 0 to 9 [3-7] will match a single digit in the range 3 to 7. Matching multiple digits \d\d will match 2 consecutive digits \d+ will match 1 or more consecutive digits \d* will match 0 or more consecutive digits \d{3} will ma...
The strchr and strrchr functions find a character in a string, that is in a NUL-terminated character array. strchr return a pointer to the first occurrence and strrchr to the last one. #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char toSe...
countMatches method from org.apache.commons.lang3.StringUtils is typically used to count occurences of a substring or character in a String: import org.apache.commons.lang3.StringUtils; String text = "One fish, two fish, red fish, blue fish"; // count occurrences of a substring Str...
A Bootstrap carousel is a Bootstrap component that creates a slideshow which cycles through elements within the carousel. Here is a basic HTML usage example: <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators --...
Schema store: { "title": "JSON schema for the ASP.NET global configuration files", "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": true, "required": [ &qu...
Many developers like to customize the font, text, and background color of their IDE's. You can do this in Xcode by opening the app preference pane, either by going to XCODE->Preferences, or by pressing '⌘,' With the preference pane open you can click on the 'Fonts and Colors' tab. From her...
The Switch statement works very well with Enum values enum CarModel { case Standard, Fast, VeryFast } let car = CarModel.Standard switch car { case .Standard: print("Standard") case .Fast: print("Fast") case .VeryFast: print("VeryFast") } Since we ...
Match any: Must match at least one string. In this example the product type must be either 'electronics', 'books', or 'video'. SELECT * FROM purchase_table WHERE product_type LIKE ANY ('electronics', 'books', 'video'); Match all (must meet all requirements). In this example both 'united...
Python supports a translate method on the str type which allows you to specify the translation table (used for replacements) as well as any characters which should be deleted in the process. str.translate(table[, deletechars]) ParameterDescriptiontableIt is a lookup table that defines the mappin...
The foreach package brings the power of parallel processing to R. But before you want to use multi core CPUs you have to assign a multi core cluster. The doSNOW package is one possibility. A simple use of the foreach loop is to calculate the sum of the square root and the square of all numbers from...
#You can use pattern matching to run different #functions based on which parameters you pass #This example uses pattern matching to start, #run, and end a recursive function defmodule Counter do def count_to do count_to(100, 0) #No argument, init with 100 end def ...
g$ The above matches one letter (the letter g) at the end of a string in most regex engines (not in Oniguruma, where the $ anchor matches the end of a line by default, and the m (MULTILINE) modifier is used to make a . match any characters including line break characters, as a DOTALL modifier in ...
CHICKEN is a Scheme interpreter and compiler with its own extension module system called "eggs". It is capable of compiling Scheme to native code by first compiling Scheme to C. Installing Debian or Ubuntu or other derived distros: sudo apt-get install chicken-bin Fedora / RHEL / Ce...
from http://flex.apache.org/doc-getstarted.html Download the SDK installer Run the SDK installer. The first question you will be asked is the installation directory. on a Mac, use /Applications/Adobe Flash Builder 4.7/sdks/4.14.0/ on a PC, use C:\Program Files(x86)\Adobe Flash Builder ...

Page 15 of 109