-
You can use an unlimited number of Swift files in a target if you set the build setting
USE_SWIFT_RESPONSE_FILE
toYES
. (35879960) -
Object detection and text classification templates are available in Create ML, joining the image classification and sound classification templates. Use these templates starting with macOS 10.15 beta 3. (52009035)
-
You can now classify sounds live directly from the microphone using Sound Classification preview. (52131594)
-
The view debugger now shows the names of
NSImage
instances in the inspector. (35516797)
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
/*{ | |
"author": "Ted Bradley", | |
"targets": ["omnifocus"], | |
"type": "action", | |
"identifier": "com.tedbradley.Move to DT", | |
"version": "0.1", | |
"description": "Moves the current task to the DevonThink global inbox", | |
"label": "Move to DT", | |
"mediumLabel": "Move to DevonThink", | |
"paletteLabel": "Move to DT", |
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 | |
// Version 1 | |
struct Version: Codable { | |
let name: String | |
} | |
// This is a compacted JSON string of version 1 | |
let encoded = try! JSONEncoder().encode(Version1(name: "Hello")) |
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 | |
import CoreMedia | |
// CMTimeScale is a typealias for Int32 | |
enum Flicks { | |
static let timescale = CMTimeScale(integerLiteral: 705600000) | |
} | |
// CMTime is used throughout AVFoundation & other media APIs | |
extension CMTime { |
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 | |
import RxSwift | |
import RxCocoa | |
class ImageCache { | |
static let sharedInstance = ImageCache() | |
private let observableCache = NSCache() | |
private let imageCache = NSCache() |
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
extension NSInputStream | |
{ | |
public func readString(bufferSize: Int = 4096) -> String { | |
guard let data = NSMutableData(capacity: bufferSize) else { return "" } | |
let buffer = UnsafeMutablePointer<UInt8>.alloc(bufferSize) | |
var bytesRead = 0 | |
repeat { | |
bytesRead = read(buffer, maxLength: bufferSize) | |
data.appendBytes(buffer, length: bytesRead) |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
protocol Foo { | |
} | |
protocol Bar { | |
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
NSThread.callStackSymbols().reduce("") { "\($0)\n\($1 as! String)" } |
NewerOlder