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 CGRect { | |
func projecting(_ point: UnitPoint) -> CGPoint { | |
return CGPoint(x: minX + (width * point.x), | |
y: minY + (height * point.y)) | |
} | |
} |
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
AACustomByteStreamOpen | |
AAEntryACLBlob | |
AAEntryXATBlob | |
AAFieldKeySetGetKeyCount | |
AAHeaderGetKeyIndex | |
ABMultiValueGetCount | |
ABPersonViewController | |
ADCommonDefinitions | |
ADErrorAdUnloaded | |
ADErrorLoadingThrottled |
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
// RUN: %empty-directory(%t) | |
// RUN: %target-swift-frontend -emit-module -o %t/Test~partial.swiftmodule -module-name Test -primary-file %s | |
// RUN: %target-swift-frontend -merge-modules -emit-module -o %t/Test.swiftmodule %t/Test~partial.swiftmodule | |
// RUN: %target-swift-ide-test -print-module -module-to-print=Test -source-filename=x -I %t | %FileCheck %s | |
// RUN: %target-swift-frontend -emit-interface-path %t.swiftinterface -enable-resilience -emit-module -o /dev/null %s | |
// RUN: %FileCheck %s < %t.swiftinterface | |
// CHECK: func hasClosureDefaultArg(_ x: () -> Void = { | |
// CHECK-NEXT: }) |
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 | |
extension BinaryInteger { | |
/// Gets the bit at the specified bit index in the receiver, reading from | |
/// least to most-significant bit. | |
/// | |
/// For example, | |
/// ``` | |
/// 0b0010.bit(at: 0) == false | |
/// 0b0010.bit(at: 1) == true |
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 | |
typealias UnsignedIntegralType = UnsignedInteger & ExpressibleByIntegerLiteral | |
struct BitstreamRecord { | |
private(set) var values = [UInt32]() | |
mutating func append<IntType: UnsignedIntegralType>(_ int: IntType) { | |
values.append(UInt32(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 | |
import SwiftSyntax | |
/*: | |
# Syntax Rewriting | |
SwiftSyntax provides a class called `SyntaxRewriter`, which will walk a Syntax tree and | |
perform transformations over the nodes. | |
By default, these transformations don't do anything. It's the subclass's job to |
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 | |
/// `StringScanner` is a fast scanner for Strings and String-like objects. | |
/// It's used to extract structured bits from unstructured strings, while | |
/// avoiding making extra copies of string bits until absolutely necessary. | |
/// You can build Scanners over Substrings, allowing you to scan | |
/// parts of strings and use smaller, more specialized scanners to extract bits | |
/// of that String without needing to reuse another scanner. | |
public struct StringScanner<Input: StringProtocol> { | |
let input: Input |
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
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -module-name NIOOpenSSL -incremental -emit-dependencies -emit-module -emit-module-path /Users/harlan/Code/Swift/WWDC-Photohunt/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.swiftmodule -output-file-map /Users/harlan/Code/Swift/WWDC-Photohunt/.build/x86_64-apple-macosx10.10/debug/NIOOpenSSL.build/output-file-map.json -parse-as-library -num-threads 8 -c /Users/harlan/Code/Swift/WWDC-Photohunt/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/IdentityVerification.swift /Users/harlan/Code/Swift/WWDC-Photohunt/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/OpenSSLClientHandler.swift /Users/harlan/Code/Swift/WWDC-Photohunt/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/OpenSSLHandler.swift /Users/harlan/Code/Swift/WWDC-Photohunt/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/OpenSSLServerHandler.swift /Users/harlan/C |
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 | |
enum Result<Value> { | |
case success(Value) | |
case failure(Error) | |
func promote() throws -> Value { | |
switch self { | |
case .success(let value): | |
return value |
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
#include <Arduino.h> | |
#ifndef ARDUINO_UTILS_H | |
#define ARDUINO_UTILS_H | |
/// DigitalPin is a base class for digital I/O pins. On its own, it just | |
/// declares the data layout -- it's up to subclasses to implement features | |
/// that are specific to input or output. | |
class DigitalPin { | |
protected: |
NewerOlder