Tutorial by Examples: api

// Remember to intialize your client as described in the Remarks section Awareness.SnapshotApi.getLocation(client) .setResultCallback(new ResultCallback<LocationResult>() { @Override public void onResult(@NonNull LocationResult locationResult) { Location lo...
// Remember to initialize your client as described in the Remarks section Awareness.SnapshotApi.getPlaces(client) .setResultCallback(new ResultCallback<PlacesResult>() { @Override public void onResult(@NonNull PlacesResult placesResult) { List<PlaceLike...
// Remember to initialize your client as described in the Remarks section Awareness.SnapshotApi.getWeather(client) .setResultCallback(new ResultCallback<WeatherResult>() { @Override public void onResult(@NonNull WeatherResult weatherResult) { Weather weathe...
If you want to detect when your user starts or finishes an activity such as walking, running, or any other activity of the DetectedActivityFence class, you can create a fence for the activity that you want to detect, and get notified when your user starts/finishes this activity. By using a Broadcast...
There are currently three YouTube APIs available to the public: YouTube Data API YouTube Analytics API YouTube Reporting API Each of these offer different functionality and are treated as separate, individual APIs. Since YouTube is a subsidiary of Google, the various YouTube APIs are provid...
VBA syntax requires that a string-literal appear within " marks, so when your string needs to contain quotation marks, you'll need to escape/prepend the " character with an extra " so that VBA understands that you intend the "" to be interpreted as a " string. 'The fol...
The Windows API GetTickCount function returns the number of milliseconds since the system (computer) was started. The simplest example follows: var Start, Stop, ElapsedMilliseconds: cardinal; begin Start := GetTickCount; // do something that requires measurement Stop := GetTickCount; ...
Often data comes in tables. Generally one can divide this tabular data in wide and long formats. In a wide format, each variable has its own column. PersonHeight [cm]Age [yr]Alison17820Bob17445Carl18231 However, sometimes it is more convenient to have a long format, in which all variables are in o...
It may be a good idea to encapsulate the HTTP handling logic in its own class. The following class exposes a method for getting Posts. It calls the http.get() method and calls .map on the returned Observable to convert the Response object to a Post object. import {Injectable} from "@angular/co...
The following example utilizes the tm text mining package to scrape and mine text data from the web to build word clouds with symbolic shading and ordering. require(RWeka) require(tau) require(tm) require(tm.plugin.webmining) require(wordcloud) # Scrape Google Finance -----------------------...
DataTables comes with an extensive API which is used to manipulate or obtain information about the DataTables on a page. The API can be accessed in 3 ways: var table = $('#tableid').DataTable(); //DataTable() returns an API instance immediately var table = $('#tableid').dataTable().api(); //dataT...
First you have to set up a new Scrapy project. Enter a directory where you’d like to store your code and run: scrapy startproject projectName To scrape we need a spider. Spiders define how a certain site will be scraped. Here’s the code for a spider that follows the links to the top voted questi...
Escaping strings is an older (and less secure) method of securing data for insertion into a query. It works by using MySQL's function mysql_real_escape_string() to process and sanitize the data (in other words, PHP is not doing the escaping). The MySQLi API provides direct access to this function $...
Add below entries in pom.xml. <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>3.1.0.RELEASE</version> </dependency> <dependency> <groupId>org.springfr...
xml_import_example.info.yml type: module name: XML import example package: Examples description: "This module helps understanding the Batch API and Queue API with an XML import example" core: 8.x xml_import_example.permissions.yml import content from xml: title: 'Import content...
One of the most powerful capabilities in Excel is the use of Pivot Tables to sort and analyze data. Using VBA to create and manipulate the Pivots is easier if you understand the relationship of Pivot Tables to Pivot Caches and how to reference and use the different parts of the Tables. At its most ...
Two important things to note when adding fields to a Pivot Table are Orientation and Position. Sometimes a developer may assume where a field is placed, so it's always clearer to explicitly define these parameters. These actions only affect the given Pivot Table, not the Pivot Cache. Dim thisPivot ...
In [1]: ser = pd.Series(['lORem ipSuM', 'Dolor sit amet', 'Consectetur Adipiscing Elit']) Convert all to uppercase: In [2]: ser.str.upper() Out[2]: 0 LOREM IPSUM 1 DOLOR SIT AMET 2 CONSECTETUR ADIPISCING ELIT dtype: object All lowercase: In [3]: ser...
You can simply use the native map APIs on each platform with Xamarin Forms. All you need is to download the Xamarin.Forms.Maps package from nuget and install it to each project (including the PCL project). Maps Initialization First of all you have to add this code to your platform-specific project...
Edit /etc/init/docker.conf and update the DOCKER_OPTS variable to the following: DOCKER_OPTS='-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock' Restart Docker deamon service docker restart Verify if Remote API is working curl -X GET http://localhost:4243/images/json

Page 4 of 12