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
Dewire/SwiftCommon
SwiftCommon/Dictionary.swift
1
895
// // Dictionary.swift // SwiftCommon // // Created by Kalle Lindström on 20/01/16. // Copyright © 2016 Dewire. All rights reserved. // import Foundation // MARK: merge public extension Dictionary { /** Updates self with the values from other. Example: ``` var d = ["a": "1", "b": "2"] d.merg...
mit
tinysun212/swift-windows
test/APINotes/versioned-objc.swift
1
1439
// RUN: rm -rf %t && mkdir -p %t // RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 4 %s 2>&1 | %FileCheck -check-prefix=CHECK-DIAGS -check-prefix=CHECK-DIAGS-4 %s // RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 3 %s 2>&1 | %FileCheck...
apache-2.0
hzalaz/analytics-ios
Example/Tests/FileStorageTest.swift
1
3867
// // FileStorageTest.swift // Analytics // // Copyright © 2016 Segment. All rights reserved. // import Quick import Nimble import Analytics class FileStorageTest : QuickSpec { override func spec() { var storage : SEGFileStorage! beforeEach { let url = SEGFileStorage.applicationSupportDirectoryURL(...
mit
tsolomko/SWCompression
Sources/swcomp/Extensions/FileSystemType+CustomStringConvertible.swift
1
551
// Copyright (c) 2022 Timofey Solomko // Licensed under MIT License // // See LICENSE for license information import Foundation import SWCompression extension FileSystemType: CustomStringConvertible { public var description: String { switch self { case .fat: return "FAT" case ...
mit
Snowgan/WeiboDemo
WeiboDemo/XLImageTool.swift
1
153
// // XLImageTool.swift // WeiboDemo // // Created by Jennifer on 11/12/15. // Copyright © 2015 Snowgan. All rights reserved. // import Foundation
mit
developerY/Active-Learning-Swift-2.0_DEMO
ActiveLearningSwift2.playground/Pages/Generics.xcplaygroundpage/Contents.swift
3
10757
//: [Previous](@previous) // ------------------------------------------------------------------------------------------------ // Things to know: // // * Generics allow flexible, reusable functions and types that can work with any type, subject // to restrictions that you define. // // * Swift's Array and Dictionary ...
apache-2.0
natecook1000/swift-compiler-crashes
fixed/26459-swift-printingdiagnosticconsumer-handlediagnostic.swift
7
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 [d{} {class a{{{({{{{{([{t(" }{class case,
mit
natecook1000/swift-compiler-crashes
crashes-duplicates/01417-swift-extensiondecl-create.swift
12
269
// 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 f<T : A { class a { } ((bytes: a { func e() { } protocol e = { extension A : c<T : start: 1] }
mit
natecook1000/swift-compiler-crashes
crashes-duplicates/17112-swift-sourcemanager-getmessage.swift
11
250
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing protocol A { enum b { let a { d[ { class A { extension NSData { { } class case ,
mit
lumoslabs/realm-cocoa
examples/ios/swift-2.0/Migration/AppDelegate.swift
1
5364
//////////////////////////////////////////////////////////////////////////// // // 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...
apache-2.0
devxoul/allkdic
LauncherApplication/AppDelegate.swift
1
1025
// // AppDelegate.swift // LauncherApplication // // Created by Jeong on 2017. 1. 27.. // Copyright © 2017년 Allkdic. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { let main...
mit
mercadopago/px-ios
ExampleSwift/ExampleSwift/Controllers/CustomCheckoutWithPostPaymentController.swift
1
10141
import UIKit import MercadoPagoSDKV4 enum CustomCheckoutTestCase: String, CaseIterable { case approved case rejected case error var genericPayment: PXGenericPayment { switch self { case .approved: return PXGenericPayment( status: "approved", ...
mit
takamashiro/XDYZB
XDYZB/XDYZB/Classes/Home/ViewModel/AmuseViewModel.swift
1
408
// // AmuseViewModel.swift // XDYZB // // Created by takamashiro on 2016/10/11. // Copyright © 2016年 com.takamashiro. All rights reserved. // import UIKit class AmuseViewModel: BaseViewModel { } extension AmuseViewModel { func loadAmuseData(finishedCallback : @escaping () -> ()) { loadAnchorData(isGr...
mit
epv44/EVTopTabBar
Example/EVTopTabBar/ViewController.swift
1
2425
// // ViewController.swift // EVTopTabBar // // Created by Eric Vennaro on 02/29/2016. // Copyright (c) 2016 Eric Vennaro. All rights reserved. // import UIKit import EVTopTabBar class ViewController: UIViewController, EVTabBar { var pageController = UIPageViewController(transitionStyle: .scroll, navigationOr...
mit
apple/swift-nio-ssl
Tests/NIOSSLTests/ByteBufferBIOTest.swift
1
12483
//===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIB...
apache-2.0
b0oh/mal
swift/reader.swift
1
7075
//****************************************************************************** // MAL - reader //****************************************************************************** import Foundation let kSymbolWithMeta = MalSymbol(symbol: "with-meta") let kSymbolDeref = MalSymbol(symbol: "deref") let token_pattern =...
mpl-2.0
kitasuke/SwiftProtobufSample
Client/Carthage/Checkouts/swift-protobuf/Tests/SwiftProtobufTests/unittest_import_lite.pb.swift
2
4793
/* * DO NOT EDIT. * * Generated by the protocol buffer compiler. * Source: google/protobuf/unittest_import_lite.proto * */ // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in ...
mit
nottombrown/HausClock
HausClock/AppDelegate.swift
2
2413
// // AppDelegate.swift // HausClock // // Created by Tom Brown on 7/13/14. // Copyright (c) 2014 not. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplic...
mit
Tonkpils/SpaceRun
SpaceRun/GameViewController.swift
1
2107
// // GameViewController.swift // SpaceRun // // Created by Leonardo Correa on 11/29/15. // Copyright (c) 2015 Leonardo Correa. All rights reserved. // import UIKit import SpriteKit class GameViewController: UIViewController { var easyMode : Bool? override func viewDidLoad() { super.viewDidLoad(...
mit
PGSSoft/3DSnakeAR
3DSnake/common classes/Mushroom.swift
1
1151
// // Mushroom.swift // 3DSnake // // Created by Michal Kowalski on 20.07.2017. // Copyright © 2017 PGS Software. All rights reserved. // import SceneKit final class Mushroom: SCNNode { var mushroomNode: SCNNode? // MARK: - Lifecycle override init() { super.init() if let scene = SCNS...
mit
QuiverApps/PiPass-iOS
PiPass-iOS/GetPiPassConfig.swift
1
1162
// // GetPiPassConfig.swift // PiPass-iOS // // Created by Jeremy Roberts on 11/22/15. // Copyright © 2015 Jeremy Roberts. All rights reserved. // import Alamofire import Mantle public class GetPiPassConfig: NSObject { public static func doApiCall(rpiAddress:String, success:(PiPassConfig) -> Void, failure:() ...
mit
dreamsxin/swift
validation-test/compiler_crashers_fixed/00761-swift-diagnosticengine-flushactivediagnostic.swift
11
433
// 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
0xfeedface1993/Xs8-Safari-Block-Extension-Mac
Sex8BlockExtension/Sex8BlockExtension/Webservice/Webservice.swift
1
5962
// // Webservice.swift // S8Blocker // // Created by virus1993 on 2017/10/12. // Copyright © 2017年 ascp. All rights reserved. // import AppKit enum WebserviceError : Error { case badURL(message: String) case badSendJson(message: String) case badResponseJson(message: String) case emptyResponseData(...
apache-2.0
emilstahl/swift
validation-test/compiler_crashers_fixed/26425-std-function-func-swift-constraints-constraintsystem-simplifytype.swift
13
226
// 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 ""[{({{}}()
apache-2.0
darwin/textyourmom
TextYourMom/MapController.swift
1
10755
import UIKit import MapKit struct DebugLocation { var description : String = "" var latitude: Double = 0.0 var longitude: Double = 0.0 init(_ description: String, _ latitude: Double, _ longitude: Double) { self.description = description self.latitude = latitude self.longitu...
mit
banDedo/BDModules
NavigationDrawerViewController/NavigationDrawerViewController.swift
1
17526
// // NavigationDrawerViewController.swift // Harness // // Created by Patrick Hogan on 3/17/15. // Copyright (c) 2015 bandedo. All rights reserved. // import Snap import UIKit private let kNavigationDrawerDefaultRevealOffset = CGFloat(50.0) public class NavigationDrawerViewController: LifecycleViewController, U...
apache-2.0
qwang216/ChatApp
ChatApp/GlobalMethods.swift
1
431
// // GlobalMethods.swift // ChatApp // // Created by Jason Wang on 8/14/16. // Copyright © 2016 Jason Wang. All rights reserved. // import UIKit func errorAlertTitle(title: String, message: String) -> UIAlertController { let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert) ...
mit
creatubbles/ctb-api-swift
CreatubblesAPIClient/Sources/Core/Data/EditProfileData.swift
1
1982
// // EditProfileData.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, including w...
mit
ben-ng/swift
validation-test/compiler_crashers_fixed/01092-getselftypeforcontainer.swift
1
436
// 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
IndisputableLabs/Swifthereum
Examples/MacOS/MacEtherScan/MacEtherScan/AppDelegate.swift
1
516
// // AppDelegate.swift // MacEtherScan // // Created by Ronald Mannak on 10/18/17. // Copyright © 2017 Indisputable Labs. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { ...
mit
mrdepth/Neocom
Legacy/Neocom/Neocom/NCLoyaltyStoreOffersViewController.swift
2
6329
// // NCLoyaltyStoreOffersViewController.swift // Neocom // // Created by Artem Shimanski on 12.10.17. // Copyright © 2017 Artem Shimanski. All rights reserved. // import UIKit import EVEAPI import CoreData import Futures class NCLoyaltyStoreCategoryRow: TreeRow { let categoryID: Int lazy var category: NCDBIn...
lgpl-2.1
frootloops/swift
test/Sema/diag_get_vs_set_subscripts.swift
4
660
// RUN: %target-typecheck-verify-swift enum Key: Int { case aKey case anotherKey // expected-note {{did you mean 'anotherKey'?}} } class sr6175 { var dict: [Key: String] = [:] func what() -> Void { dict[.notAKey] = "something" // expected-error {{type 'Key' has no member 'notAKey'}} } subscript(i:...
apache-2.0
adrfer/swift
test/1_stdlib/Dispatch.swift
4
2107
// RUN: %target-run-simple-swift // REQUIRES: executable_test // REQUIRES: objc_interop import Dispatch import Foundation 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 -si...
apache-2.0
GYLibrary/GPRS
OznerGPRS/View/WaterPurifiCell.swift
1
1429
// // WaterPurifiCell.swift // OznerGPRS // // Created by ZGY on 2017/9/22. // Copyright © 2017年 macpro. All rights reserved. // // Author: Airfight // My GitHub: https://github.com/airfight // My Blog: http://airfight.github.io/ // My Jane book: http://www.jianshu.com/users/17d6a01e3361 // C...
mit
cplaverty/KeitaiWaniKani
AlliCrab/ViewControllers/WebViewController.swift
1
20275
// // WebViewController.swift // AlliCrab // // Copyright © 2017 Chris Laverty. All rights reserved. // import OnePasswordExtension import os import UIKit import WaniKaniKit import WebKit protocol WebViewControllerDelegate: class { func webViewControllerDidFinish(_ controller: WebViewController) } class WebVi...
mit
iosphere/ISHLogDNA
SampleAppSwift/ViewController.swift
1
210
// // ViewController.swift // SampleAppSwift // // Created by Felix Lamouroux on 14.06.17. // Copyright © 2017 iosphere. All rights reserved. // import UIKit class ViewController: UIViewController { }
mit
qinting513/SwiftNote
PullToRefreshKit-master 自定义刷新控件/PullToRefreshKit/CurveMaskTableViewController.swift
1
823
// // CurveMaskTableViewController.swift // PullToRefreshKit // // Created by huangwenchen on 16/8/4. // Copyright © 2016年 Leo. All rights reserved. // import Foundation import UIKit class CurveMaskTableViewController:BaseTableViewController{ override func viewDidLoad() { super.viewDidLoad() /...
apache-2.0
hughhopkins/PW-OSX
Pods/CryptoSwift/Sources/CryptoSwift/PKCS7.swift
4
1498
// // PKCS7.swift // CryptoSwift // // Created by Marcin Krzyzanowski on 28/02/15. // Copyright (c) 2015 Marcin Krzyzanowski. All rights reserved. // // PKCS is a group of public-key cryptography standards devised // and published by RSA Security Inc, starting in the early 1990s. // public struct PKCS7: Padding ...
mit
khizkhiz/swift
validation-test/compiler_crashers_fixed/27780-swift-conformancelookuptable-lookupconformances.swift
4
260
// 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 { {struct h } enum b{ enum e:A class A<T:T.a
apache-2.0
inkyfox/SwiftySQL
Sources/SQLFunc.swift
3
2010
// // SQLFunc.swift // SwiftySQL // // Created by Yongha Yoo (inkyfox) on 2016. 10. 22.. // Copyright © 2016년 Gen X Hippies Company. All rights reserved. // import Foundation public struct SQLFunc: SQLValueType, SQLConditionType, SQLOrderType, SQLAliasable { let name: String let args: [SQLExprType] ...
mit
zhangmufeng/ZMFDY
ZMFDouYu/ZMFDouYu/Classes/Main/MainTabBarController.swift
1
1260
// // MainTabBarController.swift // ZMFDouYu // // Created by Mufeng on 2016/12/1. // Copyright © 2016年 ZMF. All rights reserved. // import UIKit class MainTabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() addChildVC(storyName: "Home") addChildV...
mit
TylerKuster/MeetAnotherTeam
MeetAnotherTeam/MeetAnotherTeamTests/MeetAnotherTeamTests.swift
1
1003
// // MeetAnotherTeamTests.swift // MeetAnotherTeamTests // // Created by Tyler Kuster on 10/5/17. // Copyright © 2017 12 Triangles. All rights reserved. // import XCTest @testable import MeetAnotherTeam class MeetAnotherTeamTests: XCTestCase { override func setUp() { super.setUp() // Put...
mit
jkolb/Shkadov
Shkadov/renderer/GPUBuffer.swift
1
1845
/* 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
Incipia/Conduction
Example/Pods/Bindable/Bindable/Classes/KeyValue/KVCompliance.swift
2
1212
// // IncKVCompliance.swift // GigSalad // // Created by Leif Meyer on 2/24/17. // Copyright © 2017 Incipia. All rights reserved. // import Foundation public protocol IncKVKeyType: Hashable { var rawValue: String { get } init?(rawValue: String) func kvTypeError(value: Any?) -> IncKVError static var al...
mit
czerwinskilukasz1/QuickSwiftStructures
QuickSwiftStructures/QuickNode.swift
1
366
// // QNode.swift // QuickSwiftStructures // // Created by Lukasz Czerwinski on 11/5/15. // Copyright © 2015 Lukasz Czerwinski <czerwinskilukasz1@gmail.com>. All rights reserved. // Distributed under MIT License import Foundation class QuickNode<T> { var key: T var next: QuickNode? = nil in...
mit
TheBudgeteers/CartTrackr
CartTrackr/Carthage/Checkouts/SwiftyCam/Source/PreviewView.swift
1
1914
/*Copyright (c) 2016, Andrew Walz. Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistrib...
mit
hstdt/GodEye
Carthage/Checkouts/LeakEye/Example/LeakEye/SecondViewController.swift
1
1155
// // SecondViewController.swift // LeakEye // // Created by zixun on 16/12/26. // Copyright © 2016年 CocoaPods. All rights reserved. // import Foundation import UIKit class LeakTest: NSObject { var block: (() -> ())! init(block: @escaping () -> () ) { super.init() self.block = bl...
mit
lvogelzang/Blocky
Blocky/Levels/Level17.swift
1
877
// // Level17.swift // Blocky // // Created by Lodewijck Vogelzang on 07-12-18 // Copyright (c) 2018 Lodewijck Vogelzang. All rights reserved. // import UIKit final class Level17: Level { let levelNumber = 17 var tiles = [[0, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0]] let cameraFollowsBlo...
mit
inket/stts
sttsTests/StringExtensionsTests.swift
1
589
// // StringExtensionsTests.swift // sttsTests // import XCTest @testable import stts class StringExtensionsTests: XCTestCase { func testInnerJSONStringWithNewLine() throws { XCTAssertEqual("jsonCallback(✅);\n".innerJSONString, "✅") XCTAssertEqual("jsonCallback(✅); \n\n\n ".innerJSONString, "✅")...
mit
funnyordie/TimeAgoInWords
Demo/Demo/AppDelegate.swift
1
2134
// // AppDelegate.swift // Demo // // Created by Ryan Boyajian on 4/3/15. // Copyright (c) 2015 Ello. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWith...
mit
Roommate-App/roomy
roomy/Pods/IBAnimatable/Sources/ActivityIndicators/Animations/ActivityIndicatorAnimationBallZigZag.swift
2
2533
// // Created by Tom Baranes on 23/08/16. // Copyright (c) 2016 IBAnimatable. All rights reserved. // import UIKit public class ActivityIndicatorAnimationBallZigZag: ActivityIndicatorAnimating { // MARK: Properties fileprivate let duration: CFTimeInterval = 0.7 // MARK: ActivityIndicatorAnimating public...
mit
mbuchetics/DataSource
DataSourceTests/DataSourceTests.swift
1
1006
// // DataSourceTests.swift // DataSourceTests // // Created by Matthias Buchetics on 22/02/2017. // Copyright © 2017 aaa - all about apps GmbH. All rights reserved. // import XCTest @testable import DataSource class DataSourceTests: XCTestCase { override func setUp() { super.setUp() // ...
mit
kickstarter/ios-oss
KsApi/extensions/ApolloClient+RAC.swift
1
2167
import Apollo import Foundation import ReactiveSwift extension ApolloClient: ApolloClientType { /** Performs a GraphQL fetch request with a given query. - parameter query: The `Query` to fetch. - returns: A `SignalProducer` generic over `Query.Data` and `ErrorEnvelope`. */ public func fetch<Query: Gr...
apache-2.0
propellerlabs/PropellerNetwork
Source/WebService.swift
1
5559
// // WebService.swift // PropellerNetwork // // Created by Roy McKenzie on 2/2/17. // Copyright © 2017 Propeller. All rights reserved. // import Foundation private let acceptableStatusCodes = Array(200..<300) /// WebService error public enum WebServiceError: Error { case creatingRequestFailed case parsi...
mit
omochi/numsw
Playgrounds/RenderTableViewController.swift
1
3874
// // RenderTableViewController.swift // sandbox // // Created by color_box on 2017/03/04. // Copyright © 2017年 sonson. All rights reserved. // // Second Implementation with UITableView import UIKit private class RenderTableViewCell: UITableViewCell { var renderer: Renderer? { willSet { ...
mit
CodeAndWeb/TexturePacker-SpriteKit-Swift
TexturePacker-SpriteKit-Swift/AppDelegate.swift
1
2199
// // AppDelegate.swift // TexturePacker-SpriteKit-Swift // // Created by Joachim Grill on 17.12.14. // Copyright (c) 2014 CodeAndWeb GmbH. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ applicatio...
mit
apple/swift-package-manager
Sources/PackageGraph/Version+Extensions.swift
2
656
//===----------------------------------------------------------------------===// // // This source file is part of the Swift open source project // // Copyright (c) 2019-2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE....
apache-2.0
rajeejones/SavingPennies
Pods/IBAnimatable/IBAnimatable/PresentFlipSegue.swift
4
417
// // Created by Tom Baranes on 05/05/16. // Copyright © 2016 IBAnimatable. All rights reserved. // import UIKit open class PresentFlipSegue: UIStoryboardSegue { open override func perform() { destination.transitioningDelegate = TransitionPresenterManager.sharedManager().retrievePresenter(transitionAnimationT...
gpl-3.0
googlesamples/identity-appflip-ios
AppFlip-Sample-iOS/AppDelegate.swift
1
2480
/* * Copyright 2019 Google * * 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 w...
apache-2.0
TonnyTao/HowSwift
how_to_update_view_in_mvvm.playground/Sources/RxSwift/RxSwift/AnyObserver.swift
8
2199
// // AnyObserver.swift // RxSwift // // Created by Krunoslav Zaher on 2/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // /// A type-erased `ObserverType`. /// /// Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observe...
mit
AboutObjectsTraining/swift-comp-reston-2017-02
demos/ReadingList/ReadingList/AppDelegate.swift
1
252
// // AppDelegate.swift // ReadingList // // Created by Student on 3/1/17. // Copyright © 2017 Student. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? }
mit
zhiquan911/CHKLineChart
CHKLineChart/Example/Example/Demo/views/SectionHeaderView.swift
1
1733
// // SectionHeaderView.swift // CHKLineChart // // Created by Chance on 2017/7/14. // Copyright © 2017年 atall.io. All rights reserved. // import UIKit import SnapKit import CHKLineChartKit class SectionHeaderView: UIView { @IBOutlet var labelTitle: UILabel! @IBOutlet var buttonSet: UIButton! ov...
mit
tohab/HanBot
Hanbot/AppDelegate.swift
2
2174
// // AppDelegate.swift // HanBot // // Created by Rohan Prasad on 03/02/2017. // Copyright (c) 2017 Rohan Prasad. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFini...
mit
mohamede1945/quran-ios
Quran/QuranShareData.swift
2
893
// // QuranShareData.swift // Quran // // Created by Mohamed Afifi on 4/4/17. // // Quran for iOS is a Quran reading application for iOS. // Copyright (C) 2017 Quran.com // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publishe...
gpl-3.0
arvedviehweger/swift
test/ClangImporter/objc_bridging_generics.swift
1
15238
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify -swift-version 4 %s // REQUIRES: objc_interop import Foundation import objc_generics func testNSArrayBridging(_ hive: Hive) { _ = hive.bees as [Bee] } func testNSDictionaryBridging(_ hive: Hive) { _ = hive.beesByN...
apache-2.0
OneBusAway/onebusaway-iphone
Carthage/Checkouts/IGListKit/Examples/Examples-tvOS/IGListKitExamples/Views/CarouselCell.swift
2
1150
/** Copyright (c) Facebook, Inc. and its affiliates. The examples provided by Facebook are for non-commercial testing and evaluation purposes only. Facebook reserves all rights not expressly granted. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ...
apache-2.0
HabitRPG/habitrpg-ios
HabitRPG/Views/HabiticaAlertController.swift
1
16880
// // BaseAlertController.swift // Habitica // // Created by Phillip on 23.10.17. // Copyright © 2017 HabitRPG Inc. All rights reserved. // import UIKit import PopupDialog @objc class HabiticaAlertController: UIViewController, Themeable { @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var tit...
gpl-3.0
twobitlabs/Nimble
Tests/NimbleTests/Matchers/MatchErrorTest.swift
11
3159
import Foundation import XCTest import Nimble final class MatchErrorTest: XCTestCase, XCTestCaseProvider { func testMatchErrorPositive() { expect(NimbleError.laugh).to(matchError(NimbleError.laugh)) expect(NimbleError.laugh).to(matchError(NimbleError.self)) expect(EquatableError.parameteriz...
apache-2.0
onevcat/Kingfisher
Sources/General/ImageSource/AVAssetImageDataProvider.swift
2
5185
// // AVAssetImageDataProvider.swift // Kingfisher // // Created by onevcat on 2020/08/09. // // Copyright (c) 2020 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 // i...
mit
roecrew/AudioKit
AudioKit/Common/Playgrounds/Synthesis.playground/Pages/Noise Operations.xcplaygroundpage/Contents.swift
2
503
//: ## Noise Operations //: import XCPlayground import AudioKit let generator = AKOperationGenerator() { _ in let white = AKOperation.whiteNoise() let pink = AKOperation.pinkNoise() let lfo = AKOperation.sineWave(frequency: 0.3) let balance = lfo.scale(minimum: 0, maximum: 1) let noise = mixer(whi...
mit
acn001/SwiftJSONModel
SwiftJSONModel/SwiftJSONModelIgnored.swift
1
1278
// // SwiftJSONModel.swift // SWiftJSONModel // // @version 0.1.1 // @author Zhu Yue(411514124@qq.com) // // The MIT License (MIT) // // Copyright (c) 2016 Zhu Yue // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software...
mit
nathawes/swift
test/ClangImporter/clang_builtins.swift
5
1637
// RUN: not %target-swift-frontend -typecheck %s 2>&1 | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-runtime %s #if canImport(Darwin) import Darwin #elseif canImport(Glibc) import Glibc #elseif os(Windows) import MSVCRT #else #error("Unsupported platform") #endif func test() { let _: Int = strxf...
apache-2.0
TrustWallet/trust-wallet-ios
Trust/Settings/Types/SettingsError.swift
1
405
// Copyright DApps Platform Inc. All rights reserved. import Foundation enum SettingsError: LocalizedError { case failedToSendEmail var errorDescription: String? { switch self { case .failedToSendEmail: return NSLocalizedString("settings.error.failedToSendEmail", value: "Failed to...
gpl-3.0
apple/swift-format
Tests/SwiftFormatRulesTests/OneVariableDeclarationPerLineTests.swift
1
5945
import SwiftFormatRules final class OneVariableDeclarationPerLineTests: LintOrFormatRuleTestCase { func testMultipleVariableBindings() { XCTAssertFormatting( OneVariableDeclarationPerLine.self, input: """ var a = 0, b = 2, (c, d) = (0, "h") let e = 0, f = 2, (g, h) = (0, "h") ...
apache-2.0
huang1988519/WechatArticles
WechatArticles/WechatArticles/Library/Timepiece/NSTimeInterval+Timepiece.swift
6
1614
// // NSTimeInterval+Timepiece.swift // Timepiece // // Created by Mattijs on 10/05/15. // Copyright (c) 2015 Naoto Kaneko. All rights reserved. // import Foundation /** This extension is deprecated in 0.4.1 and will be obsoleted in 0.5.0. The conversion of Duration into NSTimeInterval is performed under...
apache-2.0
songzhw/2iOS
iOS_Swift/iOS_Swift/biz/basiclesson/BillCaculatorViewController.swift
1
1323
import UIKit class BillCaculatorViewController: UIViewController { @IBOutlet weak var tfTotal: UITextField! @IBOutlet weak var lblSplit: UILabel! weak var btnPrevSelected : UIButton? //让上一个selected的变为不可选. 是动态的. 所以不用IBOutlet var percentage : Float = 0 var headcount : Int = 2 @IBAction func tipPr...
apache-2.0
lukaskollmer/RuntimeKit
RuntimeKit/Sources/Classes.swift
1
1684
// // Classes.swift // RuntimeKit // // Created by Lukas Kollmer on 31.03.17. // Copyright © 2017 Lukas Kollmer. All rights reserved. // import Foundation public extension Runtime { /// Register a new class with the Objective-C runtime /// /// - Parameters: /// - name: The name of the new class ...
mit
vamsirajendra/firefox-ios
Client/Frontend/Home/BookmarksPanel.swift
2
14566
/* 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 UIKit import Storage import Shared import XCGLogger private let log = Logger.browserLogger let BookmarkSt...
mpl-2.0
ObjectAlchemist/OOUIKit
Sources/_UIKitDelegate/UITableViewDelegate/ConfiguringRowsForTheTableView/UITableViewDelegateConfigurationPrinting.swift
1
2423
// // UITableViewDelegateConfigurationPrinting.swift // OOUIKit // // Created by Karsten Litsche on 04.11.17. // import UIKit public final class UITableViewDelegateConfigurationPrinting: NSObject, UITableViewDelegate { // MARK: - init convenience override init() { fatalError("Not supporte...
mit
eofster/Telephone
Telephone/ApplicationDataLocations.swift
1
785
// // ApplicationDataLocations.swift // Telephone // // Copyright © 2008-2016 Alexey Kuznetsov // Copyright © 2016-2021 64 Characters // // Telephone 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, ei...
gpl-3.0
PeeJWeeJ/SwiftyDevice
SwiftyDevice/AppDelegate.swift
1
2081
// // AppDelegate.swift // SwiftyDevice // // Created by Paul Fechner on 9/14/16. // Copyright © 2016 PeeJWeeJ. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchi...
apache-2.0
martinomamic/CarBooking
CarBooking/Services/Booking/BookingService.swift
1
1951
// // BookingService.swift // CarBooking // // Created by Martino Mamic on 29/07/2017. // Copyright © 2017 Martino Mamic. All rights reserved. // import UIKit import Foundation class BookingService: BookingsStoreProtocol { private let service = WebService() func createBooking(newBooking: Booking, completi...
mit
Tj3n/TVNExtensions
UIKit/UITableView.swift
1
1821
// // UITableViewExtension.swift // MerchantDashboard // // Created by Tien Nhat Vu on 3/17/16. // Copyright © 2016 Tien Nhat Vu. All rights reserved. // import Foundation import UIKit extension UITableView { /// Auto dequeue cell with custom cell class, the identifier must have the same name as the cell...
mit
wikimedia/apps-ios-wikipedia
Wikipedia/Code/InsertLinkViewController.swift
3
3701
import UIKit protocol InsertLinkViewControllerDelegate: AnyObject { func insertLinkViewController(_ insertLinkViewController: InsertLinkViewController, didTapCloseButton button: UIBarButtonItem) func insertLinkViewController(_ insertLinkViewController: InsertLinkViewController, didInsertLinkFor page: String, w...
mit
chrisjmendez/swift-exercises
Authentication/BasicDropBox/BasicDropBox/DropboxUtil.swift
1
1637
// // DropboxUtil.swift // BasicDropBox // // Created by Chris on 1/16/16. // Copyright © 2016 Chris Mendez. All rights reserved. // // https://www.dropbox.com/developers/documentation/swift#tutorial import UIKit import SwiftyDropbox protocol DropboxUtilDelegate { func didAuthenticate(success:Bool) } class D...
mit
TieShanWang/KKAutoScrollView
KKAutoScrollView/KKAutoScrollView/KKAutoCollectionViewCell.swift
1
1556
// // KKAutoCollectionViewCell.swift // KKAutoScrollController // // Created by KING on 2017/1/4. // Copyright © 2017年 KING. All rights reserved. // import UIKit import Security let KKAutoCollectionViewCellReuseID = "KKAutoCollectionViewCellReuseID" class KKAutoCollectionViewCell: UICollectionViewCell { va...
mit
davedufresne/SwiftParsec
Sources/SwiftParsec/TokenParser.swift
1
42546
//============================================================================== // TokenParser.swift // SwiftParsec // // Created by David Dufresne on 2015-10-05. // Copyright © 2015 David Dufresne. All rights reserved. // // A helper module to parse lexical elements (tokens). See the initializer for // the `TokenPars...
bsd-2-clause
Brightify/Cuckoo
Source/CuckooFunctions.swift
2
1683
// // CuckooFunctions.swift // Cuckoo // // Created by Tadeas Kriz on 13/01/16. // Copyright © 2016 Brightify. All rights reserved. // /// Starts the stubbing for the given mock. Can be used multiple times. public func stub<M: Mock>(_ mock: M, block: (M.Stubbing) -> Void) { block(mock.getStubbingProxy()) } //...
mit
silence0201/Swift-Study
Learn/18.错误处理/CocoaError/CocoaError/main.swift
1
196
import Foundation let filePath = "xxx" var err: NSError? let contents = NSString(contentsOfFile: filePath, encoding: String.Encoding.utf8, error: &err) if err != nil { // 错误处理 }
mit
luinily/hOme
hOme/UI/SequencesViewController.swift
1
3269
// // SequencesViewController.swift // hOme // // Created by Coldefy Yoann on 2016/02/07. // Copyright © 2016年 YoannColdefy. All rights reserved. // import Foundation import UIKit class SequencesViewController: UITableViewController, ApplicationUser { @IBOutlet weak var sequencesTable: UITableView! private ...
mit
angmu/SwiftPlayCode
02-TableView演练/02-TableView演练/ViewController.swift
1
2821
// // ViewController.swift // 02-TableView演练 // // Created by 穆良 on 2017/6/21. // Copyright © 2017年 穆良. All rights reserved. // import UIKit class ViewController: UIViewController { private lazy var tableView: UITableView = { // 实例化 指定样式 let tb = UITableView(frame: CGRect.zero, ...
mit
OatmealCode/Oatmeal
Example/Pods/Carlos/Carlos/GenericOperation.swift
4
532
import Foundation /** This class is a workaround for an issue with Swift where generic subclasses of NSOperation won't get the start() or main() func called. */ public class GenericOperation: ConcurrentOperation { public override func start() { genericStart() } /** The method to override if you have a g...
mit
stripe/stripe-ios
Stripe/STPPaymentMethodParams+BasicUI.swift
1
1584
// // STPPaymentMethodParams+BasicUI.swift // StripeiOS // // Created by David Estes on 6/30/22. // Copyright © 2022 Stripe, Inc. All rights reserved. // import Foundation @_spi(STP) import StripePaymentsUI import UIKit extension STPPaymentMethodParams: STPPaymentOption { // MARK: - STPPaymentOption @objc...
mit
cerberillo/ios-workflow
library/library.demo/AppDelegate.swift
1
2149
// // AppDelegate.swift // library.demo // // Created by David Martin on 6/28/16. // Copyright © 2016 David Martin. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinis...
mit
uias/Tabman
Sources/Tabman/Bar/BarItem/UIKit+TMBarItemable.swift
1
647
// // UIKit+TMBarItem.swift // Tabman // // Created by Merrick Sapsford on 19/10/2018. // Copyright © 2022 UI At Six. All rights reserved. // import UIKit /// :nodoc: extension UINavigationItem: TMBarItemable { // swiftlint:disable unused_setter_value public var image: UIImage? { get { ...
mit
SweetzpotAS/TCXZpot-Swift
TCXZpot-SwiftTests/LapTest.swift
1
3482
// // LapTest.swift // TCXZpot // // Created by Tomás Ruiz López on 24/5/17. // Copyright 2017 SweetZpot AS // 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...
apache-2.0
L-Zephyr/Drafter
Tests/DrafterTests/CombinatorTest.swift
1
6223
// // TestCombinator.swift // DrafterTests // // Created by LZephyr on 2017/11/1. // import XCTest class CombinatorTest: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } overr...
mit
yisimeng/YSMFactory-swift
YSMFactory-swift/Vendor/CIFilter/CIMaskedVariableBlur.swift
1
506
// // CIMaskedVariableBlur.swift // YSMFactory-swift // // Created by 忆思梦 on 2016/12/30. // Copyright © 2016年 忆思梦. All rights reserved. // import UIKit class CIMaskedVariableBlur: YSMFilter { /// default : 10.0 var inputRadius:CGFloat? { didSet{ ciFilter.setValue(inputRadius, forKey: ...
mit
austinzheng/swift-compiler-crashes
crashes-duplicates/07087-swift-printingdiagnosticconsumer-handlediagnostic.swift
11
355
// 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 B<H : T where A<d where g: A.g : d func a(a<f = compose([1] func a(a") func a var b { let c : T -> T where S<S { struct S { } } struct d<d where...
mit
austinzheng/swift-compiler-crashes
crashes-duplicates/11673-swift-parser-skipsingle.swift
11
266
// 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 d { enum e { { } var d = [ { protocol P { class case , { ( ( ( ( ( ( ( [ { ( ( { ( { { ( [
mit