This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
At ----, we aim to find the best messaging that will motivate the patient to engage with us. | |
You have two lists of data: | |
A list of bill notification messages sent to patients. | |
Each message has the following properties: patient_id, channel_type, timestamp | |
channel_type can be "text", "email", "paper mail", or another channels for contacting patients. | |
A list of payments that ---- received from patients. | |
Each message has the following properties: patient_id, payment_amount, timestamp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
var str1 = "Hello, playground 💩" | |
var str2 = "Hello, playground" | |
func validate(ascii string: String?) -> Bool { | |
if let str = string where str.characters.count > 0 { | |
for char in str.characters { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSObject+NSCoding.swift | |
// | |
// Created by Andrew Sowers on 6/8/16. | |
// | |
// | |
import Foundation | |
public extension NSObject { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
import XCPlayground // we import this so we can get the main XCPlayground "page" | |
//create instance of current playground page | |
let page = XCPlayground.XCPlaygroundPage | |
func myCoolFunctionWithCompletion(input: String, completion: (result: String) -> Void) { | |
print("\(input) ... ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Lazy load view controller example | |
*/ | |
class MainViewController: UIViewController { | |
lazy var firstViewController: FirstViewController = { | |
return self.storyboard!.instantiateViewControllerWithIdentifier("FirstViewController") as! FirstViewController | |
}() | |
lazy var secondViewController: SecondViewController = { |