Tutorial by Examples: al

You can use npm install -g to install a package "globally." This is typically done to install an executable that you can add to your path to run. For example: npm install -g gulp-cli If you update your path, you can call gulp directly. On many OSes, npm install -g will attempt to writ...
Node Version Manager (nvm) greatly simplifies the management of Node.js versions, their installation, and removes the need for sudo when dealing with packages (e.g. npm install ...). Fish Shell (fish) "is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family&...
Perl supports many kinds of conditional statements (statements that are based on boolean results). The most common conditional statements are if-else, unless, and ternary statements. given statements are introduced as a switch-like construct from C-derived languages and are available in versions Per...
The behaviour of virtual functions in constructors and destructors is often confusing when first encountered. #include <iostream> using namespace std; class base { public: base() { f("base constructor"); } ~base() { f("base destructor"); } virtual co...
Detailed instructions on getting database-design set up or installed.
Principal Component Analysis finds sequences of linear combinations of the features. The first linear combination maximizes the variance of the features (subject to a unit constraint). Each of the following linear combinations maximizes the variance of the features in the subspace orthogonal to that...
We can use the class DateInterval to add or subtract some interval in a DateTime object. See the example below, where we are adding an interval of 7 days and printing a message on the screen: $now = new DateTime();// empty argument returns the current date $interval = new DateInterval('P7D');//th...
Learning the parameters of a prediction function and testing it on the same data is a methodological mistake: a model that would just repeat the labels of the samples that it has just seen would have a perfect score but would fail to predict anything useful on yet-unseen data. This situation is call...
Detailed instructions on getting gis set up or installed.
We can draw a connection between the Haskell types and the natural numbers. This connection can be made assigning to every type the number of inhabitants it has. Finite union types For finite types, it suffices to see that we can assign a natural type to every number, based in the number of constr...
Lets use the same code as above for this example. #include <iostream> void fail() { int *p1; int *p2(NULL); int *p3 = p1; if (p3) { std::cout << *p2 << std::endl; } } int main() { fail(); } First lets compile it g++ -g -o main m...
A function template can be overloaded under the rules for non-template function overloading (same name, but different parameter types) and in addition to that, the overloading is valid if The return type is different, or The template parameter list is different, except for the naming of paramete...
This is a very basic feature selection technique. Its underlying idea is that if a feature is constant (i.e. it has 0 variance), then it cannot be used for finding any interesting patterns and can be removed from the dataset. Consequently, a heuristic approach to feature elimination is to first re...
Whereas inside a Translation Unit, order of initialization of global variables is specified, order of initialization across Translation Units is unspecified. So program with following files foo.cpp #include <iostream> int dummyFoo = ((std::cout << "foo"), 0); b...
A simple EntitySystem that processes a Family of entities not once per frame, but after a given interval. Entity processing logic should be placed in processEntity(Entity). For more info, please see IntervalIteratingSystem In the below code example, the best usage for this is the physics world ...
Google Sheets is a spreadsheet application that runs on web browser. It doesn't require any installation or setup just a Google account and a modern web browser.
Detailed instructions on getting outlook-addin set up or installed.
This example provides a brief overview - for a more in-depth explanation of normal forms and examples, see this question. Reduced normal form The reduced normal form (or just normal form, when the context is clear) of an expression is the result of evaluating all reducible subexpressions in the gi...
CoffeeScript's existential operator ? check if the variable is null or undefined. 1. Check for null or undefined. alert "Hello CoffeeScript!" if myVar? javascript equivalent: if (typeof myVar !== "undefined" && myVar !== null) { alert("Hello CoffeeScript!&qu...
Makes an ajax request and updates only part of the view. Bean.java @ManagedBean @ViewScoped public class Bean { public Date getCurrentDate() { return new Date(); } } sample.xhtml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns...

Page 131 of 269