Tutorial by Examples: ti

Detailed instructions on getting facebook set up or installed.
NSLog(@"%s %@",__FUNCTION__, @"etc etc"); Inserts the class and method name into the output: 2016-07-22 12:51:30.099 loggingExample[18132:2971471] -[ViewController viewDidLoad] etc etc
In Prolog, custom operators can be defined using op/3: op(+Precedence, +Type, :Operator) Declares Operator to be an operator of a Type with a Precedence. Operator can also be a list of names in which case all elements of the list are declared to be identical operators. Precedence is an in...
vagrant up --provider vmware_workstation
Instead of the usual loosely typed: @Html.ActionLink("Log in", "UserController", "LogIn") You can now make action links strongly typed: @Html.ActionLink("Log in", @typeof(UserController), @nameof(UserController.LogIn)) Now if you want to refactor your ...
Make sure you have ruby installed before installing rubygems, and then: Installing RubyGems Using apt-get on Ubuntu sudo apt-get install rubygems Installing RubyGems Using yum sudo yum install rubygems Manual Installation Method wget https://rubygems.org/rubygems/rubygems-2.6.6.tgz tar xv...
Generates a storable representation of a value. This is useful for storing or passing PHP values around without losing their type and structure. To make the serialized string into a PHP value again, use unserialize(). Serializing a string $string = "Hello world"; echo serialize($s...
Add the following line to ViewDidLoad method: print(Realm.Configuration.defaultConfiguration.fileURL!) The line above will print the location to Xcode's console. Copy the file path, go to Finder → Go → Go to Folder... (or ⌘+⇧+G)→ paste the path and hit Go.
Log the realm file location using: NSLog(@"%@",[RLMRealmConfiguration defaultConfiguration].fileURL); The line above will print the location to Xcode's console. Copy the file path, go to Finder → Go → Go to Folder... (or ⌘+⇧+G)→ paste the path and hit Go.
If you use a prvalue expression to copy initialize a variable, and that variable has the same type as the prvalue expression, then the copying can be elided. std::string str = std::string("foo"); Copy initialization effectively transforms this into std::string str("foo"); (th...
Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Microsoft page Serialization The following example demonstrates Serialization in WCF: [ServiceContract(Namespace="http://Microsoft.Ser...
The partial function creates partial function application from another function. It is used to bind values to some of the function's arguments (or keyword arguments) and produce a callable without the already defined arguments. >>> from functools import partial >>> unhex = partia...
public class Foo { private const int TASK_ITERATION_DELAY_MS = 1000; private CancellationTokenSource _cts; public Foo() { this._cts = new CancellationTokenSource(); } public void StartExecution() { Task.Factory.StartNew(this.OwnCodeCancelable...
public class Foo { private CancellationTokenSource _cts; public Foo() { this._cts = new CancellationTokenSource(); } public void StartExecution() { Task.Factory.StartNew(this.OwnCodeCancelableTask, this._cts.Token); } public void Cance...
Lubridate provides ymd() series of functions for parsing character strings into dates. The letters y, m, and d correspond to the year, month, and day elements of a date-time. mdy("07-21-2016") # Returns Date ## [1] "2016-07-21" mdy("07-21-2016", t...
date <- now() date ## "2016-07-22 03:42:35 IST" year(date) ## 2016 minute(date) ## 42 wday(date, label = T, abbr = T) # [1] Fri # Levels: Sun < Mon < Tues < Wed < Thurs < Fri < Sat day(date) <- 31 ## "2016-07-31 03:42:35 IST" # If an ...
Intervals are simplest way of recording timespans in lubridate. An interval is a span of time that occurs between two specific instants. # create interval by substracting two instants today_start <- ymd_hms("2016-07-22 12-00-00", tz="IST") today_start ## [1] "2016-07-...
Unlike durations, periods can be used to accurately model clock times without knowing when events such as leap seconds, leap days, and DST changes occur. start_2012 <- ymd_hms("2012-01-01 12:00:00") ## [1] "2012-01-01 12:00:00 UTC" # period() considers leap year calculati...
with_tz returns a date-time as it would appear in a different time zone. nyc_time <- now("America/New_York") nyc_time ## [1] "2016-07-22 05:49:08 EDT" # corresponding Europe/Moscow time with_tz(nyc_time, tzone = "Europe/Moscow") ## [1] "2016-07-22 12:49:...
Using Homebrew Prerequisites: Make sure you're on OS X 10.9 (Mavericks) or above, and have Homebrew installed. Run the following in your terminal: brew update && brew install rethinkdb Compile from source Building RethinkDB from source requires OS X 10.9 (Mavericks) or greater. Xcode...

Page 120 of 505