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 |
|---|---|---|---|---|---|
audiokit/AudioKit | Tests/AudioKitTests/Node Tests/Effects Tests/Filter Tests/HighShelfFilterTests.swift | 2 | 1117 | // Copyright AudioKit. All Rights Reserved. Revision History at http://github.com/AudioKit/AudioKit/
import AudioKit
import XCTest
class HighShelfFilterTests: XCTestCase {
func testDefault() {
let engine = AudioEngine()
let input = Oscillator()
engine.output = HighShelfFilter(input)
... | mit |
maxim-pervushin/Overlap | Overlap/App/View Controllers/TimezonePicker/TimezonePickerViewController.swift | 1 | 3679 | //
// TimeZonePickerViewController.swift
// Overlap
//
// Created by Maxim Pervushin on 01/05/16.
// Copyright © 2016 Maxim Pervushin. All rights reserved.
//
import UIKit
class TimeZonePickerViewController: UIViewController {
// MARK: @IB
@IBOutlet weak var tableView: UITableView?
@IBOutlet weak va... | mit |
ainopara/Stage1st-Reader | Stage1st/Manager/Navigation/S1Animator.swift | 1 | 6384 | //
// S1Animator.swift
// Stage1st
//
// Created by Zheng Li on 5/14/16.
// Copyright © 2016 Renaissance. All rights reserved.
//
import UIKit
import CocoaLumberjack
class S1Animator: NSObject, UIViewControllerAnimatedTransitioning {
enum Direction: Int {
case push
case pop
}
let direc... | bsd-3-clause |
mbigatti/ImagesGenerator | ImagesGenerator/AppDelegate.swift | 1 | 529 | //
// AppDelegate.swift
// ImagesGenerator
//
// Created by Massimiliano Bigatti on 19/06/15.
// Copyright © 2015 Massimiliano Bigatti. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
/*
func application(applicatio... | mit |
ainopara/Stage1st-Reader | Stage1st/Manager/Parser.swift | 1 | 3641 | //
// Parser.swift
// Stage1st
//
// Created by Zheng Li on 2019/3/9.
// Copyright © 2019 Renaissance. All rights reserved.
//
import Foundation
enum Parser {
static func extractTopic(from urlString: String) -> S1Topic? {
// Current Html Scheme
let result1 = S1Global.regexExtract(from: urlSt... | bsd-3-clause |
tensorflow/swift-models | Gym/PPO/Categorical.swift | 1 | 4105 | // Copyright 2020 The TensorFlow Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b... | apache-2.0 |
CodePath2017Group4/travel-app | RoadTripPlanner/TripReviewViewController.swift | 1 | 785 | //
// TripReviewViewController.swift
// RoadTripPlanner
//
// Created by Diana Fisher on 10/30/17.
// Copyright © 2017 RoadTripPlanner. All rights reserved.
//
import UIKit
class TripReviewViewController: UIViewController {
static func storyboardInstance() -> TripReviewViewController? {
let storyboar... | mit |
pyconjp/pyconjp-ios | PyConJP/View/UITableViewCell/StaffTableViewCell.swift | 1 | 1844 | //
// StaffTableViewCell.swift
// PyConJP
//
// Created by Yutaro Muta on 9/10/16.
// Copyright © 2016 PyCon JP. All rights reserved.
//
import UIKit
class StaffTableViewCell: UITableViewCell {
@IBOutlet weak var nameLabel: UILabel!
@IBOutlet weak var roleLabel: UILabel!
@IBOutlet weak var facebo... | mit |
apple/swift | test/ModuleInterface/concurrency.swift | 7 | 1434 | // RUN: %empty-directory(%t)
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -enable-experimental-concurrency -DLIBRARY -module-name Library
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -enable-experimental-concurrency
// REQUIRES: concurrency
#if LIBRARY
... | apache-2.0 |
kaojohnny/CoreStore | Sources/Observing/SectionBy.swift | 1 | 3001 | //
// SectionBy.swift
// CoreStore
//
// Copyright © 2015 John Rommel Estropia
//
// 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 th... | mit |
cnoon/swift-compiler-crashes | fixed/01605-swift-protocoltype-canonicalizeprotocols.swift | 11 | 216 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
protocol B:b{func^(a!func
protocol b{protocol a | mit |
VirrageS/TDL | TDL/DetailTagViewController.swift | 1 | 4121 | import UIKit
class DetailTagViewController: UITableViewController, SlideNavigationControllerDelegate {
var detailTagTasks = [Task]()
var tag: Tag?
func shouldDisplayMenu() -> Bool {
return false
}
init(tag: Tag) {
super.init(nibName: nil, bundle: nil)
title = tag.n... | mit |
cloudinary/cloudinary_ios | Cloudinary/Classes/Core/Features/CacheSystem/StorehouseLibrary/Core/Warehouse.swift | 1 | 5628 | //
// Warehouse.swift
//
// Copyright (c) 2020 Cloudinary (http://cloudinary.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation ... | mit |
n-miyo/ViewSizeChecker | ViewSizeChecker/ViewController.swift | 1 | 4407 | // -*- mode:swift -*-
import UIKit
class ViewController: UITableViewController {
@IBOutlet weak var displayScaleLabel: UILabel!
@IBOutlet weak var horizontalSizeLabel: UILabel!
@IBOutlet weak var verticalSizeLabel: UILabel!
@IBOutlet weak var screenScaleLabel: UILabel!
@IBOutlet weak var screenNa... | mit |
Akagi201/learning-ios | swift/ios/Helloworld/Helloworld/AppDelegate.swift | 1 | 2411 | //
// AppDelegate.swift
// Helloworld
//
// Created by Bob Liu on 6/18/15.
// Copyright © 2015 Akagi201. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingW... | mit |
antonio081014/LeetCode-CodeBase | Swift/expression-add-operators.swift | 1 | 1185 | class Solution {
func addOperators(_ num: String, _ target: Int) -> [String] {
var result = [String]()
let num = Array(num)
func dfs(_ path: String, _ currentIndex: Int, _ value: Int, _ lastValue: Int) {
if currentIndex == num.count {
if value ==... | mit |
ProfileCreator/ProfileCreator | ProfileCreator/ProfileCreator/Profile Editor TableView CellView Items/PayloadCellViewItemComboBox.swift | 1 | 773 | //
// PayloadCellViewItemPopUpButton.swift
// ProfileCreator
//
// Created by Erik Berglund.
// Copyright © 2018 Erik Berglund. All rights reserved.
//
import Cocoa
class EditorComboBox {
class func withTitles(titles: [String],
cellView: NSComboBoxDelegate) -> NSComboBox {
... | mit |
mcgraw/dojo-testing | dojo-testingTests/dojo_testingTests.swift | 1 | 739 | //
// dojo_testingTests.swift
// dojo-testingTests
//
// Created by David McGraw on 1/19/15.
// Copyright (c) 2015 David McGraw. All rights reserved.
//
import UIKit
import XCTest
class dojo_testingTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This meth... | mit |
away4m/Vendors | Vendors/Extensions/Optional.swift | 1 | 3911 | //
// Optional.swift
// Pods
//
// Created by ALI KIRAN on 3/26/17.
//
//
import Foundation
// https://github.com/RuiAAPeres/OptionalExtensions
public extension Optional {
/// SwifterSwift: Get self of default value (if self is nil).
///
/// let foo: String? = nil
/// print(foo.unwrapp... | mit |
zisko/swift | test/ClangImporter/static_inline.swift | 1 | 754 | // RUN: %empty-directory(%t)
// Check if SIL printing+parsing of a clang imported function works.
// RUN: %target-swift-frontend -parse-as-library -module-name=test -emit-sil %s -import-objc-header %S/Inputs/static_inline.h -o %t/test.sil
// RUN: %FileCheck < %t/test.sil %s
// RUN: %target-swift-frontend -parse-as-li... | apache-2.0 |
JC-Hu/ColorExpert | Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/RingBuffer.swift | 1 | 2808 | // Copyright 2021 Google 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 ... | mit |
hooman/swift | stdlib/public/core/ArrayShared.swift | 5 | 13295 | //===--- ArrayShared.swift ------------------------------------*- swift -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 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 |
tmd2013/iOSDesignPatternSwift | observer-swift/observer-swiftTests/observer_swiftTests.swift | 1 | 995 | //
// observer_swiftTests.swift
// observer-swiftTests
//
// Created by nonoking on 2017/6/5.
// Copyright © 2017年 nonoking. All rights reserved.
//
import XCTest
@testable import observer_swift
class observer_swiftTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup cod... | apache-2.0 |
pkl728/ZombieInjection | ZombieInjectionTests/ZombieServiceTests.swift | 1 | 2388 | //
// ZombieServiceTests.swift
// ZombieInjection
//
// Created by Patrick Lind on 7/27/16.
// Copyright © 2016 Patrick Lind. All rights reserved.
//
import XCTest
import Bond
@testable import ZombieInjection
class ZombieServiceTests: XCTestCase {
private var zombieRepository: ZombieRepositoryProtocol!
p... | mit |
kaishin/ImageScout | Sources/ImageScout/SessionDelegate.swift | 1 | 539 | import Foundation
class SessionDelegate: NSObject, URLSessionDataDelegate {
weak var scout: ImageScout?
func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
guard let scout = scout else { return }
scout.didReceive(data: data, task: dataTask)
}
func urlSess... | mit |
moltin/ios-sdk | Sources/SDK/Requests/MoltinRequest.swift | 1 | 11760 | //
// MoltinRequest.swift
// moltin
//
// Created by Craig Tweedy on 21/02/2018.
//
import Foundation
enum HTTPMethod: String, CustomStringConvertible {
var description: String {
return self.rawValue
}
case GET
case POST
case PUT
case DELETE
}
/// Boxes up results into success or ... | mit |
bugfender/BugfenderSDK-iOS-swift-sample | BugfenderSDK-iOS-swift-sample/AppDelegate.swift | 1 | 2896 | //
// AppDelegate.swift
// Bugfender sample
//
// Created by gimix on 07/05/15.
// Copyright (c) 2015 Bugfender. All rights reserved.
//
import UIKit
import BugfenderSDK
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApp... | apache-2.0 |
SwiftMN/SwiftMN | Sources/App/Controllers/TalkController.swift | 1 | 3575 | //
// TalkController.swift
// App
//
// Created by Steven Vlaminck on 10/24/17.
//
import Vapor
import HTTP
/// Here we have a controller that helps facilitate
/// RESTful interactions with our Talks table
final class TalkController: ResourceRepresentable {
/// When users call 'GET' on '/talks'
/// it sho... | mit |
jngd/advanced-ios10-training | T2E02/T2E02/AppDelegate.swift | 1 | 2065 | //
// AppDelegate.swift
// T2E02
//
// Created by jngd on 23/01/2017.
// Copyright © 2017 jngd. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions la... | apache-2.0 |
crepashok/The-Complete-Watch-OS2-Developer-Course | Section-13/Producitivity Timer/Producitivity TimerUITests/Producitivity_TimerUITests.swift | 1 | 1282 | //
// Producitivity_TimerUITests.swift
// Producitivity TimerUITests
//
// Created by Pavlo Cretsu on 4/20/16.
// Copyright © 2016 Pasha Cretsu. All rights reserved.
//
import XCTest
class Producitivity_TimerUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put s... | gpl-3.0 |
crashoverride777/Swift2-iAds-AdMob-CustomAds-Helper | SwiftyAd/SwiftyAdConsentManager.swift | 2 | 10561 | // The MIT License (MIT)
//
// Copyright (c) 2015-2018 Dominik Ringler
//
// 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 t... | mit |
coolshubh4/iOS-Demos | TextFieldChallenge/TextFieldChallenge/ZipCodeDelegate.swift | 1 | 726 | //
// ZipCodeDelegate.swift
// TextFieldChallenge
//
// Created by Shubham Tripathi on 13/07/15.
// Copyright (c) 2015 Shubham Tripathi. All rights reserved.
//
import Foundation
import UIKit
class ZipCodeDelegate: NSObject, UITextFieldDelegate {
func textField(textField: UITextField, shouldChangeCharact... | mit |
Mindera/Alicerce | Tests/AlicerceTests/Extensions/UIKit/NSDirectionalEdgeInsetsTestCase.swift | 1 | 411 | import XCTest
import UIKit
@testable import Alicerce
@available(iOS 11.0, *)
final class NSDirectionalEdgeInsetsTestCase: XCTestCase {
func test_nonDirectional_ShouldReturnInstanceWithCorrectValues() {
XCTAssertEqual(
NSDirectionalEdgeInsets(top: 1, leading: 2, bottom: 3, trailing: 4).nonDir... | mit |
waterskier2007/NVActivityIndicatorView | NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRipple.swift | 1 | 3210 | //
// NVActivityIndicatorAnimationBallScaleRipple.swift
// NVActivityIndicatorViewDemo
//
// The MIT License (MIT)
// Copyright (c) 2016 Vinh Nguyen
// 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 ... | mit |
goRestart/restart-backend-app | Sources/API/Application/Error/Generic/MissingParameters.swift | 1 | 155 | final class MissingParameters: ResponseError {
static let error = make(with: .badRequest, code: 5, message: "Invalid request, missing parameter(s)")
}
| gpl-3.0 |
carabina/AmazonS3RequestManager | AmazonS3RequestManager/AmazonS3RequestManager.swift | 1 | 15851 | //
// AmazonS3RequestManager.swift
// AmazonS3RequestManager
//
// Based on `AFAmazonS3Manager` by `Matt Thompson`
//
// Created by Anthony Miller. 2015.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
//... | mit |
JackLeeMing/PocketSVG | PocketSVG iOS Example/PocketSVG iOS ExampleTests/PocketSVG_iOS_ExampleTests.swift | 3 | 942 | //
// PocketSVG_iOS_ExampleTests.swift
// PocketSVG iOS ExampleTests
//
// Created by Ariel Elkin on 08/03/2015.
// Copyright (c) 2015 Arielito. All rights reserved.
//
import UIKit
import XCTest
class PocketSVG_iOS_ExampleTests: XCTestCase {
override func setUp() {
super.setUp()
// Put s... | mit |
vanyaland/Popular-Movies | iOS/PopularMovies/PopularMovies/MovieDateUtils.swift | 1 | 1804 | /**
* Copyright (c) 2016 Ivan Magda
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish... | mit |
prolificinteractive/Optik | Optik/Classes/ImageViewController.swift | 1 | 9956 | //
// ImageViewController.swift
// Optik
//
// Created by Htin Linn on 5/5/16.
// Copyright © 2016 Prolific Interactive. All rights reserved.
//
import UIKit
/// View controller for displaying a single photo.
internal final class ImageViewController: UIViewController {
fileprivate struct Constants {
... | mit |
practicalswift/swift | test/PrintAsObjC/availability-real-sdk.swift | 36 | 9681 | // RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t %s
// RUN: %target-swift-frontend -parse-as-library %t/availability-real-sdk.swiftmodule -typecheck -emit-objc-header-path %t/availability-real-sdk.h -import-objc-header %S/../Inputs/empty.h
// RUN: %FileCheck %s < %t/availability-real-sdk.h... | apache-2.0 |
avtr/bluejay | Bluejay/Bluejay/WriteResult.swift | 1 | 458 | //
// WriteResult.swift
// Bluejay
//
// Created by Jeremy Chiang on 2017-01-05.
// Copyright © 2017 Steamclock Software. All rights reserved.
//
import Foundation
/// Indicates a successful, cancelled, or failed write attempt.
public enum WriteResult {
/// The write is successful.
case success
/// Th... | mit |
mightydeveloper/swift | validation-test/compiler_crashers_fixed/0354-swift-modulefile-maybereadpattern.swift | 13 | 398 | // 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
false
func f<r>() -> (r, r -> r) -> r {
f r f.j = {
r) {
}
protocol j {
}
}
return { rray<T>) {
}
}, e)
c... | apache-2.0 |
HongxiangShe/STV | STV/STV/Classes/Base/Model/BaseModel.swift | 1 | 484 | //
// BaseModel.swift
// SHXPageView
//
// Created by 佘红响 on 2017/6/12.
// Copyright © 2017年 she. All rights reserved.
//
import UIKit
class BaseModel: NSObject {
override init() {
super.init()
}
init(_ dict: [String: Any]) {
super.init()
setValuesForKeys(dict)
}
... | apache-2.0 |
drmohundro/Nimble | Nimble/Matchers/BeGreaterThan.swift | 1 | 1425 | import Foundation
public func beGreaterThan<T: Comparable>(expectedValue: T?) -> MatcherFunc<T?> {
return MatcherFunc { actualExpression, failureMessage in
failureMessage.postfixMessage = "be greater than <\(expectedValue)>"
return actualExpression.evaluate() > expectedValue
}
}
public func be... | apache-2.0 |
stefanoa/Spectrogram | Spectogram/fft.playground/Contents.swift | 1 | 1598 | import UIKit
import Accelerate
func sqrtq(_ x: [Float]) -> [Float] {
var results = [Float](repeating: 0.0, count: x.count)
vvsqrtf(&results, x, [Int32(x.count)])
return results
}
let sliceSize = 128
var inputSlice = [Float](repeating: 0, count: sliceSize)
var window = [Float](repeating: 0, count: sl... | mit |
kripple/bti-watson | ios-app/Carthage/Checkouts/AlamofireObjectMapper/Carthage/Checkouts/ObjectMapper/Carthage/Checkouts/Nimble/Nimble/Adapters/NimbleXCTestHandler.swift | 147 | 1532 | import Foundation
import XCTest
/// Default handler for Nimble. This assertion handler passes failures along to
/// XCTest.
public class NimbleXCTestHandler : AssertionHandler {
public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) {
if !assertion {
XCTFail("\(m... | mit |
cherrythia/FYP | BarInsertVariables.swift | 1 | 6206 | //
// BarInsertVariables.swift
// FYP Table
//
// Created by Chia Wei Zheng Terry on 1/3/15.
// Copyright (c) 2015 Chia Wei Zheng Terry. All rights reserved.
//
import UIKit
import CoreData
class BarInsertVariables: UIViewController {
@IBOutlet weak var arrowOutlet: ForceArrow!
@IBOutlet weak var leftLab... | mit |
netguru/inbbbox-ios | Inbbbox/Source Files/Collection View Layouts/TwoColumnsCollectionViewFlowLayout.swift | 1 | 2599 | //
// TwoColumnsCollectionViewFlowLayout.swift
// Inbbbox
//
// Created by Aleksander Popko on 25.01.2016.
// Copyright © 2016 Netguru Sp. z o.o. All rights reserved.
//
import UIKit
class TwoColumnsCollectionViewFlowLayout: UICollectionViewFlowLayout {
var itemHeightToWidthRatio = CGFloat(1)
var contain... | gpl-3.0 |
threefoldphotos/VWWAnnotationFanoutView | VWWAnnotationFanoutViewExampleSwift/HotelAnnotation.swift | 2 | 132 | //
// HotelAnnotation.swift
//
//
// Created by Zakk Hoyt on 6/16/15.
//
//
import Cocoa
class HotelAnnotation: NSObject {
}
| apache-2.0 |
sergiog90/PagedUITableViewController | PagedUITableViewControllerExample/PagedUITableViewControllerExample/AppDelegate.swift | 1 | 445 | //
// AppDelegate.swift
// PagedUITableViewControllerExample
//
// Created by Sergio Garcia on 23/9/16.
// Copyright © 2016 Sergio Garcia. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: U... | mit |
austinzheng/swift | validation-test/compiler_crashers_fixed/00234-llvm-foldingset-swift-genericfunctiontype-nodeequals.swift | 65 | 4246 | // 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 |
yaobanglin/viossvc | viossvc/General/Helper/ChatSessionHelper.swift | 1 | 5045 | //
// ChatSessionHelper.swift
// viossvc
//
// Created by yaowang on 2016/12/3.
// Copyright © 2016年 com.yundian. All rights reserved.
//
import UIKit
protocol ChatSessionsProtocol : NSObjectProtocol {
func updateChatSessions(chatSession:[ChatSessionModel])
}
protocol ChatSessionProtocol : NSObjectProtocol {... | apache-2.0 |
jakerockland/Swisp | Sources/SwispFramework/Environment/Environment.swift | 1 | 4170 | //
// Environment.swift
// SwispFramework
//
// MIT License
//
// Copyright (c) 2018 Jake Rockland (http://jakerockland.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
// witho... | mit |
aroyarexs/PASTA | Example/Pods/Metron/Metron/Classes/Extensions/CGRectEdge.swift | 1 | 1060 | import CoreGraphics
extension CGRectEdge : Opposable {
public static var allOpposites: [(CGRectEdge, CGRectEdge)] {
return [(.minXEdge, .maxXEdge), (.minYEdge, .maxYEdge)]
}
}
extension CGRectEdge : EdgeType {
public typealias CornerType = Corner
public var corners: (CornerType, Corn... | mit |
aestesis/Aether | Sources/Aether/Foundation/Future.swift | 1 | 14195 | //
// Future.swift
// Aether
//
// Created by renan jegouzo on 29/03/2016.
// Copyright © 2016 aestesis. 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
//
// ... | apache-2.0 |
SmallElephant/FESwiftDemo | 13-DashLine/13-DashLine/ViewController.swift | 1 | 5614 | //
// ViewController.swift
// 13-DashLine
//
// Created by keso on 2017/3/26.
// Copyright © 2017年 FlyElephant. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, ty... | mit |
abelsanchezali/ViewBuilder | Source/Layout/View/ManualLayoutHelper.swift | 1 | 1530 | //
// ManualLayoutHelper.swift
// ViewBuilder
//
// Created by Abel Sanchez on 8/13/16.
// Copyright © 2016 Abel Sanchez. All rights reserved.
//
import UIKit
extension CGFloat {
public static let largeValue: CGFloat = 100000000
}
open class ManualLayoutHelper: NSObject {
open class func linearLayout(_ ... | mit |
apple/swift-syntax | Tests/SwiftParserTest/translated/ObjcEnumTests.swift | 1 | 1997 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 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 |
blue42u/swift-t | stc/tests/349-multidimensional-10.swift | 4 | 562 |
(int ret) f (int x) {
ret = x - 1;
}
() printArrays (int X[], int xoff,
int Y[], int yoff) {
trace(X[0+xoff], X[1+xoff], X[2+xoff], X[3+xoff],
Y[0+yoff], Y[1+yoff], Y[2+yoff], Y[3+yoff]);
}
main {
int M[][];
int M1[];
int M2[];
M[0] = M1;
M[1] = M2;
M1[2... | apache-2.0 |
merlos/iOS-Open-GPX-Tracker | OpenGpxTracker/UIColor+Keyboard.swift | 1 | 787 | //
// UIColor+Keyboard.swift
// OpenGpxTracker
//
// Created by Vincent Neo on 17/4/20.
//
import UIKit
/// For `DateFieldTypeView`. Meant to match default keyboard colors.
extension UIColor {
/// Default Light Appearance Keyboard
static let lightKeyboard = UIColor(red: 209/255, green: 213/255, blue: 219/2... | gpl-3.0 |
eigengo/best-intentions | ios/BestIntentionsFramework/Model.swift | 1 | 1255 | /*
* Best Intentions
* Copyright (C) 2016 Jan Machacek
*
* 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.
*
* Th... | gpl-3.0 |
danlozano/Requestr | Example/TinyApiClientExample/AppDelegate.swift | 1 | 2195 | //
// AppDelegate.swift
// TinyApiClientExample
//
// Created by Daniel Lozano Valdés on 11/29/16.
// Copyright © 2016 danielozano. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApp... | mit |
tjw/swift | test/IRGen/objc_properties_imported.swift | 2 | 1014 | // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-source-import -emit-ir -o - -primary-file %s | %FileCheck %s
// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop
// FIXME: This test uses IRGen with -enable-source-import; it may fail with -g.
import Properties
// CHECK: @_INSTANCE_METHODS__TtC24ob... | apache-2.0 |
Limon-O-O/Lego | Modules/Door/Door/Services/DoorUserDefaults.swift | 1 | 1594 | //
// DoorUserDefaults.swift
// Door
//
// Created by Limon on 27/02/2017.
// Copyright © 2017 Limon.F. All rights reserved.
//
import Foundation
import LegoContext
struct DoorUserDefaults {
fileprivate static let defaults = UserDefaults(suiteName: "top.limon.door")!
private init() {}
static func s... | mit |
modnovolyk/MAVLinkSwift | Sources/Data96ArdupilotmegaMsg.swift | 1 | 1141 | //
// Data96ArdupilotmegaMsg.swift
// MAVLink Protocol Swift Library
//
// Generated from ardupilotmega.xml, common.xml, uAvionix.xml on Tue Jan 17 2017 by mavgen_swift.py
// https://github.com/modnovolyk/MAVLinkSwift
//
import Foundation
/// Data packet, size 96
public struct Data96 {
/// data type
public le... | mit |
kaojohnny/CoreStore | Sources/ObjectiveC/CSOrderBy.swift | 1 | 3767 | //
// CSOrderBy.swift
// CoreStore
//
// Copyright © 2016 John Rommel Estropia
//
// 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 th... | mit |
williamFalcon/Bolt_Swift | Source/NSDictionary/NSDictionary.swift | 2 | 692 | //
// NSDictionary.swift
// Poké Prism
//
// Created by William Falcon on 7/22/16.
// Copyright © 2016 William Falcon. All rights reserved.
//
import UIKit
public extension NSDictionary {
class func _jsonFromFileName(name:String) -> AnyObject? {
let masterDataUrl: NSURL = NSBundle.mainBundle()... | mit |
itsaboutcode/WordPress-iOS | WordPress/Classes/System/3DTouch/WP3DTouchShortcutCreator.swift | 1 | 8762 | import UIKit
import WordPressAuthenticator
public protocol ApplicationShortcutsProvider {
var shortcutItems: [UIApplicationShortcutItem]? { get set }
var is3DTouchAvailable: Bool { get }
}
extension UIApplication: ApplicationShortcutsProvider {
@objc public var is3DTouchAvailable: Bool {
return m... | gpl-2.0 |
amnuaym/TiAppBuilder | Day1/MyFirstiOSApp/MyFirstiOSApp/ViewController.swift | 1 | 503 | //
// ViewController.swift
// MyFirstiOSApp
//
// Created by Amnuay M on 8/7/17.
// Copyright © 2017 Amnuay M. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typ... | gpl-3.0 |
colbylwilliams/bugtrap | iOS/Code/Swift/bugTrap/bugTrapKit/Services/Protocols/Stringable.swift | 1 | 314 | //
// Stringable.swift
// bugTrap
//
// Created by Nate Rickard on 9/10/14.
// Copyright (c) 2014 bugTrap. All rights reserved.
//
import Foundation
protocol Stringable {
var string: String { get }
// func toString() -> String
}
extension String : Stringable {
var string: String {
return self
}
} | mit |
ethan605/dev-with-ethan | assets/media/snippets/posts/2016-06-30/swift-3.swift | 1 | 268 | var optionalInt: Int? = nil
print(optionalInt!) // fatal error: unexpectedly found nil while unwrapping an Optional value
optionalInt = 10
print(optionalInt!) // 10
"optionalInt = \(optionalInt)" // "optionalInt = 10"
| mit |
rb-de0/Fluxer | Sources/Flux/Action.swift | 1 | 155 | //
// Action.swift
// Fluxer
//
// Created by rb_de0 on 2017/03/21.
// Copyright © 2017年 rb_de0. All rights reserved.
//
public protocol Action {}
| mit |
krzysztofzablocki/Sourcery | SourceryRuntime/Sources/FileParserResult.swift | 1 | 4507 | //
// FileParserResult.swift
// Sourcery
//
// Created by Krzysztof Zablocki on 11/01/2017.
// Copyright © 2017 Pixle. All rights reserved.
//
import Foundation
// sourcery: skipJSExport
/// :nodoc:
@objcMembers public final class FileParserResult: NSObject, SourceryModel {
public let path: String?
public... | mit |
uhnmdi/CCContinuousGlucose | CCContinuousGlucose/Classes/ContinuousGlucoseSOCP.swift | 1 | 5096 | //
// ContinuousGlucoseSOCP.swift
// Pods
//
// Created by Kevin Tallevi on 4/19/17.
//
// https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.cgm_specific_ops_control_point.xml
import Foundation
import CoreBluetooth
import CCBluetooth
public class ContinuousGlucoseSO... | mit |
PiXeL16/SwiftDelayer | SwiftDelayer/Delayer.swift | 1 | 1125 | //
// Delayer.swift
// SwiftDelayer
//
// Created by Chris Jimenez on 2/2/16.
// Copyright © 2016 Chris Jimenez. All rights reserved.
//
import Foundation
//Small util to suply a delay on the main queue
public class Delayer {
/**
Delays a call to a closure for the number of seconds
- para... | mit |
muyang00/YEDouYuTV | YEDouYuZB/YEDouYuZB/Home/Controller/GameViewController.swift | 1 | 4640 | //
// GameViewController.swift
// YEDouYuZB
//
// Created by yongen on 17/2/10.
// Copyright © 2017年 yongen. All rights reserved.
//
import UIKit
private let kEdgeMargin : CGFloat = 10
private let kItemW : CGFloat = (kScreenW - 2 * kEdgeMargin) / 3
private let kItemH = kItemW * 6 / 5
private let kGameHeadViewH : ... | apache-2.0 |
apple/swift-corelibs-foundation | Sources/FoundationNetworking/URLSession/HTTP/HTTPMessage.swift | 1 | 26755 | // Foundation/URLSession/HTTPMessage.swift - HTTP Message parsing
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for l... | apache-2.0 |
MillmanY/MMPlayerView | MMPlayerView/Classes/Subtitles/MMSubtitleSetting.swift | 1 | 2021 | //
// MMSubtitleSetting.swift
// MMPlayerView
//
// Created by Millman on 2019/12/18.
//
import UIKit
public protocol MMSubtitleSettingProtocol: class {
func setting(_ mmsubtitleSetting: MMSubtitleSetting, fontChange: UIFont)
func setting(_ mmsubtitleSetting: MMSubtitleSetting, textColorChange: UIColor)
... | mit |
roambotics/swift | test/ConstExtraction/fields.swift | 2 | 3580 | // RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/inputs)
// RUN: echo "[MyProto]" > %t/inputs/protocols.json
// RUN: %target-swift-frontend -typecheck -emit-const-values-path %t/fields.swiftconstvalues -const-gather-protocols-file %t/inputs/protocols.json -primary-file %s
// RUN: cat %t/fields.swiftconstvalues... | apache-2.0 |
TrustWallet/trust-wallet-ios | Trust/Transfer/Types/GasLimitConfiguration.swift | 1 | 336 | // Copyright DApps Platform Inc. All rights reserved.
import Foundation
import BigInt
public struct GasLimitConfiguration {
static let `default` = BigInt(90_000)
static let min = BigInt(21_000)
static let max = BigInt(600_000)
static let tokenTransfer = BigInt(144_000)
static let dappTransfer = Bi... | gpl-3.0 |
roambotics/swift | test/SourceKit/Diagnostics/diags.swift | 2 | 1718 | // Use -print-raw-response on the first request so we don't wait for semantic info which will never come.
// RUN: %sourcekitd-test -req=open %s -req-opts=syntactic_only=1 -print-raw-response -- %s == \
// RUN: -req=stats == \
// RUN: -req=diags %s -print-raw-response -- %s == \
// RUN: -req=stats == \
// RUN: -req=diag... | apache-2.0 |
cohena100/Shimi | Carthage/Checkouts/Action/Tests/ActionTests/AlertActionTests.swift | 1 | 2551 | import Quick
import Nimble
import RxSwift
import RxBlocking
import Action
class AlertActionTests: QuickSpec {
override func spec() {
it("is nil by default") {
let subject = UIAlertAction.Action("Hi", style: .default)
expect(subject.rx.action).to( beNil() )
}
it("res... | mit |
roambotics/swift | test/attr/attr_availability_transitive_osx.swift | 2 | 6644 | // RUN: %target-typecheck-verify-swift -parse-as-library
// REQUIRES: OS=macosx
// Allow referencing unavailable API in situations where the caller is marked unavailable in the same circumstances.
@available(OSX, unavailable)
@discardableResult
func osx() -> Int { return 0 } // expected-note * {{'osx()' has been expl... | apache-2.0 |
li-wenxue/Weibo | 新浪微博/新浪微博/Class/Tools/Networking/WBNetworkingManager+Extension.swift | 1 | 3850 | //
// WBNetworkingManager+Extension.swift
// 新浪微博
//
// Created by win_学 on 16/8/20.
// Copyright © 2016年 win_学. All rights reserved.
//
import Foundation
// MARK: - 封装新浪微博的网络请求方法
extension WBNetworkingManager {
/// 加载微博数据字典数组
///
/// - parameter since_id 返回ID比since_id大的微博(即比since_id时间晚的微博),默认为0(下... | mit |
jvesala/teknappi | teknappi/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift | 13 | 7261 | //
// UITableView+Rx.swift
// RxCocoa
//
// Created by Krunoslav Zaher on 4/2/15.
// Copyright (c) 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
#if !RX_NO_MODULE
import RxSwift
#endif
import UIKit
// Items
extension UITableView {
/**
Binds sequences of elements to table view rows.... | gpl-3.0 |
matt-deboer/kuill | vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/Renderer.swift | 25 | 12439 | // Copyright 2017 Google 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 applicable ... | mit |
telip007/ChatFire | Pods/SwiftMessages/SwiftMessages/UIViewController+Utils.swift | 2 | 4460 | //
// UIViewController+Utils.swift
// SwiftMessages
//
// Created by Timothy Moose on 8/5/16.
// Copyright © 2016 SwiftKick Mobile LLC. All rights reserved.
//
import UIKit
private let fullScreenStyles: [UIModalPresentationStyle] = [.FullScreen, .OverFullScreen]
extension UIViewController {
func sm_sele... | apache-2.0 |
Off-Piste/Trolley.io-cocoa | Trolley/Database/TRLDatabaseCore/Extensions/Array+Core.swift | 2 | 843 | //
// Response+Core.swift
// Trolley.io
//
// Created by Harry Wright on 26.06.17.
// Copyright © 2017 Trolley. All rights reserved.
//
import Foundation
import PromiseKit
public extension Array where Element == Product {
/// <#Description#>
///
/// - Parameter text: <#text description#>
/// ... | mit |
andrzejsemeniuk/ASToolkit | ASToolkit/ExtensionForSwift.swift | 1 | 365 | //
// ExtensionForSwiftNumeric.swift
// ASToolkit
//
// Created by andrzej semeniuk on 10/9/16.
// Copyright © 2017 Andrzej Semeniuk. All rights reserved.
//
import Foundation
extension Comparable {
public func clamped (minimum:Self, maximum:Self) -> Self {
return self < minimum ? minimum... | mit |
kingslay/KSSwiftExtension | CityPicker/View/CityMaskView.swift | 5 | 624 | //
// CityMaskView.swift
// CFCityPickerVC
//
// Created by 冯成林 on 15/8/6.
// Copyright (c) 2015年 冯成林. All rights reserved.
//
import UIKit
class CityMaskView: UIView {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
/** 视图准备 */
self.viewPrepare()
}
... | mit |
Andruschenko/SeatTreat | SeatTreatTests/BackendAPITests.swift | 1 | 1757 | //
// BackendAPITests.swift
// SeatTreat
//
// Created by Jan Erik Herrmann on 18.10.15.
// Copyright © 2015 André Kovac. All rights reserved.
//
import XCTest
@testable import SeatTreat
class BackendAPITest: XCTestCase {
func testLoadAvailableSeats() {
let expectation = expectationWithDescription("Swif... | gpl-2.0 |
FabrizioBrancati/BFKit-Swift | Sources/BFKit/Linux/BFKit/BFApp.swift | 1 | 6920 | //
// BFApp.swift
// BFKit-Swift
//
// The MIT License (MIT)
//
// Copyright (c) 2015 - 2019 Fabrizio Brancati.
//
// 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 |
wwu-pi/md2-framework | de.wwu.md2.framework/res/resources/ios/lib/controller/validator/MD2TimeRangeValidator.swift | 1 | 1924 | //
// MD2TimeRangeValidator.swift
// md2-ios-library
//
// Created by Christoph Rieger on 23.07.15.
// Copyright (c) 2015 Christoph Rieger. All rights reserved.
//
/**
Validator to check for a given time range.
*/
class MD2TimeRangeValidator: MD2Validator {
/// Unique identification string.
let id... | apache-2.0 |
EcolabCompany/StaticTableViewDatasource | Tests/StaticTableViewDatasourceTests/XCTestManifests.swift | 1 | 175 | import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(StaticTableViewDatasourceTests.allTests),
]
}
#endif
| mit |
ibru/Swifter | Swifter/SwifterOAuthClient.swift | 2 | 8155 | //
// SwifterOAuthClient.swift
// Swifter
//
// Copyright (c) 2014 Matt Donnelly.
//
// 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... | mit |
russelhampton05/MenMew | App Prototypes/Test_004_QRScanner/Test_004_QRScanner/Test_004_QRScanner/CircleTransition.swift | 1 | 4587 | //
// CircleTransition.swift
// Test_004_QRScanner
//
// Created by Jon Calanio on 9/16/16.
// Copyright © 2016 Jon Calanio. All rights reserved.
//
import UIKit
class CircleTransition: NSObject {
var circle = UIView()
var startingPoint = CGPoint.zero {
didSet {
circle.center = s... | mit |
presence-insights/pi-clientsdk-ios | IBMPIGeofence/PIGeofenceData.swift | 1 | 991 | /**
* IBMPIGeofence
* PIGeofenceData.swift
*
* Performs all communication to the PI Rest API.
*
* © Copyright 2016 IBM Corp.
*
* Licensed under the Presence Insights Client iOS Framework License (the "License");
* you may not use this file except in compliance with the License. You may find
* a copy of... | epl-1.0 |
made2k/QuickLauncher | Example/QuickLauncher/AppDelegate.swift | 2 | 2043 | /*
The MIT License (MIT)
Copyright (c) 2015 Zach McGaughey
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... | mit |
GenericDataSource/GenericDataSource | GenericDataSourceTests/DelegatedGeneralCollectionViewMultiSectionTestCases.swift | 1 | 21736 | //
// DelegatedGeneralCollectionViewMultiSectionTestCases.swift
// GenericDataSource
//
// Created by Mohamed Afifi on 3/27/16.
// Copyright © 2016 mohamede1945. All rights reserved.
//
import XCTest
import GenericDataSource
private class ClosureDataSource: ReportBasicDataSource<TextReportTableViewCell> {
va... | mit |
GenericDataSource/GenericDataSource | Example/Example/ContactTableViewCell.swift | 1 | 514 | //
// ContactTableViewCell.swift
// Example
//
// Created by Mohamed Ebrahim Mohamed Afifi on 4/3/17.
// Copyright © 2017 Mohamed Afifi. All rights reserved.
//
import UIKit
class ContactTableViewCell: UITableViewCell, ContactCell {
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.