Tutorial by Examples

XSD, XML Schema Definition, is a language which describes the structure of XML documents. XSD files can be used to validate an XML file. The process of doing this will depend on what you choose to implement it with. Care should be taken to ensure the validation engine you use is compatible with the ...
In HTTP 1.1, a minimal HTTP request consists of a request line and a Host header: GET /search HTTP/1.1 \r\n Host: google.com \r\n \r\n The first line has this format: Method Request-URI HTTP-Version CRLF Method should be a valid HTTP method; one of [1][2]: OPTIONS GET HEAD POST PUT ...
Header fields (usually just called ‘headers’) may be added to an HTTP request to provide additional information with the request. A header has semantics similar to parameters passed to a method in any programming language that supports such things. A request with Host, User-Agent and Referer header...
Some HTTP requests may contain a message body. This is additional data that the server will use to process the request. Message bodies are most often used in POST or PATCH and PUT requests, to provide new data that the server should apply to a resource. Requests that include a message body should a...
On CLiki, a Wiki for Common Lisp and free Common Lisp software, a list of Proposed ANSI Revisions and Clarifications is being maintained. Since the Common Lisp standard has not changed since 1994, users have found several problems with the specification document. These are documented on the CLiki p...
The split-sequence library provides a function split-sequence, which allows to split on elements of a sequence (split-sequence:split-sequence #\Space "John Doe II") ;; => ("John" "Doe" "II")
From the official documentation: If you want to get advanced, you can also open up the project file for a specific platform by opening the required XCode or Android Eclipse project in platforms/PLATFORM inside the root of your project. Then, you can build and test from inside the platform-specifi...
There are several good examples of using lambdas as a FunctionalInterface in simple scenarios. A fairly common use case that can be improved by lambdas is what is called the Execute-Around pattern. In this pattern, you have a set of standard setup/teardown code that is needed for multiple scenarios ...
This example uses a push button (tact switch) attached to digital pin 2 and GND, using an internal pull-up resistor so pin 2 is HIGH when the button is not pressed. const int LED_PIN = 13; const int INTERRUPT_PIN = 2; volatile bool ledState = LOW; void setup() { pinMode(LED_PIN, OUTPUT); ...
When to use Virtually all WPF controls make heavy use of dependency properties. A dependency property allows for the use of many WPF features that are not possible with standard CLR properties alone, including but not limited to support for styles, animations, data binding, value inheritance, and c...
When to use An attached property is a dependency property that can be applied to any DependencyObject to enhance the behavior of various controls or services that are aware of the property's existence. Some use cases for attached properties include: Having a parent element iterate through its c...
When to use A read-only dependency property is similar to a normal dependency property, but it is structured to not allow having its value set from outside the control. This works well if you have a property that is purely informational for consumers, e.g. IsMouseOver or IsKeyboardFocusWithin. How...
implode() combines all the array values but looses all the key info: $arr = ['a' => "AA", 'b' => "BB", 'c' => "CC"]; echo implode(" ", $arr); // AA BB CC Imploding keys can be done using array_keys() call: $arr = ['a' => "AA", 'b'...
Generic parameters can also be bound to more than one type using the T extends Type1 & Type2 & ... syntax. Let's say you want to create a class whose Generic type should implement both Flushable and Closeable, you can write class ExampleClass<T extends Flushable & Closeable> { }...
These macros merge control flow and binding. They are an improvement over anaphoric anaphoric macros because they let the developer communicate meaning through naming. As such their use is recommended over their anaphoric counterparts. (if-let (user (get-user user-id)) (show-dashboard user) (...
JSON (JavaScript Object Notation) syntax is based on a subset of JavaScript (see also json.org). A valid JSON expression can be one of the following data types simple data types: String, Number, Boolean, Null composite data types: Value, Object, Array Simple data types A JSON string has to ...
c++03 The Rule of Three states that if a type ever needs to have a user-defined copy constructor, copy assignment operator, or destructor, then it must have all three. The reason for the rule is that a class which needs any of the three manages some resource (file handles, dynamically allocated me...
A JSON Object is surrounded by curly braces and contains key-value pairs. { "key1": "value1", "key2": "value2", ... } Keys must be valid strings, thus surrounded by double quotation marks. Values can be JSON objects, numbers, strings, arrays, or one of the...
Html <img id="cats"></img> Dart import 'dart:html'; /// Stores the image in [blob] in the [ImageElement] of the given [selector]. void setImage(selector, blob) { FileReader reader = new FileReader(); reader.onLoad.listen((fe) { ImageElement image = document...
To prompt for credentials, you should almost always use the Get-Credential cmdlet: $credential = Get-Credential Pre-filled user name: $credential = Get-Credential -UserName 'myUser' Add a custom prompt message: $credential = Get-Credential -Message 'Please enter your company email address a...

Page 375 of 1336