Tutorial by Examples: c

Given the following project structure include\ myHeader.h src\ main.cpp CMakeLists.txt the following line in the CMakeLists.txt file include_directories(${PROJECT_SOURCE_DIR}/include) adds the include directory to the include search path of the compiler for all targets defined in thi...
You need Node Package Manager to install the project dependencies. Download node for your operating system from Nodejs.org. Node Package Manager comes with node. You can also use Node Version Manager to better manage your node and npm versions. It is great for testing your project on different node...
Animating Background color of stacklayout on tapping button pages/main.component.ts import {Component, ElementRef, ViewChild} from "@angular/core"; import {Color} from "color"; import {View} from "ui/core/view"; @Component({ selector: "main&quot...
pages/main.component.ts import {Component, ElementRef, ViewChild} from "@angular/core"; import {View} from "ui/core/view"; import {AnimationCurve} from "ui/enums"; @Component({ selector: "main", template: ` <StackLayout> ...
Set the NSFetchRequest property sortDescriptors to determine how data is returned. let fetchRequest = NSFetchRequest(entityName: "NAME_OF_ENTITY") let sortDescriptor = NSSortDescriptor(key: "NAME_OF_ATTRIBUTE", ascending: true) fetchRequest.sortDescriptors = [sortDescriptor] ...
You can also set multiple sort descriptors, to sort by one attribute within another. For example, return all entries ordered by date, and by name within each date: let fetchRequest = NSFetchRequest(entityName: "NAME_OF_ENTITY") let sortDescriptor1 = NSSortDescriptor(key: "name"...
You can set the path to bcomp.exe git config --global difftool.bc3.path 'c:\Program Files (x86)\Beyond Compare 3\bcomp.exe' and configure bc3 as default git config --global diff.tool bc3
The keywords can also create scopes in order to (un)check multiple operations. short m = 32767; short n = 32767; checked { int result1 = (short)(m + n); //will throw an OverflowException } unchecked { int result2 = (short)(m + n); // will return -2 }
If you have code (a routine) you want to execute under a specific (constraint) context, you can use dependency injection. The following example shows the constraint of executing under an open SSL connection. This first part would be in your library or framework, which you won't expose to the client...
Consider a communication happening between a Employee and its HR Department. Broadly these are explained in the following six steps when a message is passed to the actor: Employee creates something called an ActorSystem. It uses the ActorSystem to create something called as ActorRef. Th...
set wildmenu to turn on completion suggestions for command line. Execute the following set wildmenu set wildmode=list:longest,full Now if you do say, :colortab, You'll get 256-jungle Benokai BlackSea C64 CandyPaper Chasing_Logic ChocolateLiquor :color 0x7A69_dark
In this example we will implement a custom Checkbox for Android and iOS. Creating the Custom Control namespace CheckBoxCustomRendererExample { public class Checkbox : View { public static readonly BindableProperty IsCheckedProperty = BindableProperty.Create<Checkbox, bool&gt...
Add the following dependency to your pom.xml file: <dependency> <groupId>com.couchbase.client</groupId> <artifactId>java-client</artifactId> <version>2.3.1</version> </dependency> You can check the maven repository for the latest version....
String bucketName = "default"; String bucketPassword = ""; List<String> nodes = Arrays.asList("127.0.0.1"); // IP or hostname of one or more nodes in the cluster Cluster cluster = CouchbaseCluster.create(nodes); Bucket bucket = cluster.openBucket(bucketName,...
Printing webview console messages to logcat To handle console messages from web page you can override onConsoleMessage in WebChromeClient: final class ChromeClient extends WebChromeClient { @Override public boolean onConsoleMessage(ConsoleMessage msg) { Log.d( &quot...
Eclipse would provide its own embedded Maven enviroment out-of-the-box, which is not recommended whenever a certain Maven version must be used or further configuration must be performed (proxy, mirrors and so on): that is, to have full control over which Maven environment would be used by the IDE. ...
.server - create a debugging server .clients - list debugging clients connected to the server .endsrv - end a debugging server .servers - list debugging server connections .remote - start a remote.exe server .noshell - prevent shell commands
<script src='bower_components/webcomponentsjs/webcomponents-lite.min.js'></script> <link rel='import' href='bower_components/polymer/polymer.html'> <link rel='import' href='bower_components/paper-button/paper-button.html'> <link rel='import' href='bower_components/pap...
Transaction using JDBC driver is used to control how and when a transaction should commit and rollback. Connection to MySQL server is created using JDBC driver JDBC driver for MySQL can be downloaded here Lets start with getting a connection to database using JDBC driver Class.forName("com.m...
A confusion matrix can be used to evaluate a classifier, based on a set of test data for which the true values are known. It is a simple tool, that helps to give a good visual overview of the performance of the algorithm being used. A confusion matrix is represented as a table. In this example we w...

Page 511 of 826