Tutorial by Examples: er

This example hides the red box (border) if the checkbox is not checked by making use of an IValueConverter. Note: The BooleanToVisibilityConverter used in the example below is a built-in value converter, located in the System.Windows.Controls namespace. XAML: <Window x:Class="StackOverflo...
INotifyPropertyChanged is an interface used by binding sources (i.e. the DataContext) to let the user interface or other components know that a property has been changed. WPF automatically updates the UI for you when it sees the PropertyChanged event raised. It is desirable to have this interface im...
You can bind to a property on a named element, but the named element must be in scope. <StackPanel> <CheckBox x:Name="MyCheckBox" IsChecked="True" /> <TextBlock Text="{Binding IsChecked, ElementName=MyCheckBox}" /> </StackPanel>
You can bind to a property of an ancestor in the visual tree by using a RelativeSource binding. The nearest control higher in the visual tree which has the same type or is derived from the type you specify will be used as the binding's source: <Grid Background="Blue"> <Grid ...
PS > Get-Member -InputObject $anObjectInstance This will return all members of the type instance. Here is a part of a sample output for String instance TypeName: System.String Name MemberType Definition ---- ---------- ---------- Clone ...
The Django template system has built-in tags and filters, which are functions inside template to render content in a specific way. Multiple filters can be specified with pipes and filters can have arguments, just as in variable syntax. {{ "MAINROAD 3222"|lower }} # mainroad 3222 {{ 10...
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 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...
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^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
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...
You can use the filter property to retrieve a subset of values from CRM. In this example only the accounts where the company name equals CompanyName are returned. $.ajax({ url: Xrm.Page.context.getClientUrl() + '/api/data/v8.0/accounts?$filter=name eq CompanyName', headers: { 'A...
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...
Class implementation: CLASS lcl_abap_class DEFINITION. PRIVATE SECTION. METHODS method1 RETURNING VALUE(rv_string) TYPE string. ENDCLASS. CLASS lcl_abap_class IMPLEMENTATION. METHOD method1. rv_string = 'returned value'. ENDMETHOD. ENDCLASS. Method call example: ...
my_vector = [0, 2, 1, 3, 9]; for i = 1:numel(my_vector) my_vector(i) = my_vector(i) + 1; end Most simple things done with for loops can be done faster and easier by vectorized operations. For example, the above loop can be replaced by my_vector = my_vector + 1.

Page 89 of 417