Tutorial by Topics: es

All control structures, unless otherwise noted, make use of block statements. These are denoted by curly braces {}. This differs from normal statements, which do not require curly braces, but also come with a stiff caveat in that only the line immediately following the previous statement would b...
SharedPreferences provide a way to save data to disk in the form of key-value pairs. Context Method public SharedPreferences getSharedPreferences(String name, int mode) Activity Method public SharedPreferences getPreferences() SharedPreferences Methods public SharedPre...
Material Design is a comprehensive guide for visual, motion, and interaction design across platforms and devices. Also see the original Android blog post introducing the Design Support Library Official Documentation https://developer.android.com/design/material/index.html Guidelines for Mat...
public type name[ = value]; private type name[ = value]; protected type name[ = value]; type name[ = value]; public class name{ class name{ From the Java tutorial: Access level modifiers determine whether other classes can use a particular field or invoke a particular method. There a...
A regular expression is a special sequence of characters that helps in matching or finding other strings or sets of strings, using a specialized syntax held in a pattern. Java has support for regular expression usage through the java.util.regex package. This topic is to introduce and help developers...
The 8 primitive data types byte, short, int, long, char, boolean, float, and double are the types that store most raw numerical data in Java programs. int aInt = 8; // The defining (number) part of this int declaration is called a literal. int hexInt = 0x1a; // = 26; You can define literals...
FileOutputStream openFileInput (String name) FileOutputStream openFileOutput (String name, int mode) File(File dir, String name) File(String path) File getExternalStoragePublicDirectory (String type) File getExternalFilesDir (String type) ParameterDetailsnameThe name of the file to ope...
As of Java 8, Calendar and its subclasses have been superseded by the java.time package and its subpackages. They should be preferred, unless a legacy API requires Calendar.
$variable = 'value'; // Assign general variable $object->property = 'value'; // Assign an object property ClassName::$property = 'value'; // Assign a static class property $array[0] = 'value'; // Assign a value to an index of an array $array[] = 'value'; // Push an item at the end of an ar...
class Foo {} class Foo extends Bar {} class Foo { constructor() {} } class Foo { myMethod() {} } class Foo { get myProperty() {} } class Foo { set myProperty(newValue) {} } class Foo { static myStaticMethod() {} } class Foo { static get myStaticProperty() {} } const Foo = class Foo {}; c...
new Promise( /* executor function: */ function(resolve, reject) { }) promise.then(onFulfilled[, onRejected]) promise.catch(onRejected) Promise.resolve(resolution) Promise.reject(reason) Promise.all(iterable) Promise.race(iterable) Promises are part of the ECMAScript 2015 specificatio...
let regex = /pattern/[flags] let regex = new RegExp('pattern', [flags]) let ismatch = regex.test('text') let results = regex.exec('text') FlagsDetailsgglobal. All matches (don't return on the first match).mmulti-line. Causes ^ & $ to match the begin/end of each line (not only begin/e...
git remote [-v | --verbose] git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url> git remote rename <old> <new> git remote remove <name> git remote set-head <name> (-a | --auto | -d | --delete | ...
This topic illustrates how to avoid adding unwanted files (or file changes) in a Git repo. There are several ways (global or local .gitignore, .git/exclude, git update-index --assume-unchanged, and git update-index --skip-tree), but keep in mind Git is managing content, which means: ignoring actuall...
import module_name import module_name.submodule_name from module_name import * from module_name import submodule_name [, class_name, function_name, ...etc] from module_name import some_name as new_name from module_name.submodule_name import class_name [, function_name, ...etc] Importi...
For many programmers the regex is some sort of magical sword that they throw to solve any kind of text parsing situation. But this tool is nothing magical, and even though it's great at what it does, it's not a full featured programming language (i.e. it is not Turing-complete). What does 'regu...
var closureVar: (<parameters>) -> (<returnType>) // As a variable or property type typealias ClosureType = (<parameters>) -> (<returnType>) { [<captureList>] (<parameters>) <throws-ness> -> <returnType> in <statements> } // Complete ...
global a, b, c nonlocal a, b x = something # binds x (x, y) = something # binds x and y x += something # binds x. Similarly for all other "op=" del x # binds x for x in something: # binds x with something as x: # binds x except Exception as ex: # binds ex inside block ...
class Name #some code describing the class behavior end Class names in Ruby are Constants, so the first letter should be a capital. class Cat # correct end class dog # wrong, throws an error end

Page 2 of 96