(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.
extension Dictionary { | |
/** | |
Create a `Dictionary<Key, Pair>` from the provided `Sequence` of tuples | |
- parameter pairs: The `Sequence` of tuples used to create the `Dictionary<Key, Pair>` | |
*/ | |
init(pairs: [(Key, Value)]) { | |
var result = Dictionary<Key, Value>(minimumCapacity: pairs.count) | |
for (key, value) in pairs { | |
result[key] = value |
// | |
// PaginationNetworkLogic.swift | |
// | |
// Created by Daniel Tartaglia on 4/9/17. | |
// Copyright © 2019 Daniel Tartaglia. MIT License | |
// | |
import RxSwift | |
struct PaginationUISource { |
import Fluent | |
func fetchChildren<Parent, ParentID, Child: Model, Result>( | |
of parents: [Parent], | |
idKey: KeyPath<Parent, ParentID?>, | |
via reference: KeyPath<Child, ParentID>, | |
on conn: DatabaseConnectable, | |
combining: @escaping (Parent, [Child]) -> Result) -> Future<[Result]> where ParentID: Hashable & Encodable { | |
let parentIDs = parents.compactMap { $0[keyPath: idKey] } | |
let children = Child.query(on: conn) |
There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket
You may use the same computer for work and personal development and need to separate your work.
When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.
You may have different projects you're working on where you would like to segregate your access.
/*: | |
This is a concept re-implementation of the @Binding and @State property wrappers from SwiftUI | |
The only purpose of this code is to implement those wrappers myself | |
just to understand how they work internally and why they are needed, | |
⚠️ This is not supposed to be a reference implementation nor cover all | |
subtleties of the real Binding and State types. | |
The only purpose of this playground is to show how re-implementing | |
them myself has helped me understand the whole thing better |
At WWDC 2019 Apple released some videos directly online, with no corresponding live session. This is a list of those videos with links to the video pages.
Some sessions were presented during WWDC but then split into multiple videos when posted online. This list includes the online versions, since they don't appear in the WWDC schedule. For example WWDC included session 711, "Introducing Combine and Advances in Foundation". This was split into two online videos-- 722, "Introducing Combine", and 723, "Advances in Foundation". Both 722 and 723 are included here.
extension UIHostingController { | |
convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
self.init(rootView: rootView) | |
if ignoreSafeArea { | |
disableSafeArea() | |
} | |
} | |
func disableSafeArea() { |