(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Debounce a function when you want it to execute only once after a defined interval of time. If the event occurs multiple times within the interval, the interval is reset each time.
Example A user is typing into an input field and you want to execute a function, such as a call to the server, only when the user stops typing for a certain interval, such as 500ms.
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"
I hereby claim:
To claim this, I am signing this object:
This document is published in the style of a "Swift evolution manifesto", outlining a long-term view of how to tackle a very large problem. It explores one possible approach to adding a first-class concurrency model to Swift, in an effort to catalyze positive discussion that leads us to a best-possible design. As such, it isn't an approved or finalized design
func testOrdinaryCase() { | |
let input = "Linearity is the property of a mathematical relationship or function which means that it can be graphically represented as a straight line. Examples are the relationship of voltage and current across a resistor, or the mass and weight of an object." | |
let expected = ["1/6 Linearity is the property of a mathematical", | |
"2/6 relationship or function which means that it", | |
"3/6 can be graphically represented as a straight", | |
"4/6 line. Examples are the relationship of voltage", | |
"5/6 and current across a resistor, or the mass and", | |
"6/6 weight of an object."] | |
let output = Utils.split(input, limit: limit) |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
// Network service | |
// + Support plugins. For instance, Logger, Credential and NetworkActivity | |
// + Support Caching |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
// ----------------------- | |
// User obj | |
// + JSON decode | |
// + Transform to NSManagedObject |
public enum GitHub { | |
case zen | |
case userProfile(String) | |
case userRepositories(String) | |
} | |
extension GitHub: TargetType { | |
public var baseURL: URL { return URL(string: "https://api.github.com")! } | |
public var path: String { | |
switch self { |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
struct VehicleCheck { | |
let sections: [Section] | |
} |