Author: Chris Lattner
This file contains 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
// | |
// NSPersistentContainer+extension.swift | |
// CDMoveDemo | |
// | |
// Created by Tom Harrington on 5/12/20. | |
// Copyright © 2020 Atomic Bird LLC. All rights reserved. | |
// | |
import Foundation | |
import CoreData |
This file contains 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
import RxSwift | |
func count(from: Int, to: Int, quickStart: Bool) -> Observable<Int> { | |
return Observable<Int> | |
.timer(quickStart ? 0 : 1, period: 1, scheduler: MainScheduler.instance) | |
.take(from - to + 1) | |
.map { from - $0 } | |
} |
This file contains 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
// | |
// RealmSwift+Codable.swift | |
// | |
// Created by Michael Gray on 8/16/17. | |
// | |
import Foundation | |
import RealmSwift | |
// swiftlint:disable line_length identifier_name |
This file contains 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
import Foundation | |
public class CoRoutine<T> { | |
private var index = 0 | |
private var sequence : [T] | |
private var routine : (T)->() | |
private let step : Int? | |
private let deltaTime : TimeInterval? | |
private(set) public var isCanceled : Bool = false | |
private(set) public var isDone : Bool = false |
This file contains 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
import AppKit | |
public extension NSBezierPath { | |
public convenience init(path: CGPath) { | |
self.init() | |
let pathPtr = UnsafeMutablePointer<NSBezierPath>.alloc(1) | |
pathPtr.initialize(self) | |