label
int64
0
1
text
stringlengths
0
2.8M
0
// // UIColor+Tools.swift // ToolBox // // Created by Nicolas Berthelot on 03/02/2017. // Copyright © 2017 Berthelot Nicolas. All rights reserved. // import UIKit extension UIColor { open class var x_random: UIColor { return UIColor(red: CGFloat(drand48()), green: CGFloat(drand48()), blue: CGFloat(drand4...
0
// // TestScript.swift // Bitcoin_Tests // // Created by Wolf McNally on 11/7/18. // // Copyright © 2018 Blockchain Commons. // // 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 // // ...
0
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
0
import XCTest import Foundation //: Necessary code to make Learning Swift by Example work class SwiftExample<T : Equatable> { private var code : (() -> T) private var expectedResult : (() -> T)! init(code : @escaping () -> T){ self.code = code } func returns(expectedResult : @esc...
0
// /** * @Name: ObservableType+KakaJson.swift * @Description: * @Author: guoxiafei * @Date: 2020/5/11 * @Copyright: Copyright © 2020 China Electronic Intelligence System Technology Co., Ltd. All rights reserved. */ import Foundation import RxSwift import KakaJSON import Moya /// Extension for processing Respons...
0
import Foundation import os extension OSLog { static private let DEFAULT_BUNDLE_IDENTIFIER = "com.birdbraintechnologies.ble" convenience init(category: String) { self.init(subsystem: Bundle.main.bundleIdentifier ?? OSLog.DEFAULT_BUNDLE_IDENTIFIER, category: category) } }
0
// // JSONStringAide.swift // CICOPersistentTests // // Created by lucky.li on 2018/8/4. // Copyright © 2018 cico. All rights reserved. // import Foundation class JSONStringAide { static func jsonString(name: String) -> String { let bundle = Bundle.init(for: JSONStringAide.self) guard let pat...
0
import Vapor extension Droplet { func setupRoutes() throws { let remindersController = RemindersController() remindersController.addRoutes(to: self) let usersControler = UsersController() usersControler.addRoutes(to: self) let categoriesController = CategoriesController() ...
0
// // EmailValidator.swift // SwiftKit // // Created by Daniel Saidi on 2020-06-09. // Copyright © 2020 Daniel Saidi. All rights reserved. // import Foundation /** This `Validator` can be used to validate e-mail addresses. */ public class EmailValidator: Validator { public init() {} public fun...
0
// // ConversionViewController.swift // WorldTrotter // // Created by Fernando Razon on 7/6/18. // Copyright © 2018 d182_fernando_r. All rights reserved. // import UIKit class ConversionViewController: UIViewController, UITextFieldDelegate { //Outles referenciando al storyboard @IBOutlet var celsiusL...
0
// // Palette.swift // Pailead // // Created by Patrick Metcalfe on 1/4/18. // import Foundation /// Takes swatches and organizes them into a palette public class Palette { /// The swatches from the base image let swatches : Set<Swatch> /// A possible swatch that's from darker but vibrant range of...
0
// // Copyright (c) 2017 Google Inc. // // 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 agre...
0
// // AriaGlobal.swift // AriaM3U8Downloader // // Created by 神崎H亚里亚 on 2019/11/28. // Copyright © 2019 moxcomic. All rights reserved. // import UIKit import RxSwift struct baseError: Error { var desc = "" var localizedDescription: String { return desc } init(_ desc: String) { self.desc = desc } } @o...
0
// // Identifier.swift // Alarm-ios-swift // // Created by natsu1211 on 2017/02/02. // Copyright © 2017年 LongGames. All rights reserved. // import Foundation struct Id { static let stopIdentifier = "Alarm-ios-swift-stop" static let snoozeIdentifier = "Alarm-ios-swift-snooze" static let goalIdentifier ...
0
// // DraggableInteger.swift // DragDrop // // Created by Deveesh on 21/10/19. // Copyright © 2019 MindfireSolutions. All rights reserved. // import Foundation import MobileCoreServices /// This class's object can be dragged and dropped. It wraps an Integer data inside it final class DraggableInteger: NSObject, ...
0
// // IssueManager.swift // IssueReporter // // Created by Hakon Hanesand on 10/6/16. // Copyright © 2017 abello. All rights reserved. // // import Foundation import UIKit internal let kABECompressionRatio: CGFloat = 5 internal protocol IssueManagerDelegate: class { func issueManagerUploadingStateDidCha...
0
// This source file is part of the Swift.org open source project // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list...
0
// // Tree.swift // // // Created by Georg Tuparev on 17/06/2020. // import Foundation //MARK: - The Node - public protocol TreeNodeProtocol: NodeProtocol { var parent: Self? { get } var children: [Self]? { get } } final public class TreeNode<T>: Node<T>, TreeNodeProtocol where T: Equatable { public ...
0
import Foundation import XCTest class FixtureClass34: XCTestCase { override static func setUp() { super.setUp() } override func setUp() { super.setUp() } func testSomething() {} } class FixtureClass34Subclass: FixtureClass34 { func testSubclass() {} }
1
// RUN: not %target-swift-frontend %s -typecheck // Crash type: memory error ("Invalid read of size 2") class A{func b->Self{{{}}class B<n{let a=self
0
// // URLTransform.swift // ObjectMapper // // Created by Tristan Himmelman on 2014-10-27. // // The MIT License (MIT) // // Copyright (c) 2014-2018 Tristan Himmelman // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "So...
0
// // Vehicle.swift // // // Created by Flatiron School on 7/16/16. // // import Foundation class Vehicle { let name: String let weight: Double let maxSpeed: Double var speed: Double = 0.0 var heading: Double = 0.0 //just fact to know if you do not set a value for you immutable prope...
0
// // SemanticAnalyzer+Components.swift // SemanticAnalyzer // // Created by Hails, Daniel J R on 21/08/2018. // import Foundation import AST import Lexer import Diagnostic import Source extension SemanticAnalyzer { /// The set of characters for identifiers which can only be used in the stdlib. var stdlibReserv...
0
import Foundation import Domain enum URLScheme { case addApps(ids: [AppID]) case viewApp(id: AppID) case export case deleteAll } // MARK: - RawRepresentable extension URLScheme: RawRepresentable { var rawValue: URL { var urlComponents = URLComponents() urlComponents.scheme = "appdates" switch s...
0
// // TransactionView.swift // Prory // // Created by edwin on 19/07/2020. // Copyright © 2020 edwin. All rights reserved. // import SwiftUI struct TransactionView: View { @State private var showInvoice = false @ObservedObject private var viewModel = TransactionViewModel() var body: some View { ...
0
// // AddNetworkVC+TextFieldDelegate.swift // Franklin // // Created by Anton on 07/03/2019. // Copyright © 2019 Matter Inc. All rights reserved. // import UIKit extension AddNetworkViewController: UITextFieldDelegate { func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacem...
0
// // Keystore.swift // Keystore // // Created by Koray Koska on 27.06.18. // Copyright © 2018 Boilertalk. All rights reserved. // import Foundation import CryptoSwift public struct Keystore: Codable { // MARK: - Public API /// Creates a new keystore for the given private key and password. /// /...
0
import Foundation import simd /// A unitless vector representing distances, sizes or scales in three dimensions /// /// ## Examples /// ```swift /// let v1 = Vector3D(x: 10, y: 15, z: 5) /// let v2: Vector3D = [10, 15, 5] /// ``` public struct Vector3D: ExpressibleByArrayLiteral, SCADValue, Hashable { public let x: D...
0
// // PageContentView.swift // DYSwift // // Created by CXTretar on 2020/1/2. // Copyright © 2020 CXTretar. All rights reserved. // import UIKit private let ContentCellID: String = "ContentCellID" protocol PageContentViewDelegate : class { func pageContentViewScroll(_ contentView: PageContentView, _ progress...
0
// // PersistentConversationDataItem+CoreDataClass.swift // ConversationsApp // // Copyright © Twilio, Inc. All rights reserved. // // import CoreData @objc(PersistentConversationDataItem) public class PersistentConversationDataItem: NSManagedObject { convenience init(with conversationDataItem: ConversationDa...
0
/* * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2019-2020 Datadog, Inc. */ import XCTest @testable import Datadog #if canImport(UIKit) import UIKit...
0
// // NSObject+Deinit.swift // ReactKit // // Created by Yasuhiro Inami on 2014/09/14. // Copyright (c) 2014年 Yasuhiro Inami. All rights reserved. // import Foundation private var deinitSignalKey: UInt8 = 0 public extension NSObject { private var _deinitSignal: Signal<AnyObject?>? { get { ...
0
// // AppTheme.swift // FillMeUp // // Created by Varun Rathi on 23/11/17. // Copyright © 2017 vrat28. All rights reserved. // import UIKit import ChameleonFramework struct AppTheme { // Colors static let kColorCorrectAnswer:UIColor = UIColor.green static let kColorCorrectWrong:UIColor = UIColor...
0
import XCTest @testable import Async @available(macOS 12.0, *) class AsyncTests: XCTestCase { func testAsync() async { } @MainActor func testMainActor() async { XCTAssertTrue(Thread.isMainThread) } func testNotAsync() { XCTAssertTrue(Thread.isMainThread) } }
0
// // TYSegmentItem.swift // RCTTest // // Created by 童万华 on 2017/8/18. // Copyright © 2017年 童万华. All rights reserved. // import UIKit class TYSegmentItem: UIButton { var indexInSegmentView = 0 init(title:String,normalColor:UIColor,selectedColor:UIColor) { super.init(frame: CGRect.zero) ...
0
// swift-tools-version:5.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "SwiftyHUDView", platforms: [ .iOS(.v13) ], products: [ // Products define the executables and libraries pr...
0
// // SuperHeroesDetector.swift // iOSBasicTraining // // Created by Pedro Vicente Gomez on 24/06/16. // Copyright © 2016 GoKarumi. All rights reserved. // import Foundation import Result class SuperHeroesDetector { private let superHeroesRepository: SuperHeroesRepository init(superHeroesRepository: Sup...
0
// Copyright 2022 Espressif Systems // // 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 ...
0
import PlaygroundSupport import SpriteKit /// Represents an item (e.g. food) that can be transported on a conveyor or operated on. final class Item { let node = SKNode() // MARK: - Life Cycle init(title: String) { node.zPosition = 1 label.text = title label.fontSize = fontSize(fo...
0
// // Copyright 2011 - 2020 Schibsted Products & Technology AS. // Licensed under the terms of the MIT license. See LICENSE in the project root. // import Foundation class TaskManager { struct TaskData { let operation: TaskOperation let errorCallback: ((ClientError) -> Void)? let taskDidCa...
0
// // UIView+PopupOverlay.swift // PopupOverlay // // Created by Alexander Solis on 6/2/19. // Copyright © 2019 MellonTec. All rights reserved. // import UIKit extension UIView { static func popupView(size: CGSize, cornerRadius: CGFloat, color: UIColor) -> U...
0
// swift-tools-version: 5.7 import PackageDescription let package = Package( name: "Library", products: [ .library(name: "Library", targets: ["Library"]), ], dependencies: [ .package(path: "../PluginOnly") ], targets: [ .target(name: "Library", plugins: [.plugin(name: "...
0
// // UIKitRenderer.swift // TemplateKit // // Created by Matias Cudich on 9/3/16. // Copyright © 2016 Matias Cudich. All rights reserved. // import Foundation public enum ElementType: ElementRepresentable { case box case button case text case textField case image case table case collection case a...
0
// // RSUmenManager.swift // gokarting // // Created by ZS on 2018/5/16. // Copyright © 2018年 ZS. All rights reserved. // import UIKit import MessageUI private let wechatAppKey = "" private let wechatAppSecret = "" private let wechatRedirectURL = "http://www.benson-car.com" private let qqAppkey = "" private let...
0
// // MagazineCollectionView.swift // SwiftMagazine // // Created by Heberti Almeida on 18/09/14. // Copyright (c) 2014 CocoaHeads Brasil. All rights reserved. // import UIKit class MagazineCollectionView: UICollectionView { var index: Int! init(frame: CGRect, index: Int) { self...
0
// // ArrayBuilderTests.swift // // // Created by Thibault Wittemberg on 2021-02-21. // import Feedbacks import XCTest final class ArrayBuilderTests: XCTestCase { @ArrayBuilder<Int> var mockEntries: [Int] { 1 2 3 4 5 } func testBuildBlock_gathers_entries_in...
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
// // QSMainTabBarController.swift // QSBaoKan // // Created by mba on 16/6/7. // Copyright © 2016年 mbalib. All rights reserved. // import UIKit class QSMainTabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() // 增加所有只控制器 addChildViewControllers() ...
0
import PackageDescription let package = Package( name: "Parsey", dependencies: [ .Package(url: "https://github.com/rxwei/Funky", majorVersion: 2) ] )
0
// // BarLineScatterCandleBubbleRenderer.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda // A port of MPAndroidChart for iOS // Licensed under Apache License 2.0 // // https://github.com/danielgindi/Charts // import Foundation import CoreGraphics @objc(BarLineScatterCandleBubbleChartRen...
0
import SwiftUI @available(iOS 13.0, macOS 10.15, tvOS 13.0, *) public struct Inspector { } @available(iOS 13.0, macOS 10.15, tvOS 13.0, *) internal extension Inspector { static func attribute(label: String, value: Any) throws -> Any { if label == "super", let superclass = Mirror(reflecting: value).su...
0
// // DCPagerProgressView.swift // CDDPagerControllerDemo-Swift // // Created by 陈甸甸 on 2018/3/5. //Copyright © 2018年 陈甸甸. All rights reserved. // import UIKit class DCPagerProgressView: UIView { /** 进度条 */ var progress: NSInteger? /** 尺寸 */ var itemFrames : NSMutableArray? /** 颜色 */ var c...
0
import Foundation import Strix public enum TokenType: Int { case end case number case string case `operator` case name case comment } public struct Token: Hashable { public var type: TokenType public var value: String public init(type: TokenType, value: String = "") { ...
0
// // OES_standard_derivatives.swift // CanvasNative // // Created by Osei Fortune on 4/27/20. // import Foundation import OpenGLES @objcMembers @objc(TNS_OES_standard_derivatives) public class TNS_OES_standard_derivatives: NSObject { public override init() {} }
0
// // ChromaPickerServiceView.swift // Shlist // // Created by Pavel Lyskov on 30.04.2020. // Copyright © 2020 Pavel Lyskov. All rights reserved. // import Reusable import UIKit final class ChromaPickerServiceView: UIView { @IBOutlet var navBar: UINavigationBar! @IBOutlet var doneButton: UIBarButtonItem! ...
0
public struct DetailsViewModel { public var identifier: String public var icon: String public var price: Double public var lastHour: Double public var lastMonth: Double public var lastYear: Double public init(identifier: String, icon: String, price: Double, lastHour: Double, lastMonth:...
0
@dynamicMemberLookup public final class NestedProperty<Model, Property> where Model: Fields, Property: PropertyProtocol { public let prefix: [FieldKey] public let property: Property init(prefix: [FieldKey], property: Property) { self.prefix = prefix self.property = property } p...
0
// // LNSSimpleTemplateChooser.swift // LNSTemplateChooser // // Created by Mark Alldritt on 2020-07-12. // Copyright © 2020 Mark Alldritt. All rights reserved. // import UIKit public class LNSSimpleTemplateChooser: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateF...
0
import Foundation // TODO: Get a logger into here this is real tricky // because of the decoding from JSON nature of DangerDSL public enum SpawnError: Error { case commandFailed(exitCode: Int32, stdout: String, stderr: String, task: Process) } internal class ShellExecutor { func execute(_ command: String, ar...
0
// // AppDelegate.swift // ReceptionKit // // Created by Andy Cho on 2015-04-23. // Copyright (c) 2015 Andy Cho. All rights reserved. // import UIKit var camera: Camera! @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? let conversationDelegate = Conversati...
0
// // ViewController.swift // tippy // // Created by MHC User on 9/10/18. // Copyright © 2018 Anisha Pai. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var tipSlider: UISlider! @IBOutlet weak var preTotalLabel: UITextField! @IBOutlet weak var tipLabe...
0
// // WebViewController.swift // Multiplatform macOS // // Created by Maurice Parker on 7/8/20. // Copyright © 2020 Ranchero Software. All rights reserved. // import AppKit import Combine import RSCore import Articles protocol WebViewControllerDelegate: AnyObject { func webViewController(_: WebViewController, ar...
0
// Copyright © 2018 Stormbird PTE. LTD. import Foundation import Alamofire import PromiseKit import Result import SwiftyJSON class OpenSea { typealias PromiseResult = Promise<[AlphaWallet.Address: [OpenSeaNonFungible]]> //Assuming 1 token (token ID, rather than a token) is 4kb, 1500 HyperDragons is 6MB. So w...
0
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing if true { enum S { { } { } protocol C { class b { { { } } } { } let c : b } } protocol a { protocol e { { } typealias A : A } } let : a
0
// // ByteOperations.swift // reiner_ccid_via_dk_sample // // Created by Prakti_E on 03.06.15. // Copyright (c) 2015 Reiner SCT. All rights reserved. // import Foundation /// The C 'unsigned char' type. public typealias Byte = UInt8 /// The C 'unsigned char' type. public typealias byte = UInt8 //public class...
0
// // Ingredient.swift // FoodCourt // // Created by Максим Бойчук on 03.05.2020. // Copyright © 2020 Maksim Boichuk. All rights reserved. // import Foundation public struct Ingredient { private let name: String private let amount: Int private let measure: String init(name: String, amount: In...
0
// // AppDelegate.swift // NiceDemo // // Created by Serhii Kharauzov on 3/4/18. // Copyright © 2018 Serhii Kharauzov. All rights reserved. // import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: Properties var window: UIWindow? var appDelegateService: AppDelegateService...
0
// // GribCoordinate.swift // gribParserTest // // Created by Bo Gustafsson on 2018-12-30. // Copyright © 2018 Bo Gustafsson. All rights reserved. // import Foundation struct GribCoordinate { var lat = 0.0 var lon = 0.0 var latRot = 0.0 var lonRot = 0.0 var i = 0 var j = 0 init(i: Int,...
0
// // UserRequestTests.swift // SwiftYNABTests // // Created by Andre Bocchini on 5/4/19. // Copyright © 2019 Andre Bocchini. All rights reserved. // import XCTest @testable import SwiftYNAB class UserRequestTests: XCTestCase { func testUserRequest() { let request = UserRequest() XCTAssertEqua...
0
// // MatchCard.swift // MatchMatch // // Created by Park, Chanick on 5/23/17. // Copyright © 2017 Chanick Park. All rights reserved. // import Foundation import UIKit import SwiftyJSON /** @desc Card Data Model Class */ class MatchCard : NSObject { var id: String = "" var title: String = "" va...
0
// AppDelegate.swift // FirstDraftPrime // // Created by David Casseres on 2/24/18. // Copyright © 2018 David Casseres. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { /...
0
// // DragDropCollectionViewCell.swift // DragDropCollection // // Created by Hari Kunwar on 2/3/17. // Copyright © 2017 Learning. All rights reserved. // import UIKit protocol DragDropCollectionViewCellDelegate: class { func willBeginDragging(cell: DragDropCollectionViewCell) func didEndDragging(cell: Dr...
1
// RUN: not %target-swift-frontend %s -typecheck } var d{let a= { class A{ struct a {a{ c{ " var d ={ classA{ } {" protocol A{ let a= {" }struct Q { class d{ protocol A{ struct A{class Ba{let i{ (ed =a
0
// // FIT3178_Assignment4_V2Tests.swift // FIT3178_Assignment4_V2Tests // // Created by Yushu Guo on 4/6/20. // Copyright © 2020 Monash University. All rights reserved. // import XCTest @testable import FIT3178_Assignment4_V2 class FIT3178_Assignment4_V2Tests: XCTestCase { override func setUpWithError() thro...
0
// // ViewController.swift // accelerometron // // Created by Yasinkbas on 12/17/18. // Copyright © 2018 Yasin. All rights reserved. // import UIKit class ListTableViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() tableView.delegate = self table...
0
// // MyPagePostTableViewHeader.swift // VegeXI // // Created by Doyoung Song on 8/14/20. // Copyright © 2020 TeamSloth. All rights reserved. // import UIKit class MyPagePostTableViewHeader: UIView { // MARK: - Properties let leftLabel = UILabel().then { $0.text = "글 3" $0.font = UIFo...
0
// // CoffeeViewController.swift // FourSquare // // Created by Duy Linh on 5/2/17. // Copyright © 2017 Duy Linh. All rights reserved. // import UIKit class CoffeeViewController: MenuItemViewController { override var section: SectionQuery { return .Coffee } override func viewDidLoad(...
0
// // SimpleExample.swift // SwiftCombineExamples // // Created by Eidinger, Marco on 3/8/21. // import Foundation import SwiftUI class SimpleExampleModel: ObservableObject { static var randomName: String { "Mike \(["Palmers", "Chamers", "Balmers"].randomElement()!)" } @Published var date: St...
0
// Created by Sinisa Drpa on 11/16/17. import Foundation import Kitura import KituraCache import KituraCORS import KituraNet import KituraWebSocket import SwiftyJSON struct Config { static let storeAddress = "17206648368948385036L" } public final class Server { private let socketService = SocketService() pr...
0
// // BooksViewController.swift // SlideMenu // // Created by Saketh Manemala on 28/06/17. // Copyright © 2017 Saketh. All rights reserved. // import UIKit class BooksViewController: UIViewController { @IBOutlet weak var navBar: UINavigationItem! override func viewDidLoad() { super.viewDidLoad() ...
0
// // CircleIconView.swift // CircleMenuDemo // // Created by Shoaib Ahmed on 11/26/16. // Copyright © 2016 Kindows Tech Solutions. All rights reserved. // import UIKit class CircleIconView: UIView { public var image: UIImage? public var highlightedIconColor = UIColor.green public var isSelected:...
0
import Dispatch import Result import Nimble import Quick @testable import ReactiveSwift class UnidirectionalBindingSpec: QuickSpec { override func spec() { describe("BindingTarget") { var token: Lifetime.Token! var lifetime: Lifetime! var target: BindingTarget<Int>! var optionalTarget: BindingTarget<In...
0
/* Copyright (c) <2020> 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, subli...
0
// // MoviesCell.swift // KLM_t // // Created by Pavle Mijatovic on 27.5.21.. // import UIKit class MoviesCell: UICollectionViewCell { // MARK: - API static let id = "MoviesCell" var vm: MovieVM? { willSet { updateUI(vm: newValue) } } // MARK: - Proper...
0
import Foundation final class MCreateSaveRender { let zoom:Double var slices:[MCreateSaveRenderSlice] init( zoom:Double, slices:[MCreateSaveRenderSlice]) { self.zoom = zoom self.slices = slices } }
0
// // AlbumDetailViewController.swift // AlbumTracker // // Created by Zachary Long on 6/7/20. // Copyright © 2020 Zachary Long. All rights reserved. // import UIKit import os.log class AlbumDetailViewController: UIViewController, UITextFieldDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegat...
0
// // ImageReply.swift // Aimybox // // Created by Vladyslav Popovych on 07.12.2019. // import Foundation /** Represents a reply with image content, which should be displayed in the UI. */ public protocol ImageReply: Reply { /** URL to the image or GIF. */ var url: URL { get } }
0
// // Gate+SimulatorGate.swift // SwiftQuantumComputing // // Created by Enrique de la Torre on 15/11/2020. // Copyright © 2020 Enrique de la Torre. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You m...
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: "Get", platforms: [.iOS(.v13), .macCatalyst(.v13), .macOS(.v10_15), .watchOS(.v6), .tvOS(.v13)], products: [ .library(n...
0
// // SyncEngine.swift // Shopping // // Created by Aaron Bratcher on 3/22/15. // Copyright (c) 2015 Aaron Bratcher. All rights reserved. // import Foundation import ALBNoSQLDB import ALBPeerConnection let kSyncComplete = "SyncComplete" let kDevicesTable = "Devices" let kMonthlySummaryEntriesTable = "SummaryEntri...
0
// // AccountViewController.swift // SimpleDocbase // // Created by jeonsangjun on 2017/11/17. // Copyright © 2017年 archive-asia. All rights reserved. // import UIKit import SwiftyFORM import SVProgressHUD import Firebase class AccountViewController: FormViewController { // MARK: Properties let user...
0
// Conforming to this protocol allows the entity // to be paginated using `query.paginate()` public protocol Paginatable: Entity { static var pageSize: Int { get } static var pageSorts: [Sort] { get } } // MARK: Optional public var defaultPageSize: Int = 10 extension Paginatable { public static var pageS...
0
// // ListViewController.swift // ListableUI // // Created by Kyle Van Essen on 6/21/20. // import Foundation import UIKit /// /// A class which provides an easy way to set up and display a `ListView`, /// The `ListViewController` itself manages setup and presentation of the `ListView`. /// /// As a consumer of t...
0
//// // 🦠 Corona-Warn-App // import XCTest @testable import ENA class HealthCertificateConsentViewModelTests: CWATestCase { func testGIVEN_ConsentViewModel_WHEN_getDynamicTableViewModel_THEN_CellsAndSectionsCountAreCorrect() { // GIVEN let viewModel = HealthCertificateInfoViewModel(didTapDataPrivacy: {}) //...
0
//===----------------------------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
0
// // AppDelegate.swift // macOSDemo // // Created by Sota Yokoe on 2016/11/03. // // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { // Insert code here to initialize your application } ...
0
// // GoogleAuthLoader.swift // Taskgoo // // Created by Tomáš Martykán on 01/04/1976. // Copyright © 2019 Tomáš Martykan. All rights reserved. // import Foundation import p2_OAuth2 class GoogleAPI: OAuth2DataLoader { public init() { let oauth = OAuth2CodeGrant(settings: [ "keycha...
0
/* Question - Merge Two Sorted Lists Link - > https://leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/579/week-1-january-1st-january-7th/3592/ */ class Solution { func mergeTwoLists(_ l1: ListNode?, _ l2: ListNode?) -> ListNode? { guard let l1 = l1 else { return l2 } guard let l2 = l...
0
// // LineChartRenderer.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda // A port of MPAndroidChart for iOS // Licensed under Apache License 2.0 // // https://github.com/danielgindi/Charts // import Foundation import CoreGraphics open class LineChartRenderer: LineRadarRenderer { // ...
0
/* * Copyright (c) 2015 Razeware LLC * * 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, dis...