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
zorn/Expenses
_FINAL/Expenses/Expense.swift
1
140
import Foundation class Expense : NSObject { let name: String init(name: String) { self.name = name; } }
mit
raymondshadow/SwiftDemo
SwiftApp/StudyNote/StudyNote/RxSwift/custom/model/SNStuInfoModel.swift
1
1288
// // SNStuInfoModel.swift // StudyNote // // Created by 邬勇鹏 on 2018/9/21. // Copyright © 2018年 Raymond. All rights reserved. // import UIKit class SNStuInfoModel: NSObject { @objc dynamic var baseInfo: SNStuBaseInfoModel = SNStuBaseInfoModel() @objc dynamic var scoreInfo: SNStuScoreInfoModel = ...
apache-2.0
iMetalk/TCZDemo
RealmTest-swift-/Pods/RealmSwift/RealmSwift/Sync.swift
5
29955
//////////////////////////////////////////////////////////////////////////// // // Copyright 2016 Realm Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/li...
mit
hollance/swift-algorithm-club
Bucket Sort/BucketSort.playground/Contents.swift
3
1732
// // BucketSort.playground // // Created by Barbara Rodeker on 4/4/16. // // 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...
mit
manavgabhawala/swift
test/SILGen/retaining_globals.swift
2
2824
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/globals.h -emit-silgen %s | %FileCheck %s // REQUIRES: objc_interop // This test makes sure loading from globals properly retains/releases loads from globals. // NSString was the only real problem, as the compiler treats NSStr...
apache-2.0
Elm-Tree-Island/Shower
Shower/Carthage/Checkouts/ReactiveCocoa/ReactiveCocoaTests/UIKit/UIScrollViewSpec.swift
5
3876
import ReactiveSwift import ReactiveCocoa import UIKit import Quick import Nimble import enum Result.NoError private final class UIScrollViewDelegateForZooming: NSObject, UIScrollViewDelegate { func viewForZooming(in scrollView: UIScrollView) -> UIView? { return scrollView.subviews.first! } } class UIScrollViewSp...
gpl-3.0
ben-ng/swift
validation-test/compiler_crashers_fixed/27592-swift-genericparamlist-addnestedarchetypes.swift
1
500
// 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
cnoon/swift-compiler-crashes
crashes-duplicates/07368-swift-sourcemanager-getmessage.swift
11
311
// 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: A { class A { var d { switch x } protocol A : NSObject { } } class A { } enum S<T where g: T: f.c { var f = A? { class case c, struct
mit
cnoon/swift-compiler-crashes
crashes-duplicates/07679-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 enum b { protocol A { class d { extension A { var f = { { class case ,
mit
ConradoMateu/GOT-Challenge-Swift
GOT-Challenge-Swift/Modules/Details/Presenter/DetailsPresenter.swift
1
498
// // DetailsPresenter.swift // GOT-Challenge-Swift // // Created by Conrado Mateu Gisbert on 19/04/17. // Copyright © 2017 conradomateu. All rights reserved. // import Foundation class DetailsPresenter: DetailsPresentation { open var view: DetailsView? var character: Character! init(view: DetailsVie...
apache-2.0
aroyarexs/PASTA
Tests/PASTAViewTests.swift
1
1871
// // Created by Aaron Krämer on 23.08.17. // Copyright (c) 2017 Aaron Krämer. All rights reserved. // import Quick import Nimble @testable import PASTA class PASTAViewTests: QuickSpec { override func spec() { describe("a PASTA view") { let view = PASTAView(frame: CGRect(x: 0, y: 0, width: 10...
mit
son11592/STKeyboard
Example/Tests/Tests.swift
1
760
import UIKit import XCTest import STKeyboard class Tests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This m...
mit
rringham/swift-promises
promises/AppDelegate.swift
1
3231
// // AppDelegate.swift // promises // // Created by Rob Ringham on 6/7/14. // Copyright (c) 2014, Rob Ringham // // 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
leizh007/HiPDA
HiPDA/HiPDA/General/Categories/String+Emoji.swift
1
3101
// // String+Emoji.swift // HiPDA // // Created by leizh007 on 2017/6/15. // Copyright © 2017年 HiPDA. All rights reserved. // import Foundation // https://stackoverflow.com/questions/30757193/find-out-if-character-in-string-is-emoji extension UnicodeScalar { var isEmoji: Bool { switch va...
mit
davejlin/treehouse
swift/swift3/RestaurantReviews/RestaurantReviews/YelpSearchController.swift
1
7349
// // YelpSearchController.swift // RestaurantReviews // // Created by Pasan Premaratne on 5/9/17. // Copyright © 2017 Treehouse. All rights reserved. // import UIKit import MapKit class YelpSearchController: UIViewController { // MARK: - Properties let searchController = UISearchController(sear...
unlicense
gottsohn/ios-swift-boiler
IOSSwiftBoilerTests/WebViewControllerTests.swift
1
2422
// // WebViewControllerTests.swift // IOSSwiftBoiler // // Created by Godson Ukpere on 3/17/16. // Copyright © 2016 Godson Ukpere. All rights reserved. // import XCTest @testable import IOSSwiftBoiler class WebViewControllerTests: XCTestCase { var webViewController:WebViewController! var timer:NSTime...
mit
salesforce-ux/design-system-ios
Demo-Swift/slds-sample-app/MainListViewController.swift
1
5475
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved // Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license import UIKit class MainListViewController: UITableViewController { var footerHeight : CGFloat = 200.0 var tableData : [(name:String, cell:UITableViewCell.Ty...
bsd-3-clause
kzaher/RxSwift
RxCocoa/macOS/NSTextField+Rx.swift
7
2690
// // NSTextField+Rx.swift // RxCocoa // // Created by Krunoslav Zaher on 5/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // #if os(macOS) import Cocoa import RxSwift /// Delegate proxy for `NSTextField`. /// /// For more information take a look at `DelegateProxyType`. open class RxTextFieldDe...
mit
meetkei/KxUI
KxUI/View/Button/KUUnderlineLabelButton.swift
1
1959
// // Copyright (c) 2016 Keun young Kim <app@meetkei.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, co...
mit
HongliYu/firefox-ios
UITests/LoginInputTests.swift
1
5243
/* 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 EarlGrey @testable import Client class LoginInputTests: KIFTestCase { fileprivate va...
mpl-2.0
mrdepth/EVEUniverse
Legacy/Neocom/Neocom/ZKillboardInteractor.swift
2
972
// // ZKillboardInteractor.swift // Neocom // // Created by Artem Shimanski on 11/15/18. // Copyright © 2018 Artem Shimanski. All rights reserved. // import Foundation import Futures import CloudData class ZKillboardInteractor: TreeInteractor { typealias Presenter = ZKillboardPresenter typealias Content = Void ...
lgpl-2.1
RedRoma/Lexis
Code/Lexis/WordViewController+Sharing.swift
1
4687
// // WordViewController+Sharing.swift // Lexis // // Created by Wellington Moreno on 9/24/16. // Copyright © 2016 RedRoma, Inc. All rights reserved. // import AromaSwiftClient import Foundation import LexisDatabase import Archeota import UIKit /** Determines the size of the card created and shared. */ private l...
apache-2.0
dangquochoi2007/cleancodeswift
CleanStore/CleanStore/App/Scenes/SignIn/Worker/SignInWorker.swift
1
258
// // SignInWorker.swift // CleanStore // // Created by hoi on 16/6/17. // Copyright (c) 2017 hoi. All rights reserved. // import UIKit class SignInWorker { // MARK: - Business Logic func doSomeWork() { // TODO: Do the work } }
mit
hooman/swift
test/SourceKit/CursorInfo/cursor_some_type.swift
4
3793
public protocol Proto { associatedtype Assoc func method() -> Assoc } public class Base {} public class Derived: Base, Proto { public func method() -> Int {} } public struct S { public func foo<T>(x: T) -> some Base & Proto { return Derived() } } func test(value: S) { let _ = value.foo(x: 12) } // ...
apache-2.0
swipe-org/swipe
core/SwipePage.swift
2
28798
// // SwipePage.swift // Swipe // // Created by satoshi on 6/3/15. // Copyright (c) 2015 Satoshi Nakajima. All rights reserved. // #if os(OSX) import Cocoa import AVFoundation #else import UIKit import AVFoundation import MediaPlayer #endif extension UIResponder { private weak static var _currentFirstResponde...
mit
sgr-ksmt/SUSwiftSugar
SUSwiftSugar/Protocols/FilePathConvertible.swift
1
508
// // FilePathConvertible.swift import Foundation public protocol FilePathConvertible { var filePath: String { get } var fileURL: NSURL { get } } extension String: FilePathConvertible { public var filePath: String { return self } public var fileURL: NSURL { return NSURL(fileURLWi...
mit
tutsplus/iOS-AVFoundation-StarterProject
MP3Player/ViewController.swift
2
1076
// // ViewController.swift // MP3Player // // Created by James Tyner on 7/5/15. // Copyright (c) 2015 James Tyner. All rights reserved. // import UIKit import AVFoundation class ViewController: UIViewController { var mp3Player:MP3Player? var timer:NSTimer? @IBOutlet weak var trackName: UILab...
bsd-2-clause
dymx101/BallDown
BallDown/Extension/SKNodeExtension.swift
1
631
// // SKNodeExtension.swift // BallDown // // Copyright (c) 2015 ones. All rights reserved. // import Foundation import SpriteKit extension SKNode { var bind: AnyObject? { get { return self.userData?.objectForKey("@bind") } set { if newValue == nil { ...
mit
firebase/quickstart-ios
database/DatabaseExampleSwiftUI/DatabaseExample/Shared/Models/UserViewModel.swift
1
2150
// // Copyright (c) 2021 Google 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/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
apache-2.0
mobgeek/swift
Swift em 4 Semanas/Playgrounds/Semana 3/5-Inicialização.playground/Contents.swift
2
3737
// Playground - noun: a place where you can play import UIKit // Initializers struct CelsiusTeste { var temperatura:Double = 35.0 //Uma outra opção seria usar o init() para inicializar temperatura. O resultado seria o mesmo. // init() { // // temperatura = 35.0 // // ...
mit
lemanhtien/MTSlideToOpen
MTSlideToOpen/AppDelegate.swift
1
2176
// // AppDelegate.swift // MTSlideToOpen // // Created by Martin Lee on 10/12/17. // Copyright © 2017 Martin Le. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinish...
mit
DylanModesitt/Picryption_iOS
Picryption/AppDelegate.swift
1
4771
// // AppDelegate.swift // Picryption // // Created by Dylan Modesitt on 4/21/17. // Copyright © 2017 Modesitt Systems. All rights reserved. // import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: U...
mit
xmkevinchen/CKMessagesKit
CKMessagesKit/Sources/View/Layout/CKViewLayout.swift
1
617
// // CKMessageLayout.swift // CKMessagesViewController // // Created by Kevin Chen on 8/26/16. // Copyright © 2016 Kevin Chen. All rights reserved. // import CoreGraphics /// A type that can layout itself and its contents public protocol CKViewLayout { /// The type of the leaf content elements in this l...
mit
varkor/firefox-ios
Client/Frontend/Menu/AppMenuConfiguration.swift
1
16746
/* 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 enum AppMenuAction: String { case OpenNewNormalTab = "OpenNewNormalTab" c...
mpl-2.0
rlasante/Swift-Trip-Tracker
LocationTracker/TripManager.swift
1
4691
// // LocationManager.swift // LocationTracker // // Created by Ryan LaSante on 11/1/15. // Copyright © 2015 rlasante. All rights reserved. // import UIKit import CoreData import CoreLocation import ReactiveCocoa class TripManager: NSObject, CLLocationManagerDelegate { static let sharedInstance = TripManager()...
mit
joe22499/JKCalendar
Sources/JKCalendarScrollView.swift
1
6964
// // JKCalendarScrollView.swift // // Copyright © 2017 Joe Ciou. 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 limita...
mit
andrebocchini/SwiftChatty
SwiftChatty/Responses/Messages/GetMessageCountResponse.swift
1
535
// // GetMessageCountResponse.swift // SwiftChatty // // Created by Andre Bocchini on 1/24/16. // Copyright © 2016 Andre Bocchini. All rights reserved.// import Freddy /// -SeeAlso: http://winchatty.com/v2/readme#_Toc421451692 public struct GetMessageCountResponse { public let total: Int public let unrea...
mit
wordpress-mobile/WordPress-iOS
WordPress/Classes/ViewRelated/QR Login/Helpers/QRLoginInternetConnectionChecker.swift
1
351
import Foundation struct QRLoginInternetConnectionChecker: QRLoginConnectionChecker { var connectionAvailable: Bool { let appDelegate = WordPressAppDelegate.shared guard let connectionAvailable = appDelegate?.connectionAvailable, connectionAvailable == true else { return false ...
gpl-2.0
bjarkehs/Rex
Source/UIKit/UIBarButtonItem.swift
1
1168
// // UIBarButtonItem.swift // Rex // // Created by Bjarke Hesthaven Søndergaard on 24/07/15. // Copyright (c) 2015 Neil Pankey. All rights reserved. // import ReactiveCocoa import UIKit extension UIBarButtonItem { /// Exposes a property that binds an action to bar button item. The action is set as /// a ...
mit
ioscreator/ioscreator
IOSSendEmailTutorial/IOSSendEmailTutorial/ViewController.swift
1
1902
// // ViewController.swift // IOSSendEmailTutorial // // Created by Arthur Knopper on 08/02/2020. // Copyright © 2020 Arthur Knopper. All rights reserved. // import UIKit import MessageUI class ViewController: UIViewController, MFMailComposeViewControllerDelegate, UITextFieldDelegate, UITextViewDelegate { @I...
mit
hanzhuzi/XRCustomProgressView
XRCustomProgressView/Classes/Views/MainCustomTableViewCell.swift
1
1542
// // MainCustomTableViewCell.swift // XRCustomProgressView // // Created by xuran on 2017/10/1. // Copyright © 2017年 xuran. All rights reserved. // import UIKit class MainCustomTableViewCell: UITableViewCell { var yearEarningsPrecentView: XRCirclePercentProgressView! var paillarProgressView: XRPaillarPr...
mit
studyYF/YueShiJia
YueShiJia/YueShiJia/Classes/Home/Models/YFSpecialGoodsItem.swift
1
3890
// // YFAdvetiseItem.swift // YueShiJia // // Created by YangFan on 2017/5/12. // Copyright © 2017年 YangFan. All rights reserved. // import UIKit class YFSpecialGoodsItem: NSObject { var special_sum: Int? var special_share_url: String? var special_image: String? var news_special: [News_Special...
apache-2.0
bitboylabs/selluv-ios
selluv-ios/selluv-ios/Classes/Base/Model/Etc/AlbumModel.swift
1
2705
// // AlbumModel.swift // bitboylabs-ios-base // // Created by 조백근 on 2016. 10. 18.. // Copyright © 2016년 BitBoy Labs. All rights reserved. // import RealmSwift class AlbumModel: NSObject { let realm = try! Realm() var albums: [[String: String]] let onGetData: Foundation.Notification = Foundation.Noti...
mit
kdawgwilk/vapor
Tests/Vapor/ControllerTests.swift
1
6464
import XCTest @testable import Vapor private class TestController: DropletInitializable, Resource { required init(droplet: Droplet) { } var lock: ( index: Int, store: Int, show: Int, replace: Int, modify: Int, destroy: Int, destroyAll: Int, opti...
mit
natecook1000/swift
test/IRGen/objc.swift
1
4710
// RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays // RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop import Foundation import gizmo //...
apache-2.0
endpress/PopNetwork
PopNetwork/Source/Client.swift
1
1376
// // SessionHttpClient.swift // PopNetwork // // Created by apple on 12/7/16. // Copyright © 2016 zsc. All rights reserved. // import Foundation /// the client protocol used to sent request and handle data protocol Client { func send<T: PopRequest>(popRequest: T, dataHandler: @escaping DataHandler) } /// a ...
apache-2.0
eurofurence/ef-app_ios
Packages/EurofurenceModel/Sources/EurofurenceModel/Private/Domain Events/Events/EventFeedbackReady.swift
1
388
extension DomainEvent { struct EventFeedbackReady { var identifier: EventIdentifier var feedback: EventFeedback var delegate: EventFeedbackDelegate var rating: Int { return feedback.starRating } var eventFeedback: String { ...
mit
austinzheng/swift-compiler-crashes
crashes-duplicates/19778-swift-constraints-constraintsystem-getfixedtyperecursive.swift
11
209
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing class B { deinit { var : Int = (T: B? {
mit
STShenZhaoliang/iOS-GuidesAndSampleCode
精通Swift设计模式/Chapter 22/SportsStore/SportsStore/ProductDataStore.swift
4
3803
import Foundation final class ProductDataStore { var callback:((Product) -> Void)?; private var networkQ:dispatch_queue_t private var uiQ:dispatch_queue_t; lazy var products:[Product] = self.loadData(); init() { networkQ = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0...
mit
Zuikyo/ZIKRouter
ZRouterTests/BSubview.swift
1
2541
// // BSubview.swift // ZRouterTests // // Created by zuik on 2018/4/28. // Copyright © 2018 zuik. All rights reserved. // import UIKit import ZRouter import ZIKRouter import ZIKRouter.Internal class BSubview: UIView { var title: String? } protocol BSubviewInput: class { var title: String? { get set } } ...
mit
tsc000/SCCycleScrollView
SCCycleScrollView/SCCycleScrollView/CustomCell/CustomCollectionViewCell.swift
1
1131
// // CustomCollectionViewCell.swift // SCCycleScrollView // // Created by tongshichao on 2018/11/28. // Copyright © 2018 童世超. All rights reserved. // import UIKit class CustomCollectionViewCell: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) initial() ...
mit
huangboju/Moots
Examples/SwiftUI/Mac/RedditOS-master/RedditOs/Features/Post/PostDetailHeader.swift
1
917
// // PostDetailHeader.swift // RedditOs // // Created by Thomas Ricouard on 10/07/2020. // import SwiftUI import Backend import KingfisherSwiftUI struct PostDetailHeader: View { let listing: SubredditPost var body: some View { HStack { Text(listing.title) .font(.ti...
mit
snazzware/Mergel
HexMatch/HexMap/HexCell.swift
2
9324
// // HexCell.swift // HexMatch // // Created by Josh McKee on 1/12/16. // Copyright © 2016 Josh McKee. All rights reserved. // import Foundation enum HexCellDirection { case north, south, northEast, northWest, southEast, southWest static let allDirections = [north, south, northEast, northWest, south...
mit
huonw/swift
validation-test/compiler_crashers_fixed/01852-swift-constraints-constraintsystem-getconstraintlocator.swift
65
461
// 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
noppoMan/aws-sdk-swift
Sources/Soto/Services/MigrationHubConfig/MigrationHubConfig_Error.swift
1
3024
//===----------------------------------------------------------------------===// // // This source file is part of the Soto for AWS open source project // // Copyright (c) 2017-2020 the Soto project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for t...
apache-2.0
dpereira411/GCTabView
GCTabView-swift/AppDelegate.swift
1
518
// // AppDelegate.swift // GCTabView-swift // // Created by Daniel Pereira on 13/11/14. // Copyright (c) 2014 Daniel Pereira. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(aNotification: NSNotification) { ...
mit
grpc/grpc-swift
Sources/GRPC/ClientCalls/LazyEventLoopPromise.swift
1
3420
/* * Copyright 2020, gRPC Authors All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
apache-2.0
jpush/jchat-swift
JChat/Src/UserModule/ViewController/JCRegisterInfoViewController.swift
1
9255
// // JCRegisterInfoViewController.swift // JChat // // Created by JIGUANG on 2017/5/12. // Copyright © 2017年 HXHG. All rights reserved. // import UIKit import JMessage class JCRegisterInfoViewController: UIViewController { var username: String! var password: String! //MARK: - life cycle ...
mit
melvitax/AFDateHelper
Documentation/Playground.playground/Pages/Adjusting Dates.xcplaygroundpage/Contents.swift
1
860
//: [Previous](@previous) import DateHelper /*: # Adjusting Dates Provides two functions for adjusting dates */ /*: **1. adjust(_ component:, offset:)** `func adjust(_ component:DateComponentType, offset:Int) -> Date ` */ Date().adjust(.second, offset: 110) Date().adjust(.minute, offset: 60) Date().adjust(.hour...
mit
grpc/grpc-swift
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/NIO/NIOQPSClientImpl.swift
1
10908
/* * Copyright 2020, gRPC Authors All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
apache-2.0
lp1994428/TextKitch
TextKitchen/TextKitchen/classes/Ingredients/Recommend/View/IngreSceneLsitCell.swift
1
1524
// // IngreSceneLsitCell.swift // TextKitchen // // Created by 罗平 on 2016/10/28. // Copyright © 2016年 罗平. All rights reserved. // import UIKit class IngreSceneLsitCell: UITableViewCell { var jumpClosure:IngreJumpClosure? var listModel:IngreRecommendWidgeList?{ didSet{ config(listModel?...
mit
IBM-Bluemix/hear-the-buzz
client/hear-the-buzz/JSONParser.swift
1
2519
// Copyright 2015 IBM Corp. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
apache-2.0
breadwallet/breadwallet-ios
breadwallet/src/Platform/BRWebViewController.swift
1
17784
// // BRWebViewController.swift // BreadWallet // // Created by Samuel Sutch on 12/10/15. // Copyright (c) 2016-2019 Breadwinner AG. All rights reserved. // import Foundation import UIKit import WebKit open class BRWebViewController: UIViewController, WKNavigationDelegate, BRWebSocketClient { var wkProcessPoo...
mit
alexpersian/Spine
Spine/AudioBook.swift
1
181
// // AudioBook.swift // Spine // // Created by Alex Persian on 10/29/16. // Copyright © 2016 alexpersian. All rights reserved. // import Foundation class AudioBook { }
mit
monsterkodi/krkkl
krkkl/Cubes.swift
1
13796
/* 0000000 000 000 0000000 00000000 0000000 000 000 000 000 000 000 000 000 000 000 0000000 0000000 0000000 000 000 000 000 000 000 000 0000000 0000000 0000000 00000000 0000000 */ import AppKit enum Side: Int { case up = 0,...
apache-2.0
avito-tech/Marshroute
Example/NavigationDemo/Common/Services/TouchEventObserver/TouchEventForwarder.swift
1
117
import UIKit protocol TouchEventForwarder: class { func forwardEvent(_ event: UIEvent, touches: Set<UITouch>) }
mit
seivan/ScalarArithmetic
TestsAndSample/Tests/TestsDoubleComparable.swift
1
4082
// // TestsDoubleComparable.swift // TestsAndSample // // Created by Seivan Heidari on 01/07/14. // Copyright (c) 2014 Seivan Heidari. All rights reserved. // import XCTest class TestsDoubleComparable: SuperTestsScalarComparable, ScalarComparableTesting { func testEqual() { XCTAssert(self.doubleValue == se...
mit
justinmfischer/SwiftyAccordionCells
SwiftyAccordionCells/AppDelegate.swift
1
2191
// // AppDelegate.swift // SwiftyAccordionCells // // Created by Fischer, Justin on 9/24/15. // Copyright © 2015 Justin M Fischer. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIAppl...
mit
swimmath27/GameOfGames
GameOfGames/ViewControllers/StartOlympicsViewController.swift
1
884
// // StartOlympicsViewController.swift // GameOfGames // // Created by Michael Lombardo on 6/21/16. // Copyright © 2016 Michael Lombardo. All rights reserved. // import UIKit class StartOlympicsViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.layer.in...
mit
4np/UitzendingGemist
UitzendingGemist/NPOEpisode+UI.swift
1
3198
// // NPOEpisode+UI.swift // UitzendingGemist // // Created by Jeroen Wesbeek on 31/07/16. // Copyright © 2016 Jeroen Wesbeek. All rights reserved. // import Foundation import UIKit import NPOKit extension NPOEpisode { public var watchedIndicator: String { // add (partically) watched indicator ...
apache-2.0
milseman/swift
validation-test/compiler_crashers_fixed/25524-swift-constraints-constraintsystem-simplifytype.swift
65
462
// 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
milseman/swift
stdlib/public/SDK/Dispatch/IO.swift
19
3890
//===----------------------------------------------------------------------===// // // 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
alloyapple/GooseGtk
Tests/LinuxMain.swift
1
97
import XCTest @testable import GooseGtkTests XCTMain([ testCase(GooseGtkTests.allTests), ])
apache-2.0
lizhaojie001/-Demo-
RATreeView-master/Examples/RATreeViewBasicExampleSwift/TreeViewController.swift
1
6112
// // TreeViewController.swift // RATreeViewExamples // // Created by Rafal Augustyniak on 21/11/15. // Copyright © 2015 com.Augustyniak. All rights reserved. // import UIKit import RATreeView class TreeViewController: UIViewController, RATreeViewDelegate, RATreeViewDataSource { var treeView : RATreeView! ...
apache-2.0
GRSource/GRTabBarController
Example/Controllers/GRThird_RootViewController.swift
1
3170
// // GRThird_RootViewController.swift // GRTabBarController // // Created by iOS_Dev5 on 2017/2/9. // Copyright © 2017年 GRSource. All rights reserved. // import UIKit class GRThird_RootViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() self.title = "三" ...
mit
shaps80/Peek
Pod/Classes/Helpers/Constraints.swift
1
3972
/* Copyright © 18/10/2017 Shaps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
mit
ivlevAstef/DITranquillity
Samples/SampleDelegateAndObserver/SampleDelegateAndObserver/Delegate/PopUpViewController.swift
1
461
// // PopUpViewController.swift // SampleDelegateAndObserver // // Created by Alexander Ivlev on 08/09/16. // Copyright © 2016 Alexander Ivlev. All rights reserved. // import UIKit class PopUpViewController: UIViewController { weak var delegate: PopUpDelegate? = nil @IBAction func sliderValueChanged(_ send...
mit
tryswift/tryswiftdev
Sources/main.swift
1
1531
do { print("") let arguments = Process.arguments.dropFirst() guard let arg1 = arguments.first else { usage() throw Error.InvalidValue } guard let option = Options(argment: arg1) else { usage() throw Error.InvalidValue } guard let value1 = arguments.dropFi...
mit
Pluto-Y/SwiftyEcharts
SwiftyEchartsTest_iOS/PolylineGraphicSpec.swift
1
5982
// // PolylineGraphicSpec.swift // SwiftyEcharts // // Created by Pluto Y on 02/08/2017. // Copyright © 2017 com.pluto-y. All rights reserved. // import Quick import Nimble @testable import SwiftyEcharts class PolylineGraphicSpec: QuickSpec { override func spec() { describe("For PolylineGraphic.Shape....
mit
apple/swift
test/decl/protocol/special/coding/enum_codable_member_type_lookup.swift
13
274
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown // MARK: - Synthesized CodingKeys Enum // Enums which get synthesized Codable implementations should have visible // CodingKey enums during member type lookup. enum SynthesizedEnum : Codable { case value }
apache-2.0
apple/swift
test/Interpreter/objc_implementation_swift_client.swift
2
2799
// REQUIRES: rdar101543397 // // Build objc_implementation.framework // // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/frameworks) // RUN: %empty-directory(%t/frameworks/objc_implementation.framework/Modules/objc_implementation.swiftmodule) // RUN: %empty-directory(%t/frameworks/objc_implementation.framework...
apache-2.0
calkinssean/TIY-Assignments
Day 16/1BeforeWeBegin copy.playground/Contents.swift
1
103
//: Playground - noun: a place where people can play import UIKit var str = "Hello, playground" str
cc0-1.0
hooman/swift
test/SILGen/cf_members.swift
5
14652
// RUN: %target-swift-emit-silgen -I %S/../IDE/Inputs/custom-modules %s -enable-objc-interop -I %S/Inputs/usr/include | %FileCheck %s import ImportAsMember func makeMetatype() -> Struct1.Type { return Struct1.self } // CHECK-LABEL: sil [ossa] @$s10cf_members17importAsUnaryInityyF public func importAsUnaryInit() { ...
apache-2.0
TouchInstinct/LeadKit
TIYandexMapUtils/Sources/Extensions/YMKScreenRect+CameraPositioning.swift
1
2970
// // Copyright (c) 2022 Touch Instinct // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the Software), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, p...
apache-2.0
Reggian/IOS-Pods-DFU-Library
iOSDFULibrary/Classes/Utilities/Streams/DFUStreamHex.swift
3
3146
/* * Copyright (c) 2016, Nordic Semiconductor * All rights reserved. * * 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 an...
mit
lorentey/GlueKit
Sources/ValueMappingForValueField.swift
1
11005
// // SelectOperator.swift // GlueKit // // Created by Károly Lőrentey on 2015-12-06. // Copyright © 2015–2017 Károly Lőrentey. // extension ObservableValueType { /// Map is an operator that implements key path coding and observing. /// Given an observable parent and a key that selects an observable child ...
mit
between40and2/XALG
frameworks/Framework-XALG-Tests/Linear/XALG_Tests_Stack.swift
1
618
// // XALG_Tests_Stack.swift // XALG // // Created by Juguang Xiao on 2/24/16. // import XCTest class XALG_Tests_Stack: XCTestCase { override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } func test_stack_array() { var sta...
mit
quran/quran-ios
Tests/QuranKitTests/QuarterTests.swift
1
2435
// // QuarterTests.swift // // // Created by Mohamed Afifi on 2021-12-11. // @testable import QuranKit import XCTest final class QuarterTests: XCTestCase { private let quran = Quran.madani func testQuarters() throws { let quarters = quran.quarters XCTAssertEqual(quarters.count, 240) ...
apache-2.0
pNre/Kingfisher
Tests/KingfisherTests/UIButtonExtensionTests.swift
2
7597
// // UIButtonExtensionTests.swift // Kingfisher // // Created by Wei Wang on 15/4/17. // // Copyright (c) 2018 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 th...
mit
vl4298/mah-income
Mah Income/Mah Income/TransitionAnimator/DimmingPresentationController.swift
1
303
// // DimmingPresentationController.swift // Mah Income // // Created by Van Luu on 4/17/17. // Copyright © 2017 Van Luu. All rights reserved. // import UIKit class DimmingPresentationController: UIPresentationController { override var shouldRemovePresentersView: Bool { return false } }
mit
onekiloparsec/SwiftAA
Sources/SwiftAA/ObjectBase.swift
2
1904
// // ObjectBase.swift // SwiftAA // // Created by Cédric Foellmi on 18/07/16. // MIT Licence. See LICENCE file. // import Foundation /// Base protocol used by all types of astronomical objects considered in SwiftAA, /// planets, moons, the Earth, the Sun etc. public protocol ObjectBase { /// The julian ...
mit
wesleysadler/UniversalStoryboard
UniversalStoryboardTests/UniversalStoryboardTests.swift
1
940
// // UniversalStoryboardTests.swift // UniversalStoryboardTests // // Created by Wesley Sadler on 1/6/15. // Copyright (c) 2015 Digital Sadler. All rights reserved. // import UIKit import XCTest class UniversalStoryboardTests: XCTestCase { override func setUp() { super.setUp() // Put set...
mit
swixbase/filesystem
Tests/FilesystemTests/FileHandlerTests.swift
1
11184
/// Copyright 2017 Sergei Egorov /// /// 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...
apache-2.0
herveperoteau/TracktionProto2
TracktionProto2/WatchConnectivity/WatchConnectivityLayer.swift
1
2090
// // TrackDataItem.swift // TracktionProto1 // // Created by Hervé PEROTEAU on 03/01/2016. // Copyright © 2016 Hervé PEROTEAU. All rights reserved. // import Foundation let infoEndSession = "END" let keyTrackSessionId = "tSId" let keyDateStart = "DS" let keyDateEnd = "DE" let keyTimeStamp = "TS" let keyAcceler...
mit
AirChen/ACSwiftDemoes
Target11-PorpertyAnimate/ViewController.swift
1
1334
// // ViewController.swift // Target11-PorpertyAnimate // // Created by Air_chen on 2016/11/6. // Copyright © 2016年 Air_chen. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var nameField: UITextField! @IBOutlet weak var keyField: UITextField! @IBOutl...
mit
dipen30/Qmote
KodiRemote/Pods/UPnAtom/Source/AV Profile/Services/ContentDirectory1Objects.swift
1
8582
// // ContentDirectory1Object.swift // // Copyright (c) 2015 David Robles // // 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 righ...
apache-2.0
mklbtz/finch
Tests/TaskManagementTests/TranscoderTests.swift
1
1290
import XCTest import TaskManagement class TranscoderTests: XCTestCase { func testStringToData() throws { let subject = Transcoder<String, Data>.stringToData let original = "test" let encoded = original.data(using: .utf8)! XCTAssertEqual(try subject.encode(original), encoded) XCTAssertEqual(try s...
mit
groupme/LibGroupMe
LibGroupMeTests/UserTest.swift
1
1811
import LibGroupMe import Quick import Nimble class UserTestHelper: NSObject { func dmIndex() -> NSDictionary { let path = NSBundle(forClass: NSClassFromString(self.className)!).pathForResource("dms-index", ofType: "json") let data = NSData(contentsOfFile: path!) var error: NSError? ...
mit
MadArkitekt/Swift_Tutorials_And_Demos
AdaptiveWeather/AdaptiveWeatherTests/AdaptiveWeatherTests.swift
1
928
// // AdaptiveWeatherTests.swift // AdaptiveWeatherTests // // Created by Edward Salter on 9/25/14. // Copyright (c) 2014 Edward Salter. All rights reserved. // import UIKit import XCTest class AdaptiveWeatherTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here...
gpl-2.0
cclovett/iRemeber
iRemeber/Pods/Bits/Sources/Bits/Data+BytesConvertible.swift
2
287
import Foundation extension Data: BytesConvertible { public func makeBytes() -> Bytes { var array = Bytes(repeating: 0, count: count) let buffer = UnsafeMutableBufferPointer(start: &array, count: count) _ = copyBytes(to: buffer) return array } }
mit