Tutorial by Examples: di

You can add multiple dependencies. task A << { println 'Hello from A' } task B << { println 'Hello from B' } task C << { println 'Hello from C' } task D << { println 'Hello from D' } Now you can define a set of dependencies: B.dependsOn A...
Generate code Alt+Insert Add comment lines Ctrl+Shift+C Remove comment lines Ctrl+/ Format selection Alt+Shift+F Fix all class imports Ctrl-Shift-I Fix selected class's import Alt+Shift+I Shift lines left Alt+Shift+← Shift lines right Alt+Shift+→ Shift lines up Alt+Shift+↑ Shift li...
Make sure the following dependency is added to your app's build.gradle file under dependencies: compile 'com.android.support:support-core-ui:25.3.0' Then add the ViewPager to your activity layout: <android.support.v4.view.ViewPager android:id="@+id/viewpager" android:layo...
Sometimes you might have branches lying around that have already had their changes merged into master. This finds all branches that are not master that have no unique commits as compared to master. This is very useful for finding branches that were not deleted after the PR was merged into master. ...
It's important to handle exceptions in your service. When developing the service, you can set the WCF to provide more detailed information, adding this tag to configuration file, usually Web.config: <serviceDebug includeExceptionDetailInFaults="true"/> This tag must be placed w...
It took me a while to get this right, so I decided to share a solution because it might save someone else several days of trial and error. The problem: I want to be able to enable/disable WCF tracing in my C# .NET application and choose the trace output filename. I don't want users editing the .con...
You can overload a def if the signature is different: def printValue(x: Int) { println(s"My value is an integer equal to $x") } def printValue(x: String) { println(s"My value is a string equal to '$x'") } printValue(1) // prints "My value is an integer equal ...
We will look at how to implement custom comparisons by implementing a custom type, ordinal numbers. To simplify the implementation, we will focus on a small subset of these numbers: all ordinal numbers up to but not including ε₀. Our implementation is focused on simplicity, not speed; however, the i...
Sometimes, one wants to run some initialization code once before testing a condition. In certain other languages, this kind of loop has special do-while syntax. However, this syntax can be replaced with a regular while loop and break statement, so Julia does not have specialized do-while syntax. Ins...
The javadoc for the Thread class shows two ways to define and use a thread: Using a custom thread class: class PrimeThread extends Thread { long minPrime; PrimeThread(long minPrime) { this.minPrime = minPrime; } public void run() { // compute primes l...
Render a white rectangle over an image with the composite operation ctx.globalCompositeOperation = 'difference'; The amount of the effect can be controled with the alpha setting // Render the image ctx.globalCompositeOperation='source-atop'; ctx.drawImage(image, 0, 0); // set the composite...
ShouldPerformSegueWithIdentifier: func shouldPerformSegueWithIdentifier(_ identifier:String, sender sender:AnyObject?) -> Bool Determines whether the segue with the specified identifier should be performed. Parameters Identifier: String that identifies the triggered segue Sender: The...
Map k v provides a Monoid instance with the following semantics: mempty is the empty Map, i.e. the same as Map.empty m1 <> m2 is the left-biased union of m1 and m2, i.e. if any key is present both in m1 and m2, then the value from m1 is picked for m1 <> m2. This operation is also ava...
In some instances, you will want to send data from JS client to the R server. Here is a basic example using javascript's Shiny.onInputChange function: library(shiny) runApp( list( ui = fluidPage( # create password input HTML('<input type="password" id="passw...
To install DevExpress .NET products on your development machine, it is first necessary to obtain the DevExpress .NET Products Installer. You can download it from the http://www.devexpress.com website in one of the following ways, based on the status of your current account. Download the Trial ...
https://godzillai5.wordpress.com/2016/08/21/jdbc-jt400-setting-to-get-crud-and-show-sql-features-added-in-netbeans-with-ibm-db2-for-i/
Creating a Project with the NetBeans IDE In the following, we walk you through the creation of a Vaadin project in NetBeans and show how to run it. Installation of NetBeans and the Vaadin plugin is covered in Installing the NetBeans IDE and Plugin. Without the plugin, you can most easily create a...
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <dirent.h> #include <ctype.h> int main(int argc, char **argv) { const char *dname = (argc > 1 ? argv[1] : "."); DI...
element.style only reads CSS properties set inline, as an element attribute. However, styles are often set in an external stylesheet. The actual style of an element can be accessed with window.getComputedStyle(element). This function returns an object containing the actual computed value of all the ...
M-x magit-status s RET <file-to-stage> RET c c <commit message> C-c C-c q

Page 98 of 164