Tutorial by Examples

Here is an example of a pipeline script that builds a Docker container, then runs the tests inside of it. The entrypoint is assumed to be either manage.py or invoke/fabric with a runtests command available. #!/usr/bin/groovy node { stage 'Checkout' checkout scm sh 'git submodule update ...
The push notification plugin requires an init an initialization which tells the plugin to start running using the sender id provided. let push = Push.init({ android: { senderID: "------------", }, ios: { alert: "true", badge: tru...
The registration step registers the app with the device's system and returns a registration id import { Push, RegistrationEventResponse} from "ionic-native"; //the push element is created in the initialization example push.on("registration", async (response:...
To receive push notifications we are supposed to tell the plugin to listen to incoming push notifications. This step is done after initialization & registration import { Push, NotificationEventResponse} from "ionic-native"; //the push element is created in the initial...
just execute uname -a. On Arch: $ uname -a Linux nokia 4.6.4-1-ARCH #1 SMP PREEMPT Mon Jul 11 19:12:32 CEST 2016 x86_64 GNU/Linuxenter code here
The Maven Surefire plugin runs during the test phase of the Maven build process or when test is specified as a Maven goal. The following directory structure and minimum pom.xml file will configure Maven to run a test. Directory structure inside the project's root directory: ─ project_root ├─ p...
Most of linux distros stores its version info in the /etc/lsb-release (debian) or /etc/redhat-release (RPM based) file. Using below generic command should get you past most of the Debian and RPM derivatives as Linux Mint and Cent-Os. Example on Ubuntu Machine: cat /etc/*release DISTRIB_ID=Ubuntu ...
val allowedUsers = users.filter { it.age > MINIMUM_AGE }
val isOfAllowedAge = { user: User -> user.age > MINIMUM_AGE } val allowedUsers = users.filter(isOfAllowedAge)
The sample content used here is Tears of Steel, by Blender Foundation. Specifically, we will use the download titled "HD 720p (~365MB, mov, 2.0)". This is a single file that ends with the extension "mov" and will play in just about any modern media player. Note that the download...
This example will explore how to see the layout of a video track and how to extract the individual pictures within it. The sample content used here is Tears of Steel, by Blender Foundation. Specifically, we will use the download titled "HD 720p (~365MB, mov, 2.0)". This is a single file t...
DASH is the most widely deployed adaptive streaming technology in modern solutions, used to deliver video in a wide variety of scenarios. The best way to understand DASH presentations is to observe the network activity that takes place during playback. This example uses Fiddler to capture and analy...
Mongoose connect has 3 parameters, uri, options, and the callback function. To use them see sample below. var mongoose = require('mongoose'); var uri = 'mongodb://localhost:27017/DBNAME'; var options = { user: 'user1', pass: 'pass' } mongoose.connect(uri, options, function(err){...
I.Overview A significant difference between MongoDB & RDBMS is MongoDB has many kinds of operators. One of them is update operator, which is used in update statements. II.What happen if we don't use update operators? Suppose we have a student collection to store student information(Table view...
There exist cases in which it is necessary to put data of different types together. In Azure ML for example, it is necessary to pass informations from a R script module to another one exclusively throught dataframes. Suppose we have a dataframe and a number: > df name height team...
Three things are needed to use async-await: The Task object: This object is returned by a method which is executed asynchronously. It allows you to control the execution of the method. The await keyword: "Awaits" a Task. Put this keyword before the Task to asynchronously wait for it to...
If you want to execute synchronous code asynchronous (for example CPU extensive calculations), you can use Task.Run(() => {}). public async Task DoStuffAsync() { await DoCpuBoundWorkAsync(); } private async Task DoCpuBoundWorkAsync() { await Task.Run(() => { fo...
The Task object is an object like any other if you take away the async-await keywords. Consider this example: public async Task DoStuffAsync() { await WaitAsync(); await WaitDirectlyAsync(); } private async Task WaitAsync() { await Task.Delay(1000); } private Task WaitDire...
You can use void (instead of Task) as a return type of an asynchronous method. This will result in a "fire-and-forget" action: public void DoStuff() { FireAndForgetAsync(); } private async void FireAndForgetAsync() { await Task.Delay(1000); throw new Exception(); ...
By default, all the controllers you generate with Symfony's built-in generate:controller command will make use of Symfony annotations for routing: namespace AppBundle\Controller; // You have to add a use statement for the annotation use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; ...

Page 816 of 1336