Tutorial by Examples: l

When your device connects to a network, an intent is sent. Many apps don’t check for these intents, but to make your application work properly, you can listen to network change intents that will tell you when communication is possible. To check for network connectivity you can, for example, use the ...
# Print the working directory import os print os.getcwd() # C:\Python27\Scripts # Set the working directory os.chdir('C:/Users/general1/Documents/simple Python files') print os.getcwd() # C:\Users\general1\Documents\simple Python files # load pandas import pandas as pd # read a csv d...
DEFINE QUERY q1 FOR Customer. OPEN QUERY q1 FOR EACH Customer. GET FIRST q1. loop: REPEAT: IF AVAILABLE Customer THEN DO: DISPLAY Customer.NAME CustNum WITH FRAME frClient TITLE "Client data". DISPLAY "(P)revious" SKIP ...
Detailed instructions on getting xcode-ui-testing set up or installed.
/* This function returns TRUE if input is the letter "b" and false otherwise */ FUNCTION isTheLetterB RETURNS LOGICAL (INPUT pcString AS CHARACTER): IF pcString = "B" THEN RETURN TRUE. ELSE RETURN FALSE. END FUNCTION. /* Calling the function with "b&qu...
A function can be forward declared, this is similar to specifications in a C header file. That way the compiler knows that a function will be made available later on. Without forward declarations the function MUST be declared before it's called in the code. The forward declaration consists of the...
/* This will popup a message-box saying "HELLO WORLD" */ FUNCTION cat RETURNS CHARACTER ( c AS CHARACTER, d AS CHARACTER): RETURN c + " " + d. END. MESSAGE cat("HELLO", "WORLD") VIEW-AS ALERT-BOX.
A function can have multiple return statements and they can be placed in different parts of the actual function. They all need to return the same data type though. FUNCTION returning DATE ( dat AS DATE): IF dat < TODAY THEN DO: DISPLAY "<". RETURN dat - 200. ...
For syncing all folders in both direction, insert this into your Vagrantfile config.vm.synced_folder "my-project1", "/home/vagrant/my-project1"
For syncing all folders in both direction, insert this into your Vagrantfile: config.vm.synced_folder "my-project1", "/home/vagrant/my-project1", type: "rsync", :rsync__exclude => ['my-project1/mini_project2/target,my-project1/mini_project2/target,my-project1/mini...
<%@ WebService Language="C#" Class="Util" %> using System; using System.Web.Services; public class Util: WebService { [WebMethod] public int CalculatorAdd(int operandA, int operandB) { return operandA + operandB; } [WebMethod] ...
const timeFormat = "15 Monday January 2006" func ParseDate(s string) (time.Time, error) { t, err := time.Parse(timeFormat, s) if err != nil { // time.Time{} returns January 1, year 1, 00:00:00.000000000 UTC // which according to the source code is the zero va...
prerequisites: To run kibana you need to install supported version of elastic search. for install elastic search refer this link Elasticsearch documentation KibanaElasticsearch4.0.0 - 4.1.x1.4.x - 1.7.x4.2.x2.0.x4.3.x2.1.x4.4.x2.2.x4.5.x2.3.x4.6.x2.4.x5.x5.x The Kibana can be downloade...
TTL value can be used to decide for how long the document needs to be there in the bucket. By default TTL value is 0, which means it will be there for indefinite time period. String bucketName = "bucket"; List<String> nodes = Arrays.asList("node1","node2"); // I...
Detailed instructions on getting air set up or installed.
function getCombinations(params, combinationsResults){ if(params.length == 0) return combinationsResults; var head = params[0]; var tail = params.slice(1); var combinationsResultsCurrent = []; if(Array.isArray(head)){ _.uniq(head).forEach(function(item){ ...
The procedures Create, Put_Line, Close from the package Ada.Text_IO is used to create and write to the file file.txt. with Ada.Text_IO; procedure Main is use Ada.Text_IO; F : File_Type; begin Create (F, Out_File, "file.txt"); Put_Line (F, "This string will be writ...
This example will provide basic web routing using Iron. To begin with, you will need to add the Iron dependency to your Cargo.toml file. [dependencies] iron = "0.4.*" We will use Iron's own Router library. For simplicity, the Iron project provides this library as part of the Iron cor...
You can also follow the official installation guide here. Step 1) Get The Angular UI Bootstrap Library Files via npm: npm install angular-ui-bootstrap via bower: bower install angular-bootstrap Step 2) Import The Angular UI Bootstrap Module angular.module('myModule', ['ui.bootstrap']); ...
When using "controller as syntax" you would give your controller an alias in the html when using the ng-controller directive. <div ng-controller="MainCtrl as main"> </div> You can then access properties and methods from the main variable that represents our contr...

Page 711 of 861