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 |
|---|---|---|---|---|---|
xivol/MCS-V3-Mobile | examples/uiKit/UIKitCatalog.playground/Pages/UILabel.xcplaygroundpage/Contents.swift | 1 | 924 | //: # UILabel
//: A view that displays one or more lines of read-only text, often used in conjunction with controls to describe their intended purpose.
//:
//: [UILabel API Reference](https://developer.apple.com/reference/uikit/uilabel)
import UIKit
import PlaygroundSupport
let label = UILabel(frame: CGRect(x: 0, y: 0... | mit |
debugsquad/Hyperborea | Hyperborea/View/Favorites/VFavoritesCell.swift | 1 | 2830 | import UIKit
class VFavoritesCell:UICollectionViewCell
{
private weak var label:UILabel!
private weak var imageView:UIImageView!
private let kLabelRight:CGFloat = -10
private let kImageWidth:CGFloat = 32
override init(frame:CGRect)
{
super.init(frame:frame)
clipsToBounds = ... | mit |
inket/stts | stts/ServiceTableView/StatusTableCell.swift | 1 | 4373 | //
// StatusTableCell.swift
// stts
//
import Cocoa
class StatusTableCell: NSTableCellView {
let statusIndicator = StatusIndicator()
let stackView = NSStackView()
let titleField = NSTextField()
let statusField = NSTextField()
enum Layout {
static let verticalPadding: CGFloat = 10
... | mit |
proversity-org/edx-app-ios | Source/CourseGenericBlockTableViewCell.swift | 1 | 2817 | //
// CourseHTMLTableViewCell.swift
// edX
//
// Created by Ehmad Zubair Chughtai on 14/05/2015.
// Copyright (c) 2015 edX. All rights reserved.
//
import UIKit
class CourseGenericBlockTableViewCell : UITableViewCell, CourseBlockContainerCell {
fileprivate let content = CourseOutlineItemView()
override i... | apache-2.0 |
debugsquad/Hyperborea | Hyperborea/View/Settings/VSettingsCellReview.swift | 1 | 1822 | import UIKit
class VSettingsCellReview:VSettingsCell
{
private let kTitleLeft:CGFloat = 10
private let kTitleWidth:CGFloat = 250
private let kImageWidth:CGFloat = 100
override init(frame:CGRect)
{
super.init(frame:frame)
let labelTitle:UILabel = UILabel()
label... | mit |
gkaimakas/SwiftyForms | SwiftyForms/Classes/Inputs/LocationInput.swift | 1 | 2328 | //
// LocationInput.swift
// Pods
//
// Created by Γιώργος Καϊμακάς on 29/06/16.
//
//
import Foundation
public typealias LocationInputEvent = (LocationInput) -> Void
open class LocationInput: Input {
open static let Latitude = "latitude"
open static let Longitude = "longitude"
fileprivate var _previousL... | mit |
wayfair/brickkit-ios | Example/Source/Bricks/Custom/WhoToFollowBrick.swift | 2 | 1981 | //
// WhoToFollow.swift
// BrickKit
//
// Created by Yusheng Yang on 9/20/16.
// Copyright © 2016 Wayfair LLC. All rights reserved.
//
import Foundation
import BrickKit
class WhoToFollowBrick: Brick {
weak var dataSource: WhoToFollowBrickDataSource?
init(_ identifier: String, width: BrickDimension = ... | apache-2.0 |
Foild/SugarRecord | spec/Models/RealmObjectTests.swift | 1 | 7221 | //
// RealmObjectTests.swift
// SugarRecord
//
// Created by Pedro Piñera Buendia on 20/09/14.
// Copyright (c) 2014 SugarRecord. All rights reserved.
//
import XCTest
import CoreData
import Realm
class RealmObjectTests: XCTestCase
{
override func setUp()
{
SugarRecord.addStack(DefaultREALMStack(s... | mit |
vadymmarkov/Faker | Sources/Fakery/Config.swift | 3 | 282 | public struct Config {
public static let defaultLocale: String = "en"
public static let pathExtension: String = "json"
public static var dirPath: String = "Resources/Locales"
public static var dirFrameworkPath: String = ""
public static var dirResourcePath: String = ""
}
| mit |
Aioria1314/WeiBo | WeiBo/WeiBo/Classes/Views/Home/ZXCHomeToolBarView.swift | 1 | 3307 | //
// ZXCHomeToolBarView.swift
// WeiBo
//
// Created by Aioria on 2017/3/30.
// Copyright © 2017年 Aioria. All rights reserved.
//
import UIKit
class ZXCHomeToolBarView: UIView {
var statusViewModel: ZXCStatusViewModel? {
didSet {
let retweetCountStr = statusViewMode... | mit |
scheib/chromium | ios/chrome/browser/ui/popup_menu/overflow_menu/overflow_menu_action_group.swift | 2 | 946 | // Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import SwiftUI
/// A model class representing a group of `OverflowMenuActions`.
@objcMembers public class OverflowMenuActionGroup: NSObject, ObservableOb... | bsd-3-clause |
TechnologySpeaks/smile-for-life | smile-for-life/TimersViewController.swift | 1 | 2619 | //
// TimersViewController.swift
// smile-for-life
//
// Created by Lisa Swanson on 2/29/16.
// Copyright © 2016 Technology Speaks. All rights reserved.
//
import UIKit
class TimersViewController: UIViewController {
var timerCount: Int = 0
var timerRunning = false
var timer = Timer()
var countDownT... | mit |
macshome/cocoaCrypt | CocoaCrypt/CocoaCrypt/CipherSolver.swift | 1 | 196 | //
// CipherSolver.swift
// CocoaCrypt
//
// Created by Josh Wisenbaker on 12/16/14.
// Copyright (c) 2014 Josh Wisenbaker. All rights reserved.
//
import Foundation
class CipherSolver {
}
| mit |
cornerstonecollege/401_02 | 401_swift_examples/FirstPlayground.playground/Contents.swift | 1 | 1550 | var thatIsAVar:Int = 0;
var thatIsMySecondVar = 2
var 🖖 = 2
var 🖖😈🖖 = 3
let 🙏🖖 = 🖖😈🖖 + 🖖
let sum = thatIsAVar + thatIsMySecondVar;
if (sum > 4)
{
print("Hello Sreekanth and Tomoko")
}
else
{
print("Oh oh")
}
func printMyString()
{
print("That is my string")
func secondString()
{
... | gpl-2.0 |
MaticConradi/Blink | Blink/AppDelegate.swift | 1 | 1618 | //
// AppDelegate.swift
// Blink
//
// Created by Matic Conradi on 06/08/2016.
// Copyright © 2016 Conradi.si. All rights reserved.
//
import UIKit
import SystemConfiguration
import UserNotifications
import UserNotificationsUI
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegat... | gpl-3.0 |
22377832/ccyswift | WebViewDemo/WebViewDemo/ViewController.swift | 1 | 628 | //
// ViewController.swift
// WebViewDemo
//
// Created by sks on 17/2/9.
// Copyright © 2017年 chen. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
webView.loadR... | mit |
chenliang2016/CLCore | CLCore/RouterConfig.swift | 1 | 735 | //
// RouterConfig.swift
// CLIOSFrame
//
// Created by chenliang on 2017/1/1.
// Copyright © 2017年 chenliang. All rights reserved.
//
import Foundation
enum RouterOpenType {
case push
case present
}
public struct Router {
var routerUrl : String
var routerVC : String
var openType : RouterOpen... | mit |
github/codeql | swift/ql/test/extractor-tests/errors/overloaded.swift | 1 | 82 | //codeql-extractor-expected-status: 1
func foo() {}
func foo(_: Int) {}
_ = foo
| mit |
miradesne/gamepoll | gamepoll/Constants.swift | 1 | 538 | //
// Constants.swift
// gamepoll
//
// Created by Mohd Irtefa on 1/24/16.
// Copyright © 2016 gamepollstudio. All rights reserved.
//
import Foundation
struct Constants {
static let QUESTION = "Question"
static let QUESTION_TYPE = "QuestionType"
static let QUESTION_CHOICES = "Choices"
static let ... | mit |
skonmeme/Reservation | Reservation/NewBranchViewController.swift | 1 | 6050 | //
// NewBranchViewController.swift
// Reservation
//
// Created by Sung Gon Yi on 26/12/2016.
// Copyright © 2016 skon. All rights reserved.
//
import UIKit
import CoreData
protocol AddressViewControllerDelegate {
func addressSearched(_ addressViewController: AddressViewController, address: String)
}
class ... | mit |
mcberros/VirtualTourist | VirtualTourist/FlickrApiConveniences.swift | 1 | 4634 | //
// FlickrApiConveniences.swift
// VirtualTourist
//
// Created by Carmen Berros on 10/07/16.
// Copyright © 2016 mcberros. All rights reserved.
//
import Foundation
import UIKit
extension FlickrApiClient {
func getImageFromFlickrBySearch(boundingBoxString: String, completionHandler: (success: Bool, photosA... | mit |
rukano/cantina | Sources/App/Controllers/CantinaController.swift | 1 | 1231 | //
// CantinaController.swift
// cantina
//
// Created by Romero, Juan, SEVEN PRINCIPLES on 02.09.17.
//
//
import Vapor
import Kanna
enum TextFormat {
case mattermost
case prosa
}
final class CantinaController {
private let externalUrl: String = "http://www.friendskantine.de/index.php/speiseplan/speisepla... | mit |
AlbertWu0212/MyDailyTodo | MyDailyTodo/MyDailyTodo/DataModel.swift | 1 | 2686 | //
// DataModel.swift
// MyDailyTodo
//
// Created by WuZhengBin on 16/7/4.
// Copyright © 2016年 WuZhengBin. All rights reserved.
//
import Foundation
class DataModel {
var lists = [Checklist]()
var indexOfSelectedChecklist: Int {
get {
return NSUserDefaults.standardUserDefaults().integerForKey("... | mit |
eflyjason/word-counter-tools | WordCounter/ViewController.swift | 1 | 34703 | //
// ViewController.swift
// WordCounter
//
// Created by Arefly on 5/7/2015.
// Copyright (c) 2015 Arefly. All rights reserved.
//
import UIKit
import Foundation
import MBProgressHUD
import EAIntroView
class ViewController: UIViewController, UITextViewDelegate, EAIntroDelegate {
// MARK: - Basic var
le... | gpl-3.0 |
arvedviehweger/swift | stdlib/public/core/SequenceWrapper.swift | 4 | 3732 | //===--- SequenceWrapper.swift - sequence/collection wrapper protocols ----===//
//
// 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 |
xedin/swift | test/Parse/recovery.swift | 2 | 32726 | // RUN: %target-typecheck-verify-swift
//===--- Helper types used in this file.
protocol FooProtocol {}
//===--- Tests.
func garbage() -> () {
var a : Int
] this line is invalid, but we will stop at the keyword below... // expected-error{{expected expression}}
return a + "a" // expected-error{{binary operator... | apache-2.0 |
mihyaeru21/RxTwift | Pod/Classes/Objects/Place.swift | 1 | 1272 | //
// Place.swift
// Pods
//
// Created by Mihyaeru on 2/19/16.
//
//
import Foundation
import Argo
import Curry
// https://dev.twitter.com/overview/api/places
public struct Place {
public struct Box : Decodable {
public let coordinates: [[[Float]]]
public let type: String
public stati... | mit |
SeptiyanAndika/ViewPager---Swift | ViewPagerUITests/ViewPagerUITests.swift | 1 | 1250 | //
// ViewPagerUITests.swift
// ViewPagerUITests
//
// Created by Septiyan Andika on 6/26/16.
// Copyright © 2016 sailabs. All rights reserved.
//
import XCTest
class ViewPagerUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is c... | mit |
dineybomfim/Nippur | Templates/File Templates/Nippur/Frontend File.xctemplate/UIViewControllerXIBSwift/___FILEBASENAME___.swift | 1 | 1786 | /*
* ___FILENAME___
* ___PROJECTNAME___
*
* Created by ___FULLUSERNAME___ on ___DATE___.
* Copyright ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
*/
import UIKit
//**********************************************************************************************************
//
// MARK: - Constants -
//
/... | mit |
barrymcandrews/aurora-ios | Aurora/UILabel+Animations.swift | 1 | 454 | //
// UILabel+Animations.swift
// Aurora
//
// Created by Barry McAndrews on 4/15/17.
// Copyright © 2017 Barry McAndrews. All rights reserved.
//
import UIKit
extension UILabel {
func setText(_ newText: String, color: UIColor) {
UIView.transition(with: self, duration: 0.25, options: [.transition... | bsd-2-clause |
seem-sky/ios-charts | Charts/Classes/Renderers/ChartXAxisRenderer.swift | 1 | 11272 | //
// ChartXAxisRenderer.swift
// Charts
//
// Created by Daniel Cohen Gindi on 3/3/15.
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
// A port of MPAndroidChart for iOS
// Licensed under Apache License 2.0
//
// https://github.com/danielgindi/ios-charts
//
import Foundation
public class ChartXAxisR... | apache-2.0 |
numist/Tetris | CoreTetrisTests/TetriminoGeneratorTests.swift | 1 | 1072 | import XCTest
import CoreTetris
class TetriminoGeneratorTests: XCTestCase {
func testRandomGenerator() {
var shapes: [TetriminoShape] = []
let generator = RandomGenerator(generator: FibonacciLinearFeedbackShiftRegister16())
for _ in 0..<TetriminoShape.allValues.count {
let next ... | mit |
practicalswift/swift | test/decl/protocol/typealias_inference.swift | 32 | 491 | // RUN: %target-typecheck-verify-swift
// SR-8813
// By itself in this file because this particular expected error is omitted if there have been any other diagnostics.
protocol BaseProtocol {
associatedtype Value
typealias Closure = () -> Value
init(closure: Closure)
}
struct Base<Value>: BaseProtocol {
priv... | apache-2.0 |
hironytic/Kiretan0 | Kiretan0/Config.swift | 1 | 1559 | //
// Config.swift
// Kiretan0
//
// Copyright (c) 2018 Hironori Ichimiya <hiron@hironytic.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 li... | mit |
jopamer/swift | test/TBD/specialization.swift | 1 | 1718 | // Validate the the specializations actually exist (if they don't then we're not
// validating that they end up with the correct linkages):
// RUN: %target-swift-frontend -emit-sil -o- -O -validate-tbd-against-ir=none %s | %FileCheck %s
// RUN: %target-swift-frontend -emit-ir -o/dev/null -O -validate-tbd-against-ir=al... | apache-2.0 |
sebastienh/SwiftFlux | DemoApp/CreateTodoViewController.swift | 1 | 794 | //
// CreateTodoViewController.swift
// SwiftFlux
//
// Created by Kenichi Yonekawa on 11/20/15.
// Copyright © 2015 mog2dev. All rights reserved.
//
import UIKit
import SwiftFlux
class CreateTodoViewController: UITableViewController {
@IBOutlet weak var titleTextField: UITextField?
override func viewWil... | mit |
easyui/SwiftMan | SwiftMan/Extension/Swift/Dictionary+Man.swift | 1 | 965 | //
// Dictionary+Man.swift
// SwiftMan
//
// Created by yangjun on 16/5/4.
// Copyright © 2016年 yangjun. All rights reserved.
//
extension Dictionary {
/// 转JSON
///
/// - Returns: 可选的格式化的JSON字符串
public func m_prettyJSONString() -> String?{
return m_JSONString(option: [.prettyPrinted... | mit |
czechboy0/Buildasaur | BuildaKit/SyncPairResolver.swift | 2 | 14948 | //
// SyncPair_BotLogic.swift
// Buildasaur
//
// Created by Honza Dvorsky on 19/05/15.
// Copyright (c) 2015 Honza Dvorsky. All rights reserved.
//
import Foundation
import XcodeServerSDK
import BuildaGitServer
import BuildaUtils
public class SyncPairResolver {
public init() {
//
}
... | mit |
roop/GiveAndTake | Take/Take/Helpers/ObservationHelper.swift | 1 | 2767 | //
// ObservationHelper.swift
// Take
//
// Created by Roopesh Chander on 01/08/14.
// Copyright (c) 2014 Roopesh Chander. All rights reserved.
//
import Foundation
// Usage:
// var observer1 = object.onChange("property") { change in
// doSomethingWithChangeDict(change)
// }
// v... | mit |
ernieb4768/VelocityCBT | CBT Velocity/AppDelegate.swift | 1 | 6229 | //
// AppDelegate.swift
// CBT Velocity
//
// Created by Ryan Hoffman on 3/20/16.
// Copyright © 2016 Ryan Hoffman. All rights reserved.
//
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIAppli... | apache-2.0 |
335g/Mattress | Sources/Lift.swift | 1 | 246 |
public func lift<C, T, U, V>(_ f: @escaping (T, U) -> V) -> Parser<C, (T) -> (U) -> V> {
return .pure(curry(f))
}
public func lift<C, T, U, V, W>(_ f: @escaping (T, U, V) -> W) -> Parser< C, (T) -> (U) -> (V) -> W> {
return .pure(curry(f))
}
| mit |
SeriousChoice/SCSwift | Example/Pods/RxSwift/RxSwift/Traits/Infallible/Infallible+Operators.swift | 1 | 34639 | //
// Infallible+Operators.swift
// RxSwift
//
// Created by Shai Mishali on 27/08/2020.
// Copyright © 2020 Krunoslav Zaher. All rights reserved.
//
// MARK: - Static allocation
extension InfallibleType {
/**
Returns an infallible sequence that contains a single element.
- seealso: [just operator o... | mit |
biohazardlover/ROer | Roer/MapViewerViewController.swift | 1 | 7196 |
import UIKit
import GLKit
import MBProgressHUD
import SwiftyJSON
class MapViewerViewController: UIViewController {
fileprivate var mapView: GLKView!
@IBOutlet var panGestureRecognizer: UIPanGestureRecognizer!
@IBOutlet var twoFingersPanGestureRecognizer: UIPanGestureRecognizer!
@IBOutlet var pinc... | mit |
marekmatula/FontIcons.Swift | Pod/Classes/Extensions.swift | 1 | 4898 | //
// Extensions.swift
// FontIcons.swift
//
// Created by Marek Matula on 05.02.16.
// Copyright © 2016 Marek Matula. All rights reserved.
//
import Foundation
import UIKit
public let defaultFontIconSize:CGFloat = 23.0
public extension UIBarButtonItem {
func setFontIcon(_ icon: FontEnum, size: CGFloat ... | mit |
linkedin/LayoutKit | Sources/ObjCSupport/Internal/ReverseWrappedLayout.swift | 1 | 1587 | // Copyright 2018 LinkedIn Corp.
// 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 writing,
// s... | apache-2.0 |
touchvie/sdk-front-ios | SDKFrontiOS/SDKFrontiOS/Cast.swift | 1 | 477 | //
// Cast.swift
// SDKFrontiOS
//
// Created by Sergio Girao on 17/10/16.
// Copyright © 2016 Tagsonomy. All rights reserved.
//
import UIKit
class Cast: HorizontalListModule {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ s... | apache-2.0 |
WebAPIKit/WebAPIKit | Tests/WebAPIKitTests/Stub/StubResponder+PathTemplateSpec.swift | 1 | 3092 | /**
* WebAPIKit
*
* Copyright (c) 2017 Evan Liu. Licensed under the MIT license, as follows:
*
* 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 witho... | mit |
silence0201/Swift-Study | SwiftLearn/MySwift19_Type_casting.playground/Contents.swift | 1 | 5060 | //: Playground - noun: a place where people can play
import UIKit
//Swift运行时的类型检查 is, 类与类之间的类型转换 as.
class MediaItem{
var name: String
init(name: String){
self.name = name
}
}
class Movie: MediaItem{
var genre: String //类型
init(name: String, genre: String){
self.genre = genre
... | mit |
bitboylabs/selluv-ios | selluv-ios/selluv-ios/Classes/Base/Vender/XLPagerTabStrip/SwipeDirection.swift | 3 | 1327 | // SwipeDirection.swift
// XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip )
//
// 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 dea... | mit |
ctarda/Turnstile | Sources/TurnstileTests/StateTests.swift | 1 | 2223 | //
// StateTests.swift
// Turnstile
//
// Created by Cesar Tardaguila on 09/05/15.
//
import XCTest
import Turnstile
class StateTests: XCTestCase {
private struct Constants {
static let stateValue = "State under testing"
static let stringDiff = "💩"
}
var state: State<String>?
... | mit |
teanet/Nazabore | Nazabore/Models/Container.swift | 1 | 486 | @objc public class Container: NSObject {
@objc public lazy var rootVC: UINavigationController = {
let vc = NZBMapVC(router: self.router, markerFetcher: self.markerFetcher)
return UINavigationController(rootViewController: vc)
}()
lazy var api = APIService()
lazy var markerFetcher: MarkerFetcher = { [unowned ... | mit |
piemonte/Blurry | Blurry/AppDelegate.swift | 1 | 2212 | //
// AppDelegate.swift
// Blurry
//
// Copyright (c) 2016-present patrick piemonte (http://patrickpiemonte.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 restrictio... | mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/27698-swift-parser-parseexprimpl.swift | 4 | 267 | // 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<T where h:b{enum a{struct Q{class A{struct Q{let a=A{struct c{struct c{var e{let:{var:{l
| mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/14791-swift-sourcemanager-getmessage.swift | 11 | 239 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
let a {
end as S (
[ {
if true {
protocol A {
struct A {
class
case ,
| mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/26263-swift-protocoltype-canonicalizeprotocols.swift | 7 | 225 | // 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<T where B:P{struct Q<h{var d{}struct A
let a=A{
| mit |
wangchao1992/Imitate-BiliBili | ImitateBilibili/ImitateBilibili/Classes/Main/TuiJian/View/RecommendCellDetail.swift | 1 | 1155 | //
// RecommendCellDetail.swift
// ImitateBilibili
//
// Created by xiaochao on 2016/11/14.
// Copyright © 2016年 godchao. All rights reserved.
//
import UIKit
import SDWebImage
class RecommendCellDetail: UIView {
@IBOutlet weak var coverImage: UIImageView!
@IBOutlet weak var title: UILabel!
@IBOut... | mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/27198-swift-substitutedtype-get.swift | 4 | 257 | // 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 S<T{func a<h{func b<T where h.g=a{}}}struct c{struct S<b{class A{struct c{class a
| mit |
MaartenBrijker/project | project/External/AudioKit-master/AudioKit/iOS/AudioKit/AudioKit.playground/Pages/Distortion.xcplaygroundpage/Contents.swift | 2 | 5422 | //: [TOC](Table%20Of%20Contents) | [Previous](@previous) | [Next](@next)
//:
//: ---
//:
//: ## Distortion
//: ### This thing is a beast.
//:
import XCPlayground
import AudioKit
let bundle = NSBundle.mainBundle()
let file = bundle.pathForResource("mixloop", ofType: "wav")
var player = AKAudioPlayer(file!)
player.loopi... | apache-2.0 |
jsslai/Action | Carthage/Checkouts/RxSwift/Rx.playground/Pages/Filtering_and_Conditional_Operators.xcplaygroundpage/Contents.swift | 3 | 8119 | /*:
> # IMPORTANT: To use **Rx.playground**:
1. Open **Rx.xcworkspace**.
1. Build the **RxSwift-OSX** scheme (**Product** → **Build**).
1. Open **Rx** playground in the **Project navigator**.
1. Show the Debug Area (**View** → **Debug Area** → **Show Debug Area**).
----
[Previous](@previous) - [Table of Contents... | mit |
michalciurus/KatanaRouter | Pods/Katana/Katana/iOS/Typealiases.swift | 1 | 250 | //
// Typealiases.swift
// Katana
//
// Copyright © 2016 Bending Spoons.
// Distributed under the MIT License.
// See the LICENSE file for more information.
public typealias DefaultView = UIView
public typealias FloatEdgeInsets = UIEdgeInsets
| mit |
lauracpierre/FA_ReveaMenu | FA_RevealMenuTests/FA_RevealMenuTests.swift | 1 | 917 | //
// FA_RevealMenuTests.swift
// FA_RevealMenuTests
//
// Created by Pierre LAURAC on 09/05/2015.
// Copyright (c) 2015 Front. All rights reserved.
//
import UIKit
import XCTest
class FA_RevealMenuTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This meth... | mit |
ben-ng/swift | validation-test/compiler_crashers_fixed/26624-swift-typebase-getcanonicaltype.swift | 1 | 487 | // 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 |
TakahiroTsuchiya/SampleFirebase | SampleFirebase/AppDelegate.swift | 1 | 2256 | //
// AppDelegate.swift
// SampleFirebase
//
// Created by Takahiro Tsuchiya on 5/28/16.
// Copyright © 2016 Takahiro Tsuchiya. All rights reserved.
//
import Firebase
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(applicat... | apache-2.0 |
cnoon/swift-compiler-crashes | fixed/01784-swift-constraints-constraintgraph-lookupnode.swift | 11 | 203 | // 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 c<b{class A
class B:A{let a=b | mit |
cnoon/swift-compiler-crashes | fixed/23619-swift-typechecker-typecheckexpression.swift | 11 | 2391 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
}
}}}
let f = j
}
println( 1 )
func b
}
}extension String{
class B, leng
class A{
}enum S<T>
let end = [Void{
deinit {
}
i>: B<T where B {
let f = F>: ... | mit |
CanBeMyQueen/DouYuZB | DouYu/DouYu/Classes/Main/View/BaseCollectionViewCell.swift | 1 | 873 | //
// BaseCollectionViewCell.swift
// DouYu
//
// Created by 张萌 on 2017/10/16.
// Copyright © 2017年 JiaYin. All rights reserved.
//
import UIKit
class BaseCollectionViewCell: UICollectionViewCell {
/// 属性设置
@IBOutlet weak var nickNameLabel: UILabel!
@IBOutlet weak var roomNameLabel: UILabel!
@IBOu... | mit |
cnoon/swift-compiler-crashes | crashes-duplicates/03128-swift-sourcemanager-getmessage.swift | 11 | 432 | // 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<T>(v: T where g<T where S<T {
enum S.e : j { func a(")
if true {
protocol a(v: A? {
[k<T.e = ")
var e(v: d = compose(Any) {
protocol h : j { f... | mit |
kripple/bti-watson | ios-app/Carthage/Checkouts/ios-sdk/WatsonDeveloperCloudTests/WatsonDeveloperCloudTests.swift | 1 | 1453 | /**
* Copyright IBM Corporation 2015
*
* 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... | mit |
exponent/exponent | ios/vendored/sdk43/@stripe/stripe-react-native/ios/CardFormView.swift | 2 | 3223 | import Foundation
import UIKit
import Stripe
class CardFormView: UIView, STPCardFormViewDelegate {
public var cardForm: STPCardFormView?
public var cardParams: STPPaymentMethodCardParams? = nil
@objc var dangerouslyGetFullCardDetails: Bool = false
@objc var onFormComplete: ABI43_0_0RCTDirectE... | bsd-3-clause |
ccrama/Slide-iOS | Slide for Reddit/Fonts/LinkParser.swift | 1 | 11108 | //
// LinkParser.swift
// Slide for Reddit
//
// Created by Carlos Crane on 1/28/17.
// Copyright © 2017 Haptic Apps. All rights reserved.
//
import DTCoreText
import UIKit
import YYText
class LinkParser {
public static func parse(_ attributedString: NSAttributedString, _ color: UIColor, font: UIFont, bold: U... | apache-2.0 |
gewill/Feeyue | Feeyue/Helpers/ModelHelper.swift | 1 | 2783 |
//
// ModelHelper.swift
// Feeyue
//
// Created by Will on 2018/7/16.
// Copyright © 2018 Will. All rights reserved.
//
import Foundation
import SwiftyJSON
import Kanna
struct DateHelper {
static func convert(_ json: JSON) -> Date {
return DateHelper.dateFormatter.date(from: json.stringValue) ?? Date... | mit |
tlax/looper | looper/Model/Camera/More/MCameraMoreItemInfo.swift | 1 | 452 | import UIKit
class MCameraMoreItemInfo:MCameraMoreItem
{
let attributedString:NSAttributedString
private let kCellHeight:CGFloat = 40
init(attributedString:NSAttributedString)
{
self.attributedString = attributedString
let reusableIdentifier:String = VCameraMoreCellInfo.reusableIde... | mit |
arbitur/Func | source/Decoding/Decodable.swift | 1 | 5434 | //
// FuncJSON.swift
// Pods
//
// Created by Philip Fryklund on 27/Jul/17.
//
//
import Foundation
// MARK: - Protocols
public typealias Codable = Decodable & Encodable
public protocol Decodable {
init(json: Dict) throws
}
public protocol Encodable {
func encoded() -> Dict
}
// MARK: - Parse funct... | mit |
olbartek/BODropdownMenu | BODropdownMenu/BODropdownMenu.swift | 1 | 40135 | //
// BODropdownMenu.swift
// BODropdownMenu
//
// Created by Bartosz Olszanowski on 05.11.2015.
// Copyright (c) 2015 Bartosz Olszanowski. 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... | mit |
czechboy0/XcodeServerSDK | XcodeServerSDKTests/RepositoryTests.swift | 1 | 4681 | //
// Repository.swift
// XcodeServerSDK
//
// Created by Mateusz Zając on 28.06.2015.
// Copyright © 2015 Honza Dvorsky. All rights reserved.
//
import XCTest
import XcodeServerSDK
class RepositoryTests: XCTestCase {
let json = [
"readAccessExternalIDs": [],
"writeAccessExternalIDs": [
... | mit |
brentdax/swift | test/IRGen/class_bounded_generics.swift | 2 | 17211 | // RUN: %target-swift-frontend -module-name class_bounded_generics -enable-objc-interop -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize
// REQUIRES: CPU=x86_64
protocol ClassBound : class {
func classBoundMethod()
}
protocol ClassBound2 : class {
func... | apache-2.0 |
tkremenek/swift | validation-test/compiler_crashers_fixed/00449-swift-typechecker-validatedecl.swift | 65 | 472 | // 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 |
ProfileCreator/ProfileCreator | ProfileCreator/ProfileCreator/Utility/DesignatedRequirement.swift | 1 | 2952 | //
// DesignatedRequirement.swift
// ProfileCreator
//
// Created by Erik Berglund.
// Copyright © 2018 Erik Berglund. All rights reserved.
//
import Foundation
public func SecRequirement(forURL url: URL) -> SecRequirement? {
var osStatus = noErr
var codeRef: SecStaticCode?
osStatus = SecStaticCodeCr... | mit |
kaltura/playkit-ios | Classes/Player/Media/PKMediaEntry+Copying.swift | 1 | 1683 | // ===================================================================================================
// Copyright (C) 2017 Kaltura Inc.
//
// Licensed under the AGPLv3 license, unless a different license for a
// particular library is specified in the applicable library path.
//
// You may obtain a copy of the Licens... | agpl-3.0 |
twtstudio/WePeiYang-iOS | WePeiYang/Bicycle/View/BicycleFitnessTrackerViewCell.swift | 1 | 4037 | //
// BicycleFitnessTrackerViewCell.swift
// WePeiYang
//
// Created by Allen X on 12/8/16.
// Copyright © 2016 Qin Yubo. All rights reserved.
//
import Foundation
import Charts
enum TrackerCellType {
case Move(text: String, color: UIColor)
case Exercise(text: String, color: UIColor)
case Stand(text: ... | mit |
treejames/firefox-ios | Client/Application/AppDelegate.swift | 3 | 11686 | /* 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 Shared
import Storage
import AVFoundation
import XCGLogger
class AppDelegate: UIResponder, UIApplicationDe... | mpl-2.0 |
kzaher/RxSwift | RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift | 5 | 1346 | //
// RxTabBarDelegateProxy.swift
// RxCocoa
//
// Created by Jesse Farless on 5/14/16.
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
//
#if os(iOS) || os(tvOS)
import UIKit
import RxSwift
extension UITabBar: HasDelegate {
public typealias Delegate = UITabBarDelegate
}
/// For more information t... | mit |
niunaruto/DeDaoAppSwift | testSwift/Pods/Kingfisher/Sources/Cache/Storage.swift | 4 | 3238 | //
// Storage.swift
// Kingfisher
//
// Created by Wei Wang on 2018/10/15.
//
// Copyright (c) 2019 Wei Wang <onevcat@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software w... | mit |
algal/TouchVisualizer | TouchVisualizer/ForcePropertiesGestureRecognizer/ALGInitialTouchGestureRecognizer.swift | 1 | 5664 | //
// MonotouchGestureRecognizer.swift
// TouchVisualizer
//
// Created by Alexis Gallagher on 2015-10-30.
// Copyright © 2015 Alexis Gallagher. All rights reserved.
//
import UIKit.UIGestureRecognizerSubclass
/**
This recognizes an "initial touch sequence", which is essentially the part of a multitouch sequen... | mit |
lorentey/swift | validation-test/compiler_crashers_fixed/13737-swift-availabilityattr-isunavailable.swift | 65 | 457 | // 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 |
haitran2011/Rocket.Chat.iOS | Rocket.Chat/Managers/LogManager.swift | 2 | 299 | //
// LogManager.swift
// Rocket.Chat
//
// Created by Rafael K. Streit on 7/6/16.
// Copyright © 2016 Rocket.Chat. All rights reserved.
//
import Foundation
final class Log {
static func debug(_ text: String?) {
guard let text = text else { return }
print(text)
}
}
| mit |
Candyroot/DesignPattern | factory/factory/RedPepper.swift | 1 | 184 | //
// RedPepper.swift
// factory
//
// Created by Bing Liu on 11/3/14.
// Copyright (c) 2014 UnixOSS. All rights reserved.
//
import Foundation
class RedPepper: Veggies {
}
| apache-2.0 |
brightify/torch | Source/Property/PropertyArrayType.swift | 1 | 452 | //
// PropertyArrayType.swift
// Torch
//
// Created by Filip Dolnik on 22.07.16.
// Copyright © 2016 Brightify. All rights reserved.
//
// TODO Refactor if needed
public protocol PropertyArrayType: PropertyType {
associatedtype Element
var values: [Element] { get }
subscript(index: Int)... | mit |
Ranxan/NetworkService | Example/NetworkService/ViewController.swift | 1 | 557 | //
// ViewController.swift
// NetworkService
//
// Created by Ranxan on 06/12/2017.
// Copyright (c) 2017 Ranxan. All rights reserved.
//
import UIKit
import NetworkService
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup af... | mit |
gregomni/swift | validation-test/compiler_crashers_fixed/00228-swift-clangimporter-loadextensions.swift | 3 | 764 | // 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 |
agrippa1994/iOS-PLC | Pods/Charts/Charts/Classes/Renderers/LineChartRenderer.swift | 4 | 25085 | //
// LineChartRenderer.swift
// Charts
//
// Created by Daniel Cohen Gindi on 4/3/15.
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
// A port of MPAndroidChart for iOS
// Licensed under Apache License 2.0
//
// https://github.com/danielgindi/ios-charts
//
import Foundation
import CoreGraphics
import... | mit |
nasser0099/Express | Express/StencilViewEngine.swift | 1 | 4259 | //===--- StencilViewEngine.swift -----------------------------------------===//
//
//Copyright (c) 2015-2016 Daniel Leping (dileping)
//
//This file is part of Swift Express.
//
//Swift Express is free software: you can redistribute it and/or modify
//it under the terms of the GNU Lesser General Public License as publi... | gpl-3.0 |
tavultesoft/keymanweb | ios/engine/KMEI/KeymanEngine/Classes/kmp.json/KMPSystem.swift | 1 | 679 | //
// KMPSystem.swift
// KeymanEngine
//
// Created by Joshua Horton on 6/1/20.
// Copyright © 2020 SIL International. All rights reserved.
//
import Foundation
struct KMPSystem: Codable {
public var keymanDeveloperVersion: String?
public var fileVersion: String
enum CodingKeys: String, CodingKey {
c... | apache-2.0 |
bi3mer/WorkSpace | Swift/functionHelloWorld/functionHelloWorld/main.swift | 1 | 933 | //
// main.swift
// functionHelloWorld
//
// Created by colan biemer on 3/28/15.
// Copyright (c) 2015 colan biemer. All rights reserved.
//
import Foundation
func hello() -> Void
{
println("hello world!")
}
func hello(printVal: String)
{
println("overload worked: " + printVal)
}
func returnHello() -> S... | mit |
groue/GRDB.swift | GRDB/Record/FetchableRecord.swift | 1 | 33687 | import Foundation
/// A type that can decode itself from a database row.
///
/// To conform to `FetchableRecord`, provide an implementation for the
/// ``init(row:)-9w9yp`` initializer. This implementation is ready-made for
/// `Decodable` types.
///
/// For example:
///
/// ```swift
/// struct Player: FetchableRecord... | mit |
andrebocchini/SwiftChatty | SwiftChatty/Responses/Messages/MarkMessageReadResponse.swift | 1 | 316 | //
// MarkMessageReadResponse.swift
// SwiftChatty
//
// Created by Andre Bocchini on 1/24/16.
// Copyright © 2016 Andre Bocchini. All rights reserved.//
/// -SeeAlso: http://winchatty.com/v2/readme#_Toc421451694
public struct MarkMessageReadResponse: CommonSuccessResponse {
public var result: String
}
| mit |
wordpress-mobile/WordPress-iOS | WordPress/Classes/Models/ThemeIdHelper.swift | 2 | 926 | import Foundation
/// Helper class for adding and removing the '-wpcom' suffix from themeIds
///
class ThemeIdHelper: NSObject {
private static let WPComThemesIDSuffix = "-wpcom"
@objc static func themeIdWithWPComSuffix(_ themeId: String) -> String {
return themeId.appending(WPComThemesIDSuffix)
}... | gpl-2.0 |
royhsu/tiny-core | Sources/Core/HTTP/HTTPRequest+URLRequestRepresentable.swift | 1 | 894 | //
// HTTPRequest+URLRequestRepresentable.swift
// TinyCore
//
// Created by Roy Hsu on 2019/1/26.
// Copyright © 2019 TinyWorld. All rights reserved.
//
// MARK: - URLRequestRepresentable
extension HTTPRequest: URLRequestRepresentable {
public func urlRequest() throws -> URLRequest {
var request = ... | mit |
robzimpulse/mynurzSDK | Example/mynurzSDK/CardViewViewController.swift | 1 | 1148 | //
// CardViewViewController.swift
// mynurzSDK
//
// Created by Robyarta on 6/10/17.
// Copyright © 2017 CocoaPods. All rights reserved.
//
import UIKit
class CardViewViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning... | mit |
magnetsystems/message-samples-ios | QuickStart/QuickStart/ChannelCell.swift | 1 | 1830 | /*
* Copyright (c) 2015 Magnet Systems, Inc.
* 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.