blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 6 116 | path stringlengths 5 872 | src_encoding stringclasses 7
values | length_bytes int64 10 4.68M | score float64 2.52 5.63 | int_score int64 3 5 | detected_licenses listlengths 0 47 | license_type stringclasses 2
values | text stringlengths 7 4.81M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
5e164cfe4372dd169b8172a88cdaf1bdf9b88369 | Swift | bolambaoz/ChatAppiOS | /Chatapp/Resources/Helpers.swift | UTF-8 | 1,002 | 2.765625 | 3 | [] | no_license | //
// LogInViewController.swift
// Chatapp
//
// Created by zebedee on 2021/01/25.
//
import UIKit
import FirebaseAuth
struct Helpers {
static func cearteDefautUsername(_ result: String?) {
let username = result?.split(separator: "@")
print("User name: \(String(username!.first ?? "")) with... | true |
06348d713a5ec4573456864d6f0ee26ba761cbef | Swift | melke/CloudKitDictionarySyncer | /CloudKitDictionarySyncerTests/CloudKitDictionarySyncerTests.swift | UTF-8 | 11,051 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | //
// pomodoroTests.swift
// pomodoroTests
//
// Created by Mats Melke on 01/02/15.
// Copyright (c) 2015 Baresi. All rights reserved.
//
import UIKit
import XCTest
class CloudKitDictionarySyncerTests: XCTestCase {
let debugflag:Bool = true
override func setUp() {
super.setUp()
// Pu... | true |
47fad6ffb5e90e37f55f2912773a907eae01e10a | Swift | jacob1710/RecipeListApp | /RecipeListApp/Views/RecipeDetailView.swift | UTF-8 | 3,138 | 3.296875 | 3 | [] | no_license | //
// RecipeDetailView.swift
// RecipeListApp
//
// Created by Jacob Scase on 14/06/2021.
//
import SwiftUI
struct RecipeDetailView: View {
var recipe:Recipe
@State var selectedServingSize = 2
var body: some View {
ScrollView {
VStack(alignment: .leading){
... | true |
23f57902d9210f1fe229146e504d2bfbc5348fe6 | Swift | CTokkie/code | /Swift/Week4Deliverables.swift | UTF-8 | 1,530 | 3.84375 | 4 | [] | no_license | func BubbleSortAscending(array: [Int]) -> [Int] {
let numLength = array.count
var temp:Int
var array1 = [Int]()
array1 = array
for i in 0..<(numLength-1){
for j in 0..<(numLength-i-1){
if( array1[j]>array1[j+1]){
temp = array1[j]
array1[j] = array1[j+1]
array1[j+1] = temp
}
}
}
return ar... | true |
f0f1f0737de54432bed0d68bdec6f80b596cde09 | Swift | yzhukovs/Q-and-A | /Q-A/Q-A/AnswerViewController.swift | UTF-8 | 1,542 | 2.59375 | 3 | [] | no_license | //
// AnswerViewController.swift
// Q-A
//
// Created by Yvette Zhukovsky on 10/10/18.
// Copyright © 2018 Yvette Zhukovsky. All rights reserved.
//
import UIKit
class AnswerViewController: UIViewController {
var qc: QuestionController?
var q: Question?
@IBOutlet weak var answererTextField: UITe... | true |
f6d4757681f3a0bab5fc4a57671aa00e3ba29760 | Swift | CityFleetApp/ios-app | /CitiFleet/CitiFleet/Model/Settings.swift | UTF-8 | 4,698 | 2.6875 | 3 | [] | no_license | //
// Settings.swift
// CitiFleet
//
// Created by Nick Kibish on 3/9/16.
// Copyright © 2016 Nick Kibish. All rights reserved.
//
import UIKit
class Settings: NSObject, NSCoding {
static let notificationsEnabled = "notifications_enabled"
static let chatPrivacy = "chat_privacy"
static let visible = "v... | true |
781205ad8923c4b75815e7c58525843a34c6a22b | Swift | silicn/SwiftUIDemo | /SwiftUIDemo/HomeListCell.swift | UTF-8 | 692 | 3 | 3 | [] | no_license | //
// HomeListCell.swift
// SwiftUIDemo
//
// Created by silicn on 2019/10/10.
// Copyright © 2019 Silicn. All rights reserved.
//
import SwiftUI
struct HomeListCell: View {
var title:String
init(title:String){
self.title = title;
}
var body: some View {
NavigationLin... | true |
41a6f05fb27c4dfaf93cf77fe604d86ca678caea | Swift | gitteor/uikit-viewpager | /ViewPager/ViewController.swift | UTF-8 | 1,926 | 2.6875 | 3 | [] | no_license | //
// ViewController.swift
// ViewPager
//
// Created by Zafar on 14/08/21.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.overrideUserInterfaceStyle = .light
self.view.backgroundColor = .white
self.v... | true |
3718597e03338627fae6e136b0a71fee08b5a1fc | Swift | apple/swift | /test/Constraints/construction.swift | UTF-8 | 7,534 | 3.375 | 3 | [
"Apache-2.0",
"Swift-exception"
] | permissive | // RUN: %target-typecheck-verify-swift
struct X {
var i : Int, j : Int
}
struct Y {
init (_ x : Int, _ y : Float, _ z : String) {}
}
enum Z {
case none
case char(UnicodeScalar)
case string(String)
case point(Int, Int)
init() { self = .none }
init(_ c: UnicodeScalar) { self = .char(c) }
// expected... | true |
6a4aa3d5416eaa15696f24c30d30a8e3392674f3 | Swift | SpeedSoft/Prueba-Tecnica-Global-Hitss | /PruebaGlobalHitss/Main/ViewModel/VMListMovies.swift | UTF-8 | 982 | 2.703125 | 3 | [] | no_license | //
// VMListaMovies.swift
// PruebaGlobalHitss
//
// Created by Bart on 15/09/21.
//
import Foundation
class VMListMovies : NSObject {
private var apiService : APIService!
private(set) var moviesData : ResponseTopRate! {
didSet {
self.bindListMovieViewModelToController()
}
... | true |
c18c4fc4abb16fc89700229a05e3880714e17030 | Swift | vidaaudrey/012-Word-Color-Lean-UIViewController-UITableView-UICollectionView | /012-Word-Color-Lean-UIViewController/CustomTableViewCell.swift | UTF-8 | 849 | 2.5625 | 3 | [] | no_license | //
// CustomTableViewCell.swift
// 012-Word-Color-Lean-View-Controller-With-UITableView-UICollectionView
//
// Created by Audrey Li on 4/5/15.
// Copyright (c) 2015 com.shomigo. All rights reserved.
//
import UIKit
class CustomTableViewCell: UITableViewCell {
@IBOutlet weak var label: UILabel!
func ... | true |
4e196b61b0cc63c7d7d269217995cca389a10a47 | Swift | westsider/Channel-System | /Channel System/Model/Date Utility.swift | UTF-8 | 8,758 | 2.875 | 3 | [] | no_license | //
// Date Utility.swift
// Channel System
//
// Created by Warren Hansen on 10/27/17.
// Copyright © 2017 Warren Hansen. All rights reserved.
//
import Foundation
import UIKit
import AVFoundation
class Utilities {
let formatter = DateFormatter()
let today = Date()
func convertToDateFrom(str... | true |
2f50a9cb3c2de3e11be4cc04045f68ae06001eba | Swift | daniele99999999/Telephone-Directory-Mobile-Edition | /TelephoneDirectory/Common/Extensions/Collection+addIfNotNil.swift | UTF-8 | 960 | 3.125 | 3 | [
"MIT"
] | permissive | //
// Collection+addIfNotNil.swift
// TelephoneDirectory
//
// Created by Daniele Salvioni on 12/11/2019.
// Copyright © 2019 Daniele Salvioni. All rights reserved.
//
import UIKit
import SwifterSwift
extension Dictionary
{
mutating func mapValueIfNotNil(key: Key, value: Value?)
{
guard let _value... | true |
182fb84e80b05200dc429bd427b6e4d6d06b2872 | Swift | KseniiaRyuma/how_old_are_you | /HowOldYouAre/UploadPictureVC.swift | UTF-8 | 7,440 | 2.5625 | 3 | [] | no_license | //
// UploadPictureVC.swift
// HowOldYouAre
//
// Created by Kseniia Ryuma on 4/13/17.
// Copyright © 2017 Kseniia Ryuma. All rights reserved.
// Color #684A7C
import UIKit
import ProjectOxfordFace
class UploadPictureVC: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
... | true |
c3a285882dbb559412021ddeaa980443be8b15b0 | Swift | xaanimus/FlareEyes | /Flare Eyes/Flare Eyes/ImageProcessor.swift | UTF-8 | 3,314 | 2.65625 | 3 | [] | no_license | //
// ImageProcessor.swift
// Flare Eyes
//
// Created by Serge-Olivier Amega on 3/4/16.
// Copyright © 2016 Nexiosoft. All rights reserved.
//
import UIKit
import ImageIO
class ImageProcessor: NSObject {
var setImgFunc : ((UIImage) -> Void)?
var lensFlare = LensFlare.getLensFlareWithName("default")
... | true |
a01767bb57e93662e8437d2080dc4e4bf9940190 | Swift | egonSchiele/CloudKit-To-Do-List | /C2D/CloudKitToDoList/ASGNewTaskViewController.swift | UTF-8 | 1,789 | 2.796875 | 3 | [
"MIT"
] | permissive | //
// ASGNewTaskViewController.swift
// CloudKitToDoList
//
// Created by Anthony Geranio on 1/15/15.
// Copyright (c) 2015 Sleep Free. All rights reserved.
//
import Foundation
import UIKit
import CloudKit
class ASGNewTaskViewController: UIViewController, UITableViewDelegate, UITextViewDelegate {
// UITextV... | true |
1c50d5f5e742128ba3e5268b997773144e1ea24f | Swift | barcodepandora/reel | /Reel/Networking/RequestPoster.swift | UTF-8 | 1,352 | 2.796875 | 3 | [] | no_license | //
// RequestPoster.swift
// Reel
//
// Created by Juan Manuel Moreno on 26/08/2019.
// Copyright © 2019 Uzupis. All rights reserved.
//
import Foundation
import Alamofire
class RequestPoster: Request {
func getPosterImage(_ size: String, filePath: String, _ completionHandlerForPosterImage: @escaping ( _ imag... | true |
6c5c4362ceb247afe23d7271542871906b0855b9 | Swift | SH-OH/Giphy-SHOH | /Giphy-SHOH/Sources/Utils/Extensions/KeyedDecodingContainer+Extensions.swift | UTF-8 | 614 | 2.75 | 3 | [] | no_license | //
// KeyedDecodingContainer+Extensions.swift
// Giphy-SHOH
//
// Created by Oh Sangho on 2021/01/26.
//
import Foundation
extension KeyedDecodingContainer {
func decode(_ type: [ImageType: ImageModel].Type,
forKey key: Key) throws -> [ImageType: ImageModel] {
let imageDic = try self.de... | true |
62de70ed942b0196fbb44c52ef26e8178bc2cb02 | Swift | AnthonyMillerSF/SalesforceMobileSDK-iOS | /libs/SalesforceSDKCore/SalesforceSDKCore/Classes/Extensions/RestClient.swift | UTF-8 | 8,199 | 2.828125 | 3 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | import Foundation
/*
RestClient.swift
SalesforceSDKCore
Created by Raj Rao on 9/24/19.
Copyright (c) 2019-present, salesforce.com, inc. All rights reserved.
Redistribution and use of this software in source and binary forms, with or without modification,
are permitted provided that the following conditions... | true |
593fa16a0850bd5a2917300cbef6931fdece7cf2 | Swift | ebarrera95/fitgoal | /FitGoal/FitGoal/UserProfileConfiguration/WalkthroughIcon.swift | UTF-8 | 1,414 | 3.09375 | 3 | [
"MIT"
] | permissive | //
// Images.swift
// FitGoal
//
// Created by Eliany Barrera on 27/3/20.
// Copyright © 2020 Eliany Barrera. All rights reserved.
//
import Foundation
import UIKit
struct WalkthroughIcon {
let iconType: WalkThroughIconType
var selected = false
private var iconNameSuffix: String {
if... | true |
dbedf458df5e76028c6fdea19d5ea10e396f8952 | Swift | dylane1/Xcode-Templates | /SlingingPixels - Boilerplate/Reusable View Protocol.xctemplate/___FILEBASENAME___.swift | UTF-8 | 1,516 | 2.953125 | 3 | [] | no_license | //
// ___FILENAME___
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
//
import UIKit
import MapKit
/**
Adapted from Natasha "The Robot"'s WWDC 2016 POP talk:
https://realm.io/news/appbuilders-natasha-muraschev-practical-protocol-oriented-programming
*/
protocol Reus... | true |
12c2bd9bd31da6ff8d4cfc6cb9d24dafaf8ea6f5 | Swift | bibekdari/test | /MidvalleyPinterest/PinterestImageList/View/RefreshView/RefreshView.swift | UTF-8 | 1,909 | 2.671875 | 3 | [] | no_license | //
// RefreshView.swift
// MidvalleyPinterest
//
// Created by bibek timalsina on 3/23/19.
// Copyright © 2019 bibek timalsina. All rights reserved.
//
import UIKit
class RefreshView: UIView {
@IBOutlet weak var logoView: UIImageView!
private var gradientView: UIView?
// MARK: - setup view
... | true |
3c89bd8b61d8c60072cedf6e933075d381b2fbb3 | Swift | YouareMylovelyGirl/Sina-Weibo | /新浪微博/新浪微博/Classes/Tools(工具)/Extension/UIColor+Extensions.swift | UTF-8 | 451 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | //
// UIColor+Extensions.swift
// 新浪微博
//
// Created by 阳光 on 2017/6/5.
// Copyright © 2017年 YG. All rights reserved.
//
import Foundation
import UIKit
//设置随机色
extension UIColor {
var randomColor: UIColor {
return UIColor.init(red:CGFloat(arc4random_uniform(255))/CGFloat(255.0), green:CGFloat(arc4rand... | true |
261054fdda68f117a3291b8779ff5f99aa6eba0e | Swift | mohd14shoeb/PKSwipeTableViewCell | /PKSwipeTableViewCell/PKSwipeTableViewCell/ViewController.swift | UTF-8 | 1,895 | 2.671875 | 3 | [] | no_license | //
// ViewController.swift
// PKSwipeTableViewCell
//
// Created by Pradeep Kumar Yadav on 16/04/16.
// Copyright © 2016 iosbucket. All rights reserved.
//
import UIKit
class ViewController: UIViewController,UITableViewDataSource,UITableViewDelegate,PKSwipeCellDelegateProtocol {
let arrDataToDisplay:Array<St... | true |
fd66b62a9fd5183ac5a72e6856cf99830c833247 | Swift | virumax/MyShop | /MyShop/View/CategoriesTableViewController.swift | UTF-8 | 3,170 | 2.609375 | 3 | [
"MIT"
] | permissive | //
// MenuTableViewController.swift
// MyShop
//
// Created by Virendra Ravalji on 2019/7/2.
// Copyright © 2019 Virendra Ravalji. All rights reserved.
//
import Foundation
import CollapsibleTableSectionViewController
class CategoriesViewController: CollapsibleTableSectionViewController {
var categoryVie... | true |
be4bc8e727c616bbf8fc1845df198a3a70511b56 | Swift | sashei/wildlifers | /wildlifers/DataEntryTableViewController.swift | UTF-8 | 2,712 | 2.796875 | 3 | [
"MIT"
] | permissive | import UIKit
import RealmSwift
protocol DataEntryTableViewCell {
var type:DataEntryCellType { get }
func configure(configuration:CellConfiguration)
}
class DataEntryTableViewController : UITableViewController, UICollectionViewDataSource {
let presenter = DataEntryTablePresenter()
var dataTypes:[(... | true |
eb5d4a48677dd55f217ad7acc19be4067ba5e243 | Swift | goodsw4all/BraillePostCardBackend | /Sources/main.swift | UTF-8 | 3,082 | 2.984375 | 3 | [] | no_license | //
// main.swift
//
// BraillePostCard
//
// Created by Myoungwoo Jang on 10/09/2017.
//
import PerfectLib
import PerfectHTTP
import PerfectHTTPServer
let server = HTTPServer()
server.serverPort = 8080
server.documentRoot = "webroot"
var routes = Routes()
routes.add(method: .get, uri: "/", handler: {
request... | true |
c723b4f74da11b2c49e483f6653becd13bad37f9 | Swift | RuotongX/JourneyPlanner | /JourneyPlanner/LocationInformation.swift | UTF-8 | 935 | 3.203125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | //
// City.swift
// JourneyPlanner
//
// Created by Dalton Chen on 21/04/19.
// Copyright © 2019 RuotongX. All rights reserved.
//
// This class is storing the location information 21/04/2019 dalton
import Foundation
import CoreLocation
// this class is all about the location information. 21/04/2019 dalton
class L... | true |
26c2aff062ae2783993d5f167a6d78e1f5247c42 | Swift | whosjorge23/StarWarsAPI | /StarWarsAPI/TableViewController.swift | UTF-8 | 2,423 | 2.8125 | 3 | [] | no_license | //
// TableViewController.swift
// StarWarsAPI
//
// Created by Jorge Giannotta on 07/01/2021.
// Copyright © 2021 Westcostyle. All rights reserved.
//
import UIKit
class TableViewController: UITableViewController {
var characters:[SWCharacterList] = []
override func viewDidLoad() {
super.vi... | true |
fbf424ef82375898d7d4b7fdb9e84dc1534decef | Swift | eLud/ios-quiris-infotel-nov20 | /Projects/MultiScreens/MultiScreens/CustomView.swift | UTF-8 | 661 | 2.765625 | 3 | [] | no_license | //
// CustomView.swift
// MultiScreens
//
// Created by Ludovic Ollagnier on 06/11/2020.
//
import UIKit
class CustomView: UIView {
@IBOutlet var contentView: UIView?
override init(frame: CGRect) { // Utilisé si init par le code
super.init(frame: frame)
common()
}
required init?(... | true |
27ca7bac4b30e8593d9e217d8bb826e00773a139 | Swift | Lucci93/Walli-Project | /walli-ios/Walli/UpdateProfileFunction.swift | UTF-8 | 1,520 | 2.875 | 3 | [
"MIT"
] | permissive | //
// UpdateProfileFunction.swift
// Walli
//
// Created by Daniele Piergigli on 01/07/16.
// Copyright © 2016 WalliApp. All rights reserved.
//
import UIKit
import CryptoSwift
import SwiftyJSON
import Foundation
class UpdateProfileFunction {
// server function
var MServer = ServerFunction()
... | true |
b8209b26f05d3e3218b3da6975b738daad4de32b | Swift | saumya/SwiftSlideToOpenMenu | /SwiftSlideMenu/ViewControllerHome.swift | UTF-8 | 2,137 | 2.515625 | 3 | [] | no_license | //
// ViewControllerHome.swift
// SwiftSlideMenu
//
// Created by saumya on 16/05/16.
// Copyright © 2016 saumya. All rights reserved.
//
import UIKit
class ViewControllerHome: UIViewController {
// 1
let interactor = Interactor()
@IBAction func openMenu(sender: AnyObject) {
performSegue... | true |
ec13c355b918c9dacd4fb1c2690a2c84259d73ea | Swift | tugnt/SwiftUI | /SwiftUIPart2/SwiftUIPart2/SwiftUIComponents/Link and Menu/SwiftUILinkAndMenu.swift | UTF-8 | 1,353 | 2.953125 | 3 | [] | no_license | //
// SwiftUILinkAndMenu.swift
// SwiftUIPart2
//
// Created by グェン・トゥン on 2021/08/13.
//
import SwiftUI
struct SwiftUILinkAndMenu: View {
var body: some View {
VStack {
Link("View my profile",
destination: URL(string: "https://github.com/tugnt")!)
... | true |
25340163ef8ce9ab9a71513b82099cfa9cafa62d | Swift | felixvisee/Marionette | /Marionette/Utils.swift | UTF-8 | 250 | 2.796875 | 3 | [
"MIT"
] | permissive | // Copyright (c) 2015 Felix Jendrusch. All rights reserved.
import Foundation
internal func unzip<A, B>(x: [(A, B)]) -> ([A], [B]) {
var ax = [A](), bx = [B]()
for (a, b) in x {
ax.append(a)
bx.append(b)
}
return (ax, bx)
}
| true |
d0cbd387cfe25bfe5ab3690692218ff09146e11a | Swift | coderZsq/coderZsq.practice.native | /StudyNotes/Lang Collection/Swift/24-从OC到Swift/24-从OC到Swift/ViewController.swift | UTF-8 | 2,213 | 3.09375 | 3 | [
"MIT"
] | permissive | //
// ViewController.swift
// 24-从OC到Swift
//
// Created by 朱双泉 on 2019/8/19.
// Copyright © 2019 Castie!. All rights reserved.
//
import UIKit
enum R {
enum string: String {
case add = "添加"
}
enum image: String {
case logo
}
enum segue: String {
case login_main
}
}... | true |
bac5b7ce3fec02793cdb00ec6134fd00ae58064f | Swift | jacquealvesb/fix-it-all | /Train.playground/Pages/Game.xcplaygroundpage/Sources/gameOver.swift | UTF-8 | 1,983 | 2.875 | 3 | [] | no_license | import PlaygroundSupport
import SpriteKit
public class GameOver : SKScene {
public override func didMove(to view: SKView){
self.backgroundColor = NSColor(red: 0.43, green: 0.17, blue: 0.0, alpha: 1.0)
let homeButton = createSprite(imageName: "home_button", at: CGPoint(x: -150, y: 0))
... | true |
fff5f2af819c62bde1a973d1674cd03419d423fe | Swift | cagricolak/TextSphere | /TextSphere.swift | UTF-8 | 7,553 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | //
// TextSphere.swift
// HoverTextFieldView
//
// Created by cagricolak on 18.06.2019.
// Copyright © 2019 cagricolak. All rights reserved.
//
import UIKit
import AudioToolbox
public class TextSphere: UIView {
public var characterLimit = 10
private let bottomBorder = CALayer()
private let border... | true |
03cea1d008416b25ca40cd6cb60a492778c0f2cf | Swift | ajunlonglive/ArtShredder | /ArtShredder/Common/Extension/Additional.swift | UTF-8 | 617 | 2.890625 | 3 | [
"MIT"
] | permissive | //
// Additional.swift
// ArtShredder
//
// Created by marty-suzuki on 2018/10/17.
// Copyright © 2018年 marty-suzuki. All rights reserved.
//
import Foundation
struct Additional<Base> {
let base: Base
}
protocol AdditionalCompatible {
associatedtype Base = Self
static var additional: Additional<Base>... | true |
7560c2b99f3d4439ef8d3ed5e21abce17b756703 | Swift | atamosajr1/ChallengeApp | /ChallengeApp/ChallengeApp/CoreDataManager.swift | UTF-8 | 8,020 | 2.5625 | 3 | [] | no_license | //
// CoreDataManager.swift
// ChallengeApp
//
// Created by Jayr Atamosa on 02/08/2019.
// Copyright © 2019 Jayr Atamosa. All rights reserved.
//
import Foundation
import CoreData
import UIKit
extension NSPersistentStoreCoordinator {
public enum CoordinatorError: Error {
case modelFileNotFound
case mod... | true |
92f90c7bc93f43048e5ae614d71bb4448f6bc18f | Swift | Wrapperss/Carte | /Carte/Carte/Infrastructure/Service/DataPrepareService.swift | UTF-8 | 765 | 3 | 3 | [
"MIT"
] | permissive | //
// DataPrepareService.swift
// creams
//
// Created by Rawlings on 15/01/2018.
// Copyright © 2018 creams.io. All rights reserved.
//
import Foundation
struct DataPrepareService {
struct Image {}
}
// MARK: - Image
extension DataPrepareService.Image {
static func completeUrl(_ url: String) -> S... | true |
43b572709d036e223e4b7bce7a09a3c101a97790 | Swift | kfarst/codepath-prework | /checkpoint2.swift | UTF-8 | 557 | 2.984375 | 3 | [] | no_license | import Foundation
class Solution {
func prettyPrint(_ A: inout Int) -> [[Int]] {
var matrix = [[Int]]()
var start = 0
var ending = A * 2 - 1
for i in 0..<ending {
matrix.append(Array(repeating: 0, count: ending))
}
while start < ending {
for i in start..<ending {
... | true |
6ddf38c2814f2a5e27762e4e50cd2af4b2a4350a | Swift | kushalpagolu/AgelessMindzDraft | /RecipeApp/View/Home/FurnitureDetails/ProductAnalyticsView.swift | UTF-8 | 1,163 | 2.71875 | 3 | [] | no_license |
//
// Created by mt on 11.05.2020.
// Copyright © 2020 S3soft. All rights reserved.
//
import SwiftUI
struct ProductAnalyticsView: View {
// MARK: - PROPERTIES
var woodWorks: WoodWorks
var body: some View {
HStack(alignment: .center, spacing: 12) {
HStack(alignment: .cente... | true |
0e80513cf7cf677771f308334cb99f0b74291107 | Swift | chinhnguyen/VirtaApp | /VirtaApp/UI/StationList/ConnectorView.swift | UTF-8 | 991 | 2.703125 | 3 | [] | no_license | //
// ConnectorView.swift
// VirtaApp
//
// Created by Chinh Nguyen on 4/27/20.
// Copyright © 2020 Virta. All rights reserved.
//
import SwiftUI
import VirtaSdk
struct ConnectorView: View {
var connector: Connector
var body: some View {
HStack {
VStack {
Imag... | true |
b3a353dd0cb748d9f072d0b509433d4c1f50f3f7 | Swift | icylydia/PlayWithLeetCode | /100. Same Tree/solution.swift | UTF-8 | 652 | 2.96875 | 3 | [
"MIT"
] | permissive | /**
* Definition for a binary tree node.
* public class TreeNode {
* public var val: Int
* public var left: TreeNode?
* public var right: TreeNode?
* public init(_ val: Int) {
* self.val = val
* self.left = nil
* self.right = nil
* }
* }
*/
class Solution {
fu... | true |
fc9f8c32244fdb5d8c4a75d89812113e2cc7ef6d | Swift | devQQ/SwiftUIStyleKit | /Sources/SwiftUIStyleKit/Extensions/Views/View+Disclosure.swift | UTF-8 | 590 | 3.03125 | 3 | [
"MIT"
] | permissive | //
// View+Disclosure.swift
//
//
// Created by Q Trang on 7/20/20.
//
import SwiftUI
public struct ShowDisclosureIndicatorModifier: ViewModifier {
public let color: Color
public func body(content: Content) -> some View {
HStack {
content
Image(systemName: "chevron.rig... | true |
75bdafefbdf5a41751019c2596e11930a17a114f | Swift | Sonicyou/Avito | /AvitoFrolov/NetworkService.swift | UTF-8 | 1,201 | 2.953125 | 3 | [] | no_license | //
// NetworkService.swift
// AvitoFrolov
//
// Created by Артем Фролов on 30.08.2021.
//
import Foundation
class NetworkService {
func getEmployeesList(completion: @escaping EmployeesListCompletion) {
getRequest(URLString: baseURL) { result in
switch result {
case .failure... | true |
b4515b19c8907c8ac98043b52722b0d002374281 | Swift | crisbarril/DevigetTest | /DevigetTest/DevigetTest/Services/Network/Service/ResponseType.swift | UTF-8 | 483 | 2.921875 | 3 | [] | no_license | //
// ResponseType.swift
// TestProject
//
// Created by Cristian Barril on May 03, 2020.
// Copyright © 2020 Cristian Barril. All rights reserved.
//
import Foundation
enum ResponseType<T: Decodable> {
case json
}
extension ResponseType {
func decode(_ data: Data?) throws -> T? {
guard let data ... | true |
b74f91ed35c5c56541df25e9c9d236e5885e8f20 | Swift | aspose-pdf-cloud/aspose-pdf-cloud-swift | /AsposePdfCloud/Models/DocumentPrivilege.swift | UTF-8 | 6,473 | 2.578125 | 3 | [
"MIT"
] | permissive | /**
*
* Copyright (c) 2020 Aspose.PDF Cloud
* 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,... | true |
1fb851901570b0c78e6ff92ab97b99699fcc644b | Swift | benniethedeveloper/problems | /pyth.playground/Contents.swift | UTF-8 | 563 | 3.078125 | 3 | [] | no_license | import UIKit
func findProductForTriplet(sum: Int) -> Int? {
let range = Array(1..<sum/2).reverse()
for c in range {
for b in range {
for a in range {
guard a * a + b * b == c * c && a + b + c == sum else { continue }
... | true |
99625bec04874348affd86c504946bc02dd95410 | Swift | nalexn/ViewInspector | /Sources/ViewInspector/InspectableView.swift | UTF-8 | 16,752 | 2.53125 | 3 | [
"MIT"
] | permissive | import SwiftUI
import XCTest
@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
public struct InspectableView<View> where View: BaseViewType {
internal let content: Content
internal let parentView: UnwrappedView?
internal let inspectionCall: String
internal let inspectionIndex: Int?
internal var ... | true |
6659eaa756c1e58a283961a52d5754c352335e86 | Swift | SinanUlusan/UIProgressView | /UIProgressView/ViewController.swift | UTF-8 | 1,056 | 2.96875 | 3 | [] | no_license | //
// ViewController.swift
// UIProgressView
//
// Created by Sinan Ulusan on 25.09.2020.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var progressView: UIProgressView!
let progress = Progress(totalUnitCount: 10)
override func viewDidLoad() {
super.view... | true |
f7a30812546fa9e354eae846de6b96e8a46d37fd | Swift | FARIDKH/Movies-App | /Movies/Controllers/MoviesViewController.swift | UTF-8 | 2,016 | 2.90625 | 3 | [] | no_license | //
// MoviesViewController.swift
// Movies
//
// Created by Farid Qanbarov on 4/28/18.
// Copyright © 2018 Farid Qanbarov. All rights reserved.
//
import UIKit
class MoviesViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
@IBOutlet weak var moviesTableView: UITableView!
... | true |
1a8d3b2df6890467abb48e2c0c18408b44629baf | Swift | ericjorgensen/dad-joke-generator | /Dad Joke Generator/Markov Chain Generator/Word.swift | UTF-8 | 425 | 3.03125 | 3 | [
"MIT"
] | permissive | //
// Word.swift
// Dad Joke Generator
//
// Credit to: https://mikeash.com/pyblog/friday-qa-2018-04-27-generating-text-with-markov-chains-in-swift.html
//
import Foundation
class Word {
let str: String?
var links: [Word] = []
init(str: String?) {
self.str = str
}
func randomN... | true |
4cf20761f44510269b18d6d8e6b7d24d92fec9b8 | Swift | rutmb/swift-nio-mqtt | /Sources/MQTTCodec/ControlPackets/DisconnectPacket/DisconnectPacket.swift | UTF-8 | 842 | 2.59375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | //
// DisconnectPacket.swift
// MQTTCodec
//
// Created by Bofei Zhu on 8/20/19.
// Copyright © 2019 Bofei Zhu. All rights reserved.
//
/// DISCONNECT Packet – Disconnect notification
///
/// The DISCONNECT packet is the final MQTT Control Packet sent from the Client or the Server.
/// It indicates the reason why ... | true |
f14d68221c5bd04ba36d24a267d5170b02229b9e | Swift | SailyTeam/Saily | /Application/Chromatic/Extension/UILabel.swift | UTF-8 | 1,865 | 2.890625 | 3 | [
"Unlicense",
"MIT"
] | permissive | //
// UILabel.swift
// Chromatic
//
// Created by Lakr Aream on 2021/8/14.
// Copyright © 2021 Lakr Aream. All rights reserved.
//
import UIKit
extension UILabel {
func highlight(text: String?, font: UIFont? = nil, color: UIColor? = nil) {
guard let fullText = self.text, let target = text else {
... | true |
7845759bec9ef7d41398d3471ce15b5b1e257aff | Swift | neil-oliver/Avenue-ios | /Storyboard Test/GigFoundVC.swift | UTF-8 | 3,306 | 2.640625 | 3 | [] | no_license | //
// GigFoundVC.swift
// Storyboard Test
//
// Created by Neil Oliver on 21/11/2014.
// Copyright (c) 2014 Neil Oliver. All rights reserved.
//
import UIKit
class GigFoundVC: UIViewController {
@IBOutlet weak var lblTitle: UILabel!
@IBOutlet var btnContinue: UIButton!
@IBOutlet var btnSelect: UIBut... | true |
824694e750c0c681827c1b321b1a575ff03b6d0f | Swift | kevinhury/epoch | /Sources/EpochAuth/Models/User.swift | UTF-8 | 5,546 | 2.75 | 3 | [
"MIT"
] | permissive | //
// User.swift
// Epoch
//
// Created by Kevin Hury on 15/10/2016.
//
//
import Fluent
import Auth
import Turnstile
import TurnstileWeb
import TurnstileCrypto
public final class User: Auth.User {
public var exists: Bool = false
// Database fields
public var id: Node?
var username: String
... | true |
62d7fd744ca6f7622f62b7ab19ad2fc74e50fe40 | Swift | SparrowTek/LittleManComputer | /LittleManComputer/Modules/Registers/RegisterCollectionView.swift | UTF-8 | 2,270 | 2.875 | 3 | [
"MIT"
] | permissive | //
// RegisterCollectionView.swift
// LittleManComputer
//
// Created by Thomas J. Rademaker on 4/4/20.
// Copyright © 2020 SparrowTek LLC. All rights reserved.
//
import SwiftUI
struct RegisterCollectionView: View {
@Environment(\.horizontalSizeClass) var horizontalSizeClass
@EnvironmentObject var appSta... | true |
cbab7a2451348f8994a1bd31bdf0ff189f39c30e | Swift | parthdalwadi/Ex01AdvIOS | /ex1_parth/ViewController.swift | UTF-8 | 8,722 | 2.8125 | 3 | [] | no_license | //
// ViewController.swift
// ex1_parth
//
// Created by Parth Dalwadi on 2020-01-08.
// Copyright © 2020 Parth Dalwadi. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
let screenWidth: CGFloat = UIScreen.main.bounds.width
let screenHeight: CGFloat = UIScreen.ma... | true |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 12