Tutorial by Examples: al

The following snippet replaces all Attributes called "PreviousAttribute" by an Attribute called "ReplacementAttribute" for an entire solution. The sample manually uses a SyntaxRewriter to exchange the attributes. /// <summary> /// The CSharpSyntaxRewriter allows to rewrit...
Detailed instructions on getting vsto set up or installed.
An XSLT processor is necessary in order to perform any XSLT transformation. It can usually be installed via system's package manager. E.g. in Debian it can be installed with: sudo apt-get install xsltproc
In the Adobe technical white paper Adobe Acrobat 9 Digital Signatures, Changes and Improvements, especially its section "Allowed and disallowed changes", Adobe clarifies the allowed changes (as seen by Acrobat 9 and up) that can be made to a certified or signed document without invalidatin...
ngfor.component.html <StackLayout> <Label *ngFor="let item of items" [text]="item"></Label> </StackLayout> ngfor.component.ts import { Component } from "@angular/core"; var dataItems = ["data-item 1", "data-item 2&quo...
The following class can be used as a single class that can handle GET, POST, PUT, PATCH, and other requests: class APIResponseObject{ int responseCode; String response; APIResponseObject(int responseCode,String response) { this.responseCode = responseCode; ...
When we attach the !important keyword to a mixin call, the Less compiler will automatically add the !important to all properties that are present within the mixin. For example, consider the below mixin: .set-default-props() { margin: 4px; padding: 4px; border: 1px solid black; font-wei...
I'll demonstrate the basic usage of using functions vs using labels+gosub. In this example we'll implement simple functionality to add two numbers and store them in a variable. With functions: c := Add(3, 2) ; function call MsgBox, Result: %c% Add(a, b) { ; This is a function. Put it wherever...
This script demonstrates how to receive complicated GUI events from different controls in the same event callback function. We'll be using two ListView controls for that. Now every time an action is detected on one of those ListView controls, we want a precise description of what happened and have ...
Some character may be reserved for HTML and cannot be used directly as it may obstruct the actual HTML codes. For example, trying to display the left and right angle brackets (<>) in the source code may cause unexpected results in the output. Similarly, white spaces as written in the source co...
Some people recommend that you should apply various tests to a file before attempting to open it either to provide better diagnostics or avoid dealing with exceptions. For example, this method attempts to check if path corresponds to a readable file: public static File getValidatedFile(String path...
Detailed instructions on getting x++ set up or installed.
Using the Package Manager JDK and/or JRE releases for OpenJDK or Oracle can be installed using the package manager on most mainstream Linux distribution. (The choices that are available to you will depend on the distro.) As a general rule, the procedure is to open terminal window and run the comm...
Only Oracle JDKs and JREs are available for Windows platforms. The installation procedure is straight-forward: Visit the Oracle Java Downloads page: Click on either the JDK button, the JRE button or the Server JRE button. Note that to develop using Java you need JDK. To know the difference betw...
Oracle Java 7 and Java 8 Java 7 and Java 8 for macOS are available from Oracle. This Oracle page answers a lot of questions about Java for Mac. Note that Java 7 prior to 7u25 have been disabled by Apple for security reasons. In general, Oracle Java (Version 7 and later) requires an Intel-based Mac...
Suppose you have a pojo class Person public class Person { public String name; public Person(String name) { this.name = name; } } And you want to parse it into a JSON array or a map of Person objects. Due to type erasure you cannot construct classes of List<Person&g...
When multiple modules define the same functions by name, the compiler will complain. In such cases (or to improve readability), we can use a qualified import: import qualified Data.Stream as D Now we can prevent ambiguity compiler errors when we use map, which is defined in Prelude and Data.Stre...
To concatenate the value of two or more variables into a single string and print it as the output, we need to make use of interpolation. The following Less code, #demo:after { @var1: Hello; @var2: World!!!; content: "@{var1} @{var2}"; } when compiled would set "Hello Wo...
4.0 Since bash 4.0, a new operator ;& was introduced which provides fall through mechanism. #!/bin/bash var=1 case $var in 1) echo "Antartica" ;& 2) echo "Brazil" ;& 3) echo "Cat" ;& esac Outputs: Antartica Brazil Cat ...
4.0 Since Bash 4.0, another operator ;;& was introduced which also provides fall through only if the patterns in subsequent case statement(s), if any, match. #!/bin/bash var=abc case $var in a*) echo "Antartica" ;;& xyz) echo "Brazil" ;;& *b*) ...

Page 140 of 269