repo_name stringlengths 6 91 | path stringlengths 8 968 | copies stringclasses 202
values | size stringlengths 2 7 | content stringlengths 61 1.01M | license stringclasses 15
values | hash stringlengths 32 32 | line_mean float64 6 99.8 | line_max int64 12 1k | alpha_frac float64 0.3 0.91 | ratio float64 2 9.89 | autogenerated bool 1
class | config_or_test bool 2
classes | has_no_keywords bool 2
classes | has_few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reality-Virtually-Hackathon/Team-2 | WorkspaceAR/User Flow VCs/ViewController+Prompts.swift | 1 | 2972 | //
// ViewController+Prompts.swift
// WorkspaceAR
//
// Created by Avery Lamp on 10/7/17.
// Copyright © 2017 Apple. All rights reserved.
//
import UIKit
let hidePromptNotificationName = Notification.Name("HidePromptNotification")
extension ViewController{
func checkPrompts(){
if DataManager.share... | mit | 0684bc3a5046af9fd876a3408c8a8722 | 37.584416 | 213 | 0.644901 | 5.113597 | false | false | false | false |
CodeEagle/XcodeScriptsKit | build_number.swift | 1 | 1147 | #!/usr/bin/env xcrun -sdk macosx swift
import Foundation
func addBuildNumber() {
let buildKey = "CFBundleVersion"
let totalKey = "total"
var arguments: [String] = CommandLine.arguments
let dir = arguments.removeFirst() as NSString
let buildInfo = arguments.removeFirst()
let infoPlistpath = arg... | mit | 9eb77c61920d1595c3cd5c1e0536e38a | 36 | 103 | 0.655623 | 4.067376 | false | false | false | false |
nakiostudio/EasyPeasy | Example/Tests/NodeTests.swift | 1 | 26391 | // The MIT License (MIT) - Copyright (c) 2016 Carlos Vidal
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT H... | mit | f560afec366f0eb2b1d3fdab5c21bcb8 | 35.102599 | 92 | 0.635179 | 5.522285 | false | false | false | false |
shaps80/Peek | Pod/Classes/GraphicsRenderer/PDFRenderer.swift | 1 | 8935 | /*
Copyright © 03/10/2016 Snippex Ltd
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, d... | mit | e08475d40480896496833872454b9a64 | 35.917355 | 158 | 0.654242 | 4.837033 | false | false | false | false |
hooman/swift | test/decl/protocol/special/coding/enum_codable_invalid_codingkeys.swift | 3 | 2032 | // RUN: %target-typecheck-verify-swift -verify-ignore-unknown
// Enums with a CodingKeys entity which is not a type should not derive
// conformance.
enum InvalidCodingKeys1 : Codable { // expected-error {{type 'InvalidCodingKeys1' does not conform to protocol 'Decodable'}}
// expected-error@-1 {{type 'InvalidCodingKe... | apache-2.0 | f63aff0a998cc42b550fa5ff227e15c7 | 53.918919 | 136 | 0.725886 | 4.703704 | false | false | false | false |
lorentey/swift | test/SILGen/vtables_multifile.swift | 4 | 22343 | // RUN: %target-swift-emit-silgen %s | %FileCheck %s
// RUN: %target-swift-emit-silgen %s -primary-file %S/Inputs/vtables_multifile_2.swift | %FileCheck %S/Inputs/vtables_multifile_2.swift
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module %s -enable-library-evolution -emit-module-path %t/vtables... | apache-2.0 | 81178a7a9539ef53e84e152f336bb2fb | 86.619608 | 297 | 0.708813 | 3.563477 | false | false | false | false |
BlakeBarrett/wndw | wtrmrkr/VideoPreviewPlayerViewController.swift | 1 | 804 | //
// VideoPreviewPlayerViewController.swift
// wndw
//
// Created by Blake Barrett on 6/9/16.
// Copyright © 2016 Blake Barrett. All rights reserved.
//
import Foundation
import AVFoundation
import AVKit
class VideoPreviewPlayerViewController: UIViewController {
var url :NSURL?
var player :AVPlayer?... | mit | a861c998456acf8b0deb190927b99756 | 24.09375 | 58 | 0.673724 | 4.614943 | false | false | false | false |
aquarchitect/MyKit | Sources/iOS/Frameworks/CollectionLayout/Parapoloid/ParaboloidFlowLayout.swift | 1 | 1424 | //
// ParaboloidFlowLayout.swift
// MyKit
//
// Created by Hai Nguyen.
// Copyright (c) 2015 Hai Nguyen.
//
import UIKit
open class ParaboloidFlowLayout: SnappingFlowLayout {
// MARK: Property
open var paraboloidControler: ParaboloidLayoutController?
open override class var layoutAttributesClass: An... | mit | a3dff7f79109d0a4c4bca0a7c423cd34 | 29.297872 | 110 | 0.668539 | 5.274074 | false | false | false | false |
the-blue-alliance/the-blue-alliance-ios | Frameworks/MyTBAKit/Sources/Models/MyTBASubscription.swift | 1 | 2912 | import Foundation
// https://github.com/the-blue-alliance/the-blue-alliance/blob/364d6da2f3fc464deef5ba580ea37b6cd2816c4a/consts/notification_type.py
public enum NotificationType: String, Codable {
case upcomingMatch = "upcoming_match"
case matchScore = "match_score"
case levelStarting = "starting_comp_lev... | mit | 7d5cff929c95d96221ae02b9c2fafa1a | 32.090909 | 144 | 0.666896 | 4.696774 | false | false | false | false |
witekbobrowski/Stanford-CS193p-Winter-2017 | Smashtag/Smashtag/TwitterUser.swift | 1 | 1039 | //
// TwitterUser.swift
// Smashtag
//
// Created by Witek on 14/07/2017.
// Copyright © 2017 Witek Bobrowski. All rights reserved.
//
import UIKit
import CoreData
import Twitter
class TwitterUser: NSManagedObject {
class func findOrCreateTwitterUser(matching twitterInfo: Twitter.User, in context: NSManagedO... | mit | 22ac217d7b4977b5494b56eb5e2699a7 | 28.657143 | 134 | 0.640655 | 4.827907 | false | false | false | false |
quran/quran-ios | Sources/Utilities/Extensions/Sequence+Extension.swift | 1 | 1427 | //
// Sequence+Extension.swift
// Quran
//
// Created by Mohamed Afifi on 2/19/17.
//
// Quran for iOS is a Quran reading application for iOS.
// Copyright (C) 2017 Quran.com
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as pub... | apache-2.0 | 9b05a86d3875471074edec44955f3353 | 30.021739 | 91 | 0.634898 | 4.077143 | false | false | false | false |
SomeSimpleSolutions/MemorizeItForever | MemorizeItForever/MemorizeItForever/VisualElements/MITextView.swift | 1 | 1000 | //
// MITextView.swift
// MemorizeItForever
//
// Created by Hadi Zamani on 11/8/16.
// Copyright © 2016 SomeSimpleSolutions. All rights reserved.
//
import UIKit
final class MITextView: UITextView, ValidatableProtocol {
override init(frame: CGRect, textContainer: NSTextContainer?) {
super.init(frame:... | mit | 2e0ed74b9561dc5feab576e46fe7282c | 23.365854 | 67 | 0.630631 | 4.603687 | false | false | false | false |
meismyles/SwiftWebVC | SwiftWebVC/SwiftWebVC.swift | 1 | 14962 | //
// SwiftWebVC.swift
//
// Created by Myles Ringle on 24/06/2015.
// Transcribed from code used in SVWebViewController.
// Copyright (c) 2015 Myles Ringle & Sam Vermette. All rights reserved.
//
import WebKit
public protocol SwiftWebVCDelegate: class {
func didStartLoading()
func didFinishLoading(succes... | mit | a51ca4bbc2572ce1376f609910992801 | 39.547425 | 331 | 0.61068 | 6.213455 | false | false | false | false |
Donkey-Tao/SinaWeibo | SinaWeibo/SinaWeibo/Classes/Main/Visitor/TFVisitorView.swift | 1 | 1546 | //
// TFVisitorView.swift
// SinaWeibo
//
// Created by Donkey-Tao on 2016/9/27.
// Copyright © 2016年 http://taofei.me All rights reserved.
//
import UIKit
class TFVisitorView: UIView {
//MARK:- 控件的属性
@IBOutlet weak var rotationView: UIImageView!
@IBOutlet weak var iconView: UIImageView!
@IBOutle... | mit | 11b6230ffdf9b40303428314c75fbf96 | 26.519231 | 107 | 0.667365 | 4.571885 | false | false | false | false |
xedin/swift | test/Sema/enum_raw_representable.swift | 7 | 6632 | // RUN: %target-typecheck-verify-swift
enum Foo : Int {
case a, b, c
}
var raw1: Int = Foo.a.rawValue
var raw2: Foo.RawValue = raw1
var cooked1: Foo? = Foo(rawValue: 0)
var cooked2: Foo? = Foo(rawValue: 22)
enum Bar : Double {
case a, b, c
}
func localEnum() -> Int {
enum LocalEnum : Int {
case a, b, c
... | apache-2.0 | dfa293be317497b7d7431ab672e6e86f | 33.905263 | 168 | 0.674759 | 3.409769 | false | false | false | false |
zhiquan911/chance_btc_wallet | chance_btc_wallet/chance_btc_wallet/extension/UILabel+extension.swift | 1 | 1111 | //
// UILabel+extension.swift
// Chance_wallet
//
// Created by Chance on 15/12/6.
// Copyright © 2015年 Chance. All rights reserved.
//
import Foundation
extension UILabel {
public func setDecimalStr(
_ number: String,
color: UIColor?
) {
self.text = number
... | mit | 80f29201cd0ce66afa98853ff8224d1a | 31.588235 | 98 | 0.545126 | 4.946429 | false | false | false | false |
wikimedia/wikipedia-ios | Wikipedia/Code/AbuseFilterAlertView.swift | 1 | 3668 | enum AbuseFilterAlertType {
case warning
case disallow
func image() -> UIImage? {
switch self {
case .warning:
return #imageLiteral(resourceName: "abuse-filter-flag")
case .disallow:
return #imageLiteral(resourceName: "abuse-filter-alert")
}
}
}
c... | mit | 8309185dfcd5004ecf58e609f57cbd7b | 54.575758 | 299 | 0.702835 | 4.990476 | false | false | false | false |
fgengine/quickly | Quickly/ViewControllers/Hamburger/Animation/QHamburgerViewControllerInteractiveAnimation.swift | 1 | 10450 | //
// Quickly
//
public final class QHamburgerViewControllerInteractiveAnimation : IQHamburgerViewControllerInteractiveAnimation {
public var contentView: UIView!
public var currentState: QHamburgerViewControllerState
public var targetState: QHamburgerViewControllerState
public var contentViewCon... | mit | b56a83d3d365f235d196ae3550f3f57c | 45.444444 | 154 | 0.653301 | 5.130093 | false | false | false | false |
KoCMoHaBTa/MHMessageKit | MHMessageKit/Message/Implementation/NotificationCenter+MessageSubscriber.swift | 1 | 2630 | //
// NSNotificationCenter+MessageSubscriber.swift
// MHMessageKit
//
// Created by Milen Halachev on 1/15/16.
// Copyright © 2016 Milen Halachev. All rights reserved.
//
import Foundation
extension NotificationCenter: MessageSubscriber {
public func subscribe<M>(_ handler: @escaping (_ message: M) -> Vo... | mit | 665bdff9291b834ea8a4511af91f551c | 35.013699 | 180 | 0.613541 | 5.975 | false | false | false | false |
Josscii/iOS-Demos | UIButtonDemo/UIButtonDemo/ViewController.swift | 1 | 1528 | //
// ViewController.swift
// UIButtonDemo
//
// Created by josscii on 2017/9/27.
// Copyright © 2017年 josscii. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, ty... | mit | 38b26703e89fa88e34a5da1ce5afb4bb | 32.065217 | 87 | 0.669954 | 4.843949 | false | false | false | false |
mownier/photostream | Photostream/UI/Post Discovery/PostDiscoveryViewDelegate.swift | 1 | 4511 | //
// PostDiscoveryViewDelegate.swift
// Photostream
//
// Created by Mounir Ybanez on 20/12/2016.
// Copyright © 2016 Mounir Ybanez. All rights reserved.
//
import UIKit
extension PostDiscoveryViewController {
override func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectio... | mit | a7bcee142ac8ae23b7de80ae96d36a63 | 30.319444 | 160 | 0.626829 | 5.796915 | false | false | false | false |
GocePetrovski/ListCollectionViewKit | ListCollectionViewKit/ListCollectionViewLayoutAttributes.swift | 1 | 1636 | //
// ListCollectionViewLayoutAttributes.swift
// ListCollectionView
//
// Created by Goce Petrovski on 27/01/2015.
// Copyright (c) 2015 Pomarium. All rights reserved.
// http://pomarium.com.au
import UIKit
open class ListCollectionViewLayoutAttributes: UICollectionViewLayoutAttributes {
open var editing:Bo... | mit | cabd8b1c0a480b1b449b493d5f0654bc | 26.728814 | 86 | 0.586186 | 5.970803 | false | false | false | false |
sadawi/MagneticFields | Pod/Classes/Observation.swift | 1 | 2068 | //
// Observation.swift
// Pods
//
// Created by Sam Williams on 11/28/15.
//
//
import Foundation
/**
An object that holds a closure that is to be run when a value changes.
`Observation` instances are themselves `Observable`, which means they can be chained:
```
let a = Field<String>()
let b = Field<String... | mit | a6c3b6da49146a0b8be66bcddf31e011 | 23.619048 | 108 | 0.617988 | 4.390658 | false | false | false | false |
seandavidmcgee/HumanKontactBeta | src/keyboardTest/ActivityKeys.swift | 1 | 600 | //
// ActivityKeys.swift
// keyboardTest
//
// Created by Sean McGee on 7/22/15.
// Copyright (c) 2015 3 Callistos Services. All rights reserved.
//
import Foundation
struct ActivityKeys {
static let ChooseCall = "com.humankontact.keyboardtest.ChooseCall"
static let ChooseText = "com.humankontact.key... | mit | f442f2496c6794708476b93f47cbbba2 | 29 | 74 | 0.738333 | 3.797468 | false | true | false | false |
bitjammer/swift | test/decl/protocol/conforms/fixit_stub_editor.swift | 8 | 1027 | // RUN: %target-typecheck-verify-swift -diagnostics-editor-mode
protocol P1 {
func foo1()
func foo2()
}
protocol P2 {
func bar1()
func bar2()
}
class C1 : P1, P2 {} // expected-error{{type 'C1' does not conform to protocol 'P1'}} expected-error{{type 'C1' does not conform to protocol 'P2'}} expected-note{{do... | apache-2.0 | 59c22abda59e2b3f2d79832b10d749cc | 37.037037 | 397 | 0.610516 | 3.07485 | false | false | false | false |
prolificinteractive/Marker | Marker/Marker/Parser/MarkdownParser.swift | 1 | 5152 | //
// MarkdownParser.swift
// Marker
//
// Created by Htin Linn on 5/4/16.
// Copyright © 2016 Prolific Interactive. All rights reserved.
//
import Foundation
/// Markdown parser.
struct MarkdownParser {
/// Parser error.
///
/// - invalidTagSymbol: Tag symbol is not a Markdown symbol.
enum P... | mit | d90914377ebdcdcc4f2c2028f6c7fe75 | 41.925 | 124 | 0.596389 | 5.611111 | false | false | false | false |
gregomni/swift | stdlib/public/Concurrency/AsyncSequence.swift | 3 | 19806 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.... | apache-2.0 | 731908fc1c680be754c0d0daca53e4db | 40.155925 | 99 | 0.66276 | 4.376741 | false | false | false | false |
wireapp/wire-ios | Wire-iOS/Sources/Developer/DeveloperTools/PreferredAPIVersion/PreferredAPIVersionViewModel.swift | 1 | 2764 | //
// Wire
// Copyright (C) 2022 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 | edcbd0859d285d0220e74fe1d95f5666 | 24.357798 | 95 | 0.603835 | 4.749141 | false | false | false | false |
saagarjha/Swimat | Swimat/SwimatViewController.swift | 1 | 3767 | import Cocoa
class SwimatViewController: NSViewController {
let installPath = "/usr/local/bin/"
@IBOutlet weak var swimatTabView: NSTabView!
@IBOutlet weak var versionLabel: NSTextField! {
didSet {
guard let infoDictionary = Bundle.main.infoDictionary,
let version = i... | mit | 1cb0132399c4749e8acd47eec65589fa | 35.572816 | 164 | 0.626228 | 5.313117 | false | false | false | false |
sunshineclt/NKU-Helper | NKU Helper/今天/TodayCell/GeneralTaskCell.swift | 1 | 1167 | //
// GeneralTaskCell.swift
// NKU Helper
//
// Created by 陈乐天 on 16/7/28.
// Copyright © 2016年 陈乐天. All rights reserved.
//
import UIKit
class GeneralTaskCell: MCSwipeTableViewCell {
@IBOutlet var containerView: UIView!
@IBOutlet var colorView: UIView!
@IBOutlet var titleLabel: UILabel!
@IBOutle... | gpl-3.0 | 60fb4e69b4b18cb8de89c095abff1c60 | 27.8 | 89 | 0.631076 | 4.682927 | false | false | false | false |
almazrafi/Metatron | Sources/MPEG/MPEGMedia.swift | 1 | 15527 | //
// MPEGMedia.swift
// Metatron
//
// Copyright (c) 2016 Almaz Ibragimov
//
// 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 ri... | mit | 024137f35b45323ae49b194c953da8c6 | 30.431174 | 116 | 0.594384 | 4.837072 | false | false | false | false |
18775134221/SwiftBase | SwiftTest/SwiftTest/Classes/Main/Tools/SQLite/SQLiteDatabaseTool.swift | 2 | 6708 | //
// SQLiteDatabaseTool.swift
// SwiftTest
//
// Created by MAC on 2016/12/31.
// Copyright © 2016年 MAC. All rights reserved.
//
import UIKit
class SQLiteDatabaseTool: NSObject {
// 创建单例
static var sharedInstance : SQLiteDatabaseTool {
struct Static {
static let instance : SQLite... | apache-2.0 | 0faa7a0df3a7b18b847c20103f0dbe1e | 25.615764 | 86 | 0.491764 | 3.799578 | false | false | false | false |
buyiyang/iosstar | iOSStar/Scenes/Discover/Controllers/VoiceAskVC.swift | 3 | 4229 | //
// VoiceAskVC.swift
// iOSStar
//
// Created by mu on 2017/8/17.
// Copyright © 2017年 YunDian. All rights reserved.
//
import UIKit
import SVProgressHUD
class VoiceAskVC: BaseTableViewController ,UITextViewDelegate{
@IBOutlet var contentText: UITextView!
@IBOutlet var placeholdLabel: UILabel!... | gpl-3.0 | ff50952a8020389c47b1001a17ff15f4 | 37.074074 | 164 | 0.626702 | 4.579065 | false | false | false | false |
qmathe/Confetti | Event/Input/Modifiers.swift | 1 | 533 | /**
Copyright (C) 2017 Quentin Mathe
Author: Quentin Mathe <quentin.mathe@gmail.com>
Date: November 2017
License: MIT
*/
import Foundation
import Tapestry
public struct Modifiers: OptionSet {
public let rawValue: Int
public init(rawValue: Int) {
self.rawValue = rawValue
}
pu... | mit | 909ad47e09596631cc7d9504a1165fbc | 22.173913 | 54 | 0.690432 | 3.977612 | false | false | false | false |
rxwei/dlvm-tensor | Sources/CoreTensor/Index.swift | 2 | 5000 | //
// Index.swift
// CoreTensor
//
// Copyright 2016-2018 The DLVM Team.
//
// 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
//
// Unl... | apache-2.0 | 2dcd96f3cf52149b338f54ab568041b1 | 28.411765 | 80 | 0.6102 | 4.366812 | false | false | false | false |
ubclaunchpad/RocketCast | RocketCast/PodcastViewCollectionViewCell.swift | 1 | 2256 | //
// PodcastViewCollectionViewCell.swift
// RocketCast
//
// Created by Milton Leung on 2016-11-09.
// Copyright © 2016 UBCLaunchPad. All rights reserved.
//
import UIKit
class PodcastViewCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var coverPhotoView: UIView!
@IBOutlet weak var podcastTitl... | mit | 9da5cfdc46f83c08ac844f91bf29de80 | 33.692308 | 246 | 0.6 | 5.172018 | false | false | false | false |
nostramap/nostra-sdk-sample-ios | SearchSample/Swift/SearchSample/KeywordViewController.swift | 1 | 2607 | //
// KeywordViewcontroller.swift
// SearchSample
//
// Copyright © 2559 Globtech. All rights reserved.
//
import UIKit
import NOSTRASDK
class KeywordViewController: UIViewController, UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource {
@IBOutlet weak var tableView: UITableView!
@IB... | apache-2.0 | 4797093ae2bf6ffe34eb84354d9d6729 | 26.723404 | 112 | 0.570606 | 5.922727 | false | false | false | false |
rudkx/swift | test/Interop/Cxx/class/constructors-irgen.swift | 1 | 9488 | // Target-specific tests for C++ constructor call code generation.
// RUN: %swift -module-name Swift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=ITANIUM_X64
// RUN: %swift -m... | apache-2.0 | 549baf0e7188af5f8b3acc24078bb21c | 78.731092 | 248 | 0.749789 | 4.360294 | false | false | false | false |
MxABC/LBXAlertAction | AlertAction/UIWindow+LBXHierarchy.swift | 1 | 1522 | //
// AlertAction.swift
//
//
// Created by lbxia on 16/6/20.
// Copyright © 2016年 lbx. All rights reserved.
//
import UIKit
/** @abstract UIWindow hierarchy category. */
public extension UIWindow {
/** @return Returns the current Top Most ViewController in hierarchy. */
public func topController()->U... | mit | f6028eefd9af623bcc56689f87061726 | 30.645833 | 105 | 0.652403 | 7.032407 | false | false | false | false |
penguing27/MarkdownViewer | MarkdownViewer/ListViewController.swift | 1 | 6336 | //
// ListViewController.swift
// MarkdownViewer
//
// Created by Gen Inagaki on 2017/04/08.
// Copyright © 2017年 Gen Inagaki. All rights reserved.
//
import UIKit
import SwiftyDropbox
class ListViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet weak var tableView: UITab... | mit | 1c7dd9cb914f8e2ecd52ae4883f0de09 | 36.035088 | 131 | 0.615506 | 5.233884 | false | false | false | false |
charlon/scout-ios | Scout/Error.swift | 1 | 884 | //
// Error.swift
// Scout
//
// Created by Charlon Palacay on 4/6/16.
// Copyright © 2016 Charlon Palacay. All rights reserved.
//
struct Error {
static let HTTPNotFoundError = Error(title: "Page Not Found", message: "There doesn’t seem to be anything here.")
static let NetworkError = Error(title: "Can’t ... | apache-2.0 | d28dd4ca0346c13f9683aa80efd0ad44 | 32.769231 | 183 | 0.664766 | 3.968326 | false | false | false | false |
taketo1024/SwiftyAlgebra | Sources/SwmCore/Polynomial/MultivariatePolynomial.swift | 1 | 9018 | //
// MultivariatePolynomial.swift
//
//
// Created by Taketo Sano on 2021/05/19.
//
public protocol MultivariatePolynomialIndeterminates: GenericPolynomialIndeterminate where Exponent == MultiIndex<NumberOfIndeterminates> {
associatedtype NumberOfIndeterminates: SizeType
static var isFinite: Bool { get }
... | cc0-1.0 | c1f2c33c8a6e9a660fc02e4dc1e19f33 | 34.356863 | 172 | 0.617347 | 4.630714 | false | false | false | false |
gupuru/StreetPassBLE-iOS | Example/ViewController.swift | 1 | 4758 | //
// ViewController.swift
// Example
//
// Created by 新見晃平 on 2016/02/23.
// Copyright © 2016年 kohei Niimi. All rights reserved.
//
import UIKit
import StreetPass
class ViewController: UIViewController, StreetPassDelegate, UITextFieldDelegate {
@IBOutlet weak var nameTextField: UITextField!
@IBOutlet... | mit | f1de6fbc2295087a57a23b49e8e6a61a | 28.632258 | 90 | 0.592423 | 5.365654 | false | false | false | false |
rnystrom/GitHawk | Classes/Search/SearchRecentSectionController.swift | 1 | 2737 | //
// SearchRecentSectionController.swift
// Freetime
//
// Created by Ryan Nystrom on 9/4/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import Foundation
import IGListKit
import SwipeCellKit
protocol SearchRecentSectionControllerDelegate: class {
func didSelect(recentSectionController: Search... | mit | 8e36b3620d08a81e08d45b131c21c22e | 36.479452 | 173 | 0.729898 | 5.595092 | false | false | false | false |
offfffz/PHAssetImageResizer-Bolts | ImageResizer.swift | 1 | 2384 | //
// ImageResizer.swift
//
// Created by offz on 7/21/2558 BE.
// Copyright (c) 2558 off. All rights reserved.
//
import Bolts
import Photos
import FCFileManager
public class ImageResizer {
let maxConcurrentCount: Int
let targetFolderPath: String
let sizeToFit: CGSize
lazy var imageProce... | mit | db644730cb6b6492190a88cfca7b09ab | 35.692308 | 167 | 0.618289 | 5.96 | false | false | false | false |
wisonlin/TimeSound | TimeSound/TimeSound/TSRemindCreateViewController.swift | 1 | 2967 | //
// TSRemindCreateViewController.swift
// TimeSound
//
// Created by wison on 3/6/16.
// Copyright © 2016 HomeStudio. All rights reserved.
//
import UIKit
import RealmSwift
class TSRemindCreateViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, TSSoundSelectDelegate {
// MARK: Prop... | mit | a672257fd3b86797d53c7de4e66ef67b | 31.593407 | 129 | 0.653742 | 5.392727 | false | false | false | false |
frootloops/swift | test/SILGen/guaranteed_self.swift | 1 | 26248 | // RUN: %target-swift-frontend -Xllvm -sil-full-demangle -emit-silgen %s -disable-objc-attr-requires-foundation-module -enable-sil-ownership | %FileCheck %s
protocol Fooable {
init()
func foo(_ x: Int)
mutating func bar()
mutating func bas()
var prop1: Int { get set }
var prop2: Int { get set }
var prop... | apache-2.0 | 3c118ba723c68a66ab710b51c2d9c414 | 46.539855 | 268 | 0.592523 | 3.426296 | false | false | false | false |
HighBay/EasyTimer | EasyTimer/ViewController.swift | 2 | 1463 | //
// ViewController.swift
// EasyTimer
//
// Created by Niklas Fahl on 3/2/16.
// Copyright © 2016 High Bay. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typi... | bsd-3-clause | 2802c73481448e1a6c9f1d81de5254a1 | 26.074074 | 80 | 0.560192 | 4.777778 | false | false | false | false |
Burning-Man-Earth/iBurn-iOS | iBurn/BRCDataImporter.swift | 1 | 2768 | //
// BRCDataImporter.swift
// iBurn
//
// Created by Chris Ballinger on 7/30/17.
// Copyright © 2017 Burning Man Earth. All rights reserved.
//
import Foundation
import Mapbox
import CocoaLumberjack
extension BRCDataImporter {
/** This is where Mapbox stores its tile cache */
private static var ma... | mpl-2.0 | ef492aa6aaeaebe6f0fe960ab07a84c6 | 37.430556 | 121 | 0.650163 | 4.985586 | false | false | false | false |
markusschlegel/DejaTextView | DejaTextView.swift | 1 | 45921 | //
// DejaTextView.swift
// DejaTextView
//
// Created by Markus Schlegel on 17/05/15.
// Copyright (c) 2015 Markus Schlegel. All rights reserved.
//
import UIKit
let animation_duration: Double = 0.2
let animation_spring_damping: CGFloat = 0.8
let grabber_frame: CGRect = CGRectMake(0, 0, 88, 43)
let selecti... | mit | 9a4b3f884b6791df6a8fa8a33696f44f | 35.272512 | 328 | 0.523116 | 5.291047 | false | false | false | false |
srn214/Floral | Floral/Pods/AutoInch/Sources/Inch.swift | 1 | 6082 | //
// Inch.swift
// ┌─┐ ┌───────┐ ┌───────┐
// │ │ │ ┌─────┘ │ ┌─────┘
// │ │ │ └─────┐ │ └─────┐
// │ │ │ ┌─────┘ │ ┌─────┘
// │ └─────┐│ └─────┐ │ └─────┐
// └───────┘└───────┘ └───────┘
//
// Created by lee on 2018/1/22.
// Copyright © 2018年 lee. All rights reserved.
//
import Foundatio... | mit | b83d36ef26a915d4410abf946349b637 | 28.729592 | 98 | 0.534066 | 3.939824 | false | false | false | false |
bparish628/iFarm-Health | iOS/iFarm-Health/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift | 4 | 13322 | //
// XAxisRendererHorizontalBarChart.swift
// Charts
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
// A port of MPAndroidChart for iOS
// Licensed under Apache License 2.0
//
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics
#if !os(OSX)
import UIKit
#endif
open ... | apache-2.0 | 180dba1279d024511edf44152c003f7f | 34.525333 | 163 | 0.538808 | 5.578727 | false | false | false | false |
KeepGoing2016/Swift- | DUZB_XMJ/DUZB_XMJ/Classes/Home/Controller/GameViewController.swift | 1 | 6502 | //
// GameViewController.swift
// DUZB_XMJ
//
// Created by user on 16/12/29.
// Copyright © 2016年 XMJ. All rights reserved.
//
import UIKit
fileprivate let kGameCellId = "kGameCellId"
fileprivate let kGameHeaderId = "kGameHeaderId"
fileprivate let kEdgeMargin:CGFloat = 10
fileprivate let kGameCellW = (kScreenW-2... | apache-2.0 | a7baa92ad0d5b6dc70053c0ae2a321b3 | 40.391026 | 191 | 0.665634 | 5.161471 | false | false | false | false |
wordpress-mobile/WordPress-iOS | WordPress/Classes/ViewRelated/Cells/InlineEditableMultiLineCell.swift | 1 | 1832 | import Foundation
// UITableViewCell that displays an editable UITextView to allow text to be modified inline.
// The cell height resizes as the text is modified.
// The delegate is notified when:
// - The height is updated.
// - The text is updated.
protocol InlineEditableMultiLineCellDelegate: AnyObject {
func ... | gpl-2.0 | 5c4f994d92768507846c195cb40bf5c1 | 25.941176 | 112 | 0.707424 | 5.189802 | false | false | false | false |
Roommate-App/roomy | roomy/Pods/IBAnimatable/Sources/Protocols/Designable/TintDesignable.swift | 3 | 1522 | //
// Created by Jake Lin on 11/24/15.
// Copyright © 2015 IBAnimatable. All rights reserved.
//
import UIKit
public protocol TintDesignable: class {
/**
Opacity in tint Color (White): from 0 to 1
*/
var tintOpacity: CGFloat { get set }
/**
Opacity in shade Color (Black): from 0 to 1
*/
var sha... | mit | c429a43474c74eabbe3533b1e859b792 | 24.35 | 75 | 0.657462 | 4.09973 | false | false | false | false |
Off-Piste/Trolley.io | Trolley/Core/Networking/Third Party/Reachability/Reachability.swift | 2 | 10209 | /*
Copyright (c) 2014, Ashley Mills
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 di... | mit | 557f26b1781731756d53bf76fb1a362f | 32.038835 | 137 | 0.662749 | 6.005294 | false | false | false | false |
narner/AudioKit | AudioKit/iOS/AudioKit/User Interface/AKStepper.swift | 1 | 5871 | //
// AKStepper.swift
// AudioKit for iOS
//
// Created by Aurelius Prochazka on 3/11/17.
// Copyright © 2017 Aurelius Prochazka. All rights reserved.
//
import AudioKit
import UIKit
/// Incrementor view, normally used for MIDI presets, but could be useful elsehwere
open class AKStepper: UIView {
var plusPat... | mit | 2992a75ef60b2c6a203eb8ce41884eeb | 37.366013 | 120 | 0.54293 | 4.511914 | false | false | false | false |
younata/RSSClient | TethysAppSpecs/UI/Account/OAuthLoginControllerSpec.swift | 1 | 9237 | import Quick
import UIKit
import Nimble
import Result
import CBGPromise
@testable import TethysKit
@testable import Tethys
final class OAuthLoginControllerSpec: QuickSpec {
override func spec() {
var subject: OAuthLoginController!
var accountService: FakeAccountService!
var mainQueue: Fake... | mit | a65bc10493d95440f2407d748d618f78 | 42.570755 | 125 | 0.501462 | 6.033312 | false | false | false | false |
thinkclay/FlourishUI | Pod/Classes/ToggleSwitch.swift | 1 | 5375 | import UIKit
public class ToggleButton: UIView
{
var active: Bool = false
public var activeBackgroundColor = UIColor(hex: "#6B60AB") {
didSet {
setNeedsDisplay()
}
}
public var activeBorderColor = UIColor(hex: "#8579CE") {
didSet {
setNeedsDisplay()
}
}
public var activeIn... | mit | bb8894199b2e9590452635cd7a0e2dd0 | 24.234742 | 107 | 0.656558 | 4.22231 | false | false | false | false |
RxLeanCloud/rx-lean-swift | src/RxLeanCloudSwift/Public/RxAVCQL.swift | 1 | 1289 | //
// RxAVCQL.swift
// RxLeanCloudSwift
//
// Created by WuJun on 14/12/2017.
// Copyright © 2017 LeanCloud. All rights reserved.
//
import Foundation
import RxSwift
public class RxAVCQL<TEntity> where TEntity: IAVQueryable {
public var cql: String
public var placeholders: Array<Any>?
public init(cql... | mit | c9d0c68bdb630d915df6395b396de14a | 32.025641 | 152 | 0.621894 | 3.891239 | false | false | false | false |
dclelland/GridSpan | GridSpan.swift | 1 | 3194 | //
// GridSpan.swift
// Pods
//
// Created by Daniel Clelland on 11/03/17.
//
import UIKit
/// A span object representing a rectangular range of cells in a grid.
public struct Span {
/// A closed range of columns in the grid.
/// For example, a value of `0...0` would indicate just the first column.
... | mit | db9860770c0c351348b87ef9349c3fff | 37.02381 | 128 | 0.629305 | 4.12129 | false | false | false | false |
Johennes/firefox-ios | Sync/EncryptedJSON.swift | 2 | 3231 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import Foundation
import Shared
import FxA
import Account
import XCGLogger
private let log = Logger.syncLogger
/... | mpl-2.0 | 7f60889eee7cce5ba489207b7962d32e | 24.25 | 118 | 0.55927 | 4.506276 | false | false | false | false |
sheepy1/SelectionOfZhihu | SelectionOfZhihu/UserDetailModel.swift | 1 | 1144 | //
// UserDetail.swift
// SelectionOfZhihu
//
// Created by 杨洋 on 16/1/20.
// Copyright © 2016年 Sheepy. All rights reserved.
//
import Foundation
class UserDetailModel: NSObject {
var ask = 0 as Int64
var answer = 0 as Int64
var post = 0 as Int64
var agree = 0 as Int64
var agreei = 0 as Int64
... | mit | 329895c9b36567d417d4a21082e57bfc | 24.288889 | 50 | 0.630607 | 3.414414 | false | false | false | false |
OpsLabJPL/MarsImagesIOS | Pods/SwiftMessages/SwiftMessages/MarginAdjustable+Animation.swift | 4 | 2149 | //
// MarginAdjustable+Animation.swift
// SwiftMessages
//
// Created by Timothy Moose on 11/5/17.
// Copyright © 2017 SwiftKick Mobile. All rights reserved.
//
import UIKit
extension MarginAdjustable where Self: UIView {
public func defaultMarginAdjustment(context: AnimationContext) -> UIEdgeInsets {
... | apache-2.0 | 4c832ec87d1946485a62acc3b5e97005 | 36.034483 | 106 | 0.633147 | 4.949309 | false | false | false | false |
hrscy/TodayNews | News/News/Classes/Home/Model/NewsModel.swift | 1 | 17332 |
//
// NewsModel.swift
// News
//
// Created by 杨蒙 on 2018/1/13.
// Copyright © 2018年 hrscy. All rights reserved.
//
import HandyJSON
/// 新闻数据模型(首页新闻数据,视频新闻数据,小视频,微头条)
struct NewsModel: HandyJSON {
var weitoutiaoHeight: CGFloat {
// 50 + contentH + 5 + middleViewH + 65
var height: CGFloat... | mit | 05a09db20e22fe1b9c38e356744f46a5 | 26.347756 | 141 | 0.607384 | 3.801515 | false | false | false | false |
ubiregiinc/UbiregiExtensionClient | UbiregiExtensionClientTests/TestHelper.swift | 1 | 2018 | import Foundation
import Swifter
import XCTest
func withSwifter(port: UInt16 = 8081, k: (HttpServer) throws -> ()) {
let server = HttpServer()
try! server.start(port)
defer {
server.stop()
}
try! k(server)
}
func returnJSON(object: [String: AnyObject]) -> HttpRequest -> HttpRespo... | mit | 67d0eda71f5181739f2a8aafa70563f8 | 25.92 | 127 | 0.634291 | 4.534831 | false | false | false | false |
frtlupsvn/Vietnam-To-Go | Pods/Former/Former/Controllers/FormViewController.swift | 1 | 1715 | //
// FomerViewController.swift
// Former-Demo
//
// Created by Ryo Aoyama on 7/23/15.
// Copyright © 2015 Ryo Aoyama. All rights reserved.
//
import UIKit
public class FormViewController: UIViewController {
// MARK: Public
public let tableView: UITableView = {
let tableView = UITableVie... | mit | 60da3de14edfb2bd492eeee383a56c7f | 30.759259 | 93 | 0.589265 | 5.011696 | false | false | false | false |
practicalswift/swift | benchmark/single-source/ArraySetElement.swift | 2 | 1244 | //===--- ArraySetElement.swift ---------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/... | apache-2.0 | a7be43d07c7b5ff6b15b5a6b69e61602 | 31.736842 | 81 | 0.643891 | 4.319444 | false | false | false | false |
priyanka16/RPChatUI | RPChatUI/Classes/TimeSlotTableViewCell.swift | 1 | 3881 | //
// TimeSlotTableViewCell.swift
//
//
// Created by Priyanka
// Copyright © 2017 __MyCompanyName__. All rights reserved.
//
import UIKit
let timeTabletWidth: CGFloat = 150
let timeTabletHeight: CGFloat = 50
fileprivate let itemsPerRow: CGFloat = 3
protocol TimeSlotTableViewCellDelegate : class {
func didS... | mit | 037428b73fd962dcce1871440568abf4 | 36.669903 | 143 | 0.659536 | 4.942675 | false | false | false | false |
lerigos/music-service | iOS_9/Pods/SwiftyVK/Source/SDK/Models/Error.swift | 2 | 2783 | import Foundation
public class _VKError : ErrorType, CustomStringConvertible {
public var domain : String
public var code: Int
public var desc : String
public var userInfo : [NSObject: AnyObject]?
///The reference to a request to the API, in which the error occurred
public var request : Request?
public... | apache-2.0 | 9716e9e7752a02c7804f1cbf2a04f0e1 | 21.256 | 105 | 0.589145 | 4.091176 | false | false | false | false |
jpsachse/mensa-griebnitzsee | Mensa Griebnitzsee/ViewController.swift | 1 | 6479 | //
// ViewController.swift
// Mensa Griebnitzsee
//
// Copyright © 2017 Jan Philipp Sachse. All rights reserved.
//
import UIKit
import MensaKit
class ViewController: UICollectionViewController {
let menuLoader = MenuLoader()
var loadedMenu: Menu?
let dateFormatter = DateFormatter()
let refreshControl =... | mit | ecab3f457758ccc73f10466f345b5506 | 35.189944 | 133 | 0.697437 | 5.161753 | false | false | false | false |
adamnemecek/AudioKit | Sources/AudioKit/Internals/Hardware/Device.swift | 1 | 2809 | // Copyright AudioKit. All Rights Reserved. Revision History at http://github.com/AudioKit/AudioKit/
#if os(macOS)
/// DeviceID isan AudioDeviceID on macOS
public typealias DeviceID = AudioDeviceID
#else
/// DeviceID is a string on iOS
public typealias DeviceID = String
#endif
import AVFoundation
/// Wrapper for aud... | mit | 3630290ffa1a1e977971e83c203bde69 | 32.843373 | 100 | 0.673549 | 4.777211 | false | false | false | false |
spark/photon-tinker-ios | Photon-Tinker/Global/Extensions/ParticleDevice.swift | 1 | 6166 | //
// Created by Raimundas Sakalauskas on 2019-05-09.
// Copyright (c) 2019 Particle. All rights reserved.
//
import Foundation
extension ParticleDevice {
func isRunningTinker() -> Bool {
if (self.connected && self.functions.contains("digitalread") && self.functions.contains("digitalwrite") && self.functi... | apache-2.0 | db480ea5bf8239dd90794241566e72e3 | 35.922156 | 197 | 0.562115 | 4.68541 | false | false | false | false |
ObjectAlchemist/OOUIKit | Sources/Screen/ScreenOR.swift | 1 | 1717 | //
// ScreenOR.swift
// OOSwift
//
// Created by Karsten Litsche on 01.09.17.
//
//
import UIKit
import OOBase
/**
A screen container that displays primary OR secondary child content depending on condition.
The container listens for changes in the adapter and updates content automatically.
*/
public final clas... | mit | 9bb62b76c31c4599e3ec92ab390d0ca0 | 30.796296 | 184 | 0.695399 | 5.110119 | false | false | false | false |
sekouperry/bemyeyes-ios | BeMyEyes/Source/Other sources/KeychainAccess/Keychain.swift | 2 | 136516 | //
// Keychain.swift
// KeychainAccess
//
// Created by kishikawa katsumi on 2014/12/24.
// Copyright (c) 2014 kishikawa katsumi. All rights reserved.
//
import Foundation
import Security
public let KeychainAccessErrorDomain = "com.kishikawakatsumi.KeychainAccess.error"
public enum ItemClass {
case GenericPa... | mit | 2e18d19f7ffc19a787fbd1c59bf79007 | 33.009965 | 188 | 0.603636 | 5.86283 | false | false | false | false |
SeriousChoice/SCSwift | SCSwift/Form/SCAttachmentTableCell.swift | 1 | 3539 | //
// SCAttachmentTableCell.swift
// SCSwiftExample
//
// Created by Nicola Innocenti on 08/01/2022.
// Copyright © 2022 Nicola Innocenti. All rights reserved.
//
import UIKit
class SCAttachmentTableCell: UITableViewCell {
public var lblTitle: UILabel = {
let label = UILabel()
label.numbe... | mit | eed93eadb1bdf2dadbc400550096ad87 | 35.854167 | 126 | 0.651781 | 5.134978 | false | false | false | false |
michaello/Aloha | AlohaGIF/ImagePicker/ImageGallery/ImageGalleryView.swift | 1 | 8360 | import UIKit
import Photos
fileprivate func < <T: Comparable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case let (l?, r?):
return l < r
case (nil, _?):
return true
default:
return false
}
}
protocol ImageGalleryPanGestureDelegate: class {
func panGestureDidStart()
func panGestureDidCh... | mit | fbb72157f9b508649842bda0357d09cb | 31.529183 | 166 | 0.708612 | 5.066667 | false | true | false | false |
eleks/rnd-nearables-wearables | iOS/BeaconMe/BeaconMe/Model/Favorites.swift | 1 | 1792 | //
// Favorites.swift
// BeaconMe
//
// Created by Bogdan Shubravyi on 7/27/15.
// Copyright (c) 2015 Eleks. All rights reserved.
//
import UIKit
class Favorites {
private let favoritesKey = "Favorites"
private var cache: Array<String> = []
private var queue = dispatch_queue_create("favoritesQueu... | mit | 7607b4bf71172a600bdc1de58dc40ff3 | 23.547945 | 121 | 0.541295 | 4.559796 | false | false | false | false |
wjk/SwiftXPC | SwiftXPC/Transport/Connection.swift | 1 | 3458 | //
// Connection.swift
// DOS Prompt
//
// Created by William Kent on 7/28/14.
// Copyright (c) 2014 William Kent. All rights reserved.
//
import Foundation
import dispatch
import XPC
public final class XPCConnection : XPCObject {
public class func createAnonymousConnection() -> XPCConnection {
return... | mit | 7ee0517ff464cb977a62e02f8551eeb8 | 26.664 | 96 | 0.629555 | 4.580132 | false | false | false | false |
kiliankoe/catchmybus | catchmybus/ConnectionManager.swift | 1 | 3255 | //
// ConnectionManager.swift
// catchmybus
//
// Created by Kilian Koeltzsch on 13/01/15.
// Copyright (c) 2015 Kilian Koeltzsch. All rights reserved.
//
import Foundation
import SwiftyJSON
private let _ConnectionManagerSharedInstace = ConnectionManager()
class ConnectionManager {
// ConnectionManager is a si... | mit | 6272f17698cefc5c7e1f8a2eae5323b0 | 26.584746 | 141 | 0.742857 | 4.130711 | false | false | false | false |
hotpoor-for-Liwei/LiteOS_Hackathon | Hakcathon_170108_哆啦I梦_wifind/ios/hackhuawei/LoginViewController.swift | 2 | 6290 | //
// ViewController.swift
// hackhuawei
//
// Created by 曾兆阳 on 2017/1/2.
// Copyright © 2017年 曾兆阳. All rights reserved.
//
import UIKit
class LoginViewController: UIViewController, UITextFieldDelegate {
var backgroundView: UIImageView?
var whiteView: UIImageView?
var logoView: UIImageView?
... | bsd-3-clause | b0ab4e403f90444146bc0ecb718adc27 | 40.912752 | 146 | 0.621617 | 5.02818 | false | false | false | false |
pepibumur/Szimpla | Example/ServerTests/ServerSpec.swift | 1 | 2042 | import XCTest
import Quick
import Nimble
import Swifter
@testable import Szimpla
class ServerSpec: QuickSpec {
override func spec() {
var subject: Server!
var httpServer: MockServer!
beforeEach {
httpServer = MockServer()
subject = Server(server: h... | mit | b58193132bbaae84ace6abe47df95753 | 26.608108 | 109 | 0.528893 | 5.416446 | false | true | false | false |
googlearchive/cannonball-ios | Cannonball/Theme.swift | 1 | 2404 | //
// Copyright (C) 2018 Google, Inc. and other contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless require... | apache-2.0 | 6151994cf23b0751753adb8f76d7649a | 31.053333 | 109 | 0.612313 | 4.518797 | false | false | false | false |
JasonCanCode/CRUDE-Futures | Pods/BrightFutures/BrightFutures/Future.swift | 9 | 6532 | // The MIT License (MIT)
//
// Copyright (c) 2014 Thomas Visser
//
// 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, c... | mit | 757e15be54db72e0b5601772a9f41469 | 38.349398 | 112 | 0.660747 | 4.064717 | false | false | false | false |
airbnb/lottie-ios | Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift | 3 | 2527 | // Created by Cal Stephens on 12/20/21.
// Copyright © 2021 Airbnb Inc. All rights reserved.
import QuartzCore
// MARK: - BaseCompositionLayer
/// The base type of `AnimationLayer` that can contain other `AnimationLayer`s
class BaseCompositionLayer: BaseAnimationLayer {
// MARK: Lifecycle
init(layerModel: Laye... | apache-2.0 | 3f537292bac7a5d3e5d7e34416ed373e | 27.704545 | 93 | 0.715756 | 4.584392 | false | false | false | false |
victorchee/Live | Live/RTMP/Amf0.swift | 1 | 12147 | //
// Amf0.swift
// RTMP
//
// Created by VictorChee on 2016/12/21.
// Copyright © 2016年 VictorChee. All rights reserved.
//
import Foundation
class Amf0Data {
enum Amf0DataType:UInt8 {
case Amf0_Number = 0x00
case Amf0_Bool = 0x01
case Amf0_String = ... | mit | c4b7d555d4e9e0326220296def8d5817 | 30.231959 | 126 | 0.553639 | 4.564218 | false | false | false | false |
catalanjrj/BarMate | BarMate/BarMate/LoginViewController.swift | 1 | 2661 | //
// LoginViewController.swift
// BarMate
//
// Created by Jorge Catalan on 6/10/16.
// Copyright © 2016 Jorge Catalan. All rights reserved.
//
import UIKit
import Firebase
import FirebaseAuth
class LoginViewController: UIViewController {
@IBOutlet weak var emailTextField: UITextField!
@IBOutlet weak var... | cc0-1.0 | fe96369f29fe5f8ccca92bc6a818ab49 | 28.230769 | 139 | 0.542481 | 6.114943 | false | false | false | false |
ozpopolam/DoctorBeaver | DoctorBeaver/PetsRepository.swift | 1 | 8647 | //
// Repository.swift
// DoctorBeaver
//
// Created by Anastasia Stepanova-Kolupakhina on 11.05.16.
// Copyright © 2016 Anastasia Stepanova-Kolupakhina. All rights reserved.
//
import Foundation
import CoreData
protocol PetsRepositorySettable: class { // can get and set PetsRepository
var petsRepository: PetsR... | mit | cd834b9af1af1457b42a2dced45f554b | 26.803859 | 115 | 0.680777 | 5.119005 | false | false | false | false |
cdmx/MiniMancera | miniMancera/Model/Option/WhistlesVsZombies/Ground/MOptionWhistlesVsZombiesGround.swift | 1 | 611 | import Foundation
class MOptionWhistlesVsZombiesGround
{
private let lanes:[MOptionWhistlesVsZombiesGroundLane]
private let count:UInt32
init(area:MOptionWhistlesVsZombiesArea)
{
lanes = MOptionWhistlesVsZombiesGround.factoryLanes(area:area)
count = UInt32(lanes.count)
}
... | mit | c84abacd7bf334bd3e3151cb9aeddb2c | 24.458333 | 70 | 0.682488 | 4.736434 | false | false | false | false |
MBKwon/SwiftList | SwiftList/myList.swift | 1 | 3026 | //
// myList.swift
// SwiftList
//
// Created by Moonbeom KWON on 2017. 6. 15..
// Copyright © 2017년 mbkyle. All rights reserved.
//
import Foundation
indirect enum myList <A> {
case Nil
case Cons(A, myList<A>)
}
extension myList {
static func apply<T: NumericType>(values: T...) -> myList<T> {... | mit | 6eb67b8b127c5fba5fa5e34937dc9e55 | 19.153333 | 81 | 0.421436 | 3.967192 | false | false | false | false |
benlangmuir/swift | test/decl/circularity.swift | 4 | 3169 | // RUN: %target-typecheck-verify-swift
// N.B. Validating the pattern binding initializer for `pickMe` used to cause
// recursive validation of the VarDecl. Check that we don't regress now that
// this isn't the case.
public struct Cyclic {
static func pickMe(please: Bool) -> Int { return 42 }
public static let pi... | apache-2.0 | 4f2a4fea871038855af17ccaa149a6db | 25.630252 | 118 | 0.653203 | 3.572717 | false | false | false | false |
insanoid/SwiftyJSONAccelerator | Core/Generator/Model-File-Components/PropertyComponent.swift | 1 | 1368 | //
// PropertyComponent.swift
// SwiftyJSONAccelerator
//
// Created by Karthik on 09/07/2016.
// Copyright © 2016 Karthikeya Udupa K M. All rights reserved.
//
import Foundation
/// A strucutre to store various attributes related to a single property.
struct PropertyComponent {
/// Name of the property.
v... | mit | 55e3a770759e623d9bb9949f783659ae | 34.973684 | 111 | 0.651792 | 4.155015 | false | false | false | false |
Kametrixom/Swift-SyncAsync | SyncAsync.playground/Pages/toAsync.xcplaygroundpage/Contents.swift | 1 | 3685 | //: [Previous](@previous)
import XCPlayground
//: The `toAsync` function is the reverse of the `toSync` function. It takes a synchronous function and returns its asynchronous variant
//: Let's create a synchronous function
func add(a: Int, b: Int) -> Int {
return a + b
}
//: To make it asynchronous, just call `toAsync... | mit | 92d0001b16dc496f3d1ea284f92860c0 | 50.901408 | 653 | 0.733786 | 3.878947 | false | false | false | false |
jisudong/study | Study/Study/Study_RxSwift/Platform/DataStructures/Queue.swift | 1 | 4061 | //
// Queue.swift
// Study
//
// Created by syswin on 2017/7/31.
// Copyright © 2017年 syswin. All rights reserved.
//
struct Queue<T>: Sequence {
typealias Generator = AnyIterator<T>
private let _resizeFactor = 2
private var _storage: ContiguousArray<T?>
private var _count = 0
pr... | mit | ae373a82ea3584356c42bd048cc273e9 | 28.405797 | 183 | 0.537703 | 5.104403 | false | false | false | false |
overtake/TelegramSwift | Telegram-Mac/ColdStartPasslockController.swift | 1 | 3591 | //
// ColdStartPasslockController.swift
// Telegram
//
// Created by Mikhail Filimonov on 03.11.2020.
// Copyright © 2020 Telegram. All rights reserved.
//
import Cocoa
import TGUIKit
import SwiftSignalKit
class ColdStartPasslockController: ModalViewController {
private let valueDisposable = MetaDisposable()... | gpl-2.0 | 3c270a6656f7075547a65a736f3825a8 | 25.014493 | 116 | 0.572145 | 5.158046 | false | false | false | false |
popodidi/HTagView | HTagView/Classes/HTag.swift | 1 | 8793 | //
// HTag.swift
// Pods
//
// Created by Chang, Hao on 12/12/2016.
//
//
import UIKit
protocol HTagDelegate: class {
func tagClicked(_ sender: HTag)
func tagCancelled(_ sender: HTag)
}
public class HTag: UIView {
weak var delegate: HTagDelegate?
// MARK: - HTag Configuration
/**
Typ... | mit | 7b3314b8003c44be2f69732fec26eeb0 | 31.932584 | 178 | 0.599454 | 5.047646 | false | false | false | false |
lfaoro/Cast | Cast/PreferenceManager.swift | 1 | 2386 | //
// Created by Leonardo on 10/16/15.
// Copyright © 2015 Leonardo Faoro. All rights reserved.
//
import Cocoa
// Keys in a variable to avoid mistakes
private let gistServiceKey = "gistService"
private let imageServiceKey = "imageService"
private let shortenServiceKey = "shortenService"
private let recentActionsKe... | mit | ceb3ca1ed9dacd8a931dffff67ef0ae5 | 21.083333 | 74 | 0.731656 | 3.75 | false | false | false | false |
goktugyil/EZSwiftExtensions | Sources/TimePassed.swift | 1 | 1117 | //
// TimePassed.swift
// EZSwiftExtensions
//
// Created by Jaja Yting on 24/08/2018.
// Copyright © 2018 Goktug Yilmaz. All rights reserved.
//
import Foundation
public enum TimePassed {
case year(Int)
case month(Int)
case day(Int)
case hour(Int)
case minute(Int)
case second(Int)
... | mit | ae2900a5dc71cd41027c428aabd1aa01 | 20.056604 | 69 | 0.46147 | 4.227273 | false | false | false | false |
S1U/True-Random | True Random/True Random/RandomInteger.swift | 1 | 2010 | //
// RandomInteger.swift
// True Random
//
// Created by Stephen on 04/10/2017.
// Copyright © 2017 S1U. All rights reserved.
//
import Foundation
import SwiftyJSON
import Alamofire
class RandomInteger: NSObject {
private let apiURL = "https://api.random.org/json-rpc/1/invoke"
private let apiKey = "2296... | gpl-3.0 | 275c1119bf8202591aa0c126bbc62538 | 35.527273 | 117 | 0.460926 | 4.661253 | false | false | false | false |
huangboju/Moots | UICollectionViewLayout/Blueprints-master/Example-OSX/Common/Extensions/NSViewExtensions.swift | 1 | 1182 | import Cocoa
extension NSView {
static var defaultAnimationDuration: TimeInterval {
return 0.2
}
static var defaultAnimationTimingFunction: CAMediaTimingFunction {
return CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
}
static func animate(duration: TimeInte... | mit | 00b57de83e4e25560b0b26848d8f4fc3 | 38.4 | 108 | 0.654822 | 7.035714 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.