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
struct Regex { | |
let pattern: String | |
let options: NSRegularExpressionOptions! | |
private var matcher: NSRegularExpression { | |
return NSRegularExpression(pattern: self.pattern, options: self.options, error: nil) | |
} | |
init(pattern: String, options: NSRegularExpressionOptions = nil) { | |
self.pattern = pattern |
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
require 'benchmark' | |
require 'tmpdir' | |
require 'json' | |
include Benchmark | |
namespace :benchmark do | |
task all: %i[full_clone shallow_clone curl_unzip] | |
task full_clone: ['packages.json'] do |
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 ContactTracing | |
extension CTExposureDetectionSession { | |
func addPositiveDiagnosisKeys(batching keys: [CTDailyTracingKey], completion: CTErrorHandler) { | |
if keys.isEmpty { | |
completion(nil) | |
} else { | |
let cursor = keys.index(keys.startIndex, offsetBy: maxKeyCount, limitedBy: keys.endIndex) ?? keys.endIndex | |
let batch = Array(keys.prefix(upTo: cursor)) | |
let remaining = Array(keys.suffix(from: cursor)) |
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
{ | |
"/Users/mattt/Desktop/Alamofire.swift" : { | |
"deinitializers" : [], | |
"functions" : [ | |
{ | |
"declaration" : { | |
"name" : "request", | |
"genericRequirements" : [], | |
"signature" : { | |
"output" : "DataRequest", |
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
@font-face { | |
font-family: "Creative Commons Symbols"; | |
src: url(font_path("CreativeCommonsSymbols.woff2")) format("woff2"), | |
url(font_path("CreativeCommonsSymbols.woff")) format("woff"); | |
font-weight: normal; | |
font-style: normal; | |
unicode-range: U+1F10D-1F10F, U+1F16D-1F16F; | |
} | |
i { |
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
NS_INLINE NSRange NSRangeMake(NSUInteger loc, NSUInteger len) { | |
return NSMakeRange(loc, len); | |
} | |
NS_INLINE NSUInteger NSRangeMax(NSRange range) { | |
return NSMaxRange(range); | |
} | |
NS_INLINE BOOL NSRangeContainsLocation(NSUInteger loc, NSRange range) { | |
return NSLocationInRange(loc, range); |
This file has been truncated, but you can view the full file.
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
{ | |
"files" : [ | |
{ | |
"enumerations" : [ | |
{ | |
"documentation" : [], | |
"declaration" : { | |
"attributes" : [], | |
"modifiers" : [ | |
{ |
This file has been truncated, but you can view the full file.
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
"https://developer.apple.com/documentation/accelerate/vimagecvimageformat/chromasiting/3241430" | |
"https://developer.apple.com/documentation/accelerate/vdsp/dcttransformtype/3240713" | |
"https://developer.apple.com/documentation/accelerate/vdsp/dfttransformtype/3240728" | |
"https://developer.apple.com/documentation/accelerate/vimage/error/3241360" | |
"https://developer.apple.com/documentation/accelerate/quadrature/error/3240672" | |
"https://developer.apple.com/documentation/accelerate/vimagecvimageformat/format/3241442" | |
"https://developer.apple.com/documentation/accelerate/vdsp/fouriertransformdirection/3240744" | |
"https://developer.apple.com/documentation/accelerate/vdsp/integrationrule/3240753" | |
"https://developer.apple.com/documentation/accelerate/vimage/options/3241388" | |
"https://developer.apple.com/documentation/accelerate/vdsp/radix/3240761" |
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 Darwin | |
extension Int { | |
static func random() -> Int { | |
return Int(arc4random()) | |
} | |
static func random(range: Range<Int>) -> Int { | |
return Int(arc4random_uniform(UInt32(range.endIndex - range.startIndex))) + range.startIndex | |
} |
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
public struct BoundedSequence<Base>: Sequence, IteratorProtocol where Base: Sequence { | |
public struct Boundary: Equatable { | |
public let isStart: Bool | |
public let isEnd: Bool | |
} | |
private var _iterator: Base.Iterator | |
private var _previous: Base.Element? | |
private var _current: Base.Element? | |
private var _next: Base.Element? |