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
#!/usr/local/bin/python | |
# coding: utf-8 | |
import cv2 | |
import sys | |
import numpy | |
from matplotlib import pyplot as plt | |
from scipy.spatial import distance | |
""" |
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
(* | |
With a QuickTime file open QuickTime Player, and an OmniOutliner file open that matches the title below, if this is invoked: | |
- If the QT file is playing, it is paused and the current playback speed is recorded (use option-click on the fast forward button to increase playing speed in QuickTime Player) | |
- If there is not a row starting with the right session number, one is created at the top level (with a link back to the QT file) | |
- A new row is added with the current time code and the insertion point to the right of it and OmniOutliner is activated. | |
- Otherwise, playing in the QT file is resumed a couple seconds before the point at which it was paused, with the playback rate restored, and QT is activated | |
- Setup: |
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
(* | |
With a QuickTime file open QuickTime Player, and an OmniOutliner file open that matches the title below, if this is invoked: | |
- If the QT file is playing, it is paused and the current playback speed is recorded (use option-click on the fast forward button to increase playing speed in QuickTime Player) | |
- If there is not a row starting with the right session number, one is created at the top level (with a link back to the QT file) | |
- A new row is added with the current time code and the insertion point to the right of it and OmniOutliner is activated. | |
- Otherwise, playing in the QT file is resumed a couple seconds before the point at which it was paused, with the playback rate restored, and QT is activated | |
- Setup: |
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
// | |
// main.m | |
// DispatchWriteSource | |
// | |
// Created by Timothy J. Wood on 3/27/18. | |
// Copyright © 2018 The Omni Group. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <unistd.h> |
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
/* | |
swift SetPrototype.swift | |
On 10.13.4, the result is 'undefined', but it should be '5'. | |
*/ | |
import Foundation | |
import JavaScriptCore | |
var definition:JSClassDefinition = kJSClassDefinitionEmpty |
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
# Trying to get the fastest incremental build times for small changes to the swift compiler. | |
# This still rebuilds the stdlib on each change to the compiler (no --skip option I see to avoid that). | |
[preset: ios] | |
release | |
debug-swift | |
ios | |
skip-build-ios-simulator | |
skip-test-ios-simulator | |
skip-build-osx | |
skip-test-osx |
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
% ./utils/build-script --release-debuginfo --debug-swift | |
#### hours pass #### | |
% ../build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-macosx-x86_64/bin/swift -sdk /Applications/Xcode-9.1b2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -target arm64-apple-ios11.1 /Users/bungi/Desktop/TransitiveAppExtensionAvailable/Example.swift | |
<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios11.1' |
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
protocol P { | |
static var name: String { get } | |
init(i:Int) | |
} | |
class A: P { | |
static var name: String { | |
get { return "A" } | |
} | |
required init(i:Int) {} |
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 | |
let u = URL(fileURLWithPath: "/tmp/missing-path", isDirectory: true) | |
let d = FileManager.default.enumerator(at:u, includingPropertiesForKeys: nil, errorHandler: {_,_ in return false})! | |
print("d \(d)") // --> d <NSURLDirectoryEnumerator: 0x100a01940> | |
// Crashes, unless the error handler above is replaced with nil | |
for _ in d {} |
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 | |
/* | |
xcrun swift objc-throwing-block.swift | |
objc-throwing-block.swift:20:13: error: method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C | |
@objc func access(accessor: Accessor) {} | |
^ | |
objc-throwing-block.swift:20:30: note: throwing function types cannot be represented in Objective-C |
NewerOlder