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
bradhilton/Piper
Sources/Piper.swift
1
3295
// // Piper.swift // Piper // // Created by Bradley Hilton on 2/1/16. // Copyright © 2016 Brad Hilton. All rights reserved. // import Foundation public protocol Finally { associatedtype Result func finally(queue: NSOperationQueue, handler: Result -> Void) } public struct EmptyOperation : Finall...
mit
andrewBatutin/SwiftYamp
SwiftYamp/Models/UserMessageHeaderFrame.swift
1
1566
// // UserMessageHeaderFrame.swift // SwiftYamp // // Created by Andrey Batutin on 6/13/17. // Copyright © 2017 Andrey Batutin. All rights reserved. // import Foundation import ByteBackpacker public struct UserMessageHeaderFrame: Equatable, YampFrame { let uid:[UInt8] let size:UInt8 let uri:Strin...
mit
btorch/swift-setup
templates/proxy/etc/init.d/memcached.swift
1
3361
#! /bin/bash ### BEGIN INIT INFO # Provides: memcached # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Should-Start: $local_fs # Should-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start...
apache-2.0
longitachi/ZLPhotoBrowser
Example/Example/Kingfisher/General/KingfisherManager.swift
1
33256
// // KingfisherManager.swift // Kingfisher // // Created by Wei Wang on 15/4/6. // // Copyright (c) 2019 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 Soft...
mit
AckeeCZ/ACKategories
ACKategories-iOSTests/ReusableViewTests.swift
1
1585
import ACKategories import UIKit import XCTest final class ReusableViewTests: XCTestCase { func test_tableViewCellPrototype_isCached() { final class CustomCell: UITableViewCell { } let tableView = UITableView() let prototype = tableView.prototypeCell(type: CustomCell.self) ...
mit
antitypical/Manifold
Manifold/Telescope.swift
1
577
// Copyright © 2015 Rob Rix. All rights reserved. public enum Telescope { indirect case Recursive(Name, Telescope) indirect case Argument(Name, Term, Telescope) case End public func fold(recur: Term, terminal: Term, combine: (Name, Term, Term) -> Term) -> Term { switch self { case .End: return terminal ...
mit
Orion98MC/FSM.swift
FSM.swift
1
3523
// // FSM.swift // A Finite State Machine in Swift // // Copyright © 2017 Thierry Passeron. All rights reserved. // import Foundation public class FSM<StateType: Equatable, EventType: Equatable> { public struct StateTransition: CustomStringConvertible { var event: EventType var state: StateType va...
mit
tablexi/txi-ios-bootstrap
Pod/Classes/Managers/ObserverManager.swift
1
4334
// // TypedNotifications.swift // Table XI // // Created by Daniel Hodos on 7/3/15. // Copyright © 2015 Table XI. All rights reserved. import Foundation /// A value object that provides a strongly-typed conceptualization of a Notification. /// /// This uses a generic (A) to hold reference to the payload that is b...
mit
Josscii/iOS-Demos
UIWebViewProgressDemo/UIWebViewProgressDemo/ProgressView.swift
1
2408
// // ProgressView.swift // UIWebViewProgressDemo // // Created by Josscii on 2017/8/6. // Copyright © 2017年 Josscii. All rights reserved. // import UIKit class ProgressView: UIView { var progressLayer: CAShapeLayer! var progressPath: UIBezierPath! override init(frame: CGRect) { super.ini...
mit
cliffano/swaggy-jenkins
clients/swift5/generated/OpenAPIClient/Classes/OpenAPIs/Models/PipelineBranchesitem.swift
1
2509
// // PipelineBranchesitem.swift // // Generated by openapi-generator // https://openapi-generator.tech // import Foundation #if canImport(AnyCodable) import AnyCodable #endif public struct PipelineBranchesitem: Codable, JSONEncodable, Hashable { public var displayName: String? public var estimatedDurationIn...
mit
smoope/ios-sdk
Pod/Classes/SPInvitationList.swift
1
901
/* * Copyright 2016 smoope GmbH * * 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 writin...
apache-2.0
samodom/UIKitSwagger
UIKitSwaggerTests/Tests/GestureRecognizerEnablingTests.swift
1
1269
// // GestureRecognizerEnablingTests.swift // UIKitSwagger // // Created by Sam Odom on 12/6/14. // Copyright (c) 2014 Swagger Soft. All rights reserved. // import UIKit import XCTest class GestureRecognizerEnablingTests: XCTestCase { var enabledRecognizer = UITapGestureRecognizer() var disabledRecognize...
mit
bitjammer/swift
test/IRGen/type_layout_objc.swift
1
3641
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize // REQUIRES: objc_interop import Foundation class C {} class O: NSObject {} struct SSing { var x: Int64 } struct SMult { var x, y: Int64 } struct SMult2 { var x, y: C } ...
apache-2.0
nicksweet/Clink
Clink/Classes/Clink.swift
1
16539
// // Clink.swift // clink // // Created by Nick Sweet on 6/16/17. // import Foundation import CoreBluetooth public class Clink: NSObject, BluetoothStateManager { static public let shared = Clink() public var connectedPeerIds: [String] { return self.centralManager.retrieveConnectedPeripherals...
mit
tinysun212/swift-windows
test/Constraints/optional.swift
1
7139
// RUN: %target-typecheck-verify-swift // REQUIRES: objc_interop func markUsed<T>(_ t: T) {} class A { @objc func do_a() {} @objc(do_b_2:) func do_b(_ x: Int) {} @objc func do_b(_ x: Float) {} @objc func do_c(x: Int) {} @objc func do_c(y: Int) {} } func test0(_ a: AnyObject) { a.do_a?() a.do_b?(1) ...
apache-2.0
ccloveswift/CLSCommon
Classes/Core/extension_CGSize.swift
1
1364
// // extension_CGSize.swift // Pods // // Created by Cc on 2017/8/25. // // import Foundation public extension CGSize { /// 当前的size 适配到preview size上,如果size 远小于preview size 不放大 /// /// - Parameter previewSize: 需要显示的大小 /// - Returns: 合适的size public func e_GetMaxFullSize(previewSize: CGSize) ->...
mit
MessageKit/MessageKit
Example/Sources/Models/MockUser.swift
1
1261
// MIT License // // Copyright (c) 2017-2019 MessageKit // // 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, mod...
mit
PureSwift/GATT
Sources/DarwinGATT/Extensions/Integer.swift
1
443
// // Integer.swift // GATT // // Created by Alsey Coleman Miller on 8/24/15. // Copyright © 2015 PureSwift. All rights reserved. // internal extension UInt16 { /// Initializes value from two bytes. init(bytes: (UInt8, UInt8)) { self = unsafeBitCast(bytes, to: UInt16.self) } /// C...
mit
bgerstle/wikipedia-ios
Wikipedia/Code/SDImageCache+PromiseKit.swift
1
1871
// // SDImageCache+PromiseKit.swift // Wikipedia // // Created by Brian Gerstle on 7/1/15. // Copyright (c) 2015 Wikimedia Foundation. All rights reserved. // import Foundation import PromiseKit import SDWebImage public typealias DiskQueryResult = (cancellable: Cancellable?, promise: Promise<(UIImage, ImageOrigin...
mit
taiphamtiki/TikiTool
TikiTool/Box/BoxViewModel.swift
1
767
// // BoxViewModel.swift // TikiTool // // Created by ZickOne on 2/7/17. // Copyright © 2017 ZickOne. All rights reserved. // import Foundation import RxSwift import RxCocoa import Firebase class BoxViewModel { var segmentObsever : Observable<[BoxItem]>! var boxs = [BoxItem]() init() { setup() ...
mit
clappr/clappr-ios
Tests/Extensions/UIImageViewTests.swift
1
3029
import Quick import Nimble import OHHTTPStubs @testable import Clappr class UIImageViewTests: QuickSpec { override func spec() { describe(".UIImageViewTests") { describe("get image from url") { beforeEach { OHHTTPStubs.removeAllStubs() } ...
bsd-3-clause
SoneeJohn/WWDC
CommunitySupport/CMSSubscriptionManager.swift
1
494
// // CMSSubscriptionManager.swift // WWDC // // Created by Guilherme Rambo on 15/05/17. // Copyright © 2017 Guilherme Rambo. All rights reserved. // import Foundation import CloudKit internal final class CMSSubscriptionManager { private let defaults = UserDefaults.standard var profileSubscriptionCreate...
bsd-2-clause
fancymax/12306ForMac
12306ForMac/UserControls/TrainTableRowView.swift
1
765
// // TrainTableRowView.swift // 12306ForMac // // Created by fancymax on 16/6/10. // Copyright © 2016年 fancy. All rights reserved. // import Cocoa class TrainTableRowView: NSTableRowView { override var isOpaque: Bool { return false } override var isSelected: Bool { didSet { ...
mit
rudkx/swift
test/ModuleInterface/features.swift
1
6452
// RUN: %empty-directory(%t) // RUN: %target-swift-frontend -typecheck -swift-version 5 -module-name FeatureTest -emit-module-interface-path - -enable-library-evolution -disable-availability-checking %s | %FileCheck %s // REQUIRES: concurrency // REQUIRES: concurrency // Ensure that when we emit a Swift interface t...
apache-2.0
PlutoMa/SwiftProjects
023.Side Navigation/SideNavigation/SideNavigation/ViewController.swift
1
562
// // ViewController.swift // SideNavigation // // Created by Dareway on 2017/11/3. // Copyright © 2017年 Pluto. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor.white let imag...
mit
Monits/swift-compiler-crashes
fixed/23088-swift-inflightdiagnostic-highlight.swift
11
212
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing func b{ class A:A protocol A:e let f=Void{
mit
verticon/VerticonsToolbox
VerticonsToolbox/Broadcaster.swift
1
3199
// // Broadcaster // VerticonsToolbox // // Created by Robert Vaessen on 4/10/17. // Copyright © 2017 Verticon. All rights reserved. // import Foundation public protocol ListenerManagement { func removeListener() } private protocol ListenerWrapper: class { func deliver(event: Any) } open class Broadcas...
mit
noughts/SwiftTestLib
SwiftTestLibDemoTests/SwiftTestLibDemoTests.swift
1
925
// // SwiftTestLibDemoTests.swift // SwiftTestLibDemoTests // // Created by noughts on 2014/12/03. // Copyright (c) 2014年 noughts. All rights reserved. // import UIKit import XCTest class SwiftTestLibDemoTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. Thi...
mit
Xiomara7/bookiao-ios
bookiao-ios/CustomCellHistory.swift
1
3412
// // CustomCell.swift // bookiao-ios // // Created by Xiomara on 10/6/14. // Copyright (c) 2014 UPRRP. All rights reserved. // import UIKit class CustomCellHistory: UITableViewCell { let custom = CustomDesign() struct Config { static let topPadding: CGFloat = 20.0 static let bottomPadding...
mit
jessegrosjean/BirchOutline
Common/Sources/MutationType.swift
1
1874
// // MutationType.swift // BirchOutline // // Created by Jesse Grosjean on 7/23/16. // Copyright © 2016 Jesse Grosjean. All rights reserved. // import Foundation import JavaScriptCore public enum MutationKind { case attribute case body case children } public protocol MutationType: AnyObject { ...
mit
e78l/swift-corelibs-foundation
Foundation/DateComponentsFormatter.swift
1
7191
// 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...
apache-2.0
yuxiuyu/TrendBet
TrendBetting_0531换首页/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift
4
5153
// // LineChartDataSet.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda // A port of MPAndroidChart for iOS // Licensed under Apache License 2.0 // // https://github.com/danielgindi/Charts // import Foundation import CoreGraphics open class LineChartDataSet: LineRadarChartDataSet, ILine...
apache-2.0
romankisil/eqMac2
native/shared/Package.swift
1
1256
// swift-tools-version:5.5 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "Shared", platforms: [ .macOS(.v10_10) ], products: [ // Products define the executables and libraries a pack...
mit
emilstahl/swift
validation-test/compiler_crashers_fixed/26926-swift-typechecker-checkinheritanceclause.swift
13
287
// RUN: not %target-swift-frontend %s -parse // 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{{class B<T where g:P{let a{{}var f{{if{{var f{{{if{func f{for b=e
apache-2.0
creatubbles/ctb-api-swift
CreatubblesAPIClient/Sources/Requests/Gallery/ChallengesGalleriesRequest.swift
1
2133
// // ChallengesGalleriesRequest.swift // CreatubblesAPIClient // // Copyright (c) 2017 Creatubbles Pte. 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, ...
mit
blokadaorg/blokada
ios/App/UI/Settings/LevelView.swift
1
2375
// // This file is part of Blokada. // // 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 https://mozilla.org/MPL/2.0/. // // Copyright © 2020 Blocka AB. All rights reserved. // // @author Kar...
mpl-2.0
anthonyApptist/Poplur
Poplur/SignUpScreen.swift
1
6259
// // SignUpScreen.swift // Poplur // // Created by Mark Meritt on 2016-11-21. // Copyright © 2016 Apptist. All rights reserved. // import UIKit class SignUpScreen: PoplurScreen { var usernameBtn: CircleButton! var passwordBtn: CircleButton! var nameTextField: CustomTextFieldContainer! v...
apache-2.0
Ramotion/reel-search
Package.swift
1
1528
// swift-tools-version:5.1 // // Package.swift // // Copyright (c) Ramotion (https://www.ramotion.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, includi...
mit
sport1online/PagingMenuController
Example/PagingMenuControllerDemo2/RootViewControoler.swift
3
2841
// // RootViewControoler.swift // PagingMenuControllerDemo // // Created by Cheng-chien Kuo on 5/14/16. // Copyright © 2016 kitasuke. All rights reserved. // import UIKit import PagingMenuController private struct PagingMenuOptions: PagingMenuControllerCustomizable { private let viewController1 = ViewControll...
mit
iThinkerYZ/Swift_Currying
Swift之柯里化函数/Swift之柯里化函数/ViewController.swift
1
4194
// // ViewController.swift // Swift之柯里化函数 // // Created by yz on 15/4/28. // Copyright (c) 2015年 yz. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically fro...
apache-2.0
adrfer/swift
validation-test/compiler_crashers_fixed/27177-swift-funcdecl-setdeserializedsignature.swift
13
370
// RUN: not %target-swift-frontend %s -parse // Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing let c{b<:{var a{{{{var b{protocol a{struct S{{}struct A{class B{struct S{class A{func a{class A{var:{let ...
apache-2.0
gobetti/Swift
SocialFramework/SocialFramework/ViewController.swift
1
2965
// // ViewController.swift // SocialFramework // // Created by Carlos Butron on 02/12/14. // // 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 opt...
mit
SebastianBoldt/Jelly
Jelly/Classes/public/Models/Protocols/PresentationSizeProtocol.swift
1
124
import Foundation public protocol PresentationSizeProtocol: PresentationWidthProvider, PresentationHeightProvider { }
mit
jihun-kang/ios_a2big_sdk
A2bigSDK/Animator.swift
1
5239
import UIKit /// Responsible for parsing GIF data and decoding the individual frames. public class Animator { /// Number of frame to buffer. var frameBufferCount = 50 /// Specifies whether GIF frames should be resized. var shouldResizeFrames = false /// Responsible for loading individual frames and resizi...
apache-2.0
ruslanskorb/CoreStore
Sources/CSDataStack+Observing.swift
1
8311
// // CSDataStack+Observing.swift // CoreStore // // Copyright © 2018 John Rommel Estropia // // 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 l...
mit
khizkhiz/swift
test/Generics/materializable_restrictions.swift
3
618
// RUN: %target-parse-verify-swift func test15921520() { var x: Int = 0 func f<T>(x: T) {} // expected-note{{in call to function 'f'}} f(&x) // expected-error{{generic parameter 'T' could not be inferred}} } func test20807269() { var x: Int = 0 func f<T>(x: T) {} f(1, &x) // expected-error{{ex...
apache-2.0
MartinMajewski/ToolShelf-4-3Dconnexion
ToolShelf-4-3Dconnexion/ConnexionAuxiliaries.swift
1
1117
// // ConnexionAuxiliaries.swift // ToolShelf-4-3Dconnexion // // Created by Martin Majewski on 01.11.15. // Copyright © 2015 MartinMajewski.net. All rights reserved. // import Foundation struct ConnexionAuxiliaries{ static func GetStringFrom(DeviceState ds: ConnexionDeviceState) -> String!{ return "--------...
mit
khizkhiz/swift
benchmark/single-source/NSStringConversion.swift
2
761
//===--- NSStringConversion.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
seanoshea/computer-science-in-swift
computer-science-in-swiftTests/EvenFibonacciTest.swift
1
1424
// Copyright (c) 2015-2016 Sean O'Shea. 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 the rights // to use, copy, ...
mit
comyarzaheri/Partita
Partita/TunerView.swift
1
5081
// // TunerView.swift // Partita // // Copyright (c) 2015 Comyar Zaheri. 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 withou...
mit
cemolcay/MusicTheory
Sources/MusicTheory/NoteValue.swift
1
3742
// // NoteValue.swift // MusicTheory iOS // // Created by Cem Olcay on 21.06.2018. // Copyright © 2018 cemolcay. All rights reserved. // // https://github.com/cemolcay/MusicTheory // import Foundation // MARK: - NoteValueType /// Defines the types of note values. public enum NoteValueType: Int, Codable, CaseIte...
mit
wuleijun/Zeus
Zeus/Views/BorderButton.swift
1
1065
// // BorderButton.swift // Zeus // // Created by 吴蕾君 on 16/4/12. // Copyright © 2016年 rayjuneWu. All rights reserved. // import UIKit @IBDesignable class BorderButton: UIButton { lazy var topLineLayer:CAShapeLayer = { let topLayer = CAShapeLayer() topLayer.lineWidth = 1 topLayer.stro...
mit
radex/swift-compiler-crashes
crashes-fuzzing/02796-swift-typebase-isequal.swift
11
231
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing struct Q<T where c=g{ var d{ struct S{ func c(a struct let b=0
mit
igormatyushkin014/Visuality
Demo/Visuality/VisualityDemo/VisualityDemo/ViewControllers/Main/MainViewController.swift
1
1338
// // MainViewController.swift // VisualityDemo // // Created by Igor Matyushkin on 21.09.15. // Copyright © 2015 Igor Matyushkin. All rights reserved. // import UIKit import Visuality class MainViewController: UIViewController { // MARK: Class variables & properties // MARK: Class methods ...
mit
radex/swift-compiler-crashes
crashes-duplicates/09239-swift-sourcemanager-getmessage.swift
11
240
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing extension Array { let a { for { deinit { class c { init { class case ,
mit
RyuichiTanimoto/FoundationUtilities
Example/FoundationUtilities/ViewController.swift
1
961
// // ViewController.swift // FoundationUtilities // // Created by RyuichiTanimoto on 01/03/2017. // Copyright (c) 2017 RyuichiTanimoto. All rights reserved. // import UIKit import FoundationUtilities class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() /...
gpl-3.0
afnan-ahmad/Swift-Google-Maps-API
GooglePlaces/GooglePlacesTests/PlaceAutocompleteTests.swift
1
3824
// // PlaceAutocompleteTests.swift // GooglePlacesTests // // Created by Honghao Zhang on 2016-02-12. // Copyright © 2016 Honghao Zhang. All rights reserved. // import XCTest @testable import GooglePlaces class PlaceAutocompleteTests: XCTestCase { typealias LocationCoordinate2D = GoogleMapsService.LocationCoo...
mit
HeMet/MVVMKitDemos
MVVMKitDemos/GoTo.swift
1
589
// // GoTo.swift // MVVMKitDemos // // Created by Евгений Губин on 18.07.15. // Copyright (c) 2015 GitHub. All rights reserved. // import Foundation import MVVMKit struct GoTo { static let root = present(!DemosListViewController.self).withinNavView().asRoot() // Segue must be manual static let se...
mit
Bouke/HAP
Sources/HAP/Base/Predefined/Characteristics/Characteristic.SupportedFirmwareUpdateConfiguration.swift
1
2167
import Foundation public extension AnyCharacteristic { static func supportedFirmwareUpdateConfiguration( _ value: Data = Data(), permissions: [CharacteristicPermission] = [.read], description: String? = "Supported Firmware Update Configuration", format: CharacteristicFormat? = .tlv8...
mit
davbeck/PG.swift
Sources/pg/Query.swift
1
6972
import Foundation /// An SQL query public struct Query { /// A query specific error /// /// - wrongNumberOfBindings: When updating the bindings of a query, if it has a prepared statement the number of bindings must match the number of prepared bindings. /// - mismatchedBindingType: When updating the bindings of a...
mit
shorlander/firefox-ios
Client/Frontend/Strings.swift
1
44138
/* 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 struct Strings {} /// Return the main application bundle. Even if called from an extens...
mpl-2.0
ResearchSuite/ResearchSuiteExtensions-iOS
source/Core/Classes/EnhancedMultipleChoice/RSEnhancedMultipleChoiceBaseCellController.swift
1
5169
// // RSEnhancedMultipleChoiceBaseCellController.swift // ResearchSuiteExtensions // // Created by James Kizer on 4/25/18. // import UIKit import ResearchKit open class RSEnhancedMultipleChoiceBaseCellController: NSObject, RSEnhancedMultipleChoiceCellController, RSEnhancedMultipleChoiceCellDelegate, RSEnhancedMult...
apache-2.0
tanuva/ampacheclient
AmpacheClient/AlbumDetailViewController.swift
1
2445
// // AlbumDetailViewController.swift // AmpacheClient // // Created by Marcel on 12.10.14. // Copyright (c) 2014 FileTrain. All rights reserved. // import Foundation import AVFoundation import UIKit import CoreData class AlbumDetailViewController: UITableViewController, UITableViewDelegate, UITableViewDataSource...
unlicense
debugsquad/Hyperborea
Hyperborea/Controller/CRecent.swift
1
1791
import UIKit class CRecent:CController { private weak var controllerSearch:CSearch! private(set) var model:MRecent? private(set) weak var viewRecent:VRecent! init(controllerSearch:CSearch) { self.controllerSearch = controllerSearch super.init() } required init?(cod...
mit
nheagy/WordPress-iOS
WordPress/Classes/ViewRelated/Plans/PlanComparisonViewController.swift
1
7655
import UIKit import WordPressShared class PlanComparisonViewController: UIViewController { private let embedIdentifier = "PageViewControllerEmbedSegue" @IBOutlet weak var pageControl: UIPageControl! @IBOutlet weak var divider: UIView! @IBOutlet weak var scrollView: UIScrollView! @IBOutlet weak...
gpl-2.0
ylovesy/CodeFun
wuzhentao/Maximum.swift
1
311
class Solution { func maximumProduct(_ nums: [Int]) -> Int { let sorts = nums.sorted() let count = nums.count let sum1 = sorts[0] * sorts[1] * sorts[count - 1] let sum2 = sorts[count - 1] * sorts[count - 2] * sorts[count - 3] return max(sum1, sum2) } }
apache-2.0
jtbandes/swift-compiler-crashes
crashes-fuzzing/28081-swift-inflightdiagnostic.swift
2
232
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing func<{{}print{}class A{class D{struct E{class u{struct X<T:T.a
mit
acrocat/EverLayout
Source/Protocols/EverLayoutDelegate.swift
1
1276
// 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
chinlam91/edx-app-ios
Source/DiscussionTopic.swift
3
1489
// // DiscussionTopic.swift // edX // // Created by Akiva Leffert on 7/6/15. // Copyright (c) 2015 edX. All rights reserved. // import UIKit public struct DiscussionTopic { public let id: String? public let name: String? public let children: [DiscussionTopic] public let depth : UInt public le...
apache-2.0
feliperuzg/CleanExample
CleanExampleTests/Authentication/Data/Repository/DataSource/AuthenticationMockDataSourceSpec.swift
1
1241
// // AuthenticationMockDataSourceSpec.swift // CleanExampleTests // // Created by Felipe Ruz on 19-07-17. // Copyright © 2017 Felipe Ruz. All rights reserved. // import XCTest @testable import CleanExample class AuthenticationMockDataSourceSpec: XCTestCase { let locator = AuthenticationServiceLocator() f...
mit
jordidekock/Colorblinds
ColorBlinds/SecondViewController.swift
1
379
// // SecondViewController.swift // ColorBlinds // // Created by Jordi de Kock on 28-08-16. // Copyright © 2016 Jordi de Kock. All rights reserved. // import UIKit class SecondViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.title = "Color...
mit
WhiskerzAB/PlaygroundTDD
PlaygroundTDD.playground/Contents.swift
1
191
import XCTest let playgroundObserver = PlaygroundTestObserver() XCTestObservationCenter.shared.addTestObserver(playgroundObserver) let sud = [FibonacciTest.self] TestRunner.run(tests: sud)
mit
talk2junior/iOSND-Beginning-iOS-Swift-3.0
Playground Collection/Part 2 - Robot Maze 2/Functions 1/Functions 1.playground/Pages/Functions with Params.xcplaygroundpage/Contents.swift
1
723
//: [Previous](@previous) /*: ## Functions with Params We'll create some Students for this example. */ struct Student { let name: String var age: Int var school: String } var gabrielle = Student(name: "Gabrielle", age: 21, school: "University of California-Berkeley") var jessica = Student(name: "Jessica", ...
mit
k-o-d-e-n/CGLayout
Example/CGLayout/AppDelegate.swift
1
2299
// // AppDelegate.swift // CGLayout // // Created by k-o-d-e-n on 08/31/2017. // Copyright (c) 2017 k-o-d-e-n. All rights reserved. // import UIKit import CGLayout @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplicatio...
mit
gtchance/FirebaseSwift
Source/Firebase.swift
1
9376
// // Firebase.swift // FirebaseSwift // // Created by Graham Chance on 10/15/16. // // import Foundation import Just /// This class models an object that can send requests to Firebase, such as POST, GET PATCH and DELETE. public final class Firebase { /// Google OAuth2 access token public var accessToken:...
mit
USAssignmentWarehouse/EnglishNow
EnglishNow/Controller/Chat/DetailChatViewController.swift
1
12938
// // DetailChatViewController.swift // EnglishNow // // Created by Nha T.Tran on 6/11/17. // Copyright © 2017 IceTeaViet. All rights reserved. // import UIKit import Firebase import FirebaseDatabase class DetailChatViewController: UICollectionViewController, UITextFieldDelegate, UICollectionViewDelegateFlowLayou...
apache-2.0
muzcity/MZGoneView
Example/MZGoneView/AppDelegate.swift
1
2168
// // AppDelegate.swift // MZGoneView // // Created by muzcity on 10/15/2017. // Copyright (c) 2017 muzcity. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaun...
mit
kbelter/SnazzyList
SnazzyList/Classes/src/CollectionView/Services/Cells/ImageGalleryCollectionCell.swift
1
2508
// // ImageGalleryCollectionCell.swift // Dms // // Created by Kevin on 10/29/18. // Copyright © 2018 DMS. All rights reserved. // /// This cell will fit the cases were you need to show an image. /// The size must be define outside the cell, and the image will use that specific size. /// Screenshot: https://github...
apache-2.0
2345Team/Swifter-Tips
4.Sequence/Sequence/SequenceUITests/SequenceUITests.swift
1
1242
// // SequenceUITests.swift // SequenceUITests // // Created by yangbin on 16/6/13. // Copyright © 2016年 yangbin. All rights reserved. // import XCTest class SequenceUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called befo...
mit
RevenueCat/purchases-ios
Sources/Networking/HTTPClient/HTTPStatusCode.swift
1
2100
// // Copyright RevenueCat Inc. All Rights Reserved. // // Licensed under the MIT License (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://opensource.org/licenses/MIT // // HTTPStatusCode.swift // // Created by César...
mit
jpedrosa/sua_nc
Sources/socket.swift
2
8970
import Glibc public typealias CSocketAddress = sockaddr public struct SocketAddress { public var hostName: String public var status: Int32 = 0 public init(hostName: String) { self.hostName = hostName } mutating func prepareHints() -> addrinfo { status = 0 // Reset the status in case of subseque...
apache-2.0
DarrenKong/firefox-ios
XCUITests/NoImageTests.swift
3
1607
/* 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 XCTest let NoImageButtonIdentifier = "menu-NoImageMode" let ContextMenuIdentifier = "Context Menu" class ...
mpl-2.0
MoooveOn/Advanced-Frameworks
SideMenu/SideMenu/SideMenu/ViewController.swift
1
593
// // ViewController.swift // SideMenu // // Created by Pavel Selivanov on 03.07.17. // Copyright © 2017 Pavel Selivanov. All rights reserved. // import UIKit class ViewController: UIViewController, SideMenuDelegate { override func viewDidLoad() { super.viewDidLoad() let sideMenu = S...
mit
ikait/KernLabel
KernLabelSample/KernLabelSample/Device.swift
1
380
// // Device.swift // KernLabelSample // // Created by Taishi Ikai on 2016/07/04. // Copyright © 2016年 Taishi Ikai. All rights reserved. // import UIKit final class Device { static var isPad: Bool { return UIDevice.current.userInterfaceIdiom == .pad } static var isPhone: Bool { retu...
mit
plumhead/OSXUtilityPanel
OSXUtilityPanel/OSXUtilityPanel/FlippedScrollView.swift
1
290
// // FlippedScrollView.swift // OSXUtilityPanel // // Created by Andrew Calderbank on 21/09/2015. // Copyright © 2015 Andrew Calderbank. All rights reserved. // import Cocoa class FlippedScrollView: NSScrollView { override var flipped : Bool { return true } }
mit
GrandCentralBoard/GrandCentralBoard
GrandCentralBoard/Widgets/Slack/View/MessageBubbleView.swift
2
2184
// // MessageBubbleView.swift // GrandCentralBoard // // Created by Michał Laskowski on 25.05.2016. // Copyright © 2016 Macoscope. All rights reserved. // import UIKit @IBDesignable final class MessageBubbleView: UIView { private let textToBubbleMargin = UIEdgeInsets(top: 25, left: 33, bottom: 25, right: 43...
gpl-3.0
4taras4/totp-auth
TOTPTests/ViperModules/FolderDetails/Presenter/FolderDetailsPresenterTests.swift
1
825
// // FolderDetailsFolderDetailsPresenterTests.swift // TOTP // // Created by Tarik on 15/02/2021. // Copyright © 2021 Taras Markevych. All rights reserved. // import XCTest @testable import TOTP class FolderDetailsPresenterTest: XCTestCase { override func setUp() { super.setUp() // Put setup...
mit
sbaik/SwiftAnyPic
SwiftAnyPicTests/SwiftAnyPicTests.swift
6
975
// // SwiftAnyPicTests.swift // SwiftAnyPicTests // // Created by kw on 30/7/15. // Copyright © 2015 parse. All rights reserved. // import XCTest @testable import SwiftAnyPic class SwiftAnyPicTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is ...
cc0-1.0
kevinup7/S4HeaderExtensions
Tests/S4HeaderExtensions/ContentEncodingTests.swift
1
418
@testable import S4HeaderExtensions import XCTest import S4 class ContentEncodingTests: XCTestCase { func testSingle() { let headers = Headers(["Content-Encoding": "gzip"]) XCTAssert(headers.contentEncoding! == [.gzip]) } func testMultiple() { let headers = Headers(["Content-Enco...
mit
gmarm/BetterSegmentedControl
Example/Tests/SnapshotHelpers.swift
1
383
// // SnapshotHelpers.swift // BetterSegmentedControl_Tests // // Created by George Marmaridis on 18.10.20. // Copyright © 2020 CocoaPods. All rights reserved. // import Nimble import Nimble_Snapshots public func haveValidSnapshotWithAcceptableTolerance() -> Predicate<Snapshotable> { haveValidSnapshot(named: ...
mit
pennlabs/penn-mobile-ios
PennMobile/About/Privacy/PrivacyPermissionDelegate.swift
1
652
// // PrivacyPermissionDelegate.swift // PennMobile // // Created by Dominic Holmes on 12/31/19. // Copyright © 2019 PennLabs. All rights reserved. // #if canImport(SwiftUI) import SwiftUI #endif #if canImport(Combine) import Combine #endif class PrivacyPermissionDelegate: ObservableObject { var objectWillChan...
mit
imclean/JLDishWashers
JLDishwasher/Images.swift
1
1506
// // Images.swift // JLDishwasher // // Created by Iain McLean on 21/12/2016. // Copyright © 2016 Iain McLean. All rights reserved. // import Foundation public class Images { public var altText : String? public var urls : [String]? /** Returns an array of models based on given dictionary. ...
gpl-3.0
VijayMay/WJLive
DouYuTV/DouYuTV/Code/Home/Controllers/FunnyViewController.swift
1
317
// // FunnyViewController.swift // DouYuTV // // Created by mwj on 17/4/14. // Copyright © 2017年 MWJ. All rights reserved. // import UIKit class FunnyViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor.white } }
mit
gowansg/firefox-ios
Providers/Profile.swift
1
10105
/* 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 Account import ReadingList import Shared import Storage import Sync import XCGLogger // ...
mpl-2.0
zmian/xcore.swift
Sources/Xcore/Swift/Components/Dates and Timers/Date/Calendar+Component+RawRepresentable.swift
1
2577
// // Xcore // Copyright © 2019 Xcore // MIT license, see LICENSE file for details // import Foundation extension Calendar.Component: RawRepresentable { public init?(rawValue: String) { switch rawValue { case Self.era.rawValue: self = .era case Self.year.rawValue: ...
mit
djschilling/SOPA-iOS
SOPA/model/game/PathState.swift
1
237
// // PathState.swift // SOPA // // Created by David Schilling on 21.10.17. // Copyright © 2017 David Schilling. All rights reserved. // import Foundation enum PathState { case UNDEFINED case POSIBLE case IMPOSSIBLE }
apache-2.0
Miguel-Herrero/Swift
Rainy Shiny Cloudy/Rainy Shiny Cloudy/WeatherVC.swift
1
4765
// // WeatherVC.swift // Rainy Shiny Cloudy // // Created by Miguel Herrero on 13/12/16. // Copyright © 2016 Miguel Herrero. All rights reserved. // import UIKit import Alamofire import CoreLocation class WeatherVC: UIViewController { @IBOutlet weak var dateLabel: UILabel! @IBOutlet weak var currentT...
gpl-3.0
devxoul/Drrrible
DrrribleTests/Sources/TestMain.swift
1
176
// // TestMain.swift // Drrrible // // Created by Suyeol Jeon on 18/04/2017. // Copyright © 2017 Suyeol Jeon. All rights reserved. // import ReactorKit import RxOptional
mit
vexy/Fridge
Tests/FridgeTests/FreezerTests.swift
1
5672
/* // // FreezerTests.swift // FridgeTests // // Created by Veljko Tekelerovic on 21.1.20. MIT License Copyright (c) 2016 Veljko Tekelerović 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 Softwa...
mit
cameronpit/Unblocker
Unblocker/Program constants.swift
1
2208
// // Program constants.swift // // Unblocker // Swift 3.1 // // Copyright © 2017 Cameron C. Pitcairn. // See the file license.txt in the Unblocker project. // import UIKit /******************************************************************************* Const is a globally-available struct which defines various...
mit