Tutorial by Examples

To setup for using Android Gradle Plugin you need many things: java gradle the Android project folder structure an Android Manifest initial plugin setup The easiest way to get all of them is to follow these steps: Donwload and Install Java OpenJDK version 6 or 7 (you can use 8 with addi...
@Override public void onMessageReceived(RemoteMessage remoteMessage) { // ... // TODO(developer): Handle FCM messages here. Log.d(TAG, "From: " + remoteMessage.getFrom()); // Check if message contains a data payload. if (remoteMessage.getData().size() > 0) ...
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { // If you are receiving a notification message while your app is in the background, // this callback will no...
Make a simple GUI application in 3 easy steps. 1. Design Open Qt Creator, create a new project and make your design. Save your result as .ui file (here: mainwindow.ui). 2. Generate corresponding .py file Now you can create a .py file from your .ui file that you generated in the previous step. ...
This basic example counts at different rates on two threads that we name sync (main) and async (new thread). The main thread counts to 15 at 1Hz (1s) while the second counts to 10 at 0.5Hz (2s). Because the main thread finishes earlier, we use pthread_join to make it wait async to finish. #include ...
Due to not being Excel-VBA exclusive contents this Example has been moved to VBA documentation. Link: Jagged Arrays (Arrays of Arrays)
Knitr is an R package that allows us to intermingle R code with LaTeX code. One way to achieve this is inline code chunks. This apporach is demonstrated below. # r-noweb-file.Rnw \documentclass{article} \begin{document} This is an Rnw file (R noweb). It contains a combination of LateX and ...
Knitr is an R package that allows us to intermingle R code with LaTeX code. One way to achieve this is internal code chunks. This apporach is demonstrated below. # r-noweb-file.Rnw \documentclass{article} \begin{document} This is an Rnw file (R noweb). It contains a combination of LateX a...
You can create a form using the form_tag helper <%= form_tag do %> Form contents <% end %> This creates the following HTML <form accept-charset="UTF-8" action="/" method="post"> <input name="utf8" type="hidden" value=...
To create a search form, enter the following code <%= form_tag("/search", method: "get") do %> <%= label_tag(:q, "Search for:") %> <%= text_field_tag(:q) %> <%= submit_tag("Search") %> <% end %> form_tag: This is t...
Checkboxes <%= check_box_tag(:pet_dog) %> <%= label_tag(:pet_dog, "I own a dog") %> <%= check_box_tag(:pet_cat) %> <%= label_tag(:pet_cat, "I own a cat") %> This will generate the following html <input id="pet_dog" name="pet_dog&q...
Assuming an implicit parameter list with more than one implicit parameter: case class Example(p1:String, p2:String)(implicit ctx1:SomeCtx1, ctx2:SomeCtx2) Now, assuming that one of the implicit instances is not available (SomeCtx1) while all other implicit instances needed are in-scope, to creat...
This is an example of a package-info.java file that binds an XML namespace to a serializable Java class. This should be placed in the same package as the Java classes that should be serialized using the namespace. /** * A package containing serializable classes. */ @XmlSchema ( xmlns = ...
SQL Server 2016 Splits a string expression using a character separator. Note that STRING_SPLIT() is a table-valued function and therefore must be used within FROM clause. Parameters: string. Any character type expression (char, nchar, varchar or nvarchar) seperator. A single character expressi...
Browser support for ES6 is growing, but to be sure your code will work on environments that dont fully support it, you can use Babel, the ES6/7 to ES5 transpiler, try it out! If you would like to use ES6/7 in your projects without having to worry about compatibility, you can use Node and Babel CLI ...
This is a step-by-step guide to installing OpenCV 3 on a Debian-based Linux system from source. The steps should stay the same for other distros, just replace the relevant package manager commands when installing packages for the build. Note: If you don't feel like wasting time building stuff or di...
Using D3js with Angular can open up new fronts of possibilities such as live updation of charts as soon as data is updated. We can encapsulate complete chart functionality within an Angular directive, which makes it easily reusable. index.html >> <!DOCTYPE html> <html ng-app="...
Required Namespace: System.Security.Cryptography private class Encryption { private const string SecretKey = "topSecretKeyusedforEncryptions"; private const string SecretIv = "secretVectorHere"; public string Encrypt(string data...
npm --install express-generator -g

Page 609 of 1336