repo_name
stringlengths
7
91
path
stringlengths
8
658
copies
stringclasses
125 values
size
stringlengths
3
6
content
stringlengths
118
674k
license
stringclasses
15 values
hash
stringlengths
32
32
line_mean
float64
6.09
99.2
line_max
int64
17
995
alpha_frac
float64
0.3
0.9
ratio
float64
2
9.18
autogenerated
bool
1 class
config_or_test
bool
2 classes
has_no_keywords
bool
2 classes
has_few_assignments
bool
1 class
lukejmann/FBLA2017
FBLA2017/WalkthroughContainerViewController.swift
1
1646
// // WalkthroughMainViewController.swift // FBLA2017 // // Created by Luke Mann on 5/7/17. // Copyright © 2017 Luke Mann. All rights reserved. // import UIKit protocol WalkthroughDismissedDelegate { func walkthroughDismissed() } //Class to control and contain the walkthrough pages class WalkthroughMainViewC...
mit
8c5b50e07f6990c573bbcfd0c1266752
27.362069
106
0.694225
4.895833
false
false
false
false
kagenZhao/cnBeta
iOS/CnBeta/Business Modules/News Module/Home Page/View Model/NewsListViewModel.swift
1
1777
// // NewsListViewModel.swift // CnBeta // // Created by 赵国庆 on 2017/8/28. // Copyright © 2017年 Kagen. All rights reserved. // import UIKit import RxSwift class NewsListViewModel { private(set) var page = 1 var limit = 20 var newsList = [ArticleModel]() { didSet { lastID = newsList...
mit
115c5f9fa52abcc545462d9f3a42a820
32.358491
107
0.598982
4.239808
false
false
false
false
dwsjoquist/ELWebService
Source/Core/Mocking.swift
3
6076
// // Mocking.swift // ELWebService // // Created by Angelo Di Paolo on 3/1/16. // Copyright © 2016 WalmartLabs. All rights reserved. // import Foundation // MARK: - MockableResponse /// Defined an interface for mocking data task result data for a given request. public protocol MockableDataTaskResult { /** ...
mit
cb6e87b3881027f411f51d59465e712c
30.640625
127
0.66107
4.760972
false
false
false
false
diegosanchezr/Chatto
ChattoAdditions/Source/Chat Items/BaseMessage/BaseMessageViewModel.swift
1
4091
/* The MIT License (MIT) Copyright (c) 2015-present Badoo Trading Limited. 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 us...
mit
5c0758ac126df454259f3cda661ee3bb
30.713178
122
0.719873
5.001222
false
false
false
false
tensorflow/swift-apis
Sources/TensorFlow/Core/Utilities.swift
1
5482
// Copyright 2019 The TensorFlow Authors. 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 may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required b...
apache-2.0
9c18b15789d0653f665dc07ccedd3ce6
31.05848
100
0.591755
4.705579
false
false
false
false
wikimedia/wikipedia-ios
Wikipedia/Code/TextFormattingTableViewCell.swift
3
2060
class TextFormattingTableViewCell: UITableViewCell { let topSeparator = UIView() required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) addSeparator() configureSeparator() backgroundView = UIView() selectedBackgroundView = UIView() updateFonts() ...
mit
9157b229a3004e7cc2991c6b0b6348b4
34.517241
108
0.712621
6.477987
false
false
false
false
caobo56/Juyou
JuYou/JuYou/Pubilc/Extension/UIView+DDAddition.swift
1
4100
// // UIView+DDAddition.swift // JuYou // // Created by caobo56 on 16/5/18. // Copyright © 2016年 caobo56. All rights reserved. // import UIKit import QuartzCore /** 几点说明 1)四边按照内正外负,到superView的边框距离 left right top bottom 2)中心点的坐标依照左上角为原点 center centerX centerY */ extension UIView{ var lef...
apache-2.0
5353f3caf7d3fd26168b2c9e94658e8a
20.534759
74
0.565433
4.316184
false
false
false
false
yanfeng0107/ios-charts
Charts/Classes/Charts/BarLineChartViewBase.swift
19
59925
// // BarLineChartViewBase.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 CoreGraphics imp...
apache-2.0
f6b1f391437d7625eeb12350220301d1
34.990991
229
0.583796
5.626761
false
false
false
false
rechsteiner/Parchment
Example/ExamplesViewController.swift
1
4520
import UIKit enum Example: CaseIterable { case basic case selfSizing case calendar case sizeDelegate case images case icons case storyboard case navigationBar case largeTitles case scroll case header case multipleCells case pageViewController var title: String {...
mit
3ab3e08cd82e8c1e3cfb2195575ce4c9
32.984962
109
0.635619
5.614907
false
false
false
false
MKGitHub/MessageBox-Concept
Sources/MessageBox.swift
1
2942
// // MessageBox // Copyright © 2016/2017/2018 Mohsan Khan. All rights reserved. // // // https://github.com/MKGitHub/MessageBox-Concept // http://www.xybernic.com // // // Copyright 2016/2017/2018 Mohsan Khan // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file ex...
apache-2.0
cb8463fd79651519fc95ed1956317ccf
20.947761
107
0.609997
4.124825
false
false
false
false
skonb/YapDatabaseExtensions
examples/iOS/YapDBExtensionsMobile/Models.swift
2
8927
// // Models.swift // YapDBExtensionsMobile // // Created by Daniel Thorpe on 15/04/2015. // Copyright (c) 2015 Daniel Thorpe. All rights reserved. // import Foundation import YapDatabase import YapDatabaseExtensions public enum Barcode: Equatable { case UPCA(Int, Int, Int, Int) case QRCode(String) } pub...
mit
2f0a2a3cde962a7ac55ba1888937ed1e
26.552469
138
0.644001
4.580298
false
false
false
false
minimoog/MetalToy
MetalToy/CompilerMessageButton.swift
1
1696
// // CompilerMessageButton.swift // MetalToy // // Created by minimoog on 12/26/17. // Copyright © 2017 Toni Jovanoski. All rights reserved. // import UIKit // Button showed in the gutter in code editor when there is compiler error class CompilerMessageButton: UIView { open var message: String? filepriv...
mit
c28774052e659d254dffa2f11b5795ed
29.818182
85
0.644248
5.199387
false
false
false
false
DrabWeb/Keijiban
Keijiban/Keijiban/KJExtensions.swift
1
6971
// // KJExtensions.swift // Keijiban // // Created by Seth on 2016-06-04. // import Cocoa extension String { /// Returns this string without any special HTML characters/tags that arent needed for parsing var cleanedString : String { /// This string, cleaned var cleanedString : String = self...
gpl-3.0
c5611750af296f5bb0e71355b1cd5d02
42.304348
237
0.647253
5.345859
false
false
false
false
filipealva/WWDC15-Scholarship
Filipe Alvarenga/View/DotView.swift
1
2003
// // DotView.swift // Filipe Alvarenga // // Created by Filipe Alvarenga on 18/04/15. // Copyright (c) 2015 Filipe Alvarenga. All rights reserved. // import UIKit class DotView: UIView { // MARK: - Properties @IBOutlet weak var storyContainerHeightConstraint: NSLayoutConstraint! @IBOutlet weak ...
mit
8a90307e8ae46dac8dac8a64eb6aa13f
28.455882
126
0.652022
4.511261
false
false
false
false
wilzh40/SoundSieve
SwiftSkeleton/AnimatedStartButton.swift
1
3936
// // AnimatedStartButton.swift // walktracker // // Created by Kevin VanderLugt on 1/13/15. // Copyright (c) 2015 Alpine Pipeline. All rights reserved. // import CoreGraphics import QuartzCore import UIKit class AnimatedStartButton : UIButton { // The horizontal disantce between the two lines in pause mode ...
mit
f50a277e143e5f8e7b056e32843da8c1
32.355932
130
0.622713
4.503432
false
false
false
false
arinjoy/Landmark-Remark
LandmarkRemark/LandmarkCustomCell.swift
1
4839
// // LandmarkCustomCell.swift // LandmarkRemark // // Created by Arinjoy Biswas on 7/06/2016. // Copyright © 2016 Arinjoy Biswas. All rights reserved. // import UIKit import MapKit class LandmarkCustomCell: UITableViewCell, MKMapViewDelegate { @IBOutlet weak var mapView: MKMapView! @IBOutl...
mit
66e0c0b7465cc7bd30709575828c8fbd
36.215385
165
0.596734
5.752675
false
false
false
false
penniooi/TestKichen
TestKitchen/TestKitchen/classes/cookbook/recommend/view/CBRecommendNewCell.swift
1
3283
// // CBRecommendNewCell.swift // TestKitchen // // Created by aloha on 16/8/19. // Copyright © 2016年 胡颉禹. All rights reserved. // import UIKit class CBRecommendNewCell: UITableViewCell { //显示数据 var model:CBRecommendwidgetListModel?{ didSet{ showData() } } ...
mit
044861e11159bd258940529c5672daa0
28.290909
183
0.501552
5.256117
false
false
false
false
alessandrostone/MusicTheory
MusicTheory/NoteWithIntervals.swift
1
798
// // NoteWithIntervals.swift // MusicTheory // // Created by Daniel Breves Ribeiro on 2/04/2015. // Copyright (c) 2015 Daniel Breves. All rights reserved. // import Foundation public class RootWithIntervals { public let notes: [Note] public init(root: Note, intervals: [String]) { var currentNote = roo...
mit
2e033ef7bc1059a06cda354bbfb5cb2f
19.487179
58
0.621554
3.627273
false
false
false
false
space150/spaceLock
ios/spacelab/SLNewKeyViewController.swift
3
19468
// // SLNewKeyViewController.swift // spacelab // // Created by Shawn Roske on 5/18/15. // Copyright (c) 2015 space150. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and // associated documentation files (the "Software"), to deal in the So...
mit
eb765b402bf20efc8eb5cedb8c6f7e49
38.569106
227
0.626978
5.391304
false
false
false
false
TBXark/TKSwitcherCollection
TKSwitcherCollection/TKBaseSwitcher.swift
1
2324
// // TKBaseSwitcher.swift // SwitcherCollection // // Created by Tbxark on 15/10/25. // Copyright © 2015年 TBXark. All rights reserved. // import UIKit public typealias TKSwitchValueChangeHook = (_ value: Bool) -> Void // 自定义 Switch 基类 @IBDesignable open class TKBaseSwitch: UIControl { // MARK: - Property ...
mit
46f1706745980cf14e4a6beeadb83263
22.824742
99
0.596711
4.36862
false
false
false
false
nicolastinkl/swift
AdventureBuildingaSpriteKitgameusingSwift/Adventure/Adventure Shared/Sprites/Character.swift
1
8267
/* Copyright (C) 2014 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: Defines the class for a character in Adventure */ import SpriteKit enum AnimationState: UInt32 { case Idle = 0, Walk, Attack, GetHit, Death } enum MoveDirection { ...
mit
f2492c23cf947ee182cd7451fa11d4be
26.1875
142
0.614882
4.808028
false
false
false
false
iOS-mamu/SS
P/PotatsoModel/Proxy.swift
1
10944
// // Proxy.swift // Potatso // // Created by LEI on 4/6/16. // Copyright © 2016 TouchingApp. All rights reserved. // import RealmSwift import CloudKit public enum ProxyType: String { case Shadowsocks = "SS" case ShadowsocksR = "SSR" case Https = "HTTPS" case Socks5 = "SOCKS5" case None = "NON...
mit
48a135bb9efc6f9d748028524531b03b
33.304075
262
0.555972
4.619249
false
false
false
false
richardbuckle/Laurine
Example/Pods/Warp/Source/WRPStructs.swift
1
5988
// // WRPStructs.swift // // Copyright (c) 2016 Jiri Trecak (http://jiritrecak.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 th...
mit
0af7f92634fc23c5deaab63eda5adb35
31.193548
192
0.619906
4.794235
false
false
false
false
ngoctuanqt/IOS
Twitter/Pods/LBTAComponents/LBTAComponents/Classes/DefaultCells.swift
2
1476
// // DefaultCell.swift // Pods // // Created by Brian Voong on 11/22/16. // // import UIKit class DefaultHeader: DefaultCell { override var datasourceItem: Any? { didSet { if datasourceItem == nil { label.text = "This is your default header" } } ...
mit
e4717132689aad4924a26db271e42c2c
21.707692
200
0.553523
4.685714
false
false
false
false
artsy/eigen
ios/Artsy/Views/Auction/SaleArtworkViewModel.swift
1
1960
import Foundation import UIKit @objc class SaleArtworkViewModel: NSObject { fileprivate let saleArtwork: SaleArtwork @objc init(saleArtwork: SaleArtwork) { self.saleArtwork = saleArtwork } } private typealias PublicComputedProperties = SaleArtworkViewModel extension PublicComputedProperties { ...
mit
4a8cc3e9f95459a0ebc7d62d2922cb87
28.69697
96
0.664796
4.875622
false
false
false
false
curoo/IOSKeychain
ConfidoIOS/Keychain.swift
3
11134
// // Keychain.swift // ExpendSecurity // // Created by Rudolph van Graan on 18/08/2015. // // import Foundation public typealias SecItemAttributes = [ String : AnyObject] public typealias ItemReference = AnyObject public typealias KeyChainPropertiesData = [ String : AnyObject] public typealias KeychainItem...
mit
5cc12681ebbca2dcd998c6808a72faeb
41.334601
189
0.690228
4.972756
false
false
false
false
nearfri/Strix
Sources/StrixParsers/JSONParser.swift
1
3224
import Foundation import Strix public struct JSONParser { private let parser: Parser<JSON> public init() { let ws = Parser.many(.whitespace) parser = ws *> Parser.json <* ws <* .endOfStream } public func parse(_ jsonString: String) throws -> JSON { return try parser.ru...
mit
44f8af54e95a765f21ff4040136f95c6
37.843373
100
0.57165
4.024969
false
false
false
false
lgrzywac/SWAPI-Swift
Sources/Networking/Extensions/DataRequest+SwiftyJSON.swift
1
691
// // DataRequest+SwiftyJSON.swift // SWAPI-Swift // // Created by Łukasz Grzywacz on 19/02/2017. // // import Alamofire import SwiftyJSON public extension DataRequest { @discardableResult public func responseSwiftyJSON(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse, JSON?) -...
apache-2.0
7718c62606043f833a5f3724cdf04280
23.642857
138
0.647826
4.394904
false
false
false
false
kunsy/DYZB
DYZB/DYZB/Classes/Main/Controller/CustomNavigationController.swift
1
1801
// // CustomNavigationController.swift // DYZB // // Created by Anyuting on 2017/9/4. // Copyright © 2017年 Anyuting. All rights reserved. // import UIKit class CustomNavigationController: UINavigationController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup af...
mit
0540f964444f1095e430bd6591f3fc0f
31.377358
92
0.628788
4.753463
false
false
false
false
mitochrome/complex-gestures-demo
apps/GestureRecognizer/Carthage/Checkouts/RxSwift/RxExample/RxExample/Examples/UIPickerViewExample/CustomPickerViewAdapterExampleViewController.swift
5
2104
// // CustomPickerViewAdapterExampleViewController.swift // RxExample // // Created by Sergey Shulga on 12/07/2017. // Copyright © 2017 Krunoslav Zaher. All rights reserved. // import UIKit #if !RX_NO_MODULE import RxSwift import RxCocoa #endif final class CustomPickerViewAdapterExampleViewController: Vie...
mit
add50d527e0ee3490ee37f15f40faf68
28.619718
132
0.652401
4.93662
false
false
false
false
tzongw/ReactiveCocoa
ReactiveCocoa/Swift/Signal.swift
1
49967
import Foundation import Result /// A push-driven stream that sends Events over time, parameterized by the type /// of values being sent (`Value`) and the type of failure that can occur (`Error`). /// If no failures should be possible, NoError can be specified for `Error`. /// /// An observer of a Signal will see the ...
mit
b4d7b7c9753d8ba0219e2457deae15da
32.306
341
0.67131
3.622055
false
false
false
false
andriitishchenko/tratata
tratata/tratata/RecorderViewController.swift
1
2190
// // RecorderViewController.swift // tratata // // Created by Andrii Tishchenko on 19.05.15. // Copyright (c) 2015 Andrii Tishchenko. All rights reserved. // import UIKit import Social import MapKit class RecorderViewController: BaseViewController { @IBOutlet var mapView: MKMapView! override func v...
mit
1adc5b63f75976caa7140d66345b8f08
30.285714
162
0.664384
5.046083
false
false
false
false
acrocat/EverLayout
Source/Model/ViewIndex.swift
1
3992
// EverLayout // // Copyright (c) 2017 Dale Webster // // 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, m...
mit
73f3f0ca9ea2a8cf5a213558ec69b78c
34.963964
117
0.619489
4.551881
false
false
false
false
jpedrosa/sua
examples/snippets/xorshift128plus.swift
1
249
var state0: UInt64 = 1 var state1: UInt64 = 2 func xorshift128plus() { var s1 = state0 let s0 = state1 state0 = s0 s1 ^= s1 << 23 s1 ^= s1 >> 17 s1 ^= s0 s1 ^= s0 >> 26 state1 = s1 } xorshift128plus() debugPrint(state0, state1)
apache-2.0
c3820dc1489acd860f8d1b3de4558c3f
12.105263
26
0.594378
2.394231
false
false
false
false
jinseokpark6/u-team
Code/Controllers/CVCalendarMenuView.swift
1
3431
// // CVCalendarMenuView.swift // CVCalendar // // Created by E. Mozharovsky on 12/26/14. // Copyright (c) 2014 GameApp. All rights reserved. // import UIKit class CVCalendarMenuView: UIView { var symbols = [String]() var symbolViews: [UILabel]? var firstWeekday: Weekday { get { ...
apache-2.0
46c656d8f368dcb922007182ddd42262
27.831933
120
0.54299
5.045588
false
false
false
false
mnisn/zhangchu
zhangchu/Pods/SnapKit/Source/Debugging.swift
30
6759
// // SnapKit // // Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit // // 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 limitat...
mit
f116a5911f340c53452a10ebcfabb7b3
32.964824
119
0.572274
4.93718
false
false
false
false
andrew804/vapor-apns-1.2.2
Sources/VaporAPNS/Payload.swift
1
7673
// // Payload.swift // VaporAPNS // // Created by Matthijs Logemann on 01/10/2016. // // import Foundation import JSON import Core open class Payload: JSONRepresentable { /// The number to display as the badge of the app icon. public var badge: Int? /// A short string describing the purpose of the...
mit
f5fd642681292af9d3a983e48eeb2329
32.445415
390
0.607912
4.780899
false
false
false
false
milseman/swift
test/IRGen/protocol_metadata.swift
11
4065
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop protocol A { func a() } protocol B { func b() } protocol C : class { func c() } @objc protocol O { func o()...
apache-2.0
0bbef37e8a14cf6ee742fbd75d8cdc34
40.060606
160
0.651907
3.117331
false
false
false
false
milseman/swift
test/SILGen/protocol_class_refinement.swift
5
4807
// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s protocol UID { func uid() -> Int var clsid: Int { get set } var iid: Int { get } } extension UID { var nextCLSID: Int { get { return clsid + 1 } set { clsid = newValue - 1 } } } protocol ObjectUID : class, UID {} extensio...
apache-2.0
3ee5c287c5db376b2f5e8edb6f96bf0c
38.344262
116
0.533958
2.898551
false
false
false
false
IvanVorobei/TwitterLaunchAnimation
TwitterLaunchAnimation - project/TwitterLaucnhAnimation/sparrow/modules/request-permissions/managers/presenters/universal/controls/SPRequestPermissionTwiceControl.swift
1
8011
// The MIT License (MIT) // Copyright © 2017 Ivan Vorobei (hello@ivanvorobei.by) // // 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 ri...
mit
0b15860be1de6a05ab213631993441b9
38.850746
166
0.65593
5.053628
false
false
false
false
gerlandiolucena/iosvisits
iOSVisits/iOSVisits/Model/MyPlaces.swift
1
555
// // MyPlaces.swift // iOSVisits // // Created by Gerlandio da Silva Lucena on 6/3/16. // Copyright © 2016 ZAP Imóveis. All rights reserved. // import Foundation import CoreLocation import RealmSwift class MyPlaces: Object { dynamic var latitude: Double = 0.0 dynamic var longitude: Double = 0.0 dyna...
gpl-3.0
9edd1a93ecbdab3ea792422c613d7a5b
19.481481
54
0.622061
3.590909
false
false
false
false
LinDing/Positano
Positano/Extensions/UIImage+Yep.swift
1
15399
// // UIImage+Yep.swift // Yep // // Created by NIX on 16/8/10. // Copyright © 2016年 Catch Inc. All rights reserved. // import UIKit // MARK: - Badges extension UIImage { static func yep_badgeWithName(_ name: String) -> UIImage { return UIImage(named: "badge_" + name)! } } // MARK: - Images //...
mit
10d8d1bb8cb21da9b39129090d0733e9
24.574751
308
0.627501
3.987568
false
false
false
false
HabitRPG/habitrpg-ios
HabitRPG/TableViewDataSources/FeedViewDataSource.swift
1
2894
// // FeedViewDataSource.swift // Habitica // // Created by Phillip Thelen on 17.04.18. // Copyright © 2018 HabitRPG Inc. All rights reserved. // import Foundation import Habitica_Models import ReactiveSwift @objc public protocol FeedViewDataSourceProtocol { @objc weak var tableView: UITableView? { get set } ...
gpl-3.0
86fed747533f044bcca6af2d09112eb8
33.035294
109
0.577601
4.781818
false
false
false
false
CaiMiao/CGSSGuide
DereGuide/Toolbox/Colleague/View/ColleagueTableViewCell.swift
1
6904
// // ColleagueTableViewCell.swift // DereGuide // // Created by zzk on 2017/8/15. // Copyright © 2017年 zzk. All rights reserved. // import UIKit import SnapKit protocol ColleagueTableViewCellDelegate: class { func colleagueTableViewCell(_ cell: ColleagueTableViewCell, didTap gameID: String) func colleagu...
mit
1d47a1fb12d2cb7f9e91c7f647572838
37.769663
123
0.661209
4.729952
false
false
false
false
corin8823/SwiftyExtensions
SwiftyExtensions/UICollectionView+Register.swift
1
1466
// // UICollectionView+Register.swift // SwiftyExtensions // // Created by yusuke takahashi on 8/2/15. // Copyright (c) 2015 yusuke takahashi. All rights reserved. // import UIKit extension UICollectionView { public func registerNibFromClass<T: UICollectionViewCell>(type: T.Type) { let className = StringFr...
mit
e7aa4ce90d9a3bf284335174fad5682b
35.675
120
0.757844
4.729032
false
false
false
false
stockx/PinEntryView
PinEntryView/Classes/UIView+Autolayout.swift
1
9433
// // UIView+AutoLayout.swift // PinEntryView // // Created by Josh Sklar on 2/1/17. // Copyright © 2017 StockX. All rights reserved. // import UIKit extension UIView { // MARK: Edges /** Makes the edges of the receiver equal to the edges of `view`. Note: `view` must already be c...
mit
a80c15047afd71ff55bb1a8ebb908e9e
39.480687
160
0.525339
6.829833
false
false
false
false
NoManTeam/Hole
CryptoFramework/Crypto/Algorithm/AES_256_ECB/NSAESString.swift
1
958
// // NSAESString.swift // 密语输入法 // // Created by macsjh on 15/10/17. // Copyright © 2015年 macsjh. All rights reserved. // import Foundation class NSAESString:NSObject { internal static func aes256_encrypt(PlainText:NSString, Key:NSString) -> NSString? { let cstr:UnsafePointer<Int8> = PlainText.cStringUsingEnc...
unlicense
8ce00b9b0062e786e1f1b0c07c7dc88f
24.942857
85
0.708931
3.160279
false
false
false
false
toadzky/SLF4Swift
Backend/CocoaLumberJack/CocoaLumberJack.swift
1
4657
// // CocoaLumberJack.swift // SLF4Swift /* The MIT License (MIT) Copyright (c) 2015 Eric Marchand (phimage) 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 witho...
mit
de7f014b53361606e5ab5f2109ec5a8e
33.25
160
0.690788
4.825907
false
false
false
false
zmian/xcore.swift
Sources/Xcore/Swift/Components/Benchmark.swift
1
1150
// // Xcore // Copyright © 2015 Xcore // MIT license, see LICENSE file for details // import Foundation // Credit: http://stackoverflow.com/a/31412302 /// A convenience function to measure code execution. /// /// **Asynchronous code:** /// /// ```swift /// measure(label: "some title") { finish in /// myAsyncCall...
mit
c73f217e98326f361e2d95852c4aabf1
21.529412
78
0.580505
3.779605
false
false
false
false
ORT-Interactive-GmbH/OnlineL10n
OnlineL10n/UI/CountryController.swift
1
5140
// // CountryController.swift // ORT Interactive // // Created by Alexander Vorobjov on 22/01/15. // Copyright (c) 2015 Alexander Vorobjov. All rights reserved. // public class CountryController: UIViewController { // localization manager has to be set before opening view @objc public var localizationMana...
mit
aee9488aa693db162c46740ef8587ef6
33.965986
129
0.65
5.165829
false
false
false
false
konanxu/WeiBoWithSwift
WeiBo/WeiBo/Classes/Tools/Category/UIView+Category.swift
1
677
// // UIView+Category.swift // WeiBo // // Created by Konan on 16/3/21. // Copyright © 2016年 Konan. All rights reserved. // import UIKit extension UIView{ func getConstraintWidth() ->NSLayoutConstraint?{ let arr = self.constraints for cons in arr{ if(cons.firstAttribute == NSLayou...
mit
8ead7fd4cd4034897be5eee1f96b6d2b
20.09375
64
0.559347
4.648276
false
false
false
false
Jnosh/swift
stdlib/public/core/ArrayType.swift
1
2718
//===--- ArrayType.swift - Protocol for Array-like types ------------------===// // // 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/L...
apache-2.0
1e893416fe8d50bc0b57fd6587e1fe7e
31.357143
80
0.611847
4.84492
false
false
false
false
coach-plus/ios
Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift
6
14262
// // ShareReplayScope.swift // RxSwift // // Created by Krunoslav Zaher on 5/28/17. // Copyright © 2017 Krunoslav Zaher. All rights reserved. // /// Subject lifetime scope public enum SubjectLifetimeScope { /** **Each connection will have it's own subject instance to store replay events.** **Connect...
mit
fba516958e9914031149ae6bd79b35a8
30.274123
164
0.634387
5.037443
false
false
false
false
duliodenis/v
V/V/Model/FirebaseStore.swift
1
4127
// // FirebaseStore.swift // V // // Created by Dulio Denis on 8/18/16. // Copyright © 2016 Dulio Denis. All rights reserved. // import Foundation import Firebase import CoreData class FirebaseStore { private let context: NSManagedObjectContext private let rootRef = Firebase(url: FIREBASE_URL) ...
mit
d644742a2a2cb4e9eb6942877eaa86e1
29.124088
153
0.55332
5.583221
false
false
false
false
sora0077/iTunesMusic
Demo/Views/PlaybackViewController.swift
1
2435
// // PlaybackViewController.swift // iTunesMusic // // Created by 林達也 on 2016/10/17. // Copyright © 2016年 jp.sora0077. All rights reserved. // import UIKit import iTunesMusic private final class InnerShadowView: UIView { private var shadowLayer = CALayer() override func layoutSubviews() { super...
mit
48201be7bcc31838c01948f4b510326f
26.258427
75
0.63108
4.526119
false
false
false
false
HolidayAdvisorIOS/HolidayAdvisor
HolidayAdvisor/HolidayAdvisor/UserListTableViewController.swift
1
5550
// // UserListTableViewController.swift // HolidayAdvisor // // Created by Iliyan Gogov on 4/4/17. // Copyright © 2017 Iliyan Gogov. All rights reserved. // import UIKit class UserTableViewCell: UITableViewCell { @IBOutlet weak var userName: UILabel! @IBOutlet weak var age: UILabel! @IBOutlet wea...
mit
db3049ad241df3492e7cbe863a33ff4c
31.261628
209
0.631105
4.954464
false
false
false
false
ello/ello-ios
Sources/Controllers/Profile/Calculators/ProfileHeaderNamesSizeCalculator.swift
1
1566
//// /// ProfileHeaderNamesSizeCalculator.swift // import PromiseKit class ProfileHeaderNamesSizeCalculator: CellSizeCalculator { override func process() { guard let user = cellItem.jsonable as? User else { assignCellHeight(all: 0) return } l...
mit
6682fcad4da83e981b42f93d813dfabe
26.473684
87
0.538314
5.18543
false
false
false
false
Feverup/braintree_ios
UnitTests/BTJSON_Tests.swift
1
10389
import XCTest class BTJSON_Tests: XCTestCase { func testEmptyJSON() { let empty = BTJSON() XCTAssertNotNil(empty) XCTAssertTrue(empty.isObject) XCTAssertNil(empty.asString()) XCTAssertNil(empty.asArray()) XCTAssertNil(empty.asNumber()) XCTAssertNil(empty.a...
mit
30816f349f1042f83d4dee2f10ec0aa2
34.302721
146
0.600636
4.542232
false
true
false
false
tuffz/pi-weather-app
Carthage/Checkouts/realm-cocoa/Realm/Tests/Swift/SwiftDynamicTests.swift
1
12747
//////////////////////////////////////////////////////////////////////////// // // Copyright 2014 Realm 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/li...
mit
8d7d6286a0046d1893149c6ae72387c7
38.71028
93
0.634188
4.792105
false
true
false
false
apple/swift
test/PrintAsObjC/blocks.swift
7
7436
// Please keep this file in alphabetical order! // RUN: %empty-directory(%t) // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %s -disable-objc-attr-requires-foundation-module // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse-as-library %t/blocks.swiftmodule -typecheck...
apache-2.0
47066d732f19af419724d0040f396f74
49.931507
234
0.669984
3.751766
false
false
false
false
auth0/Lock.swift
Lock/Validators.swift
1
5674
// Validators.swift // // Copyright (c) 2016 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 ...
mit
cc77d074cb35428eec3076e90f8a4d56
38.678322
181
0.688756
4.39845
false
false
false
false
wawandco/away
Pod/Classes/Away.swift
1
2359
import Foundation import CoreLocation public class Away { public class func buildLocation(distanceInMeters: Double, from: CLLocation, bearing: Double=90)-> CLLocation{ var distanceInKm = (distanceInMeters / 1000.0) distanceInKm = distanceInKm / 6371.0 let bearingRad = bearing.toRadians // ...
mit
6e5365e3c62c469f181ae9c4f641762e
36.444444
167
0.679949
4.442561
false
false
false
false
antigp/Alamofire
Tests/RedirectHandlerTests.swift
1
8452
// // RedirectHandlerTests.swift // // Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) // // 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,...
mit
569c99c84c061dd63b7e0be786f64512
36.732143
112
0.64955
4.422815
false
true
false
false
apple/swift-lldb
packages/Python/lldbsuite/test/lang/swift/zero_size_generic_self/main.swift
2
1083
// main.swift // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2019 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/CONTRIB...
apache-2.0
a3c252aabc2279389f8c33d4e3e6aefd
25.414634
115
0.613112
3.773519
false
false
false
false
wireapp/wire-ios-sync-engine
Tests/Source/Integration/ConversationTests+MessageTimer.swift
1
5516
//// // Wire // Copyright (C) 2018 Wire Swiss GmbH // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This pro...
gpl-3.0
bc319e0d871ea2f7969d9d872cf9c966
36.780822
187
0.67694
5.051282
false
false
false
false
Tantalum73/GradientView
GradientView.swift
1
3275
// // GradientView.swift // ClubNews // // Created by Andreas Neusüß on 31.03.15. // Copyright (c) 2015 Anerma. All rights reserved. // import UIKit /** A gradient to lay behind any view that will also be rendered in Interface Builder. */ @IBDesignable final class GradientView: UIView { /** One of th...
mit
4b3c859860a9cda4cc8691081c4005e2
22.546763
123
0.571036
4.689112
false
false
false
false
grafiti-io/SwiftCharts
Examples/Examples/BarsPlusMinusAndLinesExample.swift
1
7533
// // BarsPlusMinusAndLinesExample.swift // SwiftCharts // // Created by ischuetz on 04/05/15. // Copyright (c) 2015 ivanschuetz. All rights reserved. // import UIKit import SwiftCharts class BarsPlusMinusAndLinesExample: UIViewController { fileprivate var chart: Chart? // arc override func viewDidLoad(...
apache-2.0
25633a37da7491175a1b046aff9ac6b8
46.08125
243
0.610912
5.001992
false
false
false
false
Draveness/RbSwift
RbSwiftTests/Sequence/Sequence+BoolSpec.swift
1
1375
// // Sequence+BoolSpec.swift // RbSwift // // Created by draveness on 22/03/2017. // Copyright © 2017 draveness. All rights reserved. // import Quick import Nimble import RbSwift class SequenceBoolSpec: BaseSpec { override func spec() { describe("isAny(closure:)") { it("returns true if ar...
mit
0fee9d89c5ff82afd0caff570fbbe5d8
33.35
99
0.488355
3.925714
false
false
false
false
P0ed/SWLABR
SWLABR/GameView.swift
1
1451
import SceneKit final class GameView: SCNView { func updateDrawableSize() { let layer = self.layer! as! CAMetalLayer layer.drawableSize = bounds.size } override func mouseDown(with event: NSEvent) { /* Called when a mouse click occurs */ // // check what nodes are clicked // let...
mit
9c6c2b18088739df499b733c3195004d
31.244444
77
0.541006
4.606349
false
false
false
false
tsjamm/swift-utils
OptionParser.swift
1
2680
///// OptionParser.swift //// Command Line Options Parser in Swift /// Author: Sai Teja Jammalamadaka // class OptionParser { //// Returns true if parsed correctly, or false if error class func parse(optionsMap:[String:((String?)->Bool)], usage:String) -> Bool { let numOfArgs = Process.argumen...
mit
acaf34a9fa4eec4a0c65074665ae97bd
27.210526
104
0.459328
4.890511
false
false
false
false
blasut/fredrik
fredrik/Place.swift
1
2694
// // Place.swift // fredrik // // Created by jite on 28/10/2015. // Copyright © 2015 Tre Bitar. All rights reserved. // import Foundation import MapKit import AddressBook class Place: NSObject, MKAnnotation { let coordinate: CLLocationCoordinate2D let title: String? let age_limit: String let open...
mit
db0d88d103104957a0396a062155ca40
28.888889
97
0.600967
4.76773
false
false
false
false
hsoi/RxSwift
RxSwift/Observables/Observable+Creation.swift
2
12852
// // Observable+Creation.swift // Rx // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import Foundation @available(*, deprecated=2.0.0, message="Please use `Observable.create`") public func create<E>(subscribe: (AnyObserver<E>) -> Disposable) -> Observable...
mit
f15644e9062ea106a875220203635de4
43.013699
202
0.72259
4.434438
false
false
false
false
customerly/Customerly-iOS-SDK
Pods/Socket.IO-Client-Swift/Source/SocketIO/Manager/SocketManager.swift
2
19916
// // Created by Erik Little on 10/14/17. // // 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...
apache-2.0
38db2d44d09c4a22f3358f9c7c256d79
33.516464
132
0.632155
4.850463
false
true
false
false
MateuszKarwat/Napi
Napi/Models/Subtitle Provider/Supported Subtitle Providers/NapiProjekt.swift
1
4838
// // Created by Mateusz Karwat on 14/01/2017. // Copyright © 2017 Mateusz Karwat. All rights reserved. // import Foundation struct NapiProjekt: SubtitleProvider { let name = "NapiProjekt" let homepage = URL(string: "http://www.napiprojekt.pl")! func searchSubtitles(using searchCritera: SearchCriteria,...
mit
a3bb5da9b42f83763a922d20c8fbfd54
30.822368
128
0.575977
4.482854
false
false
false
false
apple/swift
test/Runtime/concurrentTypeByName.swift
2
34614
// RUN: %target-run-simple-swift // REQUIRES: executable_test // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime import StdlibUnittest import SwiftPrivateThreadExtras protocol P {} class GenericWrapper<T: P> {} let ConcurrentTypeByNameTests = TestSuite("ConcurrentTypeByName") // We're testing fo...
apache-2.0
5b5d1c067b951d2cf357bbcb44c2b031
15.746009
80
0.637574
2.672896
false
false
false
false
hgl888/firefox-ios
Utils/Extensions/StringExtensions.swift
30
3168
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import Foundation public extension String { public func contains(other: String) -> Bool { // rangeOfS...
mpl-2.0
06d242f44ea5e4788783ca3dcaccfceb
35.367816
127
0.624842
4.772247
false
false
false
false
apple/swift
test/AutoDiff/Sema/DerivedConformances/derived_differentiable.swift
2
7920
// RUN: %target-swift-frontend -print-ast-decl %s | %FileCheck %s --check-prefix=CHECK-AST // RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s --check-prefix=CHECK-SIL import _Differentiation struct GenericTangentVectorMember<T: Differentiable>: Differentiable, AdditiveArithmetic { var x: T.TangentVect...
apache-2.0
a9d884fad69cffe1847a382537a2f432
42.516484
371
0.755682
4.47205
false
false
false
false
think-dev/MadridBUS
MadridBUS/Source/UI/WelcomeView.swift
1
9630
import UIKit import MapKit enum WelcomeViewMode { case fullMap(shouldReset: Bool, completionHandler: (()->())?) case foundNodesAround case zeroNodesAround case noLocationPermission } protocol WelcomeView: View { var nodesTableDataSet: [BusGeoNode] { get set } func updateMap(with location:...
mit
253bf1b72bc7f5616f463d9b9f27d5e4
36.181467
191
0.634476
5.208221
false
false
false
false
haddenkim/dew
Sources/App/Models/Place.swift
1
1208
// // Place.swift // dew // // Created by Hadden Kim on 4/26/17. // // import Foundation import MongoKitten final class Place { var id: ObjectId var name: String var coordinate: Coordinate var creatingUser: User var creationDate: Date var openHours: [Weekday:OpenHour] init(id:...
mit
b9a8edde6e7efae4924f0ea94f374427
19.827586
109
0.586093
4.283688
false
false
false
false
WhisperSystems/Signal-iOS
Signal/src/ViewControllers/ConversationView/ConversationViewController+OWS.swift
1
4444
// // Copyright (c) 2019 Open Whisper Systems. All rights reserved. // extension ConversationViewController { @objc func ensureIndexPath(of interaction: TSMessage) -> IndexPath? { return databaseStorage.uiReadReturningResult { transaction in self.conversationViewModel.ensureLoadWindowConta...
gpl-3.0
11ddd1b62bf2d26ae3a58541dbbe0ed2
40.148148
152
0.680693
5.582915
false
false
false
false
yourtion/HTTPDNS-Swift
HTTPDNS/HTTPDNS.swift
1
3566
// // HTTPDNS.swift // HTTPDNS-SwiftDemo // // Created by YourtionGuo on 12/4/15. // Copyright © 2015 Yourtion. All rights reserved. // import Foundation /** * HTTPDNS Result */ public struct HTTPDNSResult { /// IP address public let ip : String /// IP array public let ips : Array<String> /...
mit
ec72e96a7f04d273c28a4f498206672d
24.464286
102
0.5669
4.16472
false
false
false
false
IngmarStein/swift
stdlib/public/SDK/Intents/INSetDefrosterSettingsInCarIntent.swift
5
934
//===----------------------------------------------------------------------===// // // 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/LI...
apache-2.0
a2e6a01f986a8b1a38cda087a4f222ac
28.1875
80
0.586724
4.42654
false
false
false
false
wufeiyue/FYBannerView
FYBannerView/Classes/View/BannerCollectionView.swift
2
2482
// // BannerCollectionView.swift // FYBannerView // // Created by 武飞跃 on 2016/10/2. // import UIKit open class BannerCollectionView: UICollectionView { weak var bannerDataSource: BannerDataSource? weak var bannerDisplayDelegate: BannerDisplayDelegate? weak var bannerLayoutDelegate: Banne...
mit
bb859b7b160e4557569652bbe2798464
26.75
108
0.603194
5.274298
false
false
false
false
theMatys/myWatch
myWatch/Source/UI/Core/MWTabBar.swift
1
17308
// // MWTabBar.swift // myWatch // // Created by Máté on 2017. 07. 13.. // Copyright © 2017. theMatys. All rights reserved. // import UIKit /// The custom-designed tab bar of the application. @IBDesignable class MWTabBar: UITabBar { //MARK: Inspectables /// An Interface Builder-compatible representat...
gpl-3.0
55c1b85d405df4bf38ba465d4d6bad73
37.800448
295
0.58694
4.931604
false
false
false
false
maarten/Ximian
Ximian/StringExtensions.swift
4
3876
/* * StringExtensions.swift * Copyright (c) 2014 Ben Gollmer. * * 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 a...
mit
2a14a087ee5398e4008a92d23ede8ec6
27.711111
104
0.640867
4.058639
false
false
false
false
wangxin20111/WaterFlowView
WaterFlowViewDemo/WaterFlowViewDemo/ViewController.swift
1
1920
// // ViewController.swift // WaterFlowViewDemo // // Created by 王鑫 on 17/4/25. // Copyright © 2017年 王鑫. All rights reserved. // import UIKit import MJExtension let WaterFlowCellReuseIndentifier = "WaterFlowCellReuseIndentifier" class ViewController: UIViewController { private lazy var waterFlowView:Wate...
mit
849794dd1f1dfc243d63224f37b260e3
28.123077
126
0.64448
4.708955
false
false
false
false
lanserxt/teamwork-ios-sdk
TeamWorkClient/TeamWorkClient/ResponseContainer.swift
1
1267
// // ResponseContainer.swift // TeamWorkClient // // Created by Anton Gubarenko on 14.01.17. // Copyright © 2017 Anton Gubarenko. All rights reserved. // import Foundation public enum TWApiStatusCode: String { case OK = "OK" case Undefined = "Other" } public class ResponseContainer<T: Model>{ ...
mit
a9b76e2d211395f6eccfa4fe22ddf9e5
24.836735
118
0.688784
4.489362
false
false
false
false
kstaring/swift
stdlib/public/core/OptionSet.swift
4
15045
//===--- OptionSet.swift --------------------------------------------------===// // // 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/LI...
apache-2.0
ce31d0b1b7239fdafd2986e8d3edb413
40.106557
80
0.665138
4.395267
false
false
false
false
NitWitStudios/NWSExtensions
Example/NWSExtensionsExample/Controllers/View Controllers/NWSModalViewController.swift
1
1252
// // NWSModalViewController.swift // NWSExtensions // // Created by James Hickman on 3/14/17. // Copyright © 2017 CocoaPods. All rights reserved. // import UIKit import NWSExtensions class NWSModalViewController: UIViewController { var animator: NWSModalAnimator! @IBOutlet weak var containerView: UIView!...
mit
2397a130761c1bb7ffb872865d92ef80
27.431818
171
0.691447
5.127049
false
false
false
false
renesto/SkypeExportSwift
SkypeExport/AppDelegate.swift
1
12357
// // AppDelegate.swift // SkypeExport // // Created by Aleksandar Kovacevic on 2/11/15. // Copyright (c) 2015 Aleksandar Kovacevic. All rights reserved. // import Cocoa import Foundation @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { //@IBOutlet weak var skypeUserName: NSComboBox! ...
apache-2.0
12640fa4a22b6d8e7f25348ec989547e
34.915698
150
0.610603
4.862259
false
false
false
false
danghoa/GGModules
GGModules/AppDelegate/AppDelegate.swift
1
2994
// // AppDelegate.swift // GGModuleLogin // // Created by Đăng Hoà on 1/11/17. // Copyright © 2017 Green Global. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaun...
mit
6beb06a231ad554598bdddc8478c467f
39.405405
281
0.731773
4.950331
false
false
false
false
zaneswafford/ProjectEulerSwift
ProjectEulerTests/ZSMathTests.swift
1
2154
// // ZSMathTests.swift // ProjectEuler // // Created by Zane Swafford on 6/17/15. // Copyright (c) 2015 Zane Swafford. All rights reserved. // import Cocoa import XCTest class ZSMathTests: XCTestCase { func testFibonacci() { // Test the first couple values var actualFibonacci = [0, 1, 1,...
bsd-2-clause
973b8e276c945b2a875b1934737794f3
26.628205
101
0.527855
3.888087
false
true
false
false
kgn/KGNThread
Source/Thread.swift
1
3413
// // Thread.swift // KGNThread // // Created by David Keegan on 1/24/15. // Copyright (c) 2014 David Keegan. All rights reserved. // import Foundation private let diskQueue = dispatch_queue_create("kgn.thread.disk", DISPATCH_QUEUE_SERIAL) public struct Thread { private static func Dispatch(delay delay: NST...
mit
e3f63dd46df85974618a6ed66122efff
36.097826
121
0.652798
4.438231
false
false
false
false
GraphQLSwift/GraphQL
Sources/GraphQL/Map/Map.swift
1
24693
import Foundation import OrderedCollections // MARK: MapError public enum MapError: Error { case incompatibleType case outOfBounds case valueNotFound } // MARK: Map public enum Map { case undefined case null case bool(Bool) case number(Number) case string(String) case array([Map]...
mit
641266b5642d45e53ebf866b8a0b4862
24.456701
155
0.507674
4.919904
false
false
false
false
benlangmuir/swift
test/Concurrency/unavailable_from_async.swift
5
6493
// RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -emit-module-path %t/UnavailableFunction.swiftmodule -module-name UnavailableFunction -warn-concurrency %S/Inputs/UnavailableFunction.swift // RUN: %target-swift-frontend -typecheck -verify -I %t %s // REQUIRES: concurrency import UnavailableFun...
apache-2.0
2d906eec4e4ff064bc29a1205070daa4
38.114458
183
0.684583
3.988329
false
false
false
false
whitepixelstudios/Material
Sources/iOS/Icon.swift
4
7043
/* * Copyright (C) 2015 - 2017, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.com>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain t...
bsd-3-clause
26b1acc94e5caed81d514eaaaa8d0d7f
51.17037
104
0.717592
3.825638
false
false
false
false
Den-Ree/InstagramAPI
src/InstagramAPI/Pods/ObjectMapper/Sources/MapError.swift
2
2426
// // MapError.swift // ObjectMapper // // Created by Tristan Himmelman on 2016-09-26. // // The MIT License (MIT) // // Copyright (c) 2014-2016 Hearst // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to de...
mit
8996f14de08f96b49ee32055093144b0
34.676471
142
0.704452
3.925566
false
false
false
false
tamanyan/SwiftPageMenu
PageMenuExample/Sources/AppDelegate.swift
1
3550
// // AppDelegate.swift // PageMenuExample // // Created by Tamanyan on 3/7/17. // Copyright © 2017 Tamanyan. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaun...
mit
82ff4ef3c124dc15bd82bb4d493adbf6
51.970149
285
0.754297
5.78956
false
false
false
false
fleurdeswift/code-editor
CodeEditorView/CodeEditorView+Draw.swift
1
3185
// // CodeEditorView+Draw.swift // CodeEditorView // // Copyright © 2015 Fleur de Swift. All rights reserved. // import Foundation public extension CodeEditorView { private func drawLines() { let drawContext = self.drawContext; let context = drawContext.contextRef!; var lin...
mit
1d6e2eef0172dc1e70756d98cb824047
31.489796
96
0.580088
5.211129
false
false
false
false
CryptoKitten/CryptoEssentials
Sources/CFB.swift
1
2326
// Originally based on CryptoSwift by Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com> // Copyright (C) 2014 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com> // This software is provided 'as-is', without any express or implied warranty. // // In no event will the authors be held liable for any damages arising fro...
mit
00ee400d2bdd6411bdadc4615ddec0ce
48.446809
216
0.672547
5.269841
false
false
false
false