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 |
|---|---|---|---|---|---|
dcutting/Syft | Package.swift | 1 | 406 | // swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "Syft",
products: [
.library(name: "Syft", targets: ["Syft"])
],
targets: [
.target(
name: "Sample",
dependencies: ["Syft"]),
.target(
name: "Syft"),
.t... | mit |
FuckBoilerplate/RxCache | watchOS/Pods/RxSwift/RxSwift/DataStructures/Bag.swift | 12 | 7470 | //
// Bag.swift
// Rx
//
// Created by Krunoslav Zaher on 2/28/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
import Swift
let arrayDictionaryMaxSize = 30
/**
Class that enables using memory allocations as a means to uniquely identify objects.
*/
class Identity {
// weird ... | mit |
Q42/NoticeWindow | Pod/Classes/NoticeView.swift | 1 | 2780 | //
// NoticeView.swift
// Pods
//
// Created by Tim van Steenis on 09/12/15.
//
//
import Foundation
import UIKit
class NoticeView: UIView {
@IBOutlet weak var horizontalStackView: UIStackView!
@IBOutlet weak var leftImage: UIImageView!
@IBOutlet weak var rightImage: UIImageView!
@IBOutlet weak var left... | mit |
Brightify/ReactantUI | Sources/Tokenizer/Properties/AssignableProperty.swift | 1 | 3261 | //
// AssignablePropertyDescription.swift
// ReactantUI
//
// Created by Tadeas Kriz.
// Copyright © 2017 Brightify. All rights reserved.
//
import Foundation
#if canImport(UIKit)
import UIKit
#endif
/**
* Standard typed property obtained from an XML attribute.
*/
public struct AssignableProperty<T: AttributeS... | mit |
Zewo/TrieRouteMatcher | Package.swift | 1 | 299 | import PackageDescription
let package = Package(
name: "TrieRouteMatcher",
dependencies: [
.Package(url: "https://github.com/Zewo/HTTP.git", majorVersion: 0, minor: 7),
.Package(url: "https://github.com/Zewo/PathParameterMiddleware.git", majorVersion: 0, minor: 7),
]
)
| mit |
brentsimmons/Frontier | BeforeTheRename/Frontier/DB/DBViewController.swift | 1 | 250 | //
// DBViewController.swift
//
//
// Created by Brent Simmons on 4/19/17.
//
//
import Cocoa
class DBViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do view setup here.
}
}
| gpl-2.0 |
mownier/pyrobase | Pyrobase/Pyrobase.swift | 1 | 2029 | //
// Pyrobase.swift
// Pyrobase
//
// Created by Mounir Ybanez on 01/05/2017.
// Copyright © 2017 Ner. All rights reserved.
//
public class Pyrobase {
internal var path: RequestPathProtocol
internal var request: RequestProtocol
public var baseURL: String {
return path.baseURL
}
... | mit |
Quick/Spry | Source/Spry/Core/Helpers.swift | 1 | 327 | //
// Helpers.swift
// Spry
//
// Created by Shahpour Benkau on 22/02/2017.
//
//
import Foundation
extension Sequence {
func all(_ fn: (Iterator.Element) -> Bool) -> Bool {
for item in self {
if !fn(item) {
return false
}
}
return true
... | apache-2.0 |
Diego5529/tcc-swift3 | tcc-swift3/src/controllers/view/form/Commons/Login.swift | 2 | 272 | //
// Login.swift
// Former-Demo
//
// Created by Ryo Aoyama on 11/8/15.
// Copyright © 2015 Ryo Aoyama. All rights reserved.
//
import UIKit
final class Login {
static let sharedInstance = Login()
var username: String?
var password: String?
} | mit |
lukejmann/FBLA2017 | Pods/Instructions/Sources/Helpers/CoachMarkLayoutHelper.swift | 1 | 9860 | // CoachMarkLayoutHelper.swift
//
// Copyright (c) 2016 Frédéric Maquin <fred@ephread.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 limitat... | mit |
keyeMyria/edx-app-ios | Source/OEXStyles+Swift.swift | 4 | 3515 | //
// OEXStyles+Swift.swift
// edX
//
// Created by Ehmad Zubair Chughtai on 25/05/2015.
// Copyright (c) 2015 edX. All rights reserved.
//
import Foundation
import UIKit
extension OEXStyles {
var navigationTitleTextStyle : OEXTextStyle {
return OEXTextStyle(weight: .SemiBold, size: .Base, color ... | apache-2.0 |
relayr/apple-sdk | Sources/common/services/API/APIUsers.swift | 1 | 7530 | import ReactiveSwift
import Result
import Foundation
internal extension API {
/// User entity as represented on the relayr API platform.
struct User: JSONable {
let identifier: String
var email: String?
var nickname: String?
var name: (first: String?, last: String?)
var ... | mit |
tomas789/JustLog | JustLog/Extensions/Data+Representation.swift | 1 | 304 | //
// Data+Representation.swift
// JustLog
//
// Created by Alberto De Bortoli on 15/12/2016.
// Copyright © 2017 Just Eat. All rights reserved.
//
import Foundation
extension Data {
func stringRepresentation() -> String {
return String(data: self, encoding: .utf8) ?? ""
}
}
| apache-2.0 |
dnosk/Explore | Example/Explore/ViewController.swift | 1 | 1164 | //
// ViewController.swift
// Explore
//
// Created by dnosk on 04/26/2017.
// Copyright (c) 2017 dnosk. All rights reserved.
//
import Explore
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!
var appsDownloaded = [String]()
override func view... | mit |
bm842/TradingLibrary | Sources/OandaRestV1Instrument.swift | 2 | 9009 | /*
The MIT License (MIT)
Copyright (c) 2016 Bertrand Marlier
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, mer... | mit |
pocketworks/Dollar.swift | Cent/Cent/Int.swift | 1 | 2807 | //
// Int.swift
// Cent
//
// Created by Ankur Patel on 6/30/14.
// Copyright (c) 2014 Encore Dev Labs LLC. All rights reserved.
//
import Foundation
extension Int {
/// Invoke a callback n times
///
/// :param callback The function to invoke that accepts the index
public func times(callback:... | mit |
natecook1000/swift | test/PlaygroundTransform/high_performance.swift | 7 | 1253 | // RUN: %empty-directory(%t)
// RUN: cp %s %t/main.swift
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -playground-high-performance -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift
// RUN: %target-codesign %t/main
// RUN: %target-run %t/main | %FileCheck %s
// RUN: %target-build-swift -Xfront... | apache-2.0 |
danfsd/FolioReaderKit | Example/Example/ViewController.swift | 1 | 1987 | //
// ViewController.swift
// Example
//
// Created by Heberti Almeida on 08/04/15.
// Copyright (c) 2015 Folio Reader. All rights reserved.
//
import UIKit
import FolioReaderKit
class ViewController: UIViewController {
@IBOutlet var bookOne: UIButton!
@IBOutlet var bookTwo: UIButton!
let epubSampleF... | bsd-3-clause |
coodly/TalkToCloud | Sources/TalkToCloud/APIKeyConsumer.swift | 1 | 683 | /*
* Copyright 2016 Coodly LLC
*
* 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 wr... | apache-2.0 |
codercd/DPlayer | DPlayer/Model.swift | 1 | 1721 | //
// Model.swift
// DPlayer
//
// Created by LiChendi on 16/4/19.
// Copyright © 2016年 LiChendi. All rights reserved.
//
import UIKit
class Model: NSObject {
}
enum LiveBaseURL:String {
case rtmp = "rtmp://live.quanmin.tv/live/1456011"
case hls = "http://hls.quanmin.tv/live/1456011/playlist.m3u8"
c... | mit |
wunshine/FoodStyle | FoodStyle/FoodStyle/Classes/View/WXTextField.swift | 1 | 845 | //
// WXTextField.swift
// FoodStyle
//
// Created by Woz Wong on 16/3/5.
// Copyright © 2016年 code4Fun. All rights reserved.
//
import UIKit
class WXTextField: UITextField {
override func textRectForBounds(bounds: CGRect) -> CGRect {
super.textRectForBounds(bounds)
return CGRectMake(bounds.o... | mit |
ociata/OCIKeyboardAdjuster | OCIKeyboardAdjuster.swift | 1 | 7643 | //
// KeyboardAdjuster.swift
//
//
// Created by Hristo Todorov - Oci on 6/5/15.
// Copyright (c) 2015
//
import UIKit
class OCIKeyboardAdjuster: NSObject
{
static let sharedKeyboardAdjuster = OCIKeyboardAdjuster()
weak var focusedControl: UIView?
private override init() {
//this way ... | mit |
RCacheaux/BitbucketKit | Carthage/Checkouts/Swinject/Sources/SwinjectStoryboard/Container+SwinjectStoryboard.swift | 1 | 2302 | //
// Container+SwinjectStoryboard.swift
// Swinject
//
// Created by Yoichi Tagaya on 11/28/15.
// Copyright © 2015 Swinject Contributors. All rights reserved.
//
#if os(iOS) || os(OSX) || os(tvOS)
extension Container {
/// Adds a registration of the specified view or window controller that is configured in a... | apache-2.0 |
adamnemecek/SortedArray.swift | Cmdline/main.swift | 1 | 931 | //
// main.swift
// Cmdline
//
// Created by Adam Nemecek on 5/6/17.
//
//
import Foundation
import SortedArray
let s = SortedSet([5,2,1,2,3,6,7,8])
let a = [1,2,3,4,5,6]
let b = [1, 2, 2, 3, 3, 5, 6]
print(b)
//var u = UnionIterator(a: a, b: b) { $0 < $1 }
//print(s.contains(1))
//while let n = u.next() {
//... | mit |
KBryan/SwiftFoundation | Darwin Support/NSUUID.swift | 1 | 1268 | //
// NSUUID.swift
// SwiftFoundation
//
// Created by Alsey Coleman Miller on 7/4/15.
// Copyright © 2015 PureSwift. All rights reserved.
//
import Foundation
public extension NSUUID {
convenience init(byteValue: uuid_t) {
var value = byteValue
let buffer = withUnsafeMu... | mit |
chizcake/ReplayKitExample | ReplayKitExampleStarter/Carthage/Checkouts/CleanroomLogger/Tests/CleanroomLoggerTests/LogSeverityTests.swift | 2 | 974 | //
// LogSeverityTests.swift
// Cleanroom Project
//
// Created by Claudio Romandini on 5/19/15.
// Copyright © 2015 Gilt Groupe. All rights reserved.
//
import XCTest
import CleanroomLogger
class LogSeverityTests: XCTestCase {
func testLogSeverityEquality() {
XCTAssertTrue(LogSeverity.debug == LogSe... | mit |
EstebanVallejo/sdk-ios | MercadoPagoSDK/MercadoPagoSDK/MercadoPago.swift | 1 | 17199 |
//
// MercadoPago.swift
// MercadoPagoSDK
//
// Created by Matias Gualino on 28/12/14.
// Copyright (c) 2014 com.mercadopago. All rights reserved.
//
import Foundation
import UIKit
public class MercadoPago : NSObject {
public class var PUBLIC_KEY : String {
return "public_key"
}
public c... | mit |
xmartlabs/XLSlidingContainer | Example/Example/ScrollViewController.swift | 1 | 1800 | //
// ScrollViewController.swift
//
// Copyright (c) 2017 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 Software without restriction, including without ... | mit |
abdullahselek/SwiftyNotifications | Sample/Sample/ViewController.swift | 1 | 2983 | //
// ViewController.swift
// Sample
//
// Created by Abdullah Selek on 03/04/2017.
// Copyright © 2017 Abdullah Selek. All rights reserved.
//
import UIKit
import SwiftyNotifications
class ViewController: UIViewController, SwiftyNotificationsDelegate {
private var notification: SwiftyNotifications!
priv... | mit |
tarun-talentica/TalNet | Source/Request/NetworkService.swift | 2 | 1023 | //
// NetworkService.swift
// GSignIn
//
// Created by Tarun Sharma on 07/05/16.
// Copyright © 2016 Appcoda. All rights reserved.
//
import Foundation
public protocol NetworkService {
var host: String { get }
var port: Int? {get}
var scheme: String { get }
var serviceType: NSURLRequestNetworkServiceType ... | mit |
agrippa1994/iOS-PLC | PLC/CoreData/Entities/StaticData+CoreDataProperties.swift | 1 | 374 | //
// StaticData+CoreDataProperties.swift
// PLC
//
// Created by Manuel Stampfl on 08.09.15.
// Copyright © 2015 mani1337. All rights reserved.
//
// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu
// to delete and recreate this implementation file for your updated model.
//
import Foun... | mit |
kallahir/MarvelFinder | MarvelFinder/CharacterDetailCollectionCell.swift | 1 | 359 | //
// CharacterDetailCollectionCell.swift
// MarvelFinder
//
// Created by Itallo Rossi Lucas on 10/01/17.
// Copyright © 2017 Kallahir Labs. All rights reserved.
//
import UIKit
class CharacterDetailCollectionCell: UICollectionViewCell {
@IBOutlet weak var collectionImage: UIImageView!
@IBOutlet wea... | mit |
wireapp/wire-ios | Wire-iOS Tests/DeviceManagement/CoreDataFixture+MockUserClient.swift | 1 | 1530 | //
// Wire
// Copyright (C) 2018 Wire Swiss GmbH
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This progr... | gpl-3.0 |
wireapp/wire-ios | Wire-iOS Tests/ConversationCell/ConversationCellBurstTimestampViewSnapshotTests.swift | 1 | 1759 | //
// Wire
// Copyright (C) 2021 Wire Swiss GmbH
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This progr... | gpl-3.0 |
derrh/CanvasKit | CanvasKitTests/Model Tests/CKIActivityStreamCollaborationItemTests.swift | 3 | 1036 | //
// CKIActivityStreamCollaborationItemTests.swift
// CanvasKit
//
// Created by Nathan Lambson on 7/17/14.
// Copyright (c) 2014 Instructure. All rights reserved.
//
import UIKit
import XCTest
class CKIActivityStreamCollaborationItemTests: XCTestCase {
override func setUp() {
super.setUp()
... | mit |
terhechte/SourceKittenDaemon | Tests/SourceKittenDaemonTests/Fixtures/Sources/CompleteMethodFromFrameworkFixture.swift | 2 | 70 | import Foundation
import AVFoundation
let devices = AVCaptureDevice.
| mit |
novi/i2c-swift-example | Sources/I2CDeviceModule/SHT21.swift | 1 | 1397 | //
// SHT21.swift
// I2CDeviceModule
//
// Created by Yusuke Ito on 3/1/17.
// Copyright © 2017 Yusuke Ito. All rights reserved.
//
import Foundation
import I2C
public final class SHT21 {
public let address: UInt8
public let device: I2CDevice
public init(device: I2CDevice, address: UInt8 = 0x40) {
... | mit |
HasanEdain/NPCColorPicker | NPCColorPicker/NPCPaleteUtility.swift | 1 | 4578 | //
// NPCPaleteUtility.swift
// NPCColorPicker
//
// Created by Hasan D Edain and Andrew Bush on 12/6/15.
// Copyright © 2015-2017 NPC Unlimited. All rights reserved.
//
import UIKit
open class NPCPaleteUtility {
open static func twelveColorWheel()->[UIColor] {
let colorArray =
[NPCColorUtili... | mit |
ByteriX/BxInputController | BxInputController/Sources/Rows/Boolean/View/BxInputCheckRowBinder.swift | 1 | 1126 | /**
* @file BxInputCheckRowBinder.swift
* @namespace BxInputController
*
* @details Binder for check box row subclasses
* @date 17.03.2017
* @author Sergey Balalaev
*
* @version last in https://github.com/ByteriX/BxInputController.git
* @copyright The MIT License (MIT) https://opensource.org/licenses/MIT
* C... | mit |
LunaGao/cnblogs-Mac-Swift | CNBlogsForMac/WebApi/BaseWebApi.swift | 1 | 1904 | //
// BaseWebApi.swift
// CNBlogsForMac
//
// Created by Luna Gao on 15/11/16.
// Copyright © 2015年 gao.luna.com. All rights reserved.
//
import Foundation
class BaseWebApi : NSObject {
func basicRequest(callback:(String?)->Void){
let basicAuth = "Basic 这个值是根据ClientId和ClientSercret计算得来,这里隐藏"
... | mit |
therealglazou/quaxe-for-swift | quaxe/protocols/core/DOMString.swift | 1 | 226 | /**
* Quaxe for Swift
*
* Copyright 2016-2017 Disruptive Innovations
*
* Original author:
* Daniel Glazman <daniel.glazman@disruptive-innovations.com>
*
* Contributors:
*
*/
public typealias DOMString = String
| mpl-2.0 |
noppoMan/SwiftJNChatApp | Package.swift | 1 | 655 | import PackageDescription
let package = Package(
name: "SwiftJNChatApp",
targets: [
Target(name: "Config"),
Target(name: "Migration", dependencies: ["Config"]),
Target(name: "SwiftJNChatApp", dependencies: ["Config"])
],
dependencies: [
.Package(url: "https://github.com/... | mit |
q231950/appwatch | AppWatch/ViewControllers/TimeTableViewController.swift | 1 | 1268 | //
// TimeTableViewController.swift
// AppWatch
//
// Created by Martin Kim Dung-Pham on 25.08.15.
// Copyright © 2015 Martin Kim Dung-Pham. All rights reserved.
//
import AppKit
class TimeTableViewController: NSViewController {
@IBOutlet weak var collectionView: NSCollectionView!
override func ... | mit |
natecook1000/swift-compiler-crashes | crashes-duplicates/18378-swift-lexer-leximpl.swift | 11 | 308 | // 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 d {
deinit {
protocol e {
let b =
{
case
{
func c
{
if true {
class a {
class
case ,
let {
{
{
[ {
{
[ [ {
{
{
{
{
{
{
{
{
{ {
{
c
"
"
| mit |
praca-japao/156 | PMC156Inteligente/MyProfileTableViewController.swift | 1 | 3269 | //
// MyProfileTableViewController.swift
// PMC156Inteligente
//
// Created by Giovanni Pietrangelo on 11/29/15.
// Copyright © 2015 Sigma Apps. All rights reserved.
//
import UIKit
class MyProfileTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
... | gpl-2.0 |
albertinopadin/SwiftBreakout | Breakout/AppDelegate.swift | 1 | 2153 | //
// AppDelegate.swift
// Breakout
//
// Created by Albertino Padin on 10/26/14.
// Copyright (c) 2014 Albertino Padin. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, did... | gpl-2.0 |
tdscientist/ShelfView-iOS | Example/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift | 1 | 5571 | //
// ImageDataProvider.swift
// Kingfisher
//
// Created by onevcat on 2018/11/13.
//
// 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 the S... | mit |
therealbnut/swift | stdlib/public/SDK/Foundation/NSString.swift | 9 | 4420 | //===----------------------------------------------------------------------===//
//
// 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 |
Fenrikur/ef-app_ios | EurofurenceTests/Presenter Tests/Dealer Detail/Presenter Tests/WhenBindingAboutTheArtistComponent_DealerDetailPresenterShould.swift | 1 | 1348 | @testable import Eurofurence
import EurofurenceModel
import XCTest
class WhenBindingAboutTheArtistComponent_DealerDetailPresenterShould: XCTestCase {
func testBindTheArtistDescriptionOntoTheComponent() {
let aboutTheArtistViewModel = DealerDetailAboutTheArtistViewModel.random
let viewModel = FakeD... | mit |
grandiere/box | box/Metal/Texture/MetalTexture.swift | 1 | 1392 | import UIKit
import MetalKit
class MetalTexture
{
let totalFrames:Int
var currentFrame:Int
private var frameTick:Int
private let frames:[MTLTexture]
private let ticksPerFrame:Int
init(
ticksPerFrame:Int,
images:[UIImage],
textureLoader:MTKTextureLoader)
{
... | mit |
serieuxchat/SwiftySRP | SwiftySRP/SRPData+BigIntType.swift | 1 | 9367 | //
// SRPData+BigIntType.swift
// SwiftySRP
//
// Created by Sergey A. Novitsky on 20/03/2017.
// Copyright © 2017 Flock of Files. 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 dea... | mit |
jatiwn/geocore-tutorial-1 | Carthage/Checkouts/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift | 1 | 986 | import Foundation.NSNotification
import PromiseKit
/**
To import the `NSNotificationCenter` category:
use_frameworks!
pod "PromiseKit/Foundation"
Or `NSNotificationCenter` is one of the categories imported by the umbrella pod:
use_frameworks!
pod "PromiseKit"
And then in your sources:
impor... | apache-2.0 |
tokyovigilante/CesiumKit | CesiumKit/Core/EllipsoidGeodesic.swift | 1 | 14805 | //
// EllipsoidGeodesic.swift
// CesiumKit
//
// Created by Ryan Walklin on 2/11/2015.
// Copyright © 2015 Test Toast. All rights reserved.
//
import Foundation
/**
* Initializes a geodesic on the ellipsoid connecting the two provided planetodetic points.
*
* @alias EllipsoidGeodesic
* @constructor
*
* @par... | apache-2.0 |
sarahspins/Loop | Loop/Extensions/NSBundle.swift | 1 | 683 | //
// NSBundle.swift
// Loop
//
// Created by Nate Racklyeft on 7/28/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//
import Foundation
extension NSBundle {
var shortVersionString: String {
return objectForInfoDictionaryKey("CFBundleShortVersionString") as! String
}
var bund... | apache-2.0 |
3drobotics/SwiftIO | Sources/UDPChannel.swift | 1 | 9242 | //
// UDPMavlinkReceiver.swift
// SwiftIO
//
// Created by Jonathan Wight on 4/22/15.
//
// Copyright (c) 2014, Jonathan Wight
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * R... | mit |
jisudong/study | MyPlayground.playground/Pages/可选链式调用.xcplaygroundpage/Contents.swift | 1 | 1812 | //: [Previous](@previous)
import Foundation
class Person {
var residence: Residence?
}
class Residence {
var rooms = [Room]()
var address: Address?
var numberOfRooms: Int {
return rooms.count
}
subscript(i: Int) -> Room{
get {
return rooms[i]
}
set ... | mit |
STShenZhaoliang/Swift2Guide | Swift2Guide/Swift100Tips/Swift100Tips/ErrorController.swift | 1 | 3869 | //
// ErrorController.swift
// Swift100Tips
//
// Created by 沈兆良 on 16/5/30.
// Copyright © 2016年 ST. All rights reserved.
//
import UIKit
class ErrorController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let path = NSBundle.mainBundle().pathForResource("", ofType: ... | mit |
AaronMT/firefox-ios | Client/Frontend/AuthenticationManager/PagingPasscodeViewController.swift | 9 | 3110 | /* 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
private let PaneSwipeDuration: TimeInterval = 0.3
/// Base class for implementing a Passcode co... | mpl-2.0 |
heitorgcosta/Quiver | Quiver/Validating/Extensions/Validator+Misc.swift | 1 | 696 | //
// Validator+Misc.swift
// Quiver
//
// Created by Heitor Costa on 20/10/17.
// Copyright © 2017 Heitor Costa. All rights reserved.
//
import Foundation
// Misc Validators
public extension Validator {
static func required(message: String? = nil) -> Validator {
return RequiredValidator().with(messag... | mit |
rnystrom/GitHawk | Classes/Repository/RepositoryIssueSummaryModel+Filterable.swift | 1 | 699 | //
// RepositoryIssueSummaryModel+Filterable.swift
// Freetime
//
// Created by Ryan Nystrom on 10/14/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import Foundation
extension RepositoryIssueSummaryModel: Filterable {
func match(query: String) -> Bool {
if query.rangeOfCharacter(from:... | mit |
djq993452611/YiYuDaoJia_Swift | YiYuDaoJia/YiYuDaoJia/Classes/Main/Controller/BaseViewController.swift | 1 | 2249 | //
// BaseViewController.swift
// YiYuDaoJia
//
// Created by 蓝海天网Djq on 2017/4/25.
// Copyright © 2017年 蓝海天网Djq. All rights reserved.
//
import UIKit
class BaseViewController: UIViewController {
// MARK: 定义属性
var contentView : UIView?
var baseVM : BaseViewModel!
// MARK: 懒加载属性
filep... | mit |
adrfer/swift | validation-test/compiler_crashers_fixed/25512-swift-genericsignature-get.swift | 13 | 240 | // RUN: not %target-swift-frontend %s -parse
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
let c{{let c{class
case,
| apache-2.0 |
frootloops/swift | validation-test/Sema/type_checker_perf/slow/rdar35213699.swift | 1 | 359 | // RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
// REQUIRES: tools-release,no_asserts
func test() {
let x: UInt = 1 * 2 + 3 * 4 + 5 * 6 + 7 * 8 + 9 * 10 + 11 * 12 + 13 * 14
// expected-error@-1 {{expression was too complex to be solved in reasonable time; consider breaking up the express... | apache-2.0 |
piv199/LocalisysChat | LocalisysChat/Sources/Modules/Common/Chat/Views/Inputs/AutoTextView.swift | 1 | 5792 | //
// ALTextView.swift
// ALTextInputBar
//
// Created by Alex Littlejohn on 2015/04/24.
// Copyright (c) 2015 zero. All rights reserved.
//
import UIKit
public protocol AutoTextViewDelegate: UITextViewDelegate {
/**
Notifies the receiver of a change to the contentSize of the textView
The receiver is re... | unlicense |
olejnjak/KartingCoach | KartingCoach/Extensions/UICollectionViewExtensions.swift | 1 | 435 | //
// UICollectionViewExtensions.swift
// KartingCoach
//
// Created by Lukáš Hromadník on 14.09.17.
//
import UIKit
extension UICollectionView {
func dequeueCell<Cell: UICollectionViewCell>(for indexPath: IndexPath) -> Cell {
register(Cell.self, forCellWithReuseIdentifier: Cell.reuseIdentifier)
... | gpl-3.0 |
keygx/Swift-Helpers | Helpers/HelpersTests/PhotosHelperTests.swift | 1 | 4106 | //
// PhotosHelperTests.swift
// HelpersTests
//
// Created by keygx on 2015/08/05.
// Copyright (c) 2015年 keygx. All rights reserved.
//
import UIKit
import XCTest
import Photos
class PhotosHelperTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This meth... | mit |
n8armstrong/CalendarView | CalendarView/CalendarViewTests/CalendarViewTests.swift | 1 | 1469 | //
// CalendarViewTests.swift
// CalendarViewTests
//
// Created by Nate Armstrong on 10/12/15.
// Copyright © 2015 Nate Armstrong. All rights reserved.
//
import XCTest
@testable import CalendarView
import SwiftMoment
class CalendarViewTests: XCTestCase {
override func setUp() {
super.setUp()
... | mit |
khizkhiz/swift | validation-test/compiler_crashers_2_fixed/0007-rdar20750480.swift | 24 | 157 | // RUN: not %target-swift-frontend %s -parse
protocol X {
typealias R
}
extension Array : X {
}
let xs = [1,2,3]
func z<A: X>(A) {
}
let ys = z(xs)
| apache-2.0 |
parkboo/ios-charts | Charts/Classes/Data/CubicLineChartData.swift | 1 | 754 | //
// LineChartData.swift
// Charts
//
// Created by Daniel Cohen Gindi on 26/2/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
/// Data object that encapsu... | apache-2.0 |
te-th/xID3 | Tests/xID3Tests/WithFilesTests.swift | 1 | 1814 | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... | apache-2.0 |
duliodenis/HackingWithSwift | project-15/Animation/AnimationTests/AnimationTests.swift | 1 | 906 | //
// AnimationTests.swift
// AnimationTests
//
// Created by Dulio Denis on 2/27/15.
// Copyright (c) 2015 Dulio Denis. All rights reserved.
//
import UIKit
import XCTest
class AnimationTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is calle... | mit |
radex/swift-compiler-crashes | crashes-fuzzing/02635-swift-printingdiagnosticconsumer-handlediagnostic.swift | 11 | 237 | // 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 where f:V{
class C<T where S.e=c
struct A{
let:={
class C | mit |
naokits/my-programming-marathon | MapDirectionDemo/MapDirectionDemo/ViewController.swift | 1 | 517 | //
// ViewController.swift
// MapDirectionDemo
//
// Created by Naoki Tsutsui on 2/15/16.
// Copyright © 2016 Naoki Tsutsui. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading... | mit |
MarvinNazari/ICSPullToRefresh.Swift | ICSPullToRefresh/NVActivityIndicatorAnimationBallPulseRise.swift | 1 | 3984 | //
// NVActivityIndicatorAnimationBallPulseRise.swift
// NVActivityIndicatorViewDemo
//
// Created by Nguyen Vinh on 7/24/15.
// Copyright (c) 2015 Nguyen Vinh. All rights reserved.
//
import UIKit
class NVActivityIndicatorAnimationBallPulseRise: NVActivityIndicatorAnimationDelegate {
func setUpAnimation... | mit |
neotron/SwiftBot-Discord | DiscordAPI/Source/API/Utility/URLEndpoints.swift | 1 | 727 | //
// Created by David Hedbor on 2/12/16.
// Copyright (c) 2016 NeoTron. All rights reserved.
//
import Foundation
import Alamofire
enum URLEndpoint: String {
case Login = "auth/login",
Logout = "auth/logout",
Gateway = "gateway",
Channel = "channels",
User = "users"
}
class ... | gpl-3.0 |
vokal/Xcode-Template | Vokal-Swift.xctemplate/TokenStorageHelperTests.swift | 2 | 1934 | //
// ___FILENAME___
// ___PACKAGENAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
// ___COPYRIGHT___
//
import Foundation
import XCTest
import SwiftKeychainWrapper
@testable import ___PACKAGENAME___
class TokenStorageHelperTests: XCTestCase {
let testEmail = "iamatest@example.com"
let testToken... | mit |
vandadnp/chorizo | Chorizo/Playground.playground/section-1.swift | 1 | 84 | // Playground - noun: a place where people can play
import UIKit
import Foundation
| mit |
syoutsey/swift-corelibs-foundation | Foundation/NSScanner.swift | 2 | 23943 | // This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the l... | apache-2.0 |
chrisamanse/CryptoKit | Tests/CryptoKitTests/MD5Tests.swift | 1 | 1824 | //
// MD5Tests.swift
// MD5Tests
//
// Created by Chris Amanse on 29/08/2016.
//
//
import Foundation
import XCTest
@testable import CryptoKit
class MD5Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test... | mit |
MadAppGang/SmartLog | iOS/Pods/Dip/Sources/Register_swift2.swift | 3 | 2586 | //
// Dip
//
// Copyright (c) 2015 Olivier Halligon <olivier@halligon.net>
//
// 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 |
ResearchSuite/ResearchSuiteExtensions-iOS | Example/Pods/ResearchSuiteTaskBuilder/ResearchSuiteTaskBuilder/Classes/RSTBServiceLoader.swift | 1 | 510 | //
// RSTBServiceLoader.swift
// Pods
//
// Created by James Kizer on 1/9/17.
//
//
import UIKit
class RSTBServiceLoader<Proto> {
private var serviceProviders: [Proto]! = []
public func addService<T>(service: T) {
if let protoService = service as? Proto {
self.serviceProviders = se... | apache-2.0 |
MrAlek/PagedArray | Sources/PagedArray.swift | 1 | 6848 | //
// PagedArray.swift
//
// Created by Alek Åström on 2015-02-14.
// Copyright (c) 2015 Alek Åström. (https://github.com/MrAlek)
//
// 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... | mit |
SimonLYU/Swift-Transitioning | highGo2/LYUMainNAV.swift | 1 | 270 | //
// LYUMainNAV.swift
// highGo2
//
// Created by 吕旭明 on 16/8/4.
// Copyright © 2016年 lyu. All rights reserved.
//
import UIKit
class LYUMainNAV: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
}
}
| mit |
danielsaidi/Vandelay | VandelayDemo/ViewController.swift | 1 | 2514 | //
// ViewController.swift
// VandelayExample
//
// Created by Daniel Saidi on 2018-09-12.
// Copyright © 2018 Daniel Saidi. All rights reserved.
//
import UIKit
import Vandelay
class ViewController: UITableViewController {
// MARK: - View lifecycle
override func viewWillAppear(_ animated: ... | mit |
xuzhuoyi/EmbControl | embcontrol/yudpsocket.swift | 1 | 6170 | /*
Copyright (c) <2014>, skysent
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 and the following discla... | gpl-3.0 |
haldun/MapleBacon | MapleBaconExample/MapleBaconExample/ImageManagerExample.swift | 2 | 2419 | //
// Copyright (c) 2015 Zalando SE. All rights reserved.
//
import UIKit
import MapleBacon
class ImageCell: UICollectionViewCell {
@IBOutlet weak var imageView: UIImageView?
override func prepareForReuse() {
self.imageView?.image = nil
}
}
class ImageExampleViewController: UICollectionViewCont... | mit |
soffes/RateLimit | RateLimit/SyncLimiter.swift | 2 | 403 | //
// SyncLimiter.swift
// RateLimit
//
// Created by Sam Soffes on 10/20/16.
// Copyright © 2016 Sam Soffes. All rights reserved.
//
public protocol SyncLimiter {
@discardableResult func execute(_ block: () -> Void) -> Bool
func reset()
}
extension SyncLimiter {
public func execute<T>(_ block: () -> T) -> T?... | mit |
anthonyqz/CQZContactManger | project/CQZContactMangerTests/CQZContactMangerTests.swift | 1 | 1004 | //
// CQZContactMangerTests.swift
// CQZContactMangerTests
//
// Created by Christian Quicano on 3/18/17.
// Copyright © 2017 ca9z. All rights reserved.
//
import XCTest
@testable import CQZContactManger
class CQZContactMangerTests: XCTestCase {
override func setUp() {
super.setUp()
// Pu... | mit |
spitzgoby/Tunits | Pod/Classes/TimeUnit+DateTraversal.swift | 1 | 22034 | //
// TimeUnit+DateTraversal.swift
// Pods
//
// Created by Tom on 12/27/15.
//
// 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 rig... | mit |
stephentyrone/swift | test/Driver/PrivateDependencies/Inputs/one-way-external-fine/other.swift | 29 | 1898 | # Fine-grained v0
---
allNodes:
- key:
kind: sourceFileProvide
aspect: interface
context: ''
name: other.swiftdeps
fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba
sequenceNumber: 0
defsIDependUpon: [ 6, 7, 2, 5, 4 ]
isProvides: tru... | apache-2.0 |
Chaosspeeder/YourGoals | YourGoalsTests/Business/TaskProgressCalculatorTests.swift | 1 | 3652 | //
// TaskProgressCalculatorTests.swift
// YourGoalsTests
//
// Created by André Claaßen on 27.09.18.
// Copyright © 2018 André Claaßen. All rights reserved.
//
import XCTest
import CoreData
@testable import YourGoals
class TaskProgressCalculatorTests: StorageTestCase {
func testCalculateProgressOnGoal()... | lgpl-3.0 |
iosdevelopershq/code-challenges | CodeChallenge/Challenges/LetterCombinationsOfPhoneNumber/LetterCombinationsOfPhoneNumberChallenge.swift | 1 | 1597 | //
// LetterCombinationsOfPhoneNumberChallenge.swift
// CodeChallenge
//
// Created by Ryan Arana on 11/1/15.
// Copyright © 2015 iosdevelopers. All rights reserved.
//
import Foundation
/**
https://leetcode.com/problems/letter-combinations-of-a-phone-number/
Letter Combinations of a Phone Number
Given a digit s... | mit |
caynan/Horus | Sources/Helpers/StringHelper.swift | 2 | 507 | //
// StringHelper.swift
// Horus
//
// Created by Caynan Sousa on 6/29/17.
// Copyright © 2017 Caynan. All rights reserved.
//
import Foundation
extension String {
/// Check the if string is a valid hexadecimal.
///
/// - Returns: `true` if string is a valid hexadecimal; false otherwise.
func isH... | mit |
WhiskerzAB/PlaygroundTDD | PlaygroundTDD.playground/Sources/Core/Loggable.swift | 1 | 987 | //
// Loggable.swift
// TDD Example
//
// Created by Gabriel Peart 08/11/16.
// Copyright (c) 2016 Whiskerz AB. All rights reserved.
//
public protocol Loggable {
var verbosity: Verbosity { get set }
func log(message: String)
}
public struct Logger: Loggable {
public var verbosity: Verbosity
... | mit |
milseman/swift | stdlib/public/core/Reverse.swift | 10 | 19479 | //===--- Reverse.swift - Sequence and collection reversal -----------------===//
//
// 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 |
psartzetakis/JRKeyboardManagerKit | Example/Sources/AppDelegate.swift | 1 | 2211 | //
// AppDelegate.swift
// KeyboardManagerExample
//
// Created by Panagiotis Sartzetakis on 22/11/2016.
// Copyright © 2016 Panagiotis Sartzetakis. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ a... | mit |
skedgo/tripkit-ios | Sources/TripKit/model/API/LocationAPIModel.swift | 1 | 12686 | //
// TKHelperTypes.swift
// TripKit
//
// Created by Adrian Schoenig on 28/10/16.
// Copyright © 2016 SkedGo. All rights reserved.
//
import Foundation
import CoreLocation
protocol RealTimeUpdatable {
var hasRealTime: Bool { get }
}
extension TKAPI {
public struct BikePodInfo: Codable, Hashable, RealTime... | apache-2.0 |
brightify/Bond | BondTests/PerformanceTests.swift | 1 | 1299 | //
// PerformanceTests.swift
// Bond
//
// Created by Ivan Moskalev on 19.06.15.
// Copyright (c) 2015 Bond. All rights reserved.
//
import XCTest
import Bond
class BondPerformanceTests: XCTestCase {
func testBindPerformance() {
let dynamicInt = Dynamic<Int>(0)
let intBond = Bond<Int>({ value in })
... | mit |
fluidsonic/JetPack | Sources/UI/DispatchQueue+UI.swift | 1 | 113 | import Dispatch
public func assert(queue: DispatchQueue) {
dispatchPrecondition(condition: .onQueue(queue))
}
| mit |
franklinsch/usagi | iOS/usagi-iOS/usagi-iOS/AddTaskTableViewController.swift | 1 | 4095 | //
// AddTaskTableViewController.swift
// usagi-iOS
//
// Created by Franklin Schrans on 31/01/2016.
// Copyright © 2016 Franklin Schrans. All rights reserved.
//
import UIKit
class AddTaskTableViewController: UITableViewController {
var projectName: String?
var tasks = [Project]()
override func... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.