Variables are used to store a value once which will be used multiple times throughout a Sass document.
They are mostly used for controlling things such as fonts and colors but can be used for any value of any property.
Sass uses the $ symbol to make something a variable.
$font-stack: Helvetica, s...
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...
If you set opacity on an element it will affect all its child elements. To set an opacity just on the background of an element you will have to use RGBA colors. Following example will have a black background with 0.6 opacity.
/* Fallback for web browsers that don't support RGBa */
background-color...
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
Fortran 2003 introduced language features which can guarantee interoperability between C and Fortran (and to more languages by using C as an intermediary). These features are mostly accessed through the intrinsic module iso_c_binding:
use, intrinsic :: iso_c_binding
The intrinsic keyword here en...
For annotating some point of interest on map, we use pin annotation. Now, start by creating annotation object first.
MKPointAnnotation *pointAnnotation = [[MKPointAnnotation alloc] init];
Now provide coordinate to pointAnnotation,as
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake...
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 laravel set up or installed.
composer is required for installing laravel easily.
There are 3 methods of installing laravel in your system:
Via Laravel Installer
Download the Laravel installer using composer
composer global require "laravel/installer&quo...
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...
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...