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 |
|---|---|---|---|---|---|
AckeeCZ/ACKategories | ACKategoriesCore/Base/ViewModel.swift | 1 | 1148 | //
// BaseViewModel.swift
// ProjectTemplate
//
// Created by Jan Misar on 16.08.18.
//
import Foundation
import os.log
extension Base {
/// Turn on/off logging of init/deinit of all VMs
/// ⚠️ Has no effect when Base.memoryLoggingEnabled is true
public static var viewModelMemoryLoggingEnabled: Bool =... | mit |
Minecodecraft/50DaysOfSwift | Day 4 - TabBarCenterButton/TabBarCenterButton/TabBarCenterButton/MCBaseViewController.swift | 1 | 301 | //
// MCBaseViewController.swift
// TabBarCenterButton
//
// Created by Minecode on 2017/7/14.
// Copyright © 2017年 Minecode. All rights reserved.
//
import UIKit
class MCBaseViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
}
| mit |
morizotter/BrightFutures | BrightFutures/AsyncType.swift | 1 | 1712 | //
// Async.swift
// BrightFutures
//
// Created by Thomas Visser on 09/07/15.
// Copyright © 2015 Thomas Visser. All rights reserved.
//
import Foundation
public protocol AsyncType {
typealias Value
var value: Value? { get }
init()
init(value: Value)
init(value: Value, delay: NSTime... | mit |
yuhao-ios/DouYuTVForSwift | DouYuTVForSwift/DouYuTVForSwift/Home/Controller/AmuseVC.swift | 1 | 1363 | //
// AmuseVC.swift
// DouYuTVForSwift
//
// Created by t4 on 17/5/22.
// Copyright © 2017年 t4. All rights reserved.
//
import UIKit
fileprivate let kMenuViewHeight : CGFloat = 200
class AmuseVC: BaseAnchorViewController {
fileprivate lazy var amuseVM : AmuseVM = AmuseVM()
fileprivate lazy var am... | mit |
mownier/photostream | Photostream/Modules/Post Like/View/PostLikeScene.swift | 1 | 609 | //
// PostLikeScene.swift
// Photostream
//
// Created by Mounir Ybanez on 20/01/2017.
// Copyright © 2017 Mounir Ybanez. All rights reserved.
//
protocol PostLikeScene: BaseModuleView {
var presenter: PostLikeModuleInterface! { set get }
var isEmptyViewHidden: Bool { set get }
var isLoadingV... | mit |
podaenur/SberTech_test | SberTech_test/SberTech_test/ScreensFactory.swift | 1 | 410 | //
// ScreensFactory.swift
// SberTech_test
//
// Created by Evgeniy Akhmerov on 07/09/2017.
// Copyright © 2017 Evgeniy Akhmerov. All rights reserved.
//
import UIKit
struct ScreensFactory {
static func mainScreen(context: Any?) -> MainController {
let model = MainViewModel(context: context)
... | mit |
taqun/TodoEver | TodoEverTests/Tests/Model/TDEMNoteTests.swift | 1 | 3496 | //
// TDEMNoteTests.swift
// TodoEver
//
// Created by taqun on 2015/06/09.
// Copyright (c) 2015年 envoixapp. All rights reserved.
//
import UIKit
import XCTest
import MagicalRecord
class TDEMNoteTests: XCTestCase {
override func setUp() {
super.setUp()
MagicalRecord.setupCoreDa... | mit |
moozzyk/SignalR-Client-Swift | Tests/SignalRClientTests/ServerInvocationHandlerTests.swift | 1 | 10144 | //
// ServerInvocationHandlerTests.swift
// SignalRClientTests
//
// Created by Pawel Kadluczka on 2/25/18.
// Copyright © 2018 Pawel Kadluczka. All rights reserved.
//
import XCTest
@testable import SignalRClient
class InvocationHandlerTests: XCTestCase {
private let callbackQueue = DispatchQueue(label: "Sig... | mit |
peggyrayzis/react-native-create-bridge | templates/ui-components/ios-swift/TemplateManager.swift | 1 | 434 | // Created by react-native-create-bridge
import Foundation
import UIKit
@objc({{template}})
class {{template}}Manager : RCTViewManager {
// Return the native view that represents your React component
override func view() -> UIView! {
return {{template}}View()
}
// Export constants to use in your native ... | mit |
benlangmuir/swift | validation-test/stdlib/Collection/DefaultedMutableRangeReplaceableRandomAccessCollection.swift | 32 | 2261 | // -*- swift -*-
//===----------------------------------------------------------------------===//
// Automatically Generated From validation-test/stdlib/Collection/Inputs/Template.swift.gyb
// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
// RUN: %target-run-si... | apache-2.0 |
mobgeek/swift | Swift em 4 Semanas/App Lista/Lista Semana 2/Lista/AdicionarItemViewController.swift | 3 | 892 | //
// AdicionarItemViewController.swift
// Lista
//
// Created by Fabio Santos on 11/3/14.
// Copyright (c) 2014 Fabio Santos. All rights reserved.
//
import UIKit
class AdicionarItemViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional set... | mit |
squiffy/AlienKit | Example/Pods/p2.OAuth2/Sources/Base/OAuth2Base.swift | 1 | 10927 | //
// OAuth2Base.swift
// OAuth2
//
// Created by Pascal Pfiffner on 6/2/15.
// Copyright 2015 Pascal Pfiffner
//
// 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.a... | mit |
The-iPocalypse/BA-iOS-Application | src/Annotation.swift | 1 | 697 | //
// Annotation.swift
// BA-iOS-Application
//
// Created by Samuel Bellerose on 2016-02-13.
// Copyright © 2016 Samuel Bellerose. All rights reserved.
//
import MapKit
class Annotation: NSObject, MKAnnotation {
let title: String?
let locationName: String
let discipline: String
let coordinate: CL... | mit |
Tombio/Trafalert | iOS Client/Trafalert/DataFetcher.swift | 1 | 2925 | //
// DataFetcher.swift
// Trafalert
//
// Created by Tomi Lahtinen on 02/02/16.
// Copyright © 2016 Tomi Lahtinen. All rights reserved.
//
import Foundation
import Alamofire
import ObjectMapper
class DataFetcher {
//static let server = "http://localhost:8080"
static let server = "https://trafalert.h... | mit |
joshdholtz/fastlane | fastlane/swift/Deliverfile.swift | 1 | 729 | // This class is automatically included in FastlaneRunner during build
// This autogenerated file will be overwritten or replaced during build time, or when you initialize `deliver`
//
// ** NOTE **
// This file is provided by fastlane and WILL be overwritten in future updates
// If you want to add extra functional... | mit |
tatsuyamoriguchi/PoliPoli | View Controller/LoginViewController.swift | 1 | 12014 | //
// LoginViewController.swift
// Poli
//
// Created by Tatsuya Moriguchi on 8/4/18.
// Copyright © 2018 Becko's Inc. All rights reserved.
//
import UIKit
import QuartzCore
// Keychain Configuration
struct KeychainConfiguration {
static let serviceName = "Poli"
static let accessGroup: String? = nil
}
cl... | gpl-3.0 |
IamAlchemist/DemoAnimations | Animations/DraggableView.swift | 2 | 1389 | //
// DraggableView.swift
// DemoAnimations
//
// Created by wizard on 5/4/16.
// Copyright © 2016 Alchemist. All rights reserved.
//
import UIKit
protocol DraggableViewDelegate : class {
func draggableView(view: DraggableView, draggingEndedWithVelocity velocity: CGPoint)
func draggableViewBeganDraggin(vi... | mit |
natecook1000/swift-compiler-crashes | crashes-fuzzing/27938-swift-arrayexpr-create.swift | 3 | 199 | // 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 a{struct Q<f:f.a}}
[t}
| mit |
below/NavTest | NavTest/AppDelegate.swift | 1 | 2159 | //
// AppDelegate.swift
// NavTest
//
// Created by Alexander v. Below on 05.11.14.
// Copyright (c) 2014 Alexander von Below. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplicatio... | unlicense |
karyjan/KMediaPlayer | KMediaPlayer/Button.swift | 1 | 1465 | //
// Button.swift
// MobilePlayer
//
// Created by Baris Sencan on 9/16/15.
// Copyright (c) 2015 MovieLaLa. All rights reserved.
//
import UIKit
class Button: UIButton {
let config: ButtonConfig
init(config: ButtonConfig = ButtonConfig()) {
self.config = config
super.init(frame: CGRectZero)
acc... | apache-2.0 |
natecook1000/swift-compiler-crashes | crashes-duplicates/13855-no-stacktrace.swift | 11 | 249 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
if true {
struct A {
enum S {
let a {
class A {
let start = [
e( {
class
case ,
| mit |
oddpanda/SegmentControl | segmentControl.swift | 1 | 2066 | //
// segmentControl.swift
// Edinburgh Mums
//
// Created by Shaun Gillon on 27/08/2015.
// Copyright (c) 2015 Odd Panda Design Ltd. All rights reserved.
//
import UIKit
class segmentControlView: UISegmentedControl {
var borderView: UIView!
var segBackgroundColor : UIColor = UIColor.whiteColor()
... | gpl-2.0 |
airspeedswift/swift-compiler-crashes | crashes-fuzzing/01327-resolvetypedecl.swift | 1 | 218 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
enum A
class a<T where B : start
extension A : a
| mit |
airspeedswift/swift-compiler-crashes | crashes-fuzzing/02133-resolvetypedecl.swift | 12 | 232 | // 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 : AnyObject
if true {
{
}
{
}
struct Q<T : b
| mit |
lukesutton/hekk | Sources/Node+Update.swift | 1 | 1077 | extension Node {
public func remove(match: Query) -> Node? {
return execute(match: match, node: self) { _ in nil }
}
public func update(match: Query, closure: (Node) -> Node) -> Node? {
return execute(match: match, node: self, closure: closure)
}
private func execute(match: Query, node: Node, closur... | mit |
Yurssoft/QuickFile | QuickFile/ViewModels/YSPlaylistViewModel.swift | 1 | 4479 | //
// YSPlaylistViewModel.swift
// YSGGP
//
// Created by Yurii Boiko on 12/6/16.
// Copyright © 2016 Yurii Boiko. All rights reserved.
//
import Foundation
class YSPlaylistViewModel: YSPlaylistViewModelProtocol {
func viewIsLoadedAndReadyToDisplay(_ completion: @escaping CompletionHandler) {
getFiles... | mit |
MrAlek/Swift-NSFetchedResultsController-Trickery | CoreDataTrickerySwift/ToDoSection.swift | 1 | 677 | //
// ToDoSection.swift
// CoreDataTrickerySwift
//
// Created by Alek Åström on 2015-09-13.
// Copyright © 2015 Apps and Wonders. All rights reserved.
//
import Foundation
enum ToDoSection: String {
case ToDo = "10"
case HighPriority = "11"
case MediumPriority = "12"
case LowPriority = "13"
c... | mit |
cp3hnu/Bricking | Bricking/Source/Collapse.swift | 1 | 7052 | //
// Collapse.swift
// Bricking
//
// Created by CP3 on 17/4/12.
// Copyright © 2017年 CP3. All rights reserved.
//
import Foundation
#if os(iOS)
import UIKit
#elseif os(OSX)
import AppKit
#endif
extension View {
private struct AssociatedKeys {
static var previousConstraint = "previousConstrai... | mit |
buyiyang/iosstar | iOSStar/General/Extension/QiniuTool.swift | 3 | 4870 | //
// QiniuTool.swift
// iOSStar
//
// Created by mu on 2017/8/19.
// Copyright © 2017年 YunDian. All rights reserved.
//
import UIKit
import Alamofire
import Kingfisher
import Qiniu
class QiniuTool: NSObject {
static let tool = QiniuTool()
class func shared() -> QiniuTool{
return tool
}
... | gpl-3.0 |
SASAbus/SASAbus-ios | SASAbus Watch Extension/Controller/MainInterfaceController.swift | 1 | 2192 | import WatchKit
import Foundation
import Realm
import RealmSwift
class MainInterfaceController: WKInterfaceController {
let color = UIColor(hue: 0.08, saturation: 0.85, brightness: 0.90, alpha: 1)
@IBOutlet var nearbyButton: WKInterfaceButton!
@IBOutlet var recentButton: WKInterfaceButton!
@IBOu... | gpl-3.0 |
moppymopperson/HeartView | HeartView/HeartView/HeartView.swift | 1 | 2896 | //
// HeartView.swift
// HeartView
//
// Created by Erik Hornberger on 2017/01/23.
// Copyright © 2017年 EExT. All rights reserved.
//
import Foundation
import UIKit
/**
A heart shaped view that mimicking the one in Apple's CareKit, but
built with .xib file instead, and made to render properly in IB.
*/
@IBDes... | mit |
dreamsxin/swift | validation-test/compiler_crashers_fixed/26542-swift-typechecker-validatedecl.swift | 11 | 435 | // 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 license information
// See http://swift.org/CONTRIBUTORS.txt for the list... | apache-2.0 |
liuxiangdong3721/Swift | swiftLearning/swiftLearningTests/swiftLearningTests.swift | 1 | 916 | //
// swiftLearningTests.swift
// swiftLearningTests
//
// Created by Elvis on 15/4/22.
// Copyright (c) 2015年 liuxiangdong. All rights reserved.
//
import UIKit
import XCTest
class swiftLearningTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method ... | mit |
emilstahl/swift | validation-test/compiler_crashers/27547-swift-constraints-constraintsystem-getalternativeliteraltypes.swift | 9 | 294 | // RUN: not --crash %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
class B<T where g:n{
struct c<b{
class B
class B
var _=true{
}
let a=B
| apache-2.0 |
CodeEagle/Animate | Source/BasicProperties.swift | 1 | 17071 | //
// BasicProperties.swift
// Pods
//
// Created by LawLincoln on 15/6/24.
//
//
import Foundation
import pop
public class BasicProperties: NSObject {
// MARK: - UIView
public var alpha: CGFloat!{
didSet {
if let value = alpha {
let anim = animator(kPOPViewAlpha)
... | mit |
ben-ng/swift | test/stdlib/RuntimeObjC.swift | 2 | 25574 | // RUN: rm -rf %t && mkdir -p %t
//
// RUN: %target-clang %S/Inputs/Mirror/Mirror.mm -c -o %t/Mirror.mm.o -g
// RUN: %target-build-swift -parse-stdlib -Xfrontend -disable-access-control -module-name a -I %S/Inputs/Mirror/ -Xlinker %t/Mirror.mm.o %s -o %t.out
// RUN: %target-run %t.out
// REQUIRES: executable_test
// ... | apache-2.0 |
ben-ng/swift | validation-test/compiler_crashers_fixed/24769-std-function-func-swift-type-subst.swift | 1 | 440 | // 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 |
qiscus/qiscus-sdk-ios | Qiscus/Qiscus/Library/QToasterSwift.swift | 1 | 8720 | //
// QToasterSwift.swift
// QToasterSwift
//
// Created by Ahmad Athaullah on 6/30/16.
// Copyright © 2016 Ahmad Athaullah. All rights reserved.
//
import UIKit
public class QToasterSwift: NSObject {
/**
On touch action for your toaster, Default value: empty Void
*/
public var toastAction:()->Vo... | mit |
somedev/LocalNotificationScheduler | LocalNotificationScheduler/LocalNotificationScheduler/TimeOfDay.swift | 1 | 1237 | //
// Created by Eduard Panasiuk on 1/4/16.
// Copyright © 2016 somedev. All rights reserved.
//
import Foundation
public struct TimeOfDay{
static private let timeConstant:TimeInterval = 60
static public let oneDayTimeInterval:TimeInterval = 24 * timeConstant * timeConstant
private var _timeInterval:Ti... | mit |
radical-experiments/AIMES-Swift | viveks_workflow/data.04.00128.004/vivek.swift | 10 | 6521 |
type file;
int N = 128;
int chunk_size = 8; # chunksize for stage 3
int n_chunks = 16; # number of chunks
int verb = 1;
# -----------------------------------------------------------------------------
#
# Stage 1
#
app (file output_1_1_i,
file output_1_2_i,
file output_1_3_i) stage_1 (int i,
... | mit |
adrfer/swift | validation-test/compiler_crashers_fixed/25561-swift-diagnosticengine-flushactivediagnostic.swift | 13 | 276 | // 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 a{enum b<T where g:a{struct A{enum A:b=protocol a{}var B
| apache-2.0 |
AV8R-/SwiftUtils | UIView+Constrain.swift | 1 | 1587 | //
// UIView+Constrain.swift
// Jobok
//
// Created by Bogdan Manshilin on 26.04.17.
// Copyright © 2017 Jobok. All rights reserved.
//
import UIKit
enum UIError: Error {
case noSuperview
}
enum UIViewBounds {
case top(CGFloat), left(CGFloat), bottom(CGFloat), right(CGFloat)
func constrain(view:... | mit |
lanit-tercom-school/grouplock | GroupLockiOS/GroupLock/Scenes/Home_Stack/NumberOfKeysScene/NumberOfKeysInteractor.swift | 1 | 638 | //
// NumberOfKeysInteractor.swift
// GroupLock
//
// Created by Sergej Jaskiewicz on 20.07.16.
// Copyright (c) 2016 Lanit-Tercom School. All rights reserved.
//
import Foundation
protocol NumberOfKeysInteractorInput {
var numberOfKeys: Int { get }
var files: [File] { get }
}
protocol NumberOfKeysIntera... | apache-2.0 |
Vaseltior/SFCore | SFCoreTests/SFQueueTests.swift | 1 | 1337 | //
// SFQueueTests.swift
// SFCore
//
// Created by Samuel Grau on 10/04/2016.
// Copyright © 2016 Samuel Grau. All rights reserved.
//
import XCTest
@testable import SFCore
class SFQueueTests: XCTestCase {
var queue3: SFQueue<String>!
var queue4: SFQueue<String>!
override func setUp() {
super.setUp()... | mit |
nathantannar4/NTComponents | NTComponents/UI Kit/Table/NTTableView.swift | 1 | 1750 | //
// NTTableView.swift
// NTComponents
//
// Copyright © 2017 Nathan Tannar.
//
// 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... | mit |
Alchemistxxd/AXStylishNavigationBar | CarPro/RenditionCollectionViewController.swift | 1 | 1248 | //
// RenditionCollectionViewController.swift
// Final Car Pro
//
// Created by Xudong Xu on 1/12/21.
//
import Cocoa
class RenditionCollectionViewController: NSViewController {
private struct Layout {
static let width: CGFloat = 100
static let height: CGFloat = 120
static let mini... | mit |
grantjbutler/Artikolo | ArtikoloKit/DataManager.swift | 1 | 881 | //
// DataManager.swift
// Artikolo
//
// Created by Grant Butler on 4/30/17.
// Copyright © 2017 Grant Butler. All rights reserved.
//
import Foundation
import RxSwift
public protocol DataManagerBackend {
var articles: Observable<[Article]> { get }
var tags: Observable<[Tag]> { get }
func s... | mit |
shamanskyh/FluidQ | Shared Models/Instrument.swift | 1 | 16920 | //
// Instrument.swift
// FluidQ
//
// Created by Harry Shamansky on 11/10/15.
// Modified from Precircuiter: https://github.com/shamanskyh/Precircuiter
// Copyright © 2015 Harry Shamansky. All rights reserved.
//
#if os(iOS)
import UIKit
#else
import AppKit
#endif
// MARK: - Enumerations
enum DeviceType... | mit |
yasuoza/graphPON | graphPON iOS/Views/ChartViewContainerView.swift | 1 | 312 | import UIKit
import JBChartFramework
class ChartViewContainerView: UIView {
@IBOutlet weak var chartView: JBChartView!
override func layoutSubviews() {
super.layoutSubviews()
self.chartView.reloadData()
}
func reloadChartData() {
self.chartView.reloadData()
}
}
| mit |
dleonard00/firebase-user-signup | Pods/Material/Sources/TextField.swift | 1 | 19127 | /*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above... | mit |
hejunbinlan/SwiftGraphics | SwiftGraphics_UnitTests/SwiftDocTests/CGPointSwiftDocTests.swift | 4 | 3219 | //
// CGPointSwiftDocTests.swift
// SOMETHING
//
// Created by SOMEONE on SOMEWHEN.
// Copyright (c) SOME STUFF. All rights reserved.
//
// *******************************************************************************************
// * These unit tests were automatically generated by: https://github.com/schwa/Swi... | bsd-2-clause |
aschwaighofer/swift | test/Constraints/function_builder_diags.swift | 2 | 14261 | // RUN: %target-typecheck-verify-swift -disable-availability-checking
enum Either<T,U> {
case first(T)
case second(U)
}
@_functionBuilder
struct TupleBuilder { // expected-note 3{{struct 'TupleBuilder' declared here}}
static func buildBlock() -> () { }
static func buildBlock<T1>(_ t1: T1) -> T1 {
retur... | apache-2.0 |
radex/swift-compiler-crashes | crashes-fuzzing/23188-swift-parser-parsedeclfunc.swift | 11 | 253 | // 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 d<T where g:a{var b{protocol P{func f:a func a(xea{}protocol P{let f={{{func}
| mit |
radex/swift-compiler-crashes | crashes-fuzzing/10199-swift-parser-parsetoken.swift | 11 | 231 | // 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<d where B:a{
var b{
let c=(n<c
enum a{
enum B{
let c={ | mit |
charmaex/JDCoordinator | Example/JDCoordinator/Controller/IntroViewController.swift | 1 | 450 | //
// IntroVC.swift
// Demo
//
// Created by Jan Dammshäuser on 05.09.16.
// Copyright © 2016 Jan Dammshäuser. All rights reserved.
//
import UIKit
class IntroVC: UIViewController {
// needed on iOS 8
init() {
super.init(nibName: "IntroVC", bundle: nil)
}
required init?(coder aDecoder: N... | mit |
notbenoit/tvOS-Twitch | Code/Common/Views/NibDesignable.swift | 1 | 2527 | // Copyright (c) 2015 Benoit Layer
//
// 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, ... | bsd-3-clause |
bermudadigitalstudio/Rope | Tests/RopeTests/RopeQueryJSONTests.swift | 1 | 2387 | import XCTest
import Rope
final class RopeQueryJSONTests: XCTestCase {
let creds = TestCredentials.getCredentials()
var conn: Rope? // auto-tested optional db connection
let insertQuery = "INSERT INTO json (json) VALUES " +
"('{\"due_in_seconds\":0,\"method\":\"POST\",\"headers\":{},... | apache-2.0 |
manavgabhawala/CAEN-Lecture-Scraper | CAEN Lecture Scraper/GenericExtensions.swift | 1 | 1310 | //
// GenericExtensions.swift
// CAEN Lecture Scraper
//
// Created by Manav Gabhawala on 6/3/15.
// Copyright (c) 2015 Manav Gabhawala. All rights reserved.
//
import Foundation
extension String
{
init?(data: NSData?)
{
if let data = data
{
if let some = NSString(data: data, encoding: NSUTF8StringEncod... | mit |
eugeneego/utilities-ios | Sources/Network/Http/Serializers/UrlEncodedHttpSerializer.swift | 1 | 2221 | //
// UrlEncodedHttpSerializer
// Legacy
//
// Copyright (c) 2015 Eugene Egorov.
// License: MIT, https://github.com/eugeneego/legacy/blob/master/LICENSE
//
import Foundation
public struct UrlEncodedHttpSerializer: HttpSerializer {
public typealias Value = [String: String]
public let contentType: String = "a... | mit |
jtbandes/swift-compiler-crashes | fixed/27061-swift-archetypebuilder-getallarchetypes.swift | 4 | 211 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
var a{{func f<w{{var a{class A{func f{e=p
| mit |
xiandan/diaobaoweibo-swift | XWeibo-swift/Classes/Module/XUserAccount.swift | 1 | 3802 | //
// XUserAccount.swift
// XWeibo-swift
//
// Created by Apple on 15/10/31.
// Copyright © 2015年 Apple. All rights reserved.
//
import UIKit
class XUserAccount: NSObject, NSCoding {
//记录用户是否登录
class func isUserLogin() -> Bool {
return XUserAccount.loadAccount() != nil
}
//M... | apache-2.0 |
tobyliu-sw/CameraFrameCapturer | CameraFrameCapturer/AppDelegate.swift | 1 | 2473 | //
// AppDelegate.swift
// CameraFrameCapturer
//
// Created by Pin-Chou Liu on 6/20/17.
// Copyright © 2017 Pin-Chou Liu. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication,... | apache-2.0 |
apple/swift-nio | Tests/NIOFoundationCompatTests/ByteBufferView+MutableDataProtocolTest+XCTest.swift | 1 | 1197 | //===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIB... | apache-2.0 |
ispiropoulos/PRGLocationSearchBar | PRGLocationSearchBarTests/PRGLocationSearchBarTests.swift | 1 | 1028 | //
// PRGLocationSearchBarTests.swift
// PRGLocationSearchBarTests
//
// Created by John Spiropoulos on 28/12/2016.
// Copyright © 2016 Programize. All rights reserved.
//
import XCTest
@testable import PRGLocationSearchBar
class PRGLocationSearchBarTests: XCTestCase {
override func setUp() {
sup... | mit |
RameshRM/swift-tapper | swift-tapper/swift-tapper/AppDelegate.swift | 1 | 7067 | //
// AppDelegate.swift
// swift-tapper
//
// Created by Mahadevan, Ramesh on 7/13/14.
// Copyright (c) 2014 Mahadevan, Ramesh. All rights reserved.
//
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
... | apache-2.0 |
vadymmarkov/Faker | Tests/Fakery/Generators/NameSpec.swift | 3 | 1336 | import Quick
import Nimble
@testable import Fakery
final class NameSpec: QuickSpec {
override func spec() {
describe("Name") {
var name: Faker.Name!
beforeEach {
let parser = Parser(locale: "en-TEST")
name = Faker.Name(parser: parser)
}
describe("#name") {
it("re... | mit |
Samarkin/PixelEditor | PixelEditor/ViewController.swift | 1 | 2636 | import Cocoa
class ViewController: NSViewController {
@IBOutlet var colorSelectorView: ColorSelectorView!
@IBOutlet var selectedColorView: SolidColorView!
@IBOutlet var selectedAltColorView: SolidColorView!
@IBOutlet var canvasView: CanvasView!
override func viewDidLoad() {
super.viewDidL... | mit |
shiguredo/sora-ios-sdk | Sora/VideoFrame.swift | 1 | 2274 | import CoreMedia
import Foundation
import WebRTC
/**
映像フレームの種別です。
現在の実装では次の映像フレームに対応しています。
- ネイティブの映像フレーム (`RTCVideoFrame`)
- `CMSampleBuffer` (映像のみ、音声は非対応。 `RTCVideoFrame` に変換されます)
*/
public enum VideoFrame {
// MARK: - 定義
/// ネイティブの映像フレーム。
/// `CMSampleBuffer` から生成した映像フレームは、ネイティブの映像フレームに変換されます。
... | apache-2.0 |
vpeschenkov/LetterAvatarKit | LetterAvatarKit/Extensions/Character+LetterAvatarKit.swift | 1 | 1367 | //
// Character+LetterAvatarKit.swift
// LetterAvatarKit
//
// Copyright 2017 Victor Peschenkov
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// o this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without lim... | mit |
LibraryLoupe/PhotosPlus | PhotosPlus/Cameras/Canon/CanonEOSRebelT3i.swift | 3 | 512 | //
// Photos Plus, https://github.com/LibraryLoupe/PhotosPlus
//
// Copyright (c) 2016-2017 Matt Klosterman and contributors. All rights reserved.
//
import Foundation
extension Cameras.Manufacturers.Canon {
public struct EOSRebelT3i: CameraModel {
public init() {}
public let name = "Canon EOS R... | mit |
matthewpurcell/firefox-ios | Client/Frontend/Browser/TabTrayController.swift | 1 | 41135 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import Foundation
import UIKit
import SnapKit
import Storage
import ReadingList
struct TabTrayControllerUX {
... | mpl-2.0 |
dunkelstern/UnchainedUUID | Package.swift | 1 | 500 | //
// Package.swift
// UnchainedUUID
//
// Created by Johannes Schriewer on 2015-12-20.
// Copyright © 2015 Johannes Schriewer. All rights reserved.
//
import PackageDescription
let package = Package(
name: "UnchainedUUID",
targets: [
Target(name:"UnchainedUUIDTests", dependencies: [.Target(name: ... | bsd-3-clause |
palle-k/Covfefe | Tests/CovfefeTests/PerformanceTests.swift | 1 | 2850 | //
// PerformanceTests.swift
// CovfefeTests
//
// Created by Palle Klewitz on 17.02.18.
//
import XCTest
@testable import Covfefe
class PerformanceTests: XCTestCase {
static let jsonGrammar: Grammar = {
let grammarString = """
<any> ::= <optional-whitespace> <node> <optional-whitespace>
<node> ::= <diction... | mit |
steve-holmes/music-app-2 | MusicApp/AppDelegate.swift | 1 | 1149 | //
// AppDelegate.swift
// MusicApp
//
// Created by Hưng Đỗ on 6/9/17.
// Copyright © 2017 HungDo. All rights reserved.
//
import UIKit
import GoogleMobileAds
import AlamofireNetworkActivityIndicator
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
let module = ModuleContainer(... | mit |
TheNounProject/CollectionView | CollectionView/DataStructures/IndexedSet.swift | 1 | 5294 | //
// IndexedSet.swift
// CollectionView
//
// Created by Wes Byrne on 1/20/17.
// Copyright © 2017 Noun Project. All rights reserved.
//
import Foundation
public struct IndexedSet<Index: Hashable, Value: Hashable>: Sequence, CustomDebugStringConvertible, ExpressibleByDictionaryLiteral {
// var table ... | mit |
garynewby/GLNPianoView | Source/Extensions.swift | 1 | 5942 | //
// Extensions.swift
// PianoView
//
// Created by Gary Newby on 23/09/2017.
//
import UIKit
import QuartzCore
extension UIImage {
static func keyImage(_ aSize: CGSize, blackKey: Bool, keyDown: Bool, keyCornerRadius: CGFloat, noteNumber: Int) -> UIImage? {
let scale = UIScreen.main.scale
var ... | mit |
pantuspavel/PPAssetsActionController | PPAssetsActionController/Classes/PPAssetsCollectionController.swift | 1 | 10578 | import UIKit
import AVFoundation
protocol PPAssetsViewControllerDelegate: class {
func assetsViewController(_ controller: PPAssetsCollectionController, didChange itemsCount: Int)
func assetsViewControllerDidRequestCameraController(_ controller: PPAssetsCollectionController)
}
/**
Top part of Assets Action C... | mit |
RevenueCat/purchases-ios | Tests/BackendIntegrationTestApp/BackendIntegrationTestApp.swift | 1 | 325 | //
// BackendIntegrationTestApp.swift
// BackendIntegrationTestApp
//
// Created by Andrés Boedo on 5/3/21.
// Copyright © 2021 Purchases. All rights reserved.
//
import SwiftUI
@main
struct BackendIntegrationTestApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}... | mit |
jmgc/swift | test/Interop/Cxx/implementation-only-imports/check-function-transitive-visibility.swift | 1 | 1061 | // RUN: %empty-directory(%t)
// RUN: mkdir %t/use_module_a %t/use_module_b
// RUN: %target-swift-frontend -enable-library-evolution -swift-version 5 -emit-module -o %t/use_module_a/UseModuleA.swiftmodule %S/Inputs/use-module-a.swift -I %S/Inputs -enable-cxx-interop
// RUN: %target-swift-frontend -enable-library-evoluti... | apache-2.0 |
VirgilSecurity/virgil-sdk-keys-ios | Source/Keyknox/Client/KeyknoxClientProtocol.swift | 1 | 3370 | //
// Copyright (C) 2015-2020 Virgil Security Inc.
//
// 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
// not... | bsd-3-clause |
DarrenKong/firefox-ios | XCUITests/TopTabsTest.swift | 1 | 9393 | /* 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 XCTest
let url = "www.mozilla.org"
let urlLabel = "Internet for people, not profit — Mozilla"
let urlValue... | mpl-2.0 |
zirinisp/SlackKit | SlackKit/Sources/AttachmentField.swift | 1 | 1856 | //
// AttachmentField.swift
//
// Copyright © 2016 Peter Zignego. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation ... | mit |
rcasanovan/MarvelApp | Marvel App/Marvel AppTests/Provider/Marvel List Provider/MCharacterProviderTests.swift | 1 | 1704 | //
// MCharacterProviderTests.swift
// Marvel App
//
// Created by Ricardo Casanova on 22/2/16.
// Copyright © 2016 Marvel. All rights reserved.
//
import XCTest
class MCharacterProviderTests: XCTestCase {
var charactersProvider : MCharactersProvider?
override func setUp() {
super.setUp()
... | apache-2.0 |
blstream/TOZ_iOS | TOZ_iOS/SignUpRequest.swift | 1 | 1065 | //
// SignUpRequest.swift
// TOZ_iOS
//
// Created by patronage on 28.04.2017.
// Copyright © 2017 intive. All rights reserved.
//
import Foundation
final class SignUpRequest: BackendAPIRequest {
private let name: String
private let surname: String
private let phoneNumber: String
private let emai... | apache-2.0 |
haibtdt/NotifiOS-Cumulation | NotifiOSCumulation/DefaultNotificationsTableViewController.swift | 1 | 2618 | //
// DefaultNotificationsTableViewController.swift
// NotifiOSCumulation
//
// Created by SB 8 on 9/29/15.
// Copyright © 2015 Bui Hai. All rights reserved.
//
import UIKit
public class DefaultNotificationsTableViewController: UITableViewController {
@IBOutlet var clearAllButton: UIBarButtonItem!
@IBOut... | mit |
onevcat/CotEditor | CotEditor/Sources/SyntaxParser.swift | 1 | 13243 | //
// SyntaxParser.swift
//
// CotEditor
// https://coteditor.com
//
// Created by 1024jp on 2018-04-28.
//
// ---------------------------------------------------------------------------
//
// © 2004-2007 nakamuxu
// © 2014-2022 1024jp
//
// Licensed under the Apache License, Version 2.0 (the "License");
// yo... | apache-2.0 |
sschiau/swift | test/stdlib/Accelerate_vDSPFourierTransform.swift | 6 | 30371 | // RUN: %target-run-simple-swift
// REQUIRES: executable_test
// REQUIRES: rdar50301438
// REQUIRES: objc_interop
// UNSUPPORTED: OS=watchos
import StdlibUnittest
import Accelerate
var Accelerate_vDSPFourierTransformTests = TestSuite("Accelerate_vDSPFourierTransform")
//===-----------------------------------------... | apache-2.0 |
Aymarick/DisplayKit | Package.swift | 1 | 177 | import PackageDescription
let package = Package(
name: "DisplayKit",
dependencies: [
.Package(url: "https://github.com/Aymarick/CSDL2.git", Version(1,0,1))
]
)
| mit |
Chen-Dixi/SwiftHashDict | sy4/sy4/Algorithm.swift | 1 | 381 | //
// Algorithm.swift
// SwiftStructures
//
// Created by Wayne Bishop on 4/25/16.
// Copyright © 2016 Arbutus Software Inc. All rights reserved.
//
import Foundation
//recusive enum used to help build example Algorithm "models"
indirect enum Algorithm {
case Empty
case Sequence(Array<Int>)
cas... | mit |
practicalswift/swift | validation-test/compiler_crashers_fixed/28380-swift-type-transform.swift | 65 | 423 | // 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 |
gxf2015/DYZB | DYZB/DYZB/Classes/Home/Controller/RecommendViewController.swift | 1 | 5421 | //
// RecommendViewController.swift
// DYZB
//
// Created by guo xiaofei on 2017/8/11.
// Copyright © 2017年 guo xiaofei. All rights reserved.
//
import UIKit
fileprivate let kItemMargin : CGFloat = 10
fileprivate let kItemW = (kScreenW - 3 * kItemMargin) / 2
fileprivate let kNormalItemH = kItemW * 3 / 4
filepri... | mit |
Daltron/BigBoard | Example/BigBoard/ExampleAddStockView.swift | 1 | 4136 | //
// ExampleAddStockView.swift
// BigBoard
//
// Created by Dalton Hinterscher on 5/20/16.
// Copyright © 2016 CocoaPods. All rights reserved.
//
import UIKit
import SnapKit
import ChameleonFramework
protocol ExampleAddStockViewDelegate : class {
func numberOfSearchResultStocks() -> Int
func searchResult... | mit |
blockchain/My-Wallet-V3-iOS | Modules/FeatureAuthentication/Sources/FeatureAuthenticationDomain/WalletAuthentication/Models/Error/WalletRecoveryError.swift | 1 | 385 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import Foundation
import WalletPayloadKit
public enum WalletRecoveryError: LocalizedError, Equatable {
case restoreFailure(WalletError)
public var errorDescription: String? {
switch self {
case .restoreFailure(let walletError):
... | lgpl-3.0 |
volodg/iAsync.network | Sources/NSError/NetworkError.swift | 1 | 240 | //
// NetworkError.swift
// iAsync_network
//
// Created by Vladimir Gorbenko on 18.08.14.
// Copyright © 2014 EmbeddedSources. All rights reserved.
//
import Foundation
import iAsync_utils
public class NetworkError : UtilsError {}
| mit |
googlearchive/science-journal-ios | ScienceJournal/AppDelegateOpen.swift | 1 | 2213 | /*
* Copyright 2019 Google LLC. 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 a... | apache-2.0 |
googlearchive/science-journal-ios | ScienceJournalTests/Metadata/SensorTriggerEvaluatorTest.swift | 1 | 7594 | /*
* Copyright 2019 Google LLC. 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 a... | apache-2.0 |
quire-io/SwiftyChrono | Sources/Parsers/DE/DEMorgenTimeParser.swift | 1 | 1624 | //
// DEMorgenTimeParser.swift
// SwiftyChrono
//
// Created by Jerry Chen on 2/18/17.
// Copyright © 2017 Potix. All rights reserved.
//
import Foundation
/* this is a white list for morning cases
* e.g.
* this morning => heute Morgen
* tomorrow morning => Morgen früh
* friday morning => Freitag Morgen
* la... | mit |
nua-schroers/mvvm-frp | 30_MVVM-App/MatchGame/MatchGame/Controller/MainViewController.swift | 1 | 3323 | //
// ViewController.swift
// MatchGame
//
// Created by Dr. Wolfram Schroers on 5/26/16.
// Copyright © 2016 Wolfram Schroers. All rights reserved.
//
import UIKit
/// The view controller of the first screen responsible for the game.
class MainViewController: MVVMViewController, MainTakeAction {
// MARK: Th... | mit |
FraGoTe/cat-years | Cat Years/ViewController.swift | 1 | 860 | //
// ViewController.swift
// Cat Years
//
// Created by Francis Gonzales Tello on 10/21/15.
// Copyright © 2015 Francis Gonzales Tello. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var catYear: UITextField!
@IBOutlet weak var resultLabel: UILabel!
... | mit |
google/flatbuffers | swift/Sources/FlatBuffers/Constants.swift | 2 | 3103 | /*
* Copyright 2021 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 applica... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.