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 Accelerate | |
/// This object provides easy color sampling of the `capturedImage` property of an ARFrame. | |
/// | |
/// - Warning: This class is NOT thread safe. The `rawRGBBuffer` property is shared between instances | |
/// and will cause a lot of headaches if 2 instances try to simultaneously access it. | |
/// If you need multi-threading, make the shared buffer an instance property instead. | |
/// Just remember to release it when you're done with it. | |
class CapturedImageSampler { |
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 SwiftUI | |
struct Item: Identifiable { | |
let id: String | |
} | |
struct ContentView : View { | |
@State var item: Item? = nil | |
var body: some View { |
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
App Store Connect: Version (.+?) \((.+?)\) for (.+?) has completed processing.$ |
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
let unified = "0023-FE0F-20E3" | |
var emoji = unified | |
.split(separator: "-") | |
.compactMap { Int($0, radix: 16) } | |
.compactMap { Unicode.Scalar($0) } | |
.reduce(into: "", { $0.append(String($1)) }) |
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
// | |
// ViewController.swift | |
// ViperAsyncIssue | |
// | |
// Created by Tomoya Hirano on 2019/09/27. | |
// Copyright © 2019 Tomoya Hirano. All rights reserved. | |
// | |
import UIKit |
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 RootViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.backgroundColor = .red | |
} | |
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { | |
let vc = ViewController.make() | |
present(vc, animated: true, completion: nil) |
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 | |
import SwiftSoup | |
let base = "https://developer.apple.com" | |
func getURL(from url: String, viewBox: String) -> [String] { | |
let url = URL(string: url)! | |
let data = try! Data(contentsOf: url) | |
let doc: Document = try! SwiftSoup.parse(String(data: data, encoding: .utf8)!) | |
let taskTopics = try! doc.select("div").filter({ $0.hasClass("task-topic") }) |
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
▿ Swift.AnyCollection<(label: Swift.Optional<Swift.String>, value: Any)> | |
▿ _box: Swift._CollectionBox<Swift.LazyMapCollection<Swift.Set<__C.NSObject>, (label: Swift.Optional<Swift.String>, value: Any)>> #0 | |
▿ super: Swift._AnyCollectionBox<(label: Swift.Optional<Swift.String>, value: Any)> | |
- super: Swift._AnySequenceBox<(label: Swift.Optional<Swift.String>, value: Any)> | |
▿ _startIndex: Swift._IndexBox<Swift.Set<__C.NSObject>.Index> #1 | |
▿ _base: Swift.Set<__C.NSObject>.Index | |
▿ _value: Swift.SetIndexRepresentation<__C.NSObject>._cocoa | |
▿ _cocoa: Swift._CocoaSetIndex | |
▿ cocoaSet: 8 members #2 |
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
enum UnZipPolicy { | |
case none | |
case unzip(isRemoveSrc: Bool) | |
} | |
let manager = Manager() | |
manager.maxConcurrentTasksCount = 4 | |
manager.timeout = 150 | |
manager.automaticallyUnzip = .unzip(isRemoveSrc: true) | |