Tutorial by Examples

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...
Mapreduce is a part of Hadoop. So when Apache Hadoop (or any distribution of Hadoop is installed) MR is automatically installed. MapReduce is the data processing framework over HDFS(Hadoop distributed file system). MR jobs maybe written using Java, python, Scala, R, etc.
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...
You can add protocols to standard classes to extends their functionality: @protocol EncodableToString <NSObject> - (NSString *)toString; @end @interface NSDictionary (XYZExtended) <EncodableToString> @end @implementation NSDictionary (XYZExtended) - (NSString *)toString { ...
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 }
Foreword Git can work with video game development out of the box. However the main caveat is that versioning large (>5 MB) media files can be a problem over the long term as your commit history bloats - Git simply wasn't originally built for versioning binary files. The great news is that since...
When initializing a Git repository for Unity development, there are a couple of things that need to be done. Unity Ignore Folders Not everything should be versioned in the repository. You can add the template below to your .gitignore file in the root of your repository. Or alternatively, you can c...
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...
To show a message box when the form has been shown: Public Class Form1 Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown MessageBox.Show("Hello, World!") End Sub End Class To show a message box before the form has been shown: Public Cla...
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...
The extension 'realurl' provides complete transformation of URLs with GET parameter in the browser, like “index.php?id=123&type=0&L=1” into a virtual path, a so called “Speaking URL” like “home/about-us/index.html” and back again. The objective is that URLs shall be as human readable as poss...
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...
Outgoing ports are used as Commands, that you return from your update function. Elm side Define outgoing port: port output : () -> Cmd msg In this example we send an empty Tuple, just to trigger a subscription on the JavaScript side. To do so, we have to apply output function with an empty...
Incoming data from JavaScript is going through Subscriptions. Elm side First, we need to define an incoming port, using the following syntax: port input : (Int -> msg) -> Sub msg We can use Sub.batch if we have multiple subscriptions, this example will only contain one Subscription to in...
To send an immediate message with data to JavaScript, you have to trigger an action from your init. init : ( Model, Cmd Msg ) init = ( Model 0, send SendOutgoing ) send : msg -> Cmd msg send msg = Task.perform identity identity (Task.succeed msg)

Page 270 of 1336