Tutorial by Examples: ti

Introduction Maps stores key/value pairs, where each key has an associated value. Given a particular key, the map can look up the associated value very quickly. Maps, also known as associate array, is an object that stores the data in form of keys and values. In Java, maps are represented using Ma...
To comment on power scripts by prepending the line using the # (hash) symbol # This is a comment in powershell Get-ChildItem You can also have multi-line comments using <# and #> at the beginning and end of the comment respectively. <# This is a multi-line comment #> Get-Chil...
trigger MyTrigger on SomeObject__c (after insert, after update) { if (Trigger.isAfter && Trigger.isInsert) { System.debug('The following records were inserted: '); for (SomeObject__c o : Trigger.new) { System.debug(o.Name); } } else if (Trigg...
To ensure that all possible items are documented, you can use the missing_docs link to receive warnings/errors from the compiler. To receive warnings library-wide, place this attribute in your lib.rs file: #![warn(missing_docs)] You can also receive errors for missing documentation with this lin...
Rust provides two types of documentation comments: inner documentation comments and outer documentation comments. Examples of each are provided below. Inner Documentation Comments mod foo { //! Inner documentation comments go *inside* an item (e.g. a module or a //! struct). They use th...
/// In documentation comments, you may use **Markdown**. /// This includes `backticks` for code, *italics* and **bold**. /// You can add headers in your documentation, like this: /// # Notes /// `Foo` is unsuitable for snafucating. Use `Bar` instead. struct Foo { ... } /// It is cons...
Code in documentation comments will automatically be executed by cargo test. These are known as "documentation tests", and help to ensure that your examples work and will not mislead users of your crate. You can import relative from the crate root (as if there were a hidden extern crate ...
Vaadin plug-in for eclipse provides a quick way to build vaadin project with Apache Ivy dependency manager. Vaadin's documentation explains how to create vaadin project with the help of Eclipse plugin. To install the plug-in just go to eclipse marketplace and search vaadin. Current version of the p...
When assigning to a single object, a query that returns anything other than a single row will throw a QueryException. try { Account a = [SELECT Id FROM Account WHERE Name = 'Non-existent Account']; } catch (QueryException e) { // List has no rows for assignment to SObject } try { ...
In Ruby, strings can be left-justified, right-justified or centered To left-justify string, use the ljust method. This takes in two parameters, an integer representing the number of characters of the new string and a string, representing the pattern to be filled. If the integer is greater than th...
An array is a data structure that stores values of same data type. In Python, this is the main difference between arrays and lists. While python lists can contain values corresponding to different data types, arrays in python can only contain values corresponding to same data type. In this tutorial...
Intent: Separate the construction of a complex object from its representation so that the same construction process can create different representations Builder pattern is useful when you have few mandatory attributes and many optional attributes to construct a object. To create an object with dif...
Template method pattern is a behavioral design pattern that defines the program skeleton of an algorithm in an operation, defering some steps to subclasses. Structure: Key notes: Template method uses Inheritance The Template method implemented by the base class should not be overridden. In t...
Often you will want to perform asynchronous operations in parallel. There is direct syntax that supports this in the async/await proposal, but since await will wait for a promise, you can wrap multiple promises together in Promise.all to wait for them: // Not in parallel async function getFriend...
entry = tk.Entry(parent, width=10) entry.insert(0, "Hello, World!")
The value of an entry widget can be obtained with the get method of the widget: name_entry = tk.Entry(parent) ... name = name_entry.get() Optionally, you may associate an instance of a StringVar, and retrieve the value from the StringVar rather than from the widget: name_var = tk.StringVar() ...
Since Java lambdas are closures, they can "capture" the values of variables in the enclosing lexical scope. While not all lambdas capture anything -- simple lambdas like s -> s.length() capture nothing and are called stateless -- capturing lambdas require a temporary object to hold the...
<?php use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; class TestController extends Controller { //Inject Request HTTP Component in your function then able to exploit it public function myFunctionAction(Request $request) {...
Download: To set up WebSphere Liberty, download the latest zip from WASdev.net. Layout: Once you have the zip, extract it to any location on your file system. The basic layout of a Liberty install is the following: wlp/ # WLP_INSTALL_DIR bin/ # location of scrip...
Swift 2 import UIKit extension UIDevice { var modelName: String { var systemInfo = utsname() uname(&systemInfo) let machineMirror = Mirror(reflecting: systemInfo.machine) let identifier = machineMirror.children.reduce("") { identifier, ele...

Page 249 of 505