Author: Chris Lattner
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
// Type-safe date format strings using string interpolation | |
// Requires Swift 5.0. | |
import Foundation | |
enum DateFormatComponent { | |
case era(AlphaStyle) | |
case year(MinimumDigits) | |
case yearForWeekOfYear(MinimumDigits) | |
case quarter(AlphaNumericStyle) |
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
protocol StackType { | |
typealias Element | |
mutating func push(element: Element) | |
mutating func pop() -> Element? | |
} | |
final class BufferStorage<Element> { | |
private var ptr: UnsafeMutablePointer<Element> | |
private let capacity: Int |
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
// | |
// RSASHA1.swift | |
// | |
// Copyright (c) 2015 Neil Cowburn. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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
/* | |
* Test | |
*/ | |
function test(title, f, options) { | |
if (options == null) { | |
options = { | |
logTree: true | |
}; | |
} |