hexsha
stringlengths
40
40
size
int64
3
1.03M
content
stringlengths
3
1.03M
avg_line_length
float64
1.33
100
max_line_length
int64
2
1k
alphanum_fraction
float64
0.25
0.99
cc4027708d579aa9b61e0b7ed6c36db52cb8f1a4
2,370
// // VideoSettingDetailedOptionCell.swift // RCE // // Created by hanxiaoqing on 2021/11/29. // import UIKit import Reusable class VideoSettingDetailedOptionCell: UICollectionViewCell,Reusable { private var normalBackgroundImage: UIImage = { let size = CGSize(width: 157.5.resize, height: 48.resize) ...
31.6
96
0.626582
c11fe5d8593b18b92fedbc4c13acd52350622fc3
456
// // SampleTableViewCell.swift // PDFGenerator // // Created by Suguru Kishimoto on 2016/02/27. // // import UIKit class SampleTableViewCell: UITableViewCell { @IBOutlet weak var leftLabel: UILabel! @IBOutlet weak var rightLabel: UILabel! override func awakeFromNib() { super.awakeFromNib() ...
19
65
0.684211
f49cbb154e454bb7ed52379b4c92a4bf20688a0c
6,514
// // NSLayoutConstraint-SKLBits.swift // slidekey // // Created by Simeon Leifer on 7/10/16. // Copyright © 2016 droolingcat.com. All rights reserved. // #if os(iOS) || os(tvOS) import UIKit public typealias ViewType = UIView #elseif os(OSX) import AppKit public typealias ViewType = NSView #endif #if !os(wat...
22.696864
130
0.686061
e975ee8e01a6e97d7380cd1f12afc83193448f86
11,920
// // Copyright © 2020 Iterable. All rights reserved. // import XCTest @testable import IterableSDK class TaskProcessorTests: XCTestCase { func testAPICallForTrackEventWithPersistence() throws { let apiKey = "test-api-key" let email = "user@example.com" let eventName = "CustomEvent1" ...
45.151515
139
0.55193
0a9d9b5233d4d6ccc0673d7dee702a0938fd51c2
3,474
// // KMAUIUploadFilesTableViewCell.swift // KMA EYES CITIZENS // // Created by Stanislav Rastvorov on 16.04.2020. // Copyright © 2020 Stanislav Rastvorov. All rights reserved. // import UIKit public class KMAUIUploadFilesTableViewCell: UITableViewCell { // MARK: - IBOutlets @IBOutlet public weak var...
34.74
108
0.675014
bb857b8aaca7d44e678c4def4c85848792a58112
434
// RUN: %swift -typecheck %s -verify -D FOO -D BAR -target i386-apple-ios7.0 -D FOO -parse-stdlib // RUN: %swift-ide-test -test-input-complete -source-filename=%s -target i386-apple-ios7.0 #if os(tvOS) || os(watchOS) // This block should not parse. // os(tvOS) or os(watchOS) does not imply os(iOS). let i: Int = "Hello...
28.933333
97
0.66129
562f9f28287ae517e8db064c59b028a1a75f671c
1,403
import XCTest import class Foundation.Bundle final class AutomaticTouchServiceTests: XCTestCase { func testExample() throws { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct // results. // Some of the ...
29.229167
89
0.642195
22cd26112f755fa995c0d5f0f92390b7bfe39d92
895
// // ___FILENAME___ // ___PROJECTNAME___ // // Created by ___FULLUSERNAME___ on ___DATE___. // ___COPYRIGHT___ // // This file was generated by Project Xcode Templates // Created by Wahyu Ady Prasetyo, // import Foundation import UIKit class AlertAppearance { var titleColor = UIColor.black var tit...
30.862069
82
0.675978
effa3a7cb008d71922a0d9dd8d96364b36da8c14
1,484
// // SettingsViewController.swift // empatip // // Created by Nageshwar Bajamahal on 3/9/17. // Copyright © 2017 Nageshwar Bajamahal. All rights reserved. // import UIKit class SettingsViewController: UIViewController { @IBOutlet weak var defaultTipControl: UISegmentedControl! let defaults = UserDefault...
28.538462
106
0.674528
758173a4e530472c9aff12e55fa48295e0afa498
7,970
// Copyright © 2018 Mindera. All rights reserved. import Foundation /// A type that logs messages with multiple possible severity levels, originating from configurable app modules. public protocol ModuleLogger: Logger { /// A type that represents any logical subsystems (modules) of your app you wish to log messa...
45.284091
119
0.627854
f42e9837560c103d1678ceb3e470bb6880e4dcca
5,264
// // Xcore // Copyright © 2018 Xcore // MIT license, see LICENSE file for details // import UIKit extension UIFont { public enum LoaderError: Error { case fontNotFound case remoteFontUrlDetected case failedToCreateFont case failedToRegisterFont case failedToUnregisterFont ...
37.333333
131
0.628229
ccf67122f42ac17b093ec8204a659495b802615d
862
// // marketDataLoader.swift // MarketEats // // Created by Alexis Powell on 4/19/22. // import Foundation public class marketDataLoader { @Published var marketInfo = [MarketInfo]() init(){ loadMarkets() } /* Load the JSON Data */ func loadMarkets(){ if let fileLocat...
20.52381
94
0.491879
50563f6a8480f4e1652deefaf027542b54331b4f
2,948
// // TweetsViewController.swift // Twitter // // Created by Luis Rocha on 4/16/17. // Copyright © 2017 Luis Rocha. All rights reserved. // import UIKit import MBProgressHUD class TweetsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var tableView: UITableView! ...
36.395062
139
0.675373
fbb94fa7469df225353b1b31b24853dcd3ad9329
1,745
// Copyright 2022 Pera Wallet, LDA // 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 wr...
26.846154
75
0.666476
e9c9b628e5cb63a53bb7dd201d9d06f197e84541
1,600
// // Formatter.swift // Snack // // Created by Taylor Maxwell on 11/8/19. // Copyright © 2019 Taylor Maxwell. All rights reserved. // import Foundation // Handles issues with formatting dates // Original Idea from this link: https://useyourloaf.com/blog/swift-codable-with-custom-dates/ extension Formatter { ...
27.118644
94
0.669375
1c0d2e62837812056a4ed5b9a6ae413540e04b2c
1,246
/** * Protocol for view events. **/ public protocol IKViewEvent: IKDataObject { /** * The type of the view event. **/ var type: String { set get } /** * The title of the view controller. **/ var viewControllerTitle: String { set get } /** * The type o...
20.42623
54
0.516854
ff3fe75e68581b14099133d7901e0e43c59bbb74
1,972
// // UIScreenType.swift // UIOnboarding Example // // Created by Lukman Aščić on 14.02.22. // import UIKit struct UIScreenType { static let isiPhoneSE = UIDevice.current.userInterfaceIdiom == .phone && UIScreen.main.nativeBounds.height == 1136 static let isiPhone6s = UIDev...
29.878788
125
0.584178
b9691b650023d90bd0a081a8ecfe1a915d2f0098
195
// // ChannelDB+CoreDataClass.swift // // // Created by Марат Джаныбаев on 27.10.2020. // // import Foundation import CoreData @objc(ChannelDB) public class ChannelDB: NSManagedObject { }
12.1875
45
0.707692
4812c0e7abd1da0175f847c51d54ec014ab9aa4f
415
import TMDBSwift import XCTest final class TMDBMoviesTest: XCTestCase { private let tmdb = TMDB(apiKey: "my_awesome_api_key") func testTMDBMovies_images_toJSONToModel() { let images = createMovieImagesMock() XCTAssertEqual(images.identifier, 550) } func testTMDBMovies_imagesPath_buildCorrect() { ...
21.842105
55
0.746988
e80f079f89fa76963e7dca3bd2ed50b710ed7cee
247
// // FoodItemTableViewCell.swift // MetabolicCompassNutritionManager // // Created by Edwin L. Whitman on 7/21/16. // Copyright © 2016 Edwin L. Whitman. All rights reserved. // import UIKit class FoodItemTableViewCell: UITableViewCell { }
17.642857
59
0.736842
5dbf2e90f502c87ba64be754e7d2d83696fb25b1
656
// // String.swift // SurfPlaybook // // Created by Александр Чаусов on 15.04.2021. // Copyright © 2021 Surf. All rights reserved. // extension String { /// Возвращает строку, либо nil, если она пуста func normalized() -> String? { return self.isEmpty ? nil : self } /// Возвращает `true`,...
26.24
89
0.655488
1ea4b510d947199c048f265447e4e02bf036f30e
807
// // DetailViewController.swift // WXCP_Tinder // // Created by Will Xu on 10/25/18. // Copyright © 2018 Will Xu . All rights reserved. // import UIKit class DetailViewController: UIViewController { @IBOutlet weak var picView: UIImageView! var image: UIImage! override func viewDidLoad() { s...
24.454545
106
0.662949
ff19c78ea25976fc6d31a2b84356ae6cae44bb33
2,468
// // 20. Set Matrix Zeroes.swift // leetCode // // Created by czw on 7/20/20. // Copyright © 2020 czw. All rights reserved. // import Foundation /* 给定一个 m x n 的矩阵,如果一个元素为 0,则将其所在行和列的所有元素都设为 0。请使用原地算法。 示例 1: 输入: [     [1,1,1],     [1,0,1],     [1,1,1] ] 输出: [     [1,0,1],     [0,0,0],     [1,0,1] ] ...
17.628571
53
0.447731
e6b6840d4272e77872c72fbaf7b858838e7fe0c1
5,242
// // FaceVerification.swift // FaceTec // // Created by Alex Serdukov on 24.12.2020. // Copyright © 2020 Facebook. All rights reserved. // import Foundation class FaceVerification { // singletone instance static let shared = FaceVerification() private var serverURL: String? private var jwtAc...
33.819355
138
0.583747
1c173ae9ed45171d0f25a445f62403d98cd39efd
5,605
// // ContentView.swift // Time-Mk-Menu-bar // // Created by Matej Plavevski on 8/25/20. // Copyright © 2020 Matej Plavevski. All rights reserved. // import SwiftUI import AppKit import SwiftyXMLParser import SwiftSoup import URLImage struct ContentView: View { @State private var results = [NewsPiece]() @...
38.390411
146
0.458162
228a49e7283465699200bbcafce89f386302e28e
2,660
// // Network.swift // Grailed // // Created by Andrew Copp on 9/9/17. // Copyright © 2017 Andrew Copp. All rights reserved. // import Foundation import StoreType public class HTTP { let host: String let urlSession: URLSession public init(host: String) { self.host = host let...
29.88764
111
0.518045
03947bb3a13660027189cc0bddc651922a6e5ece
1,872
// // SingleLineTableViewCell.swift // Berkie // // Created by Gina De La Rosa on 9/10/18. // Copyright © 2018 Gina De La Rosa. All rights reserved. // import UIKit import Charts class SingleLineTableViewCell: UITableViewCell { @IBOutlet weak var singleLineView: UIView! override func awakeFromNib() ...
34.666667
124
0.667735
c13f0c1ac3ff66722df709ffb0cca98816a3247e
21,577
/*╔══════════════════════════════════════════════════════════════════════════════════════════════════╗ ║ ThreeLineElementTests.swift ║ ║ ║ ║ Created...
44.034694
111
0.443852
91032b5e24c54443105b2f0343f8db69738ca1f7
2,194
final class TupleDeclTests: PrettyPrintTestCase { func testBasicTuples() { let input = """ let a = (1, 2, 3) let a: (Int, Int, Int) = (1, 2, 3) let a = (1, 2, 3, 4, 5, 6, 70, 80, 90) let a = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) let a = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) "...
19.078261
76
0.447584
d640db7d29f61fedb1d3b4203f5ef068ddec33ca
1,745
import Foundation extension String { func partitionSlices(by length: Int) -> [Substring] { var startIndex = self.startIndex var results = [Substring]() while startIndex < self.endIndex { let endIndex = self.index(startIndex, offsetBy: length, limitedBy: self.endIndex) ?? self.e...
32.314815
130
0.565616
1c090840a251a826faf9db5296484813d8574306
2,047
// // Discovery.swift // Elfo // // Created by Douwe Bos on 12/12/20. // import Foundation import CocoaAsyncSocket protocol ElfoDiscoveryDelegate: class { func didDiscover(service: NetService) } class ElfoDiscovery: NSObject { let config: Elfo.Configuration weak var delegate: ElfoDiscoveryDelegat...
24.369048
112
0.63361
1ac09add6731fe3cc9003636f314bcdc101c6235
180
// // LaunchViewContoller.swift // Asteroids // // Copyright © 2016 Kamil Grzegorzewicz. All rights reserved. // import UIKit class LaunchViewContoller: UIViewController { }
13.846154
62
0.733333
5b1c0ea06d78c23d66062bad51f9b5581eb47e75
2,132
// // PlayingCard.swift // PlayingCard // // Created by 洋蔥胖 on 2019/5/1. // Copyright © 2019 ChrisYoung. All rights reserved. // import Foundation struct PlayingCard: CustomStringConvertible { var description: String { return "\(rank)\(suit)" } var suit: Suit var rank: Rank ...
23.428571
70
0.409944
030e1dc3a4328d73577e83984220b353f455ce85
4,417
// // CleanUnusedImports.swift // SMCheckProject // // Created by daiming on 2017/3/1. // Copyright © 2017年 Starming. All rights reserved. // import Cocoa import RxSwift //获取递归后所有的import class CleanUnusedImports: NSObject { func find(files:Dictionary<String, File>) -> Observable<Any> { return...
35.055556
129
0.493321
21cfeebd788ae14ab959a025147fe7c61fce302a
59,179
// // SetTests.swift // Outlaw // // Created by Brian Mullen on 11/9/16. // Copyright © 2016 Molbie LLC. All rights reserved. // import XCTest @testable import Outlaw class SetTests: OutlawTestCase, DateTesting { static var allTests = [("testValue", testValue), ("testNestedValue", ...
43.19635
127
0.574393
ffe94ea3d183f6b40fea6fe75c97e00533a9e07f
4,813
// // LMSTests.swift // NNKit // // Copyright 2017 DLVM Team. // // 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 require...
32.086667
82
0.503636
5df394b2146b5f98ee899f8f19e2c2d8903b05a2
1,464
// // Result.swift // Library // // Created by Cosmin Stirbu on 2/28/17. // MIT License // // Copyright (c) 2017 Fortech // // 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 ...
41.828571
82
0.739071
03470643aafcc98a4605da49ac960693a6c65821
136
// // Define.swift // toBook // // Created by Mac on 16/12/16. // Copyright © 2016年 Mac. All rights reserved. // import Foundation
13.6
47
0.639706
f578125170797a2546372256c113512521edea7a
1,009
// // FaceView.swift // SampleApp // // Created by Cesar Vargas on 24.03.20. // Copyright © 2020 Cesar Vargas. All rights reserved. // import Foundation import Warhol import UIKit final class FaceView: UIView, CameraFrontView { var viewModel: FaceViewModel? override func draw(_ rect: CGRect) { guard let ...
19.784314
102
0.674926
0184b381b9c3821b4157bb3ba748878ddc281708
1,186
// // ViewController.swift // Tipca // // Created by Laura Salazar on 9/15/18. // Copyright © 2018 Laura Salazar. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var billField: UITextField! @IBOutlet weak var tipLabel: UILabel! @IBOutlet weak var totalLabe...
25.782609
80
0.630691
fcdbdf9fd1c5ea0b812c4de8f5237a46b0644d64
384
// // PXFlowBehaviourDefault.swift // MercadoPagoSDK // // Created by AUGUSTO COLLERONE ALFONSO on 11/02/2020. // import Foundation /** Default PX implementation of Flow Behaviour for public distribution. (No-trackings) */ final class PXFlowBehaviourDefault: NSObject, PXFlowBehaviourProtocol { func trackConv...
21.333333
84
0.747396
b948073620ebbefdc22dc734f2f9d330eba063ff
236
// // PhotoClientError.swift // PhotoClientModels // // Created by Đinh Văn Nhật on 2021/10/09. // import Foundation public enum PhotoClientError: Error { case parsing(descritpion: String) case setup(descritpion: String) }
16.857143
43
0.716102
792623e43b4bf19db6529316608b1cb5dc04dca8
1,449
// // DailyTaskTableViewCell.swift // Maily // // Created by Danb on 2017. 4. 3.. // Copyright © 2017년 Febrix. All rights reserved. // import UIKit class DailyTaskTableViewCell: UITableViewCell { @IBOutlet weak var dailyCell: UIView! @IBOutlet weak var dailyTaskLabel: UILabel! @IBOutlet wea...
26.833333
68
0.659765
2f3cb854f4459eec61dfb0db8fafbdaa4523d85e
2,907
// JWTHelper.swift // // Copyright (c) 2015 Auth0 (http://auth0.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 rights // to u...
38.76
130
0.699346
2283e89040d8c038ed9362a343a24baf4db99077
1,106
/* This source file is part of the Swift.org open source project Copyright (c) 2021 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 Swift project authors...
30.722222
95
0.619349
487de43ab5511d767d26e21263697d73c632f558
16,859
/* This source file is part of the Swift.org open source project Copyright (c) 2021 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 Swift project authors...
46.571823
138
0.620203
14550f47b1e04fecd594a7b731960d4fc96f1790
1,337
// // YWChooseStrategyViewController.swift // YWLiwuShuo // // Created by Mac on 2017/5/18. // Copyright © 2017年 Mac. All rights reserved. // import UIKit class YWChooseStrategyViewController: YWBaseStrategyViewController { override func viewDidLoad() { super.viewDidLoad() setupUI() } ...
27.285714
133
0.68362
61be95a6eac03359bbe5a88bce7e0a9d465cae84
1,155
// // BotViewController.swift // LucasBot // // Created by Mirko Justiniano on 1/16/17. // Copyright © 2017 LB. All rights reserved. // import Foundation import UIKit class MemoriaVC: UIViewController { var nav:NavController? init() { super.init(nibName: nil, bundle: nil) } ...
25.666667
122
0.651082
4b7e513664ee943e03a694164e9a5207a5d0c5a5
4,057
/** https://www.hackerrank.com/challenges/ctci-is-binary-search-tree For the purposes of this challenge, we define a binary search tree to be a binary tree with the following ordering properties: The data value of every node in a node's left subtree is less than the data value of that node. The data value of ...
30.051852
127
0.634952
d9b30d40a306873a51faf30874c1ab01d96fdda6
4,123
import Foundation import CryptoSwift public extension URLRequest { private static let kHMACShaTypeString = "AWS4-HMAC-SHA256" private static let kAWS4Request = "aws4_request" private static let kAllowedCharacters = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_...
49.083333
191
0.672811
0a202450910f02856a248761d61157cd0a3f4578
3,499
// // ContactsSceneController.swift // SFSDKStarter // // Created by Kevin Poorman on 10/16/19. // Copyright © 2019 Salesforce. All rights reserved. // import Foundation import UIKit import SalesforceSDKCore class ContactsSceneController: UITableViewController { // MARK: - Properties var account...
34.303922
166
0.61589
e618ea25bb698382f6bc7594578f8e5135eb9663
5,444
// // AppDelegate.swift // Cliptube // // Created by Daniel Vollmer on 03.10.20. // import AppKit import XCDYouTubeKit import Combine @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate { @IBOutlet var watchClipboardMenuItem : NSMenuItem! let dc: DocumentController var pb...
33.398773
129
0.69673
bb3e05fadd6fce7677b97b360fd2a9f695c458dd
2,357
import UIKit /// The transition used when layout attributes change for a view during an /// update cycle. /// /// **'Inherited' transitions:** the 'inherited' transition is determined by searching up the tree (not literally, but /// this is the resulting behavior). The nearest ancestor that defines an animation will b...
37.412698
118
0.668222
e26ed710c5796cf051c63f8b6719c7a17e5a4d7c
1,115
// // AOperationDelegate.swift // AOperation // // Created by Seyed Samad Gholamzadeh on 11/25/20. // import Foundation /** Methods for react to the changes of operation's lifecycle. Use the methods of this protocol to react to the following states: * Operation starts to executtion * Operation finishes its exec...
29.342105
112
0.763229
ebf0e308543e521a6c87121c6964f04e2b6aa663
2,781
// // Barcode+cgImage.swift // RoverExperiences // // Created by Andrew Clunis on 2018-08-24. // Copyright © 2018 Rover Labs Inc. All rights reserved. // import UIKit import os extension Barcode { /** * Render the Barcode to a CGImage. * * Note that what length and sort of text is valid depends...
32.717647
127
0.532183
e25f5f76adb8c87f8a0d6dd4bab3a12cc230b9ff
4,133
// // RankingRepository.swift // NicoApp // // Created by 林達也 on 2016/03/06. // Copyright © 2016年 jp.sora0077. All rights reserved. // import Foundation import NicoAPI import NicoEntity import RxAPISchema import RxSwift import QueryKit import RealmSwift import Timepiece import NicoRepository private func ==(lhs:...
34.157025
130
0.479071
ff9341f3bda77b5e5872754d107547fadfa766f5
2,020
#if os(iOS) import Foundation import SwiftUI @available(iOS 13.0, *) open class HostingController<State, Store: ViewControllerStore<State>, Content: StateView>: UIHostingController<Content>, StatefulView where Content.StateType == State { private let viewStore: Store private let delegate: Content.Delegate ...
34.237288
169
0.685644
eb2c978ece0788cb82e1a4aa2b365fc41f5198e2
613
// // ID3TagConfiguration.swift // // Created by Fabrizio Duroni on 20/02/2018. // 2018 Fabrizio Duroni. // import Foundation class ID3TagConfiguration { private let headers: [ID3Version : [UInt8]] = [ .version2 : [UInt8]("ID3".utf8) + [0x02, 0x00, 0x00], .version3 : [UInt8]("ID3".utf8) + [0x03...
23.576923
61
0.608483
fcfce314d2bbd94f05995ec6f2650e1153a9ad25
3,777
// // ParseLiveQueryDelegate.swift // ParseSwift // // Created by Corey Baker on 1/4/21. // Copyright © 2021 Parse Community. All rights reserved. // #if !os(Linux) && !os(Android) import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif // swiftlint:disable line_length /// Receive...
46.060976
150
0.72412
0904e85a6abf84e622f7af1b17aacf50614ba2b6
4,236
/* See LICENSE folder for this sample’s licensing information. Abstract: Corner segments for the game board's border UI. */ import SceneKit extension GameBoard { enum Corner: CaseIterable { case topLeft case topRight case bottomLeft case bottomRight var u: Float {...
32.837209
102
0.506138
e9be1f425f7396f449974c97d231e73e9be7256d
3,454
import UIKit public final class BreatheView: UIView { public static let nodeColor: UIColor = UIColor(red: 100/255, green: 190/255, blue: 230/255, alpha: 1) public override init(frame: CGRect) { super.init(frame: frame) commonInit() } public required init?(coder aDecoder:...
32.895238
111
0.639838
ebf8d2ecf75b49f4e18f430a1ee475ac640e29e9
2,433
// // EnterPasscodeState.swift // PasscodeLock // // Created by Yanko Dimitrov on 8/28/15. // Copyright © 2015 Yanko Dimitrov. All rights reserved. // import Foundation public let PasscodeLockIncorrectPasscodeNotification = "passcode.lock.incorrect.passcode.notification" struct EnterPasscodeState: PasscodeLockSt...
31.597403
111
0.652281
e6a1802984b272de1c869bbd6f95fce2a0ca87a4
4,586
// // AppDelegate.swift // WatsonWasteSorter // // Created by XiaoguangMo on 1/31/18. // Copyright © 2018 IBM Inc. All rights reserved. // import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIAppl...
49.311828
285
0.690798
d717b88da11d62d830fb5406daf7c3b2fdfe6d62
4,719
// // ServiceInspectionFormFilledCellHeader.swift // Pods-StantUiIosLibraryDemo // // Created by Renato Vieira on 6/4/20. // import UIKit public class ServiceInspectionFormFilledCellHeader: UIView { public var statusBadge: CellBadge? public var circleView: UIView? public var dateView: UIView?...
41.761062
108
0.530409
6a7c2bd3c9339c8d10bc4801b7c6e97e1c764835
4,193
// // ViewController.swift // ColoredSquare // // Created by burt on 2016. 2. 26.. // Copyright © 2016년 BurtK. All rights reserved. // import UIKit import GLKit class GLKUpdater : NSObject, GLKViewControllerDelegate { weak var glkViewController : GLKViewController! init(glkViewController : GLKVi...
30.605839
149
0.618412
dd1c4f37f5e46d0f86a9bd923fff577614971ea7
2,737
// // BigInt Exponentiation.swift // // Created by pebble8888 on 2017/05/13. // // import Foundation import BigInt extension BigInt { // 0 or 1 public func parity() -> Int { return self.magnitude.parity() } public init(word: Word) { let m = BigUInt(word) self.init(sign: .plu...
24.008772
80
0.448666
fe654a8439888133204dde89a6ba1b2c88b582a5
214
// // AddTagImageError.swift // wallpapper // // Created by Marcin Czachurski on 11/07/2018. // Copyright © 2018 Marcin Czachurski. All rights reserved. // import Foundation class AddTagImageError: Error { }
16.461538
60
0.719626
e578e0225f6b741149857bb7dec3722170d90a9f
630
extension TextOutputStream { public mutating func print(_ items: Any..., separator: String = " ", terminator: String = "\n") { let print = unsafeBitCast( Swift.print(_:separator:terminator:to:) as VPrintFunction<Self>, to: PrintFunction<Self>.self ) print(items, separator, terminator, &self) ...
35
104
0.668254
e565fe8c40ed85d18f8aa7fbfa2048c1e6f8755a
1,807
// // OpportunityDetailViewController.swift // helloworld-ios-app // // Created by Marco Metting on 08.03.18. // Copyright © 2018 FeedHenry. All rights reserved. // import UIKit import FeedHenry class OpportunityDetailViewController: UIViewController { @IBOutlet weak var subscribeButton: UIButton! @IBOut...
30.116667
85
0.566685
f811e6d08dbecf38995dabc5162c90a5983bc0de
7,981
// // CountryPickerView.swift // CountryPickerView // // Created by Kizito Nwose on 18/09/2017. // Copyright © 2017 Kizito Nwose. All rights reserved. // import UIKit public typealias CPVCountry = Country public enum SearchBarPosition { case tableViewHeader, navigationBar, hidden } public struct Country: Eq...
33.961702
130
0.603433
ab65d4ef5de052e72c37453e192a3c41fda4395d
921
// // NewsLoadingFooter.swift // NewsClient // // Created by chihhao on 2019-06-15. // Copyright © 2019 ChihHao. All rights reserved. // import UIKit class NewsLoadingFooter: UICollectionReusableView { override init(frame: CGRect) { super.init(frame: frame) let aiv = UIActivityI...
27.909091
112
0.647123
fb2ac5874eff91d879eac17d5b123e223204194c
291
import Foundation import CoreData extension Photo { @nonobjc public class func fetchRequest() -> NSFetchRequest<Photo> { return NSFetchRequest<Photo>(entityName: "Photo") } @NSManaged public var photoID: String? @NSManaged public var remoteURL: NSObject? }
14.55
72
0.697595
8fe0e24615fb0bcc9a2617c2ad94de1109261b61
121
// // Cost.swift // Example // import Foundation struct Cost { let amount: Decimal let currency: Currency }
9.307692
26
0.636364
3a9b825226dffa4977473cf8057cc0277085f65b
860
import Foundation import WebKit import ServiceWorkerContainer import ServiceWorker import PromiseKit class ServiceWorkerRegistrationCommands { static func unregister(eventStream: EventStream, json: AnyObject?) throws -> Promise<Any?>? { guard let registrationID = json?["id"] as? String else { ...
27.741935
103
0.582558
e917ab337295ca1e865af2105a49aedc3df608c3
4,338
// // Copyright (c) 2021 Adyen N.V. // // This file is open source and available under the MIT license. See the LICENSE file for more info. // import SwiftUI #if canImport(SwiftUI) && canImport(Combine) /// :nodoc: @available(iOS 13.0, *) public extension View { /// Present a `ViewController` mod...
40.166667
147
0.635546
75e84d03575c1c39c3a34d703ccc67bad274df69
550
// // DemoViewModel.swift // Demo // // Created by Bruno Oliveira on 17/01/2019. // Copyright © 2019 Ash Furrow. All rights reserved. // import Foundation import Moya import Moya_ObjectMapper import RxSwift extension Reactive where Base: RxDemoViewModel { func downloadRepositories(_ username: String) -> Single<...
21.153846
73
0.716364
03d919420d345aedc063de7dd0eb4a1e39d21dd5
2,125
// // AppGroupStore.swift // FirstApp // // Created by Cédric Bahirwe on 15/09/2021. // import Foundation /** This class enforces the fact that App Group applications get and set data at the same spot. It uses UserDefaults to store DeviceToken. And with the help of the `FileHelper` a shared `FileManager` conta...
26.234568
117
0.633882
1a89f5a8092e4799eb285aa3065a6d678a1185b8
2,677
// // LimaBandClient.swift // Lima // // Created by Leandro Tami on 4/20/17. // Copyright © 2017 LateralView. All rights reserved. // import Foundation public typealias ScanHandler = (_ success: Bool, _ devices: [BluetoothDevice]?) -> Void public typealias ConnectHandler = (_ success: Bool, _ fitnessDevi...
25.990291
95
0.639148
9bea9709f118fb03881ce0190dbf6f4d6a7022b2
1,880
// // BoolExpressionTests.swift // UltramarineTests // import XCTest import Ultramarine class BoolExpressionTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown...
26.111111
111
0.607447
5011e41dae80e294e8e3c8eb4e67b440e2165c14
3,527
// // HCLHCPSearchWebServices.swift // HealthCareLocatorSDK // // Created by Truong Le on 11/10/20. // import Foundation import Apollo /** The APIs class which used to perform request to the server and retrieve the result without UI required in case you want to build your own search UI - Example: This show how ...
41.011628
183
0.612135
220072fa25c20f11d51a4a6fb387938dea625848
3,559
// // PinCodeWrongAnimationOption.swift // PasscodeLock // // Created by VitaliyK on 10/25/18. // Copyright © 2018 Yanko Dimitrov. All rights reserved. // import Foundation public typealias PinCodeShakeAnimationOptions = Array<PinCodeShakeAnimationOptionItem> public let PinCodeShakeAnimationOptionsDefault: PinCo...
27.804688
100
0.650183
89ba58c96936bce8dafd7abc9df73aba528bd5d3
496
// // RestOffer.swift // Empyr // // Created by Jarrod Cuzens on 4/10/18. // import Foundation enum OfferRewardType : String, Codable { case FIXED case PERCENT } @objc( EMPOffer ) public class RestOffer: NSObject, Codable { @objc public var id: Int = 0 @objc public var rewardValue: Double = 0 var rewardType:...
19.84
61
0.721774
efea7fa3972bc66acbab63ae5512dbfbee4570c9
2,508
// // OSLogSink.swift // Logbook // // Created by Stefan Wieland on 28.11.19. // Copyright © 2019 allaboutapps GmbH. All rights reserved. // import Foundation import os public class OSLogSink: LogSink { public let level: LevelMode public let categories: LogCategoryFilter public var itemSepar...
35.828571
188
0.655901
e9155a7d6a909787873e59c957b4360b4db36f0d
18,934
// FieldRow.swift // Eureka ( https://github.com/xmartlabs/Eureka ) // // Copyright (c) 2016 Xmartlabs ( http://xmartlabs.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 wit...
43.930394
204
0.664941
1ac8150df409b17b3c5e984197a35f69f2294257
2,669
// // MachineService.swift // PokemonAPI // // Created by Christopher Jennewein on 6/13/20. // Copyright © 2020 Prismatic Games. All rights reserved. // import Combine import Foundation protocol PKMMachineService: HTTPWebService { func fetchMachineList<T>(paginationState: PaginationState<T>, completion: @esc...
32.156627
196
0.658674
f864b834a2e297b9c4b883f86e80558cf01aaa1f
1,721
// // HomeInteractor.swift // coronasurveys-ios // // Created by Josep Bordes Jové on 18/05/2020. // Copyright (c) 2020 Inqbarna. All rights reserved. // // This file was generated by the Clean Swift Xcode Templates so // you can apply clean architecture to your iOS and Mac projects, // see http://clean-swift.co...
28.683333
88
0.715282
18180a546d2af0cf68fd36d9984663ca560845df
6,867
// // SHSecurityViewController.swift // Smart-Bus // // Created by Mark Liu on 2017/10/12. // Copyright © 2018 SmartHome. All rights reserved. // import UIKit /// 安防区域的cell重用标示 private let securityZoneViewCellReuseIdentifier = "SHSecurityZoneViewCell" class SHSecurityViewController: SHViewController { ...
29.9869
121
0.586573
39061bfa32d67c1173293ca60615f807fde6cc06
102
// // NetworkHelper.swift // // // Created by Elizabeth Peraza on 8/10/19. // import Foundation
11.333333
44
0.637255
20a0e03677803ee25a1aaccd8ca7a50bcd0d8422
1,882
import Foundation import Combine import Harvest // MARK: AuthState/Input enum AuthState: String, CustomStringConvertible { case loggedOut case loggingIn case loggedIn case loggingOut var description: String { return self.rawValue } } /// - Note: /// `LoginOK` and `LogoutOK` should only be used i...
18.096154
79
0.662062
3ad606efd63eb230171117b8c09d661ddde08773
713
// // PieSlice.swift // PieCharts // // Created by Ivan Schuetz on 30/12/2016. // Copyright © 2016 Ivan Schuetz. All rights reserved. // import UIKit public struct PieSlice: Hashable, CustomDebugStringConvertible { public let view: PieSliceLayer public internal(set) var data: PieSliceData public init...
22.28125
64
0.661992
11b3759a5b8771e2fa361aa10175b519f560dcde
7,128
// Copyright (c) 2015 - 2016 Yosuke Ishikawa // 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, di...
49.158621
463
0.6633
8ae19ce57aa671b35d3fb7182ac2fbf3655b5a41
1,574
import Foundation import SQLiteORM struct KeyValue: Initializable { var key: String = "" var value: String = "" } let storage = try Storage(filename: "", tables: Table<KeyValue>(name: "key_value", columns: ...
30.269231
131
0.602922
48566acee0e3dca50f896a4c5179babbea70fe8e
1,748
// // BootpayItem.swift // CryptoSwift // // Created by YoonTaesup on 2019. 4. 12.. // //import "BootpayParams.swift" import ObjectMapper //MARK: Bootpay Models public class BootpayItem: NSObject, BootpayParams, Mappable { public override init() {} @objc public var item_name = "" //아이템 이름 @objc public...
30.666667
120
0.505149
757aa6ea375597b8df414c595e690e57b9257a8b
37,973
// 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 l...
35.555243
448
0.605378
2829375199d017c9dde9ac3ca1052956dc14014a
637
// // TextFieldDelegateProxy.swift // ViewComponent // // Created by lalawue on 2021/2/14. // import UIKit /** for UITextField delegate, as inherit from NSObject */ class TextFieldDelegateProxy: NSObject, UITextFieldDelegate { var changeCallback: ((String) -> Void)? func textField(_ textField: UITex...
24.5
127
0.6719
acb2ec9924b285762f2c700c5beeaa72e20543ab
1,261
// // CustomView.swift // iUpload // // Created by MLeo on 2019/3/29. // Copyright © 2019年 iChochy. All rights reserved. // import Cocoa class CustomView: NSView { init() { super.init(frame: NSRect.init()) addProgress() } required init?(coder decoder: NSCoder) { fatal...
28.022222
75
0.639968
16ed2579cda878f90f2b299a0f85e351e5a491b1
2,363
// // SceneDelegate.swift // CaptionThatApp // // Created by Rebecca Slatkin on 2/9/20. // Copyright © 2020 Syracuse University. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISc...
43.759259
147
0.714769
dea471a630399fbbc55bff896c66ab64baacdec7
7,408
// // MACalendarBuilder.swift // MACalendar // // Created by Mahjabin Alam on 2021/05/09. // import Foundation class CalendarBuilder{ let calendarObj = NSCalendar(identifier: .gregorian) func firstDay(ofMonth month: Int, andYear year: Int)->Date?{ var dateComponent = DateComponents() ...
33.672727
106
0.595707
e809dd37cbed0ad9acbfeaf87bd0dd38501c8f51
617
// // Bundle+Utility.swift // AlternateIcons // // Created by Dolar, Ziga on 07/22/2019. // Copyright (c) 2019 Dolar, Ziga. All rights reserved. // import Foundation internal extension Bundle { static func resourceBundle(for type: AnyClass) -> Bundle? { let moduleBundle = Bundle(for: type) let...
26.826087
92
0.632091
72663313fc82c1dc318855893442252a09a157e8
1,049
// // OneTableViewCell.swift // OneTableView // // Created by 陈荣超 on 2021/11/8. // import Foundation import UIKit class BaseOneTableViewCell: UITableViewCell { class var cellHeight: CGFloat { return 66 } func setAnyObject(model: AnyObject?) { // no op } override i...
19.425926
79
0.56816