Tutorial by Examples: al

This is a step-by-step guide to installing OpenCV 3 on a Debian-based Linux system from source. The steps should stay the same for other distros, just replace the relevant package manager commands when installing packages for the build. Note: If you don't feel like wasting time building stuff or di...
npm --install express-generator -g
The result of casting a pointer to an integer using reinterpret_cast is implementation-defined, but "... is intended to be unsurprising to those who know the addressing structure of the underlying machine." int x = 42; int* p = &x; long addr = reinterpret_cast<long>(p); std::...
this topic is a classical issue in iOS development, and its solution is various as other example already shown. In this example I'll show another daily common use one: passing data using closure by adapting delegate pattern example on this page into callback closure! one thing this method is superi...
If you don't need automatically generated apk files with unaligned suffix (which you probably don't), you may add the following code to build.gradle file: // delete unaligned files android.applicationVariants.all { variant -> variant.assemble.doLast { variant.outputs.each { output ->...
Note: Following instructions are written for Python 2.7 (unless specified): instructions for Python 3.x are similar. WINDOWS First, download the latest version of Python 2.7 from the official Website (https://www.python.org/downloads/). Version is provided as an MSI package. To install it manu...
Pi The following returns the value of PI formatted to 6 decimal places. The actual value is good to DOUBLE; SELECT PI(); -> 3.141593
Return the absolute value of a number SELECT ABS(2); -> 2 SELECT ABS(-46); -> 46 The sign of a number compares it to 0. SignResultExample-1n < 0SELECT SIGN(42); -> 10n = 0SELECT SIGN(0); -> 01n > 0SELECT SIGN(-3); -> -1 SELECT SIGN(-423421); -> -1
To install and load the current stable version of ggplot2 for your R installation use: # install from CRAN install.packages("ggplot2") To install the development version from github use # install.packages("devtools") devtools::install_github("hadley/ggplot2") ...
/** * Explain briefly what method does here * @param x Explain briefly what should be x and how this affects the method. * @param y Explain briefly what should be y and how this affects the method. * @return Explain what is returned from execution. */ def method(x: Int, y: String): O...
5.1 This Example demonstrates how to automatically assign a value to each entry in an enum list. This will prevent two enums from having the same value by mistake. NOTE: Object.freeze browser support var testEnum = function() { // Initializes the enumerations var enumList = [ &q...
SpriteKit functionality can be implemented in a subclass of SKScene. For example, a game may implement the main game functionality within an SKScene subclass called GameScene. In Swift: import SpriteKit class GameScene: SKScene { override func didMoveToView(view: SKView) { /* Co...
An SKScene has a scaleMode parameter that defines how it will change its size to fit within the SKView it is presented into the SKView if it is not the same size and/or shape. There are four options for scaleMode: AspectFit: the scene is scaled (but not stretched) until it fits within the view. ...
Mapping Applying a function to all elements of an array : array_map('strtoupper', $array); Be aware that this is the only method of the list where the callback comes first. Reducing (or folding) Reducing an array to a single value : $sum = array_reduce($numbers, function ($carry, $number) { ...
The BIT type is useful for storing bit-field values. BIT(M) allows storage of up to M-bit values where M is in the range of 1 to 64 You can also specify values with bit value notation. b'111' -> 7 b'10000000' -> 128 Sometimes it is handy to use 'shift' to construct a single-bit valu...
It's best for readability (and your sanity) to avoid escaping the escapes. That's where raw strings literals come in. (Note that some languages allow delimiters, which are preferred over strings usually. But that's another section.) They usually work the same way as this answer describes: [A] ba...
Detailed instructions on excel-formula(s). There are many formulas that you can choose from. They are divided up into 7 different categories and are on the FORMULAS tab in Excel. The categories are: Financial Logical Text Date & Time Lookup & Reference Math & trig More Function...
Using alarm, user can schedule SIGALARM signal to be raised after specified interval. In case user did not blocked, ignored or specified explicit signal handler for this signal, the default action for this signal will be performed on arrival. Per specification default action for SIGALARM is to termi...
You can install Sinatra as a global gem: gem install sinatra or add it to a project's Gemfile # in Gemfile: gem 'sinatra' and run bundle install.
If a class, enum, inline function, template, or member of a template has external linkage and is defined in multiple translation units, all definitions must be identical or the behavior is undefined according to the One Definition Rule (ODR). foo.h: class Foo { public: double x; private...

Page 118 of 269