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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
shuoli84/RxSwift | RxExample/RxExample/Examples/TableView/RandomUserAPI.swift | 2 | 2056 | //
// RandomUserAPI.swift
// RxExample
//
// Created by carlos on 28/5/15.
// Copyright (c) 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
import RxSwift
class RandomUserAPI {
static let sharedAPI = RandomUserAPI()
private init() {}
func getExampleUserResultSet() -> Obs... | mit | ec1dfdb6105b5aeee95f5051d3abd4a4 | 34.465517 | 117 | 0.54572 | 4.872038 | false | false | false | false |
mightydeveloper/swift | test/Prototypes/CollectionTransformers.swift | 8 | 38898 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... | apache-2.0 | 7375d72ab76a6886421fbe37b24f7e14 | 25.86326 | 108 | 0.653427 | 4.515672 | false | false | false | false |
apple/swift | benchmark/single-source/SetTests.swift | 10 | 39313 | //===--- SetTests.swift ---------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2021 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 | 4f7e193be56138a8d770641f68f748be | 33.244774 | 91 | 0.625849 | 3.264115 | false | false | false | false |
colemancda/HTTP-Server | Representor/HTTP/HTTPTransitionBuilder.swift | 1 | 1274 | public class HTTPTransitionBuilder : TransitionBuilderType {
var attributes = InputProperties()
var parameters = InputProperties()
public var method = "POST"
public var suggestedContentTypes: [String] = []
init() {}
public func addAttribute<T : Any>(
name: String,
title: Stri... | mit | df2511d0ee43da5416530de72af11af3 | 24.48 | 105 | 0.609105 | 4.501767 | false | false | false | false |
WhisperSystems/Signal-iOS | Signal/src/Models/PhoneNumberValidator.swift | 1 | 1534 | //
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
import SignalServiceKit
@objc
public enum ValidatedPhoneCountryCodes: UInt {
case unitedStates = 1
case brazil = 55
}
@objc
public class PhoneNumberValidator: NSObject {
@objc
public func isValidForRegistration... | gpl-3.0 | 4a10a89b77a9ad14f8522c3a4f4afcb5 | 31.638298 | 109 | 0.691004 | 4.85443 | false | false | false | false |
NGeenLibraries/NGeen | NGeen/Base/Constants/Constants.swift | 1 | 1648 | //
// Constants.swift
// Copyright (c) 2014 NGeen
//
// 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, m... | mit | 874a87563f4b6dc1c9003fe648c123e2 | 50.53125 | 104 | 0.774272 | 4.26943 | false | false | false | false |
SanctionCo/pilot-ios | Pods/ImagePicker/Source/CameraView/CameraMan.swift | 4 | 6272 | import Foundation
import AVFoundation
import PhotosUI
protocol CameraManDelegate: class {
func cameraManNotAvailable(_ cameraMan: CameraMan)
func cameraManDidStart(_ cameraMan: CameraMan)
func cameraMan(_ cameraMan: CameraMan, didChangeInput input: AVCaptureDeviceInput)
}
class CameraMan {
weak var delegate: ... | mit | 9262019efcff710baba44e2fe5e55ecc | 24.088 | 165 | 0.647481 | 4.787786 | false | false | false | false |
tresorit/ZeroKit-Realm-encrypted-tasks | ios/RealmTasks iOS/MySharesViewController.swift | 1 | 11009 | import UIKit
import Realm
import RealmSwift
import ZeroKit
class MySharesViewController: ShareBaseTableViewController {
var alert: UIAlertController?
override func awakeFromNib() {
super.awakeFromNib()
self.title = "My Shares"
}
override func viewDidLoad() {
super.viewDidLoad(... | bsd-3-clause | e8e565d2e61567f1fb871d0e840b6047 | 38.317857 | 136 | 0.551276 | 5.052318 | false | false | false | false |
eljeff/AudioKit | Tests/AudioKitTests/Operation Tests/Effect Tests/bitcrushOperationTests.swift | 2 | 1507 | // Copyright AudioKit. All Rights Reserved. Revision History at http://github.com/AudioKit/AudioKit/
import AudioKit
import XCTest
class BitcrushTests: XCTestCase {
func testBitDepth() {
let engine = AudioEngine()
let input = Oscillator()
engine.output = OperationEffect(input) { $0.bitCru... | mit | 6d27758be7a59c9bfb51ebf01f1dfd4a | 30.395833 | 100 | 0.620438 | 4.061995 | false | true | false | false |
WSDOT/wsdot-ios-app | wsdot/RouteDeparturesViewController.swift | 1 | 18491 | //
// RouteDetailsViewController.swift
// WSDOT
//
// Copyright (c) 2016 Washington State Department of Transportation
//
// 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 ... | gpl-3.0 | 11a84475030a18efb11b1eab3e7aa1aa | 41.313501 | 389 | 0.631064 | 5.331892 | false | false | false | false |
jamesjmtaylor/weg-ios | weg-ios/Equipment/EquipmentViewController.swift | 1 | 8805 | //
// EquipmentViewController.swift
// weg-ios
//
// Created by Taylor, James on 4/29/18.
// Copyright © 2018 James JM Taylor. All rights reserved.
//
import UIKit
class EquipmentViewController: UIViewController{
@IBOutlet weak var photoImageView: UIImageView!
@IBOutlet weak var groupImageView: UIImageVi... | mit | 9d75f90a9b1d057b041260b7c0bc42a9 | 50.186047 | 151 | 0.637551 | 4.194378 | false | false | false | false |
chenzhe555/core-ios-swift | core-ios-swift/AppDelegate.swift | 1 | 5522 | //
// AppDelegate.swift
// core-ios-swift
//
// Created by 陈哲#376811578@qq.com on 16/2/17.
// Copyright © 2016年 陈哲是个好孩子. All rights reserved.
//
import UIKit
import Alamofire
typealias funcBlock = () -> String
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, BaseHttpServiceDelegate_s {
... | mit | c870c92416a7c5e46cefac10cbbfff2a | 46.025862 | 397 | 0.672411 | 4.523217 | false | false | false | false |
corosukeK/ConstraintsTranslator | Sources/View.swift | 1 | 1415 | //
// View.swift
// ConstraintsTranslator
//
// Created by akuraru on 2017/03/04.
//
//
import Foundation
import AEXML
struct View {
let id: String
let subviews: [View]
let constraints: [Constraint]
let userLabel: String?
init(element: AEXMLElement) {
self.id = element.att... | apache-2.0 | 6b8587a07258bf1224bc618e4fb3199a | 26.745098 | 93 | 0.588693 | 4.4081 | false | false | false | false |
JakeLin/IBAnimatable | IBAnimatableApp/IBAnimatableApp/Playground/UserInterfaces/Gradients/GradientCustomStartPointViewController.swift | 2 | 2766 | //
// GradientCustomStartPointViewController.swift
// IBAnimatable
//
// Created by Tom Baranes on 22/12/2016.
// Copyright © 2016 IBAnimatable. All rights reserved.
//
import UIKit
import IBAnimatable
final class GradientCustomStartPointViewController: UIViewController, GradientModePresenter {
@IBOutlet filep... | mit | 0ca2e523b55a8c8ef12ec4f335a6232b | 42.203125 | 132 | 0.707052 | 4.608333 | false | false | false | false |
kylecrawshaw/ImagrAdmin | ImagrAdmin/WorkflowSupport/WorkflowComponents/EraseVolumeComponent/EraseVolumeComponent.swift | 1 | 1242 | //
// ImageComponent.swift
// ImagrManager
//
// Created by Kyle Crawshaw on 7/12/16.
// Copyright © 2016 Kyle Crawshaw. All rights reserved.
//
import Foundation
import Cocoa
class EraseVolumeComponent: BaseComponent {
var volumeName: String!
var volumeFormat: String!
init(id: Int!, workflowNa... | apache-2.0 | 058ffdba6683f53c993039deca862b9b | 29.292683 | 99 | 0.639807 | 4.221088 | false | false | false | false |
m-alani/contests | leetcode/removeElement.swift | 1 | 587 | //
// removeElement.swift
//
// Practice solution - Marwan Alani - 2017
//
// Check the problem (and run the code) on leetCode @ https://leetcode.com/problems/remove-element/
// Note: make sure that you select "Swift" from the top-left language menu of the code editor when testing this code
//
class Solution {
f... | mit | 437233f0afe5d09034dfbf40e5960e24 | 24.521739 | 117 | 0.591141 | 3.452941 | false | false | false | false |
bitjammer/swift | test/SILGen/vtable_thunks.swift | 1 | 12957 | // RUN: %target-swift-frontend -sdk %S/Inputs -emit-silgen -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
protocol AddrOnly {}
func callMethodsOnD<U>(d: D, b: B, a: AddrOnly, u: U, i: Int) {
_ = d.iuo(x: b, y: b, z: b)
_ = d.f(x: b, y: b)
_ = d.f2(x: b, y: b)... | apache-2.0 | 99d9f4ce248761d17b1eb6bf28dad938 | 41.343137 | 199 | 0.525585 | 2.521798 | false | false | false | false |
juheon0615/HandongSwift2 | HandongAppSwift/CVCalendar/CVCalendarWeekView.swift | 11 | 7512 | //
// CVCalendarWeekView.swift
// CVCalendar
//
// Created by E. Mozharovsky on 12/26/14.
// Copyright (c) 2014 GameApp. All rights reserved.
//
import UIKit
class CVCalendarWeekView: UIView {
// MARK: - Non public properties
private var interactiveView: UIView!
override var frame: CGRect {
... | mit | 8bc683c80d9db8e7c11d5c6ca5a9377e | 32.690583 | 120 | 0.523695 | 6.0096 | false | false | false | false |
xhjkl/rayban | Rayban/Filewatch.swift | 1 | 1485 | //
// File modification responder
//
import Dispatch
// Responder to FS events
//
public class Filewatch {
private var handlers: Array<() -> ()> = []
private var eventSource: DispatchSourceFileSystemObject! = nil
private var fd: Int32! = nil
// True iff notifications shall work with current target
//
pu... | mit | 7d43ef0931571e3eacad2af8f5c7661d | 19.342466 | 98 | 0.619529 | 4.068493 | false | false | false | false |
safarafa/eld_hackaton2405 | iOSBookTheHotelRoomApp/iOSBookTheHotelRoomApp/Source/SessionDelegate.swift | 11 | 35351 | //
// SessionDelegate.swift
//
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
//
// 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,... | mit | 7b2768db40da039727f543e77309fa08 | 48.158554 | 192 | 0.675117 | 6.158738 | false | false | false | false |
twostraws/SwiftGD | Sources/SwiftGD/Geometry/Point.swift | 1 | 1304 | /// A structure that contains a point in a two-dimensional coordinate system.
public struct Point {
/// The x-coordinate of the point.
public var x: Int
/// The y-coordinate of the point.
public var y: Int
/// Creates a point with specified coordinates.
///
/// - Parameters:
/// - x:... | mit | 72c471403b328ca1fffd9e1a51426c7b | 27.347826 | 77 | 0.565184 | 3.612188 | false | false | false | false |
tdscientist/ShelfView-iOS | Example/Pods/Kingfisher/Sources/Image/Filter.swift | 1 | 5540 | //
// Filter.swift
// Kingfisher
//
// Created by Wei Wang on 2016/08/31.
//
// Copyright (c) 2018 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 | 77e0721aabb26256f2d8e5f160011f09 | 38.014085 | 97 | 0.656318 | 4.821584 | false | false | false | false |
wantedly/ReactKit | ReactKit/Foundation/NSObject+Own.swift | 2 | 853 | //
// NSObject+Owner.swift
// ReactKit
//
// Created by Yasuhiro Inami on 2014/11/11.
// Copyright (c) 2014年 Yasuhiro Inami. All rights reserved.
//
import Foundation
private var owninigStreamsKey: UInt8 = 0
internal extension NSObject
{
internal typealias AnyStream = AnyObject // NOTE: can't use Stream<AnyO... | mit | a798f2f9868177b05ea6c454d74d1fec | 26.483871 | 131 | 0.632197 | 4.052381 | false | false | false | false |
JohnEstropia/CoreStore | Sources/CoreStoreSchema.swift | 1 | 40578 | //
// CoreStoreSchema.swift
// CoreStore
//
// Copyright © 2018 John Rommel Estropia
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitat... | mit | d4b3d29b8052b6f3bfaa4d905d1f124c | 51.492885 | 408 | 0.616187 | 6.04274 | false | true | false | false |
denrase/TimeTracking-iOS | TimeTracking/BackgroundTask.swift | 1 | 1031 | //
// BackgroundTask.swift
// TimeTracking
//
// Created by Daniel Griesser on 27/05/15.
// Copyright (c) 2015 Bytepoets. All rights reserved.
//
import Foundation
import UIKit
class BackgroundTask {
private let application: UIApplication
private var identifier = UIBackgroundTaskInvalid
init(appl... | mit | f7aa14a31a66c15d7939fb810f5e1c99 | 24.170732 | 81 | 0.640155 | 5.260204 | false | false | false | false |
anhnc55/fantastic-swift-library | Example/Example/MenuController.swift | 1 | 7874 | /*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above... | mit | e5a5e0b1263fc7588bf50c880ef4dec9 | 33.995556 | 223 | 0.769876 | 4.543566 | false | false | false | false |
bigL055/Routable | Sources/Routale+UIKit.swift | 1 | 2929 | //
// Routable
//
// Copyright (c) 2017 linhay - https://github.com/linhay
//
// 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 rig... | mit | d5e89cc4fd738ef2cbbac7f0ed206319 | 33.54878 | 104 | 0.683727 | 4.088023 | false | false | false | false |
taketo1024/SwiftyAlgebra | Tests/SwmCoreTests/Polynomials/MultivariatePolynomialTests.swift | 1 | 5889 | //
// PolynomialTests.swift
// SwiftyKnotsTests
//
// Created by Taketo Sano on 2018/04/10.
//
import XCTest
@testable import SwmCore
class MPolynomialTests: XCTestCase {
struct xy: MultivariatePolynomialIndeterminates {
typealias Exponent = MultiIndex<_2>
typealias NumberOfIndeterminates = _2
... | cc0-1.0 | a10ba581790319468fc8cfbb679bdecc | 32.141243 | 105 | 0.548415 | 3.323513 | false | true | false | false |
vikingosegundo/Taylor | Taylor/Response.swift | 2 | 3574 | //
// response.swift
// TaylorTest
//
// Created by Jorge Izquierdo on 19/06/14.
// Copyright (c) 2014 Jorge Izquierdo. All rights reserved.
//
import Foundation
public class Response {
public var statusLine: String {
return status.statusLine()
}
public var statusCode: Int {
retur... | mit | 552cfef9f4faabf43fd018e243b6c6a4 | 25.474074 | 114 | 0.567431 | 4.641558 | false | false | false | false |
nacuteodor/ProcessTestSummaries | XCResultKit/ActionRecord.swift | 1 | 1562 | //
// File.swift
//
//
// Created by David House on 6/30/19.
//
//- ActionRecord
// * Kind: object
//* Properties:
//+ schemeCommandName: String
//+ schemeTaskName: String
//+ title: String?
//+ startedTime: Date
//+ endedTime: Date
//+ runDestination: ActionRunDestinationRecord
//+ buildResult: ActionResult
//+... | mit | 2012208267ccd59b3cf0a0e81a2e7cee | 32.234043 | 88 | 0.663892 | 4.210243 | false | false | false | false |
Beaver/BeaverCodeGen | Sources/BeaverCodeGen/Core/String+Generator.swift | 1 | 2071 | import Foundation
extension String {
var indented: String {
return indented(count: 1)
}
func indented(count: Int) -> String {
let split = self.split(separator: "\n", omittingEmptySubsequences: false)
return split.map { chars in
let str = String(chars)
... | mit | bbb999ee7ffcee42946ce1a049ef22b8 | 24.567901 | 118 | 0.530662 | 4.044922 | false | false | false | false |
khizkhiz/swift | benchmark/single-source/RC4.swift | 2 | 2924 | //===--- RC4.swift --------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... | apache-2.0 | 0c36931f96458c11aedbd20d6240d5b2 | 27.115385 | 80 | 0.51026 | 3.341714 | false | false | false | false |
Estimote/iOS-SDK | Examples/swift/LoyaltyStore/LoyaltyStore/Helpers/ExampleOffers.swift | 1 | 922 | //
// Please report any problems with this app template to contact@estimote.com
//
func exampleOffers() -> [Any] {
let espresso = Offer(name: "Extra Espresso", description: "", cost: 25, image: UIImage.init(named: "extra_espresso")!)
let chocolate = Offer(name: "Chocolate", description: "", cost: ... | mit | d891404946eafcc3fc8407d85ba44bff | 60.466667 | 124 | 0.655098 | 3.377289 | false | false | false | false |
pietgk/EuropeanaApp | EuropeanaApp/EuropeanaApp/Classes/Operations/ReachabilityCondition.swift | 1 | 3208 | /*
Copyright (C) 2015 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
This file shows an example of implementing the OperationCondition protocol.
*/
import Foundation
import SystemConfiguration
/**
This is a condition that performs a very high-level reachability ... | mit | d58eb7386c1b9172f1ed3744c2fc6281 | 33.847826 | 109 | 0.569245 | 5.915129 | false | false | false | false |
psartzetakis/JRTypedStrings | Source/TypedStringExtensions.swift | 1 | 1745 | //
// Created by Panagiotis Sartzetakis
// http://www.sartzetakis.me
//
//
// GitHub
// http://github.com/psartzetakis/JRTypedStrings
//
//
// License
// Copyright © 2017 Panagiotis Sartzetakis
// Released under an MIT license: http://opensource.org/licenses/MIT
//
import Foundation
import UIKit
public extensi... | mit | 8c37d997b26adc429308ba5425496113 | 33.88 | 142 | 0.640482 | 3.875556 | false | false | false | false |
syoutsey/swift-corelibs-foundation | Foundation/NSCharacterSet.swift | 5 | 11046 | // This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the l... | apache-2.0 | eb45e64d48ea067dacbe453ef20c7681 | 38.453571 | 111 | 0.744251 | 6.490012 | false | false | false | false |
Raizlabs/ios-template | PRODUCTNAME/app/Pods/Swiftilities/Pod/Classes/Math/CubicBezier.swift | 2 | 3215 | //
// CubicBezier.swift
// Swiftilities
//
// Created by Jason Clark on 8/10/17.
//
/*
Derived from IBM's implementation of the CSS function cubic-bezier
Licensed Materials - Property of IBM
© Copyright IBM Corporation 2015. All Rights Reserved.
This licensed material is licensed under the Apache 2.0 license. h... | mit | c5426209efbc6ae0691f8ac71b6bfa26 | 24.712 | 109 | 0.511512 | 3.316821 | false | false | false | false |
grafiti-io/SwiftCharts | Examples/AppDelegate.swift | 2 | 4655 | //
// AppDelegate.swift
// Examples
//
// Created by ischuetz on 08/05/15.
// Copyright (c) 2015 ivanschuetz. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
var window: UIWindow?
func application(_ applicati... | apache-2.0 | 2d0a29bf1169f6495294babf875b99aa | 47.489583 | 285 | 0.719012 | 6.157407 | false | false | false | false |
joearms/joearms.github.io | includes/swift/combined1.swift | 1 | 3126 | // combined1.swift
// run with:
// $ swift combined1.swift
import Cocoa
class MyButton: NSButton {
var onclick: () -> Bool = {() -> Bool in true}
func myclick(sender: AnyObject) {
self.onclick()
}
}
func make_button(window: NSWindow,
_ size:(x:Int, y:Int, width:Int, ht:Int),
... | mit | ab42a5f8cd5cc686b887eb4a0399452c | 28.490566 | 76 | 0.604607 | 3.927136 | false | false | false | false |
S2dentik/Taylor | TaylorFrameworkTests/TemperTests/NumberOfLinesInMethodRuleTests.swift | 4 | 2535 | //
// NumberOfLinesInMethodRuleTests.swift
// Temper
//
// Created by Mihai Seremet on 9/10/15.
// Copyright © 2015 Yopeso. All rights reserved.
//
import Nimble
import Quick
@testable import TaylorFramework
class NumberOfLinesInMethodRuleTests: QuickSpec {
let rule = NumberOfLinesInMethodRule()
override ... | mit | fd8f92b7011f4e4de66ac7e31ea57f22 | 47.730769 | 162 | 0.593923 | 4.280405 | false | true | false | false |
Diederia/project | Pods/JTAppleCalendar/Sources/JTAppleCalendarLayout.swift | 1 | 22253 | //
// JTAppleCalendarLayout.swift
// JTAppleCalendar
//
// Created by JayT on 2016-03-01.
// Copyright © 2016 OS-Tech. All rights reserved.
//
/// Methods in this class are meant to be overridden and will be called by its collection view to gather layout information.
open class JTAppleCalendarLayout: UICollectionV... | mit | 54017aedf4b61c8b8a104837a6f53540 | 41.454198 | 151 | 0.550975 | 6.015684 | false | false | false | false |
USAssignmentWarehouse/EnglishNow | EnglishNow/Model/Profile/Review.swift | 1 | 3906 | //
// Review.swift
// EnglishNow
//
// Created by GeniusDoan on 6/29/17.
// Copyright © 2017 IceTeaViet. All rights reserved.
//
import Foundation
class Review: NSObject, NSCoding {
var partner: String!
var photoPartner: String!
var comment: String!
var ratings: Rating!
var gift: Gift!
var... | apache-2.0 | 312a8759ac5335048ec82d97c817d02d | 28.80916 | 83 | 0.559027 | 4.803198 | false | false | false | false |
bryan1anderson/iMessage-to-Day-One-Importer | iMessage Importer/ImportViewController.swift | 1 | 16157 | //
// ImportViewController.swift
// iMessage Importer
//
// Created by Bryan on 9/1/17.
// Copyright © 2017 Bryan Lloyd Anderson. All rights reserved.
//
import Cocoa
enum ImportType {
case developer
case user
}
class ImportViewController: NSViewController {
// @IBOutlet weak var stackPickerRange... | mit | c8b4e86b9a853cab8c7ec56d79cea380 | 31.837398 | 187 | 0.560535 | 4.802616 | false | false | false | false |
Stitch7/mclient | mclient/PrivateMessages/_MessageKit/Models/MessageKitDateFormatter.swift | 1 | 2437 | /*
MIT License
Copyright (c) 2017-2018 MessageKit
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, p... | mit | eac5a7f5365f46b05063b6ba4f6f7bcb | 35.924242 | 121 | 0.71112 | 4.864271 | false | false | false | false |
adapter00/FlickableCalendar | FlickableCalendar/Classes/Date+Additional.swift | 1 | 4527 | //
// NSDate+Format.swift
// lnlnApp
//
// Created by 前田 恭男 on 2015/11/09.
// Copyright © 2015年 MTI Ltd. All rights reserved.
//
import Foundation
enum FormatStyle: String {
case Hyphen = "yyyy-MM-dd"
case Slash = "yyyy/MM/dd"
case MonthDayKanji = "MM月dd日"
case YearMonthKanji = "yyyy年MM月"
case... | mit | 763052f17b4089850c63b5f3421bc142 | 32.833333 | 136 | 0.615987 | 4.12373 | false | false | false | false |
xedin/swift | stdlib/public/core/StringUTF8View.swift | 1 | 17056 | //===--- StringUTF8.swift - A UTF8 view of String -------------------------===//
//
// 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 | 0bf8f0dba8e42eb76132a5ca1581390e | 31.457143 | 80 | 0.645188 | 4.002819 | false | false | false | false |
soapyigu/Swift30Projects | Project 05 - Artistry/Artistry/ArtistDetailViewController.swift | 1 | 3570 | /*
* Copyright (c) 2016 Razeware LLC
*
* 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, publis... | apache-2.0 | a4bf502aaa9e078d44ded4ba795b25fb | 36.578947 | 158 | 0.741176 | 4.734748 | false | false | false | false |
grigaci/RateMyTalkAtMobOS | RateMyTalkAtMobOS/Classes/Model/Entities+CloudKit/RMTSession+CloudKit.swift | 1 | 2069 | //
// RMTSession+CloudKit.swift
// RateMyTalkAtMobOSMaster
//
// Created by Bogdan Iusco on 10/4/14.
// Copyright (c) 2014 Grigaci. All rights reserved.
//
import Foundation
import CloudKit
enum RMTSessionCKAttributes: NSString {
case title = "title"
case startDate = "startDate"
case endDate = "endDat... | bsd-3-clause | 2faf9971d8e18a0f81801958e3186336 | 34.067797 | 147 | 0.714838 | 4.937947 | false | false | false | false |
cweatureapps/SwiftScraper | Pods/Observable-Swift/Observable-Swift/Event.swift | 2 | 2841 | //
// Event.swift
// Observable-Swift
//
// Created by Leszek Ślażyński on 21/06/14.
// Copyright (c) 2014 Leszek Ślażyński. All rights reserved.
//
// Events are implemented as structs, what has both advantages and disadvantages
// Notably they are copied when inside other value types, and mutated on add/remove/n... | mit | 7b021fe2e15ed28deabb1a635c18b9fc | 31.586207 | 127 | 0.667725 | 4.655172 | false | false | false | false |
thankmelater23/MyFitZ | MyFitZ/AwesomeDataDemoAPI.swift | 1 | 1118 | //
// AwesomeDataDemoAPI.swift
// AwesomeData
//
// Created by Evandro Harrison Hoffmann on 27/08/2016.
// Copyright © 2016 It's Day Off. All rights reserved.
//
import UIKit
import AwesomeData
class AwesomeDataDemoAPI: NSObject {
static let unsplashListUrl = "https://unsplash.it/list"
static func f... | mit | 9b4a3471b1faefc12cfc32ffaeff416f | 30.914286 | 145 | 0.56222 | 4.654167 | false | false | false | false |
evermeer/EVWordPressAPI | EVWordPressAPI/EVWordPressAPI_Sites.swift | 1 | 6914 | //
// EVWordPressAPI_Sites.swift
// EVWordPressAPI
//
// Created by Edwin Vermeer on 7/30/15.
// Copyright (c) 2015 evict. All rights reserved.
//
import Alamofire
import AlamofireOauth2
import AlamofireJsonToObjects
import EVReflection
public extension EVWordPressAPI {
// MARK: - Sites
/**
... | bsd-3-clause | 2d647f1f7791aaafc3cad8907a583df0 | 47.013889 | 143 | 0.723315 | 4.527832 | false | false | false | false |
kandelvijaya/XcodeFormatter | XcodeFormatter/Core/CodeAnalyzer/EmptyLineCorrection.swift | 1 | 5544 | // EmptyLineCorrection.swift
// Copyright © 2016 Vijaya Prakash Kandel. All rights reserved.
//
import Foundation
enum CodeDirection {
case down, up, both
}
class EmptyLineCorrection {
typealias CodePositonToCorrect = (CodePosition, CodeDirection)
private let mutableContent: NSMutableArray
privat... | mit | a05e3eb377dbaa59291113b0e65c6391 | 36.452703 | 116 | 0.612123 | 4.870826 | false | false | false | false |
mumbler/PReVo-iOS | ReVoModeloj/Komunaj/Modeloj/Lingvo.swift | 1 | 1772 | //
// Lingvo.swift
// PoshReVo
//
// Created by Robin Hill on 5/4/20.
// Copyright © 2020 Robin Hill. All rights reserved.
//
import Foundation
/*
Reprezentas lingvon ekzistantan en la vortaro.
Uzata en serĉado kaj listigado de tradukoj en artikoloj.
*/
public final class Lingvo : NSObject, NSSecureCoding... | mit | e5ad485f510a47897d66ee9541467391 | 23.583333 | 135 | 0.59887 | 3.89011 | false | false | false | false |
tbointeractive/TBODeveloperOverlay | Examples/TBODeveloperOverlay Example iOS/TBODeveloperOverlay Example iOS/AppDelegate.swift | 1 | 3968 | //
// AppDelegate.swift
// TBODeveloperOverlay Example iOS
//
// Created by Cornelius Horstmann on 28.07.17.
// Copyright © 2017 TBO Interactive GmbH & CO KG. All rights reserved.
//
import UIKit
import TBODeveloperOverlay
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var win... | mit | 06630fe6a3e620e0853049d56a01c43e | 50.519481 | 148 | 0.623645 | 5.145266 | false | false | false | false |
liuchuo/Swift-practice | 20150727-3.playground/Contents.swift | 1 | 776 | //: Playground - noun: a place where people can play
import UIKit
class Employee {
var no : Int = 0
var name : String = "Tony" {
willSet(newNameValue) {
println("员工name新值:\(newNameValue)")
}
didSet(oldNameValue) {
println("员工name旧值:\(oldNameValue)")
... | gpl-2.0 | 8160c0b253fb3f75fea6ba2b76fc1cf0 | 16.853659 | 52 | 0.525956 | 3.66 | false | false | false | false |
jedlewison/AsyncOpKit | Tests/AsyncOpTests/AsyncOpPreconditionEvaluatorTests.swift | 1 | 10007 | //
// AsyncOpPreconditionEvaluatorTests.swift
// AsyncOp
//
// Created by Jed Lewison on 9/6/15.
// Copyright © 2015 Magic App Factory. All rights reserved.
//
import Foundation
import Quick
import Nimble
@testable import AsyncOpKit
class AsyncOpPreconditionEvaluatorTests : QuickSpec {
override func spec() ... | mit | 4bb8465b1ce93c20c6f92a7490b7b4cd | 35.922509 | 139 | 0.46712 | 6.929363 | false | false | false | false |
apple/swift-driver | Tests/SwiftDriverTests/JobExecutorTests.swift | 1 | 25250 | //===--------------- JobExecutorTests.swift - Swift Execution Tests -------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2019 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 | d0cc76009f88f2eaca88adfa6e3db581 | 41.86927 | 173 | 0.606733 | 4.7516 | false | false | false | false |
alantsev/mal | swift3/Sources/step7_quote/main.swift | 3 | 5990 | import Foundation
// read
func READ(str: String) throws -> MalVal {
return try read_str(str)
}
// eval
func is_pair(ast: MalVal) -> Bool {
switch ast {
case MalVal.MalList(let lst, _): return lst.count > 0
case MalVal.MalVector(let lst, _): return lst.count > 0
default: ... | mpl-2.0 | b873c135a4261cb0b0dd7fe0ce4f75c5 | 30.861702 | 89 | 0.517696 | 3.810433 | false | false | false | false |
practicalswift/swift | test/NameBinding/name_lookup_min_max_conditional_conformance.swift | 7 | 2843 | // RUN: %target-typecheck-verify-swift
extension Range {
func f(_ value: Bound) -> Bound {
return max(lowerBound, min(value, upperBound))
// expected-warning@-1{{use of 'max' as reference to global function in module 'Swift' will change in future versions of Swift to reference instance method in ge... | apache-2.0 | 893e218dbf5943a097015c74eef07a35 | 48.017241 | 239 | 0.67886 | 4.23696 | false | false | false | false |
mpangburn/RayTracer | RayTracer/Models/Finish.swift | 1 | 3406 | //
// Finish.swift
// RayTracer
//
// Created by Michael Pangburn on 6/26/17.
// Copyright © 2017 Michael Pangburn. All rights reserved.
//
import Foundation
/// Describes how an object interacts with light.
final class Finish: NSObject, NSCoding {
/// The percentage of ambient light reflected by the finish... | mit | c5dca3889b6bc6f28bbb7fd70e848df2 | 33.05 | 134 | 0.674009 | 4.410622 | false | false | false | false |
practicalswift/swift | test/PCMacro/func_decls.swift | 7 | 1875 | // RUN: %empty-directory(%t)
// RUN: cp %s %t/main.swift
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
// RUN: %target-codesign %t/main
// RUN: %target-run %t/main | %FileCheck %s
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/mai... | apache-2.0 | bbdd2004528bcea407d98fcc7196bb6a | 30.25 | 169 | 0.659733 | 2.615063 | false | false | false | false |
460467069/smzdm | 什么值得买7.1.1版本/什么值得买(5月12日)/ZZSwiftCommon.swift | 1 | 1747 | //
// ZZSwiftCommon.swift
// 什么值得买
//
// Created by Wang_ruzhou on 16/10/8.
// Copyright © 2016年 Wang_ruzhou. All rights reserved.
//
import Foundation
import YYText
let kScreenBounds = UIScreen.main.bounds
let kScreenWidth = YYScreenSize().width
let kScreenHeight = YYScreenSize().height
let kScreenScale = YYSc... | mit | bb9f584edef6448c9d82ca21e16c4ba3 | 28.389831 | 109 | 0.700692 | 3.853333 | false | false | false | false |
OnMap/Localization | OML10nTests/Core/UITextView+LocalizableTests.swift | 1 | 2845 | //
// UITextView+LocalizableTests.swift
// OML10nTests
//
// Created by Alex Alexandrovych on 03/02/2018.
// Copyright © 2018 OnMap. All rights reserved.
//
import XCTest
class UITextViewLocalizableTests: XCTestCase {
// MARK: Constants (from Localizable.strings)
let key = "Test.TextView"
let unknow... | mit | 6043957eb81ed85a7ba258a94172329f | 26.346154 | 92 | 0.651547 | 4.828523 | false | true | false | false |
fitpay/fitpay-ios-sdk | FitpaySDK/A2AVerification/A2AVerificationError.swift | 1 | 793 | /// Errors for A2AVerificationRequest
public enum A2AVerificationError: String {
/// Created by the SDK if A2AVerificationRequest can't be parsed correctly
case cantProcess = "cantProcessVerification"
/// Sent by the bank in case of declined
case declined = "appToAppDeclined"
/// Sent... | mit | 0e66eddb19a126a16be1492fc033f353 | 36.761905 | 98 | 0.69483 | 4.430168 | false | false | false | false |
vhart/PPL-iOS | PPL-iOS/PPL-iOS/WeightChangeViewController.swift | 1 | 2555 | //
// WeightChangeViewController.swift
// PPL-iOS
//
// Created by Jovanny Espinal on 2/24/16.
// Copyright © 2016 Jovanny Espinal. All rights reserved.
//
import UIKit
protocol WeightChangeViewControllerDelegate {
func weightChanged(exerciseIndex: Int, weight: Double)
}
class WeightChangeViewController: UIV... | mit | 2e22fc28319ea6effc32bcaeea872403 | 27.696629 | 202 | 0.624511 | 4.883365 | false | false | false | false |
fiveagency/ios-five-ui-components | FiveUIComponents/Classes/Animators/DelayedCellAnimation.swift | 1 | 2016 | //
// DelayedCellAnimation.swift
// FiveUIComponents
//
// Created by Denis Mendica on 2/17/17.
// Copyright © 2017 Five Agency. All rights reserved.
//
import Foundation
/**
Predefined animations for DelayedCellLoadingAnimator.
*/
public enum DelayedCellAnimation {
/**
Slide from bottom and fade in.
... | mit | d6a28833f21c50c974da4e1ebd001e6c | 25.513158 | 97 | 0.544417 | 4.987624 | false | false | false | false |
victorlin/ReactiveCocoa | ReactiveCocoa/Swift/Event.swift | 1 | 3784 | //
// Event.swift
// ReactiveCocoa
//
// Created by Justin Spahr-Summers on 2015-01-16.
// Copyright (c) 2015 GitHub. All rights reserved.
//
/// Represents a signal event.
///
/// Signals must conform to the grammar:
/// `Next* (Failed | Completed | Interrupted)?`
public enum Event<Value, Error: Swift.Error> {
/... | mit | 97238953bc2933de59e656fdbf25f455 | 21.933333 | 114 | 0.65777 | 3.436876 | false | false | false | false |
the-grid/Portal | PortalTests/Fixtures/PublisherFixtures.swift | 1 | 1443 | import Argo
import Foundation
import Portal
private let domain = "gridbear.com"
private let favicon = "https://gridbear.com"
private let name = "Grid Bear"
private let url = "https://gridbear.com/favicon.png"
let publisherResponseBody: [String: AnyObject] = [
"domain": domain,
"favicon": favicon,
"name": ... | mit | 32566a2199981a23f084d44ea5e90114 | 23.87931 | 60 | 0.681913 | 3.6075 | false | false | false | false |
3DprintFIT/octoprint-ios-client | OctoPhone/AppDelegate.swift | 1 | 2797 | //
// AppDelegate.swift
// OctoPhone
//
// Created by Josef Dolezal on 25/10/16.
// Copyright © 2016 Josef Dolezal. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
/// Base app window
var window: UIWindow?
/// Initial flow coordinator
... | mit | 80b9bb567191917683d05c00592b54c7 | 37.30137 | 100 | 0.702074 | 5.6714 | false | false | false | false |
totocaster/Typist | Typist-Demo/ViewController.swift | 1 | 3081 | //
// ViewController.swift
// Typist
//
// Created by Toto Tvalavadze on 2016/09/26.
// Copyright © 2016 Toto Tvalavadze. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
let keyboard = Typist.shared
@IBOutlet weak var tableView: UITableView! {
didSet {
... | mit | ee8ecfbb37f853abd2dbbeb2614bd1e8 | 37.5 | 160 | 0.625 | 5.150502 | false | false | false | false |
yemeksepeti/YSSegmentedControl | YSSegmentedControl/YSSegmentedControl/YSSegmentedControl.swift | 1 | 15292 | //
// YSSegmentedControl.swift
// yemeksepeti
//
// Created by Cem Olcay on 22/04/15.
// Copyright (c) 2015 yemeksepeti. All rights reserved.
//
import UIKit
// MARK: - Appearance
public struct YSSegmentedControlAppearance {
public var backgroundColor: UIColor
public var selectedBackgroundColor: UIColor
... | mit | b93b38ab1f1c8b441056c00a54ddbeb1 | 34.645688 | 112 | 0.504708 | 6.634273 | false | false | false | false |
chrisjmendez/swift-exercises | Walkthroughs/MyPresentation/Carthage/Checkouts/Cartography/CartographyTests/EdgeSpec.swift | 15 | 10735 | import Cartography
import Nimble
import Quick
class EdgeSpec: QuickSpec {
override func spec() {
var window: TestWindow!
var view: TestView!
beforeEach {
window = TestWindow(frame: CGRectMake(0, 0, 400, 400))
view = TestView(frame: CGRectZero)
window.a... | mit | 6d8435a54b0593d1183b841b6418ee9d | 27.474801 | 93 | 0.450675 | 5.479837 | false | false | false | false |
ABTSoftware/SciChartiOSTutorial | v2.x/Examples/SciChartSwiftDemo/SciChartSwiftDemo/Views/BasicChartTypes/DigitalMountainChartView.swift | 1 | 2533 | //******************************************************************************
// SCICHART® Copyright SciChart Ltd. 2011-2018. All rights reserved.
//
// Web: http://www.scichart.com
// Support: support@scichart.com
// Sales: sales@scichart.com
//
// DigitalMountainChartView.swift is part of the SCICHART® Examples.... | mit | dfb2ed0069777f577a3ead82df68e1a8 | 47.653846 | 196 | 0.656522 | 4.6337 | false | false | false | false |
nekrich/GlobalMessageService-iOS | Source/Core/Message/GMSMessageFetcher.swift | 1 | 14394 | //
// GMSMessageFetcher.swift
// Pods
//
// Created by Vitalii Budnik on 1/25/16.
//
//
import Foundation
import CoreData
/**
`Class` fetches delivered messages from Global Message Services servers
*/
public final class GlobalMessageServiceMessagesFetcher {
/// Private initializer
private init() {
... | apache-2.0 | 3270ea7615a730827fcf1d89279443d5 | 38.762431 | 140 | 0.702862 | 5.190768 | false | false | false | false |
Brightify/Cuckoo | Source/MockManager.swift | 2 | 17427 | //
// MockManager.swift
// Cuckoo
//
// Created by Filip Dolnik on 29.05.16.
// Copyright © 2016 Brightify. All rights reserved.
//
import XCTest
#if !swift(>=4.1)
private extension Array {
func compactMap<O>(_ transform: (Element) -> O?) -> [O] {
return self.flatMap(transform)
}
}
#endif
public ... | mit | 87259aa7b58bfa035682223a8fb3be59 | 48.931232 | 222 | 0.630265 | 4.718657 | false | false | false | false |
alessioros/mobilecodegenerator3 | examples/ParkTraining/generated/ios/ParkTraining/ParkTraining/LocationEditViewController.swift | 2 | 2756 |
import UIKit
import MapKit
class LocationEditViewController: UIViewController, MKMapViewDelegate
{
@IBOutlet weak var deleteLocationButton: UIButton!
@IBOutlet weak var mMap: MKMapView!
override func viewDidLoad() {
super.viewDidLoad()
deleteLocationButton.layer.cornerRadius = 40
self.mMap.delegate ... | gpl-3.0 | e88cdf8957a7f17d0840b7227d9bca6b | 26.56 | 141 | 0.728229 | 4.459547 | false | false | false | false |
el-hoshino/NotAutoLayout | Playground.playground/Sources/ProfileSummaryView.swift | 1 | 2850 | import UIKit
import NotAutoLayout
public class ProfileSummaryView: UIView {
private let avatarView: UIImageView
private let mainTitleLabel: UILabel
private let subTitleLabel: UILabel
public var avatar: UIImage? {
get {
return self.avatarView.image
}
set {
self.avatarView.image = newValue
}
}
... | apache-2.0 | 81752c455da33383160905050cbea251 | 19.955882 | 136 | 0.693684 | 3.405018 | false | false | false | false |
carambalabs/UnsplashKit | UnsplashKit/Classes/UnsplashAPI/Models/Response.swift | 1 | 1305 | import Foundation
/// API response that includes the pagination links.
public struct Response<A> {
// MARK: - Attributes
/// Response object.
public let object: A
/// Pagination first link.
public let firstLink: Link?
/// Pagination previous link.
public let prevLink: Link?
/// Pag... | mit | 156cd902e951dbe91b8c5ae6ea94faeb | 27.369565 | 91 | 0.65364 | 4.321192 | false | false | false | false |
ppraveentr/MobileCore | Example/MobileCoreExample/Classes/ContentViewController.swift | 1 | 1040 | //
// ContentViewController.swift
// MobileCore
//
// Created by Praveen P on 01/11/19.
// Copyright © 2019 Praveen Prabhakar. All rights reserved.
//
import Foundation
#if canImport(AppTheming)
import AppTheming
import CoreComponents
#endif
final class ContentViewController: UIViewController, WebViewControllerPr... | mit | e1bfc0baa91a446bcb8b209678b38c10 | 31.46875 | 96 | 0.647738 | 3.308917 | false | false | false | false |
DivineDominion/mac-appdev-code | DDDViewDataExample/ManagedItem.swift | 1 | 2562 | import Foundation
import CoreData
private var itemContext = 0
@objc(ManagedItem)
open class ManagedItem: NSManagedObject, ManagedEntity {
@NSManaged open var uniqueId: NSNumber
@NSManaged open var title: String
@NSManaged open var creationDate: Date
@NSManaged open var modificationDate: Date
... | mit | 7932367cfd128cd80f24a3d4288c1bca | 26.847826 | 156 | 0.57338 | 5.003906 | false | false | false | false |
leotao2014/RTPhotoBrowser | RTPhotoBrowser/RTProgressView.swift | 1 | 2223 | //
// RTProgressView.swift
// RTPhotoBrowser
//
// Created by leotao on 2017/5/7.
// Copyright © 2017年 leotao. All rights reserved.
//
import UIKit
let kProgressViewWidth:CGFloat = 60;
class RTProgressView: UIView {
var progress:CGFloat = 0.0 {
didSet {
setupLayer(withProgress: progress);... | apache-2.0 | 2b4f3f592e349dd25704a64301b65167 | 28.6 | 155 | 0.609009 | 4.319066 | false | false | false | false |
heyjessi/SafeWays | SafeWayController/AppDelegate.swift | 1 | 3266 | //
// AppDelegate.swift
// SafeWay
//
// Created by Hansen Qian on 7/11/15.
// Copyright (c) 2015 HQ. All rights reserved.
//
import GoogleMaps
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFi... | apache-2.0 | ed7c6768d4b90c89fe2679581305a6da | 42.546667 | 285 | 0.714023 | 4.747093 | false | false | false | false |
jbrayton/Golden-Hill-HTTP-Library | GoldenHillHTTPLibrary/URLRequest+Convenience.swift | 1 | 1358 | //
// URLRequest+Convenience.swift
// GoldenHillHTTPLibrary
//
// Created by John Brayton on 3/1/17.
// Copyright © 2017 John Brayton. All rights reserved.
//
import Foundation
public extension URLRequest {
mutating func ghs_setPostJson(_ jsonDictionary: [String: Any]) {
do {
self.set... | mit | 13644819f4d2206300a2c2ae7fd32377 | 34.710526 | 126 | 0.647752 | 4.294304 | false | false | false | false |
Esri/arcgis-runtime-samples-ios | arcgis-ios-sdk-samples/Layers/Raster layer (geopackage)/RasterLayerGPKGViewController.swift | 1 | 2109 | // Copyright 2017 Esri.
//
// 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,... | apache-2.0 | fbb47be2a34537c0adf98ee376085eeb | 38.055556 | 122 | 0.650071 | 4.625 | false | false | false | false |
yonaskolb/XcodeGen | Tests/XcodeGenKitTests/ProjectGeneratorTests.swift | 1 | 159136 | import PathKit
import ProjectSpec
import Spectre
import XcodeGenKit
import XcodeProj
import XCTest
import Yams
import TestSupport
private let app = Target(
name: "MyApp",
type: .application,
platform: .iOS,
settings: Settings(buildSettings: ["SETTING_1": "VALUE"]),
dependencies: [Dependency(type: .... | mit | 306bd34fa32d7c2247fb1f8477d1f7ce | 50.634004 | 254 | 0.484121 | 5.666228 | false | true | false | false |
jjuster/JSSAlertView | Example/Tests/Tests.swift | 1 | 1179 | // https://github.com/Quick/Quick
import Quick
import Nimble
import JSSAlertView
class TableOfContentsSpec: QuickSpec {
override func spec() {
describe("these will fail") {
it("can do maths") {
expect(1) == 2
}
it("can read") {
expect("... | mit | b7541dde79465472b09557de8225405b | 22.46 | 63 | 0.364876 | 5.455814 | false | false | false | false |
panjinqiang11/Swift-WeiBo | WeiBo/WeiBo/Class/View/Compose/EmotionKeyBoard/PJKeyBoardBar.swift | 1 | 2995 | //
// PJKeyBoardBar.swift
// WeiBo
//
// Created by 潘金强 on 16/7/21.
// Copyright © 2016年 潘金强. All rights reserved.
//
import UIKit
enum EmotionType :Int {
case Normal = 1000
case Emoji = 1001
case Lxh = 1002
}
class PJKeyBoardBar: UIStackView {
//上次点击的button
var lastSelectedButton ... | mit | 09b473d8ba6dca4c9225a3686d70562c | 24.344828 | 95 | 0.558163 | 5.157895 | false | false | false | false |
peterb12/nand2tetris | src/Hack Assembler/Hack Assembler/Assembler.swift | 1 | 3538 | //
// Assembler.swift
// Hack Assembler
//
// Created by peterb on 12/29/16.
// Copyright © 2016 peterb. All rights reserved.
//
import Foundation
enum AsmCommandType {
case A_COMMAND;
case C_COMMAND;
case L_COMMAND;
}
func padTo(size : Int, inString : String) -> String {
var paddedString = inStr... | bsd-3-clause | d8a1ce9fb9d0babab5c7cc3f1d55a4a6 | 30.864865 | 92 | 0.510319 | 4.404732 | false | false | false | false |
ijoshsmith/swift-tic-tac-toe | Framework/TicTacToeTests/AI/GameBoard+DSL.swift | 1 | 1172 | //
// GameBoard+DSL.swift
// TicTacToe
//
// Created by Joshua Smith on 11/30/15.
// Copyright © 2015 iJoshSmith. All rights reserved.
//
import Foundation
func board3x3(diagramLines: String...) -> GameBoard {
let diagram = diagramLines.joinWithSeparator("")
return GameBoard.gameBoardFrom3x3TextDiagram(di... | mit | 1897eff8f079cde3f3d67e80b1dc7b45 | 29.025641 | 80 | 0.632792 | 4.108772 | false | false | false | false |
gavrix/ImageViewModel | Carthage/Checkouts/ReactiveSwift/ReactiveSwift.playground/Pages/Property.xcplaygroundpage/Contents.swift | 2 | 9440 | /*:
> # IMPORTANT: To use `ReactiveSwift.playground`, please:
1. Retrieve the project dependencies using one of the following terminal commands from the ReactiveSwift project root directory:
- `git submodule update --init`
**OR**, if you have [Carthage](https://github.com/Carthage/Carthage) installed
- `ca... | mit | 16e8fd0e6d433eb047f833f9a209bae7 | 33.549451 | 388 | 0.681828 | 4.461684 | false | false | false | false |
6ag/WeiboSwift-mvvm | WeiboSwift/Classes/View/Home/StatusCell/StatusPictureView.swift | 1 | 3656 | //
// StatusPictureView.swift
// WeiboSwift
//
// Created by zhoujianfeng on 2017/1/21.
// Copyright © 2017年 周剑峰. All rights reserved.
//
import UIKit
class StatusPictureView: UIView {
/// 配图视图高度约束
@IBOutlet weak var heightConstrait: NSLayoutConstraint!
/// 微博视图模型
var viewModel: StatusVi... | mit | b6ba315e2472d87f8490c373ef083122 | 27.932773 | 94 | 0.469068 | 4.842475 | false | false | false | false |
chaoyang805/DoubanMovie | DoubanMovie/RatingBar.swift | 1 | 4196 | /*
* Copyright 2016 chaoyang805 zhangchaoyang805@gmail.com
*
* 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 appli... | apache-2.0 | 1af73707d4daeb3a54a776b34a15f94c | 32.073171 | 106 | 0.548918 | 4.407367 | false | false | false | false |
chaoyang805/DoubanMovie | DoubanMovie/MovieDetailViewController.swift | 1 | 6882 | /*
* Copyright 2016 chaoyang805 zhangchaoyang805@gmail.com
*
* 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 appli... | apache-2.0 | c5dcb0a82e106517b9f3ad399f830411 | 32.7 | 145 | 0.652671 | 4.723196 | false | false | false | false |
vknabel/Taps | Sources/Taps/Tapes/ThrowingTape.swift | 1 | 1453 | import RxSwift
import TestHarness
public extension OfferingTaps {
/// A tester for potentially throwing tests.
///
/// - Parameter test: The name of the test.
/// - Parameter plan: The amount of expected `TestPoint`s.
/// Will automatically call `TestPoint.end` if all planned tests have been run.
/// -... | mit | dc28779286216045db6717e66ec1af02 | 32.790698 | 117 | 0.640743 | 4.236152 | false | true | false | false |
lamb/trials | llsfw/llsfw/OnlineViewController.swift | 1 | 3605 | //
// OnlineViewController.swift
// llsfw
//
// Created by Lamb on 16/3/7.
// Copyright © 2016年 gm. All rights reserved.
//
import UIKit
import Alamofire
import SwiftyJSON
class OnlineViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet var tableView: UITableView!
... | apache-2.0 | efcc28e8a940aa45cb182dddb9bdb701 | 37.73913 | 125 | 0.650954 | 5.457887 | false | false | false | false |
mobgeek/swift | Swift em 4 Semanas/Playgrounds/Semana 3/2-Propriedades.playground/Contents.swift | 2 | 3444 | // Playground - noun: a place where people can play
import UIKit
// Instâncias de Estruturas como constantes
struct AiPhoneEstrutura {
//Propriedades:
var versãoOS: Float
let UDID: String
}
var umAiPhone = AiPhoneEstrutura(versãoOS: 7.0, UDID:"GFHTUN56HET546GDM9KJ")
umAiPhone.versãoOS = 8.0
... | mit | 3508c52025960f1dea1796721eb43d38 | 15.261905 | 146 | 0.65183 | 3.051832 | false | false | false | false |
scuty2000/open-gestional-software | Open-Gestional-Software/ViewController.swift | 1 | 110179 | //
// ViewController.swift
// Open-Gestional-Software
//
// Created by Luca Scutigliani on 06/06/17.
// Copyright © 2017 Scutigliani Luca. All rights reserved.
//
import Cocoa
import WebKit
class ViewController: NSViewController {
//Box 1 (Home Page) [Main]
@IBOutlet weak var box1: NSBox!
//... | gpl-3.0 | 6c160f7e2adf90f3c23948c09194bc8a | 40.979405 | 391 | 0.446925 | 4.618192 | false | false | false | false |
frootloops/swift | test/SILGen/super_init_refcounting.swift | 1 | 4337 | // RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
class Foo {
init() {}
init(_ x: Foo) {}
init(_ x: Int) {}
}
class Bar: Foo {
// CHECK-LABEL: sil hidden @_T022super_init_refcounting3BarC{{[_0-9a-zA-Z]*}}fc
// CHECK: bb0([[INPUT_SELF:%.*]] : $Bar):
// CHECK: [[SELF_BOX:%.*]] = alloc_b... | apache-2.0 | c961915e015079f4b72ae7e4d37b89e0 | 42.808081 | 149 | 0.541849 | 3.231744 | false | false | false | false |
StachkaConf/ios-app | StachkaIOS/StachkaIOS/Classes/User Stories/Favourites/Feed/Assembly/FavouritesFeedAssembly.swift | 1 | 879 | //
// FavouritesFeedAssembly.swift
// StachkaIOS
//
// Created by Konstantin Mordan on 02/04/2017.
// Copyright © 2017 m.rakhmanov. All rights reserved.
//
import Foundation
import UIKit
class FavouritesFeedAssembly: ModuleAssembly {
let assemblyFactory: AssemblyFactory
init(assemblyFactory: AssemblyFac... | mit | e39c0bb492ead6539e0c5e009e69fa10 | 28.034483 | 124 | 0.729216 | 4.811429 | false | false | false | false |
arnaudbenard/my-npm | Pods/Charts/Charts/Classes/Renderers/RadarChartRenderer.swift | 20 | 9888 | //
// RadarChartRenderer.swift
// Charts
//
// Created by Daniel Cohen Gindi on 4/3/15.
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
// A port of MPAndroidChart for iOS
// Licensed under Apache License 2.0
//
// https://github.com/danielgindi/ios-charts
//
import Foundation
import CoreGraphics
impor... | mit | b0d9f72ecb06e7c2b0ca46d369a13b66 | 32.522034 | 273 | 0.545914 | 5.327586 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.