Tutorial by Examples: ci

private static void explicitTaskParallism() { Thread.CurrentThread.Name = "Main"; // Create a task and supply a user delegate by using a lambda expression. Task taskA = new Task(() => Console.WriteLine($"Hello from task {nameof(taskA)}.")...
private static void Main(string[] args) { var a = new A(); var b = new B(); //implicit task parallelism Parallel.Invoke( () => a.DoSomeWork(), () => b.DoSomeOtherWork() ); }
Calling the dependencies task allows you to see the dependencies of the root project: gradle dependencies The results are dependency graphs (taking into account transitive dependencies), broken down by configuration. To restrict the displayed configurations, you can pass the --configuration opti...
You can pass latitude, longitude from your app to Google map using Intent String uri = String.format(Locale.ENGLISH, "http://maps.google.com/maps?q=loc:%f,%f", 28.43242324,77.8977673); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); startActivity(intent);
class Plane { enum Emergency: ErrorType { case NoFuel case EngineFailure(reason: String) case DamagedWing } var fuelInKilograms: Int //... init and other methods not shown func fly() throws { // ... if fuelInKilograms ...
A whole circle is 360 degrees or Math.PI * 2 radians. Half of those values follows to be 180 degrees or Math.PI radians. A quarter is then 90 degrees or Math.PI / 2 radians. To get a segment as a percentage of a whole circle in radians: function getSegment(percent:Number):Number { retur...
This script, from here and here, will return all Tables and Columns where a specified value exists. This is powerful in finding out where a certain value is in a database. It can be taxing, so it is suggested that it be executed in a backup / test enviroment first. DECLARE @SearchStr nvarchar(100) ...
UPDATE HelloWorlds SET HelloWorld = 'HELLO WORLD!!!' WHERE Id = 5 The above code updates the value of the field "HelloWorld" with "HELLO WORLD!!!" for the record where "Id = 5" in HelloWorlds table. Note: In an update statement, It is advised to use a "where&...
TYPO3 has extensive documentation. This documentation is linked here, so people can find stuff that is not documented here. Main Documentation The documentation of TYPO3 CMS is collected at docs.typo3.org, there is a list of all documentation for the core, and documentation for extensions. Promin...
When tokens like '{' are used in a parser rule, an implicit lexer rule will be created for them unless an explicit rule exists. In other words, if you have a lexer rule: OPEN_BRACE: '{'; Then both of these parser rules are equivalent: parserRule: '{'; parserRule: OPEN_BRACE; But if the OPE...
>> img = imread('football.jpg'); Use imread to read image files into a matrix in MATLAB. Once you imread an image, it is stored as an ND-array in memory: >> size(img) ans = 256 320 3 The image 'football.jpg' has 256 rows and 320 columns and it has 3 color channels: Red, ...
The example below describes how to declare three different types of direct dependencies in the app/ module's build.gradle file: android {...} ... dependencies { // The 'compile' configuration tells Gradle to add the dependency to the // compilation classpath and inclu...
In a multi-project gradle build, you can have a dependency with another module in your build. Example: dependencies { // Dependency on the "mylibrary" module from this project compile project(":mylibrary") } The compile project(':mylibrary') line decla...
You can have a dependency with a single jar or multiple jar files. With a single jar file you can add: dependencies { compile files('libs/local_dependency.jar') } It's possible to add a directory of jars to compile. dependencies { compile fileTree(dir: 'libs', include: ['*.jar']...
You can add remote dependencies in Gradle usign this structure: compile 'group:name:version' or this alternative syntax: compile group: 'xxx', name: 'xxxxx', version: 'xxxx' For example: compile 'com.android.support:appcompat-v7:24.1.0' The compile 'com.android.support:appcompat-v7:24.1....
This is a very common workflow when using Ansible for provisioning an AWS EC2 instance. This post assumes a basic understand of Ansible and most importantly, assumes you've properly configured it to connect to AWS. As Ansible official documentation insists, we are going to use four roles: 1- ami_f...
If you are using multiple namespaces that may have same-name classes(such as System.Random and UnityEngine.Random), you can use an alias to specify that Random comes from one or the other without having to use the entire namespace in the call. For instance: using UnityEngine; using System; Ran...
class MyHello { def sayHello() { "Hello, world" } } def cl = { sayHello() } cl() // groovy.lang.MissingMethodException cl.delegate = new MyHello() cl(); // "Hello, world" Used extensively by Groovy DSLs.
C99 These functions returns the floating-point remainder of the division of x/y. The returned value has the same sign as x. Single Precision: #include <math.h> /* for fmodf() */ #include <stdio.h> /* for printf() */ int main(void) { float x = 10.0; float y = 5.1; ...
We assume a file using ; as a column delimiter. Selecting a specific set of columns only requires a print statement. For instance, the following program selects the columns 3, 4 and 7 from its input: awk -F';' -v 'OFS=;' '{ print $3, $4, $7 }' It is as usual possible to more carefully choose lin...

Page 14 of 42