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
cnoon/swift-compiler-crashes
crashes-duplicates/17172-swift-sourcemanager-getmessage.swift
11
256
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing n( { case [ { func b { enum b { let NSObject { protocol P { { } class b { class case ,
mit
cnoon/swift-compiler-crashes
crashes-duplicates/12100-swift-availabilityattr-isunavailable.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 if true { { } protocol a { typealias F = b protocol b : e func T typealias e : e
mit
exponent/exponent
packages/expo-modules-core/ios/Swift/Arguments/Types/EnumArgumentType.swift
2
2834
// Copyright 2021-present 650 Industries. All rights reserved. /** An argument type representing an enum that conforms to `EnumArgument`. */ internal struct EnumArgumentType: AnyArgumentType { let innerType: EnumArgument.Type func cast<ArgType>(_ value: ArgType) throws -> Any { return try innerType.create(f...
bsd-3-clause
DenHeadless/DTTableViewManager
Example/App/SceneDelegate.swift
1
721
// // SceneDelegate.swift // Example // // Created by Denys Telezhkin on 23.08.2020. // Copyright © 2020 Denys Telezhkin. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? // MARK: - UIWindowSceneDelegate func scene(_ sc...
mit
drewag/Swiftlier
Sources/Swiftlier/Model/Types/Price.swift
1
1189
// // Price.swift // web // // Created by Andrew J Wagner on 4/23/17. // // import Foundation public struct Price: CustomStringConvertible { private static let currencyFormatter: NumberFormatter = { let formatter = NumberFormatter() formatter.numberStyle = .currency formatter.currencyS...
mit
box/box-ios-sdk
Sources/Responses/RetentionPolicyEntry.swift
1
1147
// // RetentionPolicyEntry.swift // BoxSDK-iOS // // Created by Martina Stremeňová on 9/2/19. // Copyright © 2019 box. All rights reserved. // import Foundation /// Retention policy entry public class RetentionPolicyEntry: BoxModel { private static var resourceType: String = "retention_policy" public pri...
apache-2.0
Viddi/ios-process-button
ProcessButton/ProcessButton/FlatButton.swift
1
2884
// // FlatButton.swift // ProcessButton // // Created by Vidar Ottosson on 2/7/15. // Copyright (c) 2015 Vidar Ottosson. All rights reserved. // import UIKit protocol FlatButtonDelegate { func showSuccess() func showError() } class FlatButton: UIButton { enum Colors { static let Success = UIColor(red:...
mit
sudeepunnikrishnan/ios-sdk
Instamojo/WalletOptions.swift
1
531
// // WalletOptions.swift // Instamojo // // Created by Sukanya Raj on 15/02/17. // Copyright © 2017 Sukanya Raj. All rights reserved. // import UIKit public class WalletOptions: NSObject { public var url: String! public var wallets: [Wallet]! public init(url: String, wallets: [Wallet]) { se...
lgpl-3.0
felipecarreramo/BSImagePicker
Pod/Classes/Extension/UIButton+NoAnimation.swift
1
1892
// The MIT License (MIT) // // Copyright (c) 2015 Joakim Gyllström // // 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...
mit
safakge/TimeIntervalPicker
Example/TimeIntervalPicker/ViewController.swift
1
585
// // ViewController.swift // TimeIntervalPicker // // Created by Taras Chernyshenko on 02/08/2017. // Copyright (c) 2017 Taras Chernyshenko. All rights reserved. // import UIKit import TimeIntervalPicker class ViewController: UIViewController { @IBAction private func showButtonPressed(button: UIButton) ...
mit
realm/SwiftLint
Source/SwiftLintFramework/Rules/Lint/WeakDelegateRule.swift
1
5629
import SwiftSyntax struct WeakDelegateRule: OptInRule, SwiftSyntaxRule, ConfigurationProviderRule { var configuration = SeverityConfiguration(.warning) init() {} static let description = RuleDescription( identifier: "weak_delegate", name: "Weak Delegate", description: "Delegates s...
mit
narner/AudioKit
AudioKit/Common/Operations/Math/Random Number Generators/jitter.swift
1
939
// // jitter.swift // AudioKit // // Created by Aurelius Prochazka, revision history on Github. // Copyright © 2017 Aurelius Prochazka. All rights reserved. // extension AKOperation { /// A signal with random fluctuations /// This is useful for emulating jitter found in analogue equipment. /// ///...
mit
zhouxinv/SwiftThirdTest
SwiftTestUITests/SwiftTestUITests.swift
1
1244
// // SwiftTestUITests.swift // SwiftTestUITests // // Created by GeWei on 2016/12/19. // Copyright © 2016年 GeWei. All rights reserved. // import XCTest class SwiftTestUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called be...
mit
maximbilan/UICollectionViewHorizontalPaging
UICollectionViewHorizontalPaging/UIColorExtensions.swift
1
485
// // UIColorExtensions.swift // UICollectionViewHorizontalPaging // // Created by Maxim on 2/6/16. // Copyright © 2016 Maxim Bilan. All rights reserved. // import UIKit extension UIColor { class func randomColor() -> UIColor { let hue = CGFloat(arc4random() % 100) / 100 let saturation = CGFloat(arc4rando...
mit
zakkhoyt/ColorPicKit
ColorPicKit/Classes/HSLASlider.swift
1
1430
// // HSLASlider.swift // ColorPicKitExample // // Created by Zakk Hoyt on 10/28/16. // Copyright © 2016 Zakk Hoyt. All rights reserved. // import UIKit class HSLASlider: Slider { private var _saturation: CGFloat = 0.5 @IBInspectable public var saturation: CGFloat { get { return _satur...
mit
h-n-y/UICollectionView-TheCompleteGuide
chapter-6/ImprovedCoverFlow/CoverFlow/CoverFlowFlowLayout.swift
1
9520
// // CoverFlowFlowLayout.swift // CoverFlow // // Created by Hans Yelek on 5/1/16. // Copyright © 2016 Hans Yelek. All rights reserved. // import UIKit class CoverFlowFlowLayout: UICollectionViewFlowLayout { override class func layoutAttributesClass() -> AnyClass { return CollectionViewLayoutAttribu...
mit
ontouchstart/swift3-playground
Learn to Code 1.playgroundbook/Contents/Chapters/Document8.playgroundchapter/Pages/Exercise3.playgroundpage/Contents.swift
1
1337
//#-hidden-code // // Contents.swift // // Copyright (c) 2016 Apple Inc. All Rights Reserved. // //#-end-hidden-code /*: **Goal:** Use the right-hand rule to help Byte navigate through a complex maze. An algorithm that follows the right-hand rule works well for simple walled puzzles, but you can also use it to sol...
mit
mozilla-mobile/firefox-ios
Client/TabEventHandlers.swift
2
850
// 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 class TabEventHandlers { /// Create handlers that observe specified tab events. ...
mpl-2.0
aestusLabs/ASChatApp
Colours.swift
1
5538
// // Colours.swift // ChatAppOrigionalFiles // // Created by Ian Kohlert on 2017-07-19. // Copyright © 2017 aestusLabs. All rights reserved. // import Foundation import UIKit enum ColourTheme { case light, dark } struct Colours { func getMainAppColour() -> UIColor{ return appInfo.appColourMain ...
mit
drawRect/Instagram_Stories
InstagramStories/Modules/Home/IGHomeViewModel.swift
1
1135
// // IGHomeViewModel.swift // InstagramStories // // Created by Boominadha Prakash on 01/11/17. // Copyright © 2017 DrawRect. All rights reserved. // import Foundation struct IGHomeViewModel { //MARK: - iVars //Keep it Immutable! don't get Dirty :P private let stories: IGStories? = { do...
mit
qxuewei/XWSwiftWB
XWSwiftWB/XWSwiftWB/Classes/Discover/DiscoverTableVC.swift
1
444
// // DiscoverTableVC.swift // XWSwiftWB // // Created by 邱学伟 on 16/10/25. // Copyright © 2016年 邱学伟. All rights reserved. // import UIKit class DiscoverTableVC: BaseTableVC { override func viewDidLoad() { super.viewDidLoad() visitorView.setupVisitorViewInfo(iconName: "visitordiscover_image_me...
apache-2.0
Pyroh/Fluor
Fluor/Controllers/ViewControllers/DefaultModeViewController.swift
1
2054
// // DefaultModeViewController.swift // // Fluor // // MIT License // // Copyright (c) 2020 Pierre Tacchi // // 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, i...
mit
nheagy/WordPress-iOS
WordPress/Classes/Networking/PushAuthenticationServiceRemote.swift
1
1418
import Foundation import AFNetworking /** * @class PushAuthenticationServiceRemote * @brief The purpose of this class is to encapsulate all of the interaction with the REST endpoint, * required to handle WordPress.com 2FA Code Veritication via Push Notifications */ @objc public...
gpl-2.0
wordpress-mobile/WordPress-iOS
WordPress/WordPressTest/Analytics/EditorAnalytics/PostEditorAnalyticsSessionTests.swift
1
7033
import Foundation import XCTest @testable import WordPress class PostEditorAnalyticsSessionTests: CoreDataTestCase { enum PostContent { static let classic = """ Text <strong>bold</strong> <em>italic</em> """ static let gutenberg = """ <!-- wp:image {"id":-181231834} --> ...
gpl-2.0
NobodyNada/SwiftStack
Sources/SwiftStack/Post.swift
1
5883
// // Post.swift // SwiftStack // // Created by FelixSFD on 06.12.16. // // import Foundation // - MARK: The type of the post /** Defines the type of a post. Either a question or an answer - author: FelixSFD */ public enum PostType: String, StringRepresentable { case answer = "answer" case question =...
mit
mgiraldo/watchOS-animations-test
watchSample/FrameLoader.swift
1
1100
// // FrameLoader.swift // watchSample // // Created by Mauricio Giraldo on 2/5/16. // import Foundation class FrameLoader { static func loadFrames()-> Array<NSData> { let frame1 = FrameLoader.getFile("1") let frame2 = FrameLoader.getFile("2") let frame3 = FrameLoader.getFile("3") ...
mit
elpassion/el-space-ios
ELSpace/Network/Services/HolidaysService.swift
1
934
import RxSwift import Mapper protocol HolidaysServiceProtocol { func getHolidays(month: Int, year: Int) -> Observable<HolidaysDTO> } class HolidaysService: HolidaysServiceProtocol { init(apiClient: ApiClientProtocol) { self.apiClient = apiClient } // MARK: - HolidaysServiceProtocol func...
gpl-3.0
sol/aeson
tests/JSONTestSuite/parsers/test_PMJSON_1_1_0/Encoder.swift
6
6183
// // Encoder.swift // PMJSON // // Created by Kevin Ballard on 2/1/16. // Copyright © 2016 Postmates. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // opti...
bsd-3-clause
LittoCats/coffee-mobile
CoffeeMobile/Base/Utils/UIKitExtension/CMNSAttributedStringExtension.swift
1
8954
// // CMNSAttributedStringExtension.swift // CoffeeMobile // // Created by 程巍巍 on 5/25/15. // Copyright (c) 2015 Littocats. All rights reserved. // import Foundation import UIKit import XMLNode extension NSAttributedString { /** MARK: 由自定义的 xml 字符串生成 attributedString 支持的 属性参照 NSAttributedSt...
apache-2.0
michael-lehew/swift-corelibs-foundation
Foundation/NSError.swift
1
57255
//===----------------------------------------------------------------------===// // // 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
ahoppen/swift
stdlib/public/core/UnicodeData.swift
10
6756
//===----------------------------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
apache-2.0
overtake/TelegramSwift
packages/TGVideoCameraMovie/Package.swift
1
1153
// 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: "TGVideoCameraMovie", products: [ // Products define the executables and libraries a package produces, and make them visibl...
gpl-2.0
wokalski/Hourglass
Hourglass/Actions.swift
1
682
import Foundation import RealmSwift import AppKit import EventKit typealias HGDuration = IntMax enum Action { case newTask(task: Task?) case removeTask(task: Task) case taskUpdate(task: TaskProtocol) case sessionUpdate(action: WorkSessionAction) case calendar(action: CalendarAction) case selec...
mit
Johennes/firefox-ios
StorageTests/TestLogins.swift
2
31154
/* 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 @testable import Storage import XCGLogger import XCTest private let log = XCGLog...
mpl-2.0
IMcD23/Proton
Source/Core/View/View+Size.swift
1
1230
// // View+Size.swift // Proton // // Created by McDowell, Ian J [ITACD] on 4/5/16. // Copyright © 2016 Ian McDowell. All rights reserved. // public extension View { public func size(width width: Percent, height: Percent) -> Self { self.size = LayoutSize(type: .Percent, width: width.value, height: heig...
mit
antlr/antlr4
runtime/Swift/Sources/Antlr4/misc/IntSet.swift
8
5744
/// /// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. /// Use of this file is governed by the BSD 3-clause license that /// can be found in the LICENSE.txt file in the project root. /// /// /// A generic set of integers. /// /// - seealso: org.antlr.v4.runtime.misc.IntervalSet /// public proto...
bsd-3-clause
huonw/swift
stdlib/public/core/WriteBackMutableSlice.swift
12
1730
//===--- WriteBackMutableSlice.swift --------------------------------------===// // // 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
AlesTsurko/AudioKit
Tests/Tests/AKBalance.swift
2
1253
// // main.swift // AudioKit // // Created by Nick Arner and Aurelius Prochazka on 12/21/14. // Copyright (c) 2014 Aurelius Prochazka. All rights reserved. // import Foundation let testDuration: Float = 4.0 class Instrument : AKInstrument { var auxilliaryOutput = AKAudio() override init() { sup...
lgpl-3.0
KasunApplications/susi_iOS
SusiUITests/AnonymousModeUITests.swift
1
1749
// // AnonymousMode.swift // Susi // // Created by Chashmeet Singh on 2017-07-03. // Copyright © 2017 FOSSAsia. All rights reserved. // import XCTest class AnonymousUITests: XCTestCase { private let app = XCUIApplication() override func setUp() { super.setUp() // Put setup code ...
apache-2.0
Yvent/YVImagePickerController
YVImagePickerController/YVImagePickerCell.swift
2
2425
// // YVImagePickerCell.swift // Demo // // Created by 周逸文 on 2017/10/12. // Copyright © 2017年 YV. All rights reserved. // import UIKit class YVImagePickerCell: UICollectionViewCell { var closeBtnColor: UIColor = UIColor(red: 88/255.0, green: 197/255.0, blue: 141/255.0, alpha: 1) var imageV: UIImageV...
mit
linhaosunny/smallGifts
小礼品/小礼品/Classes/Module/Classify/Views/SingleGiftSectionViewModel.swift
1
797
// // SingleGiftSectionViewModel.swift // 小礼品 // // Created by 李莎鑫 on 2017/4/21. // Copyright © 2017年 李莎鑫. All rights reserved. // import UIKit class SingleGiftSectionDataModel: NSObject { let title = ["美物","手工","吃货","萌萌哒","动漫迷","小清新","科技范","熊孩子","烂漫","任性","欧巴","御姐","公主","音乐范","艺术气质","闺蜜","同学","创意"] var cl...
mit
linhaosunny/yeehaiyake
椰海雅客微博/椰海雅客微博/Classes/Main/LSXVisitorView.swift
1
4660
// // LSXVisitorView.swift // 椰海雅客微博 // // Created by 李莎鑫 on 2017/4/3. // Copyright © 2017年 李莎鑫. All rights reserved. // import UIKit import SnapKit class LSXVisitorView: UIView { //MARK: 懒加载 //: 转盘 lazy var rotationView:UIImageView = { () -> UIImageView in let imageView = UIImageView(image: #imag...
mit
austinzheng/swift
test/decl/protocol/req/associated_type_ambiguity.swift
27
1748
// RUN: %target-typecheck-verify-swift // Reference to associated type from 'where' clause should not be // ambiguous when there's a typealias with the same name in another // protocol. // // FIXME: The semantics here are still really iffy. There's also a // case to be made that type aliases in protocol extensions sho...
apache-2.0
iabudiab/gdg-devfestka-2015-swift
Swift Intro.playground/Pages/Variables & Constants.xcplaygroundpage/Contents.swift
1
292
var answerToTheQuestionOfLife = 42 // Type is inferred answerToTheQuestionOfLife = 9001 // answerToTheQuestionOfLife = 3.14 // Compile error ~> Int var numberOfTalks: Int = 1 let language = "Swift" let pi: Double = 3.141592 // pi = 3.1415927 // Compile error ~> constant //: [Next](@next)
mit
SkilpaddeLabs/SPLBlockButton
BlockButtonTests/BlockButtonTests.swift
1
986
// // BlockButtonTests.swift // BlockButtonTests // // Created by bolstad on 4/12/16. // Copyright © 2016 Tim Bolstad. All rights reserved. // import XCTest @testable import BlockButton class BlockButtonTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This...
mit
WLChopSticks/weibo-swift-
weibo(swift)/weibo(swift)/Classes/Tools/Extention/UILabel+Extention.swift
2
684
// // UILabel+Extention.swift // weibo(swift) // // Created by 王 on 15/12/16. // Copyright © 2015年 王. All rights reserved. // import UIKit //构造便利函数,扩展label的方法 extension UILabel { convenience init(title: String, color: UIColor, fontSize: CGFloat, margin: CGFloat = 0) { self.init() text = t...
mit
austinzheng/swift
validation-test/compiler_crashers_fixed/28531-swift-modulefile-getdecl-llvm-pointerembeddedint-unsigned-int-31-llvm-optional-s.swift
65
498
// 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
Ruenzuo/fansabisu
FanSabisu/Sources/MediaViewController.swift
1
10542
import UIKit import Photos import FanSabisuKit class MediaViewController: GAITrackedViewController { @IBOutlet var collectionView: UICollectionView? var itemsPerRow: CGFloat? var dataSource: [PHAsset] = [] var activityIndicatorView: UIActivityIndicatorView? override func viewDidLoad() { s...
mit
kreshikhin/scituner
SciTuner/ViewControllers/FiltersAlertController.swift
1
935
// // FiltersAlertController.swift // SciTuner // // Created by Denis Kreshikhin on 17.03.15. // Copyright (c) 2015 Denis Kreshikhin. All rights reserved. // import Foundation import UIKit protocol FiltersAlertControllerDelegate: class { func didChange(filter: Filter) } class FiltersAlertController: UIAlertC...
mit
tardieu/swift
test/IRGen/vtable_multi_file.swift
3
831
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | %FileCheck %s // REQUIRES: CPU=x86_64 func markUsed<T>(_ t: T) {} // CHECK-LABEL: define hidden void @_T017vtable_multi_file36baseClassVtablesIn...
apache-2.0
LeeMinglu/WeiBo_Swift3.0
WeiBo_Swift3.0/WeiBo_Swift3.0/Model/Weibo.swift
1
930
// // Weibo.swift // WeiBo_Swift3.0 // // Created by 李明禄 on 2016/11/26. // Copyright © 2016年 SocererGroup. All rights reserved. // import UIKit class Weibo: NSObject { var text: String? var name: String? var icon: String? var vip: Bool = true var picture: String? let properties = ["te...
apache-2.0
vary-llc/SugarRecord
spec/CoreData/DefaultCDStackTests.swift
10
6513
// // DefaultCDStackTests.swift // SugarRecord // // Created by Pedro Piñera Buendía on 27/09/14. // Copyright (c) 2014 SugarRecord. All rights reserved. // import UIKit import XCTest import CoreData class DefaultCDStackTests: XCTestCase { var stack: DefaultCDStack? = nil override func setUp() {...
mit
blockchain/My-Wallet-V3-iOS
Modules/Platform/Sources/PlatformUIKit/Views/BadgeImageView/Accessibility+BadgeImageView.swift
1
201
// Copyright © Blockchain Luxembourg S.A. All rights reserved. import Foundation extension Accessibility.Identifier { enum BadgeImageView { static let prefix = "BadgeImageView." } }
lgpl-3.0
madcato/OSFramework
Sources/OSFramework/PropertyListHelper.swift
1
797
// // PropertyListHelper.swift // BasketPrice // // Created by Daniel Vela on 11/06/2017. // Copyright © 2017 Daniel Vela. All rights reserved. // import Foundation class PropertyListHelper { static func loadArray(fromFile fileName: String) -> [Any]? { if let fileUrl = Bundle.main.url(forResource: fil...
mit
WalletOne/P2P
P2PCoreTests/CoreModelsTests.swift
1
2574
// // CoreModelsTests.swift // P2P_iOS // // Created by Vitaliy Kuzmenko on 03/08/2017. // Copyright © 2017 Wallet One. All rights reserved. // import XCTest class CoreModelsTests: XCTestCase { override func setUp() { super.setUp() } func testDealModel() { l...
mit
couchbits/iOSToolbox
Sources/RestClient/RestClientResponse.swift
1
467
// // ResponseEntity.swift // Alamofire // // Created by Dominik Gauggel on 29.11.18. // import Foundation public struct RestClientResponse { public let body: Data } public extension RestClientResponse { init(json: Any) throws { body = try JSONSerialization.data(withJSONObject: json, options: .pre...
mit
drunknbass/Emby.ApiClient.Swift
Emby.ApiClient/model/logging/ILogger.swift
2
1719
// // ILogger.swift // Emby.ApiClient // // Created by Vedran Ozir on 07/10/15. // Copyright © 2015 Vedran Ozir. All rights reserved. // import Foundation //package mediabrowser.model.logging; /** Interface ILogger */ public protocol ILogger { /** Infoes the specified message. @param message The messa...
mit
lorentey/swift
test/Constraints/patterns.swift
1
10741
// RUN: %target-typecheck-verify-swift // Leaf expression patterns are matched to corresponding pieces of a switch // subject (TODO: or ~= expression) using ~= overload resolution. switch (1, 2.5, "three") { case (1, _, _): () // Double is ExpressibleByIntegerLiteral case (_, 2, _), (_, 2.5, _), (_, _, "th...
apache-2.0
lorentey/swift
test/SILGen/dynamically_replaceable.swift
3
19328
// RUN: %target-swift-emit-silgen -swift-version 5 %s | %FileCheck %s // RUN: %target-swift-emit-silgen -swift-version 5 %s -enable-implicit-dynamic | %FileCheck %s --check-prefix=IMPLICIT // RUN: %target-swift-emit-silgen -swift-version 5 %s -disable-previous-implementation-calls-in-dynamic-replacements | %FileCheck %...
apache-2.0
wircho/D3Workshop
HelloWorld/HelloWorld/MontrealViewController.swift
1
1471
// // MontrealViewController.swift // HelloWorld // // Created by Adolfo Rodriguez on 2015-08-01. // Copyright (c) 2015 Relevant. All rights reserved. // import UIKit import Alamofire import SwiftyJSON import BrightFutures class MontrealViewController: UIViewController { @IBOutlet weak var contentLabel: UIL...
mit
178inaba/SwiftCollatz
SwiftCollatz/ViewController.swift
1
1621
// // ViewController.swift // SwiftCollatz // // Created by 178inaba on 2015/10/18. // Copyright © 2015年 178inaba. All rights reserved. // import UIKit class ViewController: UIViewController, UITableViewDataSource { @IBOutlet weak var targetNumField: UITextField! @IBOutlet weak var resultView: UITableVie...
mit
urbanthings/urbanthings-sdk-apple
UTAPIObjCAdapter/Public/TransitTripInfo.swift
1
2596
// // TransitTripInfo.swift // UrbanThingsAPI // // Created by Mark Woollard on 15/05/2016. // Copyright © 2016 UrbanThings. All rights reserved. // import Foundation import UTAPI @objc public protocol TransitTripInfo : NSObjectProtocol { /// A unique identifier representing the agency that operates this trip...
apache-2.0
aerogear/aerogear-ios-http
AeroGearHttp/MultiPartData.swift
2
2141
/* * JBoss, Home of Professional Open Source. * Copyright Red Hat, Inc., and individual contributors * * 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/LIC...
apache-2.0
Navdy/protobuf-swift
plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittestImport.UnittestImportLite.proto.swift
1
13113
// Generated by the Protocol Buffers 3.0 compiler. DO NOT EDIT! // Source file "unittest_import_lite.proto" // Syntax "Proto2" import Foundation import ProtocolBuffers public extension ProtobufUnittestImport{} public extension ProtobufUnittestImport { public struct UnittestImportLiteRoot { public static let ...
apache-2.0
darthpelo/TimerH2O
TimerH2O/TimerH2OTests/LocalDataTests.swift
1
1611
// // LocalDataTests.swift // TimerH2O // // Created by Alessio Roberto on 27/10/16. // Copyright © 2016 Alessio Roberto. All rights reserved. // import XCTest @testable import TimerH2O class LocalDataTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This ...
mit
kickstarter/ios-oss
KsApi/models/AccessTokenEnvelope.swift
1
348
public struct AccessTokenEnvelope { public let accessToken: String public let user: User public init(accessToken: String, user: User) { self.accessToken = accessToken self.user = user } } extension AccessTokenEnvelope: Decodable { enum CodingKeys: String, CodingKey { case accessToken = "access...
apache-2.0
noppoMan/Hexaville
Sources/HexavilleCore/Process/Proc.swift
1
1269
// // Proc.swift // Hexaville // // Created by Yuki Takei on 2017/05/16. // // import Foundation extension Process { public static func exec(_ cmd: String, _ args: [String], environment: [String: String] = ProcessInfo.processInfo.environment) -> Proc { var args = args args.insert(cmd, at: 0) ...
mit
AceWangLei/BYWeiBo
BYWeiBo/BYUserAccountViewModel.swift
1
3995
// // BYUserAccountViewModel.swift // BYWeiBo // // Created by wanglei on 16/1/25. // Copyright © 2016年 lit. All rights reserved. // import UIKit class BYUserAccountViewModel: NSObject { /** BYUserAccount 视图模型引用的Model */ var account: BYUserAccount? /** string accessToken */ var accessToken:...
apache-2.0
Dhvl-Golakiya/ImageAdjusts
Example/ImageAdjusts/ViewController.swift
1
516
// // ViewController.swift // ImageAdjusts // // Created by Dhvl-Golakiya on 08/28/2017. // Copyright (c) 2017 Dhvl-Golakiya. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loadin...
mit
onekiloparsec/SwiftAA
Tests/SwiftAATests/EarthTwilightsTests.swift
2
11493
// // EarthTests.swift // SwiftAA // // Created by Cédric Foellmi on 25/01/2017. // Copyright © 2017 onekiloparsec. All rights reserved. // import XCTest @testable import SwiftAA class EarthTwilightsTests: XCTestCase { func testValidTwilightNorthernHemisphereWestLongitude() { let paris =...
mit
AngryLi/note
iOS/Demos/Assignments_swift/assignment-1-calculator/Calculator_assignment/Calculator/StringExtension.swift
3
2148
// // StringExtension.swift // Calculator // // Created by 李亚洲 on 15/4/29. // Copyright (c) 2015年 liyazhou. All rights reserved. // import Foundation extension String{ //分割字符 func split(s:String)->[String]{ if s.isEmpty{ var x=[String]() for y in self{ x.appe...
mit
xuzhuoxi/SearchKit
Test/cs/wordscoding/PinyinCodingImplTest.swift
1
1553
// // PinyinCodingImplTest.swift // SearchKit // // Created by 许灼溪 on 15/12/31. // // import XCTest @testable import SearchKit class PinyinCodingImplTest: XCTestCase { // // override func setUp() { // super.setUp() // // Put setup code here. This method is called before the invocation of each test...
mit
gurenupet/hah-auth-ios-swift
hah-auth-ios-swift/Pods/Mixpanel-swift/Mixpanel/Mixpanel.swift
2
6803
// // Mixpanel.swift // Mixpanel // // Created by Yarden Eitan on 6/1/16. // Copyright © 2016 Mixpanel. All rights reserved. // import Foundation #if !os(OSX) import UIKit #endif // os(OSX) /// The primary class for integrating Mixpanel with your app. open class Mixpanel { #if !os(OSX) /** Initializ...
mit
crazypoo/PTools
Pods/CollectionViewPagingLayout/Lib/SwiftUI/PagingCollectionViewControllerBuilder.swift
1
2298
// // PagingCollectionViewControllerBuilder.swift // CollectionViewPagingLayout // // Created by Amir on 28/03/2021. // Copyright © 2021 Amir Khorsandi. All rights reserved. // import SwiftUI public class PagingCollectionViewControllerBuilder<ValueType: Identifiable, PageContent: View> { public typealias Vie...
mit
IngmarStein/swift
stdlib/public/SDK/CoreGraphics/Private.swift
4
11354
//===----------------------------------------------------------------------===// // // 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
zhha/RPiProjects-iOS
RPiProject/DHT11ViewController.swift
1
878
// // DHT11ViewController.swift // RPiProject // // Created by wonderworld on 16/8/25. // Copyright © 2016年 haozhang. All rights reserved. // import UIKit class DHT11ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading ...
mit
tqtifnypmb/SwiftyImage
Framenderer/Sources/Filters/Color/ExplosureAdjust/ExplosureAdjustFilter.swift
2
806
// // ExplosureAdjustFilter.swift // Framenderer // // Created by tqtifnypmb on 15/12/2016. // Copyright © 2016 tqitfnypmb. All rights reserved. // import Foundation import OpenGLES.ES3.gl import OpenGLES.ES3.glext public class ExplosureAdjustFilter: BaseFilter { public init(value: Float = 0.25) { ...
mit
iossocket/DBDemo
DBDemo/DetailViewController.swift
1
1125
// // DetailViewController.swift // DBDemo // // Created by Jianing Zheng on 12/27/16. // Copyright © 2016 ThoughtWorks. All rights reserved. // import UIKit class DetailViewController: UIViewController { @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var authorLabel: UILabel! @IBOutlet we...
mit
MrZoidberg/metapp
metapp/metapp/PeekPhotoViewController.swift
1
271
// // PeekPhotoViewController.swift // metapp // // Created by Mykhaylo Merkulov on 11/2/16. // Copyright © 2016 ZoidSoft. All rights reserved. // import Foundation import UIKit final class PeekPhotoViewController: UIViewController { var viewModel: MAPhoto? }
mpl-2.0
krevis/MIDIApps
Frameworks/SnoizeMIDI/VirtualInputStream.swift
1
3911
/* Copyright (c) 2001-2021, Kurt Revis. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. */ import Foundation public class VirtualInputStream: InputStream { public override init(midiContext: MIDIContext) { ...
bsd-3-clause
wikimedia/wikipedia-ios
Wikipedia/Code/PreviewWebViewContainer.swift
1
1723
import Foundation import WebKit import WMF @objc protocol WMFPreviewAnchorTapAlertDelegate: AnyObject { func previewWebViewContainer(_ previewWebViewContainer: PreviewWebViewContainer, didTapLink url: URL) } class PreviewWebViewContainer: UIView, WKNavigationDelegate, Themeable { var theme: Theme = .standard ...
mit
mleiv/MEGameTracker
MEGameTracker/Models/CoreData/Game Rows/GameMaps.swift
1
7403
// // GameMaps.swift // MEGameTracker // // Created by Emily Ivie on 9/22/15. // Copyright © 2015 Emily Ivie. All rights reserved. // import Foundation import CoreData extension Map: GameRowStorable { /// (CodableCoreDataStorable Protocol) /// Type of the core data entity. public typealias EntityType = GameMa...
mit
6ag/BaoKanIOS
BaoKanIOS/Classes/Module/News/Model/JFShareItemModel.swift
1
2228
// // JFShareItemModel.swift // WindSpeedVPN // // Created by zhoujianfeng on 2016/11/30. // Copyright © 2016年 zhoujianfeng. All rights reserved. // import UIKit enum JFShareType: Int { case qqFriend = 0 // qq好友 case qqQzone = 1 // qq空间 case weixinFriend = 2 // 微信好友 case friendCirc...
apache-2.0
sersoft-gmbh/XMLWrangler
Package.swift
1
989
// swift-tools-version:5.4 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "xmlwrangler", products: [ .library(name: "XMLWrangler", targets: ["XMLWrangler"]), ], dependencies: [ // D...
apache-2.0
guipanizzon/ioscreator
IOS8SwiftActionsTableViewTutorial/IOS8SwiftActionsTableViewTutorialTests/IOS8SwiftActionsTableViewTutorialTests.swift
40
985
// // IOS8SwiftActionsTableViewTutorialTests.swift // IOS8SwiftActionsTableViewTutorialTests // // Created by Arthur Knopper on 18/11/14. // Copyright (c) 2014 Arthur Knopper. All rights reserved. // import UIKit import XCTest class IOS8SwiftActionsTableViewTutorialTests: XCTestCase { override func setUp...
mit
P0ed/FireTek
Source/SpaceEngine/Components/UnitComponents.swift
1
1216
import Fx import PowerCore import SpriteKit struct ShipComponent { let sprite: ComponentIdx<SpriteComponent> let physics: ComponentIdx<PhysicsComponent> let hp: ComponentIdx<HPComponent> let input: ComponentIdx<ShipInputComponent> let stats: ComponentIdx<ShipStats> let primaryWpn: ComponentIdx<WeaponComponent> ...
mit
NeoXant/rpn-swift
Tests/ConverterTests.swift
1
1190
// ConverterTests.swift // Convert infix notation to Reverse Polish Notation! // // Licensed under MIT License. See LICENSE for more info. // Copyright (c) 2017, Michał "NeoXant" Kolarczyk. import Cocoa import XCTest class ConverterTests: XCTestCase { override func setUp() { super.setUp() // ...
mit
tonystone/geofeatures2
Sources/GeoFeatures/Precision.swift
1
1681
/// /// Precision.swift /// /// Copyright (c) 2016 Tony Stone /// /// 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 ...
apache-2.0
jigneshsheth/Datastructures
DataStructure/DataStructure/LongestSubstring.swift
1
1414
// // LongestSubstring.swift // DataStructure // // Created by Jigs Sheth on 11/2/21. // Copyright © 2021 jigneshsheth.com. All rights reserved. // /** Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation:...
mit
matrix-org/matrix-ios-sdk
MatrixSDK/VoIP/MXiOSAudioOutputRouteType.swift
1
1478
// // Copyright 2021 The Matrix.org Foundation C.I.C // // 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 ...
apache-2.0
ministrycentered/onepassword-app-extension
Demos/App Demo for iOS Swift/App Demo for iOS Swift/AppDelegate.swift
2
2189
// // AppDelegate.swift // App Demo for iOS Swift // // Created by Rad Azzouz on 2015-05-14. // Copyright (c) 2015 Agilebits. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, did...
mit
jarocht/iOS-AlarmDJ
AlarmDJ/AlarmDJ/SettingsTableViewController.swift
1
4091
// // SettingsTableViewController.swift // AlarmDJ // // Created by X Code User on 7/22/15. // Copyright (c) 2015 Tim Jaroch, Morgan Heyboer, Andreas Plüss (TEAM E). All rights reserved. // import UIKit class SettingsTableViewController: UITableViewController, UITextFieldDelegate, UIPickerViewDataSource, UIPicke...
mit
johnsextro/cycschedule
cycschedule/SelectionViewController.swift
1
2664
import Foundation import UIKit class SelectionViewController: UITableViewController { var TableData:Array< String > = Array < String >() var lastSelectedIndexPath: NSIndexPath? override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } override func...
gpl-2.0
jamfprofessionalservices/JamfMigrator
jamf-migrator/PrefsWindowController.swift
1
450
// // PrefsWindowController.swift // jamf-migrator // // Created by Leslie Helou on 11/25/18. // Copyright © 2018 jamf. All rights reserved. // import Cocoa class PrefsWindowController: NSWindowController, NSWindowDelegate { override func windowDidLoad() { super.windowDidLoad() } ...
mit
alphatroya/hhkl-ios
HHKL/Classes/Business/Factories/ViewControllerFactory.swift
1
1564
// // Created by Alexey Korolev on 29.01.16. // Copyright (c) 2016 Heads and Hands. All rights reserved. // import Foundation enum ViewControllerType { case MatchesViewController case MatchViewController(match: Match) } protocol ViewControllerFactoryProtocol { func instantiateViewControllerWith(type: Vie...
mit
toggl/superday
teferi/UI/Modules/Daily Summary/SummaryPageViewModel.swift
1
1910
import Foundation import RxSwift class SummaryPageViewModel { private var selectedDate = Variable<Date>(Date()) var currentlySelectedDate : Date { get { return self.selectedDate.value.ignoreTimeComponents() } set(value) { self.selectedDate.value = value self....
bsd-3-clause
crescentflare/ViewletCreator
ViewletCreatorIOS/Example/ViewletCreator/Viewlets/UITextFieldViewlet.swift
1
2257
// // UITextFieldViewlet.swift // Viewlet creator example // // Create a simple text input field // import UIKit import ViewletCreator class UITextFieldViewlet: Viewlet { func create() -> UIView { return UITextField() } func update(view: UIView, attributes: [String: Any], parent: UIView?,...
mit
devpunk/cartesian
cartesian/Model/DrawProject/Menu/Text/MDrawProjectMenuTextItemSize.swift
1
1393
import UIKit class MDrawProjectMenuTextItemSize:MDrawProjectMenuTextItem, MDrawProjectFontSizeDelegate { private weak var controller:CDrawProject? init() { let title:String = NSLocalizedString("MDrawProjectMenuTextItemSize_title", comment:"") super.init( title:titl...
mit
xeo-it/poggy
Pods/Eureka/Source/Core/HeaderFooterView.swift
2
5324
// HeaderFooterView.swift // Eureka ( https://github.com/xmartlabs/Eureka ) // // Copyright (c) 2016 Xmartlabs ( http://xmartlabs.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...
apache-2.0
jhabbbbb/ClassE
ClassE/AppDelegate.swift
1
2172
// // AppDelegate.swift // ClassE // // Created by JinHongxu on 2016/12/14. // Copyright © 2016年 JinHongxu. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunc...
mit