Tutorial by Examples: e

Whenever you declare a new rule inside another rule it is called nesting. With basic nesting, as shown below, the nested selector will be compiled as a new CSS selector with all its parents prepended, separated by a space. // SCSS .parent { margin: 1rem; .child { float: left; } ...
Nesting is a very powerful feature, but should be used with caution. It can happen quite easily and quickly, that you start nesting and carry on including all children in a nest, of a nest, of a nest. Let me demonstrate: // SCSS header { // [css-rules] .holder { // [css-rules] ...
Singletons are used to ensure that only one instance of an object is being created. The singleton allows only a single instance of itself to be created which means it controls its creation. The singleton is one of the Gang of Four design patterns and is a creational pattern. Thread-Safe Singleton ...
Fourier Transform is probably the first lesson in Digital Signal Processing, it's application is everywhere and it is a powerful tool when it comes to analyze data (in all sectors) or signals. Matlab has a set of powerful toolboxes for Fourier Transform. In this example, we will use Fourier Transfor...
Objective-C [mySwitch setOn:YES]; //or [mySwitch setOn:YES animated:YES]; Swift mySwitch.setOn(false) //or mySwitch.setOn(false, animated: false)
Objective-C mySwitch.backgroundColor = [UIColor yellowColor]; [mySwitch setBackgroundColor: [UIColor yellowColor]]; mySwitch.backgroundColor =[UIColor colorWithRed:255/255.0 green:0/255.0 blue:0/255.0 alpha:1.0]; mySwitch.backgroundColor= [UIColor colorWithWhite: 0.5 alpha: 1.0]; mySwitch.backg...
Objective-C //for off-state mySwitch.tintColor = [UIColor blueColor]; [mySwitch setTintColor: [UIColor blueColor]]; //for on-state mySwitch.onTintColor = [UIColor cyanColor]; [mySwitch setOnTintColor: [UIColor cyanColor]]; Swift //for off-state mySwitch.tintColor = UIColor.blueColor() ...
If your project depends on the external libraries, you should first install them with opam. Assuming your dependencies are foo and bar and the main entry point of your project is foobar.ml you can then build a bytecode executable with ocamlbuild -use-ocamlfind -pkgs 'foo,bar' foobar.byte Warnin...
If your project has no external dependency and has foo.ml as its main entry point, you can compile a bytecode version with ocamlbuild foo.byte To get a native executable, run ocamlbuild foo.native
import pandas as pd import numpy as np df = pd.DataFrame({'A':[1,2,np.nan,3,np.nan], 'B':[1.2,7,3,0,8]}) df['C'] = df.A.interpolate() df['D'] = df.A.interpolate(method='spline', order=1) print (df) A B C D 0 1.0 1.2 1.0 1.000000 1 2.0 7.0 2...
order allow,deny deny from 255.0.0.0 allow from all This denies access to the IP 255.0.0.0. order allow,deny deny from 123.45.6. allow from all This denies access to all IPs in the range 123.45.6.0 to 123.45.6.255.
In attempt to send a response asynchronously from chrome.runtime.onMessage callback we might try this wrong code: chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { $.ajax({ url: 'https://www.google.com', method: 'GET', success: functio...
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...
Detailed instructions on getting hdfs set up or installed.
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 ...
Encoding //Create a Base64 Encoded NSString Object NSData *nsdata = [@"iOS Developer Tips encoded in Base64" dataUsingEncoding:NSUTF8StringEncoding]; // Get NSString from NSData object in Base64 NSString *base64Encoded = [nsdata base64EncodedStringWithOptions:0]; // Print the B...
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...

Page 238 of 1191