Tutorial by Examples: f

public bool Check() { string input = "Hello World!"; string pattern = @"H.ll. W.rld!"; // true return Regex.IsMatch(input, pattern); }
This uses the Dropbox Java SDK to create a shared link for a file at the Dropbox path /test.txt: try { SharedLinkMetadata sharedLinkMetadata = client.sharing().createSharedLinkWithSettings("/test.txt"); System.out.println(sharedLinkMetadata.getUrl()); } catch (CreateSharedLinkW...
This example uses the Dropbox .NET library to get a shared link for a file, either by creating a new one, or retrieving an existing one: SharedLinkMetadata sharedLinkMetadata; try { sharedLinkMetadata = await this.client.Sharing.CreateSharedLinkWithSettingsAsync (path); } catch (ApiException...
This lists all of the custom classifiers you have trained. 'use strict'; let watson = require('watson-developer-cloud'); var visualRecognition = watson.visual_recognition({ version: 'v3', api_key: process.env['API_KEY'], version_date:'2016-05-19' }); let url = "https://upl...
This returns information about a specific classifier ID you have trained. This includes information about its current status (i.e., if it is ready or not). 'use strict'; let watson = require('watson-developer-cloud'); var visualRecognition = watson.visual_recognition({ version: 'v3', ap...
Training a custom classifier requires a corpus of images organized into groups. In this example, I have a bunch of images of apples in one ZIP file, a bunch of images of bananas in another ZIP file, and a third group of images of things that are not fruits for a negative set. Once a custom classif...
'use strict'; let watson = require('watson-developer-cloud'); let fs = require('fs'); var visualRecognition = watson.visual_recognition({ version: 'v3', api_key: process.env.API_KEY, version_date:'2016-05-19' }); let classifier_id_to_delete = 'TheNameofMyClassifier_485506080'; ...
Prerequisites First, you have to install the watson-developer-cloud SDK. $ npm install watson-developer-cloud Classify an image URL We'll use an image of Captain America from Wikipedia. 'use strict'; let watson = require('watson-developer-cloud'); var visualRecognition = watson.visual...
The following examples use the Item Sales and Customers sample databases. Note: The BETWEEN operator is inclusive. Using the BETWEEN operator with Numbers: SELECT * From ItemSales WHERE Quantity BETWEEN 10 AND 17 This query will return all ItemSales records that have a quantity that is gr...
The examples below fill in a PhoneNumber for any Employee who is also a Customer and currently does not have a phone number set in the Employees Table. (These examples use the Employees and Customers tables from the Example Databases.) Standard SQL Update using a correlated subquery: UPDATE ...
Scollector binaries for Windows, Mac, and Linux are available from the Bosun release page and can be saved to /opt/scollector/ or C:\Program Files\scollector\. The Scollector configuration file uses TOML v0.2.0 to specify various settings and defaults to being named scollector.toml in the same folde...
This is a continuous collector that uses the hadoop fs -du -s /hbase/* command to get details about the HDFS disk usage. This metric is very useful for tracking space in an OpenTSDB system. #!/bin/bash while true; do while read -r bytes raw_bytes path; do echo "hdfs.du $(date +&...
The following demo features an <output> element's use of the [for] and [form] attributes. Keep in mind, <output> needs JavaScript in order to function. Inline JavaScript is commonly used in forms as this example demonstrates. Although the <input> elements are type="number&quot...
NSLog(@"NSLog message"); printf("printf message\n"); Output: 2016-07-16 08:58:04.681 test[46259:1244773] NSLog message printf message NSLog outputs the date, time, process name, process ID, and thread ID in addition to the log message. printf just outputs the message. N...
NSLog(@"NSLog message"); The message that gets printed by calling NSLog has the following format when viewed in Console.app: DateTimeProgram nameProcess IDThread IDMessage2016-07-1608:58:04.681test[46259:1244773]NSLog message
In classes, super.foo() will look in superclasses only. If you want to call a default implementation from a superinterface, you need to qualify super with the interface name: Fooable.super.foo(). public interface Fooable { default int foo() {return 3;} } public class A extends Object impl...
In case you have reverted back to a past commit and lost a newer commit you can recover the lost commit by running git reflog Then find your lost commit, and reset back to it by doing git reset HEAD --hard <sha1-of-commit>
In case you have accidentally commited a delete on a file and later realized that you need it back. First find the commit id of the commit that deleted your file. git log --diff-filter=D --summary Will give you a sorted summary of commits which deleted files. Then proceed to restore the file b...
To restore a file to a previous version you can use reset. git reset <sha1-of-commit> <file-name> If you have already made local changes to the file (that you do not require!) you can also use the --hard option
var parts = new[] { "Foo", "Bar", "Fizz", "Buzz"}; var joined = string.Join(", ", parts); //joined = "Foo, Bar, Fizz, Buzz"

Page 33 of 457