repo_name
stringlengths
6
91
path
stringlengths
6
999
copies
stringclasses
283 values
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
ngageoint/mage-ios
Mage/Navigation/NavigationOverlay.swift
1
807
// // NavigationOverlay.swift // // Created by Tyler Burgett on 8/21/20. // Copyright © 2020 NGA. All rights reserved. // import Foundation import MapKit class NavigationOverlay: MKPolyline, OverlayRenderable { var color: UIColor = UIColor.systemRed var lineWidth: CGFloat = 1.0 var renderer: MKOve...
apache-2.0
carabina/ColorDebugView
ColorDebugViewExample/ViewController.swift
2
1176
// // ViewController.swift // ColorDebugViewExample // // Created by Jonathan Hull on 7/30/15. // Copyright © 2015 Jonathan Hull. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after lo...
mit
swift-lang/swift-k
tests/language-behaviour/mappers/071-singlefilemapper-input.swift
2
243
type messagefile; app (messagefile o) write(messagefile i) { echo @filename(i) stdout=@filename(o); } messagefile infile <"071-singlefilemapper-input.in">; messagefile outfile <"071-singlefilemapper-input.out">; outfile = write(infile);
apache-2.0
brightdigit/tubeswift
TubeSwift/SubscriptionClient.swift
1
3258
// // SubscriptionClient.swift // TubeSwift // // Created by Leo G Dion on 4/29/15. // Copyright (c) 2015 Leo G Dion. All rights reserved. // public struct SubscriptionSubscriberSnippet { public let title:String public let description:String public let channelId:String public let thumbnails:[String:Thumbnail]...
mit
justindarc/focus
Blockzilla/DictionaryExtensions.swift
4
377
/* 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 extension Dictionary { public mutating func merge(with dictionary: Dictionary) { di...
mpl-2.0
ShiWeiCN/Goku
Goku/Source/Maker/AlertMakerFinalizable.swift
1
1629
// AlertMakerFinalizable.swift // Goku (https://github.com/ShiWeiCN/Goku) // // // Copyright (c) 2017 shiwei (http://shiweicn.github.io/) // // 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
lukaszwas/mcommerce-api
Sources/App/Controllers/UserController.swift
1
1719
import Vapor import HTTP // /users final class UserController: ResourceRepresentable { // GET / // Get all users func getAllUsers(req: Request) throws -> ResponseRepresentable { return try User.all().makeJSON() } // GET /:id // Get user with id func getUserWithId(req: Request, ...
mit
kperson/FSwift
FSwift/Dictionary/Dictionary.swift
1
329
// // Dictionary.swift // FSwift // // Created by Maxime Ollivier on 1/27/15. // Copyright (c) 2015 Kelton. All rights reserved. // import Foundation extension Dictionary { mutating func addOptional(_ optional:Value?, forKey:Key) { if let object = optional { self[forKey] = object }...
mit
mathcamp/hldb
Example/Todotastic/Carthage/Checkouts/hldb/Carthage/Checkouts/BrightFutures/Carthage/Checkouts/Result/Tests/Result/ResultTests.swift
8
7300
// Copyright (c) 2015 Rob Rix. All rights reserved. final class ResultTests: XCTestCase { func testMapTransformsSuccesses() { XCTAssertEqual(success.map { $0.characters.count } ?? 0, 7) } func testMapRewrapsFailures() { XCTAssertEqual(failure.map { $0.characters.count } ?? 0, 0) } func testInitOptionalSucc...
mit
Ryce/flickrpickr
Carthage/Checkouts/judokit/Example-Swift/JudoKitSwiftExample/ExampleAppCredentials.swift
2
1313
// // ExampleAppCredentials.swift // JudoKitSwiftExample // // Copyright (c) 2016 Alternative Payments Ltd // // 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, inc...
mit
kishanravindra/load-facebook-profile-ios-swift
LoadFacebookProfileKitTests/FakeLoginWithFacebookTests.swift
3
3052
import Foundation import XCTest @testable import LoadFacebookProfileKit class FakeLoginWithFacebookTests: XCTestCase { var dictionary: [String: AnyObject]! override func setUp() { super.setUp() } override func tearDown() { super.tearDown() FacebookUserLoader.simulateLoadAfterDelay = 0.1 F...
mit
ProsoftEngineering/TimeMachineRemoteStatus
TimeMachineRemoteStatus/ProcessExtensions.swift
1
2476
// Copyright © 2016-2017, Prosoft Engineering, Inc. (A.K.A "Prosoft") // 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 the above copyright //...
bsd-3-clause
asp2insp/yowl
yowl/ResultsStore.swift
1
1171
// // ResultsStore.swift // yowl // // Created by Josiah Gaskin on 5/17/15. // Copyright (c) 2015 Josiah Gaskin. All rights reserved. // import Foundation let RESULTS = Getter(keyPath:["results", "businesses"]) // ID: results class SearchResultsStore : Store { override func getInitialState() -> Immutable.St...
mit
openbuild-sheffield/jolt
Sources/RouteCMS/validate.BodyTemplatePath.swift
1
287
import OpenbuildExtensionPerfect //TODO / FIXME - change this to a closure and check if the template exists let ValidateBodyTemplatePath = RequestValidationBody( name: "template_path", required: true, type: RequestValidationTypeString( regex: "^(.*){1,255}$" ) )
gpl-2.0
natecook1000/swift
stdlib/public/SDK/Foundation/NSDictionary.swift
1
9274
//===----------------------------------------------------------------------===// // // 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
kstaring/swift
validation-test/compiler_crashers_fixed/26917-swift-nominaltype-get.swift
11
423
// 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...
apache-2.0
sync/NearbyTrams
NearbyTramsKit/Source/RouteViewModel.swift
1
1247
// // Copyright (c) 2014 Dblechoc. All rights reserved. // import Foundation public class RouteViewModel: Equatable { public let identifier: String public var routeNo: String public var routeDescription: String public var downDestination: String public var upDestination: String public let col...
mit
acastano/swift-bootstrap
userinterfacekit/Sources/Classes/Utils/Extensions/UICollectionView+Utils.swift
1
554
import UIKit public extension UICollectionView { public var centerPoint: CGPoint { get { return CGPoint(x:center.x + contentOffset.x, y:center.y + contentOffset.y) } } public var centerCellIndexPath: IndexPath? { ...
apache-2.0
wikimedia/wikipedia-ios
WMF Framework/TimelineView.swift
1
11539
import UIKit public class TimelineView: UIView { public enum Decoration { case doubleDot, singleDot, squiggle } public override init(frame: CGRect) { super.init(frame: frame) setup() } public required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder)...
mit
mleiv/MEGameTracker
MEGameTracker/Models/CloudKit/CloudKit Records/CloudKitNotes.swift
1
5777
// // GameNotes.swift // MEGameTracker // // Created by Emily Ivie on 12/31/16. // Copyright © 2016 Emily Ivie. All rights reserved. // import Foundation import CoreData import CloudKit extension Note: CloudDataStorable { /// (CloudDataStorable Protocol) /// Set any additional fields, specific to the obj...
mit
hellogaojun/Swift-coding
03-运算符/03-运算符/main.swift
1
2058
// // main.swift // 03-运算符 // // Created by gaojun on 16/4/2. // Copyright © 2016年 高军. All rights reserved. // import Foundation print("Hello, World!") /* 算术运算符: 除了取模, 其它和OC一样, 包括优先级 + - * / % ++ -- */ var result = 10 + 10 result = 10 * 10 result = 10 - 10 result = 10 / 10 print(result) /* 取模 % OC: 只能对整数取模 NSL...
apache-2.0
coodly/TalkToCloud
Sources/TalkToCloud/Raw.ZoneID.swift
1
768
/* * Copyright 2020 Coodly LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
apache-2.0
gusrsilva/Picture-Perfect-iOS
PicturePerfect/ShadowImageView.swift
1
843
// // ShadowImageView.swift // PicturePerfect // // Created by Gus Silva on 4/16/17. // Copyright © 2017 Gus Silva. All rights reserved. // import UIKit class ShadowImageView: UIImageView { /* // Only override draw() if you perform custom drawing. // An empty implementation adversely affects performa...
apache-2.0
amarantine308/OneDayOneDemo_Swift
Day9_video/VideoViewTest/VideoView/AppDelegate.swift
1
2174
// // AppDelegate.swift // VideoView // // Created by 冯毅潇 on 2018/2/26. // Copyright © 2018年 冯毅潇. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOp...
gpl-3.0
ustwo/mockingbird
Sources/ResourceKit/Helpers/ResourceHandler.swift
1
1444
// // SwaggerParser.swift // Mockingbird // // Created by Aaron McTavish on 20/12/2016. // Copyright © 2016 ustwo Fampany Ltd. All rights reserved. // import Foundation import LoggerAPI public struct ResourceHandler { // MARK: - Properties private static let sampleName = "sample_swagger" private st...
mit
gabrielfalcao/MusicKit
MusicKit/ScaleQuality.swift
1
1199
// Copyright (c) 2015 Ben Guo. All rights reserved. import Foundation public enum ScaleQuality : String { case Chromatic = "Chromatic" case Wholetone = "Wholetone" case Octatonic1 = "Octatonic mode 1" case Octatonic2 = "Octatonic mode 2" case Major = "Major" case Dorian = "Dorian" case Ph...
mit
casd82/powerup-iOS
Powerup/OOC-Event-Classes/SoundPlayer.swift
1
1532
import UIKit import AVFoundation import AudioToolbox /** Creates a strong reference to AVAudioPlayer and plays a sound file. Convenience class to declutter controller classes. Example Use ``` let soundPlayer : SoundPlayer? = SoundPlayer() guard let player = self.soundPlayer else {return} // player.playSound(fil...
gpl-2.0
mownier/photostream
Photostream/Module Extensions/FollowListModuleExtension.swift
1
1214
// // FollowListModuleExtension.swift // Photostream // // Created by Mounir Ybanez on 17/01/2017. // Copyright © 2017 Mounir Ybanez. All rights reserved. // import UIKit extension FollowListModule { convenience init() { self.init(view: FollowListViewController()) } } extension FollowListDis...
mit
flydream2046/symbolicator
symbolicator/Options.swift
1
730
/* Created by Tomaz Kragelj on 11.06.2014. Copyright (c) 2014 Gentle Bytes. All rights reserved. */ import Foundation class Options: GBOptionsHelper { override init() { super.init() self.applicationVersion = { "1.0" } self.applicationBuild = { "99" } self.printHelpHeader = { "Usage: %APPNAME [OPTIONS] <...
mit
huangxinping/XPKit-swift
Source/Extensions/UIKit/UINavigationBar+XPKit.swift
1
2097
// // UINavigationBar+XPKit.swift // XPKit // // The MIT License (MIT) // // Copyright (c) 2015 - 2016 Fabrizio Brancati. 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 ...
mit
lhx931119/DouYuTest
DouYu/DouYu/Classes/Tools/NetWorkTools.swift
1
791
// // NetWorkTools.swift // DouYu // // Created by 李宏鑫 on 17/1/15. // Copyright © 2017年 hongxinli. All rights reserved. // import UIKit import Alamofire enum MethodType { case GET case POST } class NetWorkTools{ class func requestForData(methodType: MethodType, urlString: String, parpams: [Str...
mit
alessiobrozzi/firefox-ios
Storage/SQL/DeferredDBOperation.swift
2
3685
/* 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 import Shared import XCGLogger import Deferred private let log = Logger.syncLogger private let ...
mpl-2.0
rlopezdiez/RLDNavigationSwift
Classes/UINavigationController+RLDNavigationSetup.swift
1
2691
import UIKit extension UINavigationController { func findDestination(navigationSetup navigationSetup:RLDNavigationSetup) -> UIViewController? { for viewController:UIViewController in Array((viewControllers ).reverse()) { if viewController.isDestinationOf(navigationSetup) { ...
apache-2.0
wireapp/wire-ios
Wire-iOS Tests/ProfileTitleViewSnapshotTests.swift
1
1494
// Wire // Copyright (C) 2020 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 program ...
gpl-3.0
tamanyan/SwiftPageMenu
Package.swift
1
1114
// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "SwiftPageMenu", platforms: [ .iOS(.v12), ], products: [ // Products define the executables and libraries ...
mit
danielsaidi/KeyboardKit
Sources/KeyboardKit/Extensions/View+Frame.swift
1
368
// // View+Frame.swift // KeyboardKit // // Created by Daniel Saidi on 2021-01-08. // Copyright © 2021 Daniel Saidi. All rights reserved. // import SwiftUI public extension View { /** Apply the size of a `CGSize` to the view. */ func frame(_ size: CGSize) -> some View { self.frame(w...
mit
exponent/exponent
packages/expo-dev-menu-interface/ios/DevMenuExtensionProtocol.swift
2
1451
// Copyright 2015-present 650 Industries. All rights reserved. import Foundation @objc public protocol DevMenuExtensionSettingsProtocol { func wasRunOnDevelopmentBridge() -> Bool } /** A protocol for React Native bridge modules that want to provide their own dev menu actions. */ @objc public protocol DevMenuExte...
bsd-3-clause
esttorhe/SlackTeamExplorer
SlackTeamExplorer/Pods/Nimble/Nimble/Wrappers/MatcherFunc.swift
74
3742
/// A convenience API to build matchers that allow full control over /// to() and toNot() match cases. /// /// The final bool argument in the closure is if the match is for negation. /// /// You may use this when implementing your own custom matchers. /// /// Use the Matcher protocol instead of this type to accept cust...
mit
BareFeetWare/BFWControls
BFWControls/Modules/Transition/View/UIViewController+Segue.swift
1
683
// // UIViewController+Segue.swift // BFWControls // // Created by Tom Brodhurst-Hill on 21/04/2016. // Copyright © 2016 BareFeetWare. // Free to use at your own risk, with acknowledgement to BareFeetWare. // import UIKit public extension UIViewController { func canPerformSegue(identifier: String) -> Bo...
mit
ksco/swift-algorithm-club-cn
Breadth-First Search/BreadthFirstSearch.playground/Pages/Simple example.xcplaygroundpage/Contents.swift
1
1187
func breadthFirstSearch(graph: Graph, source: Node) -> [String] { var queue = Queue<Node>() queue.enqueue(source) var nodesExplored = [source.label] source.visited = true while let node = queue.dequeue() { for edge in node.neighbors { let neighborNode = edge.neighbor if !neighborNode.visited...
mit
ibhupi/cksapp
ios-app/cksapp/Classes/ViewControllers/Views/ContainerCollectionViewCell.swift
1
1173
// // ContainerCollectionViewCell.swift // cksapp // // Created by Bhupendra Singh on 7/2/16. // Copyright © 2016 Bhupendra Singh. All rights reserved. // import UIKit class ContainerCollectionViewCell: BaseCollectionViewCell { @IBOutlet weak var collectionView: BaseCollectionView! @IBOutlet weak var...
apache-2.0
thefuntasty/Sonar
Sources/Sonar/SonarItemView.swift
1
163
import UIKit public struct SonarPosition { let waveIndex: Int let itemIndex: Int } open class SonarItemView: UIView { var position: SonarPosition! }
mit
ifels/swiftDemo
SnapKitDrawer/SnapKitDrawer/src/home/HomeController.swift
1
1699
// // ViewController.swift // SnapKitDrawer // // Created by 聂鑫鑫 on 16/11/10. // Copyright © 2016年 ifels. All rights reserved. // import UIKit class HomeController: DPDrawerViewController { var drawerView: UIView! override func viewDidLoad() { super.viewDidLoad() // Do any additi...
apache-2.0
robvs/MVVMSample
MVVMSample/MVVMSampleTests/HomeViewModelTests.swift
1
4590
// // HomeViewModelTests.swift // MVVMSample // // Created by Rob Vander Sloot on 3/17/17. // Copyright © 2017 Random Visual. All rights reserved. // import XCTest //@testable import MVVMSample class HomeViewModelTests: XCTestCase { // MARK: Setup/Teardown override func setUp() { super.s...
mit
airspeedswift/swift-compiler-crashes
crashes-fuzzing/00511-swift-constraints-constraintlocator-profile.swift
1
265
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing var f = 1 var e: Int let : Int = { c, b in } (f, e) struct d<f where g = f { { } struct B<T : A
mit
kean/Nuke
Tests/NukeExtensionsTests/ImageViewIntegrationTests.swift
1
4000
// The MIT License (MIT) // // Copyright (c) 2015-2022 Alexander Grebenyuk (github.com/kean). import XCTest @testable import Nuke @testable import NukeExtensions #if os(iOS) || os(tvOS) || os(macOS) @MainActor class ImageViewIntegrationTests: XCTestCase { var imageView: _ImageView! var pipeline: ImagePipelin...
mit
AbhishekThorat/TAGKeyboard
Example/TAGKeyboard/AppDelegate.swift
1
2156
// // AppDelegate.swift // TAGKeyboard // // Created by AbhishekThorat on 05/27/2016. // Copyright (c) 2016 AbhishekThorat. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, ...
mit
BrisyIOS/zhangxuWeiBo
zhangxuWeiBo/zhangxuWeiBo/classes/Discover/Controller/DiscoverController.swift
1
873
// // DiscoverController.swift // zhangxuWeiBo // // Created by zhangxu on 16/6/11. // Copyright © 2016年 zhangxu. All rights reserved. // import UIKit class DiscoverController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the v...
apache-2.0
ahoppen/swift
validation-test/compiler_crashers_fixed/26242-swift-typechecker-validatedecl.swift
65
464
// 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...
apache-2.0
dreamsxin/swift
validation-test/compiler_crashers_fixed/00957-void.swift
11
599
// 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...
apache-2.0
Codility-BMSTU/Codility
Codility/Codility/ServiceCell.swift
1
591
// // ServiceCell.swift // OpenBank // // Created by Aleksander Evtuhov on 16/09/2017. // Copyright © 2017 Aleksander Evtuhov. All rights reserved. // import UIKit class ServiceCell: UITableViewCell { @IBOutlet weak var service: UILabel! @IBOutlet weak var queue: UILabel! override func...
apache-2.0
okkhoury/SafeNights_iOS
SafeNights/HistoryController.swift
1
16829
// // HistoryController.swift // SafeNights // // Created by Owen Khoury on 5/13/17. // Copyright © 2017 SafeNights. All rights reserved. // import UIKit import Siesta import Charts /** * Controller for getting history of previous nights. * Currently just tests that controller can get previous night * history...
mit
ask-fm/AFMActionSheet
Example/AFMActionSheet/ViewController.swift
1
990
// // ViewController.swift // AFMActionSheet // // Created by Ilya Alesker on 08/26/2015. // Copyright (c) 2015 Ask.fm Europe, Ltd. All rights reserved. // import UIKit import AFMActionSheet class ViewController: UIViewController { @IBOutlet var titleView: UIView! @IBAction func buttonTapped(_ sender: A...
mit
albinekcom/BitBay-Ticker-iOS
Codebase/Details/Row/DetailsRowViewModel.swift
1
203
struct DetailsRowViewModel: Identifiable, Equatable { var id: String { title } let title: String let valueString: String let valueStringColorStyle: StringColorStyle }
mit
ben-ng/swift
validation-test/compiler_crashers_fixed/00585-getselftypeforcontainer.swift
1
566
// 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 https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the li...
apache-2.0
ben-ng/swift
validation-test/compiler_crashers_fixed/25777-swift-modulefile-gettype.swift
1
450
// 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 https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the li...
apache-2.0
sdhzwm/BaiSI-Swift-
BaiSi/Pods/Kingfisher/Kingfisher/UIImageView+Kingfisher.swift
1
10593
// // UIImageView+Kingfisher.swift // Kingfisher // // Created by Wei Wang on 15/4/6. // // Copyright (c) 2015 Wei Wang <onevcat@gmail.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...
apache-2.0
josve05a/wikipedia-ios
Wikipedia/Code/ArticlePlaceView.swift
1
22597
import UIKit import WMF import MapKit protocol ArticlePlaceViewDelegate: NSObjectProtocol { func articlePlaceViewWasTapped(_ articlePlaceView: ArticlePlaceView) } class ArticlePlaceView: MapAnnotationView { static let smallDotImage = #imageLiteral(resourceName: "places-dot-small") static let mediumDotImag...
mit
mrdepth/Neocom
Legacy/Neocom/Neocom/UIColor+NC.swift
2
1216
// // UIColor+NC.swift // Neocom // // Created by Artem Shimanski on 14.12.16. // Copyright © 2016 Artem Shimanski. All rights reserved. // import UIKit extension UIColor { convenience init(security: Float) { if security >= 1.0 { self.init(number: 0x2FEFEFFF) } else if security >= 0.9 { self.init(num...
lgpl-2.1
Decybel07/L10n-swift
Source/Core/Plural/Plural.swift
1
3670
// // Plural.swift // L10n_swift // // Created by Adrian Bobrowski on 09.11.2017. // Copyright © 2017 Adrian Bobrowski (Decybel07), adrian071993@gmail.com. All rights reserved. // import Foundation internal enum Plural: String { case zero case one case two case few case many case other ...
mit
kaushaldeo/Olympics
Olympics/Views/KDPhaseView.swift
1
826
// // KDPhaseView.swift // Olympics // // Created by Kaushal Deo on 7/22/16. // Copyright © 2016 Scorpion Inc. All rights reserved. // import UIKit class KDPhaseView: UITableViewHeaderFooterView { @IBOutlet weak var titleLabel: UILabel! override func drawRect(rect: CGRect) { // Drawing c...
apache-2.0
ioan-chera/DoomMakerSwift
DoomMakerSwift/Geom.swift
1
9961
/* DoomMaker Copyright (C) 2017 Ioan Chera 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 program is distributed...
gpl-3.0
335g/Bass
Bass/Functions/Undefined.swift
1
153
// Copyright © 2016 Yoshiki Kudo. All rights reserved. public func undefined<T>(message: String = "called undefined()") -> T { fatalError(message) }
mit
victorchee/TableView
TableView/TableView/ViewController.swift
1
2941
// // ViewController.swift // TableView // // Created by qihaijun on 11/10/15. // Copyright © 2015 VictorChee. All rights reserved. // import UIKit class ViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() // Normally, a cell’s height is determin...
mit
mquocdung/nullapp
nullapp/DetailViewController.swift
1
994
// // DetailViewController.swift // nullapp // // Created by mquocdung on 1/17/17. // Copyright © 2017 mquocdung. All rights reserved. // import UIKit class DetailViewController: UIViewController { @IBOutlet weak var detailDescriptionLabel: UILabel! var detailItem: AnyObject? { didSet { ...
gpl-3.0
VojtaStavik/ProtocolUI
ProtocolUITests/TransluentTRUEProtocolTest.swift
1
1729
// // TransluentTRUEProtocolTest.swift // ProtocolUI // // Created by STRV on 20/08/15. // Copyright © 2015 Vojta Stavik. All rights reserved. // import XCTest @testable import ProtocolUI class TransluentTRUEProtocolTest: XCTestCase { typealias CurrentTestProtocol = TransluentTRUE typealias...
mit
KoCMoHaBTa/MHAppKit
MHAppKitTests/XCTestExtensions.swift
1
2286
// // XCTestExtensions.swift // https://gist.github.com/KoCMoHaBTa/4ba07984d7c95822bc05 // // Created by Milen Halachev on 3/18/16. // Copyright © 2016 Milen Halachev. All rights reserved. // #if !os(watchOS) import Foundation import XCTest extension XCTestCase { public func performExpectation(descriptio...
mit
khizkhiz/swift
validation-test/stdlib/StdlibUnittest.swift
1
15447
// RUN: %target-run-simple-swift | FileCheck %s // REQUIRES: executable_test import SwiftPrivate import StdlibUnittest // Also import modules which are used by StdlibUnittest internally. This // workaround is needed to link all required libraries in case we compile // StdlibUnittest with -sil-serialize-all. #if _runt...
apache-2.0
bit6/bit6-ios-sdk
CoreSamples/Bit6FullDemo-Swift/Bit6ChatDemo-Swift/ChatsTableViewController.swift
1
12646
// // ChatsTableViewController.swift // Bit6ChatDemo-Swift // // Created by Carlos Thurber Boaventura on 07/08/14. // Copyright (c) 2014 Bit6. All rights reserved. // import UIKit import MobileCoreServices import Bit6 class ChatsTableViewController: UITableViewController, UITextFieldDelegate { var conversati...
mit
tkremenek/swift
test/Sema/availability_nonoverlapping.swift
13
11256
// RUN: not %target-swift-frontend -typecheck %s -swift-version 4 2> %t.4.txt // RUN: %FileCheck -check-prefix=CHECK -check-prefix=CHECK-4 %s < %t.4.txt // RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.4.txt // RUN: not %target-swift-frontend -typecheck %s -swift-version 5 2> %t.5.txt // RUN: %FileCheck -check-prefix...
apache-2.0
movem3nt/StreamBaseKit
StreamBaseKit/UnionStream.swift
2
4286
// // UnionStream.swift // StreamBaseKit // // Created by Steve Farrell on 8/31/15. // Copyright (c) 2015 Movem3nt, Inc. All rights reserved. // import Foundation /** Compose a stream out of other streams. Some example use cases are: - Placeholders - Multiple Firebase queries in one view It's o...
mit
alienorb/Vectorized
Vectorized/Parser/SVGPathCommand.swift
1
11308
//--------------------------------------------------------------------------------------- // The MIT License (MIT) // // Created by Arthur Evstifeev on 5/29/12. // Modified by Michael Redig 9/28/14 // Ported to Swift by Brian Christensen <brian@alienorb.com> // // Copyright (c) 2012 Arthur Evstifeev // Copyright (c) 20...
mit
mac-cain13/DocumentStore
DocumentStore/Transaction/CoreDataTransaction.swift
1
8071
// // CoreDataTransaction.swift // DocumentStore // // Created by Mathijs Kadijk on 12-11-16. // Copyright © 2016 Mathijs Kadijk. All rights reserved. // import Foundation import CoreData class CoreDataTransaction: ReadWritableTransaction { private let context: NSManagedObjectContext private let validatedDocu...
mit
jkolb/Shkadov
Sources/PlatformXCB/Output.swift
1
1553
/* The MIT License (MIT) Copyright (c) 2016 Justin Kolb 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, ...
mit
acort3255/Emby.ApiClient.Swift
Emby.ApiClient/apiinteraction/discovery/ServerLocator.swift
1
5900
// // ServerLocator.swift // Emby.ApiClient // // Created by Vedran Ozir on 03/11/15. // Copyright © 2015 Vedran Ozir. All rights reserved. // import Foundation import CocoaAsyncSocket public class ServerLocator: NSObject, ServerDiscoveryProtocol, GCDAsyncUdpSocketDelegate { private let logger: ILogger ...
mit
thomasmeagher/TimeMachine
TimeMachine/Controllers/DataController.swift
2
1991
// // DataController.swift // HuntTimehop // // Created by thomas on 12/23/14. // Copyright (c) 2014 thomas. All rights reserved. // import Foundation import UIKit class DataController { class func jsonTokenParser(json: NSDictionary) -> Token? { var token: Token? if let json = json["access_token"] { ...
mit
naokits/my-programming-marathon
NCMB_iOSAppDemo/NCMB_iOSAppDemo/Config.swift
1
793
// // Config.swift // NCMB_iOSAppDemo // // Created by Naoki Tsutsui on 1/30/16. // Copyright © 2016 Naoki Tsutsui. All rights reserved. // import Foundation import NCMB /** アプリケーションキー及び、クライアントキーはご自身のものをご利用ください。 */ // アプリケーションキー) let applicationKey = "c951b57a31dafc86f076fa9f1baea6e9859bc1dd7f740c77799c05161...
mit
LarsStegman/helios-for-reddit
Sources/Model/Thing.swift
1
396
// // Thing.swift // Helios // // Created by Lars Stegman on 29-12-16. // Copyright © 2016 Stegman. All rights reserved. // import Foundation public protocol Thing: Decodable, Kindable { var id: String { get } var fullname: String { get } static var kind: Kind { get } } extension Thing { public v...
mit
HackMobile/music-interval-app
GymJamsV2/GymJamsV2/PlayerViewController.swift
1
3986
// // PlayerViewController.swift // GymJamsV2 // // Created by Kyle on 7/8/17. // Copyright © 2017 Kevin Nguyen. All rights reserved. // import UIKit class PlayerViewController: UIViewController, SPTAudioStreamingPlaybackDelegate, SPTAudioStreamingDelegate{ @IBOutlet weak var imageView: UIImageView! ...
mit
VernierSoftwareTechnology/UIAlertWrapper
UIAlertWrapper.swift
1
11791
// // UIAlertWrapper.swift // UIAlertWrapper // // Created by Ruben Niculcea on 8/20/14. // Copyright (c) 2014 Vernier Software & Technology. All rights reserved. // import Foundation import UIKit private enum PresententionStyle { case Rect (CGRect) case BarButton (UIBarButtonItem) } private let alertDel...
mit
wenghengcong/Coderpursue
BeeFun/BeeFun/View/Search/ResultResponse/SEResponseRepos.swift
1
606
// // ObjSearchReposResponse.swift // BeeFun // // Created by WengHengcong on 4/9/16. // Copyright © 2016 JungleSong. All rights reserved. // import UIKit import ObjectMapper class SEResponseRepos: NSObject, Mappable { var totalCount: Int? var incompleteResults: Bool? var items: [ObjRepos]? over...
mit
gkgy/smallios
changelabel/changelabel/AppDelegate.swift
1
2168
// // AppDelegate.swift // changelabel // // Created by 高坤 on 2017/4/15. // Copyright © 2017年 gkgy. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWith...
gpl-3.0
kevin00223/iOS-demo
rac_demo/Pods/ReactiveSwift/Sources/ValidatingProperty.swift
2
9976
import Result /// A mutable property that validates mutations before committing them. /// /// If the property wraps an arbitrary mutable property, changes originated from /// the inner property are monitored, and would be automatically validated. /// Note that these would still appear as committed values even if they ...
mit
SeptAi/Cooperate
Cooperate/Cooperate/Class/View/Message/MessageCell.swift
1
1475
// // MessageCell.swift // Cooperate // // Created by J on 2017/1/17. // Copyright © 2017年 J. All rights reserved. // import UIKit class MessageCell: UITableViewCell { // 视图模型 var viewModel:MessageViewModel?{ didSet{ // 设置图像 // 设置内容 title.text = viewModel?.titl...
mit
openhab/openhab.ios
openHABWatch Extension/ComplicationController.swift
1
6480
// Copyright (c) 2010-2022 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. // // This program and the accompanying materials are made available under the // terms of the Eclipse Public License 2.0 which is available at // http://www.eclipse.org/...
epl-1.0
ResearchSuite/ResearchSuiteExtensions-iOS
Example/Pods/ResearchSuiteTaskBuilder/ResearchSuiteTaskBuilder/Classes/Step Providers/Generators/RSTBBaseStepGenerator.swift
1
1591
// // RSTBBaseStepGenerator.swift // Pods // // Created by James Kizer on 1/9/17. // // import ResearchKit import Gloss public protocol RSTBBaseStepGenerator: RSTBStepGenerator { var supportedTypes: [String]! {get} } public extension RSTBBaseStepGenerator { public func supportsType(type: String) -> Bool {...
apache-2.0
jefflinwood/volunteer-recognition-ios
APASlapApp/APASlapApp/Login/LoginViewController.swift
1
1960
// // LoginViewController.swift // APASlapApp // // Created by Jeffrey Linwood on 6/3/17. // Copyright © 2017 Jeff Linwood. All rights reserved. // import UIKit import Firebase class LoginViewController: BaseViewController { @IBOutlet weak var emailTextField: UITextField! @IBOutlet weak var pas...
mit
OhioVR/SwiftVideoFileFilterer
SwiftVideoFileFilterer/filterSelectViewController.swift
1
1298
// // filterSelectViewController.swift // SwiftVideoFileFilterer // // Created by Scott Yannitell on 10/22/15. // Copyright © 2015 Scott Yannitell. All rights reserved. // import UIKit protocol ContainerDelegateProtocol { func CloseFilterSelector() } class filterSelectViewController: UIViewController, UITabl...
mit
grzegorzleszek/algorithms-swift
Sources/Sort.swift
1
3448
// // GraphTests.swift // // Copyright © 2018 Grzegorz.Leszek. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation t...
mit
DavidSkrundz/Lua
Sources/Lua/Value/Number.swift
1
3913
// // Number.swift // Lua // /// Represents a Lua numeric value since Lua does not make a distinction between /// `Int` and `Double` public final class Number { public let intValue: Int public let uintValue: UInt32 public let doubleValue: Double public let isInt: Bool public var hashValue: Int { if self.i...
lgpl-3.0
wordpress-mobile/WordPress-iOS
WordPress/Classes/Models/ManagedPerson.swift
1
4437
import Foundation import CoreData import WordPressKit public typealias Person = RemotePerson // MARK: - Reflects a Person, stored in Core Data // class ManagedPerson: NSManagedObject { func updateWith<T: Person>(_ person: T) { let canonicalAvatarURL = person.avatarURL.flatMap { Gravatar($0)?.canonicalURL...
gpl-2.0
wordpress-mobile/WordPress-iOS
WordPress/Classes/ViewRelated/Reader/Tab Navigation/ReaderTabView.swift
1
13906
import UIKit class ReaderTabView: UIView { private let mainStackView: UIStackView private let buttonsStackView: UIStackView private let tabBar: FilterTabBar private let filterButton: PostMetaButton private let resetFilterButton: UIButton private let horizontalDivider: UIView private let c...
gpl-2.0
algolia/algoliasearch-client-swift
Sources/AlgoliaSearchClient/Index/Index+Settings.swift
1
3685
// // Index+Settings.swift // // // Created by Vladislav Fitc on 03/03/2020. // import Foundation public extension Index { // MARK: - Get Settings /** Get the Settings of an index. - Parameter requestOptions: Configure request locally with RequestOptions. - Returns: Async operation */ @discard...
mit
EclipseSoundscapes/EclipseSoundscapes
EclipseSoundscapes/Features/About/Settings/SettingsViewController.swift
1
5881
// // SettingsViewController.swift // EclipseSoundscapes // // Created by Arlindo Goncalves on 7/18/17. // // Copyright © 2017 Arlindo Goncalves. // 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 Fo...
gpl-3.0
GermanCentralLibraryForTheBlind/LargePrintMusicNotes
LargePrintMusicNotesViewer/AppDelegate.swift
1
7478
// Created by Lars Voigt. // //The MIT License (MIT) //Copyright (c) 2016 German Central Library for the Blind (DZB) //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, inclu...
mit
DesignatedInitializer/XcodeProjectTemplates
Swift framework without dependencies/PROJECT_TEMPLATE/PRODUCT_PLACEHOLDER iOS Example/Sources/FirstViewController.swift
1
346
// // FirstViewController.swift // PRODUCT_PLACEHOLDER iOS Example // // Created by AUTHOR_PLACEHOLDER on DATE_PLACEHOLDER. // Copyright (c) YEAR_PLACEHOLDER ORGANIZATION_PLACEHOLDER. All rights reserved. // import UIKit class FirstViewController: UIViewController { override func viewDidLoad() { supe...
mit
finder39/Swimgur
SWNetworking/Comment.swift
1
1981
// // Comment.swift // Swimgur // // Created by Joseph Neuman on 11/2/14. // Copyright (c) 2014 Joseph Neuman. All rights reserved. // import Foundation public class Comment { public var id: Int! public var imageID: String? public var comment: String? public var author: String? public var authorID: Stri...
mit
Kiandr/CrackingCodingInterview
Swift/Ch 15. Threads and Locks/Ch 15. Threads and Locks.playground/Pages/15.3 Dining Philoslophers.xcplaygroundpage/Contents.swift
1
4725
import Foundation /*: 15.3 Dining Philosophers: In the famouse dining philosophers problem, a bunch of philosophers are sitting around a circular table with one chopstick between them. A philosopher needs both chopsticks to eat and always picks up the left chopstick before the right one. A deadlock could potentially ...
mit
alexey-kubas-appus/ADPPhotoPicker
Example/ADPPhotoPicker/ViewController.swift
1
624
// // ViewController.swift // ADPPhotoPicker // // Created by /Users/dmitry.pashinskiy/Desktop/ForFrameworks/Example/.git/config on 11/07/2015. // Copyright (c) 2015 /Users/dmitry.pashinskiy/Desktop/ForFrameworks/Example/.git/config. All rights reserved. // import UIKit class ViewController: UIViewController { ...
mit
milseman/swift
stdlib/public/core/Zip.swift
8
5446
//===----------------------------------------------------------------------===// // // 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