Tutorial by Examples: er

Homebrew You can install Node.js using the Homebrew package manager. Start by updating brew: brew update You may need to change permissions or paths. It's best to run this before proceeding: brew doctor Next you can install Node.js by running: brew install node Once Node.js is installe...
Transforms hold the majority of data about an object in unity, including it's parent(s), child(s), position, rotation, and scale. It also has functions to modify each of these properties. Every GameObject has a Transform. Translating (moving) an object // Move an object 10 units in the positive ...
You can find the installers on Node.js download page. Normally, Node.js recommends two versions of Node, the LTS version (long term support) and the current version (latest release). If you are new to Node, just go for the LTS and then click the Macintosh Installer button to download the package. I...
Several values of the same type can be returned by passing an output iterator to the function. This is particularly common for generic functions (like the algorithms of the standard library). Example: template<typename Incrementable, typename OutputIterator> void generate_sequence(Increment...
Null coalescing is a new operator introduced in PHP 7. This operator returns its first operand if it is set and not NULL. Otherwise it will return its second operand. The following example: $name = $_POST['name'] ?? 'nobody'; is equivalent to both: if (isset($_POST['name'])) { $name = $_P...
Using filterUsingPredicate: This Evaluates a given predicate against the arrays content and return objects that match. Example: NSMutableArray *array = [NSMutableArray array]; [array setArray:@[@"iOS",@"macOS",@"tvOS"]]; NSPredicate *predicate = [N...
Swift 3: let minimumVersion = OperatingSystemVersion(majorVersion: 8, minorVersion: 1, patchVersion: 2) if ProcessInfo().isOperatingSystemAtLeast(minimumVersion) { //current version is >= (8.1.2) } else { //current version is < (8.1.2) }
let minimumVersionString = "3.1.3" let versionComparison = UIDevice.current.systemVersion.compare(minimumVersionString, options: .numeric) switch versionComparison { case .orderedSame, .orderedDescending: //current version is >= (3.1.3) break case .orderedA...
if #available(iOS 9, *) { // iOS 9 } else { // iOS 8 or earlier }
Int("123") // Returns 123 of Int type Int("abcd") // Returns nil Int("10") // Returns 10 of Int type Int("10", radix: 2) // Returns 2 of Int type Double("1.5") // Returns 1.5 of Double type Double("abcd") // Returns nil Note that do...
Overview Browsersync is a tool that allows for live file watching and browser reloading. It's available as a NPM package. Installation To install Browsersync you'll first need to have Node.js and NPM installed. For more information see the SO documentation on Installing and Running Node.js. Once...
When dividing two numbers pay attention to the type you want in return. Note that dividing two integers will invoke the integer division. If your goal is to run the float division, at least one of the parameters should be of float type. Integer division: 3 / 2 # => 1 Float division 3 / 3.0 ...
A module, that is using Ports should have port keyword in it's module definition. port module Main exposing (..) It is impossible to use ports with Html.App.beginnerProgram, since it does not allow using Subscriptions or Commands. Ports are integrated in to update loop of Html.App.program or Ht...
By default, ui-router encodes the slash / inside parameters. If you want to send a path in the URL, you need to define a custom parameter type. Define: module.config(['$urlMatcherFactoryProvider', function($urlMatcherFactory) { $urlMatcherFactory.type('path', { decode: function(val) { retu...
An external procedure is one which is defined outside another program unit, or by a means other than Fortran. The function contained in a file like integer function f() implicit none end function f is an external function. For external procedures, their existence may be declared by using a...
A program unit which is not an internal subprogram may contain other program units, called internal subprograms. program prog implicit none contains function f() end function f subroutine g() end subroutine g end program Such an internal subprogram has a number of features: t...
From within a generator function, the control can be delegated to another generator function using yield*. function* g1() { yield 2; yield 3; yield 4; } function* g2() { yield 1; yield* g1(); yield 5; } var it = g2(); console.log(it.next()); // 1 console.log(it.next())...
The Observer pattern is used for event handling and delegation. A subject maintains a collection of observers. The subject then notifies these observers whenever an event occurs. If you've ever used addEventListener then you've utilized the Observer pattern. function Subject() { this.observers...
A distinctive syntactic peculiarity of C is that declarations mirror the use of the declared object as it would be in a normal expression. The following set of operators with identical precedence and associativity are reused in declarators, namely: the unary * "dereference" operator wh...
git diff HEAD^ HEAD This will show the changes between the previous commit and the current commit.

Page 87 of 417