The below article will cover the intricacies of setting up databases and heroku in respect to a flask app. This is more like a memo and will have out of sequence instructions or solutions to errors so read thoroughly.
You'll need the packages
| import UIKit | |
| public extension UIColor { | |
| var components: (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) { | |
| var red: CGFloat = 0 | |
| var green: CGFloat = 0 | |
| var blue: CGFloat = 0 | |
| var alpha: CGFloat = 0 |
| import Foundation | |
| // Diff values for better test assertions. | |
| // | |
| // Enums and collections left as an exercise for the reader. | |
| // A difference between two values | |
| struct Difference: CustomStringConvertible { | |
| let path: String | |
| let actual: String |
| // | |
| // ContentView.swift | |
| // AnimationTimingCurve | |
| // | |
| // Created by Chris Eidhof on 25.09.19. | |
| // Copyright © 2019 Chris Eidhof. All rights reserved. | |
| // | |
| import SwiftUI |
| import UIKit | |
| // Based on https://www.stephanboyer.com/post/132/what-are-covariance-and-contravariance | |
| // > Denotes "a subtype of" | |
| // UIButton > UIView > UIResponder > NSObject | |
| // | |
| // e.g. `UIButton` is a subtype of `UIView` | |
| // | |
| // This means that any function that takes a `UIView`, can receive a `UIButton`: | |
| // |
The below article will cover the intricacies of setting up databases and heroku in respect to a flask app. This is more like a memo and will have out of sequence instructions or solutions to errors so read thoroughly.
You'll need the packages
| import UIKit | |
| import Rswift | |
| struct NibResource: NibResourceType { | |
| let name: String | |
| let bundle: NSBundle | |
| init(name: String, bundle: NSBundle = NSBundle.mainBundle()) { | |
| self.name = name | |
| self.bundle = bundle |
| // | |
| // Signal+Extensions.swift | |
| // Khan Academy | |
| // | |
| // Created by Nacho Soto on 10/1/15. | |
| // Copyright © 2015 Khan Academy. All rights reserved. | |
| // | |
| import ReactiveCocoa |
| // In languages like Python and Haskell, we can write list comprehension syntax like | |
| // super simply to generate complex lists. Below, for example, we find all numbers that are | |
| // the product of two sides of a triangle. | |
| // [a * b | a <- [1..10], b <- [1..10], c <- [1..10], a * a + b * b == c * c] | |
| // Why is this called nondeterministic computation? Because we essentially try ALL possible combinations | |
| // of these values (a,b) and--you can imagine--run them all simultanously and get the result that matches the predicate. | |
| // Now, obviously, this doesn't all happen at the same time, but that's the idea behind the nondeterminism. | |
| // Let's examine how we can get a similiar result in Swift! We'll start super simple and work |