Tutorial by Examples: al

This is a short summary of the GitLab guide on Install a GitLab CE Omnibus package. Requirements In order to install the GitLab Community Edition on your server, you should read the requirements page. To make it brief, the recommended requirements are: OS: Ubuntu, Debian, CentOS, RHEL Ruby ver...
It is possible to define local variables inside a function to reduce code repetition give name to subexpressions reduce the amount of passed arguments. The construct for this is let ... in .... bigNumbers = let allNumbers = [1..100] isBig number = ...
Installation The preferred way to install Mockito is to declare a dependency on mockito-core with a build system of choice. As of July 22nd, 2016, the latest non-beta version is 1.10.19, but 2.x is already encouraged to be migrated to. Maven <dependency> <groupId>org.mockito</...
The following example listens to window.onerror event and uses an image beacon technique to send the information through the GET parameters of an URL. var hasLoggedOnce = false; // Some browsers (at least Firefox) don't report line and column numbers // when event is handled through window.addE...
Arrays can have more than one dimension. The following example creates a two-dimensional array of ten rows and ten columns: int[,] arr = new int[10, 10]; An array of three dimensions: int[,,] arr = new int[10, 10, 10]; You can also initialize the array upon declaration: int[,] arr = new int...
Install npm is bundled with Node.js, so if you install Node.js you'll automatically have npm installed too. You can choose between a Current and a LTS version Windows For Microsoft Windows you can download a MSI installer from https://nodejs.org/en/download/. OS X For Apple OS X you can downloa...
drush dl drupal --drupal-project-rename=example cd example drush site-install standard --db-url='mysql://[db_user]:[db_pass]@localhost/[db_name]' --site-name=Example
By recursion let rec sumTotal list = match list with | [] -> 0 // empty list -> return 0 | head :: tail -> head + sumTotal tail The above example says: "Look at the list, is it empty? return 0. Otherwise it is a non-empty list. So it could be [1], [1; 2], [1; 2; 3] ...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. You can use the _cat APIs to get a human readable, tabular output for various reasons. GET /_cat/health?v <1> The ?v is optional, but it implies that you want "verbose" output. _...
Free version of SSH protocol implementation, OpenSSH is available in all the Linux distributions. It consists of the server and client packages. Installation On Debian-based Linux, you can install openssh using # apt-get install openssh-server openssh-client On RHEL/CentOS you need to use yum:...
Using iris dataset: import sklearn.datasets iris_dataset = sklearn.datasets.load_iris() X, y = iris_dataset['data'], iris_dataset['target'] Data is split into train and test sets. To do this we use the train_test_split utility function to split both X and y (data and target vectors) randomly w...
You can download Mercurial from the project's website, and there are graphical utilities for Windows, Linux and OSX if you'd prefer that to a command line interface. Most Unix package managers include Mercurial, for example on Debian/Ubuntu: $ apt-get install mercurial You can verify Mercurial i...
Install-Package NUnit This package includes all assemblies needed to create unit tests. Tests can be executed using one of the following methods: Visual Studio Unit Test Window Console runner Third party runner that supports NUnit 3 Visual Studio Unit Test Window To execute tests using ...
The zero value of slice is nil, which has the length and capacity 0. A nil slice has no underlying array. But there are also non-nil slices of length and capacity 0, like []int{} or make([]int, 5)[5:]. Any type that have nil values can be converted to nil slice: s = []int(nil) To test whether a...
A callback is a method that gets called at specific moments of an object's lifecycle (right before or after creation, deletion, update, validation, saving or loading from the database). For instance, say you have a listing that expires within 30 days of creation. One way to do that is like this: ...
To access functions and properties of nullable types, you have to use special operators. The first one, ?., gives you the property or function you're trying to access, or it gives you null if the object is null: val string: String? = "Hello World!" print(string.length) // Compile erro...
In order to install PostgreSQL on OSX, you need to know which versions are currently supported. Use this command to see what versions you have available. sudo port list | grep "^postgresql[[:digit:]]\{2\}[[:space:]]" You should get a list that looks something like the following: post...
When working with regular expressions one modifier for PCRE is g for global match. In R matching and replacement functions have two version: first match and global match: sub(pattern,replacement,text) will replace the first occurrence of pattern by replacement in text gsub(pattern,replace...
The logical NOT (!) operator performs logical negation on an expression. Syntax: !expression Returns: a Boolean. Description The logical NOT (!) operator performs logical negation on an expression. Boolean values simply get inverted: !true === false and !false === true. Non-boolean val...

Page 52 of 269