Tutorial by Examples: ti

PDO::setAttribute sets an attribute on the database handle. Desctiption of setAttribute is: public bool PDO::setAttribute ( int $attribute , mixed $value ) PDO::ATTR_ERRMODE: This attribute is used for error reporting. It can have one of the following values. PDO::ERRMODE_SILENT: If the ATTR...
You'll need Sitecore 6.6 or later (including Sitecore 8.x). Note that for Sitecore 6.6 compatibility you must have .NET 4.5 installed. Install Unicorn. This is as simple as adding the Unicorn NuGet package to your project. PM> Install-Package Unicorn When you install the NuGet package, a...
Clone the repository Place a copy of your Sitecore.Kernel.dll assembly in /lib/sitecore/v7 (for v7/v8) Build the project for your Sitecore version using Visual Studio 2012 or later Copy Unicorn.dll, Rainbow.dll, Rainbow.Storage.Sc.dll, Rainbow.Storage.Yaml.dll and Kamsar.WebConsole.dll to your ...
An anonymous function can be defined without a name through a Lambda Expression. For defining these type of functions, the keyword lambda is used instead of the keyword defun. The following lines are all equivalent and define anonymous functions which output the sum of two numbers: (lambda (x y) (...
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. ...
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...
Below example shows ways to read and write csv file without any third party libraries. Write CSV public void writeToCsvFile(List<String[]> thingsToWrite, String separator, String fileName){ try (FileWriter writer = new FileWriter(fileName)){ for (String[] strings : thingsToWrit...
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){ ...
Firstly, you'll need to add the crate into your Cargo.toml file as a dependency. [dependencies] rand = "0.3" This will retrieve the rand crate from crates.io. Next, add this to your crate root. extern crate rand; As this example is going to provide a simple output through the term...
To generate characters, you can utilize the thread-local random number generator function, random. fn main() { let tuple = rand::random::<(f64, char)>(); println!("{:?}", tuple) } For occasional or singular requests, such as the one above, this is a reasonable efficien...
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']); ...

Page 418 of 505