- Proposal: SE-nnnnnnnn
- Authors: Erica Sadun, Nate Cook
- Review Manager: TBD
- Status: Awaiting implementation
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
| extension Task where Success == Never, Failure == Never { | |
| /// Suspends the current task for at least the given duration in seconds. | |
| /// Throws if the task is cancelled while suspended. | |
| /// - Parameter seconds: The sleep duration in seconds. | |
| static func sleep(seconds: TimeInterval) async throws { | |
| try await Task.sleep(nanoseconds: UInt64(seconds * 1_000_000_000)) | |
| } | |
| } |
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
| // | |
| // PagingList.swift | |
| // | |
| // Created by Sriram Manian on 6/17/19. | |
| // Copyright © 2019 Sriram Manian. All rights reserved. | |
| // | |
| import SwiftUI | |
| import Combine |
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
| @DynamicColor(lightVariant: .black, darkVariant: .white) | |
| static var dynamicLabelColor: UIColor | |
| @propertyWrapper | |
| struct DynamicColor { | |
| let lightVariant: UIColor | |
| let darkVariant: UIColor | |
| var wrappedValue: UIColor { | |
| get { |
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
| import Foundation | |
| struct EquatableValueSequence<T: Equatable> { | |
| static func ==(lhs: EquatableValueSequence<T>, rhs: T) -> Bool { | |
| return lhs.values.contains(rhs) | |
| } | |
| static func ==(lhs: T, rhs: EquatableValueSequence<T>) -> Bool { | |
| return rhs == lhs | |
| } |
Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault :
bash <(curl -Ls http://git.io/eUx7rg)
However, at the time of writing the script is not compatible with OS X El Capitan (10.11)
An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"
Make sure Homebrew has the latest formulae, so run brew update first
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
| class Person { | |
| var name = "" | |
| var age = 0 | |
| init(name: String, age:Int) { | |
| self.name = name | |
| self.age = age | |
| } | |
| } |
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
| the | |
| of | |
| to | |
| and | |
| a | |
| in | |
| is | |
| it | |
| you | |
| that |