label
int64
0
1
text
stringlengths
0
2.8M
0
// // KeychainManager.swift // CoatCode // // Created by 강민석 on 2020/10/05. // Copyright © 2020 MinseokKang. All rights reserved. // import Foundation import KeychainAccess class KeychainManager { static let shared = KeychainManager() fileprivate let usernameKey = "usernameKey" private init() { } ...
0
// // PreviewUI.swift // ReformTools // // Created by Laszlo Korte on 30.08.15. // Copyright © 2015 Laszlo Korte. All rights reserved. // public final class MaskUI { public enum State { case disabled case clip(x: Double, y: Double, width: Double, height: Double) } public var state : St...
0
import Foundation import UIKit /** A view controller that supports interaction to start removing transiton. It works as a wrapper for another view controller or using with subclassing. If you have already implementation of view controller and want to get flexibility, you can use this class as a wrapper. ```swift...
0
import Foundation import MapKit protocol Region { // Internal representation var points:[CLLocationCoordinate2D] { get } var title:String { get } // Map presentation var annotations:[MKAnnotation] { get } var overlays:[MKOverlay] { get } // Serialization func toJSON() -> String st...
0
// // UIColor+TweaksTests.swift // SwiftTweaks // // Created by Bryan Clark on 11/20/15. // Copyright © 2015 Khan Academy. All rights reserved. // import XCTest @testable import SwiftTweaks class UIColor_TweaksTests: XCTestCase { // MARK: Hex-To-Color private struct HexToColorTestCase { let string: String ...
0
// 378. Kth Smallest Element in a Sorted Matrix /** Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is the kth smallest element in the sorted order, not the kth distinct element. Example: matrix = [ [ 1, 5, 9], [...
0
// // FilterViewController.swift // Ookami // // Created by Maka on 22/2/17. // Copyright © 2017 Mikunj Varsani. All rights reserved. // import UIKit import Cartography //A View controller for displaying a list of filters class FilterViewController: UIViewController { //The table view lazy var tableV...
0
// // ViewController.swift // transitions // // Created by Daniel Alpizar on 4/9/21. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func SegueTapped(_ sender: An...
0
// // TLStoryOverlayControlView.swift // TLStoryCamera // // Created by GarryGuo on 2017/5/31. // Copyright © 2017年 GarryGuo. All rights reserved. // import UIKit protocol TLStoryOverlayControlDelegate: NSObjectProtocol { func storyOverlayCameraRecordingStart() func storyOverlayCameraRecordingFinish(type:...
0
// // SettingsTableViewController.swift // WeatherApp // // Created by Suraj Shandil on 7/29/21. // import UIKit class SettingsTableViewController: UITableViewController { @IBOutlet weak var unitsSegment: UISegmentedControl! @IBOutlet weak var mapTypeSegment: UISegmentedControl! @IBOutlet weak var res...
0
// // LogsTool.swift // Baymax // // Created by Simon Mitchell on 01/04/2020. // Copyright © 2020 3 SIDED CUBE. All rights reserved. // import Foundation /// A tool for displaying logs collated using `Logger` objects public class LogsTool: DiagnosticTool { /// Disables or enables Baymax logging publi...
0
// // ViewController.swift // Chambas // // Created by David Velarde on 11/3/16. // Copyright © 2016 Area51. All rights reserved. // import UIKit class ViewController: UIViewController,UITableViewDataSource,UITableViewDelegate { var arrayEmpresas = [Empresa]() var empresaSeleccionada : Empresa? ...
0
// // Character.swift // GOT-Challenge-Swift // // Created by Conrado Mateu Gisbert on 08/03/17. // Copyright © 2017 conradomateu. All rights reserved. // import Foundation @testable import GOT_Challenge_Swift extension GOT_Challenge_Swift.Character: Equatable { } public func == (lhs: GOT_Challenge_Swift.Charact...
0
import Syft enum SongExpressionError: Error { case unknown } protocol SongExpression { func evaluate() -> String } struct SongNumber: SongExpression { let value: Int func evaluate() -> String { return "\(value)" } } //func song() -> Pipeline<SongExpression> { //// let input = "[].len...
0
// // FontMetrics.swift // Capable // // Created by Christoph Wendt on 31.03.18. // import Foundation import UIKit class FontMetrics: FontMetricsProtocol { var osVersionProvider: OsVersionProviderProtocol init() { self.osVersionProvider = OsVersionProvider() } var scaler: CGFloat...
0
// // FunctionalSwiftExampleUITests.swift // FunctionalSwiftExampleUITests // // Created by Daniel Mandea on 06/05/2019. // Copyright © 2019 Daniel Mandea. All rights reserved. // import XCTest class FunctionalSwiftExampleUITests: XCTestCase { override func setUp() { // Put setup code here. This meth...
0
// // RSSItem.swift // SwiftRSS_Example // // Created by Thibaut LE LEVIER on 28/09/2014. // Copyright (c) 2014 Thibaut LE LEVIER. All rights reserved. // import UIKit class RSSItem: NSObject, NSCoding { var title: String? var link: NSURL? func setLink(let linkString: String!) { link ...
0
// // AddItemViewController.swift // ToDoList // // Created by Alex Paul on 1/9/19. // Copyright © 2019 Alex Paul. All rights reserved. // import UIKit class AddItemViewController: UIViewController { @IBOutlet weak var titleTextView: UITextView! @IBOutlet weak var descriptionTextView: UITextView! priv...
0
// // Cache+Switch.swift // George Tsifrikas // // Created by George Tsifrikas on 12/06/2017. // Copyright © 2017 George Tsifrikas. All rights reserved. // import Foundation public enum CacheSwitchResult { /// The first Cache of the switch case cacheA /// The second Cache of the switch case cacheB...
0
// // RegisterViewController.swift // register_login_template // // Created by Sarvad shetty on 1/18/18. // Copyright © 2018 Sarvad shetty. All rights reserved. // import UIKit import Firebase class RegisterViewController: UIViewController { //MARK: Outlets @IBOutlet weak var regButton: UIButton! ...
0
//===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIB...
0
// // Selfinfo.swift // FeedMyFit // // Created by 祁汝鑫 on 2020/8/6. // import Foundation // MARK: - Request // Id=xxxxxxx&Token=xxxxxxx // MARK: - Return struct Selfinfo: Codable { var Phonenumber: String var Avatar: String? var Username: String var Sex: String var Height: Double var...
0
// // StringEx.swift // AppSpawnKey // // Created by TKOxff on 2021/03/14. // import Foundation extension String { // App Name.app -> App Name var splitedAppName : String { let substrings = self.split(separator: ".") return String(substrings.first ?? "") } }
0
// // storage.swift // NebulaeCommission // // Created by Mayur.Patel.653 on 07/07/21. // import Foundation public class Storage{ static let shared = Storage() private let defaults = UserDefaults.standard var notificationToken : String? = nil // func setConnectionMode(cMode :...
0
// // ATHMPurchaseResponse.swift // athmovil-checkout // // Created by Hansy Enrique on 7/19/20. // Copyright © 2020 Evertec. All rights reserved. // import Foundation @objc(ATHMPaymentResponse) final public class ATHMPaymentResponse: NSObject { /// Current payment, it is the same object that the cli...
0
import Foundation import Shared public struct SPM { public struct Package: Decodable { public static func load() throws -> Self { let shell = Shell() let jsonString = try shell.exec(["swift", "package", "describe", "--type", "json"], stderr: false) guard let jsonData = ...
0
// // ViewController.swift // TwilioTest // // Created by fawad on 22/01/2017. // Copyright © 2017 fawad. All rights reserved. // import UIKit import Alamofire class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } @IBAction func availab...
0
import UIKit class GameView: UIView { weak var delegate: GameViewDelegate? init() { super.init(frame: .zero) backgroundColor = UIColor(color: .darkPurple383357) addSubviews() setupLayout() configurePauseButtonAction() configureRestartButtonAction() } r...
0
// // AppDelegate.swift // AppStoreReviews // // Created by Dmitrii Ivanov on 21/07/2020. // Copyright © 2020 ING. All rights reserved. // import Foundation struct Review: Codable { let author: String let version: String let rating: Int let title: String let id: String let content: String ...
0
// // SelectionTypeModule.swift // UsbongKit // // Created by Chris Amanse on 26/05/2016. // Copyright © 2016 Usbong Social Systems, Inc. All rights reserved. // import Foundation /// Protocol for selection type public protocol SelectionTypeModule: Module { var selectedIndices: [Int] { get } func selectIn...
0
// // ChartAxisValuesGeneratorNice.swift // SwiftCharts // // Created by ischuetz on 04/08/16. // Copyright © 2016 ivanschuetz. All rights reserved. // import UIKit open class ChartAxisValuesGeneratorNice: ChartAxisGeneratorMultiplier { open override var first: Double? { return Double(minValue) ...
0
import XCTest @testable import WordPress class DashboardStatsViewModelTests: XCTestCase { func testReturnCorrectDataFromAPIResponse() { // Given let statsData = BlogDashboardRemoteEntity.BlogDashboardStats(views: 1, visitors: 2, likes: 3, comments: 0) let apiResponse = BlogDashboardRemoteE...
0
/// The declaration of a nominal type. public protocol NominalTypeDecl: NamedDecl { /// The semantic type represented by the declaration. var type: BareType? { get } }
0
// // Foundation+Tips.swift // RxTips // // Created by Yu Sugawara on 2019/11/07. // Copyright © 2019 Yu Sugawara. All rights reserved. // import Foundation import Then extension JSONEncoder: Then {} extension JSONEncoder { static var `default`: JSONEncoder { return JSONEncoder().then { $0.dateEnco...
0
// // GenericProtocolTest.swift // Cuckoo // // Created by Matyáš Kříž on 26/11/2018. // import XCTest import Cuckoo private class GenericProtocolConformerClass<C: AnyObject, V>: GenericProtocol { let readOnlyPropertyC: C var readWritePropertyV: V let constant: Int = 0 var optionalProperty: V? ...
0
import UIKit extension String { public var CGColor: CGColorRef { return self.CGColor(1) } public var UIColor: UIKit.UIColor { return self.UIColor(1) } public func CGColor (alpha: CGFloat) -> CGColorRef { return self.UIColor(alpha).CGColor } public func UIColor (alpha: CGFloat) -> UIK...
0
// // PieChartView.swift // Charts // // Created by Daniel Cohen Gindi on 4/3/15. // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda // A port of MPAndroidChart for iOS // Licensed under Apache License 2.0 // // https://github.com/danielgindi/ios-charts // import Foundation import UIKit /// View that rep...
0
// // InfoView.swift // Pods // // Created by Anatoliy Voropay on 5/11/16. // // import UIKit /** Position of arrow in a view - Parameter None: View will be without arrow - Parameter Automatic: We will try to select most suitable position - Parameter Left, Right, Top, Bot...
0
// swift-tools-version:5.5 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "nickdonald-boilerplate", platforms: [ .macOS(.v12) ], products: [ // Products define the executables and l...
0
// // Objects.swift // Notes // // Created by Eric Saba on 1/31/16. // Copyright © 2016 Eric Saba. All rights reserved. // import Foundation import MapKit import QuartzCore let ACCENT_COLOR: UIColor = UIColor(red: 14.0 / 255, green: 127.0 / 255, blue: 255.0 / 255, alpha: 1.0) let SCENERY_COLOR: UIColor = UIColor(...
0
import XCTest import Combine @testable import Bitkub final class BitkubTests: XCTestCase { var cancellables: Set<AnyCancellable> = Set<AnyCancellable>() func testLoadCoins() { let expectation = XCTestExpectation(description: "Coin values recovered from Bitkub") let controller = BitkubController() controller.l...
0
// // FVRecognitionTrainController.swift // FaceTrainerPackageDescription // // Created by Arman Galstyan on 12/17/17. // import Foundation import LASwift import AppKit public final class FVPerson { private var _faceID: String! public var faceID: String { return _faceID } public init(...
0
/*: # Closures Closures are self-contained blocks of functionality that can be passed around and used in your code. Functions are actually special cases of closures. Closures take one of three forms: - Global functions are closures that **have a name** and do not capture any values. - Nested functions are...
0
import UIKit import LoyaltyStation class ViewController: UIViewController { @IBOutlet weak var views: UIView! @IBAction func open(_ sender: Any) { LoyaltyStation.open(on: self) } @IBAction func login(_ sender: Any) { LoyaltyStation.login(user: User(id: "test-id", firstName: "...
0
import UIKit import StorageKit import RxSwift public class Kit { private static let supportedCurrencies = [ Currency(code: "AUD", symbol: "A$", decimal: 2), Currency(code: "BRL", symbol: "R$", decimal: 2), Currency(code: "CAD", symbol: "C$", decimal: 2), Currency(code: "CHF", sym...
0
// // AppDelegate.swift // HaroldExample // // Created by Lacy Rhoades on 6/28/17. // Copyright © 2017 Lacy Rhoades. All rights reserved. // import UIKit import Harold @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var scanner: Harold? func a...
0
// // BaseController.swift // NewToday // // Created by 吴腾通 on 2020/3/2. // Copyright © 2020 FL SMART. All rights reserved. // import UIKit class BaseController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } override func touchesEnded(_ touches: Set...
0
extension PhotoEditorController: UITextViewDelegate { public func textViewDidChange(_ textView: UITextView) { let rotation = atan2(textView.transform.b, textView.transform.a) if rotation == 0 { let oldFrame = textView.frame let sizeToFit = textView.sizeThatFits(CGSize(width: oldFrame.width, height...
0
// // AppDelegate.swift // YiMaiPatient // // Created by ios-dev on 16/8/13. // Copyright © 2016年 yimai. All rights reserved. // import UIKit import CoreData import UMSocialCore import UMSocialNetwork @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { var window: UIWind...
0
// // TriggerActionHandler.swift // // Created by ToKoRo on 2017-09-03. // import HomeKit protocol TriggerActionHandler { func handleRemove(_ trigger: HMTrigger) }
0
// // HighlightableRoundedButtonTests.swift // AHDownloadButton_Tests // // Created by Amer Hukic on 28/01/2019. // Copyright © 2019 CocoaPods. All rights reserved. // import XCTest @testable import AHDownloadButton class HighlightableRoundedButtonTests: XCTestCase { var highlightableRoundedButton: Highl...
0
// // CreateContestCoordinator.swift // lily // // Created by Nathan Chan on 9/13/17. // Copyright © 2017 Nathan Chan. All rights reserved. // import UIKit protocol CreateContestCoordinatorDelegate: class { func createContestCoordinatorDelegateDidCancel(_ createContestCoordinator: CreateContestCoordinator) ...
0
// // Utils.swift // App // // Created by Luis Vasquez on 19/05/20. // Copyright © 2020 Cisco. All rights reserved. // import UIKit class Utils: NSObject { static func showAlert(controller: UIViewController, title: String, message: String){ let alert = UIAlertController(title: "Network Error", me...
0
// // SCDefinitionDisplayView.swift // AussieDataHelper // // Created by Stephen Cao on 29/6/19. // Copyright © 2019 Stephencao Cao. All rights reserved. // import UIKit protocol SCDefinitionDisplayViewDelegate: NSObjectProtocol { func didClickKeyboardSearchKey(view: SCDefinitionDisplayView) func didScroll...
0
// The MIT License (MIT) // Copyright © 2017 Ivan Vorobei (vvkpx@example.com) // // 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 right...
0
// // SceneDelegate.swift // BetterReads // // Created by Ciara Beitel on 4/16/20. // Copyright © 2020 Labs23. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSe...
0
// // ModifierMatchController.swift // MonTennis // // Created by Thomas Luquet on 01/07/2015. // Copyright (c) 2015 Thomas Luquet. All rights reserved. // import UIKit class ModifierMatchController: UITableViewController { internal var match: Match! internal var id: Int! override func viewDidLo...
0
// // AUParamsApp // AudioUnitViewController.swift // // last build: macOS 10.13, Swift 4.0 // // Created by Gene De Lisa on 5/25/18. // Copyright ©(c) 2018 Gene De Lisa. All rights reserved. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source ...
0
// // CLLocationManager+Rx.swift // MyRx // // Created by Maple on 2017/8/30. // Copyright © 2017年 Maple. All rights reserved. // import UIKit import CoreLocation import RxSwift import RxCocoa extension Reactive where Base: CLLocationManager { /** Reactive wrapper for `delegate`. For more info...
0
// // PDFError.swift // TPPDF // // Created by Philip Niedertscheider on 13/06/2017. // import Foundation /** List of errors which can occur during using this framework */ public enum PDFError: Error { /** TODO: Documentation */ case tableContentInvalid(value: Any?) /** TODO: Documen...
0
// // ManageNodesViewController.swift // navigatAR // // Created by Michael Gira on 2/3/18. // Copyright © 2018 MICDS Programming. All rights reserved. // import CodableFirebase import Firebase import UIKit class ManageNodesViewController: UIViewControllerWithBuilding, UITableViewDataSource { @IBOutlet weak var...
0
// // CustomView.swift // CoreData001 // // Created by Ankit Kumar Bharti on 24/07/18. // Copyright © 2018 Exilant. All rights reserved. // import Cocoa @IBDesignable class CustomView: NSView { override func draw(_ dirtyRect: NSRect) { super.draw(dirtyRect) // allow layer-backed ...
0
// // BolusEntryViewModelTests.swift // LoopTests // // Created by Rick Pasetto on 9/28/20. // Copyright © 2020 LoopKit Authors. All rights reserved. // import HealthKit import LoopCore import LoopKit import LoopKitUI import SwiftUI import XCTest @testable import Loop class BolusEntryViewModelTests: XCTestCase { ...
0
// // BottomButtonsView.swift // xApiIos // // Created by Douglas Adams on 7/28/20. // Copyright © 2020 Douglas Adams. All rights reserved. // import SwiftUI import xClient struct BottomButtonsView: View { @ObservedObject var tester: Tester @ObservedObject var radioManager: RadioManager @Environment(\...
0
// // ViewControllerExtension.swift // MovieSearch // // Created by Kirill G on 7/22/18. // Copyright © 2018 ns-ios. All rights reserved. // import Foundation import UIKit extension ViewController: UITableViewDataSource, UITableViewDelegate { func tableView(_ tableView: UITableView, numberOfRowsInSection...
0
// // JSONDescribing.swift // VergeCore // // Created by muukii on 2020/02/19. // Copyright © 2020 muukii. All rights reserved. // import Foundation public protocol JSONDescribing { func jsonDescriptor() -> [String : Any]? }
0
import Foundation internal extension OperationQueue { @discardableResult func addOperationAndWaitUntilFinished<T>(_ block: @escaping () -> T) -> T { var output: T! let operation = BlockOperation(block: { output = block() }) addOperations([operation], waitUntilFinished: true) return output } }
0
// // SectionedPhoneBookCVC.swift // iOS_Example // // Created by Seyed Samad Gholamzadeh on 9/8/18. // Copyright © 2018 Seyed Samad Gholamzadeh. All rights reserved. // import UIKit import ModelAssistant private let reuseIdentifier = "Cell" class SectionedPhoneBookCVC: SortablePhoneBookCVC { override init() ...
0
// // UserDefaultsRegistrationBuilder.swift // CodeMonkeyApple // // Created by Kyle Hughes on 3/29/22. // import Foundation public struct UserDefaultsRegistrationBuilder { private var registrations: [String: Any] // MARK: Public Initialization public init() { registrations = [:] ...
0
struct Sivukartta { var text = "Hello, World!" }
0
// // Scout // Copyright (c) 2020-present Alexis Bridoux // MIT license, see LICENSE file for details import Scout import Parsing extension PathAndValue { enum ValueParsers {} } extension PathAndValue.ValueParsers { static let forbiddenCharacters: [Character] = ["[", "]", ",", ":", "{", "}"] static var...
0
// // CurrencyPairsAddPairHeaderView.swift // CurrenVerter // // Created by Tabriz Dzhavadov on 14/04/2019. // Copyright © 2019 Tabriz Dzhavadov. All rights reserved. // import UIKit typealias CPAddPairHeaderBlock = () -> Void class CurrencyPairsAddPairHeaderView: UIView { var block: CPAddPairHeaderBlock? ...
0
// RUN: %target-swift-frontend -swift-version 4 -parse-stdlib -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=GenericSpecializer -emit-ir -O %s | %FileCheck %s // // Check that the -O pipeline always preserves the runtime calls for Builtin access markers and that the KeyPath implementation is fu...
0
// // TextFieldExample.swift // SwiftUI-Text // // Created by pgq on 2020/3/18. // Copyright © 2020 pq. All rights reserved. // import SwiftUI struct TextFieldExample: View { @State var text: String var body: some View { VStack { Text("\(text)") .foregroundColor(.g...
0
// // ApplicationCoordinator.swift // WordGame // // Created by Harshal Wani on 26/12/19. // Copyright © 2019 Harshal Wani. All rights reserved. // import UIKit final class ApplicationCoordinator: Coordinator { private let window: UIWindow private let rootViewController: UINavigationController privat...
0
// // SegueNavigationRow.swift // Provenance // // Created by Joseph Mattiello on 12/25/18. // Copyright © 2018 Provenance Emu. All rights reserved. // import Foundation final class SegueNavigationRow: NavigationRow<SystemSettingsCell> { weak var viewController: UIViewController? required init(text: Stri...
0
// // DefaultSearchMediaUseCaseTests.swift // WhatToWatchTests // // Created by Denis Novitsky on 22.04.2021. // import XCTest @testable import WhatToWatch final class DefaultSearchMediaUseCaseTests: XCTestCase { // MARK: - Prepare private var sut: DefaultSearchMediaUseCase! private var mediaReposito...
0
// // FileLoggerManager.swift // // // Created by Martin Troup on 24.09.2021. // import Foundation import Zip /// LogFileManager manages all necessary operations for FileLogger. class FileLoggerManager { /// The class is used as a Singleton, thus should be accesed via instance property !!! static let shar...
0
// // SettingRepositoryType.swift // Lunarrr // // Created by hb1love on 2019/11/27. // Copyright © 2019 podo. All rights reserved. // protocol SettingRepositoryType { var current: Settings? { get } func updateSync(type: CalendarProviderType, sync: Bool) -> Bool }
0
// // NSString+Helper.swift // SwiftTemplet // // Created by Bin Shang on 2018/8/28. // Copyright © 2018年 BN. All rights reserved. // #if os(macOS) import AppKit #else import UIKit #endif import Foundation import CommonCrypto public extension String{ /// md5字符串 var md5: String { guard let data = ...
0
// Copyright 2016 LinkedIn Corp. // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. // You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // s...
0
// // CustomDataSource.swift // MyProduct // // Created by 王雪慧 on 2020/2/5. // Copyright © 2020 王雪慧. All rights reserved. // import Foundation import UIKit /// - Tag: CustomDataSource class CustomDataSource: NSObject, UICollectionViewDataSource, UICollectionViewDataSourcePrefetching { // MARK: Properties ...
0
// // DownloadManager.swift // PocketCards // // Created by macmini on 2022/04/28. // import Alamofire import Foundation class DownloadManager { public static var `default` = DownloadManager() private var manager = FileManager.default private var docsUrl = FileManager.default.urls(for: .documentDirector...
0
// // PersonalAccessToken.swift // GitBlamePR // // Created by Makoto Aoyama on 2020/05/20. // Copyright © 2020 dev.aoyama. All rights reserved. // import Foundation struct PersonalAccessToken { let rawValue: String init?(_ rawValue: String) { if rawValue.count < 1 { return nil ...
0
//===----------------------------------------------------------------------===// // // This source file is part of the Swift Collections open source project // // Copyright (c) 2022 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/...
0
// swift-tools-version:4.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "RoutingTable", products: [ // Products define the executables and libraries produced by a package, and make them visible t...
0
// This source file is part of the Swift.org open source project // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the li...
0
// // Dealer.swift // BlackJack // // Created by RENO1 on 2020/08/04. // Copyright © 2020 RENO1. All rights reserved. // import Foundation class Dealer: CardHolder, DealerAble { override init() { // generate Card var initCardList = [Card]() for suit in Card.Suit.allCases { ...
0
import XCTest @testable import CacheKitTests XCTMain([ testCase(CacheKitTests.allTests), ])
0
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
0
// // OAuthViewController.swift // sina // // Created by GMY on 2017/3/15. // Copyright © 2017年 Mingk. All rights reserved. // import UIKit import SVProgressHUD import AFNetworking class OAuthViewController: UIViewController, UIWebViewDelegate { @IBOutlet weak var webView: UIWebView! override func ...
0
// // VideoView.swift // VideoEdit // // Created by Bruno Serrano dos Santos on 07/04/20. // Copyright © 2020 EagleSoft. All rights reserved. // import UIKit import AVKit import AVFoundation class VideoView: UIView { var playerLayer: AVPlayerLayer? var player: AVPlayer? var isLoop = false req...
0
// // CVFRCDelegate.swift // Pods // // Created by Jordan Zucker on 1/30/17. // // import UIKit import CoreData public class CVFRCDelegate: NSObject, NSFetchedResultsControllerDelegate { private weak var collectionView: UICollectionView? public init(collectionView: UICollectionView) { sel...
0
import Foundation import Metal public class ComputePipelineState: MetalRepresentable, Configurable { public struct Config: Configuration { public init(library: Library, pipelineConfigurator: Configurator)throws { self.library = library self.descritpor = try CreatePipeline(configurator: pipelineConfigurator)...
0
// // UITableViewDelegate+Ex.swift // WPCommand // // Created by WenPing on 2021/8/18. // import UIKit private var WPTableViewDelegatePointer = "WPTableViewDelegatePointer" extension UITableView { var wp_delegate: WPTableViewDelegate { set { WPRunTime.set(self, newValue, &WPTableViewDelega...
0
// // ProductDetailViewController.swift // OpenFoodFacts // // Created by Andrés Pizá Bückmann on 14/04/2017. // Copyright © 2017 Andrés Pizá Bückmann. All rights reserved. // import UIKit import XLPagerTabStrip class ProductDetailViewController: ButtonBarPagerTabStripViewController, DataManagerClient { var ...
0
// // CalendarDateRangePickerCell.swift // CalendarDateRangePickerViewController // // Created by Miraan on 15/10/2017. // Copyright © 2017 Miraan. All rights reserved. // import UIKit class CalendarDateRangePickerCell: UICollectionViewCell { private let defaultTextColor = UIColor.darkGray var highli...
0
// // JSMGoodsDetailModel.swift // JSMachine // 商品详情model // Created by gouyz on 2018/12/11. // Copyright © 2018 gouyz. All rights reserved. // import UIKit @objcMembers class JSMGoodsDetailModel: LHSBaseModel { /// 商品model var goodsModel: JSMGoodsModel? /// 图片地址 var goodImgList: [String] = [Stri...
0
// // CustomView.swift // CoreLocationTask // // Created by 양중창 on 2020/01/09. // Copyright © 2020 didwndckd. All rights reserved. // import UIKit class CustomView: UIView { init() { super.init(frame: .zero) backgroundColor = .systemBackground } required init?(coder: NSCoder) { ...
0
// // RealmHelper.swift // iTax // // Created by Kamil Kowalski on 15.06.2016. // Copyright © 2016 Kamil Kowalski. All rights reserved. // import Foundation import RealmSwift class RealmHelper { /// Kolejkuje migrację dla bazy danych Realm static func configureMigrations() { let config = Realm.Configurati...