Tutorial by Examples: c

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...
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...
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...
It is possible to write a method on a generic type that is more restrictive using where sentence. extension Array where Element: StringLiteralConvertible { func toUpperCase() -> [String] { var result = [String]() for value in self { result.append(String(value).upperca...
ABAP Classes can be declared Globally or Locally. A global class can be used by any object within the ABAP repository. By contrast, a local class can only be used within the scope it is declared. CLASS lcl_abap_class DEFINITION. PUBLIC SECTION. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS...
Class implementation: CLASS lcl_abap_class DEFINITION. PUBLIC SECTION. METHODS: constructor, method1. PROTECTED SECTION. PRIVATE SECTION. METHODS: method2, method3. ENDCLASS. CLASS lcl_abap_class IMPLEMENTATION. METHOD constructor. &q...
Class implementation: CLASS lcl_abap_class DEFINITION. PRIVATE SECTION. METHODS method1 IMPORTING iv_string TYPE string CHANGING cv_string TYPE string EXPORTING ev_string TYPE string. ENDCLASS. CLASS lcl_abap_class IMPLEMENTATION. METHOD m...
CMake knows several build types, which usually influence default compiler and linker parameters (such as debugging information being created) or alternative code paths. By default, CMake is able to handle the following build types: Debug: Usually a classic debug build including debugging informa...
Controls that can be bound with data can make use of SqlDataSource controls. The SqlDataSource control not only allows you to retrieve data from a database, but also edit and sort the data. Retrieving Data Stored Procedure: <asp:SqlDataSource ID="SqlDataSourceEmployees" runat=&q...
Type type = obj.GetType(); //To restrict return properties. If all properties are required don't provide flag. BindingFlags flags = BindingFlags.Public | BindingFlags.Instance; PropertyInfo[] properties = type.GetProperties(flags); foreach (PropertyInfo property in properties) { Console...
You can add an interpreter directive (shebang) to your script. Create a file called hello_world.rb which contains: #!/usr/bin/env ruby puts 'Hello World!' Give the script executable permissions. Here's how to do that in Unix: $ chmod u+x hello_world.rb Now you do not need to call the Ru...
When is an IEnumerable<T> a subtype of a different IEnumerable<T1>? When T is a subtype of T1. IEnumerable is covariant in its T parameter, which means that IEnumerable's subtype relationship goes in the same direction as T's. class Animal { /* ... */ } class Dog : Animal { /* ... */ }...
A single case discriminated union is like any other discriminated union except that it only has one case. // Define single-case discriminated union type. type OrderId = OrderId of int // Construct OrderId type. let order = OrderId 123 // Deconstruct using pattern matching. // Parentheses used...
To document a function, it is often helpful to have an example script which uses your function. The publish function in Matlab can then be used to generate a help file with embedded pictures, code, links, etc. The syntax for documenting your code can be found here. The Function This function uses ...
These are the most common ways to create an instance of Guid: Creating an empty guid (00000000-0000-0000-0000-000000000000): Guid g = Guid.Empty; Guid g2 = new Guid(); Creating a new (pseudorandom) Guid: Guid g = Guid.NewGuid(); Creating Guids with a specific value: Guid g = n...
There are seven different column types that can be used within a GridView. <asp:GridView ID="GridView1" runat="server"> <Columns> ... </Columns> </asp:GridView> BoundField: <asp:BoundField DataField="EmployeeID" Heade...
When is an IComparer<T> a subtype of a different IComparer<T1>? When T1 is a subtype of T. IComparer is contravariant in its T parameter, which means that IComparer's subtype relationship goes in the opposite direction as T's. class Animal { /* ... */ } class Dog : Animal { /* ... */ }...
let x = true match x with | true -> printfn "x is true" yields a warning C:\Program Files (x86)\Microsoft VS Code\Untitled-1(2,7): warning FS0025: Incomplete pattern matches on this expression. For example, the value 'false' may indicate a case not covered by the pattern(s). ...
Incorrect usage: In the following snippet, the last match will never be used: let x = 4 match x with | 1 -> printfn "x is 1" | _ -> printfn "x is anything that wasn't listed above" | 4 -> printfn "x is 4" prints x is anything that wasn't listed abov...

Page 171 of 826