repo_name stringlengths 7 91 | path stringlengths 8 658 | copies stringclasses 125
values | size stringlengths 3 6 | content stringlengths 118 674k | license stringclasses 15
values | hash stringlengths 32 32 | line_mean float64 6.09 99.2 | line_max int64 17 995 | alpha_frac float64 0.3 0.9 | ratio float64 2 9.18 | autogenerated bool 1
class | config_or_test bool 2
classes | has_no_keywords bool 2
classes | has_few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cruzdiego/PannablePickerView | Example/PannablePickerView/AsAnInputViewTableViewController.swift | 1 | 1665 | //
// AsAnInputViewTableViewController.swift
// PannablePickerView
//
// Created by Diego Alberto Cruz Castillo on 12/26/15.
// Copyright © 2015 CocoaPods. All rights reserved.
//
import UIKit
import PannablePickerView
class AsAnInputViewTableViewController: UITableViewController{
//MARK: - Properties
//M... | mit | ec2f453ed56b9620bfee77c886704d98 | 31.627451 | 96 | 0.682692 | 4.521739 | false | false | false | false |
achinet/LEOTab | Pod/Classes/LEOCollectionViewController.swift | 1 | 4186 | import UIKit
public class LEOCollectionViewController: UIViewController {
public var collectionView : UICollectionView!
var layout : LEOCollectionViewFlowLayout!
public var leoNavigationBar : LEONavigationBar?
public var controllers : Array <UIViewController>? {
didSet {
if let... | mit | ea8f70a8ee61f80543f7b9e1a67e9606 | 42.164948 | 176 | 0.701147 | 6.520249 | false | false | false | false |
12207480/PureLayout | PureLayout/Example-iOS/Demos/iOSDemo4ViewController.swift | 1 | 4104 | //
// iOSDemo4ViewController.swift
// PureLayout Example-iOS
//
// Copyright (c) 2015 Tyler Fox
// https://github.com/smileyborg/PureLayout
//
import UIKit
import PureLayout
class iOSDemo4ViewController: UIViewController {
let blueLabel: UILabel = {
let label = UILabel.newAutoLayoutView()
... | mit | 72df97ec83b2103fd73c16966b5130ae | 43.129032 | 167 | 0.661062 | 5.523553 | false | false | false | false |
wwczwt/sdfad | PageController/PageController+ContainerView.swift | 1 | 1348 | //
// PageController+ContainerView.swift
// PageController
//
// Created by Hirohisa Kawasaki on 6/26/15.
// Copyright (c) 2015 Hirohisa Kawasaki. All rights reserved.
//
import UIKit
extension PageController {
class ContainerView: UIScrollView {
weak var controller: PageController? {
di... | mit | e7ff808df8a154bad14cb21292fd5539 | 22.258621 | 62 | 0.535608 | 5.835498 | false | true | false | false |
Sankra/ImageToImg | ImageToImg/HTMLGenerator.swift | 1 | 720 | import Foundation
open class HTMLGenerator {
let imageBasePath: String
let textAlign: String
public init() {
imageBasePath = "http://hjerpbakk.com/s/"
textAlign = "center"
}
open func imgHtml(_ imageName: String, width: CGFloat, height: CGFloat) -> String {
let imageUr... | mit | 5c2c103e6d7ffa1d078cbd06d7bd20c8 | 35 | 203 | 0.620833 | 4.186047 | false | false | false | false |
adudney/RaycastV2 | RaycastV2/Level1.swift | 1 | 3556 | //
// Level1.swift
// RaycastV2
//
// Created by Isaac Dudney on 7/11/15.
// Copyright (c) 2015 Andrew Dudney. All rights reserved.
//
import Foundation
func level1() -> Level {
//var level = Level(size: IRect(point1: IVector(x: 0, y: 0), point2: IVector(x: 100, y: 75)), walls:[], enemies:[], spawn: IVector(x... | mit | f6a4fe4f0e702fcd2dbd2f404aaee7aa | 66.113208 | 222 | 0.509843 | 2.941274 | false | false | false | false |
jokechat/swift3-novel | swift_novels/Pods/SnapKit/Source/ConstraintMaker.swift | 15 | 7224 | //
// SnapKit
//
// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
//
// 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 limi... | apache-2.0 | c0dcb0f63d4c68a4de84d6be6768198e | 34.067961 | 127 | 0.681617 | 5.539877 | false | false | false | false |
Explora-codepath/explora | Explora/SignUpViewController.swift | 1 | 5654 | //
// SignUpViewController.swift
// Explora
//
// Created by admin on 10/18/15.
// Copyright © 2015 explora-codepath. All rights reserved.
//
import UIKit
import Parse
import ParseFacebookUtilsV4
class SignUpViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var usernameField: UITextField... | mit | 038d2db801613240e060fa7fb2528699 | 41.825758 | 156 | 0.613833 | 5.48835 | false | false | false | false |
nikhilsinghmus/csound | iOS/Csound iOS Swift Examples/Csound iOS SwiftExamples/AudioInTestViewController.swift | 3 | 2883 | /*
AudioInTestViewController.swift
Nikhil Singh, Dr. Richard Boulanger
Adapted from the Csound iOS Examples by Steven Yi and Victor Lazzarini
This file is part of Csound iOS SwiftExamples.
The Csound for iOS Library is free software; you can redistribute it
and/or modify it under the terms of the GNU Less... | lgpl-2.1 | 7a4c276004dea4f3f1c23cb616950495 | 33.73494 | 137 | 0.682622 | 4.49766 | false | false | false | false |
jisudong/study | MyPlayground.playground/Pages/扩展.xcplaygroundpage/Contents.swift | 1 | 1662 | //: [Previous](@previous)
import Foundation
// 扩展
/*
* 添加计算型属性
扩展可以添加新的计算型属性,但是不可以添加存储型属性,也不可以为已有属性添加属性观察器
* 添加构造器
扩展能为类添加新的便利构造器,但是它们不能为类添加新的指定构造器或析构器。指定构造器和析构器必须总是由原始的类实现来提供。
结构体和枚举类型可以在扩展里添加指定构造器。
如果你使用扩展为一个值类型添加构造器,同时该值类型的原始实现中未定义任何定制的构造器且所有存储属性提供了默认值,那么我们就可以在扩展中的构造器里调用默认构造器和逐一成员构造器
如果你使用扩展提供了一个新的构造器,你... | mit | e194150924361329642dc811242a178c | 19.170213 | 88 | 0.683544 | 2.481675 | false | false | false | false |
harenbrs/swix | swixUseCases/swix-iOSb6/swix/matrix/matrix.swift | 2 | 5556 | //
// matrix2d.swift
// swix
//
// Created by Scott Sievert on 7/9/14.
// Copyright (c) 2014 com.scott. All rights reserved.
//
import Foundation
import Accelerate
struct matrix {
let n: Int
var rows: Int
var columns: Int
var count: Int
var shape: (Int, Int)
var flat:ndarray
var T:matri... | mit | 67b3058de9d0c472f966d4546ec0c2dd | 25.711538 | 86 | 0.444744 | 3.547893 | false | false | false | false |
argon/mas | Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift | 2 | 6995 | #if canImport(Darwin) && !SWIFT_PACKAGE
import class Foundation.NSObject
import typealias Foundation.TimeInterval
import enum Dispatch.DispatchTimeInterval
private func from(objcPredicate: NMBPredicate) -> Predicate<NSObject> {
return Predicate { actualExpression in
let result = objcPredicate.satisfies(({ ... | mit | 1804692a87393b1c4a73a36ba5181cb4 | 34.150754 | 113 | 0.556254 | 5.364264 | false | false | false | false |
niekang/WeiBo | WeiBo/Class/View/Main/VisitorView/VisitorView.swift | 1 | 9855 | //
// VisitorView.swift
// WeiBo
//
// Created by 聂康 on 2017/6/20.
// Copyright © 2017年 com.nk. All rights reserved.
//
import UIKit
class VisitorView: UIView {
var visitorInfoDictionary:[String:String]?{
didSet{
guard let imageName = visitorInfoDictionary?["image"],
... | apache-2.0 | 25aa3362c1cae22a27bd66e4c7155726 | 39.231405 | 122 | 0.368221 | 7.618153 | false | false | false | false |
dreamsxin/swift | test/SILGen/instrprof_operators.swift | 6 | 2058 | // RUN: %target-swift-frontend -parse-as-library -emit-silgen -profile-generate %s | FileCheck %s
// CHECK: sil hidden @[[F_OPERATORS:.*operators.*]] :
// CHECK: %[[NAME:.*]] = string_literal utf8 "{{.*}}instrprof_operators.swift:[[F_OPERATORS]]"
// CHECK: %[[HASH:.*]] = integer_literal $Builtin.Int64,
// CHECK: %[[NC... | apache-2.0 | a22761aaeec59489e0d290d6d814dce1 | 54.621622 | 127 | 0.576774 | 3.319355 | false | false | false | false |
mlilback/rc2SwiftClient | MacClient/session/sidebar/SidebarFileController.swift | 1 | 27382 | //
// SidebarFileController.swift
//
// Copyright ©2016 Mark Lilback. This file is licensed under the ISC license.
//
import Cocoa
import MJLLogger
import ReactiveSwift
import SwiftyUserDefaults
import Rc2Common
import Networking
import Model
class FileRowData: Equatable {
var sectionName: String?
var file: AppFi... | isc | a5a96ce023d626fbb09f070793f641a8 | 36.253061 | 181 | 0.715204 | 3.837561 | false | false | false | false |
freshteapot/learnalist-ios | learnalist-ios/learnalist-ios/AddEditNavigationController.swift | 1 | 4614 | import UIKit
class AddEditNavigationController: UINavigationController, UINavigationControllerDelegate {
var listType:String = "v0"
var editType:String = "new"
var uuid:String!
init(uuid: String, listType: String) {
super.init(nibName: nil, bundle: nil)
self.listType = listType
... | mit | 7c6e4440ec533d0e33f8ad793c2955ce | 35.912 | 253 | 0.64456 | 4.887712 | false | false | false | false |
cathandnya/Pixitail | pixiViewer/Classes/Widget/WidgetViewController.swift | 1 | 9056 | //
// WidgetViewController.swift
// pixiViewer
//
// Created by nya on 2014/10/14.
//
//
import UIKit
import NotificationCenter
let sectionHeaderHeight: CGFloat = 16
class WidgetViewController: UITableViewController, NCWidgetProviding {
fileprivate var activityViews = Dictionary<Int, UIActivityIndicatorView>(... | mit | 84d2a7dacc48867acdf4651a9da9a66c | 27.749206 | 177 | 0.699426 | 4.413255 | false | false | false | false |
Adorkable-forkable/SwiftRecord | Example-iOS/SwiftRecordExample/SwiftRecordExample/AppDelegate.swift | 1 | 6142 | //
// AppDelegate.swift
// SwiftRecordExample
//
// Created by Zaid on 5/8/15.
// Copyright (c) 2015 ark. All rights reserved.
//
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, di... | mit | 6a0655d1bb482f65042a3023bcd18d3c | 54.333333 | 290 | 0.716542 | 5.756326 | false | false | false | false |
cplaverty/KeitaiWaniKani | WaniKaniKit/Database/ResourceRepository.swift | 1 | 16684 | //
// ResourceRepository.swift
// WaniKaniKit
//
// Copyright © 2017 Chris Laverty. All rights reserved.
//
import FMDB
import os
public extension NSNotification.Name {
static let waniKaniAssignmentsDidChange = NSNotification.Name("waniKaniAssignmentsDidChange")
static let waniKaniLevelProgressionDidChange... | mit | 9c702647f6fde628e7952cb0c3fd2cf1 | 47.923754 | 256 | 0.619613 | 5.872228 | false | false | false | false |
Urinx/Device-9 | Device 9/Device 9/Constants.swift | 1 | 680 | //
// Constants.swift
// Device 9
//
// Created by Eular on 12/8/15.
// Copyright © 2015 Eular. All rights reserved.
//
import Foundation
let WXCode = "wx6349772cbf442ce6"
let AppDownload = "http://pre.im/cctv"
let Urinx = "http://urinx.github.io"
let ShareTimelineNotif = "shareToTimeline"
let ShareFriendNotif = ... | apache-2.0 | c2a3cb42f4ccf1a00be6aa711fe16397 | 27.727273 | 56 | 0.762282 | 2.731602 | false | false | false | false |
mentrena/SyncKit | Example/CoreData/SyncKitCoreDataExample/SyncKitCoreDataExample/Company/CoreData/CoreDataCompanyWireframe.swift | 1 | 2044 | //
// CoreDataCompanyWireframe.swift
// SyncKitCoreDataExample
//
// Created by Manuel Entrena on 21/06/2019.
// Copyright © 2019 Manuel Entrena. All rights reserved.
//
import UIKit
import CoreData
import SyncKit
class CoreDataCompanyWireframe: CompanyWireframe {
let navigationController: UINavigationCo... | mit | 3101ed989c80a82a6b2953abdcb73707 | 43.413043 | 211 | 0.658346 | 6.787375 | false | false | false | false |
peterk9/card-2.io-iOS-SDK-master | SampleApp-Swift/SampleApp-Swift/FinalViewController.swift | 1 | 1725 | //
// FinalViewController.swift
// RBCInstaBank
//
// Created by Kevin Peters on 2015-08-14.
// Copyright © 2015 Punskyy, Roman. All rights reserved.
//
import UIKit
class FinalViewController: UIViewController {
@IBOutlet weak var eSignBtn: UIButton!
@IBOutlet weak var label1: UILabel!
@IBOutlet weak ... | mit | f0928888c858f7fd815e1231b46badd6 | 29.785714 | 125 | 0.649072 | 4.364557 | false | false | false | false |
peacemoon/HanekeSwift | Haneke.playground/section-1.swift | 24 | 1111 | // Open this playground from the Haneke workspace after building the Haneke framework. See: http://stackoverflow.com/a/24049021/143378
import Haneke
/// Initialize a JSON cache and fetch/cache a JSON response.
func example1() {
let cache = Cache<JSON>(name: "github")
let URL = NSURL(string: "https://api.github... | apache-2.0 | bd5aa82653aa4a42d1d0d71c1748a85d | 33.71875 | 134 | 0.692169 | 3.504732 | false | false | false | false |
PseudoSudoLP/Bane | Carthage/Checkouts/Moya/Moya+RxSwift.swift | 1 | 3013 | //
// Moya+RxSwift.swift
// Moya
//
// Created by Andre Carvalho on 2015-06-05
// Copyright (c) 2015 Ash Furrow. All rights reserved.
//
import Foundation
import RxSwift
/// Subclass of MoyaProvider that returns Observable instances when requests are made. Much better than using completion closures.
public class ... | mit | ec8a4a4d30253d8a88a07061c2ce6449 | 43.970149 | 349 | 0.592433 | 5.6742 | false | false | false | false |
tourani/GHIssue | OAuth2PodApp/Profile.swift | 1 | 895 | //
// Profile.swift
// OAuth2PodApp
//
// Created by Sanjay on 1/25/17.
//
import UIKit
class Profile: NSObject {
var avatar_url: String
var created_at: String
var email: String
var followers: Int
var following: Int
var company: String
var location: String
var login: String
... | mit | dfb9daf3712b1a2204ebf208d68d3032 | 22.552632 | 181 | 0.622346 | 4.013453 | false | false | false | false |
shohei/firefox-ios | UITests/SearchTests.swift | 2 | 3114 | /* 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 WebKit
private let LabelPrompt = "Turn on search suggestions?"
private let HintSuggestio... | mpl-2.0 | f94d0f705a431832650871eab7f0a425 | 46.907692 | 111 | 0.735067 | 6.381148 | false | true | false | false |
wenghengcong/Coderpursue | BeeFun/Pods/SwiftyStoreKit/SwiftyStoreKit/SwiftyStoreKit.swift | 1 | 15893 | //
// SwiftyStoreKit.swift
// SwiftyStoreKit
//
// Copyright (c) 2015 Andrea Bizzotto (bizz84@gmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including w... | mit | 78833c3b3511afb9ae2259e5f0a6e6f6 | 49.595541 | 230 | 0.718134 | 5.483949 | false | false | false | false |
gogunskiy/The-Name | NameMe/Classes/UserInterface/ViewControllers/NMMenuViewController/views/NMSearchViewBaseCell.swift | 1 | 726 | //
// NMSearchViewBaseCell
// NameMe
//
// Created by Vladimir Gogunsky on 1/9/15.
// Copyright (c) 2015 Volodymyr Hohunskyi. All rights reserved.
//
import UIKit
enum ActionType: Int {
case nameChanged = 1
case originChanged = 2
case groupTypeChanged = 3
case sortTypeChanged = 4
}
class NMSearch... | mit | 1543897c357f640d7439ead0a2cfcc2b | 19.194444 | 75 | 0.687328 | 4.055866 | false | false | false | false |
shorlander/firefox-ios | Account/FxALoginStateMachine.swift | 8 | 9628 | /* 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 FxA
import Shared
import XCGLogger
import Deferred
// TODO: log to an FxA-only, persiste... | mpl-2.0 | b8faea1639a726c132fc63db36dd43e0 | 51.901099 | 159 | 0.555983 | 5.810501 | false | false | false | false |
debugsquad/Hyperborea | Hyperborea/Model/Settings/MSettingsBackgroundItem.swift | 1 | 829 | import UIKit
class MSettingsBackgroundItem
{
private let letter:NSAttributedString
var positionY:CGFloat
let positionX:CGFloat
let width:CGFloat
let height:CGFloat
let speedY:CGFloat
init(
letter:NSAttributedString,
positionX:CGFloat,
positionY:CGFloat,
... | mit | 23d61325b4ebe4e894a0050341becb51 | 19.725 | 41 | 0.570567 | 4.737143 | false | false | false | false |
criticalmaps/criticalmaps-ios | CriticalMapsKit/Sources/ApiClient/LocationsAndChatDataService.swift | 1 | 1214 | import Foundation
import SharedModels
// MARK: Interface
/// A Service to send and fetch locations and chat messages from the Criticl Maps API
public struct LocationsAndChatDataService {
public typealias Body = SendLocationAndChatMessagesPostBody
public var getLocationsAndSendMessages: @Sendable (Body) async thr... | mit | 3be5e46c0d3cf278ed252ea916659e6a | 28.609756 | 112 | 0.733937 | 4.289753 | false | false | false | false |
Harekaze/Harekaze-iOS | Harekaze/ViewControllers/Introduction/FindServerTableViewController.swift | 1 | 4951 | /**
*
* FindServerTableViewController.swift
* Harekaze
* Created by Yuki MIZUNO on 2018/02/11.
*
* Copyright (c) 2016-2018, Yuki MIZUNO
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*... | bsd-3-clause | 304824c6fdcef4c8b9bfb32bad9190fd | 35.404412 | 135 | 0.725914 | 4.275475 | false | false | false | false |
the-blue-alliance/the-blue-alliance-ios | tba-unit-tests/View Controllers/Match/MatchViewControllerTests.swift | 1 | 2104 | import XCTest
@testable import MyTBAKit
@testable import TBAData
@testable import The_Blue_Alliance
class MatchViewControllerTests: TBATestCase {
var match: Match {
return matchViewController.match
}
var matchViewController: MatchViewController!
override func setUp() {
super.setUp()
... | mit | 4e306652daccfbf9fdaf6a5f422297ac | 31.875 | 157 | 0.69249 | 5.119221 | false | true | false | false |
marinehero/LeetCode-Solutions-in-Swift | Solutions/Solutions/Easy/Easy_007_Reverse_Integer.swift | 4 | 1606 | /*
https://oj.leetcode.com/problems/reverse-integer/
#7 Reverse Integer
Level: easy
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Have you thought about this?
Here are some good questions to ask before coding. Bonus points for you if you have already thought through ... | mit | 71540dcc07afaa602b83332916aff267 | 24.507937 | 170 | 0.605853 | 3.625282 | false | false | false | false |
TabletopAssistant/DiceKit | DiceKit/FrequencyDistributionIndex.swift | 1 | 1665 | //
// FrequencyDistributionIndex.swift
// DiceKit
//
// Created by Brentley Jones on 8/1/15.
// Copyright © 2015 Brentley Jones. All rights reserved.
//
public struct FrequencyDistributionIndex<Outcome: FrequencyDistributionOutcomeType>: ForwardIndexType {
typealias OrderedOutcomes = [Outcome]
le... | apache-2.0 | adc6a3018378aae94785df5d1c919b3b | 31 | 105 | 0.688101 | 4.700565 | false | false | false | false |
EclipseSoundscapes/EclipseSoundscapes | EclipseSoundscapes/Features/Permissions/PermissionView.swift | 1 | 6730 | //
// PermissionView.swift
// EclipseSoundscapes
//
// Created by Arlindo Goncalves on 8/26/17.
//
// Copyright © 2017 Arlindo Goncalves.
// 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... | gpl-3.0 | 20e760829d72611151260eeacc48d55a | 36.803371 | 219 | 0.664586 | 5.148432 | false | false | false | false |
szpnygo/firefox-ios | Sync/LoginPayload.swift | 15 | 4080 | /* 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 XCGLogger
private let log = XCGLogger.defaultInstance()
public class Logi... | mpl-2.0 | c7b7798b9a59f4da62a0d50f393a2bd2 | 25.666667 | 88 | 0.56299 | 4.927536 | false | false | false | false |
xsown/SectorProgressView | SectorProgressView/SectorProgressView.swift | 1 | 5365 | //
// SectorProgressView.swift
// SectorProgressView
//
// Created by Shi Xu on 15/12/24.
// Copyright © 2015 Shi Xu. 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... | mit | d2f9737bbff71b268e6f7b64d42ccac8 | 40.581395 | 464 | 0.664802 | 4.975881 | false | false | false | false |
MisterPear/CheckerboardView | Example/CheckerboardView/ViewController.swift | 1 | 1431 | //
// ViewController.swift
// CheckerboardView
//
// Created by Patryk Gruszka on 04/18/2017.
// Copyright (c) 2017 Patryk Gruszka. All rights reserved.
//
import UIKit
import CheckerboardView
class ViewController: UIViewController {
@IBOutlet weak var outletCheckerboardView: CheckerboardView!
... | mit | 88f49aa2b60e743c5a33fb9f8d0f07f3 | 25.018182 | 131 | 0.651992 | 4.336364 | false | false | false | false |
LeeMinglu/WeiBo_Swift3.0 | WeiBo_Swift3.0/WeiBo_Swift3.0/View/LSWeiboCell.swift | 1 | 3231 | //
// LSWeiboCell.swift
// WeiBo_Swift3.0
//
// Created by 李明禄 on 2016/11/28.
// Copyright © 2016年 SocererGroup. All rights reserved.
//
import UIKit
class LSWeiboCell: UITableViewCell {
var iconImageView: UIImageView!
var nameLabel: UILabel!
var vipView: UIImageView!
var picView: UIImageView!
... | apache-2.0 | 7d3e07af84d56c78e828c8573374ab38 | 29.769231 | 77 | 0.569063 | 4.804805 | false | false | false | false |
noxytrux/RescueKopter | RescueKopter/KPTGameViewController.swift | 1 | 18587 | //
// GameViewController.swift
// RescueKopter
//
// Created by Marcin Pędzimąż on 15.11.2014.
// Copyright (c) 2014 Marcin Pedzimaz. All rights reserved.
//
import UIKit
import Metal
import QuartzCore
#if os(tvOS)
import GameController
#else
import CoreMotion
#endif
let maxFramesToBuffer = 3
struct... | mit | 3e824e18a88a1aabe2a635e86ca019cc | 31.153979 | 159 | 0.560913 | 4.913802 | false | false | false | false |
joshua7v/ResearchOL-iOS | ResearchOL/Class/More/Controller/ROLMoreController.swift | 1 | 1241 | //
// ROLMoreController.swift
// ResearchOL
//
// Created by Joshua on 15/4/12.
// Copyright (c) 2015年 SigmaStudio. All rights reserved.
//
import UIKit
class ROLMoreController: SESettingViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.title = "设置"
self.... | mit | 4482dc7efc38c289a766ee278c41e74e | 31.243243 | 115 | 0.649623 | 3.873377 | false | false | false | false |
psturm-swift/SwiftySignals | Tests/SwiftySignalsTests/DispatchTests.swift | 1 | 4038 | // Copyright (c) 2017 Patrick Sturm <psturm.mail@googlemail.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 the rights
// to use, ... | mit | 515a6c5a328f5d1a3642cb8bfb351c7d | 38.203883 | 136 | 0.64314 | 5.143949 | false | true | false | false |
kyouko-taiga/LogicKit | Sources/LogicKit/Logger.swift | 1 | 2170 | public enum FontColor {
case red, green, yellow
}
public enum FontAttribute {
case bold
case dim
case foreground(FontColor)
case background(FontColor)
}
public protocol Logger {
func didBacktrack()
func willRealize(goal: Term)
func willAttempt(clause: Term)
}
public struct DefaultLogger: Logger... | mit | 002434111b14d5f087890ad19a89dc1f | 23.111111 | 89 | 0.632719 | 3.840708 | false | false | false | false |
RxSwiftCommunity/RxSwiftExt | Tests/RxSwift/MapAtTests.swift | 2 | 1277 | //
// MapToKeyPath.swift
// RxSwiftExt
//
// Created by Michael Avila on 2/8/18.
// Copyright © 2018 RxSwift Community. All rights reserved.
//
import XCTest
import RxSwift
import RxSwiftExt
import RxTest
class MapAtTests: XCTestCase {
struct Person {
let name: String
}
let people: [Person] ... | mit | b7acb212c731358dd05bc53eb54300d9 | 21.385965 | 67 | 0.594044 | 4.354949 | false | true | false | false |
superman-coder/pakr | pakr/pakr/Preferences/AuthenPreferences.swift | 1 | 1418 | //
// AuthenPreferences.swift
// pakr
//
// Created by Huynh Quang Thao on 4/17/16.
// Copyright © 2016 Pakr. All rights reserved.
//
import Foundation
enum LoginMechanism: Int{
case NONE = 0
case FACEBOOK
case GOOGLE
}
let loginMechanismPref = "LoginMechanismPref"
let kUserDataKey = "UserData"
exte... | apache-2.0 | bd16cb67df7bcc0c6d211038a11e599e | 25.754717 | 102 | 0.630205 | 4.36 | false | false | false | false |
OneBusAway/onebusaway-iphone | Carthage/Checkouts/SwiftEntryKit/Example/SwiftEntryKit/Playground/Cells/WidthSelectionTableViewCell.swift | 3 | 1647 | //
// WidthSelectionTableViewCell.swift
// SwiftEntryKit_Example
//
// Created by Daniel Huri on 4/25/18.
// Copyright (c) 2018 huri000@gmail.com. All rights reserved.
//
import UIKit
class WidthSelectionTableViewCell: SelectionTableViewCell {
override func configure(attributesWrapper: EntryAttributeWrapper) ... | apache-2.0 | fa256a432bc79b4192f7183ef2405c09 | 34.042553 | 179 | 0.64238 | 4.858407 | false | false | false | false |
tad-iizuka/swift-sdk | Tests/ToneAnalyzerV3Tests/ToneAnalyzerTests.swift | 2 | 7474 | /**
* Copyright IBM Corporation 2016
*
* 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... | apache-2.0 | b0e665dd64c669173d9e019be0081a9e | 37.725389 | 100 | 0.597404 | 5.193885 | false | true | false | false |
groue/GRDB.swift | Tests/GRDBTests/TableRecordUpdateTests.swift | 1 | 28626 | import XCTest
import GRDB
private struct Player: Codable, PersistableRecord, FetchableRecord, Hashable {
var id: Int64
var name: String
var score: Int
var bonus: Int
static func createTable(_ db: Database) throws {
try db.create(table: "player") { t in
t.autoIncrementedPrim... | mit | 66591cb23ed2d9a1c991d095316e330a | 40.973607 | 131 | 0.509991 | 4.73157 | false | false | false | false |
yzpniceboy/KeychainAccess | Examples/Example-iOS/Example-iOS/InputViewController.swift | 8 | 1328 | //
// InputViewController.swift
// Example
//
// Created by kishikawa katsumi on 2014/12/26.
// Copyright (c) 2014 kishikawa katsumi. All rights reserved.
//
import UIKit
import KeychainAccess
class InputViewController: UITableViewController {
@IBOutlet weak var saveButton: UIBarButtonItem!
@IBOutlet wea... | mit | cdb2e00dcfb82b2a5d9a2cf520084f54 | 26.102041 | 87 | 0.689759 | 5.207843 | false | false | false | false |
CaiMiao/CGSSGuide | DereGuide/Unit/Editing/View/MemberGroupView.swift | 1 | 8671 | //
// MemberEditableItemView.swift
// DereGuide
//
// Created by zzk on 2017/6/16.
// Copyright © 2017年 zzk. All rights reserved.
//
import UIKit
import SnapKit
class MemberEditableItemView: UIView {
var cardView: UnitSimulationCardView!
var overlayView: UIView!
var placeholderImageView: UIImageView!
... | mit | 49e94ca397ecaf1eca8213871ebd593f | 34.785124 | 125 | 0.624942 | 5.151695 | false | false | false | false |
jopamer/swift | test/Serialization/Recovery/typedefs.swift | 1 | 17515 | // RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-sil -o - -emit-module-path %t/Lib.swiftmodule -module-name Lib -I %S/Inputs/custom-modules -disable-objc-attr-requires-foundation-module -enable-objc-interop %s | %FileCheck -check-prefix CHECK-VTABLE %s
// RUN: %target-swift-ide-test -source-filename=x... | apache-2.0 | 5d78a579b5ce5955877811d521b6648f | 42.461538 | 240 | 0.72161 | 3.928892 | false | false | false | false |
lukevanin/OCRAI | CardScanner/Vertex.swift | 1 | 834 | //
// FragmentAnnotationVertex.swift
// CardScanner
//
// Created by Luke Van In on 2017/02/28.
// Copyright © 2017 Luke Van In. All rights reserved.
//
import Foundation
import UIKit
import CoreData
private let entityName = "Vertex"
extension Vertex {
var point: CGPoint {
get {
retu... | mit | c59b5c6f9863d2ac1da4414038bc14ed | 22.8 | 100 | 0.59904 | 4.103448 | false | false | false | false |
osorioabel/my-location-app | My Locations/My Locations/Controllers/MapViewController.swift | 1 | 6004 | //
// MapViewController.swift
// My Locations
//
// Created by Abel Osorio on 2/17/16.
// Copyright © 2016 Abel Osorio. All rights reserved.
//
import UIKit
import CoreData
import MapKit
class MapViewController: UIViewController {
var managedObjectContext: NSManagedObjectContext! {
didSet {... | mit | 9a5630a14aaacd0b4dc588dc3b43bfee | 34.311765 | 201 | 0.671498 | 5.605042 | false | false | false | false |
KagasiraBunJee/TryHard | TryHard/THVideoController.swift | 1 | 6233 | //
// THVideoController.swift
// TryHard
//
// Created by Sergey on 6/17/16.
// Copyright © 2016 Sergey Polishchuk. All rights reserved.
//
import UIKit
import AVFoundation
class THVideoController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate {
@IBOutlet weak var imageView: UIImageView!
... | mit | 1badf4b94f70fd1f1ba5e5fc9f896bb8 | 31.8 | 160 | 0.616656 | 5.104013 | false | false | false | false |
noraesae/kawa | kawa/ShortcutViewController.swift | 1 | 1284 | import Cocoa
class ShortcutViewController: NSViewController, NSTableViewDataSource, NSTableViewDelegate {
func numberOfRows(in tableView: NSTableView) -> Int {
return InputSource.sources.count
}
func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
let inpu... | mit | bdd85acbe4da7cb10740b47c69e49a2b | 37.909091 | 144 | 0.753115 | 5.055118 | false | false | false | false |
BanyaKrylov/Learn-Swift | Skill/Homework 14/Pods/RealmSwift/RealmSwift/RealmCollection.swift | 4 | 39692 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2014 Realm Inc.
//
// 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/li... | apache-2.0 | 8e6d5d3ef304371eb48ef480cb7b9cf2 | 37.312741 | 162 | 0.680187 | 4.708422 | false | false | false | false |
cpuu/OTT | OTT/Group2ViewController.swift | 1 | 3047 | //
// Group2ViewController.swift
// BlueCap
//
// Created by 박재유 on 2016. 6. 1..
// Copyright © 2016년 Troy Stribling. All rights reserved.
//
import UIKit
class Group2ViewController: UIViewController {
@IBOutlet weak var txtName: UITextField!
@IBOutlet weak var txtMarks: UITextField!
var is... | mit | b30ebf12ece53f9dd0b7d3c6a4974c22 | 31.319149 | 107 | 0.569783 | 5.004942 | false | false | false | false |
eurofurence/ef-app_ios | Packages/EurofurenceModel/Sources/XCTEurofurenceModel/FakeKnowledgeService.swift | 1 | 1806 | import EurofurenceModel
import Foundation
public class FakeKnowledgeService: KnowledgeService {
public init() {
}
public func add(_ observer: KnowledgeServiceObserver) {
}
private var stubbedKnowledgeEntries = [KnowledgeEntryIdentifier: FakeKnowledgeEntry]()
public func fetchKn... | mit | 7c498c5e169120dd017788e64c496479 | 27.21875 | 103 | 0.693245 | 5.522936 | false | false | false | false |
alsfox/ZYJModel | ZYJModel/TestModel.swift | 1 | 673 | //
// TestModel.swift
// ZYJModel
//
// Created by 张亚举 on 16/6/15.
// Copyright © 2016年 张亚举. All rights reserved.
//
import UIKit
class TestModel: ZYJModel {
var name = "张亚举"
var arr = NSArray()
var twoModel : TwoModel?
var thereModel : TwoModel?
var fourModel : TwoModel = TwoMo... | mit | 1394a210a7b75c4f325d8547ccac64a9 | 14.512195 | 55 | 0.531447 | 3.533333 | false | false | false | false |
stefanomondino/Raccoon | Example/Raccoon/ListViewModel.swift | 1 | 2228 | //
// ListViewModel.swift
// Raccoon
//
// Created by Stefano Mondino on 31/03/16.
// Copyright © 2016 CocoaPods. All rights reserved.
//
import Raccoon
import ReactiveCocoa
import Result
class ListViewModel: ViewModel {
var scheduler:Disposable?
var nextAction:Action<AnyObject, SegueParameters!, NoError... | mit | bbba5fc1b506d5f5b6931e8ef3c351b0 | 35.508197 | 137 | 0.631792 | 4.970982 | false | false | false | false |
brentdax/swift | stdlib/public/core/Builtin.swift | 1 | 34377 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | apache-2.0 | fc8118157dbd8416b05e5925c221b030 | 34.877871 | 95 | 0.690146 | 4.06613 | false | false | false | false |
mansoor92/MaksabComponents | MaksabComponents/Classes/Localization/Localization.swift | 1 | 471 | //
// Localization.swift
// Pods
//
// Created by Incubasys on 04/08/2017.
//
//
import Foundation
class Localization {
static let budgetRide = "budgetRide"
static let howMuchYouAreWillingToPay = "howMuchYouAreWillingToPay"
static let priceUnit = "priceUnit"
static let mehramRide = "Mehram Ride"
... | mit | 9667f4632309872ed3fa3fcb3ba55140 | 22.55 | 70 | 0.70276 | 3.541353 | false | false | false | false |
felipecarreramo/BSImagePicker | Pod/Classes/Controller/BSImagePickerViewController.swift | 1 | 11141 | // The MIT License (MIT)
//
// Copyright (c) 2015 Joakim Gyllström
//
// 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... | mit | a34d785e334164adbb711b433aa964b5 | 34.253165 | 220 | 0.635996 | 5.550573 | false | false | false | false |
jeffreybergier/WaterMe2 | WaterMe/WaterMe/ReminderVesselMain/ReminderVesselEdit/ReminderTableViewCell.swift | 1 | 4792 | //
// ReminderTableViewCell.swift
// WaterMe
//
// Created by Jeffrey Bergier on 6/18/17.
// Copyright © 2017 Saturday Apps.
//
// This file is part of WaterMe. Simple Plant Watering Reminders for iOS.
//
// WaterMe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General... | gpl-3.0 | 760d6747ac1e6e2942eee25cd72c0308 | 45.970588 | 157 | 0.697558 | 5.276432 | false | false | false | false |
AlexRamey/mbird-iOS | Pods/CVCalendar/CVCalendar/CVCalendarMenuView.swift | 1 | 4963 | //
// CVCalendarMenuView.swift
// CVCalendar
//
// Created by E. Mozharovsky on 12/26/14.
// Copyright (c) 2014 GameApp. All rights reserved.
//
import UIKit
public typealias WeekdaySymbolType = CVWeekdaySymbolType
public final class CVCalendarMenuView: UIView {
public var symbols = [String]()
public var... | mit | 8f916a41123aceec82d9a315fe0173ad | 31.437908 | 118 | 0.596212 | 4.889655 | false | false | false | false |
audrl1010/EasyMakePhotoPicker | Example/EasyMakePhotoPicker/FacebookCameraCell.swift | 1 | 1716 | //
// FacebookCameraCell.swift
// EasyMakePhotoPicker
//
// Created by myung gi son on 2017. 7. 6..
// Copyright © 2017년 CocoaPods. All rights reserved.
//
import RxSwift
import Photos
import PhotosUI
import EasyMakePhotoPicker
class FacebookCameraCell: BaseCollectionViewCell, CameraCellable {
var cameraIcon: U... | mit | 575e738ab4384881084900d071c708cc | 22.465753 | 85 | 0.669002 | 4.22963 | false | false | false | false |
aiaio/DesignStudioExpress | DesignStudioExpress/Views/TimerViewController.swift | 1 | 7449 | //
// TimerViewController.swift
// DesignStudioExpress
//
// Created by Kristijan Perusko on 12/3/15.
// Copyright © 2015 Alexander Interactive. All rights reserved.
//
import UIKit
import FXLabel
import MZTimerLabel
import DKCamera
import AVFoundation
class TimerViewController: UIViewControllerBase, MZTimerLabel... | mit | 64fed68cc403189a21e91f4a8b714b8b | 32.701357 | 157 | 0.660177 | 5.397101 | false | false | false | false |
makezwl/zhao | Nimble/Matchers/Equal.swift | 80 | 3211 | import Foundation
/// A Nimble matcher that succeeds when the actual value is equal to the expected value.
/// Values can support equal by supporting the Equatable protocol.
///
/// @see beCloseTo if you want to match imprecise types (eg - floats, doubles).
public func equal<T: Equatable>(expectedValue: T?) -> NonNilM... | apache-2.0 | 87b86b274b9dc968dd5aabecf49d1c13 | 37.686747 | 100 | 0.651822 | 4.633478 | false | false | false | false |
jbourjeli/SwiftLabelPhoto | Photos++/PhotoDetailViewController.swift | 1 | 12428 | //
// PhotoDetailViewController.swift
// Photos++
//
// Created by Joseph Bourjeli on 9/9/16.
// Copyright © 2016 WorkSmarterComputing. All rights reserved.
//
import UIKit
import SwiftOverlays
class PhotoDetailViewController: UIViewController {
var photo: Photo!
var photoModelService: PhotoModelServ... | mit | 1f0f312488de699def4342413570f171 | 42.149306 | 178 | 0.661785 | 5.552726 | false | false | false | false |
pselle/macvimspeak | MacVimSpeak/KeyStrokes.swift | 1 | 1446 | //
// Grammar.swift
// MacVimSpeak
//
// Created by Pam Selle on 3/2/15.
// Copyright (c) 2015 The Webivore. All rights reserved.
//
import Foundation
import Dollar
// I'm not 100% sure what this is, but gotta have it!
let src = CGEventSourceCreate(CGEventSourceStateID(kCGEventSourceStateHIDSystemState)).takeReta... | mit | c006f7a5602551034415827edec9e497 | 26.807692 | 106 | 0.664592 | 3.856 | false | false | false | false |
kzaher/RxSwift | RxSwift/Traits/Infallible/Infallible+Operators.swift | 1 | 28852 | //
// Infallible+Operators.swift
// RxSwift
//
// Created by Shai Mishali on 27/08/2020.
// Copyright © 2020 Krunoslav Zaher. All rights reserved.
//
// MARK: - Static allocation
#warning("Infallible still needs a full test suite")
extension InfallibleType {
/**
Returns an infallible sequence that contain... | mit | 99a521cf19123ac0ff6df521a9ff0739 | 46.608911 | 320 | 0.7241 | 5.11724 | false | false | false | false |
mozilla-mobile/firefox-ios | Tests/SharedTests/NSURLExtensionsTests.swift | 2 | 19548 | // 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 UIKit
import XCTest
@testable import Shared
class NSURLExtensionsTests: XCTestCase {
func testRemovesHTTPFr... | mpl-2.0 | c0656b8f025b7e7301048d3091c7da9d | 37.556213 | 216 | 0.590956 | 3.743393 | false | true | false | false |
tbkka/swift-protobuf | Tests/SwiftProtobufTests/Test_MessageSet.swift | 6 | 8384 | // Tests/SwiftProtobufTests/Test_MessageSet.swift - Test MessageSet behaviors
//
// Copyright (c) 2014 - 2017 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/master/LICE... | apache-2.0 | 9478e901855966068d0fc0cbde5dc344 | 36.262222 | 106 | 0.692032 | 4.534343 | false | true | false | false |
kesun421/firefox-ios | Client/Utils/FaviconFetcher.swift | 1 | 13904 | /* 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 Storage
import Shared
import Alamofire
import XCGLogger
import Deferred
import SDWebImage
import Fuzi
impor... | mpl-2.0 | f8cab3114e5183768ab3ebc925369de9 | 42.173913 | 193 | 0.570997 | 5.042437 | false | false | false | false |
HabitRPG/habitrpg-ios | HabitRPG/UI/Support/FAQDetailViewController.swift | 1 | 1622 | //
// FAQDetailViewController.swift
// Habitica
//
// Created by Phillip Thelen on 13.08.20.
// Copyright © 2020 HabitRPG Inc. All rights reserved.
//
import Foundation
import Habitica_Models
import ReactiveSwift
import Down
class FAQDetailViewController: BaseUIViewController {
var index: Int = -1
... | gpl-3.0 | 44de4c1e2367b7bb11d9e1bfa4b7fa47 | 29.584906 | 107 | 0.658853 | 4.88253 | false | false | false | false |
digitrick/LocalizedStringSwift | LocalizedStringSwift/LocalizableString.swift | 1 | 1843 | //
// Localizable.swift
//
// Created by Kenta Nakae on 11/17/16.
// Copyright © 2016 digitrick. All rights reserved.
//
import Foundation
/// default language: System or English
public let defaultLanguageIdentifier = Bundle.main.preferredLocalizations.first ?? "en"
/// default table name: Localizable.strings
pub... | mit | a4d916cbe598410ce857fe2c1136b6bc | 35.84 | 189 | 0.687839 | 4.75969 | false | false | false | false |
zmeyc/GRDB.swift | Tests/GRDBTests/RecordInitializersTests.swift | 1 | 4281 | import XCTest
#if USING_SQLCIPHER
import GRDBCipher
#elseif USING_CUSTOMSQLITE
import GRDBCustomSQLite
#else
import GRDB
#endif
// Tests about how minimal can class go regarding their initializers
// What happens for a class without property, without any initializer?
class EmptyRecordWithoutInitializer : ... | mit | 998f5804b7baf5f462babde572f150e6 | 34.675 | 107 | 0.644943 | 4.381781 | false | false | false | false |
uasys/swift | test/SILGen/pointer_conversion.swift | 3 | 28107 | // RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
// FIXME: rdar://problem/19648117 Needs splitting objc parts out
// XFAIL: linux
import Foundation
func sideEffect1() -> Int { return 1 }
func sideEffect2() -> Int { return 2 }
func takesMutablePointer(_ ... | apache-2.0 | 9799f4f356713479297661ebf6e2243f | 59.706263 | 260 | 0.644395 | 3.667885 | false | false | false | false |
nathawes/swift | test/InterfaceHash/added_private_struct_property-type-fingerprints.swift | 6 | 2445 | // REQUIRES: shell
// Also uses awk:
// XFAIL OS=windows
// When adding a private protocol method, the interface hash should stay the same
// The per-type fingerprint should change
// RUN: %empty-directory(%t)
// RUN: %{python} %utils/split_file.py -o %t %s
// RUN: cp %t/{a,x}.swift
// RUN: %target-swift-frontend -ty... | apache-2.0 | 95dde3d6c72d3b3023b4000dc46b0491 | 42.660714 | 159 | 0.701431 | 3.468085 | false | false | false | false |
feighter09/Cloud9 | Pods/Bond/Bond/Bond+UIBarItem.swift | 4 | 3157 | //
// Bond+UIBarItem.swift
// Bond
//
// The MIT License (MIT)
//
// Copyright (c) 2015 Srdan Rasic (@srdanrasic)
//
// 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 restrict... | lgpl-3.0 | 6d120cc6aae4d8cc9ddbf7b2953a4a72 | 39.474359 | 129 | 0.702882 | 4.12141 | false | false | false | false |
coolmacmaniac/swift-ios | DesignPatterns/DesignPatterns/AbstractFactory/DPOctal.swift | 1 | 988 | //
// DPOctal.swift
// DesignPatterns
//
// Created by Sourabh on 28/06/17.
// Copyright © 2017 Home. All rights reserved.
//
import Foundation
/**
Specifies the type for a number that has to be coverted to octal format
*/
struct DPOctal: DPBaseNumber {
/// To hold the decimal input value
private var value: I... | gpl-3.0 | 83ed5d24613ebd5cfe1e65ae0c85980f | 23.073171 | 75 | 0.700101 | 3.5 | false | false | false | false |
gnachman/iTerm2 | iTermFileProvider/Paginator.swift | 2 | 3610 | //
// Paginator.swift
// FileProvider
//
// Created by George Nachman on 6/8/22.
//
import Foundation
import FileProvider
import FileProviderService
struct Paginator {
private let path: String
private let sorting: FileSorting?
private var service: RemoteService
private(set) var page: Page
priva... | gpl-2.0 | 9478554eefa4f932f9b4ac93f0f7b68c | 28.834711 | 167 | 0.518283 | 5.277778 | false | false | false | false |
SteveKueng/SplashBuddy | SplashBuddy/Controller/Regexes.swift | 1 | 1488 | //
// Regexes.swift
// CasperWait
//
// Created by François on 10/02/16.
// Copyright © 2016 François Levaux. All rights reserved.
//
import Foundation
/**
Initialize Regexes
- returns: A Dictionary of status: regex
*/
func initRegex() -> Dictionary<Software.SoftwareStatus, NSRegularExpression?> {
... | apache-2.0 | 11431e6763614f54ad2e21ccfea067ad | 17.333333 | 87 | 0.506397 | 4.279539 | false | false | false | false |
alloyapple/Goose | Sources/Goose/Product.swift | 1 | 4735 | //
// Created by color on 12/25/17.
//
import Foundation
/**
Returns an iterator-sequence for the Cartesian product of the sequences.
```
let values = product([1, 2, 3], [4, 5, 6, 7], [8, 9])
// [1, 4, 8], [1, 4, 9], [1, 5, 8], [1, 5, 9], [1, 6, 8], ... [3, 7, 9]
```
- Parameter sequences: The sequences from wh... | bsd-3-clause | 712163850fa40ae1027bdb86a187f270 | 34.343284 | 134 | 0.64773 | 4.332113 | false | false | false | false |
EvsenevDev/SmartReceiptsiOS | SmartReceipts/Persistence/Migrations/DatabaseMigration.swift | 2 | 2791 | //
// DatabaseMigration.swift
// SmartReceipts
//
// Created by Bogdan Evsenev on 30/03/2019.
// Copyright © 2019 Will Baumann. All rights reserved.
//
import Foundation
import FMDB
let DB_VERSION_UUID = 19
protocol DatabaseMigration {
var version: Int { get }
func migrate(_ database: Database) -> Bool
}... | agpl-3.0 | 1a55218d3c594ca60f0b54110d3e7bdd | 30.704545 | 110 | 0.611111 | 5.264151 | false | false | false | false |
mozilla-mobile/firefox-ios | Storage/ReadingList.swift | 2 | 2190 | // 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
func ReadingListNow() -> Timestamp {
return Timestamp(Date.timeIntervalSinceRefere... | mpl-2.0 | 75291dc883717330ddad1b219b0ee91c | 37.421053 | 165 | 0.690868 | 4.543568 | false | false | false | false |
benlangmuir/swift | test/expr/closure/closures.swift | 2 | 37761 | // RUN: %target-typecheck-verify-swift -disable-availability-checking
var func6 : (_ fn : (Int,Int) -> Int) -> ()
var func6a : ((Int, Int) -> Int) -> ()
var func6b : (Int, (Int, Int) -> Int) -> ()
func func6c(_ f: (Int, Int) -> Int, _ n: Int = 0) {}
// Expressions can be auto-closurified, so that they can be evaluat... | apache-2.0 | a4f3769d5352e20fc6ecc3b1c94f886a | 47.411538 | 382 | 0.647997 | 3.69952 | false | false | false | false |
malaonline/iOS | mala-ios/View/LiveCourseDetail/LiveCourseDetailTableView.swift | 1 | 4052 | //
// LiveCourseDetailTableView.swift
// mala-ios
//
// Created by 王新宇 on 16/10/20.
// Copyright © 2016年 Mala Online. All rights reserved.
//
import UIKit
class LiveCourseDetailTableView: UITableView, UITableViewDelegate, UITableViewDataSource {
let LiveCourseDetailCellReuseId = [
0: "LiveCourseD... | mit | d8c3d673e7ac9cb51f5eb45d20cd2d30 | 30.388889 | 134 | 0.615929 | 4.974843 | false | false | false | false |
CharlinFeng/Reflect | Reflect/JsonConvert.swift | 1 | 823 | //
// JsonConvert.swift
// Reflect
//
// Created by Charlin on 16/6/6.
// Copyright © 2016年 冯成林. All rights reserved.
//
import Foundation
let jsonStr = "{\"name\":null,\"age\":32}"
class CoachModel: Reflect {
var name: String?
var age: NSNumber?
static func parse(){
let d = jsonS... | mit | 9db812ec90e40019e43081c9bb1af5f3 | 21 | 129 | 0.571253 | 4.59887 | false | false | false | false |
malaonline/iOS | mala-ios/Controller/Course/CourseTableViewController.swift | 1 | 11671 | //
// CourseTableViewController.swift
// mala-ios
//
// Created by 王新宇 on 16/6/14.
// Copyright © 2016年 Mala Online. All rights reserved.
//
import UIKit
import DZNEmptyDataSet
private let CourseTableViewSectionHeaderViewReuseId = "CourseTableViewSectionHeaderViewReuseId"
private let CourseTableViewCellReuseId = ... | mit | 9d86a7d14e035cdcd0d4e1f2d37a4fc5 | 32.651652 | 156 | 0.610833 | 5.156926 | false | false | false | false |
nakau1/NerobluCore | NerobluCore/NBReflection.swift | 1 | 2611 | // =============================================================================
// NerobluCore
// Copyright (C) NeroBlu. All rights reserved.
// =============================================================================
import UIKit
// MARK: - NBReflection -
/// クラスについての処理を行うクラス
public class NBReflection {
... | apache-2.0 | f1a7a0bbce8be0e0c393a55150fcd684 | 26.406977 | 82 | 0.537123 | 4.285455 | false | false | false | false |
imzyf/99-projects-of-swift | 017-self-sizing-table-view-cells/017-self-sizing-table-view-cells/views/ArtistTableViewCell.swift | 1 | 757 | //
// ArtistTableViewCell.swift
// 017-self-sizing-table-view-cells
//
// Created by moma on 2017/11/10.
// Copyright © 2017年 yifans. All rights reserved.
//
import UIKit
class ArtistTableViewCell: UITableViewCell {
@IBOutlet weak var bioLabel: UILabel!
@IBOutlet weak var nameLabel: UILabel!
@IB... | mit | 9c477cf9b1827c8bf38863f516449046 | 28 | 93 | 0.669761 | 4.032086 | false | false | false | false |
graphcool-examples/react-apollo-auth0-example | quickstart-with-apollo/Instagram/Carthage/Checkouts/apollo-ios/Sources/ApolloStore.swift | 1 | 2757 | func rootKey<Operation: GraphQLOperation>(forOperation operation: Operation) -> CacheKey {
switch operation {
case is GraphQLQuery:
return "QUERY_ROOT"
case is GraphQLMutation:
return "MUTATION_ROOT"
default:
preconditionFailure("Unknown operation type")
}
}
protocol ApolloStoreSubscriber: class ... | mit | 1cf6a03efcc05b3cb89559ad286f6d15 | 31.435294 | 143 | 0.674646 | 4.625839 | false | false | false | false |
Adlai-Holler/Atomic | Atomic/Lock.swift | 1 | 1137 | //
// Lock.swift
// Atomic
//
// Created by Adlai Holler on 1/31/16.
// Copyright © 2016 Adlai Holler. All rights reserved.
//
import Darwin
final public class Lock {
internal var _lock = pthread_mutex_t()
/// Initializes the variable with the given initial value.
public init() {
let result =... | mit | 53ad348e11fb81de6118fc4d847d133e | 23.191489 | 99 | 0.590669 | 3.958188 | false | false | false | false |
904388172/-TV | DouYuTV/DouYuTV/Classes/Tools/Externsion/UIBarButton-Externsion.swift | 1 | 1544 | //
// UIBarButton-Externsion.swift
// DouYuTV
//
// Created by GS on 2017/10/19.
// Copyright © 2017年 Demo. All rights reserved.
//
import UIKit
//扩展
extension UIBarButtonItem {
/*
//扩展类方法
class func createItem(imageName: String, highImageName: String, size: CGSize) -> UIBarButtonItem {
let btn... | mit | c6fe21a5560c1dc5b9179fa17c0801f3 | 30 | 103 | 0.633692 | 4.090909 | false | false | false | false |
siddug/headout-video-discovery | headout/headout/Utilities/Constants.swift | 1 | 983 | //
// Constants.swift
// headout
//
// Created by varun jindal on 18/02/17.
// Copyright © 2017 headout. All rights reserved.
//
import Foundation
import UIKit
struct VideoConstants {
static let bufferSize = 5.0
}
struct LabelConstants {
static let characterSpacing: CGFloat = 7
static let paraSpacing... | mit | 020447988cf3e58a0591084148f5d4ae | 26.277778 | 74 | 0.742363 | 4.074689 | false | false | false | false |
pigigaldi/Pock | Pock/UI/DebugConsole/Controllers/DebugConsoleViewController/DebugConsoleViewController.swift | 1 | 5105 | //
// DebugConsoleViewController.swift
// Pock
//
// Created by Pierluigi Galdi on 26/06/21.
//
import Cocoa
class DebugConsoleViewController: NSViewController {
// MARK: Core
private lazy var lock = NSRecursiveLock()
// MARK: UI Elements
@IBOutlet private weak var textView: NST... | mit | ee4721dc60904511ab400d90be469972 | 29.740964 | 105 | 0.605722 | 5.25 | false | false | false | false |
CoolCodeFactory/Antidote | AntidoteArchitectureExample/UserContainerViewController.swift | 1 | 2203 | //
// UserContainerViewController.swift
// AntidoteArchitectureExample
//
// Created by Dima on 20/09/16.
// Copyright © 2016 Dmitry Utmanov. All rights reserved.
//
import UIKit
class UserContainerViewController: UIViewController {
@IBOutlet weak var usersContainerView: UIView!
@IBOutlet weak var userCo... | mit | f923c9332364faace4b79450a5106364 | 33.952381 | 167 | 0.70663 | 5.779528 | false | false | false | false |
HTWDD/htwcampus | HTWDD/Components/Schedule/Models/ScheduleDataSource.swift | 1 | 7777 | //
// ScheduleDataSource.swift
// HTWDD
//
// Created by Benjamin Herzog on 03/03/2017.
// Copyright © 2017 HTW Dresden. All rights reserved.
//
import UIKit
import RxSwift
protocol ScheduleDataSourceDelegate: class {
func scheduleDataSourceHasFinishedLoading()
func scheduleDataSourceHasUpdated()
}
class... | mit | 35f29915b662e1f99fe65cd2b06b3aeb | 34.824885 | 144 | 0.600592 | 4.457569 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.