Tutorial by Examples: al

async.parallel(tasks, afterTasksCallback) will execute a set of tasks in parallel and wait the end of all tasks (reported by the call of callback function). When tasks are finished, async call the main callback with all errors and all results of tasks. function shortTimeFunction(callback) { set...
async.waterfall(tasks, afterTasksCallback) will execute a set of tasks. Each task are executed after another, and the result of a task is passed to the next task. As async.series(), if a task fails, async stop the execution and call immediately the main callback. When tasks are finished successfull...
Use the yum command to manage packages in Enterprise Linux-based operating systems: yum install php This installs a minimal install of PHP including some common features. If you need additional modules, you will need to install them separately. Once again, you can use yum to search for these pac...
One of Angular's strength's is client-side form validation. Dealing with traditional form inputs and having to use interrogative jQuery-style processing can be time-consuming and finicky. Angular allows you to produce professional interactive forms relatively easily. The ng-model directive provide...
A quick note before actually installing RabbitMQ: Ubuntu 14.04's Erlang packages have issues if you are using SSL with RabbitMQ, so you'll need to install a newer version than what the Ubuntu package maintainers provide, so use the binaries at https://www.erlang-solutions.com/resources/download.html...
Here are examples of how to use monotonic predicates instead of impure, non-monotonic constructs in your programs: dif/2 is meant to be used instead of non-monotonic constructs like (\=)/2 arithmetic constraints (CLP(FD), CLP(Q) and others) are meant to be used instead of moded arithmetic predi...
List<Integer> nums = Arrays.asList(1, 2, 3); List<String> strings = nums.stream() .map(Object::toString) .collect(Collectors.toList()); That is: Create a stream from the list Map each element using Object::toString Collect the String values into a List using Collectors...
The chan-signal crate provides a solution to handle OS signal using channels, altough this crate is experimental and should be used carefully. Example taken from BurntSushi/chan-signal. #[macro_use] extern crate chan; extern crate chan_signal; use chan_signal::Signal; fn main() { // S...
The nix crate provides an UNIX Rust API to handle signals, however it requires using unsafe rust so you should be careful. use nix::sys::signal; extern fn handle_sigint(_:i32) { // Be careful here... } fn main() { let sig_action = signal::SigAction::new(handle_sigint, ...
Unlike emails, JIDs were defined with Internationalization (i18n) in mind using the Preparation, Enforcement, and Comparison of Internationalized Strings (PRECIS) framework. PRECIS (defined in RFC 7564), is a framework for comparing strings safely in a variety of contexts. For instance, imagine you...
Go to https://www.arduino.cc/en/Main/Software Click the Mac OS X link. Unzip the .zipfile. Move the Arduino application to Applications.
This example assumes that your lookup column is named MultiLookupColumnName and that you want to set your multi-lookup field to lookup to the items with IDs 1 and 2. Using jQuery AJAX 2010 var listName = "YourListName"; var lookupList = "LookupListName"; var idOfItemToUpdate...
To break loops, the command EXIT can be used. DO. READ TABLE itab INDEX sy-index INTO DATA(wa). IF sy-subrc <> 0. EXIT. "Stop this loop if no element was found ENDIF. " some code ENDDO. To skip to the next loop step, the command CONTINUE can be u...
Enable and configure the experimental Gradle plugin to improve AndroidStudio's NDK support. Check that you fulfill the following requirements: Gradle 2.10 (for this example) Android NDK r10 or later Android SDK with build tools v19.0.0 or later Configure MyApp/build.gradle file Edit the dep...
sudo apt-add-repository ppa:brightbox/ruby-ng Hit Enter to confirm sudo apt-get update Then you can install your ruby version of choice (the ppa supports ruby2.0 ruby2.1 ruby2.2 ruby2.3 and legacy versions ruby1.8 ruby1.9.1) Don't forget to include the respective -dev package for your version. Ot...
example: df = pd.DataFrame({'group1' : ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B'], 'group2' : ['C', 'C', 'C', 'D', 'E', 'E', 'F', 'F'], 'B' : ['one', np.NaN, np.NaN, np.NaN, ...
If the value of the href-attribute begins with tel:, your device will dial the number when you click it. This works on mobile devices or on computers/tablets running software – like Skype or FaceTime – that can make phone calls. <a href="tel:11234567890">Call us</a> Most de...
Setup Ruby On Rails on Ubuntu 16.04 Xenial Xerus All commands should be run in Linux terminal (hotkey: Ctrl + Alt + T) You need to install Ruby on your local machine in development environment. The first step is to install some dependencies for Ruby. sudo apt-get update sudo apt-get install git...
In molecular biology and genetics, GC-content (or guanine-cytosine content, GC% in short) is the percentage of nitrogenous bases on a DNA molecule that are either guanine or cytosine (from a possibility of four different ones, also including adenine and thymine). Using BioPython: >>> from...
Detailed instructions on getting silverlight set up or installed.

Page 105 of 269