Tutorial by Examples: ti

Multi-line code comments are wrapped in /* ... */: /* This query returns all employees */ SELECT * FROM Employees It is also possible to insert such a comment into the middle of a line: SELECT /* all columns: */ * FROM Employees
Imports System.Reflection Public Class PropertyExample Public Function GetMyProperties() As PropertyInfo() Dim objProperties As PropertyInfo() objProperties = Me.GetType.GetProperties(BindingFlags.Public Or BindingFlags.Instance) Return objProperties End Fun...
As Handlers are used to send Messages and Runnables to a Thread's message queue it's easy to implement event based communication between multiple Threads. Every Thread that has a Looper is able to receive and process messages. A HandlerThread is a Thread that implements such a Looper, for example th...
Swift NSNotificationCenter.defaultCenter().postNotificationName("TestNotification", object: self) Objective-C [[NSNotificationCenter defaultCenter] postNotificationName:@"TestNotification" object:nil];
Swift let userInfo: [String: AnyObject] = ["someKey": myObject] NSNotificationCenter.defaultCenter().postNotificationName("TestNotification", object: self, userInfo: userInfo) Objective-C NSDictionary *userInfo = [NSDictionary dictionaryWithObject:myObject forKey:@"som...
Swift func testNotification(notification: NSNotification) { let userInfo = notification.userInfo let myObject: MyObject = userInfo["someKey"] } Objective-C - (void)testNotification:(NSNotification *)notification { NSDictionary *userInfo = notification.userInfo; My...
Use Ctrl + C, Ctrl + C to exit iex(1)> BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution Use Ctrl+ \ to immediately exit
iex(1)> i :ok Term :ok Data type Atom Reference modules Atom iex(2)> x = "mystring" "mystring" iex(3)> i x Term "mystring" Data type BitString Byte size 8 Description This is a string: a UTF-8 encoded binary. It's printed surround...
#You can use pattern matching to run different #functions based on which parameters you pass #This example uses pattern matching to start, #run, and end a recursive function defmodule Counter do def count_to do count_to(100, 0) #No argument, init with 100 end def ...
A standard toast notification appears at the bottom of the screen aligned in horizontal centre. You can change this position with the setGravity(int, int, int). This accepts three parameters: a Gravity constant, an x-position offset, and a y-position offset. For example, if you decide that the toas...
p { margin:1px; /* 1px margin in all directions */ /*equals to:*/ margin:1px 1px; /*equals to:*/ margin:1px 1px 1px; /*equals to:*/ margin:1px 1px 1px 1px; } Another exapmle: p{ margin:10px 15px; /...
Ember CLI allows you to use one of two options to generate a new app: Create a folder and run ember init (generates application structure and sets up git and makes your first commit) Run ember new <app name> (creates a folder with the specified name, steps into it and runs ember init) O...
Maps are the Elixir key-value (also called dictionary or hash in other languages) type. You create a map using the %w{} syntax: %{} // creates an empty map %{:a => 1, :b => 2} // creates a non-empty map Keys and values can use be any type: %{"a" => 1, "b" => 2} ...
This is useful when you didn't store the PID from a previous command iex(1)> self() #PID<0.138.0> iex(2)> pid("0.138.0") #PID<0.138.0> iex(3)> pid(0, 138, 0) #PID<0.138.0>
Users can add formatting to contenteditable documents or elements using their browser's features, such as common keyboard shortcuts for formatting (Ctrl-B for bold, Ctrl-I for italic, etc.) or by dragging and dropping images, links, or markup from the clipboard. Additionally, developers can use Jav...
package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; public class Main extends Sprite { //Document Class Main Constructor public function Main() { ...
Express JS is the goto framework for developing Web Applications, APIs and almost any kind of Backend using Node. To install express, all you have to do is run the npm command npm install express --save And you're done. To create and run a new express server create a file app.js and add this ...
Detailed instructions on getting mapbox set up or installed.
A Hash includes the Enumerable module, which provides several iteration methods, such as: Enumerable#each, Enumerable#each_pair, Enumerable#each_key, and Enumerable#each_value. .each and .each_pair iterate over each key-value pair: h = { "first_name" => "John", "last_na...
SELECT e.Fname, e.LName FROM Employees e The Employees table is given the alias 'e' directly after the table name. This helps remove ambiguity in scenarios where multiple tables have the same field name and you need to be specific as to which table you want to return data from. SELECT e.Fname,...

Page 77 of 505