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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
twobitlabs/AnalyticsKit | Providers/Mixpanel/AnalyticsKitMixpanelProvider.swift | 1 | 3441 | import Foundation
import Mixpanel
public class AnalyticsKitMixpanelProvider: NSObject, AnalyticsKitProvider {
@objc(initWithAPIKey:)
public init(withAPIKey apiKey: String) {
Mixpanel.sharedInstance(withToken: apiKey)
}
public func uncaughtException(_ exception: NSException) {
Mixpanel... | mit | d183638a6e76f364b97f8a5402d22b76 | 35.221053 | 115 | 0.641093 | 5.105341 | false | false | false | false |
hyperconnect/Bond | Bond/Bond+UICollectionView.swift | 1 | 7333 | //
// Bond+UICollectionView.swift
// Bond
//
// Created by Srđan Rašić on 06/03/15.
// Copyright (c) 2015 Bond. All rights reserved.
//
import UIKit
@objc class CollectionViewDynamicArrayDataSource: NSObject, UICollectionViewDataSource {
weak var dynamic: DynamicArray<DynamicArray<UICollectionViewCell>>?
@obj... | mit | 0e87af585d7000bec4b505199ec242b9 | 36.020202 | 598 | 0.685266 | 5.13665 | false | false | false | false |
brentsimmons/Evergreen | Shared/ArticleStyles/ArticleTheme.swift | 1 | 3115 | //
// ArticleTheme.swift
// NetNewsWire
//
// Created by Brent Simmons on 9/26/15.
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
//
import Foundation
struct ArticleTheme: Equatable {
static let defaultTheme = ArticleTheme()
static let nnwThemeSuffix = ".nnwtheme"
private static let defau... | mit | 797d6e95182886169db32722bbbbc18b | 29.23301 | 204 | 0.724791 | 3.667845 | false | false | false | false |
Baglan/MCViewport | MCViewport/ViewController.swift | 1 | 4748 | //
// ViewController.swift
// MCViewport
//
// Created by Baglan on 2/11/16.
// Copyright © 2016 Mobile Creators. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
class ViewController: UIViewController {
@IBOutlet weak var viewport: MCViewportWithScrollView!
override func vie... | mit | fb4626d0727ce1b2ba3880a6944814d8 | 33.151079 | 274 | 0.618496 | 4.491012 | false | false | false | false |
pascaljette/PokeBattleDemo | PokeBattleDemo/PokeBattleDemo/PokeApi/Connection/PokeApiConnection.swift | 1 | 3853 | // The MIT License (MIT)
//
// Copyright (c) 2015 pascaljette
//
// 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, cop... | mit | faa4073e704770c67f5b1397895924bd | 29.824 | 108 | 0.646769 | 5.137333 | false | false | false | false |
ITzTravelInTime/TINU | TINU/InstallingViewController.swift | 1 | 8482 | /*
TINU, the open tool to create bootable macOS installers.
Copyright (C) 2017-2022 Pietro Caruso (ITzTravelInTime)
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 2 of the License, or... | gpl-2.0 | 3dd213d2346806159f19c9d6111ab350 | 29.620939 | 216 | 0.723178 | 3.726714 | false | false | false | false |
mperovic/my41 | my41/Classes/SoundOutput.swift | 1 | 9490 | //
// SoundOutput.swift
// my41
//
// Created by Miroslav Perovic on 8/11/14.
// Copyright (c) 2014 iPera. All rights reserved.
//
import Foundation
enum SoundCmds: Int, Codable {
case nullCmd = 0
case quietCmd = 3
case flushCmd = 4
case reInitCm... | bsd-3-clause | 082a4c835a49f90ecf9e6be9ba64318b | 29.22293 | 105 | 0.665753 | 3.251113 | false | false | false | false |
chinabrant/BProgressHUD | BProgressHUD/LoadingView.swift | 1 | 2457 | //
// LoadingView.swift
// BProgressHUDDemo
//
// Created by brant on 2017/3/29.
// Copyright © 2017年 brant. All rights reserved.
//
import UIKit
import CoreGraphics
class LoadingView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
self.backgroundColor = UIColor.cle... | mit | 313d9a252e84c54e233e1546b4eccb0a | 33.289855 | 152 | 0.6306 | 4.301818 | false | false | false | false |
dzenbot/Iconic | Vendor/SwiftGen/GenumKit/Parsers/ColorsFileParser.swift | 1 | 5282 | //
// GenumKit
// Copyright (c) 2015 Olivier Halligon
// MIT Licence
//
import Foundation
import AppKit.NSColor
public protocol ColorsFileParser {
var colors: [String: UInt32] { get }
}
// MARK: - Private Helpers
private func parseHexString(hexString: String) -> UInt32 {
let scanner = NSScanner(string: hexStrin... | mit | 6862fba0698e2393ee38d95f98b4c2d1 | 28.674157 | 113 | 0.685346 | 4.39069 | false | false | false | false |
whitepixelstudios/Material | Sources/iOS/CollectionViewLayout.swift | 2 | 8910 | /*
* Copyright (C) 2015 - 2017, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.com>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain t... | bsd-3-clause | 2d4cc06c6c3578e9157b2ee0c95632e4 | 40.830986 | 213 | 0.659259 | 5.111876 | false | false | false | false |
danbennett/DBRepo | DBRepo/Repo/CoreData/NSManagedObjectContext+RepoQueryType.swift | 1 | 1388 | //
// NSManagedObjectContext+RepoQueryType.swift
// DBRepo
//
// Created by Daniel Bennett on 09/07/2016.
// Copyright © 2016 Dan Bennett. All rights reserved.
//
import Foundation
import CoreData
extension NSManagedObjectContext : RepoQueryType {
public func fetch<T : EntityType>(type : T.Type, predicat... | mit | 54a2c95f86fc679a0449e77c3645049f | 29.844444 | 141 | 0.62509 | 4.953571 | false | false | false | false |
danpratt/Simply-Zen | QuotesAPI Playground.playground/Contents.swift | 1 | 2291 | //: Playground - noun: a place where people can play
import UIKit
import PlaygroundSupport
// this line tells the Playground to execute indefinitely
PlaygroundPage.current.needsIndefiniteExecution = true
// MARK: - QOD
let urlString = "http://quotes.rest/qod.json?category=inspire"
let url = URL(string: urlString)
... | apache-2.0 | 841ca457a88b7a176fd5eb4d1cd90412 | 24.455556 | 118 | 0.60454 | 4.36381 | false | false | false | false |
SkyGrass/souyun | souyun/ListViewController.swift | 1 | 2336 | //
// ListViewController.swift
// souyun
//
// Created by SkyGrass on 16/5/26.
// Copyright © 2016年 SkyGrass. All rights reserved.
//
import UIKit
class ListViewController: UIViewController,UITableViewDelegate{
var searchword:String?
var apiclient:NewApiClient?
var showapirequest:ShowApiRequest?
v... | apache-2.0 | c29ea95381272c2adcfcd22b4bb70402 | 37.883333 | 151 | 0.635662 | 4.401887 | false | false | false | false |
mercadopago/px-ios | MercadoPagoSDK/MercadoPagoSDK/Services/MercadoPagoServices.swift | 1 | 14308 | import Foundation
// Se importa MLCardForm para reutilizar la clase de Reachability
import MLCardForm
class MercadoPagoServices: NSObject {
private var processingModes: [String] = PXServicesURLConfigs.MP_DEFAULT_PROCESSING_MODES
private var branchId: String?
private var baseURL: String! = PXServicesURLConf... | mit | 80a123ec3600aaf8aefb02e02f68f5a0 | 43.434783 | 430 | 0.571429 | 5.358801 | false | false | false | false |
hacktoolkit/hacktoolkit-ios_lib | Hacktoolkit/lib/Twitter/models/TwitterUser.swift | 1 | 5050 | //
// TwitterUser.swift
//
// Created by Hacktoolkit (@hacktoolkit) and Jonathan Tsai (@jontsai)
// Copyright (c) 2014 Hacktoolkit. All rights reserved.
//
import Foundation
var _currentTwitterUser: TwitterUser?
let TWITTER_CURRENT_USER_KEY = "kTwitterCurrentUserKey"
let TWITTER_USER_DID_LOGIN_NOTIFICATION = "twit... | mit | 865eff88fad52aea1bbe1ec79956b09a | 37.257576 | 142 | 0.55604 | 3.854962 | false | false | false | false |
fancymax/12306ForMac | 12306ForMac/TicketViewControllers/PassengerViewController.swift | 1 | 750 | //
// HorizontalListObjectViewController.swift
//
//
// Created by fancymax on 15/10/5.
//
//
import Cocoa
class PassengerViewController: NSViewController {
var passenger:PassengerDTO?
@IBOutlet weak var passengerCheckBox: NSButton!
override func viewDidLoad() {
super.viewDidLoa... | mit | faa26518c233c808c9ba76a96b6f41ff | 19.27027 | 59 | 0.594667 | 4.518072 | false | false | false | false |
yourtion/Demo_SwiftFaceDetection | SwiftFaceDetection/SwiftFaceDetection/ViewController.swift | 1 | 5149 | //
// ViewController.swift
// SwiftFaceDetection
//
// Created by YourtionGuo on 11/11/15.
// Copyright © 2015 Yourtion. All rights reserved.
//
import UIKit
import AVFoundation
class FaceViewController: UIViewController {
var previewLayer:AVCaptureVideoPreviewLayer!
var faceRectCALayer:CALayer!
... | apache-2.0 | af7039de2e788445502b930f37b16319 | 34.42069 | 162 | 0.626947 | 5.327801 | false | false | false | false |
XVimProject/XVim2 | XVim2/XVim/XVimHistoryHandler.swift | 1 | 736 | //
// XVimHistoryHandler.swift
// XVim2
//
// Created by pebble8888 on 2020/05/24.
// Copyright © 2020 Shuichiro Suzuki. All rights reserved.
//
import Foundation
@objc class XVimHistoryHandler: NSObject {
private var history: [String] = []
@objc public func addEntry(_ entry: String) {
history.in... | mit | 62acb4af57e37f0e5fe51c960f5922cb | 21.272727 | 71 | 0.514286 | 4.129213 | false | false | false | false |
nanthi1990/LocationPicker | LocationPicker/Location.swift | 1 | 1291 | //
// Location.swift
// LocationPicker
//
// Created by Almas Sapargali on 7/29/15.
// Copyright (c) 2015 almassapargali. All rights reserved.
//
import Foundation
import CoreLocation
import AddressBookUI
// class because protocol
public class Location: NSObject {
public let name: String?
// difference from ... | mit | c7f3e4e19689de6884469fbafe14505d | 22.925926 | 82 | 0.72347 | 3.924012 | false | false | false | false |
jkolb/Lilliput | Sources/Lilliput/MemoryBuffer.swift | 1 | 1688 | /*
The MIT License (MIT)
Copyright (c) 2018 Justin Kolb
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, ... | mit | 2e935dc3080f55513bc62cc37b11da27 | 39.190476 | 142 | 0.73519 | 4.921283 | false | false | false | false |
cocoaswifty/V2EX | V2EX/Connect.swift | 1 | 3296 | //
// Connect.swift
// V2EX
//
// Created by jianhao on 2016/9/18.
// Copyright © 2016年 cocoaswifty. All rights reserved.
//
import Foundation
import Alamofire
enum ConnectError: Error {
case BadURL(message: String)
// case missAccessToken(name: ApiName, message: String)
case Failure
}
enum ApiT... | apache-2.0 | 513f66ab18101bfc2590829e50bbffb2 | 29.775701 | 162 | 0.47768 | 4.492497 | false | false | false | false |
dalequi/yelpitoff | Demo/OAuthSwift/OAuthSwift/OAuthSwiftCredential.swift | 1 | 6530 | //
// OAuthSwiftCredential.swift
// OAuthSwift
//
// Created by Dongri Jin on 6/22/14.
// Copyright (c) 2014 Dongri Jin. All rights reserved.
//
import Foundation
public class OAuthSwiftCredential: NSObject, NSCoding {
public enum Version {
case OAuth1, OAuth2
public var shortVersion ... | mit | 22df12433dd72e2a3db72d7e6722f758 | 43.121622 | 151 | 0.665237 | 5.24498 | false | false | false | false |
tensorflow/swift-models | Examples/GPT2-WikiText2/main.swift | 1 | 2374 | // Copyright 2020 The TensorFlow Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b... | apache-2.0 | ddfdfeaf2ff105f5598e8090b5ecf1c5 | 35.523077 | 105 | 0.758214 | 3.885434 | false | false | false | false |
mzp/OctoEye | Sources/GithubAPI/FetchRepositories.swift | 1 | 2718 | //
// FetchRepositories.swift
// OctoEye
//
// Created by mzp on 2017/08/01.
// Copyright © 2017 mzp. All rights reserved.
//
import BrightFutures
import GraphQLicious
import Result
internal class InputObject: ArgumentValue {
private let values: [String:String]
init(_ values: [String:String]) {
s... | mit | d9785f72cbd4dc1791f887f8cbfc90f5 | 30.229885 | 88 | 0.48767 | 5.155598 | false | false | false | false |
cuappdev/podcast-ios | old/Podcast/EpisodeDetailHeaderView.swift | 1 | 7061 | //
// EpisodeDetailHeaderView.swift
// Podcast
//
// Created by Mark Bryan on 4/11/17.
// Copyright © 2017 Cornell App Development. All rights reserved.
//
import UIKit
protocol EpisodeDetailHeaderViewDelegate: class {
func episodeDetailHeaderDidPressPlayButton(view: EpisodeDetailHeaderView)
func episodeD... | mit | 3f1ebf98bd0c84ccdbe913ecdaecb142 | 42.04878 | 132 | 0.725921 | 5.43495 | false | false | false | false |
Pradeepkn/Mysore_App | MysoreApp/Network/TTNetwork/Managers/APIManager/APIManager.swift | 1 | 6413 | //
// APIManager.swift
// APIManager-Alamofire
//
// Created by Pradeep on 2/8/16.
// Copyright © 2016 Pradeep. All rights reserved.
//
import Foundation
import Alamofire
typealias ResponseHandler = (AnyObject?, NSError?) -> Void
class APIManager {
// Class Stored Properties
static let sharedInstanc... | mit | 7edff2d6b2af6898d5a4ab79eb2a6c75 | 44.475177 | 263 | 0.595446 | 6.249513 | false | false | false | false |
danielsawin/cordova-plugin-novelty-watchface | src/ios/Watchface.swift | 1 | 7226 | //
// Watchface.swift
//
//
// Created by Daniel Sawin on 10/19/17.
//
import Photos
@objc(Watchface) class Watchface : CDVPlugin {
class CustomPhotoAlbum {
var albumName = "Album Name"
var assetCollection: PHAssetCollection!
func load() {
if let assetCollect... | mit | dc39a59aaf438abeff097616fcce2ed0 | 36.832461 | 167 | 0.571409 | 5.937551 | false | false | false | false |
tryswift/trySwiftData | Example/Tests/NYC-2017/TKO2017ConferenceDays.swift | 1 | 1092 | //
// NYC2016ConferenceDays.swift
// TrySwiftData
//
// Created by Tim Oliver on 1/29/17.
// Copyright © 2017 NatashaTheRobot. All rights reserved.
//
import UIKit
import Foundation
import RealmSwift
import TrySwiftData
public let tko2017ConferenceDays: [ConferenceDay] = [
{
let day1 = ConferenceDay(... | mit | 2b6b5c670f6de3a457e639f701863622 | 26.275 | 91 | 0.594867 | 3.519355 | false | false | false | false |
realm/SwiftLint | Tests/SwiftLintFrameworkTests/SourceKitCrashTests.swift | 1 | 2498 | @testable import SwiftLintFramework
import XCTest
class SourceKitCrashTests: XCTestCase {
func testAssertHandlerIsNotCalledOnNormalFile() {
let file = SwiftLintFile(contents: "A file didn't crash SourceKitService")
file.sourcekitdFailed = false
var assertHandlerCalled = false
file.... | mit | 3c8f054995b4bb8646db76234295a884 | 39.95082 | 115 | 0.681745 | 5.349036 | false | true | false | false |
jellybeansoup/ios-melissa | Shared/CollectionViewCell.swift | 2 | 2514 | import UIKit
class CollectionViewCell: UICollectionViewCell {
var text: String? {
get {
return self.textLabel.text
}
set(text) {
self.textLabel.text = text
}
}
override func layoutSubviews() {
super.layoutSubviews()
self.upda... | bsd-2-clause | 8573685150ddfdcec67f6dc2f2e368fc | 32.078947 | 117 | 0.648767 | 5.099391 | false | false | false | false |
eugenegolovanov/SocketChat | SocketChat/UsersViewController.swift | 1 | 5782 | //
// UsersViewController.swift
// SocketChat
//
// Created by Gabriel Theodoropoulos on 1/31/16.
// Copyright © 2016 AppCoda. All rights reserved.
//
import UIKit
class UsersViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet weak var tblUserList: UITableView!
... | unlicense | 79e0d48ab287aaa6dfd9032fad43520c | 31.661017 | 151 | 0.512195 | 6.401993 | false | false | false | false |
Urinx/SublimeCode | Sublime/Sublime/GithubAccountTableViewController.swift | 1 | 5111 | //
// GithubAccountTableViewController.swift
// Sublime
//
// Created by Eular on 2/24/16.
// Copyright © 2016 Eular. All rights reserved.
//
import UIKit
import AASquaresLoading
class GithubAccountTableViewController: UITableViewController, GithubAPIManagerDelegate {
@IBOutlet weak var avatarView: UIIma... | gpl-3.0 | 61fcef6e164bba494ae61ea742e77371 | 33.295302 | 103 | 0.62407 | 4.718375 | false | false | false | false |
lkzhao/YetAnotherAnimationLibrary | Sources/YetAnotherAnimationLibrary/Animatables/CurveAnimatable.swift | 2 | 1912 | // The MIT License (MIT)
//
// Copyright (c) 2016 Luke Zhao <me@lkzhao.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
... | mit | 53e54554b406066f4d325a33b37f4dbf | 40.565217 | 80 | 0.683577 | 4.816121 | false | false | false | false |
Mozharovsky/XMLParser | XMLParser/Tree.swift | 2 | 3633 | //
// Tree.swift
// XMLParser
//
// Created by Eugene Mozharovsky on 8/29/15.
// Copyright © 2015 DotMyWay LCC. All rights reserved.
//
import Foundation
/// A generic data structure for chaining parsed values.
public class Tree<T> {
// MARK: - Properties
/// The previous tree if any. It shoul... | mit | eca1c2f9ad30ab45f625e16ab81932c3 | 24.942857 | 138 | 0.478524 | 4.349701 | false | false | false | false |
ayoubkhayatti/FlickrSearch | Flicker Search/FlickrPhoto.swift | 1 | 1837 | //
// FlickrPhoto.swift
// Flicker Search
//
// Created by Ayoub Khayatti on 28/03/16.
// Copyright © 2016 Ayoub Khayati. All rights reserved.
//
import UIKit
class FlickrPhoto: NSObject {
var id :String = ""
var owner :String = ""
var secret:String = ""
var server:String = ""
var farm... | mit | f8cbca5baea9b49648c40b3bf55b21b7 | 30.655172 | 88 | 0.560458 | 4.22069 | false | false | false | false |
brenogazzola/CabCentral | CabCentral/MapControllerAnnotations.swift | 1 | 6377 | //
// MapControllerAnnotations.swift
// CabCentral
//
// Created by Breno Gazzola on 8/30/15.
// Copyright (c) 2015 Breno Gazzola. All rights reserved.
//
import Foundation
import MapKit
extension MapController : MKMapViewDelegate {
// MARK: - CRUD
/**
Removes all annotations for drivers near the use... | mit | 27622a6785d920d4f01aab5c91861df6 | 33.657609 | 117 | 0.574565 | 5.239934 | false | false | false | false |
TomHarte/CLK | OSBindings/Mac/Clock Signal/Documents/AppleIIController.swift | 1 | 1028 | //
// AppleIIOptionsPanel.swift
// Clock Signal
//
// Created by Thomas Harte on 07/06/2021.
// Copyright 2021 Thomas Harte. All rights reserved.
//
class AppleIIController: MachineController {
var appleII: CSAppleII! {
get {
return self.machine.appleII
}
}
var squarePixelsUserDefaultsKey: String {
ret... | mit | 1d241ddab38f4c8f10d66c4bdb221648 | 26.783784 | 86 | 0.77821 | 3.893939 | false | false | false | false |
JuanjoArreola/YouTubePlayer | YouTubePlayer/Log.swift | 1 | 2304 | //
// Log.swift
// YouTubePlayer
//
// Created by Juan Jose Arreola Simon on 4/30/16.
// Copyright © 2016 juanjo. All rights reserved.
//
import Foundation
enum LogLevel: Int {
case debug = 1, warning, error, severe
}
class Log {
static var logLevel = LogLevel.debug
static var showDate = true
... | mit | af574ce296f1bd63431009d456b05345 | 34.984375 | 135 | 0.588363 | 4.068905 | false | false | false | false |
per-dalsgaard/20-apps-in-20-weeks | App 11 - TacoPOP/TacoPOP/Taco.swift | 1 | 1628 | //
// Taco.swift
// TacoPOP
//
// Created by Per Kristensen on 17/04/2017.
// Copyright © 2017 Per Dalsgaard. All rights reserved.
//
import Foundation
enum TacoShell: Int {
case Flour = 1
case Corn = 2
}
enum TacoProtein: String {
case Beef = "Beef"
case Chicken = "Chicken"
case Brisket = "B... | mit | 7f9668fcd3c5ca03b644a77381b4917b | 18.369048 | 88 | 0.531653 | 3.819249 | false | false | false | false |
domenicosolazzo/practice-swift | Views/TableViews/Providing basic content to a CollectionView/Providing basic content to a CollectionView/ViewController.swift | 1 | 2009 | //
// ViewController.swift
// Providing basic content to a CollectionView
//
// Created by Domenico Solazzo on 10/05/15.
// License MIT
//
import UIKit
class ViewController: UICollectionViewController {
// Section colors
let allSectionColors = [
UIColor.red,
UIColor.green,
UIColor.... | mit | 213bac4268a1abdc5ecac2644f9a75f2 | 30.390625 | 130 | 0.660528 | 5.74 | false | false | false | false |
VolodymyrShlikhta/InstaClone | InstaClone/Utilities.swift | 1 | 3790 | //
// Utilities.swift
// InstaClone
//
// Created by Relorie on 6/6/17.
// Copyright © 2017 Relorie. All rights reserved.
//
import Foundation
import UIKit
import SVProgressHUD
import FirebaseAuth
import FirebaseDatabase
import Kingfisher
class Utilities {
class func configureTextFieldsAppearence(_ textFields... | mit | 77980ff3fcc78878173932b93310d6e8 | 45.207317 | 183 | 0.68778 | 4.87018 | false | false | false | false |
hjw6160602/JourneyNotes | Pods/Kingfisher/Sources/Filter.swift | 7 | 4889 | //
// Filter.swift
// Kingfisher
//
// Created by Wei Wang on 2016/08/31.
//
// Copyright (c) 2017 Wei Wang <onevcat@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software wi... | mit | 028c1dcdc7ef80f0a0e41f6bdc2f8ef6 | 37.195313 | 118 | 0.660667 | 4.831028 | false | false | false | false |
QuarkX/Quark | Sources/Quark/Venice/Venice/Coroutine/Coroutine.swift | 1 | 2482 | import CLibvenice
public typealias PID = pid_t
public extension Double {
public var int64milliseconds: Int64 {
return Int64(self * 1000)
}
}
/// Runs the expression in a lightweight coroutine.
public func coroutine(_ routine: @escaping (Void) -> Void) {
var _routine = routine
CLibvenice.co(&_... | mit | ba64b5422627b043cca6b36bdb271bc7 | 27.204545 | 155 | 0.654714 | 3.866044 | false | false | false | false |
beeth0ven/CKSIncrementalStore | CKSIncrementalStore/CKSIncrementalStoreSyncOperation.swift | 1 | 31913 | // CKSIncrementalStoreSyncOperation.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2015 Nofel Mahmood (https://twitter.com/NofelMahmood)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to de... | mit | 04e225ab60e9051a22dc99ea83e74c09 | 47.281392 | 339 | 0.625952 | 6.063652 | false | false | false | false |
Legoless/iOS-Course | 2015-1/Lesson11/Stopwatch/Stopwatch/ViewController.swift | 1 | 3654 | //
// ViewController.swift
// Stopwatch
//
// Created by Dal Rupnik on 15/11/15.
// Copyright © 2015 Unified Sense. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var timerLabel: UILabel!
@IBOutlet weak var startButton: UIButton!
var currentTime = 0.0... | mit | cf9fb973f4e3eb6a9bda5cd9cc5f827f | 24.725352 | 151 | 0.539557 | 5.628659 | false | false | false | false |
peterlafferty/LuasLife | Carthage/Checkouts/Decodable/Tests/MissingKeyOperatorTests.swift | 1 | 1270 | //
// missingKeyOperatorTests.swift
// Decodable
//
// Created by Johannes Lund on 2015-12-20.
// Copyright © 2015 anviking. All rights reserved.
//
import XCTest
import Decodable
class missingKeyOperatorTests: XCTestCase {
func testMissingKey() {
// Should return nil
let dictionary: NSDi... | mit | 0d88d9062fbadfe2c60f986413d3b644 | 26 | 70 | 0.564224 | 4.46831 | false | true | false | false |
Piwigo/Piwigo-Mobile | piwigoKit/Upload/UploadVars.swift | 1 | 10694 | //
// UploadVars.swift
// piwigoKit
//
// Created by Eddy Lelièvre-Berna on 01/06/2021.
// Copyright © 2021 Piwigo.org. All rights reserved.
//
import Foundation
// MARK: - Privacy Levels
public enum kPiwigoPrivacy : Int16 {
case everybody = 0
case adminsFamilyFriendsContacts = 1
case adminsFamilyFrie... | mit | 00fbef2d806db30c69c1c55694b5b899 | 39.679389 | 151 | 0.647213 | 4.493255 | false | false | false | false |
huonw/swift | benchmark/single-source/Substring.swift | 6 | 8162 | //===--- Substring.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/L... | apache-2.0 | 01d882094d4f7435664d92cbc7b5f145 | 28.474453 | 159 | 0.666295 | 3.348259 | false | false | false | false |
abiaoLHB/LHBWeiBo-Swift | LHBWeibo/LHBWeibo/MainWibo/Compose/ComposeTitleView.swift | 1 | 1428 | //
// ComposeTitleView.swift
// LHBWeibo
//
// Created by LHB on 16/8/24.
// Copyright © 2016年 LHB. All rights reserved.
//
import UIKit
import SnapKit
class ComposeTitleView: UIView {
private lazy var titleLabel : UILabel = UILabel()
private lazy var screenNameLabel : UILabel = UILabel()
overri... | apache-2.0 | ef95608e9e5969e63d37003136fad4d8 | 25.461538 | 86 | 0.633455 | 4.435484 | false | false | false | false |
yanif/circator | MetabolicCompassKit/PreviewManager.swift | 1 | 14295 | //
// PreviewManager.swift
// MetabolicCompass
//
// Created by Sihao Lu on 11/22/15.
// Copyright © 2015 Yanif Ahmad, Tom Woolf. All rights reserved.
//
import HealthKit
import SwiftyUserDefaults
private let PMSampleTypesKey = DefaultsKey<[NSData]?>("previewSampleTypes")
private let PMManageSampleTypesKey = Defa... | apache-2.0 | a7989eec11fa132fc90f3123c6b43efa | 50.602888 | 150 | 0.70687 | 6.25558 | false | false | false | false |
UberJason/PlaidClient | PlaidClient/PlaidAccount.swift | 1 | 3210 | //
// PlaidAccount.swift
// InTheBlack
//
// Created by Nathan Mann on 12/5/15.
// Copyright © 2015 Nathan Mann. All rights reserved.
//
import UIKit
public struct PlaidAccount {
///The name of the account.
public let name: String?
///The official name of the account.
public let official... | mit | 6ee2e70018f5831661081a8c3996c2ed | 32.082474 | 187 | 0.600187 | 4.551773 | false | false | false | false |
YQqiang/Nunchakus | Nunchakus/Nunchakus/Base/ViewController/BaseViewController.swift | 1 | 1550 | //
// BaseViewController.swift
// Nunchakus
//
// Created by kjlink on 2017/3/21.
// Copyright © 2017年 sungrow. All rights reserved.
//
import UIKit
import SnapKit
class BaseViewController: UIViewController {
lazy var emptyDataView: EmptyDataView = {
let emptyDataV = EmptyDataView(frame: CGRect.z... | mit | e1ac7eff1d3a8461333f6dcc4dcf2f2b | 24.783333 | 107 | 0.621202 | 4.789474 | false | false | false | false |
pikachu987/PKCAlertView | PKCAlertView/Classes/PKCAlertView.swift | 1 | 11973 | //Copyright (c) 2017 pikachu987 <pikachu77769@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 without limitation the rights
//to use, copy, modify... | mit | 362c2d162566dc498ed0f2fe28ea74f4 | 39.449324 | 254 | 0.608369 | 5.064721 | false | false | false | false |
hshidara/iOS | A~Maze/A~Maze/GameViewController.swift | 1 | 2154 | //
// GameViewController.swift
// A~Maze
//
// Created by Hidekazu Shidara on 5/23/15.
// Copyright (c) 2015 Hidekazu Shidara. All rights reserved.
//
import UIKit
import SpriteKit
extension SKNode {
class func unarchiveFromFile(file : NSString) -> SKNode? {
if let path = NSBundle.mainBundle().pathFor... | mit | 70a593347ddba4d1d15f81bb9e0aec0a | 30.217391 | 104 | 0.625348 | 5.480916 | false | false | false | false |
dzenbot/Iconic | Vendor/SwiftGen/Pods/Commander/Sources/ArgumentDescription.swift | 1 | 8816 | public enum ArgumentType {
case Argument
case Option
}
public protocol ArgumentDescriptor {
typealias ValueType
/// The arguments name
var name:String { get }
/// The arguments description
var description:String? { get }
var type:ArgumentType { get }
/// Parse the argument
func parse(parser:Ar... | mit | 3fdfa75d62884a1e11f84cea7606224e | 24.40634 | 163 | 0.640994 | 4.302587 | false | false | false | false |
Rypac/hn | hn/HtmlParser.swift | 1 | 3211 | // swiftlint:disable cyclomatic_complexity
import Foundation
public struct HtmlParser {
public static func parse(_ html: String) -> FormattedString? {
var parser = HtmlParser(text: html)
return parser.parse()
}
private var tokenizer: HtmlTokenizer
private var result: String = ""
private var points: ... | mit | e429cc036e091acbf0014f18cd4fa434 | 26.921739 | 93 | 0.611336 | 4.18099 | false | false | false | false |
hovansuit/FoodAndFitness | FoodAndFitness/Services/FoodServices.swift | 1 | 2023 | //
// FoodServices.swift
// FoodAndFitness
//
// Created by Mylo Ho on 4/23/17.
// Copyright © 2017 SuHoVan. All rights reserved.
//
import Foundation
import Alamofire
import ObjectMapper
import RealmSwift
import RealmS
import SwiftyJSON
final class FoodServices {
var userFoodId: Int
init(userFoodId: In... | mit | 03bab38a3f200a06160b97b7c6fa68eb | 30.107692 | 115 | 0.585559 | 4.503341 | false | false | false | false |
uber/RIBs | ios/tutorials/tutorial3/TicTacToe/Root/RootRouter.swift | 1 | 2379 | //
// Copyright (c) 2017. Uber Technologies
//
// 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 ... | apache-2.0 | 5d52baf96e529f76c21c09a47d7e687e | 32.041667 | 91 | 0.715427 | 4.777108 | false | false | false | false |
BenziAhamed/Nevergrid | NeverGrid/Source/EntityFactory.swift | 1 | 23803 | //
// EntityFactory.swift
// gameninja
//
// Created by Benzi on 19/06/14.
// Copyright (c) 2014 Benzi Ahamed. All rights reserved.
//
import Foundation
import SpriteKit
// MARK: EntityFactory ------------------------------------------
class EntityFactory {
// MARK: EntityZIndex ------------------------... | isc | 9d1917eb99be38dc507f170de502ffa6 | 36.544164 | 133 | 0.549132 | 4.876665 | false | false | false | false |
sagittarius-90/conwaysgameoflife | conwaygame/engine/Engine.swift | 1 | 2059 | //
// GamEengine.swift
// conwaygame
//
// Created by Eni Sinanaj on 15/04/2017.
// Copyright © 2017 NewlineCode. All rights reserved.
//
import Foundation
class Engine {
var board: Array<Array<Bool>>
var gameSettings: GameSettings
init(_ cols: Int,_ rows: Int) {
board = Array<Any>()... | apache-2.0 | fa462bca0ad6d08641e6021db6a7ea0c | 26.44 | 157 | 0.501458 | 4.091451 | false | false | false | false |
danielmartin/swift | test/Syntax/round_trip_parse_gen.swift | 2 | 10549 | // RUN: rm -rf %t
// RUN: %swift-syntax-test -input-source-filename %s -parse-gen > %t
// RUN: diff -u %s %t
// RUN: %swift-syntax-test -input-source-filename %s -parse-gen -print-node-kind > %t.withkinds
// RUN: diff -u %S/Outputs/round_trip_parse_gen.swift.withkinds %t.withkinds
// RUN: %swift-syntax-test -input-sour... | apache-2.0 | 8b9f74d82083a22bf61cc9adfb8f5a55 | 17.677305 | 105 | 0.538637 | 2.846258 | false | false | false | false |
PrashantMangukiya/SwiftUIDemo | Demo2-UIButton/Demo2-UIButton/ViewController.swift | 1 | 1114 | //
// ViewController.swift
// Demo2-UIButton
//
// Created by Prashant on 25/09/15.
// Copyright © 2015 PrashantKumar Mangukiya. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
// number of click
var clickCount: Int = 0
// outlet - clickCount label
@IBOutlet var... | mit | 1da8a651667222a17c7f651dae7b3e2a | 23.195652 | 80 | 0.626235 | 4.797414 | false | false | false | false |
irisapp/das-quadrat | Source/Shared/DataCache.swift | 1 | 9187 | //
// DataCache.swift
// Quadrat
//
// Created by Constantine Fry on 01/12/14.
// Copyright (c) 2014 Constantine Fry. All rights reserved.
//
import Foundation
#if os(iOS)
import UIKit
#endif
/** Configs for data cache. */
struct DataCacheConfiguration {
/** Time to keep a data in cache in seconds. Defa... | bsd-2-clause | 6aadf8c64b5765662f371d1f6a794867 | 37.763713 | 115 | 0.60074 | 5.38827 | false | false | false | false |
KosyanMedia/Aviasales-iOS-SDK | AviasalesSDKTemplate/Source/HotelsSource/HotelDetails/Items/Overview/ExpandItem.swift | 1 | 670 | class ExpandItem: TableItem {
var title: String?
var height: CGFloat = 50.0
var shouldShowArrow = false
override func cellHeight(tableWidth: CGFloat) -> CGFloat {
return height
}
override func cell(tableView: UITableView, indexPath: IndexPath) -> UITableViewCell {
let cell = t... | mit | 0e1b2c5fceb0b7421157834bd9fa54ba | 25.8 | 128 | 0.629851 | 4.890511 | false | false | false | false |
IamAlchemist/DemoDynamicCollectionView | DemoDynamicCollectionView/SpringyCollectionViewLayout.swift | 1 | 5179 | //
// SpringyCollectionViewLayout.swift
// DemoDynamicCollectionView
//
// Created by Wizard Li on 1/5/16.
// Copyright © 2016 morgenworks. All rights reserved.
//
import UIKit
class SpringyCollectionViewLayout : UICollectionViewFlowLayout {
lazy var dynamicAnimator : UIDynamicAnimator = { [unowned self]... | mit | 91c3200aa37fac72b8a26bb2d06a4cbb | 35.723404 | 137 | 0.618192 | 5.811448 | false | false | false | false |
catalanjrj/BarMate | BarMate/BarMate/Drink.swift | 1 | 744 | //
// Drink.swift
// BarMate
//
// Created by Jorge Catalan on 6/16/16.
// Copyright © 2016 Jorge Catalan. All rights reserved.
//
import UIKit
class Drink {
var name = String()
var image = String()
var ingredients = String ()
var price = Float()
init() {
name = ""
image = ""
... | cc0-1.0 | b1ecb26ff0a99dc0324798ba2de62963 | 15.886364 | 56 | 0.507402 | 4.016216 | false | false | false | false |
mikina/Simple-custom-tab-bar | TabBarExample/SimpleCustomTabBar/SimpleCustomTabBar/SimpleCustomTabBar/SimpleCustomTabBarController.swift | 1 | 5719 | //
// SimpleCustomTabBarController.swift
// SimpleCustomTabBar
//
// Created by Mike Mikina on 3/23/16.
// Copyright © 2016 FDT. All rights reserved.
//
import UIKit
let kPageHasStartedTransition = "PageHasStartedTransition"
class SimpleCustomTabBarController: UIViewController {
var viewControllersCache: NSMut... | mit | f48f56ca4535be06b4958d4fe0cc76ad | 30.417582 | 134 | 0.689227 | 4.829392 | false | false | false | false |
natmark/ProcessingKit | ProcessingKitTests/CGPath+Extension/CGPath+Extension.swift | 1 | 4320 | //
// CGPath+Extension.swift
// ProcessingKitTests
//
// Created by AtsuyaSato on 2019/01/31.
// Copyright © 2019 Atsuya Sato. All rights reserved.
//
import CoreGraphics
extension CGPath: Equatable {
public static func ==(lhs: CGPath, rhs: CGPath) -> Bool {
if lhs.getPathElementsPoints().count != rhs.... | mit | aed0cf191f2831a77f0bb7725e9835aa | 37.221239 | 123 | 0.583468 | 4.604478 | false | false | false | false |
hooman/swift | stdlib/public/Concurrency/TaskGroup.swift | 1 | 28594 | //===----------------------------------------------------------------------===//
//
// 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 | 93913a8542af14e174e6c7f58780cf8f | 34.919598 | 106 | 0.678896 | 4.496304 | false | false | false | false |
mipstian/catch | Sources/App/Defaults.swift | 1 | 8761 | import Foundation
import os
private extension Int {
/// Maximum number of episodes per feed to keep in the download history.
///
/// - SeeAlso: `Defaults.downloadHistory`
/// - Note: this should be always higher than the number of episodes in a feed,
/// otherwise we'd end up re-downloading episodes... | mit | 9244892fba5d599fcfd22a6e30a826c6 | 32.060377 | 118 | 0.704942 | 4.574935 | false | false | false | false |
maranathApp/GojiiFramework | GojiiFrameWork/UIViewExtensions.swift | 1 | 34687 | //
// CGFloatExtensions.swift
// GojiiFrameWork
//
// Created by Stency Mboumba on 01/06/2017.
// Copyright © 2017 Stency Mboumba. All rights reserved.
//
import UIKit
import QuartzCore
// MARK: - Extensions UIView BSFramework
public extension UIView {
/* -----------------------------------------------... | mit | e35dd4c5fdb6097f3bf3f4d775157cca | 35.116667 | 158 | 0.532101 | 5.34402 | false | false | false | false |
wireapp/wire-ios | Wire-iOS/Sources/Navigator.swift | 1 | 5793 | //
// Wire
// Copyright (C) 2021 Wire Swiss GmbH
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This progr... | gpl-3.0 | caa60a7e78284eb4ea43ab8eed07fbdd | 37.364238 | 111 | 0.665113 | 5.673849 | false | false | false | false |
solinor/paymenthighway-ios-framework | PaymentHighway/UI/ExpiryDatePickerView.swift | 1 | 2443 | //
// DateExpiryPicker.swift
// PaymentHighway
//
// Created by Stefano Pironato on 25/09/2018.
// Copyright © 2018 Payment Highway Oy. All rights reserved.
//
import UIKit
private let numberOfYears = 15
class ExpiryDatePickerView: UIPickerView, UIPickerViewDelegate, UIPickerViewDataSource {
private var... | mit | 23bc2530d1a2abc9c14b574b4e70b334 | 27.729412 | 111 | 0.609746 | 4.696154 | false | false | false | false |
watson-developer-cloud/ios-sdk | Sources/DiscoveryV1/Models/CredentialDetails.swift | 1 | 15706 | /**
* (C) Copyright IBM Corp. 2018, 2020.
*
* 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 agre... | apache-2.0 | 3c9ec5297355d6e9af960e29c8e63bfb | 49.339744 | 145 | 0.670444 | 4.270256 | false | false | false | false |
TinyCrayon/TinyCrayon-iOS-SDK | TCMask/TCMaskView.swift | 1 | 12019 | //
// TCMaskView.swift
// TinyCrayon
//
// Created by Xin Zeng on 2/18/17.
//
//
import UIKit
/**
The module that displays a UIViewController for image masking.
A minimum implementation to present a TCMaskview within a UIViewController class is:
```
// Create TCMaskView, specifying the image for masking.
le... | mit | dd8c66fa6c6d3d77bc5c877ef9d95461 | 38.653465 | 292 | 0.660924 | 4.848668 | false | false | false | false |
benlangmuir/swift | test/SourceKit/SyntaxMapData/syntaxmap-multiple-edits.swift | 5 | 9931 | // RUN: %sourcekitd-test -req=open -print-raw-response %S/Inputs/syntaxmap-multiple-edits.swift == -req=edit -print-raw-response -pos=6:13 -length=1 -replace=" " %S/Inputs/syntaxmap-multiple-edits.swift == -req="edit" -pos=14:1 -length=0 -replace="let y = 2" -print-raw-response %S/Inputs/syntaxmap-multiple-edits.swift ... | apache-2.0 | 89d541368f41441ad2260006e0354a52 | 34.981884 | 726 | 0.624408 | 2.862785 | false | false | false | false |
Urinx/SomeCodes | Swift/The Swift Programming Language/10.Properties.playground/section-1.swift | 1 | 3274 |
// P.366
// Properties
struct FixedLengthRange {
var firstValue: Int
let length: Int
}
var rangeOfThreeItems = FixedLengthRange(firstValue: 0, length: 3)
rangeOfThreeItems.firstValue = 6
// Lazy Stored Properties
class DataImporter {
var fileName = "data.txt"
}
class dataManager {
lazy var importer ... | gpl-2.0 | 02965eeffa028c608344507c282f66c6 | 24.984127 | 87 | 0.619426 | 3.815851 | false | false | false | false |
BranchMetrics/iOS-Deferred-Deep-Linking-SDK | Branch-TestBed-Swift/TestBed-Swift/KeyValuePairTableViewController.swift | 1 | 4680 | //
// KeyValuePairTableViewController.swift
// TestBed-Swift
//
// Created by David Westgate on 8/29/16.
// Copyright © 2016 Branch Metrics. All rights reserved.
//
import UIKit
class KeyValuePairTableViewController: UITableViewController, UITextFieldDelegate, UITextViewDelegate {
// MARK: - Controls
... | mit | 998bc93238e3c11c55654740b959f085 | 31.047945 | 145 | 0.63069 | 5.485346 | false | false | false | false |
zalando/zmon-ios | zmon/controllers/NavigationVC.swift | 1 | 2611 | //
// NavigationVC.swift
// zmon
//
// Created by Andrej Kincel on 15/12/15.
// Copyright © 2015 Zalando Tech. All rights reserved.
//
import UIKit
class NavigationVC: UINavigationController {
weak var rootVC: RootVC?
// MARK: - Lifecycle
override func viewDidLoad() {
super.viewDidLoad()... | mit | 2949f1f6b5fb7387a85ca2c67a3b1237 | 29.705882 | 133 | 0.640613 | 5.199203 | false | false | false | false |
WickedColdfront/Slide-iOS | Slide for Reddit/SingleContentViewController.swift | 1 | 3159 | //
// SingleContentViewController.swift
// Slide for Reddit
//
// Created by Carlos Crane on 8/2/17.
// Copyright © 2017 Haptic Apps. All rights reserved.
//
import UIKit
class SingleContentViewController: SwipeDownModalVC, UIPageViewControllerDataSource, UIPageViewControllerDelegate {
var vCs: [UIViewContro... | apache-2.0 | 7f69c6788e484a2529af7e277dd41c5d | 31.895833 | 172 | 0.618429 | 6.003802 | false | false | false | false |
faimin/ZDOpenSourceDemo | ZDOpenSourceSwiftDemo/Pods/LayoutKit/Sources/Math/AxisFlexibility.swift | 8 | 1682 | // Copyright 2016 LinkedIn Corp.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// s... | mit | 7866fab347fa5bcf0d031aa057880c06 | 32 | 131 | 0.627824 | 4.875362 | false | false | false | false |
overtake/TelegramSwift | Telegram-Mac/InstantPageTextStyleStack.swift | 1 | 7929 | //
// InstantPageTextStyleStack.swift
// Telegram
//
// Created by keepcoder on 10/08/2017.
// Copyright © 2017 Telegram. All rights reserved.
//
import Cocoa
import TelegramCore
import TGUIKit
enum InstantPageTextStyle {
case fontSize(CGFloat)
case lineSpacingFactor(CGFloat)
case fontSerif(Bool)
... | gpl-2.0 | 0e2a3a1bfab133a5ecf3e308a808d610 | 33.172414 | 132 | 0.525858 | 5.327957 | false | false | false | false |
avhurst/week3 | InstaClone/InstaClone/ModelAdditions.swift | 1 | 842 | //
// ModelAdditions.swift
// InstaClone
//
// Created by Allen Hurst on 2/16/16.
// Copyright © 2016 Allen Hurst. All rights reserved.
//
import UIKit
import CloudKit
enum PostError: ErrorType
{
case WritingImage
case CreatingCKRecord
}
extension Post
{
class func recordWith(post:Post) throws -> CKR... | mit | 29b5f956a94a0ca478108f448f35cf91 | 23.057143 | 105 | 0.621879 | 4.312821 | false | false | false | false |
GeoThings/LakestoneGeometry | Source/Coordinate.swift | 1 | 5720 | //
// Coordinate.swift
// LakestoneGeometry
//
// Created by Volodymyr Andriychenko on 10/14/16.
// Copyright © 2016 GeoThings. All rights reserved.
//
// --------------------------------------------------------
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file excep... | apache-2.0 | 333deeda4108165d30c5c6b40c3334a0 | 27.034314 | 140 | 0.633852 | 4.319486 | false | false | false | false |
ApplauseOSS/Swifjection | Example/Tests/Helpers/ExampleClasses.swift | 1 | 2407 | //
// Copyright © 2017 Applause Inc. All rights reserved.
//
import Foundation
@testable import Swifjection
protocol EmptySwiftProtocol {}
class ClassConformingToProtocol: EmptySwiftProtocol {}
struct StructConformingToProtocol: EmptySwiftProtocol {}
class EmptySwiftClass {}
protocol InjectableClassProtocol: cla... | mit | f0c66cde8baa146815c523097483c351 | 24.870968 | 95 | 0.700333 | 4.77381 | false | false | false | false |
wenluma/swift | test/decl/protocol/special/coding/struct_codable_failure_diagnostics.swift | 4 | 4204 | // RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s 2>&1 | %FileCheck %s
// Codable struct with non-Codable property.
struct S1 : Codable {
struct Nested {}
var a: String = ""
var b: Int = 0
var c: Nested = Nested()
}
// Codable struct with non-en... | mit | 563301e7b505c79ccec3b9ca6c133da7 | 34.033333 | 140 | 0.712417 | 3.940019 | false | false | false | false |
testpress/ios-app | ios-app/UI/ContentsTableViewCell.swift | 1 | 7073 | //
// ContentsTableViewCell.swift
// ios-app
//
// Copyright © 2017 Testpress. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including ... | mit | 4414b9cff99c3853af4ce5e62ed630e0 | 39.181818 | 165 | 0.657523 | 5.008499 | false | false | false | false |
KiranJasvanee/OnlyPictures | OnlyPictures/Classes/OnlyHorizontalPictures.swift | 1 | 6757 | //
// OnlyHorizontalPictures.swift
// KJBubblePictures
//
// Created by Karan on 28/09/17.
// Copyright © 2017 KiranJasvanee. All rights reserved.
//
import UIKit
public enum PositionOfCount {
case left, right
}
public enum Alignment {
case left, center, right
}
public enum RecentAt {
case left, rig... | mit | ce6632ff0ce9e9fb6b8f1309dac16968 | 34.1875 | 362 | 0.579485 | 5.361905 | false | false | false | false |
naoto0822/swift-ec-client | SwiftECClient/MasterViewController.swift | 1 | 3885 | //
// MasterViewController.swift
// SwiftECClient
//
// Created by naoto yamaguchi on 2014/06/10.
// Copyright (c) 2014 naoto yamaguchi. All rights reserved.
//
import UIKit
class MasterViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, APIRequestDelegate {
var tableView: UITableVi... | mit | c018db7e0135ffc1606bd7d91fc57ac0 | 33.380531 | 117 | 0.644015 | 5.336538 | false | false | false | false |
cinnamon/MPFramework | MPFramework/Views/MPBaseButton.swift | 1 | 835 | //
// MPBaseButton.swift
// MPFramework
//
// Created by 이인재 on 2017.07.11.
// Copyright © 2017 magentapink. All rights reserved.
//
import UIKit
open class MPBaseButton: UIButton {
@IBInspectable open var selectedBackgroundColor: UIColor?
@IBInspectable open var highlightedBackgroundColor: UIColor?
private... | apache-2.0 | 4017fa35da64fed8e3a9b264d6c0c1a7 | 21.378378 | 87 | 0.740338 | 4.404255 | false | false | false | false |
austinzheng/swift | test/Driver/Dependencies/fail-simple.swift | 3 | 1234 | /// bad ==> main | bad --> other
// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/fail-simple/* %t
// RUN: touch -t 201401240005 %t/*
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path %S/Inputs/update-dependencies.py -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.... | apache-2.0 | 2b8b2a087d47838f809013ec709376f0 | 50.416667 | 292 | 0.699352 | 3.069652 | false | false | false | false |
kzaher/RxSwift | Tests/RxSwiftTests/Observable+CombineLatestTests.swift | 5 | 59600 | //
// Observable+CombineLatestTests.swift
// Tests
//
// Created by Krunoslav Zaher on 3/4/17.
// Copyright © 2017 Krunoslav Zaher. All rights reserved.
//
import XCTest
import RxSwift
import RxTest
class ObservableCombineLatestTest : RxTest {
}
extension ObservableCombineLatestTest {
func testCombineLatest_... | mit | 11da5698ff15bdf296afd793c9765341 | 33.331221 | 137 | 0.465092 | 4.711383 | false | true | false | false |
simplymadeapps/SMASaveSystem | Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift | 4 | 5365 | //
// ChaCha20.swift
// CryptoSwift
//
// Created by Marcin Krzyzanowski on 25/08/14.
// Copyright (c) 2014 Marcin Krzyzanowski. All rights reserved.
//
final public class ChaCha20: BlockCipher {
public enum Error: ErrorType {
case MissingContext
}
static let blockSize = 64 // 512 / 8... | mit | e49272008f1879e9730c12b0bd2fe576 | 26.942708 | 107 | 0.463187 | 3.720527 | false | false | false | false |
blockchain/My-Wallet-V3-iOS | Modules/Platform/Sources/PlatformKit/Models/Balance/ObservableType+MoneyValue.swift | 1 | 698 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import MoneyKit
import RxSwift
extension Observable where Element == CryptoValue {
public var moneyValue: Observable<MoneyValue> {
map(\.moneyValue)
}
}
extension Observable where Element == FiatValue {
public var moneyValue: Observab... | lgpl-3.0 | 96d2da51c41f174e7e1b1be5419d0a11 | 23.892857 | 80 | 0.695839 | 4.741497 | false | false | false | false |
ndagrawal/TipCalculator | TipCalculator/TipCalculator/MKTableViewCell.swift | 5 | 2392 | //
// MKTableViewCell.swift
// MaterialKit
//
// Created by Le Van Nghia on 11/15/14.
// Copyright (c) 2014 Le Van Nghia. All rights reserved.
//
import UIKit
public class MKTableViewCell : UITableViewCell {
@IBInspectable public var rippleLocation: MKRippleLocation = .TapLocation {
didSet {
... | mit | cb3739c3bcf5704a1e962d251ece4cfa | 34.701493 | 152 | 0.686873 | 5.155172 | false | false | false | false |
coinbase/coinbase-ios-sdk | Tests/Support/Matchers/ResultMatchers.swift | 1 | 1591 | //
// ResultMatchers.swift
// CoinbaseTests
//
// Copyright © 2018 Coinbase, Inc. All rights reserved.
//
import Quick
import Nimble
import CoinbaseSDK
func beSuccessful<T>() -> Predicate<Result<T>> {
return Predicate.define { actualExpression in
let msg = ExpectationMessage.expectedActualValueTo("be s... | apache-2.0 | aa7b59d5404284b9c2cf1c6131143db1 | 35.976744 | 105 | 0.667925 | 4.453782 | false | false | false | false |
pablogm/CameraKit | Pod/Classes/Extensions/UIViewController+Utils.swift | 1 | 2423 | /*
Copyright (c) 2015 Pablo GM <invanzert@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 without limitation the rights
to use, copy, modify, merge, publi... | mit | e2aa33563844529e444304226c9f9f12 | 38.096774 | 107 | 0.64837 | 5.210753 | false | false | false | false |
mightydeveloper/swift | test/SILGen/let_decls.swift | 9 | 15162 | // RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
func takeClosure(a : () -> Int) {}
// Let decls don't get boxes for trivial types.
//
// CHECK-LABEL: sil hidden @{{.*}}test1
func test1(a : Int) -> Int {
// CHECK-NOT: alloc_box
// CHECK-NOT: alloc_stack
let (b,c) = (a, 32)
return b+c
// CH... | apache-2.0 | 327afb2777fe76b2b31116cd591f0e0b | 29.083333 | 129 | 0.634943 | 3.291079 | false | true | false | false |
exchangegroup/FitLoader | FitLoader/TegReachabilityMessage.swift | 2 | 1840 | import UIKit
import Dodo
class TegReachabilityMessage {
weak var delegate: TegReachabilityMessageDelegate?
/// Shows an expected error message with a close button.
func showWithCloseButton(message: String?,
inViewController viewController: TegReachableViewController) {
let actualMessage = messa... | mit | 37c757b6f3d53d40f25f5980b6fe23ef | 31.875 | 97 | 0.727717 | 4.946237 | false | false | false | false |
chinlam91/edx-app-ios | Source/HTMLBlockViewController.swift | 2 | 2656 | //
// HTMLBlockViewController.swift
// edX
//
// Created by Akiva Leffert on 5/26/15.
// Copyright (c) 2015 edX. All rights reserved.
//
import UIKit
public class HTMLBlockViewController: UIViewController, CourseBlockViewController, PreloadableBlockController {
public struct Environment {
let con... | apache-2.0 | 5afda468b278fe1bd8c65ade94e4e3d5 | 32.2 | 161 | 0.625377 | 5.615222 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.