Tutorial by Examples

F# Interactive, is a REPL environment that lets you execute F# code, one line at a time. If you have installed Visual Studio with F#, you can run F# Interactive in console by typing "C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Fsi.exe". On Linux or OS X, the command is fsh...
The official style guide is located on the homepage and generally goes for: readability (instead of compactness) ease of modification clean diffs This means that, for example, this: homeDirectory : String homeDirectory = "/root/files" evaluate : Boolean -> Bool evalua...
You can diff UTF-16 encoded files (localization strings file os iOS and macOS are examples) by specifying how git should diff these files. Add the following to your ~/.gitconfig file. [diff "utf16"] textconv = "iconv -f utf-16 -t utf-8" iconv is a program to convert differe...
The random() function can be used to generate pseudo-random numbers: void setup() { Serial.begin(9600); } void loop() { long randomNumber = random(500); // Generate a random number between 0 and 499 Serial.println(randomNumber); randomNumber = random(100, 1000); // Genera...
If it is important for a sequence of numbers generated by random() to differ, it is a good idea to specify a seed with randomSeed(): void setup() { Serial.begin(9600); // If analog pin 0 is left unconnected, analogRead(0) will produce a // different random number each time the ...
With TypeScript 1.8 it becomes possible for a type parameter constraint to reference type parameters from the same type parameter list. Previously this was an error. function assign<T extends U, U>(target: T, source: U): T { for (let id in source) { target[id] = source[id]; ...
composer update composer update will update our dependencies as they are specified in composer.json. For example, if our project uses this configuration: "require": { "laravelcollective/html": "2.0.*" } Supposing we have actually installed the 2.0.1 version ...
Worksheets in excel have three options for the Visible property. These options are represented by constants in the xlSheetVisibility enumeration and are as follows: xlVisible or xlSheetVisible value: -1 (the default for new sheets) xlHidden or xlSheetHidden value: 0 xlVeryHidden xlSheetVeryHidd...
Below are the operators that can be overloaded in classes, along with the method definitions that are required, and an example of the operator in use within an expression. N.B. The use of other as a variable name is not mandatory, but is considered the norm. OperatorMethodExpression+ Addition__add...
name:"john doe"~1 Searches for multiple terms within a specific term distance (~1), i.e will find text containing john anonymous doe but not john second name doe
name:john Searches for a single term (joe) in a single field (name)
+firstname:john +surname:doe Matches documents where firstname is john and surname is doe. + predix indicates that the search term must occur (AND). +firstname:john -surname:doe Matches documents where firstname is john and surname is not doe. - predix indicates that the search term must not occu...
name:"john doe" Searches for multiple terms in specific order.
name:(john doe^5) The ^ indicator can be used to boost a search term to increase it's relevance level meaning that documents containing doe are more relevant than ones containing john
name:john* The * indicator allows you to do a wildcard search matching 0 or more characters after the search term john, will return documents containing john, johnson, john's, johnny and so on. name:do? The ? indicator allows you to do a wildcard search with a single character in the search term,...
age:[50 TO 60] Matches documents where age is between 50 and 60 including 50 and 60 age:{50 TO 60} Matches documents where age is between 50 and 60 excluding 50 and 60 age:[* TO 60] Matches documents where age is less than or equal to 60 age:[50 TO *] Matches documents where age is greater th...
By default you will get de codes and id's for optionsets and lookups. If you want to get the label as well, you need to add an extra header to the call. $.ajax({ url: Xrm.Page.context.getClientUrl() + '/api/data/v8.0/contacts', headers: { 'Accept': 'Application/json', ...
For performance reasons you should minimize the number of fields you are requesting from the API. You can use the select property to do so. This example fetches the name property of all accounts: $.ajax({ url: Xrm.Page.context.getClientUrl() + '/api/data/v8.0/accounts?$select=name', head...
If you fetch a single record and when that record has a lookup, you can also fetch values of the lookup value using the expand option. This reduces the number of calls you need to make to the API. The sample gets all accounts and the last name of the primary contact: $.ajax({ url: Xrm.Page.co...
This sample fetches accounts using a jQuery ajax method. On thing to note is that you need to set the header in the call to make the work. $.ajax({ url: Xrm.Page.context.getClientUrl() + '/api/data/v8.0/accounts', headers: { 'Accept': 'Application/json' } }).done(function...

Page 276 of 1336