label int64 0 1 | text stringlengths 0 2.8M |
|---|---|
0 | //
// ImageStyle.swift
// ExpertChow
//
// Created by Adam Sterrett on 3/11/21.
//
import Foundation
import UIKit
enum ImageType: Int, CaseIterable {
case arrowBack
case closeButton
func imageName() -> String {
var imageName = ""
switch self {
case .arrowBack:... |
0 | //
// CodeSystems.swift
// HealthRecords
//
// Generated from FHIR 4.0.1-9346c8cc45
// Copyright 2022 Apple Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www... |
0 | //
// RanchForecastUITests.swift
// RanchForecastUITests
//
// Created by Hanguang on 1/2/16.
// Copyright © 2016 Hanguang. All rights reserved.
//
import XCTest
class RanchForecastUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method... |
0 | //
// EitherType+Result.swift
// Lustre
//
// Created by Zachary Waldowski on 7/25/15.
// Copyright © 2014-2015. Some rights reserved.
//
extension EitherType where LeftType == Error {
public var isSuccess: Bool {
return isRight
}
public var isFailure: Bool {
return isLeft
... |
0 | //
// 🦠 Corona-Warn-App
//
import Foundation
import UIKit
protocol ENANavigationControllerWithFooterChild: UIViewController {
var footerView: ENANavigationFooterView? { get }
func navigationController(_ navigationController: ENANavigationControllerWithFooter, didTapPrimaryButton button: UIButton)
func navigation... |
0 | //
// Entity.swift
// Example
//
// Created by Luciano Polit on 11/14/17.
// Copyright © 2017 Luciano Polit. All rights reserved.
//
import Foundation
@testable import Leash
struct PrimitiveEntity: Codable, Equatable {
let first: String
let second: Int
let third: Bool
func toJSON() -> [S... |
0 | //
// ViewController.swift
// ScrollerTest
//
// Created by Andreas Verhoeven on 08/03/2021.
//
import UIKit
class ViewController: UITableViewController {
var itemHeights = Array<CGFloat>()
func reload() {
itemHeights = (0..<3000).map { _ in CGFloat(Int.random(in: 40..<150)) }
tableView.reloadData()
}
fu... |
0 | /// A sequence that maps the base elements using `transform` and stops
/// when the transform returns `nil`.
public struct MapWhileSequence<Base: Sequence, A> {
internal let base: Base
internal let transform: (Base.Element) -> A?
}
extension MapWhileSequence {
/// An iterator that provides mapped elements ... |
0 | // CredentialsManager.swift
//
// Copyright (c) 2017 Auth0 (http://auth0.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 right... |
0 | //
// HQACellTopView.swift
// HQSwiftMVVM
//
// Created by 王红庆 on 2017/8/28.
// Copyright © 2017年 王红庆. All rights reserved.
//
import UIKit
class HQACellTopView: UIView {
var viewModel: HQStatusViewModel? {
didSet {
avatarImageView.hq_setImage(urlString: viewModel?.status.user?.profile_im... |
0 | //
// RxCollectionViewCell.swift
// RxSwift-Table-Collection
//
// Created by iOS_Tian on 2017/9/19.
// Copyright © 2017年 Quanjun. All rights reserved.
//
import UIKit
import Kingfisher
class RxCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var headImage: UIImageView!
@IBOutlet weak var focusL... |
0 | import Quick
import Nimble
import Stencil
@testable import Sourcery
class GeneratorSpec: QuickSpec {
override func spec() {
describe("Generator") {
let fooType = Class(name: "Foo", variables: [Variable(name: "intValue", typeName: "Int")], inheritedTypes: ["NSObject", "Decodable", "Alternative... |
0 | //
// AlbumView.swift
// SwiftUIDemo
//
// Created by Seth Porter on 9/13/19.
// Copyright © 2019 Seth Porter. All rights reserved.
//
import SwiftUI
struct AlbumView: View {
@State var color: Color
@State var image: Image
var body: some View {
GeometryReader { geometry in
ZSt... |
0 | //
// Location+CoreLocation.swift
// RestaurantsMapScene
//
// Created by Grigory Entin on 21/05/2019.
// Copyright © 2019 Grigory Entin. All rights reserved.
//
import CoreLocation
extension CLLocationCoordinate2D {
init(from location: Location) {
self.init(
latitude: location.latitu... |
0 |
//
// Onboard.swift
// OnboardingTutorial
//
// Created by Kanishka on 20/05/19.
// Copyright © 2019 Kanishka. All rights reserved.
//
struct Onboard {
var image: String
var title: String
var info : String
init(image: String, title: String, info: String) {
self.title = title
s... |
0 | // MasterViewController.swift
//
// Copyright (c) 2014 Alamofire (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, including without limitation... |
0 | //
// SecretCodes.swift
// ClubhouseAvatarMaker
//
// Created by Антон Текутов on 08.03.2021.
//
import Foundation
struct SecretCode: Codable {
let id: Int
let brand: String
let code: String
let description: String
enum CodingKeys: String, CodingKey {
case id = "id"
ca... |
0 | //
// BezierGenerator.swift
// MaLiang
//
// Created by Harley.xk on 2017/11/10.
//
import UIKit
class BezierGenerator {
enum Style {
case linear
case quadratic // this is the only style currently supported
case cubic
}
init() {
}
init(beginPoint: CGPoint... |
0 | //
// FaceIDViewController.swift
// SLProjectModuleComm
//
// Created by 孙梁 on 2021/6/30.
//
import UIKit
import SLIKit
class FaceIDViewController: BaseViewController {
private let manager = SLFaceIDWithTouchIDManager()
@IBOutlet weak var label: UILabel!
@IBAction func click(_ sender: UI... |
0 | import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(SwiftKeychainWrapperTests.allTests),
]
}
#endif
|
0 | // SDWebImageManagerHelper.swift
//
// Copyright (c) 2015 Andrea Bizzotto (qqxtk@example.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 limi... |
0 | //
// FileInfo.swift
// Markdown
//
// Created by Luo Sheng on 15/11/1.
// Copyright © 2015年 Pop Tap. All rights reserved.
//
import Foundation
struct FileInfo {
static let prefetchedProperties: [URLResourceKey] = [
.nameKey,
.isDirectoryKey,
.creationDateKey,
.contentModificat... |
0 | //
// Time.swift
// VideoCapture
//
// Created by Nathan Perkins on 11/28/15.
// Copyright © 2015 GardnerLab. All rights reserved.
//
import Foundation
import Darwin
class Time
{
private var timeStart: UInt64 = 0
private var timeStop: UInt64 = 0
private static var timeBase: Double?
priva... |
0 | import NIO
import NIOHTTP1
import XCTest
import KituraNet
class ChannelQuiescingTests: KituraNetTest {
static var allTests: [(String, (ChannelQuiescingTests) -> () throws -> Void)] {
return [
("testChannelQuiescing", testChannelQuiescing),
]
}
func testChannelQuiescing() {
... |
0 | //
// ReqresLogging.swift
// Reqres
//
// Created by Jan Mísař on 02.08.16.
//
//
import Foundation
public enum LogLevel {
case none
case light
case verbose
}
public protocol ReqresLogging {
var logLevel: LogLevel { get set }
func logVerbose(_ message: String)
func logLight(_ message: Str... |
0 | //
// Date+Extension.swift
// iOS-Weather
//
// Created by Matheus D Sanada on 04/02/21.
//
import UIKit
extension Date {
public func dateFormatted() -> String {
let formatter = formatterPtBr("dd/MM/yyyy")
return formatter.string(from: self)
}
public func dateAPIFormatted() -> Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.