blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
625
content_id
stringlengths
40
40
detected_licenses
listlengths
0
47
license_type
stringclasses
2 values
repo_name
stringlengths
5
116
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
643 values
visit_date
timestamp[ns]
revision_date
timestamp[ns]
committer_date
timestamp[ns]
github_id
int64
80.4k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
16 values
gha_event_created_at
timestamp[ns]
gha_created_at
timestamp[ns]
gha_language
stringclasses
85 values
src_encoding
stringclasses
7 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
4
6.44M
extension
stringclasses
17 values
content
stringlengths
4
6.44M
duplicates
listlengths
1
9.02k
263d5267c2aa63b3449526d4c6e69e1b6962bc13
165eb1bd8213fcf2f9306aede02e8214d5636898
/JWellFish/Base/NavigationBar/UIViewController+JWellNavigationBar.swift
6d57cf616025c37a0f57b433f762118b49768316
[]
no_license
ryanranya/YYSwift
00966fdd180635151f5c8f05b77946c9785c1af4
ae4c6c42774432274b4b65d7a2fca8f7578244c1
refs/heads/master
2021-05-20T02:18:27.322192
2020-04-07T07:33:56
2020-04-07T07:33:56
252,144,272
0
0
null
null
null
null
UTF-8
Swift
false
false
5,249
swift
// // UIViewController+EachNavigationBar.swift // Pods-JWellBaseProject_Tests // // Created by administrator on 2020/1/16. // import UIKit extension UIViewController { func adjustsNavigationBarLayout() { _navigationBar.adjustsLayout() _navigationBar.setNeedsLayout() } } extension UIViewController { func setupNavigationBarWhenViewDidLoad() { guard let navigationController = navigationController else { return } navigationController.sendNavigationBarToBack() view.addSubview(_navigationBar) if #available(iOS 11.0, *) { _navigationItem.largeTitleDisplayMode = navigationController._configuration.largeTitle.displayMode } _navigationBar.apply(navigationController._configuration) let viewControllers = navigationController.viewControllers guard viewControllers.count > 1 else { return } guard let backItem = navigationController._configuration.backItem else { _navigationBar.backBarButtonItem = buildBackBarButtonItem(viewControllers) return } _navigationBar.backBarButtonItem = JWellBackBarButtonItem(style: backItem.style, tintColor: backItem.tintColor) } func updateNavigationBarWhenViewWillAppear() { guard let navigationBar = navigationController?.navigationBar else { return } navigationBar.barStyle = _navigationBar.superBarStyle navigationBar.isHidden = _navigationBar.isHidden if #available(iOS 11.0, *) { adjustsSafeAreaInsetsAfterIOS11() navigationItem.title = _navigationItem.title navigationItem.largeTitleDisplayMode = _navigationItem.largeTitleDisplayMode navigationBar.prefersLargeTitles = _navigationBar.prefersLargeTitles navigationBar.largeTitleTextAttributes = _navigationBar.largeTitleTextAttributes } view.bringSubviewToFront(_navigationBar) } func adjustsSafeAreaInsetsAfterIOS11() { guard #available(iOS 11.0, *) else { return } let height = _navigationBar.additionalView?.frame.height ?? 0 additionalSafeAreaInsets.top = _navigationBar.isHidden ? -view.safeAreaInsets.top : _navigationBar._additionalHeight + height } } private extension UIViewController { func buildBackBarButtonItem(_ viewControllers: [UIViewController]) -> JWellBackBarButtonItem { let count = viewControllers.count let backButton = UIButton(type: .system) let image = UIImage(named: "navigation_back_default", in: Bundle.current, compatibleWith: nil) backButton.setImage(image, for: .normal) if let title = viewControllers[count - 2]._navigationItem.title { let maxWidth = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height) / 3 let width = (title as NSString).boundingRect( with: CGSize(width: maxWidth, height: 20), options: NSStringDrawingOptions.usesFontLeading, attributes: [.font: UIFont.boldSystemFont(ofSize: 17)], context: nil ).size.width backButton.setTitle(width < maxWidth ? title : "Back", for: .normal) } else { backButton.setTitle("Back", for: .normal) } backButton.titleLabel?.font = UIFont.boldSystemFont(ofSize: 17) backButton.contentEdgeInsets = .init(top: 0, left: -8, bottom: 0, right: 8) backButton.sizeToFit() return JWellBackBarButtonItem(style: .custom(backButton)) } } private extension JWellNavigationBar { func apply(_ configuration: UINavigationController.JWellConfiguration) { isHidden = configuration.isHidden alpha = configuration.alpha isTranslucent = configuration.isTranslucent barTintColor = configuration.barTintColor tintColor = configuration.tintColor titleTextAttributes = configuration.titleTextAttributes shadowImage = configuration.shadowImage setBackgroundImage( configuration.background.image, for: configuration.background.barPosition, barMetrics: configuration.background.barMetrics ) barStyle = configuration.barStyle statusBarStyle = configuration.statusBarStyle additionalHeight = configuration.additionalHeight isShadowHidden = configuration.isShadowHidden if let shadow = configuration.shadow { self.shadow = shadow } if #available(iOS 11.0, *) { layoutPaddings = configuration.layoutPaddings prefersLargeTitles = configuration.prefersLargeTitles largeTitleTextAttributes = configuration.largeTitle.textAttributes } } } private extension Bundle { static var current: Bundle? { guard let resourcePath = Bundle(for: JWellNavigationBar.self).resourcePath, let bundle = Bundle(path: "\(resourcePath)/EachNavigationBar.bundle") else { return nil } return bundle } }
[ -1 ]
def618a7b3000edfde8d0d2b2627b545119c357b
1850acc93d0a73cf623fb11aaf8ea0cf8cff9914
/StateChanges/StateChanges/Reusables/Geometry Effects/CompassNeedleRotationEffect.swift
23ab004203167ab5d30b4ea9ee4937ab761898d7
[]
no_license
CypherPoet/blog--swiftui-lab
a42907477c9e3d9dc47324473b0ad678edaca2fd
6028643fbc82bb13d463b67e501b590cd423e071
refs/heads/master
2020-08-03T23:17:25.220022
2020-02-01T15:19:16
2020-02-01T15:19:16
211,917,270
5
2
null
null
null
null
UTF-8
Swift
false
false
1,565
swift
// // CompassNeedleRotationEffect.swift // StateChanges // // Created by CypherPoet on 1/23/20. // ✌️ // import SwiftUI struct CompassNeedleRotationEffect { @Binding var cardinalDirection: CompassDirection var angle: Angle } // MARK: - Animatable Data extension CompassNeedleRotationEffect { var animatableData: Double { get { angle.radians } set { self.angle = .radians(newValue) } } } // MARK: - Computeds extension CompassNeedleRotationEffect {} // MARK: - GeometryEffect extension CompassNeedleRotationEffect: GeometryEffect { func effectValue(size: CGSize) -> ProjectionTransform { DispatchQueue.main.async { // This will be called as many times as the frame rate allows, while the body owning // the state of the binding will only be called if the wrappedValue changed. // print("CompassNeedleRotationEffect | effectValue | cardinalDirection = \(self.cardinalDirection)") self.cardinalDirection = CompassDirection(from: self.angle) } // print("Angle: \(angle.radians) radians") let rotation = CGAffineTransform(rotationAngle: CGFloat(angle.radians)) let offset1 = CGAffineTransform(translationX: size.width / 2.0, y: size.height / 2.0) let offset2 = CGAffineTransform(translationX: -size.width / 2.0, y: -size.height / 2.0) return ProjectionTransform( offset2 .concatenating(rotation) .concatenating(offset1) ) } }
[ -1 ]
e1b5b109663a3d31ba6c3b87cacfdbe63f070551
b5eec0cacc1c23b7dbc2b3d42b469e78e98eb81f
/Sources/WSInterface/Validate/ValidateTestCoverage.swift
859af16928b2bea49c5683a67849aae0a2bbaeb5
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
adamnemecek/Workspace
4efaba0f1811872d2a088499a9803c59c41ad827
b8d892262945adba0e924b811ef4756282da70d4
refs/heads/master
2020-03-28T19:11:21.251523
2018-09-11T03:29:33
2018-09-11T03:29:33
null
0
0
null
null
null
null
UTF-8
Swift
false
false
3,936
swift
/* ValidateTestCoverage.swift This source file is part of the Workspace open source project. https://github.com/SDGGiesbrecht/Workspace#workspace Copyright ©2017–2018 Jeremy David Giesbrecht and the Workspace project contributors. Soli Deo gloria. Licensed under the Apache Licence, Version 2.0. See http://www.apache.org/licenses/LICENSE-2.0 for licence information. */ import SDGLogic import SDGCollections import WSGeneralImports import WSProject import WSValidation import WSContinuousIntegration extension Workspace.Validate { enum TestCoverage { private static let name = UserFacing<StrictString, InterfaceLocalization>({ localization in switch localization { case .englishCanada: return "test‐coverage" } }) private static let description = UserFacing<StrictString, InterfaceLocalization>({ localization in switch localization { case .englishCanada: return "validates test coverage, checking that every code path is reached by the project’s tests." } }) static let command = Command(name: name, description: description, directArguments: [], options: Workspace.standardOptions + [ContinuousIntegrationJob.option], execution: { (_, options: Options, output: Command.Output) throws in #if !os(Linux) if try options.project.configuration(output: output).xcode.manage { try Workspace.Refresh.Xcode.executeAsStep(options: options, output: output) } #endif try Build.validate(job: options.job, against: ContinuousIntegrationJob.coverageJobs, for: options.project, output: output) var validationStatus = ValidationStatus() #if os(Linux) validationStatus.failStep(message: UserFacing<StrictString, InterfaceLocalization>({ localization in switch localization { case .englishCanada: return "Test coverage validation requires Xcode, which is unavailable on Linux." } })) #endif try executeAsStep(options: options, validationStatus: &validationStatus, output: output) try validationStatus.reportOutcome(project: options.project, output: output) }) static func executeAsStep(options: Options, validationStatus: inout ValidationStatus, output: Command.Output) throws { for job in ContinuousIntegrationJob.cases where try options.job.includes(job: job) ∧ (try Build.job(job, isRelevantTo: options.project, andAvailableJobs: ContinuousIntegrationJob.coverageJobs, output: output)) { try autoreleasepool { if try options.project.configuration(output: output).continuousIntegration.skipSimulatorOutsideContinuousIntegration, options.job == nil, // Not in continuous integration. job ∈ ContinuousIntegrationJob.simulatorJobs { // @exempt(from: tests) Tested separately. return // and continue loop. } if BuildConfiguration.current == .debug, job ∈ ContinuousIntegrationJob.simulatorJobs, ProcessInfo.processInfo.environment["SIMULATOR_UNAVAILABLE_FOR_TESTING"] ≠ nil { // Simulators are not available to all CI jobs and must be tested separately. return // and continue loop. } try options.project.test(on: job, validationStatus: &validationStatus, output: output) try options.project.validateCodeCoverage(on: job, validationStatus: &validationStatus, output: output) } } } } }
[ -1 ]
cfc78bc592d2183f5e71be36db17eca5eacfcd89
0d6119ab8bda0b20e617f205b2086073af61eb71
/AboutMe360/Modules/ProfilePicture/ViewModel/ProfilePictureViewModel.swift
9d03b093360fb504e54a7e21ac1f907e5ba1a76a
[]
no_license
chinmaysukhadia/aboutMe360
a637d10da30ed0cbc60c624b6bb179395e3e2994
f3de3a54d8f45642fe583f1112711e16be017367
refs/heads/master
2020-09-11T11:01:51.407687
2019-11-16T03:43:58
2019-11-16T03:43:58
222,043,084
0
0
null
null
null
null
UTF-8
Swift
false
false
864
swift
// // ProfilePictureViewModel.swift // AboutMe360 // // Created by Himanshu Pal on 23/09/19. // Copyright © 2019 Appy. All rights reserved. // import Foundation import SwiftyUserDefaults class ProfilePictureViewModel { func validateProfilePictureFormData(dataDict: [String : String], completion: ((Bool, String)-> Void)?) { let highQualification = (dataDict[Constants.Keys.kHighQualification] ?? "").trim() // let profileImg = (dataDict[Constants.Keys.kProfileImg] ?? "").trim() if highQualification.isEmpty { completion?(false,StringConstants.enterHighQualification) return } // if profileImg.isEmpty { // completion?(false,StringConstants.PleaseUploadProfilePiture) // return // } completion?(true, "") } }
[ -1 ]
8ccd8c39b09f839ac292017e5c2c4821f560c0ed
098df50d454d6971cab92b18f80b4fa4b2bc2a22
/test03/test03UITests/test03UITests.swift
1724ced36faf9124cdf89851f2d5923aad429c36
[]
no_license
Zhu-WenJing/testGit
d12947f7d593b95c3afc08155ea07e4e01f6bcc9
b73e0c7ea3d9c2602f53e28a3b7d21f2494aab28
refs/heads/master
2022-12-19T21:15:32.405225
2020-09-24T04:08:12
2020-09-24T04:08:12
298,161,961
0
0
null
null
null
null
UTF-8
Swift
false
false
1,409
swift
// // test03UITests.swift // test03UITests // // Created by 朱文静 on 2020/9/22. // import XCTest class test03UITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } } }
[ 360463, 155665, 376853, 344106, 253996, 385078, 163894, 180279, 352314, 213051, 376892, 32829, 286787, 352324, 237638, 352327, 385095, 393291, 163916, 368717, 311373, 196687, 278607, 311377, 254039, 426074, 368732, 180317, 32871, 352359, 278637, 385135, 319599, 376945, 131190, 385147, 131199, 426124, 196758, 49308, 65698, 311459, 49317, 377008, 377010, 180409, 295099, 377025, 377033, 164043, 417996, 254157, 368849, 368850, 139478, 229591, 385240, 254171, 147679, 147680, 311520, 205034, 254189, 286957, 254193, 344312, 336121, 262403, 147716, 368908, 180494, 262419, 368915, 254228, 319764, 278805, 377116, 254250, 311596, 131374, 418095, 336177, 180534, 155968, 287040, 311622, 270663, 368969, 254285, 180559, 377168, 344402, 229716, 368982, 270703, 139641, 385407, 385409, 270733, 106893, 385423, 213402, 385437, 254373, 156069, 385448, 385449, 115116, 385463, 319931, 278974, 336319, 336323, 188870, 278988, 278992, 262619, 377309, 377310, 369121, 369124, 279014, 270823, 319976, 279017, 311787, 213486, 360945, 139766, 393719, 279030, 377337, 279033, 254459, 410108, 410109, 262657, 377346, 279042, 279053, 410126, 262673, 385554, 393745, 303635, 279060, 279061, 254487, 410138, 279066, 188957, 385569, 385578, 377388, 197166, 393775, 418352, 33339, 352831, 33344, 385603, 377419, 385612, 303693, 426575, 385620, 369236, 115287, 189016, 270938, 287327, 279143, 279150, 287345, 352885, 352886, 344697, 189054, 287359, 385669, 369285, 311944, 344714, 311950, 377487, 311953, 287379, 336531, 180886, 352921, 377499, 221853, 344737, 295591, 352938, 295598, 279215, 418479, 279218, 164532, 336565, 287418, 377531, 303802, 377534, 377536, 66243, 385737, 287434, 385745, 279249, 303826, 369365, 369366, 385751, 230105, 361178, 352989, 352990, 418529, 295649, 385763, 295653, 369383, 230120, 361194, 312046, 418550, 344829, 279293, 205566, 197377, 434956, 312076, 295698, 418579, 426772, 197398, 426777, 221980, 344864, 197412, 336678, 262952, 189229, 262957, 164655, 197424, 328495, 197428, 336693, 230198, 377656, 426809, 197433, 222017, 295745, 377669, 197451, 369488, 279379, 385878, 385880, 295769, 197467, 435038, 230238, 279393, 303973, 279398, 385895, 197479, 385901, 197489, 295799, 164730, 336765, 254851, 369541, 172936, 320394, 426894, 377754, 172971, 140203, 377778, 304050, 189365, 377789, 189373, 345030, 345034, 279499, 418774, 386007, 386009, 418781, 386016, 123880, 418793, 320495, 222193, 435185, 271351, 214009, 312313, 435195, 328701, 312317, 386049, 328705, 418819, 410629, 377863, 189448, 230411, 361487, 435216, 386068, 254997, 336928, 336930, 410665, 345137, 361522, 312372, 238646, 238650, 320571, 386108, 410687, 336962, 238663, 377927, 361547, 205911, 156763, 361570, 214116, 230500, 214119, 402538, 279659, 173168, 230514, 238706, 279666, 312435, 377974, 66684, 279686, 402568, 222344, 140426, 337037, 386191, 410772, 222364, 418975, 124073, 402618, 148674, 402632, 148687, 402641, 189651, 419028, 279766, 189656, 304353, 279780, 222441, 279789, 386288, 66802, 271607, 369912, 386296, 369913, 419066, 386300, 279803, 386304, 369929, 419097, 320795, 115997, 222496, 320802, 304422, 369964, 353581, 116014, 66863, 312628, 345397, 345398, 386363, 222523, 345418, 353611, 337228, 337226, 353612, 230730, 296269, 353617, 222542, 238928, 296274, 378201, 230757, 296304, 312688, 337280, 353672, 263561, 296328, 296330, 370066, 9618, 411028, 279955, 370072, 148899, 148900, 361928, 337359, 329168, 312785, 329170, 222674, 353751, 280025, 239069, 361958, 271850, 280042, 280043, 271853, 329198, 411119, 337391, 116209, 296434, 386551, 288252, 271880, 198155, 329231, 304655, 370200, 222754, 157219, 157220, 394793, 312879, 288305, 288319, 288322, 280131, 288328, 353875, 312937, 271980, 206447, 403057, 42616, 337533, 280193, 370307, 419462, 149127, 149128, 288391, 419464, 411275, 214667, 239251, 345753, 198304, 255651, 337590, 370359, 280252, 280253, 321217, 239305, 296649, 403149, 313042, 345813, 370390, 272087, 345817, 337638, 181992, 345832, 345835, 288492, 141037, 313082, 288508, 288515, 173828, 395018, 395019, 116491, 395026, 116502, 435993, 345882, 411417, 255781, 362281, 378666, 403248, 378673, 182070, 182071, 345910, 436029, 345918, 337734, 280396, 272207, 272208, 337746, 362326, 345942, 370526, 345950, 362336, 255844, 296807, 214894, 362351, 313200, 214896, 313204, 182145, 280451, 67464, 305032, 337816, 329627, 239515, 354210, 436130, 436135, 10153, 313257, 362411, 370604, 362418, 280517, 362442, 346066, 231382, 354268, 436189, 403421, 329696, 354273, 403425, 354279, 436199, 174058, 337899, 354283, 247787, 329707, 247786, 296942, 436209, 239610, 182277, 346117, 354310, 43016, 354312, 354311, 403463, 313356, 436235, 419857, 305173, 436248, 223269, 346153, 354346, 313388, 272432, 403507, 378933, 378934, 436283, 288835, 403524, 436293, 313415, 239689, 436304, 329812, 223317, 411738, 272477, 280676, 313446, 395373, 288878, 346237, 215165, 436372, 329884, 378186, 362658, 436388, 215204, 133313, 395458, 338118, 436429, 346319, 379102, 387299, 18661, 379110, 338151, 149743, 379120, 411892, 436471, 395511, 313595, 436480, 272644, 338187, 338188, 395536, 338196, 272661, 379157, 338217, 321839, 362809, 379193, 395591, 289109, 272730, 436570, 215395, 239973, 280938, 321901, 354671, 362864, 354672, 272755, 354678, 199030, 223611, 436609, 436613, 395653, 395660, 264591, 272784, 420241, 240020, 190870, 43416, 190872, 289185, 436644, 289195, 272815, 436659, 338359, 436677, 289229, 281038, 281039, 256476, 420326, 166403, 420374, 322077, 289328, 330291, 322119, 191065, 436831, 420461, 346739, 346741, 420473, 297600, 166533, 363155, 346771, 264855, 363161, 289435, 436897, 248494, 166581, 355006, 363212, 363228, 436957, 322269, 436960, 264929, 338658, 289511, 330473, 346859, 330476, 289517, 215790, 199415, 289534, 322302, 35584, 133889, 322312, 346889, 166677, 207639, 363295, 355117, 191285, 273209, 355129, 273211, 355136, 355138, 420680, 355147, 355148, 355153, 281426, 363353, 363354, 281434, 420702, 363361, 363362, 412516, 355173, 355174, 281444, 207724, 355182, 207728, 420722, 314240, 158594, 330627, 240517, 387977, 355216, 224146, 224149, 256918, 256919, 256920, 240543, 256934, 273336, 289720, 289723, 273341, 330688, 379845, 363462, 19398, 273353, 191445, 207839, 347104, 314343, 134124, 412653, 248815, 257007, 347122, 437245, 257023, 125953, 396292, 330759, 347150, 330766, 412692, 330789, 248871, 281647, 412725, 257093, 404550, 207954, 339031, 404582, 257126, 265318, 322664, 265323, 396395, 404589, 273523, 363643, 248960, 363658, 404622, 224400, 265366, 347286, 429209, 339101, 429216, 380069, 265381, 3243, 208044, 322733, 421050, 339131, 265410, 183492, 273616, 421081, 339167, 298209, 421102, 363769, 52473, 208123, 52476, 412926, 437504, 322826, 388369, 380178, 429332, 126229, 412963, 257323, 437550, 273713, 298290, 208179, 159033, 347451, 372039, 257353, 257354, 109899, 437585, 331091, 150868, 314708, 372064, 429410, 437602, 281958, 388458, 265579, 306541, 421240, 224637, 388488, 298378, 314765, 306580, 282008, 396697, 282013, 290206, 396709, 298406, 241067, 314797, 380335, 355761, 421302, 134586, 380348, 216510, 216511, 380350, 306630, 200136, 273865, 306634, 339403, 372172, 413138, 421338, 437726, 429540, 3557, 3559, 191980, 282097, 265720, 216575, 290304, 372226, 437766, 323083, 208397, 323088, 413202, 413206, 388630, 175640, 216610, 372261, 347693, 323120, 396850, 200245, 323126, 290359, 134715, 323132, 421437, 396865, 282182, 413255, 273992, 265800, 421452, 265809, 396885, 290391, 265816, 396889, 306777, 388699, 396896, 388712, 388713, 314997, 290425, 339579, 396927, 282248, 224907, 396942, 405140, 274071, 323226, 208547, 208548, 405157, 388775, 282279, 364202, 421556, 224951, 224952, 306875, 282302, 323262, 241366, 224985, 282330, 159462, 372458, 397040, 12017, 323315, 274170, 200444, 175874, 249606, 282379, 216844, 372497, 397076, 421657, 339746, 216868, 257831, 167720, 241447, 421680, 282418, 274234, 339782, 315209, 159563, 339799, 307038, 274276, 282471, 274288, 372592, 274296, 339840, 372625, 282517, 298912, 118693, 438186, 126896, 151492, 380874, 372699, 323554, 380910, 380922, 380923, 274432, 372736, 241695, 430120, 102441, 315433, 102446, 430127, 405552, 282671, 241717, 249912, 225347, 307269, 421958, 233548, 176209, 381013, 53334, 315477, 200795, 356446, 323678, 438374, 176231, 438378, 233578, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 241809, 430231, 200856, 422044, 192670, 192671, 299166, 258213, 299176, 323761, 184498, 266427, 299208, 372943, 266447, 258263, 356575, 307431, 438512, 372979, 389364, 381173, 135416, 356603, 184574, 266504, 217352, 61720, 381210, 282908, 389406, 282912, 233761, 438575, 315698, 266547, 397620, 332084, 438583, 127292, 438592, 332100, 323914, 201037, 397650, 348499, 250196, 348501, 389465, 332128, 110955, 242027, 242028, 160111, 250227, 315768, 291193, 438653, 291200, 266628, 340356, 242059, 225684, 373141, 373144, 291225, 389534, 397732, 373196, 176602, 242138, 184799, 291297, 201195, 324098, 233987, 340489, 397841, 283154, 258584, 397855, 291359, 348709, 348710, 397872, 283185, 234037, 340539, 266812, 438850, 348741, 381515, 348748, 430681, 332379, 242274, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 356990, 291455, 373377, 422529, 201348, 152196, 356998, 348807, 356999, 316044, 275102, 176805, 340645, 422567, 176810, 160441, 422591, 291529, 225996, 135888, 242385, 234216, 373485, 373486, 21239, 275193, 348921, 234233, 242428, 299777, 430853, 430860, 62222, 430880, 234276, 234290, 152372, 430909, 160576, 348999, 283466, 234330, 275294, 381791, 127840, 357219, 439145, 177002, 308075, 381811, 201590, 177018, 398205, 340865, 291713, 349066, 316299, 349068, 234382, 308111, 381840, 308113, 390034, 373653, 430999, 209820, 381856, 398244, 185252, 422825, 381872, 177074, 398268, 349122, 398275, 127945, 373705, 340960, 398305, 340967, 398313, 234476, 127990, 349176, 201721, 349179, 234499, 357380, 398370, 357413, 357420, 300087, 21567, 308288, 398405, 349254, 218187, 250955, 300109, 234578, 250965, 439391, 250982, 398444, 62574, 357487, 300147, 119925, 349304, 234626, 349315, 349317, 234635, 373902, 234655, 234662, 373937, 373939, 324790, 300215, 218301, 283841, 283846, 259275, 316628, 259285, 357594, 414956, 251124, 316661, 292092, 439550, 439563, 242955, 414989, 259346, 349458, 259347, 382243, 382246, 292145, 382257, 382264, 333115, 193853, 193858, 251212, 234830, 406862, 259408, 283990, 357720, 300378, 300379, 374110, 234864, 259449, 382329, 357758, 243073, 357763, 112019, 398740, 234902, 333224, 374189, 251314, 284086, 259513, 54719, 292291, 300490, 300526, 259569, 251379, 300539, 398844, 210429, 366081, 316951, 374297, 153115, 431646, 349727, 431662, 374327, 210489, 235069, 349764, 292424, 292426, 128589, 333389, 333394, 349780, 128600, 235096, 300643, 300645, 415334, 54895, 366198, 210558, 210559, 415360, 325246, 415369, 210569, 431754, 267916, 415376, 259741, 153252, 399014, 210601, 202413, 415419, 259780, 333508, 267978, 333522, 325345, 333543, 325357, 431861, 284410, 284425, 300812, 284430, 366358, 169751, 431901, 341791, 186148, 186149, 284460, 202541, 431918, 399148, 153392, 431935, 415555, 325444, 153416, 325449, 341837, 415566, 431955, 325460, 341846, 300893, 259937, 382820, 276326, 415592, 292713, 292719, 325491, 341878, 276343, 350072, 333687, 112510, 325508, 333700, 243590, 325514, 350091, 350092, 350102, 350108, 333727, 219046, 284584, 292783, 300983, 128955, 219102, 292835, 6116, 317416, 432114, 325620, 415740, 268286, 415744, 243720, 399372, 153618, 358418, 178215, 325675, 243763, 358455, 399433, 333902, 104534, 194667, 260206, 432241, 284789, 374913, 374914, 415883, 333968, 153752, 333990, 104633, 260285, 227517, 268479, 374984, 301270, 301271, 334049, 325857, 268515, 383208, 317676, 260337, 260338, 432373, 375040, 309504, 432387, 260355, 375052, 194832, 325904, 391448, 268570, 178459, 186660, 268581, 334121, 358698, 317738, 325930, 260396, 432435, 358707, 358710, 14654, 268609, 227655, 383309, 383327, 391521, 366948, 416101, 416103, 383338, 432503, 432511, 211327, 227721, 285074, 252309, 39323, 285083, 317851, 285089, 375211, 334259, 342454, 358844, 293309, 317889, 326083, 416201, 129484, 154061, 416206, 326093, 432608, 285152, 391654, 432616, 334315, 375281, 293368, 317949, 334345, 309770, 342537, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 293420, 219694, 219695, 375345, 432694, 244279, 309831, 375369, 375373, 416334, 301647, 416340, 326229, 244311, 260705, 416353, 375396, 268901, 244345, 334473, 375438, 326288, 285348, 293552, 342705, 285362, 383668, 342714, 39616, 383708, 342757, 269036, 432883, 203511, 342775, 383740, 416509, 359166, 162559, 375552, 432894, 228099, 285443, 285450, 383755, 326413, 285467, 326428, 318247, 342827, 391980, 318251, 375610, 301883, 342846, 416577, 244569, 375644, 252766, 293729, 351078, 342888, 392057, 211835, 392065, 260995, 400262, 392071, 424842, 236427, 252812, 400271, 392080, 400282, 211871, 359332, 359333, 293801, 326571, 252848, 326580, 261045, 261046, 326586, 359365, 211913, 326602, 252878, 342990, 433104, 56270, 359380, 433112, 433116, 359391, 343020, 187372, 383980, 203758, 383994, 171009, 384004, 433166, 384015, 433173, 293911, 326684, 252959, 384031, 375848, 318515, 203829, 261191, 375902, 375903, 392288, 253028, 351343, 187505, 138354, 187508, 302202, 285819, 392317, 343166, 285823, 392320, 384127, 285833, 285834, 318602, 228492, 253074, 326803, 187539, 359574, 285850, 351389, 302239, 253098, 302251, 367791, 367792, 367798, 64699, 294075, 228541, 343230, 367809, 253124, 113863, 351445, 310496, 195809, 253168, 351475, 351489, 367897, 367898, 245018, 130342, 130344, 130347, 261426, 212282, 294210, 359747, 359748, 146760, 146763, 114022, 253288, 425327, 327023, 425331, 163190, 327030, 384379, 253316, 294278, 384391, 318860, 253339, 253340, 318876, 343457, 245160, 359860, 359861, 343480, 310714, 228796, 228804, 425417, 310731, 327122, 425434, 310747, 310758, 253431, 359931, 187900, 343552, 245249, 228868, 409095, 359949, 294413, 253456, 302613, 253462, 146976, 245290, 245291, 343606, 163385, 425534, 138817, 147011, 147020, 179800, 196184, 343646, 212574, 204386, 155238, 204394, 138862, 310896, 188021, 294517, 286351, 188049, 425624, 229021, 245413, 286387, 384693, 376502, 286392, 302778, 409277, 286400, 409289, 425682, 286419, 294621, 245471, 294629, 212721, 163575, 286457, 286463, 319232, 360194, 409355, 155408, 417556, 294699, 319289, 384826, 409404, 360253, 409416, 376661, 237397, 368471, 425820, 368486, 409446, 425832, 368489, 40809, 384871, 417648, 360315, 253828, 327556, 311183, 425875, 294806, 294808, 253851, 376733, 204702, 319393, 294820, 253868, 204722, 188349, 98240, 311238, 212947, 212953, 360416, 294887, 253930, 327666, 385011 ]
32148b5c2f5fe9e19650c403601498e7e8586909
c40062ae703033742f09f0d1b0613e2f054b7944
/Sources/WmfReader/MS-WMF/WMF Records/State Record Types/META_MOVETO.swift
954de86830b1449dc5ec3a52a9686e1e66572eb1
[]
no_license
Watch-Later/WmfReader
286b8676edc5648b0f8958a5f0222ed3e9f87450
bfc6d6e3c03163555a78990d98cab545bba3ffdf
refs/heads/master
2023-02-09T04:36:47.646194
2020-12-27T16:54:23
2020-12-27T16:54:23
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,861
swift
// // META_MOVETO.swift // // // Created by Hugh Bellamy on 30/11/2020. // import DataStream /// [MS-WMF] 2.3.5.4 META_MOVETO Record /// The META_MOVETO Record sets the output position in the playback device context to a specified point. /// See section 2.3.5 for the specification of other State Record Types. public struct META_MOVETO { public let recordSize: UInt32 public let recordFunction: UInt16 public let x: Int16 public let y: Int16 public init(dataStream: inout DataStream) throws { let startPosition = dataStream.position /// RecordSize (4 bytes): A 32-bit unsigned integer that defines the number of 16-bit WORD structures, defined in [MS-DTYP] /// section 2.2.61, in the record. self.recordSize = try dataStream.read(endianess: .littleEndian) guard self.recordSize == 5 else { throw WmfReadError.corrupted } /// RecordFunction (2 bytes): A 16-bit unsigned integer that defines this WMF record type. The lower byte MUST match the lower byte /// of the RecordType Enumeration (section 2.1.1.1) table value META_MOVETO. self.recordFunction = try dataStream.read(endianess: .littleEndian) guard self.recordFunction & 0xFF == RecordType.META_MOVETO.rawValue & 0xFF else { throw WmfReadError.corrupted } /// Y (2 bytes): A 16-bit signed integer that defines the y-coordinate, in logical units. self.y = try dataStream.read(endianess: .littleEndian) /// X (2 bytes): A 16-bit signed integer that defines the x-coordinate, in logical units. self.x = try dataStream.read(endianess: .littleEndian) guard (dataStream.position - startPosition) / 2 == self.recordSize else { throw WmfReadError.corrupted } } }
[ -1 ]
8cb1a70fd99abb250ea931344549bb25a60ce354
982294854adda5875f1ba003771c628c59770114
/Tests/LinuxMain.swift
0067121f2dc3588899a794302b21f3d055818a71
[ "MIT" ]
permissive
Unicus-International/voting-booth-backend
562b6b4fe83b25d34e3f095a15568b11c2c220f4
65e2751a0ed5feb4c52853c6ed6bad1505f982cb
refs/heads/master
2020-07-26T21:37:35.672706
2019-10-18T10:24:38
2019-10-18T10:24:38
208,772,906
0
0
null
null
null
null
UTF-8
Swift
false
false
127
swift
import XCTest import VotingBoothTests var tests = [XCTestCaseEntry]() tests += VotingBoothTests.__allTests() XCTMain(tests)
[ 170344, 413517, 316976, 245489, 5043, 240382 ]
8afaeff5c6702bca2e532d05bba6c3893ba5771f
dc43a67a0a6074277d198f9105079b9daab220af
/CleanTDDReportTableDemo/Scenes/AccountDetailsTransactionList/Presenter/TransactionListPresenterTests.swift
a14a8201e0b4cbfad0cd857c7d685c8e8f3ca25d
[]
no_license
lyleresnick/CleanTDDReportTableDemo
0096af6f928c421e1841f7bf5cece2aeaf24e443
f5cd6aec158ab28d7b0f494e0d0e84d4178256b7
refs/heads/master
2023-08-04T06:58:06.465077
2023-07-25T17:53:17
2023-07-25T17:53:17
89,529,206
8
1
null
2022-10-21T03:08:20
2017-04-26T21:42:54
Swift
UTF-8
Swift
false
false
1,748
swift
// Copyright © 2017 Lyle Resnick. All rights reserved. import XCTest @testable import CleanTDDReportTableDemo class TransactionListPresenterTests: XCTestCase { private var sut: TransactionListPresenter! private var stubbedUseCase: StubTransactionListUseCase! private var stubbedViewController: StubViewController! override func setUp() { super.setUp() stubbedUseCase = StubTransactionListUseCase(entityGateway: FakeNilEntityGateway()) sut = TransactionListPresenter(useCase: stubbedUseCase) stubbedUseCase.output = sut stubbedViewController = StubViewController() sut.output = stubbedViewController } func test_eventRefresh_CallsUseCase_refreshTwoSource() { sut.eventRefreshTwoSource() XCTAssertTrue(stubbedUseCase.refreshCalled) } func test_presentInit_callsInitialize() { sut.presentInit() XCTAssertTrue(stubbedViewController.initializeCalled ) } func test_presentReport_callsShowReport() { sut.presentReport() XCTAssertTrue(stubbedViewController.showReportCalled ) } // MARK: Stubs class StubTransactionListUseCase: TransactionListUseCase { var refreshCalled = false override func eventRefreshTwoSource(transformer: TransactionListRefreshTwoSourceUseCaseTransformer?) { refreshCalled = true } } class StubViewController: TransactionListPresenterOutput { var initializeCalled = false var showReportCalled = false func initialize() { initializeCalled = true } func showReport(rows: [TransactionListRowViewModel]) { showReportCalled = true } } }
[ -1 ]
523f620488c7ef3549304d67155584b87f74c34f
0fe46a01564055e09925a1aedf3492714bb62f1c
/CoinKeeper/Views/Subviews/LightningUpgradeStatusView.swift
1f39b15e090f7fb108385d9041e8400d71d01306
[ "MIT", "Apache-2.0" ]
permissive
SixFiveSoftware/dropbit-ios
b56b9cfa3180207e14ee2d989ef62475bace5412
0d5eebd082a9e6f632f13145bc18d7ce52dccb12
refs/heads/master
2020-12-31T10:12:13.362185
2020-02-05T00:08:06
2020-02-05T00:08:06
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,334
swift
// // LightningUpgradeStatusView.swift // DropBit // // Created by BJ Miller on 9/12/19. // Copyright © 2019 Coin Ninja, LLC. All rights reserved. // import UIKit class LightningUpgradeStatusView: UIView { private let notStartedImage = UIImage(imageLiteralResourceName: "circleCheckPurple") private let completedImage = UIImage(imageLiteralResourceName: "circleCheckGreen") enum Mode { case notStarted case working case finished } @IBOutlet var statusImageView: UIImageView! @IBOutlet var activityIndicator: UIActivityIndicatorView! var mode: Mode = .notStarted { didSet { switch mode { case .notStarted: statusImageView.image = notStartedImage activityIndicator.isHidden = true statusImageView.isHidden = false case .working: statusImageView.image = nil statusImageView.isHidden = true activityIndicator.isHidden = false case .finished: statusImageView.image = completedImage statusImageView.isHidden = false activityIndicator.isHidden = true } } } override init(frame: CGRect) { super.init(frame: frame) initialize() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) initialize() } private func initialize() { xibSetup() } }
[ -1 ]
14042c621b3303cae1598ffe08e40b6ef4b3b661
30f11ccc2e5ab24c493e81796379dfe83421a92d
/apps/desk/cocoa/Pods/OGSwitch/OGSwitch/OGSwitch.swift
5ef18c75d648e5de05451887a74e43d75afae974
[]
no_license
norlandrhagen/opedia
b82b685f77001afcd0b2c0e9adc6db3a4910b0fc
8043471895b3af2f5f6c84e09a245004369eedd1
refs/heads/master
2020-04-04T12:36:19.406138
2018-10-29T07:32:52
2018-10-29T07:32:52
155,932,210
1
0
null
2018-11-02T23:36:29
2018-11-02T23:36:29
null
UTF-8
Swift
false
false
7,210
swift
// // OGSwitch.swift // OGSwitch // // Created by Oskar Groth on 2017-02-22. // Copyright © 2017 Oskar Groth. All rights reserved. // import Cocoa import QuartzCore public class OGSwitch : NSControl { @IBInspectable public var tintColor: NSColor = NSColor(calibratedRed:0.27, green: 0.86, blue: 0.36, alpha: 1.0) @IBInspectable public var knobBackgroundColor: NSColor = NSColor(calibratedWhite:1.0, alpha: 1.0) @IBInspectable public var disabledBorderColor: NSColor = NSColor(calibratedWhite: 0.0, alpha: 0.2) @IBInspectable public var disabledBackgroundColor: NSColor = NSColor.clear @IBInspectable public var inactiveBackgroundColor: NSColor = NSColor(calibratedWhite: 0.0, alpha:0.3) @IBInspectable public var animationDuration: TimeInterval = 0.4 let kBorderLineWidth:CGFloat = 1.0 let kGoldenRatio:CGFloat = 1.6180339875 let kDecreasedGoldenRatio:CGFloat = 1.38 let kEnabledOpacity:Float = 1.0 let kDisabledOpacity:Float = 0.5 public var isOn:Bool = true public var isActive:Bool = false public var hasDragged:Bool = false public var isDraggingTowardsOn:Bool = false public var rootLayer:CALayer? public var backgroundLayer:CALayer? public var knobLayer: CALayer? public var knobInsideLayer: CALayer? override public var acceptsFirstResponder: Bool { get { return true } } required public init?(coder:NSCoder) { super.init(coder: coder) setup() } override init(frame:NSRect) { super.init(frame: frame); setup() } internal func setup() { isEnabled = true setupLayers() } internal func setupLayers() { rootLayer = CALayer() layer = rootLayer wantsLayer = true backgroundLayer = CALayer() backgroundLayer!.autoresizingMask = [.layerWidthSizable, .layerHeightSizable] backgroundLayer!.bounds = rootLayer!.bounds backgroundLayer!.anchorPoint = CGPoint(x: 0.0, y: 0.0) backgroundLayer!.borderWidth = kBorderLineWidth rootLayer!.addSublayer(backgroundLayer!) knobLayer = CALayer() knobLayer!.frame = rectForKnob() knobLayer!.autoresizingMask = CAAutoresizingMask.layerHeightSizable knobLayer!.backgroundColor = knobBackgroundColor.cgColor knobLayer!.shadowColor = NSColor.black.cgColor knobLayer!.shadowOffset = CGSize(width:0.0, height:-2.0) knobLayer!.shadowRadius = 1.0 knobLayer!.shadowOpacity = 0.3 rootLayer!.addSublayer(knobLayer!) knobInsideLayer = CALayer() knobInsideLayer!.frame = knobLayer!.bounds knobInsideLayer!.autoresizingMask = [.layerHeightSizable, .layerWidthSizable] knobInsideLayer!.shadowColor = NSColor.black.cgColor knobInsideLayer!.shadowOffset = CGSize(width:0.0, height:0.0) knobInsideLayer!.backgroundColor = NSColor.white.cgColor knobInsideLayer!.shadowRadius = 1.0 knobInsideLayer!.shadowOpacity = 0.35 knobLayer!.addSublayer(knobInsideLayer!) reloadLayerSize() reloadLayer() } internal func reloadLayerSize() { CATransaction.begin() CATransaction.setDisableActions(true) knobLayer!.frame = rectForKnob() knobInsideLayer!.frame = knobLayer!.bounds backgroundLayer!.cornerRadius = backgroundLayer!.bounds.size.height / 2.0 knobLayer!.cornerRadius = knobLayer!.bounds.size.height / 2.0 knobInsideLayer!.cornerRadius = knobLayer!.bounds.size.height / 2.0 CATransaction.commit() } public func reloadLayerAnimated(animated: Bool) { CATransaction.begin() CATransaction.setAnimationDuration(animated ? animationDuration : 0) if (hasDragged && isDraggingTowardsOn) || (!hasDragged && isOn) { backgroundLayer!.borderColor = tintColor.cgColor backgroundLayer!.backgroundColor = tintColor.cgColor } else { backgroundLayer!.borderColor = disabledBorderColor.cgColor backgroundLayer!.backgroundColor = disabledBackgroundColor.cgColor } if isEnabled { rootLayer!.opacity = kEnabledOpacity } else { rootLayer!.opacity = kDisabledOpacity } if hasDragged { let function = CAMediaTimingFunction(controlPoints: 0.25, 1.5, 0.5, 1) CATransaction.setAnimationTimingFunction(function) } knobLayer!.frame = rectForKnob() knobInsideLayer!.frame = knobLayer!.bounds CATransaction.commit() } public func reloadLayer() { reloadLayerAnimated(animated: true) } internal func knobHeightForSize(_ size:NSSize) -> CGFloat { return size.height - kBorderLineWidth * 2.0; } internal func rectForKnob()->CGRect { let height = knobHeightForSize(backgroundLayer!.bounds.size) var width = 0.0 let bounds: CGRect = backgroundLayer!.bounds if isActive { width = Double((bounds.width - 2.0 * kBorderLineWidth) / kGoldenRatio) } else { width = Double((bounds.width - 2.0 * kBorderLineWidth) / kDecreasedGoldenRatio) } var x:CGFloat = 0 if (!hasDragged && !isOn) || (hasDragged && !isDraggingTowardsOn) { x = kBorderLineWidth } else { x = bounds.width - CGFloat(width) - kBorderLineWidth } return CGRect(x: x, y: kBorderLineWidth, width: CGFloat(width), height: height) } override public func setFrameSize(_ newSize: NSSize) { super.setFrameSize(newSize) reloadLayerSize() } override public func acceptsFirstMouse(for theEvent: NSEvent!) -> Bool { return true } override public func mouseDown(with theEvent: NSEvent) { if !isEnabled { return } isActive = true reloadLayer() } override public func mouseDragged(with theEvent: NSEvent) { if !isEnabled { return } hasDragged = true let draggingPoint = convert(theEvent.locationInWindow, from: nil) isDraggingTowardsOn = draggingPoint.x > bounds.width / 2.0 reloadLayer() } override public func mouseUp(with theEvent: NSEvent) { if !isEnabled { return } var on = isOn isActive = false if hasDragged { on = isDraggingTowardsOn } else { on = !isOn } if isOn != on { Swift.print("Now: \(on)") if action != nil { NSApp.sendAction(action!, to: target, from: self) } } isOn = on hasDragged = false isDraggingTowardsOn = false reloadLayer() } }
[ 189338 ]
046b033b92019c339b66ba55719da44c4c97bfc1
5e09e910ae6de77e77bd6736f95605611313b38c
/Memory/ViewController.swift
e8ab67398cc71358387e59eb4679c17e4876df09
[]
no_license
yuhyunch/Memory
61d5b1f5685fb03259844ffc47a00721edda2b68
4803b6c40c409829f45d0a3dbcfafd4a9fc5a5a5
refs/heads/master
2020-04-09T10:29:44.531683
2018-12-06T22:28:31
2018-12-06T22:28:31
160,272,927
0
0
null
null
null
null
UTF-8
Swift
false
false
9,600
swift
// // ViewController.swift // Memory // // Created by Yuhyun Chung on 11/11/18. // Copyright © 2018 Yuhyun Chung. All rights reserved. // import UIKit import MapKit import CoreLocation import Alamofire class LocationAnnotation: NSObject, MKAnnotation { var coordinate: CLLocationCoordinate2D var title: String? var subtitle: String? init(coordinate: CLLocationCoordinate2D, title: String?, subtitle: String?){ self.coordinate = coordinate self.title = title self.subtitle = subtitle super.init() } } class ViewController: UIViewController, UISearchBarDelegate { // singleton for userdata. var model:UserData? @IBOutlet weak var mapView: MKMapView! @IBOutlet weak var longtitudeLabel: UILabel! @IBOutlet weak var latitudeLabel: UILabel! let locationManager = CLLocationManager() var pinView : MKAnnotationView! var displayLongtitude: String = "" var displayLatitude: String = "" override func viewDidLoad() { super.viewDidLoad() mapView.delegate = self model = UserData.sharedInstance mapView.mapType = MKMapType.standard locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest // initialize with my current Location. checkLocationServices() if CLLocationManager.locationServicesEnabled(){ print("hello") locationManager.requestWhenInUseAuthorization() locationManager.startUpdatingLocation() } else{ //initialize with my current Location. checkLocationServices() } } @IBAction func addPin(_ sender: UILongPressGestureRecognizer) { let location = sender.location(in: self.mapView) let locCoord = self.mapView.convert(location, toCoordinateFrom: self.mapView) let annotation = MKPointAnnotation() annotation.coordinate = locCoord displayLongtitude = String(format:"%f", locCoord.longitude); longtitudeLabel.text = displayLongtitude; displayLatitude = String(format:"%f", locCoord.latitude) latitudeLabel.text = displayLatitude; annotation.title = "Store" annotation.subtitle = "Location of sotre" //self.mapView.removeAnnotation(mapView.annotations as! MKAnnotation) self.mapView.addAnnotation(annotation) performSegue(withIdentifier: "AddPlaceSegue", sender: self) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. if segue.identifier == "AddPlaceSegue", let PlaceSaveViewController = segue.destination as? PlaceSaveViewController{ PlaceSaveViewController.displayLatitude = self.displayLatitude PlaceSaveViewController.displayLongtitude = self.displayLongtitude } } @IBAction func getMyLocation(_ sender: UIButton) { let status = CLLocationManager.authorizationStatus() if status == .notDetermined { locationManager.requestWhenInUseAuthorization() return } else if status == .denied || status == .restricted { let alert = UIAlertController(title: "Location Services Disabled", message: "Please enable Location Services in Settings", preferredStyle: .alert) let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) alert.addAction(okAction) present(alert, animated: true, completion: nil) return } locationManager.delegate = self locationManager.startUpdatingLocation() } // search @IBAction func searchButton(_ sender: UIBarButtonItem) { let searchController = UISearchController(searchResultsController: nil) searchController.searchBar.delegate = self present(searchController, animated: true, completion: nil) } func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { // Start to ignore user. UIApplication.shared.beginIgnoringInteractionEvents() // Activity Indicator let activityIndicator = UIActivityIndicatorView() activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.gray activityIndicator.center = self.view.center activityIndicator.hidesWhenStopped = true activityIndicator.startAnimating() self.view.addSubview(activityIndicator) // Hide search bar searchBar.resignFirstResponder() dismiss(animated: true, completion: nil) // Create the search request let searchRequest = MKLocalSearchRequest() searchRequest.naturalLanguageQuery = searchBar.text let activeSearch = MKLocalSearch(request: searchRequest) activeSearch.start { (response, error) in activityIndicator.stopAnimating() UIApplication.shared.endIgnoringInteractionEvents() if response == nil { print("Error") // I can pop an alert } else { // have actual result // Remove annotations //let annotations = self.mapView.annotations //self.mapView.removeAnnotation(annotations as! MKAnnotation) // Getting data let latitude = response?.boundingRegion.center.latitude let longitude = response?.boundingRegion.center.longitude // Create annotation let annotation = MKPointAnnotation() annotation.title = searchBar.text annotation.coordinate = CLLocationCoordinate2DMake(latitude!, longitude!) self.mapView.addAnnotation(annotation) // Zooming in on annotation let coordinate:CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitude!, longitude!) let span = MKCoordinateSpanMake(0.1,0.1) let region = MKCoordinateRegionMake(coordinate,span) self.mapView.setRegion(region, animated: true) } } } func setupLocationManager(){ locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest } func centerViewOnUserLocation() { mapView.userTrackingMode = .follow } func checkLocationServices() { if CLLocationManager.locationServicesEnabled(){ setupLocationManager() checkLocationAuthorization() } else{ print("hey") } } func checkLocationAuthorization() { switch CLLocationManager.authorizationStatus() { case .authorizedWhenInUse: mapView.showsUserLocation = true centerViewOnUserLocation() locationManager.startUpdatingLocation() break case .denied: break case .notDetermined: locationManager.requestWhenInUseAuthorization() case .restricted: break case .authorizedAlways: break } } } extension ViewController: CLLocationManagerDelegate { func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { mapView.userTrackingMode = .follow } func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { checkLocationAuthorization() } } extension ViewController: MKMapViewDelegate{ func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { if annotation.isMember(of: MKUserLocation.self){ return nil } let reuseId = "ProfilePinView" pinView = mapView.dequeueReusableAnnotationView(withIdentifier: reuseId) if pinView == nil { pinView = MKAnnotationView(annotation: annotation, reuseIdentifier: reuseId) } pinView.canShowCallout = true pinView.isDraggable = true pinView.image = UIImage(named: "pin") return pinView } func mapView(_ mapView: MKMapView, annotationView view: MKAnnotationView, didChange newState: MKAnnotationViewDragState, fromOldState oldState:MKAnnotationViewDragState){ if newState == MKAnnotationViewDragState.ending{ if let coordinate = view.annotation?.coordinate{ print(coordinate.latitude) view.dragState = MKAnnotationViewDragState.none } } } @objc func mapView(_ rendererForMapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer{ let renderer = MKCircleRenderer(overlay: overlay) renderer.fillColor = UIColor.black.withAlphaComponent(0.5) renderer.strokeColor = UIColor.blue renderer.lineWidth = 2 return renderer } }
[ -1 ]
5574f59a20359e1f8e3203652145bcc6476db8b6
69b1a6e006a743040943f12a67bdb1eb2d86e5b8
/tp-04/Philosophers/Sources/Philosophers/main.swift
976a02bc747c0e33f8d98480630af0d161011be7
[]
no_license
Arianiseni/outils-formels-modelisation
5056316548a975d2415a12a6a160bb8724c2125d
9053454f7fca84442db8d8d1e87d0394f2884ac9
refs/heads/master
2021-09-03T20:46:21.025165
2018-01-11T22:39:06
2018-01-11T22:39:06
106,661,638
0
0
null
2017-10-12T07:49:35
2017-10-12T07:49:35
null
UTF-8
Swift
false
false
1,206
swift
import PetriKit import PhilosophersLib do { enum C: CustomStringConvertible { case b, v, o var description: String { switch self { case .b: return "b" case .v: return "v" case .o: return "o" } } } func g(binding: PredicateTransition<C>.Binding) -> C { switch binding["x"]! { case .b: return .v case .v: return .b case .o: return .o } } let t1 = PredicateTransition<C>( preconditions: [ PredicateArc(place: "p1", label: [.variable("x")]), ], postconditions: [ PredicateArc(place: "p2", label: [.function(g)]), ]) let m0: PredicateNet<C>.MarkingType = ["p1": [.b, .b, .v, .v, .b, .o], "p2": []] guard let m1 = t1.fire(from: m0, with: ["x": .b]) else { fatalError("Failed to fire.") } print(m1) guard let m2 = t1.fire(from: m1, with: ["x": .v]) else { fatalError("Failed to fire.") } print(m2) } print() do { let philosophers = lockablePhilosophers(n: 3) for m in philosophers.simulation(from: philosophers.initialMarking!).prefix(10) { print(m) } }
[ -1 ]
d0e9cc88ad31623ddde658b6185b3a83ac21959a
5cdc8fc5de46420848788ac1f7cdc7fb5f4cec87
/Memorize/SceneDelegate.swift
c464eb5139969d8de010088c76d5fd5913083c90
[]
no_license
Sjosie/Card-game
d22c26d65841ecb0bca319ec35ed56d65fed4e72
36c529b9ce95a4cf92acd73d265bd8523d195737
refs/heads/master
2022-11-27T19:44:37.879135
2020-08-05T08:19:08
2020-08-05T08:19:08
281,878,031
0
0
null
null
null
null
UTF-8
Swift
false
false
2,869
swift
// // SceneDelegate.swift // Memorize // // Created by Евгений Протопопов on 21.06.2020. // Copyright © 2020 Евгений Протопопов. All rights reserved. // import UIKit import SwiftUI class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). // Create the SwiftUI view that provides the window contents. let game = EmojiMemoryGame() let contentView = EmojiMemoryGameView(viewModel: game) // Use a UIHostingController as window root view controller. if let windowScene = scene as? UIWindowScene { let window = UIWindow(windowScene: windowScene) window.rootViewController = UIHostingController(rootView: contentView) self.window = window window.makeKeyAndVisible() } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 268299, 352294, 163892, 16444, 254020, 217158, 286804, 368736, 342113, 286833, 368753, 192640, 268435, 286880, 333989, 286889, 350411, 346317, 180432, 350417, 368854, 350423, 350426, 334047, 356580, 350449, 387314, 375027, 321787, 336124, 350459, 350462, 336129, 350465, 350469, 389381, 325895, 194829, 350477, 43279, 350481, 350487, 325915, 350491, 381212, 325918, 182559, 350494, 258333, 350500, 194854, 350505, 350510, 395567, 248112, 307507, 340276, 264502, 332098, 201030, 190797, 334162, 418135, 250201, 332126, 332130, 250211, 250217, 182642, 268669, 194942, 250239, 389507, 393613, 383375, 340380, 268702, 416159, 326059, 373169, 266688, 336326, 338387, 334306, 338411, 162289, 328178, 199165, 266757, 164362, 334359, 334364, 381483, 334386, 188990, 340580, 375401, 191085, 346736, 268922, 119432, 213642, 330384, 326291, 340639, 332455, 271018, 389806, 385714, 336568, 373450, 418508, 183006, 139998, 338661, 338665, 332521, 418540, 330479, 342769, 418555, 207620, 336644, 191240, 326417, 338712, 199455, 336681, 328498, 152371, 326452, 326455, 340792, 348983, 326463, 326468, 127815, 336712, 326474, 326479, 355151, 326486, 136024, 326494, 439138, 326503, 375657, 201580, 326508, 201583, 326511, 355185, 330612, 201589, 359296, 351105, 252801, 373635, 342921, 236432, 361361, 330643, 252838, 252846, 187335, 398280, 347082, 340940, 248799, 386023, 338928, 359411, 330750, 265215, 338951, 326669, 330769, 361490, 349203, 209944, 209948, 250915, 357411, 158759, 347178, 209966, 209973, 386102, 209976, 209988, 209991, 347208, 197708, 341072, 345172, 156762, 343132, 322660, 210028, 326767, 187503, 386168, 210042, 210045, 361599, 330886, 351366, 351382, 337048, 210078, 210081, 251045, 210085, 337072, 210096, 337076, 345268, 210100, 249015, 367801, 343232, 210116, 244934, 326858, 322763, 333003, 343246, 333010, 146644, 210139, 66783, 328933, 388348, 115973, 343307, 333079, 251161, 245021, 208167, 263464, 245032, 245042, 251190, 44343, 386366, 343366, 126279, 337224, 251211, 357710, 331089, 437588, 263509, 331094, 365922, 197987, 208228, 343399, 345449, 333164, 99692, 234867, 249210, 175484, 245128, 361869, 136591, 245137, 245146, 343453, 245149, 245152, 263585, 396706, 245155, 40358, 245158, 245163, 337330, 146878, 361922, 339401, 327116, 327118, 208338, 343509, 343545, 423424, 253445, 339464, 249355, 405017, 345626, 339504, 349748, 206397, 214594, 333387, 366173, 343650, 333415, 245358, 333423, 222831, 138865, 339572, 372354, 339593, 159375, 333472, 345763, 345766, 425639, 155323, 333499, 337601, 333512, 210632, 339664, 358100, 419543, 212700, 181982, 153311, 337643, 339696, 245495, 141052, 337661, 333566, 366349, 249617, 116512, 210720, 362274, 372533, 345916, 399166, 384831, 247618, 341835, 323404, 354124, 337743, 339795, 354132, 341852, 413539, 399208, 339818, 339827, 358260, 341877, 399222, 243584, 333699, 333709, 329625, 382898, 184245, 333767, 350153, 346059, 311244, 212945, 419810, 247790, 204785, 380919 ]
eb5bb924c6039ee756e397fa19ca20c0ed5d54e9
c0089ebd3b33e091dc3616b446620f838f4fb749
/chance_btc_wallet/chance_btc_wallet/extension/NSTimer+extension.swift
5b555b2930a334c6375342696da9f061a7896d74
[ "MIT" ]
permissive
amirgan/chance_btc_wallet
efafdf7734e95aea5dc1cf847b34007b92796f3c
9c4fcde93dc402051763bb4d579bf73731605ea1
refs/heads/master
2021-06-14T04:44:46.029729
2017-04-20T07:47:13
2017-04-20T07:47:13
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,015
swift
// // NSTimer+extension.swift // Chance_wallet // // Created by Chance on 15/11/21. // Copyright © 2015年 Chance. All rights reserved. // import Foundation /// Empty arguments and non-return value closure public typealias VoidClosure = (Void) ->Void /// Private void closure key let private_voidClosureKey = "private_voidClosureKey" let private_countKey = "private_countKey" /// Array's useful extensions. /// /// Author: huangyibiao /// Github: http://github.com/CoderJackyHuang/ /// Blog: http://www.hybblog.com/ public extension Timer { // MARK: Public /// This is a very convenience Api for us to create a timer and just call back with a closure. /// /// - parameter timeInterval: The interval time for a tick, default is one second. /// - parameter repeats: Whether to repeat callback when interval time comes /// - parameter callback: The selector for calling back. /// /// - returns: The created timer object. public class func schedule(_ timeInterval: TimeInterval = 1, repeats: Bool, callback: VoidClosure?) ->Timer { return Timer.schedule(timeInterval, userInfos: nil, repeats: repeats, callback: callback, count: nil) } /// This is a very convenience Api for us to create a timer and just call back with a closure. /// We can use count argument to specify how many times to tick. If count is zero, it means repeats. /// /// - parameter timeInterval: The interval time for a tick, default is one second. /// - parameter count: How many counts to call back. Zero means repeats. /// - parameter callback: The selector for calling back. /// /// - returns: The created timer object. public class func schdule(_ timeInterval: TimeInterval = 1, count: Int?, callback: VoidClosure?) ->Timer { return Timer.schedule(timeInterval, userInfos: nil, repeats: true, callback: callback, count: count) } // MARK: Private internal class func private_onTimerCallback(_ timer: Timer) { struct private_count { static var s_timerCallbackCount: Int = NSNotFound } if private_count.s_timerCallbackCount == NSNotFound { if let wrapper = timer.userInfo as? HYBObjectWrapper { if let count = wrapper.count { private_count.s_timerCallbackCount = count } } } if private_count.s_timerCallbackCount != NSNotFound { private_count.s_timerCallbackCount -= 1 if private_count.s_timerCallbackCount < 0 { timer.invalidate() return } } var hasCalled = false if let wrapper = timer.userInfo as? HYBObjectWrapper { if let callback = wrapper.voidClosure { callback() hasCalled = true } } if !hasCalled { timer.invalidate() } } fileprivate class func schedule(_ timeInterval: TimeInterval, userInfos: AnyObject?, repeats: Bool, callback: VoidClosure?, count: Int?) ->Timer { var count = count var repeats = repeats if count == 0 { repeats = true count = nil } let wrapper = HYBObjectWrapper(closure: callback, userInfos: userInfos, count: count) let timer = Timer.scheduledTimer(timeInterval: timeInterval, target: self, selector: #selector(Timer.private_onTimerCallback(_:)), userInfo: wrapper, repeats: repeats) return timer } } /// 私有类 private class HYBObjectWrapper: NSObject { var voidClosure: VoidClosure? var userInfos: AnyObject? var count: Int? init(closure: VoidClosure?, userInfos: AnyObject?, count: Int?) { self.voidClosure = closure self.userInfos = userInfos self.count = count } }
[ -1 ]
6f3c3dc85e631641dac8da8a5b34b6f057f73432
c3125bf683a5ff321d3fca4e5851d9a9fbd74445
/SDKFramework/SDKFramework.swift
74dc86de244b7841b1e54369035374c78fa62b4d
[]
no_license
PaulHotmob/SDKFramework
c2f49283ad1dcaed74d86476f6aed1ba974e310e
d53f4930bd43d1db2a8969665149516cc0706270
refs/heads/master
2020-04-22T15:26:34.414996
2019-02-14T05:17:35
2019-02-14T05:17:35
170,477,273
0
0
null
null
null
null
UTF-8
Swift
false
false
578
swift
// // SDKPodFramework.swift // SDKFramework // // Created by Paul Cheung on 13/2/2019. // Copyright © 2019 Paul Cheung. All rights reserved. // import Foundation public class SDKFramework: NSObject { /* *** testing */ open class func publicCallMethod(_ size: CGSize){ print("width :\(size.width) height: \(size.height)") } open class func printString(_ msg: String){ print("print String: \(msg)") } open class func changeFunctionNamePrint(_ msg: String){ print("print String: \(msg)") } }
[ -1 ]
883e7a4678f78f59d80665d95db1d5d3cc9806e2
14fb7b150a558ec58b28abf419d2056677666e7a
/Sources/ProcessOut/Sources/Core/Utils/POAutoAsync.swift
9adf49c34446943e0ec3edf47046c801ae7cf464
[ "MIT" ]
permissive
processout/processout-ios
02d3500f0cdbca06701bb68419d7e41bc79af4df
e8201963113bd4fe0803a030b31aa69ed112eec9
refs/heads/master
2023-09-04T18:25:25.695010
2023-08-31T10:03:18
2023-08-31T10:03:18
117,715,389
2
3
MIT
2023-08-31T10:03:20
2018-01-16T17:16:29
Swift
UTF-8
Swift
false
false
512
swift
// // POAutoAsync.swift // ProcessOut // // Created by Andrii Vysotskyi on 19.10.2022. // /// For types that implement this protocol, [Sourcery](https://github.com/krzysztofzablocki/Sourcery) will /// automatically generate `async` methods for their callback-based counterparts. Only methods where last argument /// is a closure that matches `(Result<?, Error>) -> Void` type are picked, see `Templates/AutoAsync.stencil` in /// project's root directory for details. @_marker public protocol POAutoAsync { }
[ -1 ]
8760d45f45063604803349fba27b8a6b1802a176
46d351d2ea97da4cbc079e89066fc64c8e670387
/sdks/swift/Mentat/Mentat/Query/TupleResult.swift
d41a4f926bb8f296993903870944b10cd96b1eed
[ "Apache-2.0" ]
permissive
qpdb/mentat
e6053dfb8303790cd45314db4c02e1291602ceb0
d39f8aad4e568a35e099968ef9bfc7190beaca60
refs/heads/master
2023-04-07T19:41:41.707967
2022-05-04T18:45:35
2022-05-04T18:45:35
150,130,736
50
2
Apache-2.0
2023-03-31T10:02:13
2018-09-24T16:07:59
Rust
UTF-8
Swift
false
false
7,057
swift
/* Copyright 2018 Mozilla * * 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, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ import Foundation import MentatStore /** Wraps a `Tuple` result from a Mentat query. A `Tuple` result is a list of `TypedValues`. Individual values can be fetched as `TypedValues` or converted into a requested type. Values can be fetched as one of the following types: - `TypedValue` - `Int64` - `Entid` - `Keyword` - `Bool` - `Double` - `Date` - `String` - `UUID`. */ open class TupleResult: OptionalRustObject { /** Return the `TypedValue` at the specified index. If the index is greater than the number of values then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `TypedValue` at that index. */ open func get(index: Int) -> TypedValue { return TypedValue(raw: value_at_index(self.raw!, Int32(index))) } /** Return the `Int64` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `Long` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `Int64` at that index. */ open func asLong(index: Int) -> Int64 { return value_at_index_into_long(self.raw!, Int32(index)) } /** Return the `Entid` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `Ref` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `Entid` at that index. */ open func asEntid(index: Int) -> Entid { return value_at_index_into_entid(self.raw!, Int32(index)) } /** Return the keyword `String` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `Keyword` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The keyword `String` at that index. */ open func asKeyword(index: Int) -> String { let str = value_at_index_into_kw(self.raw!, Int32(index)); return String(destroyingRustString: str); } /** Return the `Bool` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `Boolean` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `Bool` at that index. */ open func asBool(index: Int) -> Bool { return value_at_index_into_boolean(self.raw!, Int32(index)) == 0 ? false : true } /** Return the `Double` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `Double` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `Double` at that index. */ open func asDouble(index: Int) -> Double { return value_at_index_into_double(self.raw!, Int32(index)) } /** Return the `Date` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `Instant` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `Date` at that index. */ open func asDate(index: Int) -> Date { return Date(timeIntervalSince1970: TimeInterval(value_at_index_into_timestamp(self.raw!, Int32(index)))) } /** Return the `String` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `String` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `String` at that index. */ open func asString(index: Int) -> String { let str = value_at_index_into_string(self.raw!, Int32(index)); return String(destroyingRustString: str) } /** Return the `UUID` at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the `TypedValue` at this index is not `Uuid` then this function will crash. - Parameter index: The index of the value to fetch. - Returns: The `UUID` at that index. */ open func asUUID(index: Int) -> UUID? { let uuid = value_at_index_into_uuid(self.raw!, Int32(index)); return UUID(destroyingRustUUID: uuid) } override open func cleanup(pointer: OpaquePointer) { typed_value_list_destroy(pointer) } } /** Wraps a `Coll` result from a Mentat query. A `Coll` result is a list of rows of single values of type `TypedValue`. Values for individual rows can be fetched as `TypedValue` or converted into a requested type. Row values can be fetched as one of the following types: - `TypedValue` - `Int64` - `Entid` - `Keyword` - `Bool` - `Double` - `Date` - `String` - `UUID`. */ open class ColResult: TupleResult { } /** Iterator for `ColResult`. To iterate over the result set use standard iteration flows. ``` query.runColl { rows in rows.forEach { value in ... } } ``` Note that iteration is consuming and can only be done once. */ open class ColResultIterator: OptionalRustObject, IteratorProtocol { public typealias Element = TypedValue init(iter: OpaquePointer?) { super.init(raw: iter) } open func next() -> Element? { guard let iter = self.raw, let rowPtr = typed_value_list_iter_next(iter) else { return nil } return TypedValue(raw: rowPtr) } override open func cleanup(pointer: OpaquePointer) { typed_value_list_iter_destroy(pointer) } } extension ColResult: Sequence { open func makeIterator() -> ColResultIterator { defer { self.raw = nil } guard let raw = self.raw else { return ColResultIterator(iter: nil) } let rowIter = typed_value_list_into_iter(raw) return ColResultIterator(iter: rowIter) } }
[ -1 ]
a37bfd353c1a13ced8f13ea8f48db0aa94defe8b
229862dacccabc9fba12b7adc330b5a48b08955f
/Chromism/GameScene.swift
73d3a3bb8791be272e9fdf9504ffe8b6febe5919
[]
no_license
silo512/IOSgithub
b5edef2c0b9c25e1076e5710d4cfbda072fd831c
2faa00a2402e125f56b344c75a5cd9f4897e1cc1
refs/heads/master
2020-05-29T22:23:37.703648
2015-05-20T01:09:51
2015-05-20T01:09:51
35,910,722
0
0
null
null
null
null
UTF-8
Swift
false
false
8,061
swift
// // GameScene.swift // Chromism // // Created by James Collier on 5/13/15. // Copyright (c) 2015 James Collier. All rights reserved. // import SpriteKit enum BodyType:UInt32 { case charmy = 1 case woodplank = 2 case woodplank1 = 4 case woodplank2 = 8 case all = 16 } let background = SKSpriteNode(imageNamed: "BackgroundBW") let woodplank = SKSpriteNode(imageNamed: "woodplank") let woodplank1 = SKSpriteNode(imageNamed: "woodplank") let woodplank2 = SKSpriteNode(imageNamed: "woodplank") let charmy = SKSpriteNode(imageNamed: "charmy") class GameScene: SKScene, SKPhysicsContactDelegate { override func didMoveToView(view: SKView) { backgroundColor = SKColor.whiteColor() // physics delegate physicsWorld.contactDelegate = self // Add Sprites background.anchorPoint = CGPointZero background.position = CGPointZero background.zPosition = -1 addChild(background) //woodplank.anchorPoint = CGPointZero woodplank.position = CGPoint(x: 175 , y: 1500) woodplank.setScale(0.50) addChild(woodplank) //woodplank1.anchorPoint = CGPointZero woodplank1.position = CGPoint(x: 525 , y: 1000) woodplank1.setScale(0.50) addChild(woodplank1) //woodplank2.anchorPoint = CGPointZero woodplank2.position = CGPoint(x: 925 , y: 1800) woodplank2.setScale(0.50) addChild(woodplank2) //charmy.anchorPoint = CGPointZero charmy.position = CGPoint(x: 150 , y: 1800) charmy.setScale(0.50) addChild(charmy) // Add Physics charmy.physicsBody = SKPhysicsBody(circleOfRadius: 40) charmy.physicsBody?.mass = 1.0 charmy.physicsBody?.restitution = 0.0 charmy.physicsBody?.allowsRotation = false charmy.physicsBody?.affectedByGravity = true charmy.physicsBody?.categoryBitMask = BodyType.charmy.rawValue charmy.physicsBody?.collisionBitMask = BodyType.woodplank.rawValue | BodyType.woodplank1.rawValue | BodyType.woodplank2.rawValue charmy.physicsBody?.contactTestBitMask = BodyType.woodplank.rawValue charmy.physicsBody?.dynamic = true woodplank.physicsBody = SKPhysicsBody(rectangleOfSize: woodplank.frame.size) woodplank.physicsBody?.affectedByGravity = false woodplank.physicsBody?.allowsRotation = false woodplank.physicsBody?.mass = 10 woodplank.physicsBody?.restitution = 0.0 woodplank.physicsBody?.categoryBitMask = BodyType.woodplank.rawValue woodplank.physicsBody?.collisionBitMask = BodyType.charmy.rawValue woodplank.physicsBody?.contactTestBitMask = BodyType.charmy.rawValue woodplank.physicsBody?.dynamic = false woodplank1.physicsBody = SKPhysicsBody(rectangleOfSize: woodplank1.frame.size) woodplank1.physicsBody?.affectedByGravity = false woodplank1.physicsBody?.allowsRotation = false woodplank1.physicsBody?.mass = 10 woodplank1.physicsBody?.restitution = 0.0 woodplank1.physicsBody?.categoryBitMask = BodyType.woodplank1.rawValue woodplank1.physicsBody?.collisionBitMask = BodyType.charmy.rawValue woodplank1.physicsBody?.contactTestBitMask = BodyType.charmy.rawValue woodplank1.physicsBody?.dynamic = false woodplank2.physicsBody = SKPhysicsBody(rectangleOfSize: woodplank2.frame.size) woodplank2.physicsBody?.affectedByGravity = false woodplank2.physicsBody?.allowsRotation = false woodplank2.physicsBody?.mass = 10 woodplank2.physicsBody?.restitution = 0.0 woodplank2.physicsBody?.categoryBitMask = BodyType.woodplank2.rawValue woodplank2.physicsBody?.collisionBitMask = BodyType.charmy.rawValue woodplank2.physicsBody?.contactTestBitMask = BodyType.charmy.rawValue woodplank2.physicsBody?.dynamic = false } func didBeginContact(contact: SKPhysicsContact) { // gets called automatically when two objects begin contact let contactMask = contact.bodyA.categoryBitMask | contact.bodyB.categoryBitMask switch (contactMask) { case BodyType.charmy.rawValue | BodyType.woodplank.rawValue: println("contact made") case BodyType.charmy.rawValue | BodyType.woodplank1.rawValue: println("contact made") case BodyType.charmy.rawValue | BodyType.woodplank2.rawValue: println("contact made") case BodyType.charmy.rawValue | BodyType.all.rawValue: println("contact made") default: return } } func didEndContact(contact: SKPhysicsContact) { // gets called automatically when two objects end contact let contactMask = contact.bodyA.categoryBitMask | contact.bodyB.categoryBitMask switch (contactMask) { case BodyType.charmy.rawValue | BodyType.woodplank.rawValue: println("contact ended") case BodyType.charmy.rawValue | BodyType.woodplank1.rawValue: println("contact ended") case BodyType.charmy.rawValue | BodyType.woodplank2.rawValue: println("contact ended") case BodyType.charmy.rawValue | BodyType.all.rawValue: println("contact ended") default: return } } override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { /* Called when a touch begins */ for touch: AnyObject in touches { charmy.physicsBody?.applyImpulse(CGVectorMake(50, 500)) var playSoundEffect = SKAction.playSoundFileNamed("Beep_High_10.wav", waitForCompletion: false) self.runAction(playSoundEffect) } } override func update(currentTime: CFTimeInterval) { /* Called before each frame is rendered */ woodplank.position = CGPoint(x: woodplank.position.x , y: woodplank.position.y - 1 ) woodplank1.position = CGPoint(x: woodplank1.position.x , y: woodplank1.position.y - 2 ) woodplank2.position = CGPoint(x: woodplank2.position.x , y: woodplank2.position.y - 3 ) if (woodplank.position.y < 0){ woodplank.position = CGPoint(x:175, y:2048) } if (woodplank1.position.y < 0){ woodplank1.position = CGPoint(x:525, y:2048) } if (woodplank2.position.y < 0){ woodplank2.position = CGPoint(x:925, y:2048) } //println(woodplank2.size) } } /* ------------------didMoveToView--------------------------- */ /* Setup your scene here let myLabel = SKLabelNode(fontNamed:"Chalkduster") myLabel.text = "Hello, World!"; myLabel.fontSize = 65; myLabel.position = CGPoint(x:CGRectGetMidX(self.frame), y:CGRectGetMidY(self.frame)); self.addChild(myLabel)*/ /* ------------------touches began--------------------------- */ /* for touch in (touches as! Set<UITouch>) { let location = touch.locationInNode(self) let sprite = SKSpriteNode(imageNamed:"Spaceship") sprite.xScale = 0.5 sprite.yScale = 0.5 sprite.position = location let action = SKAction.rotateByAngle(CGFloat(M_PI), duration:1) sprite.runAction(SKAction.repeatActionForever(action)) self.addChild(sprite) } if charmy_Y <= wood_Y + 50 && charmy_X < (wood_X + 90) { if charmy_Y <= wood_Y + 50 && charmy_X > (wood_X) { return true } } random number gen CGFloat(arc4random_uniform(UInt32(100))) cast as cgfloat */
[ -1 ]
d5717232ec3f2b83d82b9d2499d7d603f2667672
8dc8185c0ad83827198de6574a797f3b6377b485
/BulgyTabBarController/AppDelegate.swift
622c0f088041c00467a25e0fc0304fe64c01668b
[]
no_license
ino1004/BulgyTabBarController
478b1587c441fef1d35d2c0cb254ac512dcadca3
b48b7cae1a539368f9076d7a7cc1691c6375bc7f
refs/heads/master
2020-04-24T14:03:38.376433
2019-02-22T06:19:45
2019-02-22T06:19:45
172,005,322
0
0
null
null
null
null
UTF-8
Swift
false
false
2,190
swift
// // AppDelegate.swift // BulgyTabBarController // // Created by Stephen Chui on 2019/2/22. // Copyright © 2019 Stephen Chui. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 229388, 294924, 229391, 327695, 229394, 229397, 229399, 229402, 278556, 229405, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 229432, 286776, 286778, 319544, 204856, 286791, 237640, 278605, 286797, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 131209, 303241, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 287238, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 189039, 295538, 189040, 172660, 189044, 287349, 352880, 287355, 287360, 295553, 287365, 311942, 303751, 295557, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 164509, 303773, 230045, 172702, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 279258, 303835, 213724, 189149, 303838, 287450, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 213895, 320391, 304007, 304009, 304011, 230284, 304013, 279438, 295822, 295825, 189329, 304019, 189331, 58262, 304023, 279452, 234648, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 295949, 230413, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 279750, 312518, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 312639, 296255, 230718, 296259, 378181, 296262, 230727, 238919, 320840, 296264, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 148843, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 173488, 279985, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 148946, 280021, 239064, 288217, 329177, 280027, 288220, 288214, 239070, 288218, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 320998, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 402942, 296446, 321022, 206336, 296450, 148990, 230916, 230919, 214535, 304651, 370187, 304653, 230923, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 313027, 280260, 206536, 280264, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 304968, 280393, 280402, 173907, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 321560, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 149599, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 149618, 215154, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 354656, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 240132, 223749, 281095, 338440, 150025, 223752, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 281210, 297594, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 240519, 322440, 338823, 314249, 183184, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 290008, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 282025, 314793, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 307009, 413506, 241475, 307012, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 44948, 298901, 241556, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 217179, 315483, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 299191, 307385, 307386, 258235, 176316, 307388, 307390, 184503, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 307510, 332086, 307512, 168245, 307515, 282942, 307518, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 315801, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299440, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 176592, 127440, 315856, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 135672, 127480, 233979, 291323, 127485, 291330, 127490, 283142, 127494, 135689, 233994, 127497, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 152087, 127511, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 135844, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 234239, 242431, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 234313, 316233, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 234364, 291711, 234368, 234370, 201603, 291714, 234373, 226182, 234375, 291716, 308105, 324490, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 324522, 226220, 291756, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 308226, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 308291, 160835, 234563, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 275579, 234620, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 234647, 275608, 308373, 234650, 308379, 324757, 234653, 324766, 119967, 300189, 324768, 283805, 234657, 242852, 234661, 283813, 300197, 234664, 275626, 234667, 316596, 308414, 300223, 234687, 300226, 308418, 226500, 234692, 300229, 308420, 308422, 283844, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 300289, 292097, 300292, 300294, 275719, 234760, 300299, 177419, 283917, 300301, 242957, 177424, 275725, 349464, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 226802, 292338, 316917, 308727, 292343, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 308790, 316983, 194103, 284215, 284218, 194101, 226877, 292414, 284223, 284226, 243268, 292421, 226886, 284231, 128584, 284228, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 292433, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 300628, 284253, 300638, 284255, 235097, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 276187, 284379, 284381, 284384, 284386, 358114, 358116, 276197, 317158, 358119, 284392, 325353, 284394, 358122, 284397, 358126, 276206, 358128, 284399, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 284511, 317279, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 317332, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 276496, 317456, 317458, 178195, 243733, 317468, 243740, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 292934, 243785, 350293, 350295, 194649, 227418, 350299, 309337, 350302, 227423, 194654, 178273, 194657, 227426, 194660, 276579, 227430, 276583, 309346, 309348, 309350, 309352, 309354, 350308, 276590, 350313, 350316, 350321, 284786, 276595, 301167, 350325, 227440, 350328, 292985, 301178, 350332, 292989, 292993, 301185, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 309455, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 227571, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 317971, 309779, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 137889, 383658, 285357, 318128, 277170, 342707, 154292, 293555, 318132, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 293706, 277329, 162643, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 310134, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 293882, 302075, 244731, 121850, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 310355, 293971, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 384328, 277832, 277836, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 245191, 163272, 310727, 302534, 277959, 292968, 302541, 277963, 302543, 277966, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 40484, 294435, 286246, 40486, 40488, 278057, 294439, 40491, 294440, 294443, 294445, 310831, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 228944, 400976, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 237470, 294817, 319394, 40865, 294821, 311209, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 237562 ]
712a4e507a8ef335b8980f7fac0c6183416ad60e
e7408323b186048eab8cf3ff3fbdd0c66dca39f7
/Greegodriverapp/Models/NotificationModel.swift
a3c297f3f838b85213c75e772d60d921ee8c8487
[]
no_license
jay241093/GreegoDriver
b0c5c7caba91d014385b7300bf83733a4947058d
18ae8a9319aa6d8235f148f705410c086b70d2ea
refs/heads/master
2020-03-18T20:51:36.598766
2018-06-29T17:09:59
2018-06-29T17:09:59
135,242,960
0
0
null
null
null
null
UTF-8
Swift
false
false
622
swift
// // NotificationModel.swift // Greegodriverapp // // Created by Harshal Shah on 08/05/18. // Copyright © 2018 Harshal Shah. All rights reserved. // import Foundation public struct NotificationModel: Codable { public let gcmMessageID: String public let aps: Aps public let requestID: String enum CodingKeys: String, CodingKey { case gcmMessageID = "gcm.message_id" case aps case requestID = "request_id" } } public struct Aps: Codable { public let sound: String public let alert: Alert } public struct Alert: Codable { public let body, title: String }
[ -1 ]
bcea48747899a61be07d9a292181a6e41a5175fd
68fee9cc77ff7148f2c259084e1c98f40d5fbeaf
/CodeReady Containers/DaemonCommander/Handlers.swift
7f91e26199f903a72be4f4197e23bacc798739b4
[ "Apache-2.0" ]
permissive
crc-org/tray-macos
ecaf2f5be15d7a3d153d2ce56b6dc2f7d8211af0
d965f1a70c2fee975e7f4ab20c26baec509c8132
refs/heads/master
2023-07-03T17:43:31.712505
2021-08-11T11:51:52
2021-08-11T12:08:06
null
0
0
null
null
null
null
UTF-8
Swift
false
false
12,383
swift
// // Handlers.swift // CodeReady Containers // // Created by Anjan Nath on 22/11/19. // Copyright © 2019 Red Hat. All rights reserved. // import Cocoa import NIOHTTP1 struct StartResult: Decodable { let Name: String? let Status: String? let ClusterConfig: ClusterConfigType? let KubeletStarted: Bool? } struct ProxyConfigType: Decodable { let HTTPProxy: String let HTTPSProxy: String let ProxyCACert: String } struct ClusterConfigType: Decodable { let ClusterCACert: String let KubeConfig: String let KubeAdminPass: String let WebConsoleURL: String let ClusterAPI: String let ProxyConfig: ProxyConfigType? } struct Request: Encodable { let command: String let args: [String: String]? } struct ConfigGetRequest: Encodable { let command: String let args: PropertiesArray } struct PropertiesArray: Encodable { let properties: [String] } struct ConfigGetResult: Decodable { let Configs: [String: String] } struct WebConsoleResult: Decodable { let ClusterConfig: ClusterConfigType } struct VersionResult: Decodable { let CrcVersion: String let CommitSha: String let OpenshiftVersion: String } struct GetconfigResult: Decodable { let Configs: CrcConfigs } struct CrcConfigs: Codable { var bundle: String? var cpus: Int? var disableUpdateCheck: Bool? var enableExperimentalFeatures: Bool? var httpProxy: String? var httpsProxy: String? var memory: Int? var diskSize: Int? var nameserver: String? var noProxy: String? var proxyCaFile: String? var pullSecretFile: String? var networkMode: String? var consentTelemetry: String? var autostartTray: Bool? var skipCheckBundleExtracted: Bool? var skipCheckHostsFilePermissions: Bool? var skipCheckHyperkitDriver: Bool? var skipCheckHyperkitInstalled: Bool? var skipCheckPodmanCached: Bool? var skipCheckRam: Bool? var skipCheckResolverFilePermissions: Bool? var skipCheckRootUser: Bool? var skipCheckOcCached: Bool? var skipCheckGoodhostsCached: Bool? enum CodingKeys: String, CodingKey { case bundle case cpus case memory case nameserver case disableUpdateCheck = "disable-update-check" case enableExperimentalFeatures = "enable-experimental-features" case httpProxy = "http-proxy" case httpsProxy = "https-proxy" case noProxy = "no-proxy" case proxyCaFile = "proxy-ca-file" case pullSecretFile = "pull-secret-file" case diskSize = "disk-size" case networkMode = "network-mode" case consentTelemetry = "consent-telemetry" case autostartTray = "autostart-tray" case skipCheckBundleExtracted = "skip-check-bundle-extracted" case skipCheckHostsFilePermissions = "skip-check-hosts-file-permissions" case skipCheckHyperkitDriver = "skip-check-hyperkit-driver" case skipCheckHyperkitInstalled = "skip-check-hyperkit-installed" case skipCheckPodmanCached = "skip-check-podman-cached" case skipCheckRam = "skip-check-ram" case skipCheckResolverFilePermissions = "skip-check-resolver-file-permissions" case skipCheckRootUser = "skip-check-root-user" case skipCheckOcCached = "skip-check-oc-cached" case skipCheckGoodhostsCached = "skip-check-goodhosts-cached" } } enum DaemonError: Error { case io // input/output error case badResponse case internalServerError(message: String) } extension DaemonError: CustomStringConvertible { public var description: String { switch self { case .io: return "input/output error" case .badResponse: return "bad response from the server" case .internalServerError(let message): return message } } } struct LogsResult: Decodable { let Messages: [String] } struct ConfigsetRequest: Encodable { var command: String var args: Configset } struct ConfigunsetRequest: Encodable { var command: String var args: Configunset } struct Configset: Encodable { var properties: CrcConfigs? } struct Configunset: Encodable { var properties: [String] } func HandleStop() { SendTelemetry(Actions.ClickStop) do { _ = try SendCommandToDaemon(HTTPMethod.GET, "/api/stop") DispatchQueue.main.async { let appDelegate = NSApplication.shared.delegate as? AppDelegate appDelegate?.pollStatus() displayNotification(title: "Successfully Stopped Cluster", body: "The OpenShift Cluster was successfully stopped") } } catch let error { DispatchQueue.main.async { showAlertFailedAndCheckLogs(message: "Failed to stop OpenShift cluster", informativeMsg: "\(error)") let appDelegate = NSApplication.shared.delegate as? AppDelegate appDelegate?.pollStatus() } } } func HandleStart() { DispatchQueue.main.async { let appDelegate = NSApplication.shared.delegate as? AppDelegate appDelegate?.initializeMenus(status: "Starting") } do { displayNotification(title: "Starting Cluster", body: "Starting OpenShift Cluster, this could take a few minutes..") _ = try SendCommandToDaemon(HTTPMethod.GET, "/api/start") displayNotification(title: "Successfully started cluster", body: "OpenShift cluster is running") } catch let error { showAlertFailedAndCheckLogs(message: "Failed to start OpenShift cluster", informativeMsg: "\(error)") } } func HandleDelete() { // prompt for confirmation and bail if No var yes: Bool = false DispatchQueue.main.sync { yes = promptYesOrNo(message: "Deleting CodeReady Containers Cluster", informativeMsg: "Are you sure you want to delete the crc instance") } if !yes { return } SendTelemetry(Actions.ClickDelete) do { _ = try SendCommandToDaemon(HTTPMethod.GET, "/api/delete") // send notification that delete succeeded // rearrage menus DispatchQueue.main.async { let appDelegate = NSApplication.shared.delegate as? AppDelegate appDelegate?.pollStatus() displayNotification(title: "Cluster Deleted", body: "The OpenShift Cluster is successfully deleted") } } catch let error { DispatchQueue.main.async { showAlertFailedAndCheckLogs(message: "Failed to delete OpenShift cluster", informativeMsg: "\(error)") let appDelegate = NSApplication.shared.delegate as? AppDelegate appDelegate?.pollStatus() } } } func HandleWebConsoleURL() { do { let data = try SendCommandToDaemon(HTTPMethod.GET, "/api/webconsoleurl") let webConsoleResult = try JSONDecoder().decode(WebConsoleResult.self, from: data) // open the webconsoleURL NSWorkspace.shared.open(URL(string: webConsoleResult.ClusterConfig.WebConsoleURL)!) } catch let error { showAlertFailedAndCheckLogs(message: "Failed to launch web console", informativeMsg: "Ensure the CRC daemon is running and a CRC cluster is running, for more information please check the logs. Error: \(error)") } } func HandleLoginCommandForKubeadmin() { do { let data = try SendCommandToDaemon(HTTPMethod.GET, "/api/webconsoleurl") let webConsoleResult = try JSONDecoder().decode(WebConsoleResult.self, from: data) // form the login command, put in clipboard and show notification let apiURL = webConsoleResult.ClusterConfig.ClusterAPI let kubeadminPass = webConsoleResult.ClusterConfig.KubeAdminPass let loginCommand = "oc login -u kubeadmin -p \(kubeadminPass) \(apiURL)" let pasteboard = NSPasteboard.general pasteboard.declareTypes([NSPasteboard.PasteboardType.string], owner: nil) pasteboard.setString(loginCommand, forType: NSPasteboard.PasteboardType.string) // show notification on main thread DispatchQueue.main.async { displayNotification(title: "OC Login with kubeadmin", body: "OC Login command copied to clipboard, go ahead and login to your cluster") } } catch let error { showAlertFailedAndCheckLogs(message: "Failed to get login command", informativeMsg: "Ensure the CRC daemon is running and a CRC cluster is running, for more information please check the logs. Error: \(error)") } } func HandleLoginCommandForDeveloper() { do { let data = try SendCommandToDaemon(HTTPMethod.GET, "/api/webconsoleurl") let webConsoleResult = try JSONDecoder().decode(WebConsoleResult.self, from: data) // form the login command, put in clipboard and show notification let apiURL = webConsoleResult.ClusterConfig.ClusterAPI let loginCommand = "oc login -u developer -p developer \(apiURL)" let pasteboard = NSPasteboard.general pasteboard.declareTypes([NSPasteboard.PasteboardType.string], owner: nil) pasteboard.setString(loginCommand, forType: NSPasteboard.PasteboardType.string) // show notification on main thread DispatchQueue.main.async { displayNotification(title: "OC Login with developer", body: "OC Login command copied to clipboard, go ahead and login to your cluster") } } catch let error { showAlertFailedAndCheckLogs(message: "Failed to get login command", informativeMsg: "Ensure the CRC daemon is running and a CRC cluster is running, for more information please check the logs. Error: \(error)") } } func FetchVersionInfoFromDaemon() -> (String, String) { do { let data = try SendCommandToDaemon(HTTPMethod.GET, "/api/version") let versionResult = try JSONDecoder().decode(VersionResult.self, from: data) let crcVersion = "\(versionResult.CrcVersion)+\(versionResult.CommitSha)" return (crcVersion, versionResult.OpenshiftVersion) } catch let error { showAlertFailedAndCheckLogs(message: "Failed to fetch version", informativeMsg: "Ensure the CRC daemon is running, for more information please check the logs. Error: \(error)") return ("", "") } } func GetConfigFromDaemon(properties: [String]) throws -> [String: String] { let data = try SendCommandToDaemon(HTTPMethod.GET, "/api/config", PropertiesArray(properties: properties)) let configGetResult = try JSONDecoder().decode(ConfigGetResult.self, from: data) return configGetResult.Configs } func GetAllConfigFromDaemon() throws -> CrcConfigs { let data = try SendCommandToDaemon(HTTPMethod.GET, "/api/config") let decoder = JSONDecoder() let configResult = try decoder.decode(GetconfigResult.self, from: data) return configResult.Configs } func SetConfigFromDaemon(config: ConfigsetRequest) throws -> ConfigResult { let data = try SendCommandToDaemon(HTTPMethod.POST, "/api/config", config.args) let result = try JSONDecoder().decode(ConfigResult.self, from: data) return result } func UnsetConfigFromDaemon(config: ConfigunsetRequest) throws -> ConfigResult { let data = try SendCommandToDaemon(HTTPMethod.DELETE, "/api/config", config.args) let result = try JSONDecoder().decode(ConfigResult.self, from: data) return result } enum Actions: String { case Start = "start application" case OpenMenu = "open menu" case ClickStart = "click start" case EnterPullSecret = "enter pull secret" case ClickStop = "click stop" case ClickDelete = "click delete" case ClickOpenConsole = "click open web console" case OpenPreferences = "open preferences" case ApplyPreferences = "apply new preferences" case OpenStatus = "open status" case OpenAbout = "open about" case CopyOCLoginForDeveloper = "copy oc login for developer" case CopyOCLoginForAdmin = "copy oc login for admin" case Quit = "quit application" case ChangeKubernetesContext = "change Kubernetes context" } func SendTelemetry(_ action: Actions) { _ = try? SendCommandToDaemon(HTTPMethod.POST, "/api/telemetry", ["action": action.rawValue, "source": "tray"]) } func IsPullSecretDefined() -> Bool { do { _ = try SendCommandToDaemon(HTTPMethod.GET, "/api/pull-secret") return true } catch { return false } }
[ -1 ]
dc82168aa54b2e8d2a639975274f7790d7681666
cab7d2cff063f72cd71ce5c177ecc2f7bc765029
/Sources/SwiftyMediator/DefaultProviderMediator.swift
0b301806e6631d397de880d8bb3f623dbfe5e0a0
[ "MIT" ]
permissive
wang-chuanhui/SwiftyMediator
9a63cb948e1334f88845044f14d7b9666dd392b6
ffe4aab42fba8a904881c0f98864e99e030c1bda
refs/heads/master
2020-07-18T17:14:33.091323
2019-09-13T05:44:47
2019-09-13T05:44:47
206,282,281
0
0
null
null
null
null
UTF-8
Swift
false
false
575
swift
// // DefaultProviderMediator.swift // SwiftyMediator // // Created by 王传辉 on 2019/9/6. // public struct DefaultProviderMediator<DefaultProvider: Provider> { let provider: DefaultProvider public init(_ provider: DefaultProvider) { self.provider = provider } func request<R : Requestor>(_ requestor: R) -> R.Target where R.Target == DefaultProvider.Target { do { let result = try Mediator.throws(requestor) return result } catch { return provider.providTarget() } } }
[ -1 ]
e7f7060e2c05c44f8dbd53e27508bc4389764fbe
0c06d80ecd13202d7da0256f5ee2645ac783a6d2
/Pascal/Pascal/Renting/LockAnimationViewController.swift
f3b3fcc9cfeccfa5d25063a687651b9d5c88b8ce
[]
no_license
rpatel26/Pascal
62e2b94daa912ad208eca2ff2caba3faf5c8f8d4
d4f0528a98342e63d28802a91d7eaf94e54fa918
refs/heads/master
2020-05-22T00:15:34.038480
2019-06-10T04:36:50
2019-06-10T04:36:50
186,168,151
0
0
null
null
null
null
UTF-8
Swift
false
false
1,281
swift
// // LockAnimationViewController.swift // Pascal // // Created by Ravi Patel on 6/4/19. // Copyright © 2019 ECE 140. All rights reserved. // import UIKit import Lottie class LockAnimationViewController: UIViewController { var lottie_animation: AnimationView! override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.black lottie_animation = AnimationView(name: "data") lottie_animation.frame = CGRect(x: 0, y: 0, width: self.view.bounds.width, height: self.view.bounds.height) self.view.addSubview(lottie_animation) self.view.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.6) print("view did load....") } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) playAnimation() } func playAnimation(){ lottie_animation.contentMode = .scaleAspectFill lottie_animation.play { (err) in let storyboard = UIStoryboard(name: "Renting", bundle: nil) let viewController = storyboard.instantiateViewController(withIdentifier: "current_pascal_status") self.present(viewController, animated: true, completion: nil) } } }
[ -1 ]
b34020c542c752c812c97c7943e129e9481fedb8
0bd262ba297ee7c64ccaeda86f0bf4f54e0f878d
/Modules/RoxieMobile.NetworkingApi/Sources/Http/Sources/Cookie/HttpCookieProtocol.swift
08a2ebe442f4cc0733e27c2d3c53eeb6fa1689e0
[ "BSD-2-Clause" ]
permissive
NSemakov/networking-api.ios
1c9d9b2735c24cf7601cd4a0fcd1f8bd9c82fda6
b6aa477b1dcaee6b77f86da3c8198ed9e74744ab
refs/heads/develop
2020-06-11T14:35:31.790682
2018-03-26T11:29:59
2018-03-26T11:29:59
75,645,793
0
1
null
2016-12-05T16:43:01
2016-12-05T16:43:01
null
UTF-8
Swift
false
false
1,352
swift
// ---------------------------------------------------------------------------- // // HttpCookieProtocol.swift // // @author Alexander Bragin <[email protected]> // @copyright Copyright (c) 2015, MediariuM Ltd. All rights reserved. // @link http://www.mediarium.com/ // // ---------------------------------------------------------------------------- import Foundation import SwiftCommonsLang // ---------------------------------------------------------------------------- @objc public protocol HttpCookieProtocol: CustomStringConvertibleObjC { // MARK: - Properties /// Returns a dictionary representation of the receiver. var properties: [HTTPCookiePropertyKey : Any]? { get } /// Returns the "Domain" attribute. var domain: String { get } /// Returns the "Name" of this cookie. var name: String { get } /// Returns the "Path" attribute. var path: String { get } // MARK: - Functions /// Reports whether this http cookie has expired according to the time passed in or not. func isExpired(_ date: Date) -> Bool /// Reports whether this http cookie has expired or not. func isExpired() -> Bool /// Checks if this cookie matches the given URL. func matchesURL(_ url: URL) -> Bool } // ----------------------------------------------------------------------------
[ -1 ]
e24790cdb6ca6dd6757ca108358ac49dec9b3cb2
0f1466e9192dc3fb9261bd6cfbe1bb584e69d918
/Face_Evaluation_ios/Cell/RanKCell.swift
d92c6eea83384b2d18e851b880427655ef0ba56c
[]
no_license
8secz-johndpope/Face_IOS
05ba2b77a451512298a8ffb34c786d6f748d5864
47a67e92d11ebce78921c375fc5b061567a911d6
refs/heads/master
2020-12-22T07:00:10.445855
2020-01-19T13:26:46
2020-01-19T13:26:46
null
0
0
null
null
null
null
UTF-8
Swift
false
false
763
swift
// // RanKCell.swift // Face_Evaluation_ios // // Created by leegunwook on 15/06/2019. // Copyright © 2019 leegunwook. All rights reserved. // import UIKit class RankCell : UICollectionViewCell { private let xibName = "RankXib" @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var profileImage: UICImageView! required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } override init(frame: CGRect) { super.init(frame: frame) setUpView() } func setUpView() { let view = Bundle.main.loadNibNamed(xibName, owner: self, options: nil)?.first as! UIView view.frame = self.bounds self.addSubview(view) } }
[ -1 ]
86867000c888064e385ede2811f099d981642c95
a3bb2b74216bfe59cc6d796014c5a5dd1c6c4776
/Keda/Keda/Products/ProductRatings/ProductRatingTVCell.swift
2f56548b851ab4094d06734c680eaa9d9cb48592
[]
no_license
tabanoa/Keda
6aa40826e10d81d1ebe682c458ab71d30b530c03
a415808e9df4cb90e53eb00c2506b46f97062fbb
refs/heads/main
2023-04-08T22:19:30.459844
2021-04-11T03:17:30
2021-04-11T03:17:30
338,674,140
0
0
null
null
null
null
UTF-8
Swift
false
false
11,579
swift
// // ProductRatingTVCell.swift // Keda // // Created by Matthew Mukherjee on 03/03/2021. import UIKit protocol ProductRatingTVCellDelegate: class { func viewImage(_ cell: ProductRatingTVCell, indexPath: IndexPath) func viewAllImage(_ cell: ProductRatingTVCell, indexPath: IndexPath) } class ProductRatingTVCell: UITableViewCell { //MARK: - Properties static let identifier = "ProductRatingTVCell" weak var delegate: ProductRatingTVCellDelegate? let collectionView = UICollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout()) let avatarIMGView = UIImageView() let nameLbl = UILabel() let descriptionLbl = UILabel() let createdTimeLbl = UILabel() let ratingLargeSV = RatingSmallSV() let prefixLbl = UILabel() var prRating: Rating? lazy var imageLinks: [String] = [] var review: Review! { didSet { User.fetchUserFromUID(uid: review.userUID) { (user) in self.nameLbl.text = user.fullName user.fullName.fetchFirstLastName { (fn, ln) in self.prefixLbl.text = "\(fn.prefix(1) + ln.prefix(1))".uppercased() } guard let link = user.avatarLink else { self.prefixLbl.isHidden = false self.avatarIMGView.backgroundColor = UIColor(hex: 0xDEDEDE) self.avatarIMGView.image = nil return } user.downloadAvatar(link: link) { (image) in DispatchQueue.main.async { self.prefixLbl.isHidden = true self.avatarIMGView.image = image } } if let prRating = self.prRating { self.ratingLargeSV.rating = prRating.containerUserUID(user.uid) } } descriptionLbl.isHidden = review.description == nil if !review.show { collectionView.isHidden = false } else { collectionView.isHidden = review.imageLinks == [] } if review.type == "text" { descriptionLbl.text = review.description } else if review.type == "image" { imageLinks = review.imageLinks collectionView.reloadData() } else { descriptionLbl.text = review.description imageLinks = review.imageLinks collectionView.reloadData() } let f = DateFormatter() f.dateFormat = "dd/MM/yyyy" let date = dateFormatter().date(from: review.createdTime)! createdTimeLbl.text = f.string(from: date) } } //MARK: - Initialize override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) configureCell() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } //MARK: - Condigure extension ProductRatingTVCell { func configureCell() { //TODO: - Avatar ImageView let imgW: CGFloat = 50.0 avatarIMGView.clipsToBounds = true avatarIMGView.layer.cornerRadius = imgW/2 avatarIMGView.contentMode = .scaleAspectFit avatarIMGView.image = nil avatarIMGView.translatesAutoresizingMaskIntoConstraints = false avatarIMGView.widthAnchor.constraint(equalToConstant: imgW).isActive = true avatarIMGView.heightAnchor.constraint(equalToConstant: imgW).isActive = true //TODO: - Product ImageView collectionView.configureCV(.clear, ds: self, dl: self) collectionView.register(ProductRatingCVCell.self, forCellWithReuseIdentifier: ProductRatingCVCell.identifier) collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "UICollectionViewCell") collectionView.isHidden = true collectionView.isScrollEnabled = false collectionView.widthAnchor.constraint(equalToConstant: imgW*3+4).isActive = true collectionView.heightAnchor.constraint(equalToConstant: imgW).isActive = true let layout = collectionView.collectionViewLayout as! UICollectionViewFlowLayout layout.scrollDirection = .horizontal layout.minimumLineSpacing = 2.0 layout.minimumInteritemSpacing = 2.0 //TODO: - Name nameLbl.configureNameForCell(false, txtColor: .black, fontSize: 15.0, isTxt: "Keda Team") descriptionLbl.configureNameForCell(false, line: 0, txtColor: .black, fontSize: 13.0, isTxt: "Description", fontN: fontNamed) createdTimeLbl.configureNameForCell(false, txtColor: .gray, fontSize: 12.0, isTxt: "3 ngày trước", fontN: fontNamed) //TODO: - Ratings let height: CGFloat = ratingLargeSV.height ratingLargeSV.rating = 0 contentView.addSubview(ratingLargeSV) ratingLargeSV.translatesAutoresizingMaskIntoConstraints = false let views1: [UIView] = [nameLbl, descriptionLbl, collectionView, createdTimeLbl] let sv1 = createdStackView(views1, spacing: 8.0, axis: .vertical, distribution: .fill, alignment: .leading) let views2: [UIView] = [avatarIMGView, sv1] let sv2 = createdStackView(views2, spacing: 10.0, axis: .horizontal, distribution: .fillProportionally, alignment: .top) contentView.addSubview(sv2) sv2.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ sv2.widthAnchor.constraint(equalToConstant: screenWidth-100), sv2.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 20.0), sv2.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 20.0), sv2.bottomAnchor.constraint(lessThanOrEqualTo: contentView.bottomAnchor, constant: -20.0), ratingLargeSV.widthAnchor.constraint(equalToConstant: height*5), ratingLargeSV.heightAnchor.constraint(equalToConstant: height), ratingLargeSV.topAnchor.constraint(equalTo: sv2.topAnchor), ratingLargeSV.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -20.0) ]) //TODO: - PrefixLbl let prefix = "\(nameLbl.text!.prefix(1))" prefixLbl.configureNameForCell(true, txtColor: .white, fontSize: 17.0, isTxt: prefix) contentView.insertSubview(prefixLbl, aboveSubview: avatarIMGView) prefixLbl.translatesAutoresizingMaskIntoConstraints = false prefixLbl.centerXAnchor.constraint(equalTo: avatarIMGView.centerXAnchor).isActive = true prefixLbl.centerYAnchor.constraint(equalTo: avatarIMGView.centerYAnchor).isActive = true if avatarIMGView.image == nil { avatarIMGView.backgroundColor = UIColor(hex: 0xDEDEDE) prefixLbl.isHidden = false } setupDarkMode() } } //MARK: - UICollectionViewDataSource extension ProductRatingTVCell: UICollectionViewDataSource { func numberOfSections(in collectionView: UICollectionView) -> Int { if imageLinks.count > 2 { return 2 } return 1 } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { guard review.show else { return 1 } if section == 0 { return imageLinks.count >= 2 ? 2 : 1 } return 1 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { if indexPath.section == 0 { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: ProductRatingCVCell.identifier, for: indexPath) as! ProductRatingCVCell if review.show { guard imageLinks.count != 0 else { return cell } cell.link = imageLinks[indexPath.item] cell.activityIndicator.isHidden = true cell.activityIndicator.stopAnimating() } else { cell.imgView.image = nil cell.imgView.backgroundColor = UIColor(hex: 0xDEDEDE) cell.activityIndicator.isHidden = false cell.activityIndicator.startAnimating() } return cell } else { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "UICollectionViewCell", for: indexPath) cell.backgroundColor = UIColor(hex: 0xDEDEDE) cell.clipsToBounds = true cell.layer.cornerRadius = 5.0 let imgView = UIImageView() imgView.clipsToBounds = true imgView.contentMode = .scaleAspectFit imgView.image = UIImage(named: "icon-back") imgView.transform = CGAffineTransform(rotationAngle: CGFloat(180).degreesToRadians()) cell.addSubview(imgView) imgView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ imgView.widthAnchor.constraint(equalToConstant: 20.0), imgView.heightAnchor.constraint(equalToConstant: 20.0), imgView.centerXAnchor.constraint(equalTo: cell.centerXAnchor), imgView.centerYAnchor.constraint(equalTo: cell.centerYAnchor), ]) return cell } } } //MARK: - UICollectionViewDelegate extension ProductRatingTVCell: UICollectionViewDelegate { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { if indexPath.section == 0 { delegate?.viewImage(self, indexPath: indexPath) } else { delegate?.viewAllImage(self, indexPath: indexPath) } } } //MARK: - UICollectionViewDelegateFlowLayout extension ProductRatingTVCell: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: (collectionView.bounds.width-2)/3, height: 50.0) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { return CGSize(width: 2.0, height: 50.0) } } //MARK: - DarkMode extension ProductRatingTVCell { override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupDarkMode() } private func setupDarkMode() { if #available(iOS 12.0, *) { switch traitCollection.userInterfaceStyle { case .light, .unspecified: setupDarkModeView() case .dark: setupDarkModeView(true) default: break } } else { setupDarkModeView() } } private func setupDarkModeView(_ isDarkMode: Bool = false) { nameLbl.textColor = isDarkMode ? .white : .black descriptionLbl.textColor = isDarkMode ? .white : .black createdTimeLbl.textColor = isDarkMode ? .lightGray : .gray } }
[ -1 ]
a86a237e39cd74e80a59be66566e8d2e8006ad6a
98aabf3a78d7f0dea2f964d65e225182649be8fe
/Pods/CNLUIKitTools/CNLUIKitTools/CNLUIT+UINavigationController.swift
cea6acb3b5d8ecf82e14e035c364cb2c1d73c52d
[ "MIT" ]
permissive
megavolt605/CNLogo
017fdc59961d4383d6c3ab5401f3329b6688388e
5f207ae5dba87d38fcdcc7857700666464eca255
refs/heads/master
2021-01-19T01:19:29.127924
2017-08-04T20:04:31
2017-08-04T20:04:31
42,358,604
1
0
null
null
null
null
UTF-8
Swift
false
false
2,994
swift
// // CNLUIT+UINavigationController.swift // CNLUIKitTools // // Created by Igor Smirnov on 11/11/2016. // Copyright © 2016 Complex Numbers. All rights reserved. // import UIKit public extension UINavigationController { public func customPush( _ viewController: UIViewController, flowView: UIView? = nil, flowImage: UIImage? = nil, baseView: UIView? = nil, transitionType: String = kCATransitionPush, subtype: String = kCATransitionFromRight ) { let transition: () -> Void = { let transition = CATransition() transition.duration = 0.3 transition.type = transitionType transition.subtype = subtype self.view.layer.add(transition, forKey: kCATransition) self.pushViewController(viewController, animated: false) } if let flowView = flowView, let baseView = baseView { let frame = flowView.convert(flowView.bounds, to: baseView) let imageView = UIImageView(frame: frame) imageView.image = flowImage ?? flowView.snapshot() baseView.addSubview(imageView) UIView.animate( withDuration: 0.5, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: { imageView.layer.transform = CATransform3DMakeScale(2.0, 2.0, 1.0) imageView.alpha = 0.1 imageView.center = baseView.bounds.center }, completion: { _ in imageView.removeFromSuperview() transition() } ) } else { transition() } } public func pushViewController( viewController: UIViewController, duration: CFTimeInterval = 0.2, timingFunction: String = kCAMediaTimingFunctionLinear, type: String = kCATransitionPush, subtype: String = kCATransitionFromRight ) { let transition = CATransition() transition.duration = duration transition.timingFunction = CAMediaTimingFunction(name: timingFunction) transition.type = type transition.subtype = subtype view.layer.add(transition, forKey: nil) pushViewController(viewController, animated: false) } public func popViewController(duration: CFTimeInterval = 0.2, timingFunction: String = kCAMediaTimingFunctionLinear, type: String = kCATransitionPush, subtype: String = kCATransitionFromRight) { let transition = CATransition() transition.duration = duration transition.timingFunction = CAMediaTimingFunction(name: timingFunction) transition.type = type transition.subtype = subtype view.layer.add(transition, forKey: nil) let _ = popViewController(animated: false) } }
[ -1 ]
f75f995d7b92ecf2bacb1b3157e4de49182038c3
04c3c015882c078093038979ac034c2e5d70d929
/AccountPageScrollView/swiftText/UserInfoController.swift
928b985f7963982204b5ed8234f2acfa88659faf
[]
no_license
sujeking/AccountPageScrollView
c5837ed3889dfb33fc9f34aca07ea467f078850d
d62fb61efbeab0003e6f8dc2bd36889e91a4f259
refs/heads/master
2023-04-12T22:47:18.588917
2021-04-23T09:48:37
2021-04-23T09:48:37
null
0
0
null
null
null
null
UTF-8
Swift
false
false
729
swift
// // UserInfoController.swift // swiftText // // Created by jingjun on 2019/2/19. // Copyright © 2019 景军. All rights reserved. // import UIKit class UserInfoController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white // Do any additional setup after loading the view. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ 327383 ]
ca6ba2671ef5274ccb5acfdf0e889978021bb2f3
11bda16f3e1a15120443ea9824163375a294760b
/StudyPad/Scenes/Main/NotebooksList/NoteDetail/NoteDetailPresenter.swift
b204f618183c9b76643f40b0f6a2dd25d3a8465f
[]
no_license
levinzonr/studypad-ios
5b4812615f78962160165f3e29d97575c174411d
e47b11f7bf3ac293e659843e714374eb97b8ba64
refs/heads/master
2020-04-16T08:03:37.721391
2019-02-09T18:36:06
2019-02-09T18:36:06
165,410,049
0
0
null
null
null
null
UTF-8
Swift
false
false
793
swift
// // NoteDetailPresenter.swift // StudyPad // // Created by Roman Levinzon on 22/01/2019. // Copyright © 2019 Roman Levinzon. All rights reserved. // import Foundation final class NoteDetailPresenter: BasePresenter { let note: Note let delegate: NoteDetailDelegate init(note: Note, delegate: NoteDetailDelegate) { self.note = note self.delegate = delegate } typealias View = NoteDetailView var view: NoteDetailView? func attachView(view: NoteDetailView) { self.view = view self.runAction { (view: NoteDetailView) in view.showNote(note) } } func dettachView() { self.view = nil } func showEditNote() { delegate.showEditNote() } }
[ -1 ]
2bf483599d931e2ff2fe46268d442af657d60460
fe2022fc434f74f264e67c636738e0aa915a81fa
/Seefood/AppDelegate.swift
3c818f9d20db15a034dc85ed1f28b4c28a83ba04
[]
no_license
ajyg/See-Food
f4cfcd861d9c5f8bbc7fa6e7a6adab5475e799da
0145b3e5c11b615ccad67fe5cc2d7566d8f09b7b
refs/heads/master
2020-04-15T15:06:40.030574
2019-01-09T03:28:05
2019-01-09T03:28:05
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,170
swift
// // AppDelegate.swift // Seafood // // Created by Angela Gu on 2018-09-25. // Copyright © 2018 Angela Gu. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 279178, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 287390, 303773, 172705, 287394, 172707, 303780, 164509, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312006, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 213895, 304009, 304011, 230284, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 189331, 213902, 58262, 304023, 304027, 279452, 234648, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 132165, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 288214, 148946, 239064, 329177, 288217, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 181854, 370272, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 281095, 223752, 150025, 338440, 240132, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 142226, 289687, 240535, 224151, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 298365, 290174, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307386, 258235, 307388, 307385, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 276052, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127434, 315856, 176592, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 316294, 201603, 226182, 308105, 234375, 226185, 234379, 324490, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 226200, 234398, 291742, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 291754, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 234437, 226245, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 275462, 308231, 234504, 234507, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 324757, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 226500, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 144814, 227426, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 276053, 284249, 284251, 300638, 284253, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 284290, 325250, 284292, 292485, 292479, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 317279, 284511, 227175, 292715, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 292776, 276395, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276452, 292839, 276455, 350186, 292843, 292845, 276464, 178161, 227314, 325624, 350200, 317435, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 301163, 350313, 350316, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 252022, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 130345, 277801, 113964, 277804, 384302, 285999, 285997, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 146765, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 302617, 286233, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 280021, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
6954504e35d834e3042ff8c89ece8dcca0250a45
7f07bef5b0d2d061840072d7201dfe444ed820d4
/TimeZone/EditView/EditViewDataLayer.swift
82c72ebbe10b1a771faaf531c9ad2b3394be1b8a
[]
no_license
inspiredclick/TimeZone
6aaac6c42587a82a4e3c5a5e1494a4f468be404f
ce5cbb8310172e700604597d0f5f82173c5ec3e7
refs/heads/master
2020-04-20T09:24:15.838051
2019-02-01T21:50:35
2019-02-01T21:50:35
168,764,676
0
0
null
null
null
null
UTF-8
Swift
false
false
1,074
swift
// // EditViewDataLayer.swift // TimeZone // // Created by arosenblatt on 11/20/18. // Copyright © 2018 Inspiredclick. All rights reserved. // import Foundation import PromiseKit protocol EditViewDataLayerType: class { func getStoredTimeZones() -> [[String: [String: Any]]] func saveTimeZone(_ viewModel: EditCellViewModel) func searchRequest(_ queryString: String) -> Promise<Any> func removeSavedTimezone(_ viewModel: EditCellViewModel) -> Bool } final class EditViewDataLayer: EditViewDataLayerType { func getStoredTimeZones() -> [[String: [String: Any]]] { return TZDefaults.getTimezones() } func saveTimeZone(_ viewModel: EditCellViewModel) { TZDefaults.saveTimezone(viewModel) } func searchRequest(_ queryString: String) -> Promise<Any> { let request = TimeZoneAPI.SearchRequest(queryString: queryString, style: .full) return request.get() } func removeSavedTimezone(_ viewModel: EditCellViewModel) -> Bool { return TZDefaults.removeTimezone(viewModel) } }
[ -1 ]
6744496ec309367c86558254dbfa2cda8ca85f6c
457512f8e082bfd2aa56a72af9c21c5b3759cfe6
/FirstWeek_Assignment_02/FirstWeek_Assignment_02/SignUpViewController.swift
3b472a7a4bf0871354377df3ac81d6195a2bba5a
[]
no_license
26th-SOPT-iOS/YangJaeWook
d99018e336cbaddfb312383e393aefd3bfa97113
0ce4a734adc9312bddd2f26715aabe43d1584939
refs/heads/master
2022-12-06T06:48:06.966093
2020-08-18T06:08:19
2020-08-18T06:08:19
256,180,641
3
1
null
null
null
null
UTF-8
Swift
false
false
1,285
swift
// // SignUpViewController.swift // FirstWeek_Homework_02 // // Created by 양재욱 on 2020/04/18. // Copyright © 2020 양재욱. All rights reserved. // import UIKit class SignUpViewController: UIViewController { @IBOutlet var signupId: UITextField! @IBOutlet var signupPw: UITextField! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func transferData(_ sender: Any) { guard let receiveViewController = self.storyboard?.instantiateViewController(identifier: "loginViewController") as? LogInViewController else {return} receiveViewController.id = signupId.text receiveViewController.pw = signupPw.text self.present(receiveViewController, animated: true) { self.navigationController?.popViewController(animated: false) } } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ -1 ]
9672b2522d056807d21d978365f4543fa196a915
24229753e3cb282d165bb102ea8913a17ac41d61
/Polla Ulima/Polla Ulima/Polla/PollaTableViewCell.swift
7f093bbb287b43c5873292e7de5e2949fdbdb7d4
[]
no_license
Anwera64/Polla-Ulima
ec843405412c46a6fcee2229289219442221a3a7
ee01cff181b6229ef0ccfbbd7fe8cc2b2c146c3a
refs/heads/master
2020-03-19T22:07:23.669403
2018-06-15T16:21:02
2018-06-15T16:21:02
136,960,292
0
0
null
null
null
null
UTF-8
Swift
false
false
605
swift
// // PollaTableViewCell.swift // Polla Ulima // // Created by Anton Tchistiakov on 6/14/18. // Copyright © 2018 Anton Tchistiakov. All rights reserved. // import UIKit class PollaTableViewCell: UITableViewCell { @IBOutlet weak var team1Label: UILabel! @IBOutlet weak var team2Label: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 300800, 257858, 300802, 418824, 155243, 217069, 163949, 327181, 430197 ]
737846726436518f748047e8cd4ef91577511e42
f3041a43580d99e29d6c10662f24392bdbe60f82
/ATTube/Controllers/Home/Home Cell/CollectionCellOption.swift
ab1d435a52e3fe8387ac34f794a5b8fd29cf9fd9
[]
no_license
quangpcm/ATTube
6b6a0b909652a14957f66d1551babdd5cb200a63
509d2d48a3bd2e75d61a670640620ae73e5bdaa4
refs/heads/master
2021-06-07T07:49:41.984888
2016-09-23T12:31:28
2016-09-23T12:31:28
null
0
0
null
null
null
null
UTF-8
Swift
false
false
623
swift
// // CollectionCellOption.swift // ATTube // // Created by Quang Phù on 9/11/16. // Copyright © 2016 at. All rights reserved. // import UIKit class CollectionCellOption: UICollectionViewCell { @IBOutlet private weak var blurView: UIView! @IBOutlet private weak var title: UILabel! override func awakeFromNib() { super.awakeFromNib() configUI() autoFontSize() } private func configUI() { blurView.addBlurBackground(.Dark) } private func autoFontSize() { let helveticaFont = HelveticaFont() title.font = helveticaFont.Bold(17) } }
[ -1 ]
890370d14674bbe5da874417388ff8295b8acc6a
ade7b19511a0d8f41f13ef82e068f0699cb26e56
/unote/Game.swift
1b8320909833c4713b7d9c0c5416099e28a343ad
[]
no_license
charelF/carioca
f90f0cab758d34bc1f439f1a10b124c73e6700dc
02d75fdd03a11d2b681b9008c6106fdbc3ea2e11
refs/heads/master
2023-06-14T00:34:02.460506
2021-06-30T08:22:13
2021-06-30T08:22:13
280,094,900
0
0
null
null
null
null
UTF-8
Swift
false
false
3,512
swift
// // Game.swift // unote // // Created by Charel Felten on 12/07/2020. // Copyright © 2020 Charel Felten. All rights reserved. // import Foundation struct Card { var name: String var value: Int } struct Round: Hashable, Identifiable { var number: Int var win: Int var desc: String var id: UUID = UUID() } struct Player: Hashable, Identifiable, Equatable { var name: String var id: UUID = UUID() static func == (lhs: Self, rhs: Self) -> Bool { return lhs.id == rhs.id } } struct ScoreBoardEntry: Identifiable { var id = UUID() var value: Int var round: Round var player: Player } class Game: ObservableObject { @Published var playerCount: Int @Published var rounds: [Round] = [ Round(number: 1, win: -10, desc: "Royal pair"), Round(number: 2, win: -20, desc: "Pair + Royal pair"), Round(number: 3, win: -30, desc: "Three of a kind"), Round(number: 4, win: -40, desc: "Full house"), Round(number: 5, win: -50, desc: "Four of a kind"), Round(number: 6, win: -60, desc: "40 Points with 4 cards"), Round(number: 7, win: -70, desc: "Straight flush"), Round(number: 8, win: -80, desc: "Pair + Three of a kind + Straight flush of 3 cards"), Round(number: 9, win: -90, desc: "Straight flush + Four of a kind"), Round(number: 10, win: -100, desc: "All cards") ] @Published var players: [Player] @Published var scoreBoard: [Round:[ScoreBoardEntry]] init(players: [Player]) { self.scoreBoard = [:] self.players = players self.playerCount = players.count for r in self.rounds { var tmp: [ScoreBoardEntry] = [] for p in self.players { tmp.append(ScoreBoardEntry(value: 0, round: r, player: p)) } self.scoreBoard[r] = tmp } } convenience init(playerCount: Int) { var tmp = [Player]() for i in 0..<playerCount { tmp.append(Player(name:"Player \(i+1)")) } self.init(players: tmp) } func getScore(player: Player, round: Round) -> Int { var out: Int = 0 for sbe in self.scoreBoard[round]! { if sbe.player.id == player.id { out += sbe.value } } return out } func enterScore(player: Player, round: Round, score: Int) { if let sbe_a = self.scoreBoard[round] { for (i, sbe) in sbe_a.enumerated() { if sbe.player == player { self.scoreBoard[round]![i] = ScoreBoardEntry(value: score, round: round, player: player) } } } } func getTotalScore(player: Player) -> Int { var tmp: [Int] = [] for r in self.rounds { tmp.append(self.getScore(player: player, round: r)) } return tmp.reduce(0, +) } // Workaround because creating a new game instance is not allowed with ObservableObject and inside struct func reset(players: [Player]) { self.scoreBoard = [:] self.players = players self.playerCount = players.count for r in self.rounds { var tmp: [ScoreBoardEntry] = [] for p in self.players { tmp.append(ScoreBoardEntry(value: 0, round: r, player: p)) } self.scoreBoard[r] = tmp } } }
[ -1 ]
058f2f96131fd60bb01ba2f9660738f41beb7fb3
e18ed25c5673421ea1ed1c1799570ed4a578339e
/KeanuWatchTests/KeanuWatchTests.swift
c9fee580a67a7c0e34e40ac97324a849615b298c
[]
no_license
LucasCline/KeanuWatch
cf026fb9c58be35be3cdf1cf17cb1b0c3b686384
be30ffea71ff760bfdb5fe51b0ccea164ebcb241
refs/heads/master
2020-12-14T16:42:24.781378
2020-01-21T16:49:03
2020-01-21T16:49:03
234,810,406
0
0
null
null
null
null
UTF-8
Swift
false
false
530
swift
// // KeanuWatchTests.swift // KeanuWatchTests // // Created by Amanda Bloomer on 1/18/20. // Copyright © 2020 Lucas Cline. All rights reserved. // import XCTest @testable import KeanuWatch class KeanuWatchTests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. } }
[ 176461, 316063 ]
ab90ac4b3090e383fb84b8d346a37d5ebec21ccd
af26ef1627e675eaf9b9c2f5a9c11715948d6cd0
/YFMoreViewController/AppDelegate.swift
14f212def34cbae894ff379ee37a3d5b933e2e69
[ "MIT" ]
permissive
yeziahehe/YFMoreViewController
a6566d3727ebd888166c94f78231363e34240e35
01f73994458635d51e517b39181fa3639687865e
refs/heads/master
2021-01-02T09:07:09.603485
2019-03-15T02:11:57
2019-03-15T02:11:57
99,144,967
47
3
null
null
null
null
UTF-8
Swift
false
false
2,221
swift
// // AppDelegate.swift // YFMoreViewController // // Created by 叶帆 on 2017/8/3. // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 278539, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 278556, 229405, 278559, 229408, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 155872, 319716, 237807, 303345, 286962, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 286987, 319757, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 311719, 278952, 139689, 311728, 278967, 311741, 278975, 319938, 278983, 319945, 278986, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189040, 172660, 287349, 189044, 189039, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 287390, 303773, 172705, 287394, 172707, 303780, 164509, 287398, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 328381, 287423, 328384, 172737, 287427, 312006, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 287450, 303835, 279258, 189149, 303838, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 295707, 328476, 295710, 295720, 303914, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 303976, 336744, 303985, 303987, 328563, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 213895, 304009, 304011, 304013, 295822, 213902, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 304065, 189378, 213954, 156612, 197580, 312272, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 304164, 304170, 238641, 238652, 238655, 230465, 238658, 336964, 132165, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 164973, 205934, 279661, 312432, 279669, 337018, 66690, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 304354, 296163, 320740, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 230689, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 288160, 173472, 288162, 288164, 279975, 304555, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 148946, 239064, 329177, 288217, 288218, 280027, 288220, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 280260, 419525, 206536, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 321336, 296767, 288576, 345921, 304968, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 305028, 280454, 247688, 124817, 280468, 239510, 124827, 214940, 247709, 214944, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 124913, 165876, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 288909, 141455, 313498, 100520, 288936, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 280811, 280817, 125171, 280819, 157940, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 280919, 248153, 354653, 313700, 313705, 190832, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289221, 289227, 166378, 305647, 281075, 174580, 240124, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 223752, 150025, 338440, 223757, 281102, 223763, 223765, 322074, 281116, 182819, 281135, 150066, 158262, 158266, 289342, 322115, 158283, 281163, 338528, 338532, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 183184, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 183260, 289762, 322534, 297961, 183277, 322550, 322563, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 322642, 314456, 281691, 314461, 281704, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 216376, 380226, 298306, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 298365, 290174, 224641, 281987, 298372, 314756, 281990, 224647, 298377, 314763, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 150966, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 306694, 192008, 323084, 282127, 290321, 282130, 290325, 282133, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 224849, 282195, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 290445, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 298811, 118593, 307009, 413506, 307012, 241475, 298822, 315211, 307027, 315221, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 110438, 298860, 110445, 282478, 315249, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 241581, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 307211, 282639, 290835, 241693, 241701, 102438, 217127, 323630, 282681, 290877, 159811, 315463, 315466, 192589, 307278, 192596, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 184486, 307370, 307372, 307374, 307376, 299185, 323763, 184503, 176311, 307385, 307386, 258235, 307388, 176316, 307390, 299200, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 299225, 233701, 307432, 282881, 291089, 291104, 233766, 315701, 332086, 307510, 307515, 307518, 282942, 282947, 323917, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127434, 315856, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 127466, 176620, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127497, 233994, 135689, 127500, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 70213, 242250, 111193, 242275, 299620, 242279, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 201444, 299750, 234219, 283372, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 201496, 234264, 234266, 234269, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 316294, 226182, 234375, 308105, 226185, 234379, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 324504, 234396, 324508, 234398, 291742, 234401, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 291754, 226220, 324527, 234414, 234417, 201650, 324531, 291760, 234422, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 226239, 234437, 226245, 234439, 324548, 234443, 291788, 234446, 275406, 193486, 234449, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 275588, 234629, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 234648, 275608, 234650, 308379, 324757, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 300263, 300265, 300267, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 275725, 283917, 177424, 349451, 349464, 415009, 283951, 292143, 300344, 243003, 283963, 226628, 300357, 283973, 283983, 316758, 357722, 316766, 316768, 292192, 292197, 316774, 218473, 284010, 136562, 324978, 333178, 275840, 316803, 316806, 316811, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 144814, 227426, 144820, 374196, 284084, 292279, 144826, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 300527, 308720, 292338, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 284223, 284226, 284228, 243268, 226886, 284231, 128584, 292421, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 276052, 276053, 284249, 300638, 284251, 284253, 284258, 292452, 292454, 284263, 284265, 292458, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 276095, 284288, 292479, 284290, 325250, 284292, 292485, 276098, 292481, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 276122, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 284354, 358083, 284358, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 276268, 243504, 300850, 284469, 276280, 325436, 358206, 366406, 276295, 292681, 153417, 358224, 276308, 284502, 317271, 276315, 292700, 317279, 284511, 292715, 300912, 292721, 284529, 300915, 292729, 317306, 284540, 292734, 325512, 276365, 317332, 358292, 284564, 284566, 399252, 350106, 284572, 276386, 284579, 358312, 317353, 284585, 276395, 292784, 358326, 358330, 276411, 276418, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276452, 292839, 276455, 292843, 276460, 178161, 227314, 325624, 276472, 317435, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 350299, 350302, 194654, 350304, 178273, 309346, 227423, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 301163, 350313, 350316, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 252022, 350328, 292985, 301178, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 153765, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 309494, 243960, 227583, 276735, 227587, 276739, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 293227, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 113167, 309779, 317971, 309781, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 23094, 277054, 129603, 301636, 318020, 301639, 301643, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 309885, 309888, 277122, 277128, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 137889, 383658, 285357, 318128, 293555, 318132, 342707, 154292, 285368, 318144, 277187, 277201, 342745, 137946, 342747, 342749, 113378, 228069, 277223, 342760, 285417, 56043, 277232, 228081, 56059, 310015, 310020, 285448, 310029, 228113, 277273, 293659, 326430, 228128, 285474, 293666, 318248, 277291, 318253, 293677, 301876, 293685, 285494, 301880, 301884, 293696, 310080, 277317, 310100, 301911, 301913, 277337, 301921, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 342994, 293849, 293861, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 285686, 302073, 121850, 293882, 302075, 285690, 293887, 277504, 277507, 138246, 277511, 293899, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 310336, 293956, 277573, 228422, 293960, 310344, 277577, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 367737, 285817, 302205, 285821, 392326, 285831, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 294063, 302258, 277687, 294072, 318651, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 228601, 204026, 228606, 64768, 310531, 138505, 228617, 318742, 277798, 130345, 285999, 113969, 318773, 318776, 286010, 417086, 286016, 302403, 294211, 384328, 294221, 294223, 326991, 179547, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 351619, 294276, 310659, 327046, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 277932, 310703, 310710, 130486, 310712, 310715, 302526, 228799, 302534, 310727, 245191, 302541, 302543, 310737, 228825, 310749, 310755, 187880, 310764, 286188, 310772, 40440, 212472, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 245288, 310831, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 40557, 40560, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 278188, 319153, 278196, 302781, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 286425, 319194, 278235, 229086, 278238, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 294785, 327554, 360322, 40851, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 188340, 40886, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
e4035ec8d1049135adb71381c9cc063ca60b4137
10bc28d5c79cdc9153a7f19bc9de7c31a77b0c83
/LGTabbar/RootTabbarController.swift
87c89d57f568aa43a3af6c349575ba1b73bad560
[]
no_license
DreamingLuo/LGTabbar
fbbe9eb715210fddd595514be1e7deba119b0fbf
77d81eb60904feb255d9776f1398189a5e7e49db
refs/heads/master
2020-07-02T07:51:16.538511
2016-11-21T02:31:43
2016-11-21T02:31:43
74,317,206
0
0
null
null
null
null
UTF-8
Swift
false
false
1,745
swift
// // RootTabbarController.swift // LGTabbar // // Created by phiic on 16/11/21. // Copyright © 2016年 luogang. All rights reserved. // import UIKit class RootTabbarViewController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor=UIColor.orangeColor() addChildViewControllers() // Do any additional setup after loading the view, typically from a nib. } private func addChildViewControllers() { addChildViewController(FirstViewController(), title: "首页", imageName: "shouye.png", selectedImageName: "shouye1.png") addChildViewController(SecondViewController(), title: "部门", imageName: "luru.png", selectedImageName: "luru1.png") addChildViewController(ThirdViewController(), title: "图表", imageName: "tubiao.png", selectedImageName: "tubiao1.png") addChildViewController(FourthViewController(), title: "我的", imageName: "wode.png", selectedImageName: "wode.png") } func addChildViewController(childController: UIViewController, title: String, imageName: String, selectedImageName: String) { childController.tabBarItem.image = UIImage(named: imageName) childController.tabBarItem.selectedImage = UIImage(named: selectedImageName) childController.title = title let nav = UINavigationController(rootViewController: childController) addChildViewController(nav) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
7d702faa30ed7e7584152e21b0efa54edc5ca99e
2f05c76ce16c309e5dd70a669bd6b4e5ffecfa93
/SlideshowApp/SceneDelegate.swift
ea2a8be981038fcde26551d705bb911ccd3ddd14
[]
no_license
yusuke009/SlideshowApp
6e993fc0a8dd51532db6d0ef869561589957e891
9557b7158be1273c56eabb90243ee1b4bb1e9a44
refs/heads/master
2023-01-14T12:08:38.397162
2020-11-23T12:42:51
2020-11-23T12:42:51
314,571,675
0
0
null
null
null
null
UTF-8
Swift
false
false
2,355
swift
// // SceneDelegate.swift // SlideshowApp // // Created by 齋藤友祐 on 2020/11/17. // Copyright © 2020 yusuke.saito. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 344103, 393260, 393269, 213049, 376890, 385082, 16444, 393277, 376906, 327757, 254032, 286804, 368728, 254045, 368736, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 180432, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 336124, 385281, 336129, 262405, 180491, 164107, 336140, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 418145, 262497, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 98819, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 197160, 377384, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 254813, 361310, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 328690, 435188, 328703, 328710, 418822, 328715, 377867, 386070, 271382, 336922, 345119, 377888, 328747, 345134, 345139, 361525, 361537, 377931, 197708, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 337048, 345247, 361645, 337072, 345268, 337076, 402615, 361657, 402636, 328925, 165086, 165092, 222438, 328942, 386286, 386292, 206084, 115973, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 370208, 419360, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 419404, 353868, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 403139, 337607, 419528, 419531, 272083, 394967, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 362274, 378664, 354107, 345916, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 247639, 337751, 370520, 313181, 182110, 354143, 345965, 354157, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 247692, 395148, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 247760, 346064, 346069, 329699, 354275, 190440, 247790, 354314, 346140, 337980, 436290, 395340, 378956, 436307, 338005, 329816, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 256214, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 354728, 338353, 338363, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 387929, 330585, 355167, 265056, 265059, 355176, 355180, 330612, 330643, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 330750, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 331089, 437588, 396634, 175451, 437596, 429408, 175458, 208228, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 249215, 175487, 249219, 175491, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 339401, 380364, 339406, 372177, 339414, 413143, 249303, 339418, 339421, 249310, 249313, 339425, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 224923, 208539, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 257717, 224949, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 257791, 339711, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 356631, 356638, 356641, 356644, 356647, 266537, 356650, 389417, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 332118, 348503, 430422, 250203, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 340639, 258723, 332460, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 357212, 430940, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 340859, 324476, 430973, 119675, 340863, 324479, 324482, 324485, 324488, 381834, 185226, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 209904, 201712, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 250915, 250917, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 209996, 431180, 349268, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 160896, 349313, 152704, 210053, 210056, 349320, 373905, 259217, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 366173, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 267929, 333472, 333512, 259789, 358100, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333593, 333595, 210720, 358192, 366384, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 325494, 399222, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 334047, 350449, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 194942, 391564, 366991, 334224, 342431, 375209, 326059, 375220, 342453, 334263, 326087, 358857, 195041, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 244309, 334425, 326240, 375401, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342931, 252823, 400279, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 326599, 359367, 187335, 359383, 359389, 383968, 343018, 359411, 261109, 244728, 261112, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 384099, 384102, 384108, 367724, 326764, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 384189, 351424, 384192, 343232, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 261391, 359695, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 343399, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 359948, 359951, 359984, 400977, 400982, 179803, 155241, 138865, 155255, 155274, 368289, 245410, 245415, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
9fe785f4ed2ede4ed5bc852dcc2a426e87180034
4013abb08c9d373bdf2fd598b0b25ce374498dbd
/AdvancCleanMVCiOS/SceneDelegate.swift
05457acef7f26c5635f55747d97ec4a35155c295
[ "MIT" ]
permissive
devzahirul/advance_clean_mvc_iOS
ec35f47e39f1550c12a9c5a9a79aec518c81d785
fa89e0b52ff7e4f99fccd30b97f6e52eb01645d3
refs/heads/main_iOS13
2023-01-05T07:08:28.119862
2020-11-02T10:33:16
2020-11-02T10:33:16
305,247,487
1
2
MIT
2020-11-02T10:33:17
2020-10-19T02:59:27
Swift
UTF-8
Swift
false
false
2,790
swift
// // SceneDelegate.swift // AdvancCleanMVCiOS // // Created by Anamika Deb on 19/10/20. // Copyright © 2020 Anamika Deb. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? private lazy var launcRouter = LaunchRouter() func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let sceneWindow = (scene as? UIWindowScene) else { return } self.window = UIWindow.init(windowScene: sceneWindow) // self.window?.rootViewController = ViewController.create() self.window?.makeKeyAndVisible() //self.window?.rootViewController = ViewController.create() setupRouter() } private func setupRouter() { launcRouter.execute(context: window!, info: nil) } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 423424, 192640, 333440, 373635, 353674, 361490, 250003, 333851, 258333, 268702, 340639, 396706, 332455, 328747, 214060, 261166, 5040, 337330, 387250, 386102, 372665, 155323, 334012, 430275, 398280, 373450, 260299, 395340, 341072, 355029, 330966, 399318, 418135, 347106, 250211, 359650, 328933, 250217, 343018, 359660, 246124, 333423, 204785, 381815, 268669 ]
3b494f62604871caf907a8be5e967e1050677a5c
e07fc884004d5453f035dabd5902337f15ca1664
/Destini-iOS13/Model/StoryBrain.swift
d386a134f3956a5b800cba1b648b25a54532178e
[]
no_license
luiz-doreto/Destini
1d551d26c2a11a587fe207657deffa5028823e66
823d004e066e0c0feb4152517519422b031284b2
refs/heads/master
2023-01-24T06:47:47.529878
2020-11-20T01:23:36
2020-11-20T01:23:36
314,412,719
0
0
null
null
null
null
UTF-8
Swift
false
false
2,855
swift
// // StoryBrain.swift // Destini-iOS13 // // Created by Angela Yu on 08/08/2019. // Copyright © 2019 The App Brewery. All rights reserved. // import Foundation struct StoryBrain { let stories = [ Story( title: "Your car has blown a tire on a winding road in the middle of nowhere with no cell phone reception. You decide to hitchhike. A rusty pickup truck rumbles to a stop next to you. A man with a wide brimmed hat with soulless eyes opens the passenger door for you and asks: 'Need a ride, boy?'.", choice1: "I'll hop in. Thanks for the help!", choice1Destination: 2, choice2: "Better ask him if he's a murderer first.", choice2Destination: 1 ), Story( title: "He nods slowly, unfazed by the question.", choice1: "At least he's honest. I'll climb in.", choice1Destination: 2, choice2: "Wait, I know how to change a tire.", choice2Destination: 3 ), Story( title: "As you begin to drive, the stranger starts talking about his relationship with his mother. He gets angrier and angrier by the minute. He asks you to open the glovebox. Inside you find a bloody knife, two severed fingers, and a cassette tape of Elton John. He reaches for the glove box.", choice1: "I love Elton John! Hand him the cassette tape.", choice1Destination: 5, choice2: "It's him or me! You take the knife and stab him.", choice2Destination: 4 ), Story( title: "What? Such a cop out! Did you know traffic accidents are the second leading cause of accidental death for most adult age groups?", choice1: "The", choice1Destination: 0, choice2: "End", choice2Destination: 0 ), Story( title: "As you smash through the guardrail and careen towards the jagged rocks below you reflect on the dubious wisdom of stabbing someone while they are driving a car you are in.", choice1: "The", choice1Destination: 0, choice2: "End", choice2Destination: 0 ), Story( title: "You bond with the murderer while crooning verses of 'Can you feel the love tonight'. He drops you off at the next town. Before you go he asks you if you know any good places to dump bodies. You reply: 'Try the pier.'", choice1: "The", choice1Destination: 0, choice2: "End", choice2Destination: 0 ) ] var storyNumber = 0 mutating func nextStory(_ userChoice: String) { if userChoice == stories[storyNumber].choice1 { storyNumber = stories[storyNumber].choice1Destination } else { storyNumber = stories[storyNumber].choice2Destination } } func getCurrentStory() -> Story { return stories[storyNumber] } }
[ 181675, 358877, 352878, 249231 ]
f3423d27f3001bee069ecbec3e14cab574eac3ed
47555e35b5b53ec22134189373af4798b90bf9a0
/RealmLesson/TabBar/TabBarController.swift
84271a336cbe3f7de1b394341f11495c830d8b99
[]
no_license
romalatynia/lesson-26-Realm
8be20856fb84c966a76f489669efa850e2d5eb1b
55e43ab8b8639ea487d8b028fd8047dd6c43b130
refs/heads/main
2023-06-15T22:07:40.287242
2021-07-09T09:03:17
2021-07-09T09:03:17
384,381,013
0
0
null
null
null
null
UTF-8
Swift
false
false
862
swift
// // TabBarController.swift // RealmLesson // // Created by Roma Latynia on 4/14/21. // import UIKit class TabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() let user = UserViewController() user.tabBarItem = UITabBarItem(tabBarSystemItem: .contacts, tag: 0) let course = CourseTable() course.tabBarItem = UITabBarItem(tabBarSystemItem: .bookmarks, tag: 1) let teacher = TeacherTableVC() teacher.tabBarItem = UITabBarItem(tabBarSystemItem: .more, tag: 2) let defaultControllers: [UIViewController] = [user, course, teacher] let navControllers = defaultControllers.map { UINavigationController(rootViewController: $0) } setViewControllers(navControllers, animated: true) } }
[ -1 ]
ac5c2a5816cd530239f2a51c18aae081f0879221
4e7367bea5ecf593d429469c2d5d5cf88730a53f
/Sources/ProjectDescription/Target.swift
a50cb4833370d20622271bd0f475bf77aade0fcc
[ "MIT" ]
permissive
cconstable/tuist
72c4caee6d01682cc03faadf9fa32339cea676f7
c5984f51f1ad1ea5c52a53c2f803994923c9f43f
refs/heads/main
2023-08-24T07:42:19.363517
2021-10-28T17:44:19
2021-10-28T17:44:19
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,682
swift
import Foundation // MARK: - Target public struct Target: Codable, Equatable { /// Target name. public let name: String /// Product platform. public let platform: Platform /// Product type. public let product: Product /// Bundle identifier. public let bundleId: String /// The name of the product output by this target. /// passing nil in the initialiser will default /// this value to the name of the target. public let productName: String? /// Deployment target. public let deploymentTarget: DeploymentTarget? /// Relative path to the Info.plist file. public let infoPlist: InfoPlist /// Relative path to the entitlements file. public let entitlements: Path? /// Target settings. public let settings: Settings? /// Target dependencies. public let dependencies: [TargetDependency] /// Relative paths to the sources directory. public let sources: SourceFilesList? /// Relative paths to the resources directory. public let resources: ResourceFileElements? /// Copy files actions. public let copyFiles: [CopyFilesAction]? /// Headers. public let headers: Headers? /// Target scripts. public let scripts: [TargetScript] /// CoreData models. public let coreDataModels: [CoreDataModel] /// Environment variables to be exposed to the target. public let environment: [String: String] /// Launch argument to be exposed to the target. public let launchArguments: [LaunchArgument] /// The additional files to include in the target (won't be included in a build phase) public let additionalFiles: [FileElement] public enum CodingKeys: String, CodingKey { case name case platform case product case productName = "product_name" case bundleId = "bundle_id" case infoPlist = "info_plist" case entitlements case settings case dependencies case sources case resources case copyFiles case headers case coreDataModels = "core_data_models" case scripts case environment case launchArguments case deploymentTarget case additionalFiles } /// Initializes the target. /// /// - Parameters: /// - name: target name. /// - platform: product platform. /// - product: product type. /// - bundleId: bundle identifier. /// - infoPlist: relative path to the Info.plist file. /// - sources: relative paths to the sources directory. /// - resources: relative paths to the resources directory. /// - copyFiles: copy files phases. /// - headers: headers. /// - entitlements: relative path to the entitlements file. /// - scripts: target scripts. /// - dependencies: target dependencies. /// - settings: target settings. /// - coreDataModels: CoreData models. /// - environment: Environment variables to be exposed to the target. /// - launchArguments: Launch arguments that are passwd to target. /// - additionalFiles: The additional files to include in the target (won't be included in a build phase). public init( name: String, platform: Platform, product: Product, productName: String? = nil, bundleId: String, deploymentTarget: DeploymentTarget? = nil, infoPlist: InfoPlist, sources: SourceFilesList? = nil, resources: ResourceFileElements? = nil, copyFiles: [CopyFilesAction]? = nil, headers: Headers? = nil, entitlements: Path? = nil, scripts: [TargetScript] = [], dependencies: [TargetDependency] = [], settings: Settings? = nil, coreDataModels: [CoreDataModel] = [], environment: [String: String] = [:], launchArguments: [LaunchArgument] = [], additionalFiles: [FileElement] = [] ) { self.name = name self.platform = platform self.bundleId = bundleId self.productName = productName self.product = product self.infoPlist = infoPlist self.entitlements = entitlements self.dependencies = dependencies self.settings = settings self.sources = sources self.resources = resources self.copyFiles = copyFiles self.headers = headers self.scripts = scripts self.coreDataModels = coreDataModels self.environment = environment self.launchArguments = launchArguments self.deploymentTarget = deploymentTarget self.additionalFiles = additionalFiles } }
[ -1 ]
20c8ea7fda1fb785461937d806cbf531550f27bd
a33a614b9ddc3bb487a621e5458eb45e6ba22495
/Swift Basics/SwiftSyntax_L1/Lesson1_Constants&Variables.playground/Contents.swift
b759c5b0d1e4576b4ea431ffbc126888bad37afe
[]
no_license
bradd123/ios-apps
3c52230243402c6800df53340f558a686ca8fa4c
2de797931c61f544137215cf94bf12c3ccc30fa3
refs/heads/master
2021-01-13T08:51:44.336928
2016-12-01T05:28:13
2016-12-01T05:28:13
71,906,067
1
0
null
null
null
null
UTF-8
Swift
false
false
1,032
swift
//: # Constants and Variables import UIKit //: ### Example 1 //: ### Use let when you know the value will stay constant let encouragement = "You can do it!" //: ### Use var when you expect the value to change var personalizedEncouragement = "You can do it, Lauren!" personalizedEncouragement = personalizedEncouragement.stringByReplacingOccurrencesOfString("Lauren", withString: "Cameron") //: ### Example 2a let birthYear = 2008 var currentYear = 2015 var age = currentYear - birthYear //: ### Example 2b - What if age only needs to be calculated once? //: ### Example 3 let birthweight = "6 lbs 7 ounces" var currentWeight = "22lbs" var chubbyBaby = UIImage(named:"chubby-baby-picture.jpg")! //: ### Two ways of being immutable - #1 Assignment var goat = UIImage(named:"Chinese-New-Year-3.jpg")! let yearsOfTheGoat = [1967, 1979, 1991, 2003, 2015] let yearsOfTheSheep = [1967, 1979, 1991, 2003, 2015] //yearsOfTheGoat = yearsOfTheSheep //: ### Two ways of being immutable - #2 Value alteration //yearsOfTheGoat.append(2027)
[ -1 ]
6d254b334dbcaf8692a3e1f35a144f14a915a093
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/ios/chrome/widget_kit_extension/dino_game_widget.swift
3c50de7be730c97516df4e3c2038d201445847c2
[ "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
Swift
false
false
2,337
swift
// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import Foundation import SwiftUI import WidgetKit struct DinoGameWidget: Widget { // Changing |kind| or deleting this widget will cause all installed instances of this widget to // stop updating and show the placeholder state. let kind: String = "DinoGameWidget" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, provider: Provider()) { entry in DinoGameWidgetEntryView(entry: entry) } .configurationDisplayName( Text("IDS_IOS_WIDGET_KIT_EXTENSION_GAME_DISPLAY_NAME") ) .description(Text("IDS_IOS_WIDGET_KIT_EXTENSION_GAME_DESCRIPTION")) .supportedFamilies([.systemSmall]) .crDisfavoredLocations() .crContentMarginsDisabled() .crContainerBackgroundRemovable(false) } } struct DinoGameWidgetEntryView: View { let background = "widget_dino_background" let backgroundPlaceholder = "widget_dino_background_placeholder" var entry: Provider.Entry @Environment(\.redactionReasons) var redactionReasons var body: some View { // We wrap this widget in a link on top of using `widgetUrl` so that the voice over will treat // the widget as one tap target. Without the wrapping, voice over treats the content within // the widget as multiple tap targets. Link(destination: WidgetConstants.DinoGameWidget.url) { ZStack { Image(redactionReasons.isEmpty ? background : backgroundPlaceholder) .resizable() .unredacted() VStack(alignment: .leading, spacing: 0) { Spacer() .frame(minWidth: 0, maxWidth: .infinity) HStack { Text("IDS_IOS_WIDGET_KIT_EXTENSION_GAME_TITLE") .foregroundColor(Color("widget_text_color")) .fontWeight(.semibold) .font(.subheadline) .lineLimit(1) Spacer() } .padding([.leading, .bottom], 16) } } } .widgetURL(WidgetConstants.DinoGameWidget.url) .accessibility( label: Text("IDS_IOS_WIDGET_KIT_EXTENSION_GAME_A11Y_LABEL") ) // Background is not used as the image takes the whole widget. .crContainerBackground(Color("widget_background_color").unredacted()) } }
[ -1 ]
8a160f0161c5e8421202b04e45a5ac62c3fa261f
a361437f7542474669e16cb85746e8ce68ac459c
/ARDemo/WordTrackingViewController.swift
2f7a6e5f7082dd5adba08644b5579d9a6414c8de
[]
no_license
KKFantasy/ARDemo
2c203ee658b4a3c098798357f79640d2ccabd105
3d0891b0d22023434e16ebcbb991e58eec740aae
refs/heads/master
2020-05-16T03:06:52.891697
2019-05-06T08:04:52
2019-05-06T08:04:52
182,653,211
0
0
null
null
null
null
UTF-8
Swift
false
false
4,719
swift
// // ViewController.swift // ARDemo // // Created by KKFantasy on 2019/4/19. // Copyright © 2019 kk. All rights reserved. // import ARKit import SceneKit import UIKit // 基本的AR效果,快照 class WordTrackingViewController: UIViewController, ARSCNViewDelegate { var sceneView: ARSCNView! var snapshots = [SCNNode]() override func viewDidLoad() { super.viewDidLoad() sceneView = ARSCNView(frame: view.bounds) view.addSubview(sceneView) // Set the view's delegate sceneView.delegate = self // Show statistics such as fps and timing information sceneView.showsStatistics = true // Create a new scene let scene = SCNScene(named: "art.scnassets/ship.scn")! // Set the scene to the view sceneView.scene = scene // 添加点击事件 let clearItem = UIBarButtonItem(title: "Clear", style: .plain, target: self, action: #selector(clear(_:))) let captureItem = UIBarButtonItem(title: "Capture", style: .plain, target: self, action: #selector(capture)) navigationItem.rightBarButtonItems = [clearItem, captureItem] } // 点击屏幕 @objc func capture() { // 截图并创建平面 let imagePlane = SCNPlane(width: sceneView.bounds.width / 6000, height: sceneView.bounds.height / 6000) imagePlane.firstMaterial?.diffuse.contents = sceneView.snapshot() imagePlane.firstMaterial?.lightingModel = .constant // 创建plane node并添加到场景 let planeNode = SCNNode(geometry: imagePlane) sceneView.scene.rootNode.addChildNode(planeNode) snapshots.append(planeNode) // 改变其在空间的位置为摄像头的位置 let currentFrame = sceneView.session.currentFrame if let transform = currentFrame?.camera.transform { var translation = matrix_identity_float4x4 updateTranslationMatrix(&translation) planeNode.simdTransform = matrix_multiply(transform, translation) } } func updateTranslationMatrix(_ translation: inout simd_float4x4) { switch UIDevice.current.orientation{ case .portrait, .portraitUpsideDown, .unknown, .faceDown, .faceUp: print("portrait ") translation.columns.0.x = -cos(.pi/2) translation.columns.0.y = sin(.pi/2) translation.columns.1.x = -sin(.pi/2) translation.columns.1.y = -cos(.pi/2) case .landscapeLeft : print("landscape left") translation.columns.0.x = 1 translation.columns.0.y = 0 translation.columns.1.x = 0 translation.columns.1.y = 1 case .landscapeRight : print("landscape right") translation.columns.0.x = cos(.pi) translation.columns.0.y = -sin(.pi) translation.columns.1.x = sin(.pi) translation.columns.1.y = cos(.pi) default: break } translation.columns.3.z = -0.15 //60cm in front of the camera } @objc func clear(_ sender: UIBarButtonItem) { // sceneView.scene.rootNode.enumerateChildNodes({ node, _ in // node.removeFromParentNode() // }) snapshots.forEach({$0.removeFromParentNode()}) snapshots.removeAll() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) // Create a session configuration let configuration = ARWorldTrackingConfiguration() // Run the view's session sceneView.session.run(configuration) } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) // Pause the view's session sceneView.session.pause() } // MARK: - ARSCNViewDelegate /* // Override to create and configure nodes for anchors added to the view's session. func renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? { let node = SCNNode() return node } */ func session(_ session: ARSession, didFailWithError error: Error) { // Present an error message to the user } func sessionWasInterrupted(_ session: ARSession) { // Inform the user that the session has been interrupted, for example, by presenting an overlay } func sessionInterruptionEnded(_ session: ARSession) { // Reset tracking and/or remove existing anchors if consistent tracking is required } }
[ -1 ]
9b6e65b9c058ef14de05acb1ee26ea6f1d5585bd
3d786cfa7bcc87c0120bf31d0643321931e40f19
/Clima/WeatherViewController.swift
8d514f26ee37d63ae6926516316d0e6ace4f9810
[]
no_license
GrantGaurav/Clima
839775bb44226a02b693ae814995ab4e5e8fb948
840f1e58279ba9ad809b412649475bcf915345c5
refs/heads/master
2020-04-07T04:57:55.013347
2018-03-07T05:23:20
2018-03-07T05:23:20
124,183,451
0
0
null
null
null
null
UTF-8
Swift
false
false
4,792
swift
// // ViewController.swift // WeatherApp // // Created by Angela Yu on 23/08/2015. // Copyright (c) 2015 London App Brewery. All rights reserved. // import UIKit import CoreLocation import Alamofire import SwiftyJSON class WeatherViewController: UIViewController, CLLocationManagerDelegate, ChangeCityDelegate { //Constants let WEATHER_URL = "http://api.openweathermap.org/data/2.5/weather" let APP_ID = "28361b4065a80f8e20f2a9d7d525440b" //TODO: Declare instance variables here let locationManager = CLLocationManager() let weatherDataModel = WeatherDataModel() //Pre-linked IBOutlets @IBOutlet weak var weatherIcon: UIImageView! @IBOutlet weak var cityLabel: UILabel! @IBOutlet weak var temperatureLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() //TODO:Set up the location manager here. locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters locationManager.requestWhenInUseAuthorization() locationManager.startUpdatingLocation() } //MARK: - Networking /***************************************************************/ //Write the getWeatherData method here: func getWeatherData(url: String, parameters: [String : String]) { Alamofire.request(url, method: .get, parameters: parameters).responseJSON { (response) in if response.result.isSuccess { print("Success! Got the weather data") let weatherData : JSON = JSON(response.result.value!) self.updateWeatherData(json: weatherData) } else { print("Error \(response.result.error!)") self.cityLabel.text = "Connection Issues" } } } //MARK: - JSON Parsing /***************************************************************/ //Write the updateWeatherData method here: func updateWeatherData(json: JSON) { if let tempResult = json["main"]["temp"].double { weatherDataModel.temperature = Int(tempResult - 273.15) weatherDataModel.city = json["name"].stringValue weatherDataModel.condition = json["weather"][0]["id"].intValue weatherDataModel.weatherIconName = weatherDataModel.updateWeatherIcon(condition: weatherDataModel.condition) updateUIWithWeatherData() } else { cityLabel.text = "Weather Unavailable" } } //MARK: - UI Updates /***************************************************************/ //Write the updateUIWithWeatherData method here: func updateUIWithWeatherData() { temperatureLabel.text = "\(weatherDataModel.temperature)°" cityLabel.text = weatherDataModel.city weatherIcon.image = UIImage(named: weatherDataModel.weatherIconName) } //MARK: - Location Manager Delegate Methods /***************************************************************/ //Write the didUpdateLocations method here: func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { let location = locations[locations.count-1] if location.horizontalAccuracy > 0 { locationManager.stopUpdatingLocation() locationManager.delegate = nil print("longitude = \(location.coordinate.longitude), latitude = \(location.coordinate.latitude)") let longitude = String(location.coordinate.longitude) let latitude = String(location.coordinate.latitude) let param : [String : String] = ["lat" : latitude, "lon" : longitude, "appid" : APP_ID] getWeatherData(url: WEATHER_URL, parameters: param) } } //Write the didFailWithError method here: func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { print("Error") cityLabel.text = "Location Unavailable" } //MARK: - Change City Delegate methods /***************************************************************/ //Write the userEnteredANewCityName Delegate method here: func userEnteredANewCityName(city: String) { let params : [String : String] = ["q" : city, "appid" : APP_ID] getWeatherData(url: WEATHER_URL, parameters: params) } //Write the PrepareForSegue Method here override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "changeCityName" { let destinationVC = segue.destination as! ChangeCityViewController destinationVC.delegate = self } } }
[ -1 ]
91d7af1a8b965f2c8c7370c689f7e6879447f6e6
a149c50aebc4766931380bd0f36389ef9f2a1ad1
/VCRibbonView/AppDelegate.swift
1c573437e047826bd1fc5bc8d7c94fadc32384bb
[]
no_license
vicino/VCRibbonView
ba2b40c8632cbb3c9a4fd5a41feebd8461e1378f
821b1c64b821b309bf7aec5418a011ff35e5d69a
refs/heads/master
2021-01-10T02:11:21.345182
2015-12-22T08:57:22
2015-12-22T08:57:22
48,405,729
0
0
null
null
null
null
UTF-8
Swift
false
false
2,105
swift
// // AppDelegate.swift // VCRibbonView // // Created by Craig Barreras on 12/21/15. // Copyright © 2015 Vicino. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 278564, 294950, 229415, 229417, 237613, 229422, 229426, 237618, 229428, 286774, 204856, 229432, 286776, 319544, 286791, 237640, 278605, 237646, 311375, 163920, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 327814, 131209, 417930, 303241, 311436, 319633, 286873, 286876, 311460, 32944, 327862, 286906, 180413, 286910, 131264, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 131314, 286962, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 287003, 287006, 287009, 287012, 287014, 287019, 311598, 262448, 287032, 155966, 278849, 319809, 319810, 319814, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 65943, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 279003, 279006, 172512, 279010, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 320007, 172550, 172552, 303623, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 311911, 189034, 295533, 189039, 189040, 172655, 172656, 352880, 189044, 295538, 172660, 287349, 287355, 287360, 295553, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 287377, 311957, 221850, 287386, 303773, 164509, 287390, 295583, 172702, 230045, 172705, 303780, 287394, 172707, 287398, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 287427, 312006, 107212, 172748, 287436, 172751, 295633, 172755, 303827, 279255, 172760, 279258, 287450, 213724, 189149, 303835, 303838, 279267, 312035, 295654, 279272, 312048, 312050, 230131, 205564, 295685, 230154, 33548, 312077, 295695, 369433, 295707, 328476, 295710, 303914, 279340, 205613, 279353, 230202, 222018, 295755, 377676, 287569, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304009, 304007, 304011, 230284, 304013, 213902, 279438, 295822, 189329, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 197564, 304063, 238528, 295873, 189378, 213954, 304065, 213963, 279505, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 312321, 295945, 197645, 295949, 230413, 140312, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 230465, 238658, 296004, 336964, 205895, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 164973, 205934, 279661, 279669, 337018, 279679, 279683, 222340, 296084, 238745, 304285, 238756, 205991, 165035, 337067, 165038, 238766, 304311, 230592, 279750, 230600, 230607, 148690, 279769, 304348, 279777, 304354, 296163, 279781, 304360, 279788, 320748, 279790, 320771, 312585, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 173350, 312622, 296243, 312630, 222522, 222525, 230718, 296255, 378181, 230727, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 230773, 279929, 181626, 304505, 304506, 181631, 312711, 288140, 230800, 288144, 304533, 288154, 337306, 288160, 288162, 279975, 304555, 370092, 279983, 173488, 279985, 312755, 296373, 279991, 337335, 312759, 173507, 296389, 222665, 230860, 280014, 230865, 288210, 370130, 288212, 280021, 288214, 148946, 239064, 288217, 288218, 280027, 288220, 222676, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 296446, 206336, 321022, 296450, 402942, 230916, 214535, 230919, 370187, 304651, 222752, 108066, 296488, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 280158, 181854, 370272, 403039, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 321200, 296626, 296634, 280260, 280264, 280276, 313044, 321239, 280283, 288478, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 345921, 280388, 304968, 280393, 280402, 313176, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 280473, 124827, 214940, 247709, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 288764, 239612, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 313386, 354348, 124978, 215090, 124980, 288826, 313406, 288831, 67654, 280651, 354382, 288848, 280658, 354390, 288855, 280669, 313438, 280671, 223327, 321634, 149603, 329830, 280681, 313451, 223341, 280687, 215154, 280691, 313458, 313464, 321659, 280702, 288895, 141446, 215175, 321670, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 280783, 280786, 280788, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 321842, 223539, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 280940, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 240017, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 305668, 281095, 223752, 338440, 150025, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 281190, 281196, 19053, 158317, 313973, 281210, 297594, 158347, 133776, 117398, 314007, 289436, 174754, 330404, 174764, 240309, 133817, 314045, 314047, 199364, 199367, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322318, 281361, 281372, 322341, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 240535, 289687, 289694, 289696, 289724, 52163, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 289991, 306377, 249045, 290008, 363745, 298216, 126190, 216303, 322801, 257302, 363802, 199976, 199978, 298292, 257334, 298306, 281923, 224584, 224587, 224594, 216404, 150870, 224603, 159068, 265568, 281960, 306539, 290161, 216436, 306549, 298358, 306552, 290171, 298365, 290174, 224641, 281987, 265604, 298372, 281990, 298377, 142733, 298381, 224657, 306581, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 339431, 282089, 191985, 282098, 290291, 282101, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 282402, 315174, 282410, 241450, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 307009, 241475, 307012, 315211, 282446, 315221, 282454, 323414, 315223, 241496, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 44948, 241556, 298901, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 241640, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299006, 282623, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 192605, 233567, 200801, 217188, 299109, 307303, 45163, 307307, 315502, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 307352, 299164, 184479, 184481, 315557, 184486, 307370, 184492, 307372, 307374, 307376, 176311, 184503, 307386, 258235, 176316, 307388, 307390, 184512, 307394, 299204, 184518, 323784, 307409, 176343, 299225, 233701, 184572, 282881, 184579, 282893, 291089, 282906, 233766, 282931, 176435, 168245, 307510, 315701, 151864, 307512, 332086, 307515, 282942, 307518, 151874, 282947, 282957, 110926, 323917, 233808, 323921, 315733, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 299388, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 283062, 291254, 127417, 291260, 283069, 127421, 127429, 283080, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 242152, 291305, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 234003, 234006, 283161, 234010, 135707, 242206, 135710, 291361, 242220, 291378, 152118, 234038, 70213, 111193, 242275, 299620, 168562, 184952, 135805, 291456, 135808, 299655, 373383, 316051, 225941, 316054, 299672, 135834, 225948, 299677, 373404, 135839, 299680, 225954, 299684, 242343, 209576, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 381677, 226037, 283382, 234231, 234236, 226045, 234239, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 242450, 234258, 242452, 234261, 201496, 283421, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 234313, 316235, 283468, 234316, 234319, 242511, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 234393, 308123, 234396, 324508, 234398, 291742, 234401, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 291754, 226220, 291756, 234414, 291760, 234417, 201650, 226230, 234422, 275384, 234428, 291773, 226239, 234431, 242623, 234434, 324548, 226245, 234437, 234439, 234443, 291788, 193486, 275406, 193488, 234446, 234449, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 234481, 234484, 234485, 234487, 234490, 234493, 234496, 316416, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 234520, 316439, 234523, 234528, 300066, 234532, 234535, 234537, 234540, 144430, 234543, 275508, 234549, 300085, 300088, 234556, 234558, 316479, 234561, 234563, 316483, 234568, 234570, 316491, 234572, 300108, 300115, 234580, 234581, 234585, 242777, 275545, 234590, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 234614, 398455, 234618, 144506, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 275594, 234634, 234636, 234640, 275602, 234643, 226453, 324757, 275606, 275608, 234647, 234648, 234650, 308373, 283805, 234653, 308379, 119967, 234657, 300189, 324766, 242852, 283813, 234661, 300197, 234664, 275626, 316596, 234687, 316610, 300226, 226500, 283844, 234692, 300229, 308420, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 300284, 275710, 300287, 283904, 300289, 300292, 300294, 275719, 177419, 300299, 283917, 242957, 275725, 177424, 349464, 283939, 259367, 283951, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 316768, 292197, 243046, 316774, 218473, 284010, 136562, 275834, 333178, 275836, 275840, 316806, 226696, 226699, 316811, 226703, 300433, 234899, 226709, 357783, 316826, 144796, 300448, 144810, 144812, 144814, 284084, 144820, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 292329, 300523, 259565, 259567, 300527, 226802, 316917, 308727, 300537, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284206, 284209, 284211, 194101, 284213, 194103, 284215, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 284245, 284247, 317015, 235097, 243290, 284251, 284249, 284253, 243293, 284255, 300638, 284258, 292452, 177766, 284263, 292454, 284265, 292458, 284267, 292461, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 292479, 284288, 276098, 284290, 284292, 292485, 325250, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 276187, 284379, 284381, 284384, 284386, 358116, 276197, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317191, 284428, 300816, 317207, 284440, 186139, 300828, 300830, 276255, 300832, 284449, 300834, 227109, 317221, 186151, 358183, 276268, 194351, 243504, 284469, 276280, 325436, 358206, 276291, 284484, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 178006, 317271, 276315, 292700, 284511, 227175, 292715, 284529, 292721, 300915, 284533, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 292776, 284585, 358312, 276395, 276402, 161718, 358326, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 301015, 358360, 301017, 292828, 276446, 153568, 276448, 276452, 276455, 292843, 276460, 276464, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 325692, 178238, 276544, 284739, 276553, 194649, 227418, 309337, 194654, 227423, 178273, 227426, 276579, 194660, 227430, 276583, 292968, 309352, 276586, 301163, 309354, 276590, 227440, 284786, 276595, 292985, 301178, 292989, 292993, 301185, 301199, 350354, 350359, 276638, 284837, 153765, 227520, 227522, 301252, 227529, 301258, 276685, 276689, 227540, 301272, 276699, 194780, 309468, 301283, 317672, 276713, 243948, 194801, 227571, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 276775, 211241, 325937, 276789, 325943, 260421, 276809, 285002, 276811, 276816, 235858, 276829, 276833, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 178575, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 285098, 276907, 276917, 293304, 293314, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 317951, 309764, 121352, 236043, 317963, 342541, 55822, 113167, 317971, 309781, 55837, 227877, 227879, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 277071, 285265, 277080, 309849, 285277, 285282, 326244, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 326430, 228128, 228135, 318248, 277291, 318253, 285489, 293685, 285494, 285499, 301884, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 277368, 15224, 236408, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293877, 285686, 302073, 285690, 244731, 121850, 293882, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 277526, 293917, 293939, 318516, 277561, 277564, 7232, 310336, 293956, 277573, 228422, 310344, 293960, 277577, 277583, 203857, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 277608, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 285831, 302218, 285835, 294026, 162964, 384148, 187542, 302231, 302233, 285852, 302237, 285854, 285862, 277671, 302248, 64682, 277678, 228526, 294063, 294065, 302258, 277687, 294072, 318651, 277695, 318657, 302275, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 204023, 228601, 204026, 228606, 204031, 64768, 310531, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 277807, 285999, 113969, 277811, 318773, 277816, 318776, 286010, 277819, 294204, 277822, 417086, 286016, 294211, 302403, 277832, 277836, 277839, 326991, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 277864, 310632, 327017, 351594, 277869, 277872, 351607, 277880, 310648, 310651, 277884, 277888, 310657, 310659, 277892, 294276, 277894, 327046, 253320, 310665, 277898, 318858, 351619, 277903, 310672, 277905, 351633, 277908, 277917, 277921, 310689, 130468, 277928, 277932, 310703, 277937, 130486, 310710, 277944, 310712, 277947, 310715, 277950, 277953, 64966, 245191, 163272, 277959, 302534, 310727, 277963, 277966, 302543, 277971, 286169, 228825, 163290, 277978, 277981, 310749, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 286248, 278057, 40488, 294439, 40491, 294440, 294443, 294445, 310831, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 228944, 212560, 400976, 40533, 147032, 40537, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40552, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 278150, 310925, 286354, 278163, 302740, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 319171, 302789, 294599, 278216, 294601, 278227, 229076, 319187, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 278274, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 294682, 278306, 294701, 278320, 319280, 319290, 229192, 302925, 237409, 360317, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 294817, 40865, 319394, 294821, 180142, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 278519, 237562 ]
c63218bf6d6e46761b4e668f861dcf176388b281
3ed499fe8a0998d16843451e55d2414b0386dddc
/v2.0/test2/popupViewController.swift
587b611e2d1a182fef7ac327b234a1146227b723
[]
no_license
lundergust/nbapp
c7ec91510b561358172eea6f280b2d926be6f3c9
4005a0c18ebb09dc14113baf0add8a1caa796c8e
refs/heads/master
2020-04-21T00:46:22.589498
2020-02-01T19:39:58
2020-02-01T19:39:58
169,206,152
0
0
null
null
null
null
UTF-8
Swift
false
false
6,582
swift
// // popupViewController.swift // test2 // // Created by lundergust on 10/27/19. // Copyright © 2019 lundergust. All rights reserved. // import UIKit var myarray = [String]() var numberOfPlayers: Int = 0 var playerArray = [String]() var minArray = [String]() var fgArray = [String]() var tpArray = [String]() var ptsArray = [String]() var rebArray = [String]() var astArray = [String]() var thisBoxscore = Boxscore.init(basicGameData: GameInfo(gameID: "", isGameActivated: false, startTimeEastern: "", clock: "", nugget: NuggetObject(text: ""), period: periodObject(current: 0, isHalftime: false), vTeam: vTeamObject(win: "", loss: "", triCode: "", score: "", linescore: [linescoreObject(score: "")]), hTeam: hTeamObject(win: "", loss: "", triCode: "", score: "", linescore: [linescoreObject(score: "")])), stats: statsObject(vTeamStats: vTeamStatsObject(fastBreakPoints: "", pointsInPaint: "", biggestLead: "", secondChancePoints: "", pointsOffTurnovers: "", longestRun: "", totals: vTotalObject(points: "", fgm: "", fga: "", fgp: "", ftm: "", fta: "", ftp: "", tpm: "", tpa: "", tpp: "", offReb: "", defReb: "", totReb: "", assists: "", pFouls: "", steals: "", turnovers: "", blocks: ""), leaders: vLeadersObject(points: vPointLeader(value: "", players: [vPointLeaderPlayers(firstName: "", lastName: "")]), rebounds: vReboundLeader(value: "", players: [vReboundLeaderPlayers(firstName: "", lastName: "")]), assists: vAssistLeader(value: "", players: [vAssistLeaderPlayers(firstName: "", lastName: "")]))), hTeamStats: hTeamStatsObject(fastBreakPoints: "", pointsInPaint: "", biggestLead: "", secondChancePoints: "", pointsOffTurnovers: "", longestRun: "", totals: hTotalObject(points: "", fgm: "", fga: "", fgp: "", ftm: "", fta: "", ftp: "", tpm: "", tpa: "", tpp: "", offReb: "", defReb: "", totReb: "", assists: "", pFouls: "", steals: "", turnovers: "", blocks: ""), leaders: hLeadersObject(points: hPointLeader(value: "", players: [hPointLeaderPlayers(firstName: "", lastName: "")]), rebounds: hReboundLeader(value: "", players: [hReboundLeaderPlayers(firstName: "", lastName: "")]), assists: hAssistLeader(value: "", players: [hAssistLeaderPlayers(firstName: "", lastName: "")]))), activePlayers: [activePlayersObject(firstName: "", lastName: "", jersey: "", teamId: "", isOnCourt: false, points: "", pos: "", min: "", fgm: "", fga: "", fgp: "", ftm: "", fta: "", ftp: "", tpm: "", tpa: "", tpp: "", offReb: "", defReb: "", totReb: "", assists: "", pFouls: "", steals: "", turnovers: "", blocks: "", plusMinus: "", dnp: "")])) class popupViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var boxTableView: UITableView! func tableRefresher() { playerArray.removeAll() minArray.removeAll() fgArray.removeAll() tpArray.removeAll() ptsArray.removeAll() rebArray.removeAll() astArray.removeAll() boxTableView.reloadData() } @IBAction func popupaction(_ sender: Any) { self.removeAnimate() } func showAnimate() { tableRefresher() self.view.transform = CGAffineTransform(scaleX: 1.3,y: 1.3) self.view.alpha = 0.0; UIView.animate(withDuration: 0.25, animations: { self.view.alpha = 1.0 self.view.transform = CGAffineTransform(scaleX: 1.0, y:1.0) }); } func removeAnimate() { UIView.animate(withDuration: 0.25, animations: { self.view.transform = CGAffineTransform(scaleX: 1.3,y:1.3) self.view.alpha = 0.0; }, completion: {(finished: Bool ) in if (finished) {self.view.removeFromSuperview()} }) } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // erase array info fetchBoxscore3(tag: senderTag) { thisBoxscore, error in numberOfPlayers = thisBoxscore!.stats.activePlayers.count for item in (thisBoxscore!.stats.activePlayers) { let playerName = String(item.firstName) + " " + String(item.lastName) if item.min == "" { if item.dnp != "" { let playerMin = String(item.dnp) minArray.append(playerMin) } else { let playerMin = "" minArray.append(playerMin) } } else { let playerMin = String(item.min) minArray.append(playerMin) } if item.fga == "" { let playerFG = "" fgArray.append(playerFG) } else { let playerFG = String(item.fgm) + "-" + String(item.fga) fgArray.append(playerFG) } if item.tpa == "" { let player3PT = "" tpArray.append(player3PT) } else { let player3PT = String(item.tpm) + "-" + String(item.tpa) tpArray.append(player3PT) } let playerPTS = String(item.points) let playerREB = String(item.totReb) let playerAST = String(item.assists) playerArray.append(playerName) ptsArray.append(playerPTS) rebArray.append(playerREB) astArray.append(playerAST) // print(playerArray) } } while playerArray.count == 0 { let seconds = 0.5 DispatchQueue.main.asyncAfter(deadline: .now() + seconds) { } } return numberOfPlayers } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "custom", for: indexPath) as! boxTableViewCell //set the data here cell.playerLabel?.text = playerArray[indexPath.row] cell.minLabel?.text = minArray[indexPath.row] cell.fgLabel?.text = fgArray[indexPath.row] cell.tpLabel?.text = tpArray[indexPath.row] cell.ptsLabel?.text = ptsArray[indexPath.row] cell.rebLabel?.text = rebArray[indexPath.row] cell.astLabel?.text = astArray[indexPath.row] return cell } override func viewDidLoad() { super.viewDidLoad() self.showAnimate() // Do any additional setup after loading the view. } }
[ -1 ]
659fd7ab6ae57929bc7638f2fb997f148bcd1d6e
1b24a909623604e799af92c5aceffaf4ecd3f85a
/JP/SJPresentation/Tab0_Video/Player/VC/JXVideoDetailViewController.swift
49c7cb488919b073a80feaf3baf3762a2a3039b8
[]
no_license
AidyBao/JP
7657ba23d41e001aec38c9c46e1c5fc15856e533
1f3a5009e3f673d20e217cba53f19d46c3de918e
refs/heads/main
2023-08-07T11:29:30.237420
2021-09-30T08:48:13
2021-09-30T08:48:13
400,076,557
2
0
null
null
null
null
UTF-8
Swift
false
false
4,131
swift
// // JXVideoDetailViewController.swift // gold // // Created by SJXC on 2021/4/12. // import UIKit import BMPlayer import AVFoundation import AVKit import SnapKit import Photos class JXVideoDetailViewController: ZXUIViewController { override var zx_preferredNavgitaionBarHidden: Bool {return true} var zxControlView = JXBMPlayerCustomControlView() @IBOutlet weak var jxVideoControlView: UIView! @IBOutlet weak var titleLb: UILabel! @IBOutlet weak var statusH: NSLayoutConstraint! @IBOutlet weak var startTimeLB: UILabel! @IBOutlet weak var endTimeLB: UILabel! @IBOutlet weak var progressBgView: UIView! let my_timerSlider = UISlider() var videoUrl: String = "" fileprivate var mytitle: String = "" static func show(superV: UIViewController, videoUrl: String, title: String = "") { let vc = JXVideoDetailViewController() vc.videoUrl = videoUrl vc.mytitle = title superV.navigationController?.pushViewController(vc, animated: true) } override func viewDidLoad() { super.viewDidLoad() if UIDevice.zx_isX() { statusH.constant = 44 }else{ statusH.constant = 20 } setUI() addPlayer() addSlider() } func setUI() { self.titleLb.text = mytitle self.titleLb.font = UIFont.boldSystemFont(ofSize: ZXNavBarConfig.titleFontSize) self.titleLb.textColor = UIColor.white self.startTimeLB.text = "00:00:00" self.endTimeLB.text = "00:00:00" } func addPlayer() { self.jxVideoControlView.addSubview(self.player) player.snp.makeConstraints { (make) in make.size.equalToSuperview() } player.prepareToDealloc() player.autoPlay() player.delegate = self playVideo(str: self.videoUrl) player.playTimeDidChange = { (currentTime: TimeInterval, totalTime: TimeInterval) in print("playTimeDidChange currentTime: \(currentTime) totalTime: \(totalTime)") } } func addSlider() { my_timerSlider.tintColor = UIColor.white my_timerSlider.addTarget(self, action: #selector(playTimer(_:)), for: .valueChanged) my_timerSlider.setThumbImage(UIImage(named: "custom_slider_thumb"), for: .normal) self.progressBgView.addSubview(my_timerSlider) my_timerSlider.snp.makeConstraints { (make) in make.left.right.equalTo(progressBgView) make.centerY.equalTo(progressBgView) make.height.equalTo(10) } } @objc func playTimer(_ sender: UISlider) { self.zxControlView.delegate?.controlView(controlView: self.zxControlView, slider: sender, onSliderEvent: .touchUpInside) } //保存图片 @IBAction func downLoad(_ sender: Any) { ZXCommonUtils.saveVeideo(urlStr: self.videoUrl) } @IBAction func back(_ sender: Any) { self.navigationController?.popViewController(animated: true) player.backBlock = { [unowned self] (isFullScreen) in if isFullScreen { return } else { let _ = self.navigationController?.popViewController(animated: true) } } } //MARK: - Player Video func playVideo(str: String?) { if let st = str, let url = URL(string: st), UIApplication.shared.canOpenURL(url) { let asset = BMPlayerResource(url: url, name: "", cover: nil, subtitle: nil) player.setVideo(resource: asset) } else { ZXHUD.showFailure(in: self.view, text: "视频地址不存在或已下架", delay: ZX.HUDDelay) } } lazy var player: BMPlayer = { let myPlayer = BMPlayer(customControlView: zxControlView) BMPlayer.loadCongfig(autoPlay: true) myPlayer.backgroundColor = UIColor.clear myPlayer.delegate = self return myPlayer }() }
[ -1 ]
b7f74f93fc586f459c6cc8bb0db9a3249333466d
15867514824a365c5cffc0f8774e909757e6c704
/Source/Charts/Charts/BarChartView.swift
5c99cb62ee57545fa0bcae3afd78d425852c6d20
[ "Apache-2.0" ]
permissive
dbgint/Charts
05b388b2dcd0c18da3212c08553c6ea007d449c3
2060678013840b61d7b882ef25f6a0b56a0f8b4e
refs/heads/master
2020-05-20T11:52:58.135468
2019-05-08T09:13:28
2019-05-08T09:13:28
185,559,907
0
0
Apache-2.0
2019-05-08T09:13:29
2019-05-08T07:59:33
Swift
UTF-8
Swift
false
false
7,327
swift
// // BarChartView.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda // A port of MPAndroidChart for iOS // Licensed under Apache License 2.0 // // https://github.com/danielgindi/Charts // import Foundation import CoreGraphics /// Chart that draws bars. open class BarChartView: BarLineChartViewBase, BarChartDataProvider { /// if set to true, all values are drawn above their bars, instead of below their top private var _drawValueAboveBarEnabled = true /// if set to true, a grey area is drawn behind each bar that indicates the maximum value private var _drawBarShadowEnabled = false /// if set to true, a rounded rectangle with the corners is drawn on each bar fileprivate var _drawRoundedBarEnabled = false internal override func initialize() { super.initialize() renderer = BarChartRenderer(dataProvider: self, animator: _animator, viewPortHandler: _viewPortHandler) self.highlighter = BarHighlighter(chart: self) self.xAxis.spaceMin = 0.5 self.xAxis.spaceMax = 0.5 } internal override func calcMinMax() { guard let data = self.data as? BarChartData else { return } if fitBars { _xAxis.calculate( min: data.xMin - data.barWidth / 2.0, max: data.xMax + data.barWidth / 2.0) } else { _xAxis.calculate(min: data.xMin, max: data.xMax) } // calculate axis range (min / max) according to provided data leftAxis.calculate( min: data.getYMin(axis: .left), max: data.getYMax(axis: .left)) rightAxis.calculate( min: data.getYMin(axis: .right), max: data.getYMax(axis: .right)) } /// - Returns: The Highlight object (contains x-index and DataSet index) of the selected value at the given touch point inside the BarChart. open override func getHighlightByTouchPoint(_ pt: CGPoint) -> Highlight? { if _data === nil { Swift.print("Can't select by touch. No data set.") return nil } guard let h = self.highlighter?.getHighlight(x: pt.x, y: pt.y) else { return nil } if !isHighlightFullBarEnabled { return h } // For isHighlightFullBarEnabled, remove stackIndex return Highlight( x: h.x, y: h.y, xPx: h.xPx, yPx: h.yPx, dataIndex: h.dataIndex, dataSetIndex: h.dataSetIndex, stackIndex: -1, axis: h.axis) } /// - Returns: The bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not be found in the charts data. @objc open func getBarBounds(entry e: BarChartDataEntry) -> CGRect { guard let data = _data as? BarChartData, let set = data.getDataSetForEntry(e) as? IBarChartDataSet else { return CGRect.null } let y = e.y let x = e.x let barWidth = data.barWidth let left = x - barWidth / 2.0 let right = x + barWidth / 2.0 let top = y >= 0.0 ? y : 0.0 let bottom = y <= 0.0 ? y : 0.0 var bounds = CGRect(x: left, y: top, width: right - left, height: bottom - top) getTransformer(forAxis: set.axisDependency).rectValueToPixel(&bounds) return bounds } /// Groups all BarDataSet objects this data object holds together by modifying the x-value of their entries. /// Previously set x-values of entries will be overwritten. Leaves space between bars and groups as specified by the parameters. /// Calls `notifyDataSetChanged()` afterwards. /// /// - Parameters: /// - fromX: the starting point on the x-axis where the grouping should begin /// - groupSpace: the space between groups of bars in values (not pixels) e.g. 0.8f for bar width 1f /// - barSpace: the space between individual bars in values (not pixels) e.g. 0.1f for bar width 1f @objc open func groupBars(fromX: Double, groupSpace: Double, barSpace: Double) { guard let barData = self.barData else { Swift.print("You need to set data for the chart before grouping bars.", terminator: "\n") return } barData.groupBars(fromX: fromX, groupSpace: groupSpace, barSpace: barSpace) notifyDataSetChanged() } /// Highlights the value at the given x-value in the given DataSet. Provide -1 as the dataSetIndex to undo all highlighting. /// /// - Parameters: /// - x: /// - dataSetIndex: /// - stackIndex: the index inside the stack - only relevant for stacked entries @objc open func highlightValue(x: Double, dataSetIndex: Int, stackIndex: Int) { highlightValue(Highlight(x: x, dataSetIndex: dataSetIndex, stackIndex: stackIndex)) } // MARK: Accessors /// if set to true, all values are drawn above their bars, instead of below their top @objc open var drawValueAboveBarEnabled: Bool { get { return _drawValueAboveBarEnabled } set { _drawValueAboveBarEnabled = newValue setNeedsDisplay() } } /// if set to true, a grey area is drawn behind each bar that indicates the maximum value @objc open var drawBarShadowEnabled: Bool { get { return _drawBarShadowEnabled } set { _drawBarShadowEnabled = newValue setNeedsDisplay() } } /// if set to true, a rounded rectangle with the corners is drawn on each bar @objc open var drawRoundedBarEnabled: Bool { get { return _drawRoundedBarEnabled } set { _drawRoundedBarEnabled = newValue setNeedsDisplay() } } /// Adds half of the bar width to each side of the x-axis range in order to allow the bars of the barchart to be fully displayed. /// **default**: false @objc open var fitBars = false /// Set this to `true` to make the highlight operation full-bar oriented, `false` to make it highlight single values (relevant only for stacked). /// If enabled, highlighting operations will highlight the whole bar, even if only a single stack entry was tapped. @objc open var highlightFullBarEnabled: Bool = false /// `true` the highlight is be full-bar oriented, `false` ifsingle-value open var isHighlightFullBarEnabled: Bool { return highlightFullBarEnabled } // MARK: - BarChartDataProvider open var barData: BarChartData? { return _data as? BarChartData } /// `true` if drawing values above bars is enabled, `false` ifnot open var isDrawValueAboveBarEnabled: Bool { return drawValueAboveBarEnabled } /// `true` if drawing shadows (maxvalue) for each bar is enabled, `false` ifnot open var isDrawBarShadowEnabled: Bool { return drawBarShadowEnabled } /// - returns: `true` if drawing rounded bars is enabled, `false` ifnot open var isDrawRoundedBarEnabled: Bool { return drawRoundedBarEnabled } }
[ 185025, 286085, 302376, 54570, 215306, 67536, 288369 ]
836f19b4b07e8274af62400848ac93fcd99979b1
fbeb29d931a1e5d27c11f751e578b48adeea6320
/mvvm+Rx/mvvm+Rx/RxExtensions/RX+NSObject.swift
613b2c1680fd7cc7712501a2077e346d800411de
[]
no_license
alexvassini/MVVM-Sample-App
78d9a3b6448e039d3a43e7f6177977678cd83159
c2639e1883c013118797eb71aabd76785bf030e5
refs/heads/master
2020-03-24T19:38:25.255073
2018-08-30T21:07:10
2018-08-30T21:07:10
142,937,815
0
0
null
null
null
null
UTF-8
Swift
false
false
1,297
swift
// // RX+NSObject.swift // mvvm+Rx // // Created by Alexandre Vassinievski on 13/08/2018. // Copyright © 2018 vassini. All rights reserved. // import Foundation import RxSwift import ObjectiveC private var disposeBagContext: UInt8 = 0 extension Reactive where Base: Any { func synchronizedBag<T>( _ action: () -> T) -> T { objc_sync_enter(self.base) let result = action() objc_sync_exit(self.base) return result } } public extension Reactive where Base: Any { /// a unique DisposeBag that is related to the Reactive.Base instance only for Reference type public var disposeBag: DisposeBag { get { return synchronizedBag { if let disposeObject = objc_getAssociatedObject(base, &disposeBagContext) as? DisposeBag { return disposeObject } let disposeObject = DisposeBag() objc_setAssociatedObject(base, &disposeBagContext, disposeObject, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) return disposeObject } } set { synchronizedBag { objc_setAssociatedObject(base, &disposeBagContext, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) } } } }
[ -1 ]
3ccf3870ac27a25b70b6606c3e973e0e5bf46496
59411289d6a25219e66027e1ca448e081450dcaf
/Example/Tests/Tests.swift
2237b80d03f16efbb10fd826d13a587f96085af7
[ "MIT" ]
permissive
Single-sh/FloatingSheetAlert
48451bfde8697790de30d563ec69904a2f82e890
1900c2ed1264a2ffb341f1fd970ca77e168491dd
refs/heads/main
2022-12-30T17:52:16.356714
2020-10-20T14:41:53
2020-10-20T14:41:53
304,832,530
0
0
null
null
null
null
UTF-8
Swift
false
false
755
swift
import XCTest import FloatingSheetAlert class Tests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. XCTAssert(true, "Pass") } func testPerformanceExample() { // This is an example of a performance test case. self.measure() { // Put the code you want to measure the time of here. } } }
[ 255872, 1923, 153095, 275847, 253063, 141450, 311435, 192010, 225933, 230799, 277651, 44952, 226712, 348959, 247712, 279456, 196773, 275625, 275371, 360491, 262450, 129203, 296375, 159807, 230463, 296387, 275397, 199366, 276294, 276040, 280649, 366154, 276430, 276687, 9936, 9937, 176594, 296018, 203989, 288857, 119513, 243292, 153566, 363231, 363744, 298590, 142689, 277988, 174949, 313065, 277993, 277994, 276715, 275565, 173420, 285929, 296425, 276847, 276592, 226675, 233715, 419569, 204022, 276084, 300150, 398457, 168188, 276606 ]
7624eafd47d6c0fb65ca498ecbce6784b16bbe11
b76fc5579bae2c32fe93376ff5ea836c05ce2f29
/MelodyMaker2/CGLine.swift
5cf682c0f1c957a59ffa50159fc1c49268a0d9d9
[]
no_license
EngineerCarlosGarcia/MelodyMaker
81f0d47f1c227ee35ffd507b6a29d700a0eb25ea
57698008f80e2bd9b6a4b7ec5a2226523e1ad2a8
refs/heads/master
2021-01-19T23:06:55.867614
2017-08-16T18:17:50
2017-08-16T18:17:50
88,927,820
0
0
null
null
null
null
UTF-8
Swift
false
false
645
swift
// // CGLine.swift // Melody03 // // Created by Oscar Bonifacio on 5/13/16. // Copyright © 2016 PifaAppsCorp. All rights reserved. // import Foundation import SpriteKit class CGLine: SKNode { let line = SKSpriteNode(imageNamed: "line") var point01 = CGBall() var point02: CGNote! init(b1: CGBall, n1: CGNote) { point01 = b1 point02 = n1 super.init() userInteractionEnabled = true line.hidden = true addChild(line) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
[ -1 ]
846ac8570397613350867f8b53970c7c005e7dac
a285808b88ca2790be8360a2ce53a2ebb9dfd879
/SceneKitMetalCLI/AppDelegate.swift
1d33e669dd214788aefecf2319509475023b75ad
[]
no_license
pengliu916/SceneKitMetal
3ab7387f742756499ccd6d921a5567dad112d090
913589044d86e283ebb33398c7db4bf07f00cc8f
refs/heads/master
2020-04-05T05:42:27.596322
2020-03-19T01:28:20
2020-03-19T01:28:20
156,607,193
0
0
null
null
null
null
UTF-8
Swift
false
false
1,674
swift
// // AppDelegate.swift // SceneKitMetalCLI // // Created by Peng Liu on 11/6/18. // Copyright © 2018 Peng Liu. All rights reserved. // import Cocoa import AppKit class AppDelegate: NSObject, NSApplicationDelegate { var window : NSWindow! var gameViewCtrl: GameViewController! init(_ width: UInt32, _ height: UInt32) { window = NSWindow(contentRect: NSMakeRect(100, 100, CGFloat(width), CGFloat(height)), styleMask: [.titled, .fullSizeContentView ,.resizable], backing: .buffered, defer: false) gameViewCtrl = GameViewController() window.contentViewController = gameViewCtrl } func applicationDidFinishLaunching(_ notification: Notification) { let menubar = NSMenu(title: "MenuBar") let appMenu = NSMenu(title: "") appMenu.addItem(withTitle: "Quit", action: #selector(NSApplication.shared.terminate(_:)), keyEquivalent: "q") menubar.addItem(withTitle: "AppNameWillBeChangedAutomatically", action: nil, keyEquivalent: "") menubar.setSubmenu(appMenu, for: menubar.item(at: 0)!) app.mainMenu = menubar; window.contentView = gameViewCtrl.view window.titleVisibility = .hidden window.titlebarAppearsTransparent = true window.standardWindowButton(.miniaturizeButton)!.isHidden = true window.standardWindowButton(.zoomButton)!.isHidden = true window.standardWindowButton(.closeButton)!.isEnabled = true window.makeKeyAndOrderFront(nil) } func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } }
[ -1 ]
5f4448ef605c5b9547b0de3425c45efc817ba670
be2ef82ae9e79b883c1f4a4ab0e4ed90e6f67941
/AppleGitSearch/ViewControlles/AppleViewController.swift
c8a76b2c7a806f84ebea80c0d5a88b865313a3ca
[]
no_license
BlazingUFO/AppleGitAndSearch
29118cd738bf29fedd9dded3890cd2ee06335a46
681367104dabd883ae464d569d4514cc87dac385
refs/heads/master
2020-03-17T02:34:12.695304
2019-03-10T22:04:18
2019-03-10T22:04:18
133,195,342
2
0
null
null
null
null
UTF-8
Swift
false
false
4,373
swift
// // FirstViewController.swift // AppleGitSearch // // Created by Peter Zeman on 11.5.18. // Copyright © 2018 Peter Zeman. All rights reserved. // import UIKit import RxSwift import RxCocoa import CoreData import RxDataSources import RxCoreData import Reachability class AppleViewController: UIViewController, UITableViewDelegate { @IBOutlet var tableView: UITableView! var managedObjectContext: NSManagedObjectContext! let reachability = Reachability()! private let bag = DisposeBag() private let repos = Variable<[Repo]>([]) var urlToLoad = "http://apple.com" override func viewDidLoad() { super.viewDidLoad() managedObjectContext = PersistenceService.managedObjectContext self.tableView.delegate = self self.tableView.register(UINib(nibName: "CustomCell", bundle: nil), forCellReuseIdentifier: "CustomCell") if reachability.connection == .none { bindUIfromCoreData() }else{ getRequest() } } func getRequest(){ let apiUrl = URL(string: "https://api.github.com/users/apple/repos?per_page=100")! URLSession.shared.rx.json(url: apiUrl) .map { json -> [Repo] in guard let items = json as? [[String: Any]] else { return [] } return items.compactMap(Repo.init) } .bind(to: repos) .disposed(by: bag) bindUI() } func bindUI(){ repos.asObservable() .bind(to: tableView.rx.items) { tableView, row, repo in _ = try? self.managedObjectContext.rx.update(repo) let cell = tableView.dequeueReusableCell(withIdentifier: "CustomCell") as! CustomCell cell.full_name.text = repo.name cell.descriptionText.text = repo.descriptionString cell.updated_at.text = repo.updated_at cell.stargazers_count.text = String(repo.stargazers_count) cell.avatar.imageFromServerURL(urlString: repo.avatar_url) return cell } .disposed(by: bag) } func bindUIfromCoreData(){ self.tableView.delegate = self managedObjectContext.rx.entities(Repo.self, sortDescriptors: [NSSortDescriptor(key: "id", ascending: false)]) .bind(to: tableView.rx.items(cellIdentifier: "CustomCell")) { row, repo, cell in (cell as! CustomCell).full_name.text = repo.name (cell as! CustomCell).descriptionText.text = repo.descriptionString (cell as! CustomCell).updated_at.text = repo.updated_at (cell as! CustomCell).stargazers_count.text = String(repo.stargazers_count) (cell as! CustomCell).avatar.imageFromServerURL(urlString: repo.avatar_url) } .disposed(by: bag) managedObjectContext.rx.entities(Repo.self, sortDescriptors: [NSSortDescriptor(key: "id", ascending: false)]) .bind(to: repos) .disposed(by: bag) } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if reachability.connection == .none { showAlertNoInternet() tableView.deselectRow(at: indexPath, animated: false) }else{ urlToLoad = self.repos.value[indexPath.row].html_url performSegue(withIdentifier: "showFromApple", sender: self) tableView.deselectRow(at: indexPath, animated: false) } } func showAlertNoInternet(){ let alert = UIAlertController(title: "Oooops", message: "Looks like you are not connected to internet, please check your connection.", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Okay", style: .cancel, handler: nil)) self.present(alert, animated: true) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "showFromApple" { if let destinationVC = segue.destination as? WebViewController { destinationVC.urlToLoad = self.urlToLoad } } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } }
[ -1 ]
4587744eda54deda3b60d623eb8e0f8dcc77105a
fd0a9d63da3308a2addad563eba69139bf1e141e
/PlayWithSwift.playground/Pages/Random.xcplaygroundpage/Contents.swift
4e2c5fc2dc76dad1c1c533c839737c81313c386b
[]
no_license
nitin-agam/play-with-swift
93d231ddb377bb4d814188bb88e078f203b52f93
47ce8e9c21fffd10bddc84e9117e4dbd33c5e02a
refs/heads/master
2020-04-02T16:45:56.103734
2019-03-23T16:49:10
2019-03-23T16:49:10
154,627,592
11
0
null
null
null
null
UTF-8
Swift
false
false
1,299
swift
import Foundation // Random numbers API in Swift 4.2 // This is an C language based APIs so you required to import 'Foundation' framework. let oldWayRandomNumber = Int(arc4random_uniform(20)) print("Random value using old way: \(oldWayRandomNumber)") // 1. Random with numeric data types. print("Random Int using range operator: ", Int.random(in: 10 ... 30)) if let randomDigit = (5...50).randomElement() { print("Random Int using range operator directly: ", randomDigit) } // You can perform random operation on other data type too. print("Random Float using range operator: ", Float.random(in: 0.5 ... 2.5)) print("Random Double using range operator: ", Double.random(in: 1.5 ... 5.5)) // Surprise: even you can perform random on Bool print("Random Bool: ", Bool.random()) // Next: Now we are going to perform Random function on Collection types var friendNames = ["Mike", "John", "Nicol", "Hussey", "Virat"] if let randomName = friendNames.randomElement() { print("Random name: ", randomName) } // Shuffling: Before Swift 4.1, we didn't contain any standard function to suffle objects. But now in Swift 4.2, it is easier. friendNames.shuffle() print("Names after suffling: ", friendNames) let suffledNames = friendNames.shuffled() print("Suffled Names: ", suffledNames)
[ -1 ]
b87a6ec26288fa0a7bf1cddd19e972de80092de2
8a8b1b29d192e05e72a63930c6645206be92dec8
/validation-test/compiler_crashers_fixed/NO_ASAN-28277-swift-archetypebuilder-getgenericsignature.swift
aa00208ff471431e1707b797b305067ecebcabfa
[ "Apache-2.0", "Swift-exception" ]
permissive
ibejere/swift
c08fc8476c0f7fa829ba16429ac81403e81bb070
0794ecf5d9a23b7535270a61cea0a1eed1982134
refs/heads/master
2020-06-19T17:16:16.395895
2016-11-26T19:08:41
2016-11-26T19:08:41
74,845,952
0
1
null
2016-11-26T19:25:51
2016-11-26T19:25:50
null
UTF-8
Swift
false
false
594
swift
// NOTE: This test does NOT run under Address Sanitizer because it triggers // a heap use-after-free (SR-1070). // 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 https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // RUN: not %target-swift-frontend %s -parse // REQUIRES: asserts, no_asan { protocol A{ func<typealias e=b typealias e typealias b
[ 96067, 96075, 96150, 74170, 96159, 74206, 96163, 94569, 94573, 94603, 94610, 91280, 94672, 91314, 91316, 91317, 91351, 91362, 74987, 74988, 74990, 74991, 74992, 74993, 74995, 74997, 75000, 75003, 75004, 75008, 75010, 75011, 75014, 75021, 75023, 75025, 75029, 75030, 75034, 75039, 75042, 75046, 75047, 75050, 75051, 75054, 75056, 75058, 75062, 75063, 75064, 75067, 75069, 75070, 75071, 75072, 75077, 75079, 75081, 75082, 75092, 75093, 75095, 75096, 75097, 75098, 75102, 75103, 75105, 75108, 75109, 75111, 75112, 75116, 75118, 75119, 75120, 75122, 75123, 75125, 75128, 75131, 75132, 75134, 75135, 75139, 75140, 75142, 75144, 75147, 75149, 75152, 75154, 75158, 75162, 75163, 75164, 75167, 75168, 75170, 75173, 75176, 75178, 75179, 75182, 75186, 75187, 75189, 75191, 75192, 75193, 75194, 75195, 75200, 75203, 75204, 75205, 75206, 75207, 75208, 75209, 75212, 75214, 75215, 75217, 75219, 75220, 75221, 75222, 75224, 75225, 75226, 75229, 75236, 75237, 75239, 75240, 75241, 75242, 75245, 75251, 75253, 75257, 75258, 75261, 75266, 75268, 75270, 75272, 75273, 75274, 75275, 75277, 75279, 91668, 75285, 75286, 75289, 75293, 91679, 91681, 91682, 75299, 91683, 75301, 91684, 75303, 91686, 91688, 75307, 91691, 75310, 91694, 91695, 75313, 75315, 75316, 91699, 91701, 91702, 75320, 75321, 91705, 75326, 75327, 91712, 91714, 91716, 75334, 91720, 75337, 91721, 75341, 75342, 75346, 75347, 75348, 75349, 75350, 91730, 75352, 75353, 91733, 91738, 75356, 75357, 75358, 75359, 75360, 91741, 91742, 91745, 75364, 75365, 75366, 91747, 91749, 75369, 91753, 91754, 75372, 91755, 91758, 75375, 91759, 75377, 75378, 75379, 91760, 91762, 91767, 75384, 91769, 75386, 75387, 91771, 75389, 75391, 75392, 75395, 75396, 91782, 91783, 75400, 75401, 75402, 75403, 75404, 75405, 91784, 75407, 91785, 91790, 91794, 75411, 91795, 75413, 75414, 75415, 75416, 75417, 75418, 91799, 91801, 91803, 75422, 91805, 75424, 75425, 75426, 91806, 91808, 91811, 91814, 91815, 75432, 91816, 91817, 75436, 91821, 91822, 75440, 75441, 91827, 75444, 91829, 96596, 75447, 75448, 75449, 91832, 91834, 75453, 75454, 75455, 75456, 75457, 75458, 75459, 91842, 91843, 75462, 75463, 75464, 75465, 91844, 91847, 91848, 91850, 75470, 91853, 75472, 91856, 91858, 75477, 91862, 75481, 91866, 91867, 91869, 91871, 91872, 91873, 91874, 75491, 75494, 91880, 75498, 91883, 75500, 91884, 91885, 75503, 91886, 75505, 75506, 91891, 75507, 75508, 75509, 91887, 91888, 91889, 75513, 75514, 75515, 91893, 75518, 75519, 75520, 91898, 91899, 75523, 75524, 75525, 91901, 75527, 75528, 91904, 75530, 75531, 91908, 91915, 75534, 75535, 75536, 75537, 91916, 91917, 91918, 91919, 91922, 75543, 91928, 75545, 75546, 75547, 91930, 75550, 75551, 91934, 75554, 75555, 75556, 91941, 75558, 75559, 91943, 75561, 75562, 91946, 75564, 75565, 75566, 91947, 91948, 75569, 91949, 75571, 91950, 91956, 91957, 75575, 91960, 75579, 75581, 75584, 75586, 91970, 75589, 75590, 91975, 75594, 75595, 75596, 91980, 75598, 91982, 75600, 75601, 75602, 75603, 75604, 91983, 75606, 75607, 75608, 91987, 75612, 75613, 75614, 91996, 75616, 91999, 92003, 75620, 92004, 92008, 75625, 92009, 92010, 75628, 92011, 92012, 92014, 75633, 92017, 75635, 92018, 92019, 92020, 92021, 75640, 75641, 92025, 75643, 92026, 92029, 75646, 92032, 75649, 75650, 75652, 75653, 92036, 75655, 75656, 75657, 92037, 75659, 75660, 75661, 92043, 92045, 92046, 92048, 92050, 92051, 96449, 75669, 92054, 92055, 75672, 75674, 92059, 92060, 75677, 75678, 75679, 92061, 92062, 92066, 75683, 75686, 92071, 75688, 75689, 75690, 92072, 92073, 92074, 75694, 92075, 92079, 75697, 92081, 75699, 92082, 92083, 75704, 75708, 92096, 92099, 75716, 92102, 92103, 75721, 75722, 92107, 92108, 92109, 75726, 92111, 92112, 75729, 92114, 75731, 75732, 75733, 75734, 75735, 92115, 92116, 75738, 92121, 75740, 92127, 75744, 75745, 75747, 75748, 92131, 75750, 75753, 75754, 75756, 92141, 75758, 75759, 75760, 92145, 75763, 75764, 92147, 92150, 92151, 92152, 92154, 75772, 75773, 92158, 75775, 75776, 92160, 75778, 75779, 92164, 75781, 92165, 92167, 92168, 75786, 75787, 92170, 92171, 92173, 92174, 75792, 75793, 75794, 75795, 92177, 75797, 92178, 92179, 75800, 75801, 75802, 75803, 92180, 92186, 75806, 92188, 92189, 92190, 75810, 92193, 75812, 75813, 75814, 75815, 75816, 75817, 92194, 92198, 75820, 75821, 75822, 75823, 92204, 75825, 75826, 75827, 92205, 92208, 75830, 75831, 75832, 92213, 92217, 75835, 75836, 92221, 75838, 75839, 75840, 92223, 92226, 92228, 75845, 75846, 92231, 75848, 75849, 92232, 75851, 92236, 75853, 75854, 92238, 92240, 75857, 92242, 92243, 92244, 92246, 92247, 92248, 75867, 75868, 75869, 92252, 92253, 92256, 75874, 92259, 75878, 75880, 92264, 75882, 92265, 75884, 75885, 75886, 75887, 75888, 92267, 92272, 75891, 75892, 75893, 92274, 92279, 75896, 75897, 92280, 92283, 75901, 92286, 75903, 92287, 75905, 92289, 75907, 75908, 75909, 75910, 75911, 92290, 75913, 92292, 75915, 92293, 92294, 75918, 92296, 92297, 92298, 75922, 92306, 75924, 92309, 75926, 92311, 75930, 92314, 75932, 92315, 92316, 92320, 75937, 75938, 75939, 92323, 75941, 92325, 75943, 75944, 75945, 75946, 75947, 75948, 75949, 75950, 75951, 75952, 75953, 75954, 92330, 92333, 75957, 92339, 92342, 75960, 75961, 75962, 75965, 92349, 75967, 75968, 75969, 75970, 75971, 75972, 92354, 92355, 92359, 75976, 92362, 75979, 92364, 75981, 75982, 75983, 92365, 75985, 92366, 92367, 92368, 75989, 92370, 92372, 92376, 92377, 75994, 92379, 92380, 75997, 92382, 75999, 76001, 76002, 92385, 92386, 92388, 92389, 92390, 76008, 92391, 76010, 92394, 76012, 76013, 92395, 76015, 92401, 76018, 92403, 92404, 92406, 92407, 76024, 92409, 76026, 76027, 76029, 76030, 76031, 92414, 92415, 76035, 92420, 92421, 76038, 76039, 92422, 76041, 76042, 92425, 76044, 76045, 76046, 92428, 76048, 92429, 92430, 76051, 76053, 76054, 92437, 76056, 92439, 92440, 92441, 92442, 76061, 76062, 92443, 76064, 76065, 92444, 76067, 92447, 76069, 92448, 76071, 92450, 76073, 92451, 76075, 92452, 92455, 76078, 76079, 76080, 92457, 76082, 76083, 92460, 92461, 76086, 92463, 92464, 76089, 92470, 76091, 76092, 92476, 76094, 76095, 76096, 92478, 76098, 76099, 92479, 92482, 76102, 92488, 92492, 92493, 76110, 92494, 76113, 76115, 92499, 76117, 92503, 76120, 76121, 76122, 76123, 76124, 92505, 92508, 92509, 92510, 76129, 76130, 92511, 92514, 76133, 92515, 92518, 92519, 76137, 76138, 76139, 76140, 76141, 76142, 92522, 76144, 76145, 76146, 76147, 92529, 92530, 76150, 92531, 92532, 92534, 92536, 76158, 76159, 92543, 92545, 76163, 76164, 92547, 92551, 92552, 76169, 76170, 76171, 92557, 92558, 76175, 76176, 92560, 92562, 76179, 76180, 76181, 76182, 92563, 76184, 76185, 76186, 76187, 92565, 92566, 92567, 92568, 92569, 76193, 76194, 76195, 92574, 76197, 92575, 92576, 92580, 76201, 76202, 76203, 92582, 76205, 92584, 92588, 76208, 92592, 76210, 92593, 92594, 76213, 92596, 92598, 76216, 92603, 76220, 76221, 76222, 92606, 92608, 76226, 76227, 76228, 76229, 92610, 92616, 76234, 76235, 92618, 92620, 76238, 76239, 76240, 92621, 92623, 92628, 76247, 92633, 76250, 92635, 76252, 92636, 92637, 76255, 76256, 76257, 92641, 92644, 76261, 92646, 76263, 76264, 92649, 76266, 76267, 92650, 92652, 92655, 76272, 92657, 92658, 76275, 92660, 76278, 76279, 92664, 92667, 76284, 92668, 76286, 76287, 76288, 92673, 76290, 92675, 92678, 92679, 76296, 92681, 92682, 76303, 76304, 76305, 76306, 92689, 76308, 76309, 76310, 76311, 92690, 92692, 92693, 92696, 76316, 76318, 76319, 76323, 92707, 92709, 76326, 92710, 92712, 76330, 76331, 76332, 92715, 76334, 76335, 92716, 76337, 76338, 92717, 76339, 92718, 76341, 76342, 92723, 76344, 92724, 92726, 76347, 92730, 92731, 92732, 76351, 92737, 76352, 92733, 76354, 92735, 76356, 92736, 76358, 76361, 76359, 92740, 92748, 76365, 92749, 76368, 92753, 92754, 76371, 92759, 76376, 92760, 76381, 76382, 76383, 92765, 92766, 92770, 92771, 92773, 92774, 92775, 76392, 92776, 76395, 76396, 76398, 76399, 92782, 76401, 76402, 76403, 76404, 76405, 92783, 92789, 92790, 76409, 92792, 92795, 76412, 76413, 92797, 76415, 92800, 76418, 92803, 92807, 92808, 76425, 76426, 76427, 76428, 76429, 92812, 92813, 92814, 92815, 76434, 76438, 76439, 92823, 76441, 76442, 92824, 92825, 76446, 76447, 92831, 76449, 76451, 76452, 76453, 92835, 92837, 92838, 76457, 92839, 76459, 76460, 92843, 92844, 92846, 76464, 92847, 76466, 96608, 76468, 92852, 76470, 76471, 92855, 76473, 92857, 92858, 96611, 76477, 92863, 76480, 76481, 76482, 76483, 92865, 76485, 92866, 92868, 92871, 96612, 76490, 76491, 76492, 96613, 76494, 92879, 92880, 76497, 76498, 92882, 76500, 92884, 92885, 76503, 92886, 76507, 76508, 92892, 76510, 92893, 76512, 76513, 76514, 92897, 76516, 92900, 76519, 92904, 76522, 92906, 76524, 76525, 92907, 76527, 92908, 76529, 76530, 92911, 76532, 92913, 76534, 92915, 76536, 76537, 92918, 76539, 76540, 92922, 92923, 92925, 92927, 92929, 76546, 76547, 76548, 76549, 92935, 76552, 76554, 92938, 76557, 92941, 76559, 76561, 92946, 76564, 76566, 76567, 76568, 76569, 92951, 92952, 92953, 76575, 76577, 76578, 92962, 92965, 76582, 92966, 76584, 92968, 92969, 76587, 92971, 92972, 92973, 76591, 76592, 92974, 92975, 76595, 76596, 76597, 92979, 92981, 92982, 76601, 92984, 92987, 76604, 76605, 92994, 76611, 76612, 92995, 76614, 76615, 76616, 92996, 92997, 93003, 76621, 93007, 76624, 76625, 93009, 93010, 76630, 93014, 93015, 76633, 76634, 93017, 93019, 76637, 76638, 93020, 76640, 76641, 76642, 93021, 76644, 76645, 93025, 76647, 93027, 76649, 93028, 76651, 93032, 93034, 93036, 93038, 93039, 76657, 93041, 76659, 76660, 93045, 76663, 93048, 93049, 93050, 76667, 76668, 76669, 76670, 93057, 76674, 76675, 93059, 93061, 93064, 93065, 93069, 93070, 76687, 76688, 93073, 76690, 76691, 93075, 93077, 76694, 76695, 76696, 93078, 76698, 76699, 93082, 93085, 76702, 93087, 76704, 76705, 76706, 76707, 93088, 93091, 76710, 93092, 93094, 76713, 76714, 76715, 76716, 93096, 93098, 76719, 93100, 93101, 76723, 93107, 76725, 93108, 93109, 93112, 76729, 93114, 76731, 93115, 76733, 76734, 76735, 76736, 93116, 93118, 76739, 76740, 93119, 76742, 93122, 76744, 93124, 76746, 93125, 76748, 76749, 93126, 76751, 76752, 93132, 93137, 76755, 93139, 76758, 76759, 93142, 76761, 93146, 93147, 76765, 93150, 76768, 93152, 76770, 76774, 93158, 76776, 76777, 93164, 93166, 76783, 93167, 76785, 76786, 93168, 93173, 76790, 76791, 93176, 93177, 76794, 76795, 93182, 76801, 76802, 93185, 76804, 76805, 93186, 93189, 93192, 93193, 93195, 76813, 93197, 93199, 76816, 76817, 93200, 76819, 76820, 93205, 76824, 93208, 76827, 76828, 93211, 76831, 76832, 93215, 93216, 76835, 76836, 93217, 76838, 93221, 93222, 76841, 76842, 76844, 76847, 93232, 76849, 93234, 76851, 76853, 93237, 93238, 76856, 93240, 76858, 76859, 76860, 93243, 76862, 76863, 93245, 76865, 93246, 93247, 93251, 93254, 93255, 93256, 76873, 76874, 76875, 76876, 76877, 76878, 93259, 93263, 93265, 76882, 76884, 76885, 93269, 93271, 76888, 76889, 93273, 93274, 93275, 93276, 93278, 76895, 93280, 76897, 76898, 93282, 76900, 93284, 93286, 76903, 76904, 76905, 76906, 93287, 93289, 76909, 76910, 93293, 93296, 93297, 76914, 76916, 76918, 76919, 93302, 93305, 76923, 93307, 76925, 76927, 93311, 93313, 76930, 76931, 93314, 93317, 76934, 93319, 93320, 76937, 76938, 93322, 76940, 76941, 93325, 76943, 76944, 93326, 76947, 76948, 93332, 93333, 93335, 76952, 76953, 76954, 76955, 76956, 76957, 93336, 76959, 76960, 93344, 76962, 93347, 93348, 76966, 93350, 76968, 76969, 93351, 76971, 76972, 76973, 93355, 93358, 76976, 93359, 76978, 93362, 93363, 76981, 93365, 76983, 76984, 93366, 93368, 76987, 93371, 93373, 93376, 76993, 76994, 76995, 93378, 76997, 93382, 76999, 77001, 77002, 77003, 93385, 93387, 77006, 93388, 77008, 77009, 93389, 93391, 77012, 77013, 77014, 93393, 93400, 93401, 93402, 93403, 93404, 77021, 77022, 77023, 93407, 77025, 77026, 93409, 93412, 77029, 77030, 93413, 77032, 77033, 77035, 77036, 93419, 93421, 77039, 93422, 77041, 93424, 77043, 77044, 93427, 93428, 77047, 77048, 77049, 77050, 77051, 93429, 93433, 77054, 93437, 77056, 93439, 93441, 77059, 77060, 93442, 77062, 93446, 77065, 77066, 77067, 77068, 93449, 93452, 93453, 93456, 96729, 96730, 93459, 77076, 93460, 93462, 93464, 93465, 93468, 93472, 93473, 77090, 93474, 77092, 77093, 77094, 93475, 93476, 77097, 93478, 93481, 77100, 93485, 77103, 93487, 93488, 77106, 93490, 93491, 93492, 77110, 77111, 77112, 93497, 77115, 77116, 93500, 77118, 93502, 93505, 93506, 77124, 96740, 93512, 93513, 77131, 77132, 77135, 77136, 93519, 77138, 93520, 93521, 93524, 93525, 77143, 77144, 77145, 93526, 77147, 77148, 93528, 77150, 77151, 93529, 93530, 77154, 77155, 93537, 93538, 77158, 77159, 93539, 93542, 77162, 77163, 77164, 77165, 93545, 93546, 93548, 77169, 93549, 93551, 93552, 93555, 77174, 93557, 77176, 77177, 93559, 77179, 77180, 93563, 77182, 77183, 93564, 93565, 77186, 77187, 93566, 77189, 77190, 77191, 77192, 93569, 77194, 93571, 77196, 93574, 77198, 93575, 77200, 77201, 93579, 77203, 93580, 93581, 93582, 77210, 77212, 77213, 77214, 77216, 93602, 77220, 93604, 93606, 77223, 77224, 93609, 77226, 77227, 77229, 77231, 77232, 93615, 77233, 93618, 77235, 77238, 93622, 77240, 77241, 77242, 93623, 93624, 77245, 93628, 93630, 77249, 93635, 77255, 77256, 77257, 77258, 77259, 77260, 93642, 93643, 93646, 93647, 93649, 77266, 77268, 77269, 93654, 93655, 93656, 93658, 77276, 77277, 93660, 93661, 93664, 77281, 77282, 93665, 93667, 77285, 93668, 77287, 93671, 93672, 77290, 93673, 93674, 77293, 77294, 93678, 77299, 93683, 93685, 77302, 77303, 93686, 77305, 93688, 93689, 93692, 77311, 93697, 93698, 93699, 77316, 77317, 77318, 77319, 91894, 77320, 93702, 77322, 77323, 93705, 93707, 93708, 77327, 77328, 77329, 77330, 77332, 77333, 77334, 77335, 93717, 77337, 77338, 93718, 77340, 77341, 77342, 93720, 93724, 77345, 77346, 93727, 77347, 91900, 93728, 93731, 77351, 77352, 93733, 93735, 77355, 93737, 93741, 77359, 77360, 77361, 77362, 77363, 77364, 91903, 77366, 93743, 77368, 77369, 93745, 93751, 77374, 91905, 93758, 93759, 77380, 93765, 77382, 93766, 77384, 77385, 77386, 77387, 93767, 93773, 93774, 77391, 77393, 93778, 93779, 77398, 93782, 77400, 93785, 77402, 93787, 93788, 77406, 77409, 77411, 93796, 77413, 77414, 93797, 77416, 77417, 93802, 93799, 77419, 77420, 77422, 77423, 93806, 77424, 77425, 93810, 77427, 93811, 93813, 77430, 93815, 77432, 93816, 77434, 77435, 77436, 93820, 93821, 93822, 77440, 77441, 93825, 93827, 93828, 77445, 77446, 77447, 93832, 77449, 93836, 77453, 77457, 93841, 77460, 77461, 93844, 93847, 93848, 77465, 93849, 77467, 93852, 77469, 93854, 77471, 93855, 77476, 93860, 93866, 77484, 93868, 93870, 93871, 93872, 77489, 77490, 77491, 77492, 93873, 77493, 77494, 77495, 93877, 77498, 77499, 93883, 77501, 93885, 77505, 77506, 93891, 93892, 93894, 77511, 77512, 93896, 77514, 77515, 93897, 77517, 77518, 77519, 93900, 77520, 93902, 77522, 77523, 77524, 93905, 93906, 77527, 93908, 93911, 77530, 93913, 93914, 77533, 77534, 77535, 77536, 93915, 93916, 93920, 77540, 93924, 93925, 77543, 77544, 93926, 93928, 77547, 93932, 77549, 77550, 93935, 77553, 77554, 93937, 77556, 77557, 77558, 77559, 77560, 93941, 93945, 77563, 77564, 93947, 77566, 77568, 77569, 77571, 77575, 77577, 77578, 77579, 77580, 93961, 77582, 93963, 77584, 77585, 77586, 93965, 77588, 93576, 93966, 77591, 93967, 93970, 93971, 93973, 93977, 77597, 93982, 77599, 77601, 93985, 93986, 93987, 93988, 77606, 77608, 77609, 77610, 77611, 77612, 93993, 93994, 77615, 93995, 77617, 93998, 77619, 94001, 94004, 77622, 77623, 94005, 94006, 77626, 77627, 94010, 94013, 77632, 77633, 77634, 94016, 94021, 77638, 77639, 77640, 94022, 77642, 77643, 94024, 94026, 77646, 94027, 94028, 94031, 77650, 77651, 94033, 94035, 94036, 77655, 94038, 94042, 77659, 94044, 94045, 77662, 77663, 77664, 94046, 77666, 94047, 94049, 94051, 77670, 94052, 77672, 94053, 94056, 94059, 94061, 77678, 77679, 94063, 77681, 77684, 94068, 94070, 94071, 77688, 94072, 77690, 94073, 77692, 94074, 77694, 94079, 77696, 94081, 77698, 77700, 77701, 77702, 94084, 77704, 94085, 77706, 94088, 77708, 94089, 94094, 94095, 77713, 77714, 94099, 94100, 77717, 94101, 77719, 94103, 77721, 94107, 77727, 94111, 94112, 77731, 77732, 77733, 94116, 77735, 77737, 94122, 94123, 94124, 77741, 94126, 77743, 94130, 94132, 77750, 77752, 77753, 94138, 77755, 94139, 77757, 94142, 77761, 77763, 77764, 94147, 77766, 94150, 77768, 77769, 94152, 77772, 77773, 77774, 77775, 94156, 77777, 77778, 77779, 94157, 94158, 77782, 94160, 94162, 77785, 77786, 94167, 94168, 77789, 94171, 77791, 77792, 94173, 77794, 77795, 94178, 77797, 94182, 77799, 94183, 94184, 94185, 77805, 77806, 94190, 77808, 94192, 77810, 77814, 77815, 94198, 77817, 77818, 77819, 94200, 94203, 94205, 94209, 77826, 94211, 77828, 94212, 94214, 77831, 77832, 94216, 94217, 77835, 77836, 77837, 77838, 77839, 77840, 94220, 94221, 77843, 94222, 77845, 94224, 94225, 94228, 77849, 77850, 94234, 77852, 94236, 77854, 94237, 94239, 77857, 94240, 94242, 77860, 77861, 94244, 77863, 94250, 94251, 77868, 77869, 77870, 77871, 77872, 94253, 77874, 77875, 94255, 77877, 94259, 94260, 77880, 94262, 77882, 77883, 77884, 77885, 94263, 94264, 77888, 94272, 77890, 94274, 77892, 94275, 77894, 77895, 94278, 77897, 94279, 77899, 77900, 94280, 94281, 77903, 77904, 94282, 94283, 94286, 94291, 77909, 94292, 94295, 77912, 77913, 94298, 77915, 77916, 77917, 77918, 94301, 77920, 77921, 94303, 94308, 77925, 77926, 94309, 94310, 77929, 94311, 77931, 77932, 94312, 77934, 94314, 94315, 77937, 94317, 94320, 94322, 77941, 77942, 94323, 94324, 94325, 94328, 94330, 77948, 77949, 94332, 94334, 77952, 94335, 77954, 77955, 94337, 77957, 94339, 77959, 77960, 77961, 77962, 94340, 77964, 77965, 94343, 94344, 94352, 77969, 77971, 94356, 77973, 77974, 77975, 94357, 77977, 94359, 77979, 94362, 77981, 77982, 94363, 94366, 94368, 94369, 77987, 77988, 94373, 77990, 77991, 94377, 77997, 77999, 94383, 78001, 78002, 78003, 94387, 78005, 94389, 78007, 78008, 94390, 94392, 94394, 94395, 94396, 78014, 78015, 78016, 94397, 94399, 94400, 94404, 94406, 78023, 94408, 94409, 78026, 78027, 94410, 94412, 94416, 78033, 94420, 78037, 94421, 94422, 78040, 78041, 94428, 94430, 78048, 94432, 94433, 94435, 78053, 78054, 94437, 94438, 78058, 94444, 94445, 78065, 78066, 78067, 78068, 94452, 78070, 94453, 94454, 78076, 78077, 78078, 78079, 78080, 94460, 78082, 78083, 94466, 78085, 78086, 78087, 94467, 94474, 78091, 78093, 78095, 78096, 94479, 78098, 78099, 94480, 78104, 78106, 94491, 78109, 78112, 94498, 78115, 78116, 78117, 78118, 94499, 94500, 94501, 94502, 94504, 94505, 94507, 78127, 94511, 78129, 94513, 94515, 78132, 94516, 78134, 94518, 94519, 78138, 78139, 78140, 78141, 94524, 78143, 94526, 78146, 78147, 78148, 78149, 94530, 94531, 78152, 94534, 78154, 94535, 78156, 78157, 94536, 94539, 78160, 78161, 78162, 78163, 94546, 78168, 94553, 78170, 78171, 78172, 78173, 78174, 94554, 78176, 94556, 94560, 78179, 94561, 78181, 94565, 78183, 78184, 78185, 78186, 78187, 78188, 94567, 94574, 94575, 78190, 78191, 78192, 78194, 94572, 78196, 78198, 78199, 94580, 94582, 94583, 94584, 78204, 78205, 78206, 94585, 94586, 94588, 94595, 94596, 78213, 94597, 78215, 94598, 94599, 78218, 78219, 94604, 78220, 94606, 78221, 78222, 94600, 94602, 78225, 78226, 78228, 78229, 78230, 78232, 78233, 94609, 78234, 78236, 94615, 94616, 78239, 78240, 94618, 94623, 78243, 78244, 94625, 94628, 94629, 94630, 94631, 94632, 78251, 78252, 78253, 94635, 94636, 78256, 78257, 78258, 94638, 94639, 94640, 78262, 78263, 78264, 78265, 94642, 94644, 78268, 94646, 94649, 94650, 94653, 78276, 94660, 78278, 78279, 78280, 78281, 78282, 94661, 94664, 78285, 78286, 94665, 78287, 78288, 78289, 94669, 78291, 78292, 94670, 94671, 78295, 78297, 94674, 78299, 78300, 94682, 94684, 94686, 78304, 78305, 94687, 78307, 94691, 94693, 78310, 78311, 78312, 94694, 94696, 94697, 94700, 78319, 78320, 94704, 78326, 78327, 94711, 94714, 94715, 94716, 78333, 78334, 78335, 78337, 78338, 94723, 94724, 78341, 78343, 94729, 94730, 78347, 78352, 94736, 94738, 78355, 94740, 78357, 78358, 94741, 78360, 78361, 78362, 94744, 78364, 78365, 94749, 78367, 78369, 78370, 94754, 78372, 94757, 78375, 78376, 78377, 94759, 94760, 94762, 78381, 94763, 78383, 78384, 78385, 94764, 94766, 94767, 78389, 78390, 94769, 94771, 94772, 78394, 94774, 94777, 78397, 94778, 94779, 94781, 94783, 78402, 94787, 94788, 78407, 78408, 94792, 78410, 94795, 78412, 78413, 78415, 94800, 78418, 78419, 78420, 78422, 78423, 94806, 78425, 78426, 94808, 94811, 78429, 94814, 94815, 78432, 94816, 93744, 94818, 78436, 94819, 78438, 94821, 94822, 94825, 78443, 94828, 78446, 78447, 94832, 94833, 78450, 78451, 94838, 78456, 78457, 78458, 78459, 78460, 94842, 94845, 78463, 94846, 78465, 94851, 78468, 94852, 94853, 78471, 78472, 78473, 78474, 94854, 78476, 94857, 94858, 94860, 78480, 94862, 78482, 78483, 78484, 94863, 94865, 94866, 94867, 94868, 78490, 78491, 94870, 94873, 78494, 94875, 94876, 94877, 78498, 78499, 94883, 94884, 78503, 94887, 94890, 78510, 94894, 78512, 78514, 78515, 94900, 94902, 78519, 94904, 78521, 94905, 78523, 94909, 78526, 94911, 78528, 94913, 78530, 78531, 94916, 94917, 94918, 94920, 94921, 78539, 94927, 78545, 78547, 78548, 94933, 78550, 78551, 94935, 78553, 94936, 94938, 78556, 94939, 94941, 94944, 78561, 78563, 78564, 78565, 94949, 94951, 78568, 78569, 78570, 94952, 94953, 94955, 94956, 78575, 94957, 94962, 78579, 78580, 78581, 94966, 94967, 78584, 94968, 78587, 94971, 78589, 94974, 78592, 78593, 94976, 94979, 94980, 78598, 78603, 94989, 78606, 78607, 78608, 94990, 78610, 94994, 94998, 78616, 95000, 78618, 95002, 78620, 95005, 95006, 78623, 78624, 78625, 95007, 78627, 78628, 78629, 78630, 95009, 95010, 95011, 78634, 95015, 95018, 78637, 78638, 78639, 78640, 78641, 95019, 95020, 95023, 78645, 78646, 78647, 95024, 95025, 95030, 95032, 78652, 95035, 78654, 95039, 95040, 78657, 95042, 95044, 78661, 78663, 95047, 78665, 95050, 78667, 78670, 95056, 78673, 95058, 95059, 95060, 95062, 78679, 78681, 78682, 78683, 78684, 78686, 95073, 95074, 78691, 95075, 95076, 78697, 95082, 78699, 78700, 78701, 78702, 78703, 95083, 95084, 95086, 95087, 95088, 78709, 78710, 78711, 95091, 78713, 78714, 78715, 78716, 95093, 95095, 95096, 95099, 95105, 78721, 95100, 78723, 78724, 95101, 95102, 78727, 78728, 78729, 78730, 95108, 95112, 78733, 95114, 95115, 78736, 95118, 95123, 78740, 78742, 78743, 95127, 95129, 78746, 95130, 95132, 95133, 78750, 95135, 78752, 95136, 95138, 95139, 78756, 78758, 78759, 78760, 78762, 78763, 95147, 78767, 78769, 78770, 95154, 95155, 95156, 78778, 95162, 78780, 95163, 95164, 95165, 95167, 78786, 78787, 78788, 78789, 95170, 95171, 95174, 95175, 95176, 78795, 78796, 78797, 78798, 95177, 78800, 78801, 95179, 78803, 95181, 95184, 78806, 78807, 95192, 78810, 78811, 78812, 78813, 95197, 78815, 95199, 78817, 95201, 78819, 78820, 95203, 95204, 95205, 95210, 78828, 78832, 78834, 78836, 95220, 78838, 95221, 78840, 78841, 78842, 95224, 95225, 95226, 78847, 95231, 95233, 95236, 92199, 95238, 95240, 78857, 78858, 78859, 95241, 78861, 78862, 78863, 92201, 95246, 95248, 95250, 78868, 92202, 78870, 95252, 78872, 78873, 95254, 78875, 78877, 78878, 95261, 78880, 95262, 78884, 95268, 78886, 95269, 78888, 95270, 78890, 95273, 78893, 92207, 95278, 95282, 78900, 78901, 95284, 95285, 95286, 95289, 95290, 78907, 78908, 78909, 95291, 95292, 78912, 78913, 95294, 95295, 95297, 95299, 78918, 95301, 95304, 78922, 78924, 95309, 78926, 78927, 95310, 95311, 78930, 78931, 78932, 78933, 95317, 78935, 78936, 78937, 95318, 78939, 95320, 78941, 78942, 95323, 78944, 95326, 95330, 78947, 78948, 95331, 95332, 95334, 95336, 78953, 78954, 78955, 95338, 95342, 95343, 95344, 78961, 95345, 78963, 95347, 78965, 95348, 95350, 78968, 95354, 78971, 78975, 78976, 78977, 95360, 78979, 95362, 78981, 95363, 78983, 95366, 78985, 95367, 95368, 95370, 78989, 78990, 78991, 78992, 95374, 78994, 78995, 95378, 78997, 95380, 95381, 95384, 79001, 95386, 95389, 95390, 79007, 95392, 79009, 79010, 79011, 95393, 95395, 79013, 79014, 79015, 95396, 79017, 95399, 95400, 95402, 79021, 95406, 95408, 79025, 95410, 79027, 79028, 95411, 95412, 79031, 95414, 79033, 79034, 79035, 95415, 79037, 79038, 95419, 79040, 79041, 95421, 79043, 79044, 95425, 95428, 79047, 79048, 95430, 79050, 79051, 95432, 95433, 95434, 79055, 95435, 79057, 95438, 79059, 79060, 79061, 95446, 79063, 79064, 79067, 95451, 79069, 95452, 79071, 95454, 95455, 95456, 79075, 95459, 79078, 95462, 79080, 79081, 79082, 79083, 79084, 79085, 79086, 95467, 95470, 79089, 79090, 95471, 79092, 95473, 95475, 79094, 95476, 95478, 79097, 95482, 95485, 79102, 79103, 95486, 79105, 79106, 79107, 95487, 95490, 79110, 95494, 96601, 79114, 95501, 95502, 79119, 95503, 79122, 79123, 95506, 79125, 95507, 79127, 79128, 95508, 79130, 95509, 95510, 95511, 79134, 95518, 95520, 79137, 79138, 79139, 95523, 79142, 79145, 79146, 95529, 95531, 95532, 95533, 95535, 95536, 79153, 79154, 79155, 79156, 95539, 95540, 79159, 79160, 79161, 79162, 79163, 79164, 95543, 95547, 95548, 95550, 95552, 79171, 95556, 79173, 95558, 95559, 95560, 79177, 95563, 79180, 95566, 95567, 79184, 79185, 95569, 79187, 79188, 79189, 95570, 95571, 79192, 79193, 95572, 95575, 79196, 79197, 79198, 95576, 95577, 79201, 79202, 95578, 95579, 95582, 95583, 79207, 79208, 95585, 79210, 95586, 79212, 95590, 79214, 95592, 95593, 79217, 95595, 79219, 79220, 95597, 79222, 95598, 95602, 79225, 95604, 95605, 79228, 79229, 95608, 79231, 79232, 79233, 79234, 95610, 95611, 79237, 79238, 79239, 79240, 79241, 95620, 79243, 95621, 79244, 79245, 95623, 79247, 79248, 79249, 95626, 79252, 95630, 95631, 79255, 79256, 95632, 79258, 79259, 79260, 95636, 79262, 79263, 79264, 95641, 79266, 95643, 95645, 79269, 95646, 79271, 79272, 95649, 95651, 79275, 95653, 79277, 79278, 79279, 95656, 79281, 95657, 79283, 95659, 95669, 79287, 79288, 79289, 95671, 79291, 95672, 95673, 79294, 79295, 79296, 95674, 95678, 79299, 79300, 79301, 95679, 95681, 79304, 79305, 79306, 95684, 79308, 95685, 79310, 95686, 79312, 79313, 79314, 79315, 79316, 95694, 79318, 79319, 95695, 95697, 79322, 95698, 79324, 95700, 95707, 79327, 79328, 95709, 79330, 79331, 95710, 95715, 95716, 95717, 95719, 95720, 95722, 95723, 95724, 79342, 95726, 79344, 95729, 79346, 79347, 79348, 95734, 95735, 79353, 79354, 95737, 79356, 95738, 79358, 79359, 79360, 79361, 79362, 95739, 95741, 95747, 95750, 95752, 79370, 79371, 79372, 95755, 79374, 79375, 95757, 79377, 95760, 79385, 95770, 79387, 79388, 79389, 95772, 79391, 95773, 95774, 95775, 79395, 95777, 95779, 79398, 79399, 95782, 79401, 79402, 79403, 95785, 79406, 79407, 79408, 95791, 79410, 95793, 95794, 79413, 95796, 95797, 79416, 79418, 79419, 95804, 79421, 79422, 79423, 95808, 79425, 95810, 95811, 95813, 79430, 79431, 95816, 79433, 79436, 79438, 95823, 79440, 95824, 79442, 95827, 79444, 95829, 95830, 79447, 95831, 95833, 95837, 95839, 79457, 95842, 79459, 79460, 79461, 95843, 95844, 79464, 95845, 79466, 95847, 95848, 79469, 95850, 95851, 79472, 95852, 79474, 95853, 95854, 95857, 95859, 79479, 95860, 79481, 79482, 95861, 79484, 79485, 95862, 95865, 95866, 95870, 95871, 95874, 79492, 92326, 95878, 95879, 79496, 95880, 95881, 79499, 79500, 79502, 79505, 95889, 79508, 95896, 79513, 79514, 95587, 95899, 79517, 79519, 79520, 79521, 95903, 79523, 95906, 95909, 79528, 79529, 95914, 79532, 79533, 79534, 79535, 95919, 79537, 79538, 95920, 79540, 79541, 79542, 79543, 79544, 95921, 95923, 79547, 79548, 79549, 79550, 79551, 79552, 79553, 87746, 95932, 79556, 79557, 95934, 95938, 95939, 79561, 79562, 79563, 95941, 95942, 79566, 95944, 95949, 95951, 79570, 79572, 79573, 79574, 95956, 95957, 95961, 95962, 95965, 79583, 79585, 95969, 95970, 95972, 79591, 95976, 95977, 79594, 95979, 79596, 95981, 79599, 79600, 95984, 79602, 95985, 95986, 79605, 95987, 95990, 95991, 95992, 79610, 95993, 95998, 79615, 79616, 79617, 96001, 79619, 79620, 96002, 79622, 96006, 96008, 96009, 79626, 96012, 79629, 96013, 79631, 96014, 96015, 79634, 96017, 96020, 79637, 96021, 79639, 79640, 79641, 79642, 95612, 79644, 96022, 96023, 96027, 96028, 79649, 95614, 79651, 96031, 96034, 96035, 96036, 79656, 79657, 96044, 79661, 79662, 95616, 96045, 79665, 79666, 96046, 96048, 79669, 79670, 79672, 96056, 79674, 79675, 96057, 79677, 79678, 96058, 79680, 79681, 96066, 96061, 79683, 96062, 96069, 96071, 96070, 96064, 79686, 79691, 79687, 79688, 79689, 79692, 79693, 79694, 79695, 96074, 79698, 96076, 79701, 96078, 96084, 79704, 95625, 79705, 96085, 96088, 96089, 96093, 79710, 79712, 79713, 96097, 79716, 79717, 79718, 95627, 79720, 96100, 79722, 96103, 96107, 79725, 79726, 79727, 79728, 96109, 96111, 96113, 79732, 79733, 96114, 96115, 79736, 96116, 96121, 79739, 79740, 79741, 96122, 96124, 96125, 96126, 96128, 96129, 96131, 79749, 79750, 79751, 96132, 79753, 96133, 96137, 95635, 79757, 96142, 96143, 79760, 79761, 79762, 79763, 96147, 79766, 79767, 96152, 79768, 79769, 96154, 96156, 96155, 79770, 95637, 79772, 96161, 79774, 79775, 96162, 79777, 79778, 79779, 79780, 79783, 79784, 79785, 79787, 96167, 96173, 79793, 96177, 79795, 96178, 96179, 79798, 79799, 79801, 96185, 79804, 96191, 79808, 96192, 79811, 79812, 96195, 96198, 79815, 95647, 79819, 79820, 79821, 79822, 96203, 79824, 96207, 79826, 79827, 79828, 79829, 96209, 96212, 96213, 79833, 96214, 79835, 79836, 96218, 79838, 79839, 79840, 96221, 79842, 79843, 96227, 79845, 79846, 79847, 96228, 96234, 79851, 96238, 96239, 79856, 79857, 96243, 96244, 79861, 96246, 79863, 79864, 79865, 96247, 96249, 79868, 96250, 79870, 79871, 79872, 96251, 96255, 79875, 96257, 96258, 79878, 79879, 79880, 96260, 96261, 96264, 79884, 79885, 96268, 96269, 96270, 96271, 96274, 79891, 96276, 79893, 96278, 79896, 79897, 79898, 96280, 79900, 79901, 88094, 96282, 96286, 79905, 96287, 79907, 96288, 96292, 79910, 79911, 79912, 79913, 79914, 96294, 96296, 96297, 96300, 79919, 96301, 88115, 79924, 96308, 96309, 96310, 79928, 79929, 96312, 79931, 96314, 96315, 79934, 79935, 96317, 79937, 79938, 96318, 96319, 79941, 96321, 79943, 79944, 96322, 96327, 96330, 96332, 96333, 79950, 79951, 79952, 96337, 96338, 79958, 96342, 79960, 96344, 79962, 79963, 96346, 79968, 79969, 96352, 79971, 79972, 96354, 79974, 79975, 79976, 96355, 96358, 96359, 96362, 79981, 96365, 79983, 79984, 96368, 79986, 79987, 79988, 96369, 96372, 79991, 96373, 96374, 96376, 96378, 79997, 79998, 79999, 96381, 96383, 80002, 80003, 96384, 80005, 96387, 80007, 80009, 96394, 80011, 80013, 96397, 96398, 80017, 96401, 80019, 80020, 96403, 96405, 80024, 96408, 80026, 96409, 80028, 80029, 80030, 96410, 96411, 80033, 80034, 95690, 96412, 96413, 96414, 96416, 96418, 96421, 80042, 80043, 80044, 80045, 96429, 80047, 80048, 96432, 80050, 80051, 80052, 96434, 80054, 80055, 96440, 80056, 80057, 80058, 96437, 80060, 80062, 80061, 80063, 96448, 88256, 96443, 80067, 96445, 96446, 80070, 96447, 80072, 80073, 96452, 96454, 80077, 80078, 96461, 96462, 80081, 80082, 80083, 96463, 80085, 96464, 80087, 96465, 96468, 96470, 96471, 96473, 80093, 96474, 80095, 80096, 96475, 96477, 80099, 80100, 96479, 96481, 80103, 96483, 96485, 80106, 96488, 80108, 96489, 80110, 80111, 96490, 96492, 80114, 80115, 80116, 96494, 96495, 80119, 80120, 96499, 80122, 96504, 80125, 80127, 80128, 96514, 80131, 96516, 96519, 96520, 80138, 80141, 80142, 96527, 96528, 80145, 96529, 80147, 80149, 96534, 96535, 80152, 80153, 80154, 96537, 80156, 80157, 80158, 80159, 80160, 96538, 80162, 96539, 80164, 96540, 96543, 80167, 96544, 96546, 96551, 96552, 96555, 80173, 96556, 80175, 96557, 96559, 80178, 96560, 80180, 80181, 96561, 80183, 96562, 96566, 80186, 96570, 96571, 80189, 96573, 92465, 80191, 80192, 80193, 80194, 80195, 96574, 80197, 96578, 80199, 80200, 96579, 96580, 80203, 96582, 96583, 96584, 96592, 96587, 96588, 96590, 80210, 80211, 80212, 96597, 96591, 80214, 80215, 80216, 96602, 96605, 96606, 96603, 80219, 80220, 92471, 80222, 80223, 80225, 80226, 92473, 80227, 80228, 80230, 80233, 92474, 80235, 80237, 80239, 96615, 96618, 80242, 80243, 80244, 96621, 80246, 96627, 80248, 80249, 96628, 96633, 96635, 80253, 96637, 96642, 80259, 96645, 96648, 80267, 96653, 80270, 80272, 96656, 96657, 80275, 80276, 96658, 96660, 96661, 80280, 96662, 96664, 96666, 80284, 80285, 80286, 96667, 96668, 96674, 80291, 80292, 80294, 80295, 80296, 80297, 96679, 80299, 80300, 80301, 96680, 80303, 96685, 96686, 96687, 96690, 80308, 80309, 96691, 96692, 80312, 80313, 80314, 96693, 96695, 80317, 80318, 80319, 80320, 96699, 96700, 96704, 80324, 80325, 96705, 96707, 96710, 80329, 80330, 96711, 80332, 80333, 96712, 96718, 96720, 80337, 80338, 80339, 96723, 80341, 96726, 145878, 80342, 80343, 96724, 96731, 96732, 96725, 96734, 96735, 80346, 80347, 80348, 80349, 80350, 80351, 80354, 96741, 96742, 80356, 80358, 96739, 80362, 80363, 80364, 80366, 80367, 96749, 80369, 96750, 96751, 80372, 80373, 80374, 96753, 80376, 96754, 96755, 96756, 80380, 96757, 96758, 80383, 96761, 96762, 96765, 96768, 96770, 80389, 80390, 96774, 96777, 80395, 96779, 80397, 80399, 96784, 96785, 96787, 80404, 96788, 80407, 80408, 96791, 96793, 80412, 96796, 80415, 96799, 96800, 80417, 96801, 80420, 80421, 80422, 80423, 96804, 80425, 80426, 80427, 96805, 96807, 80430, 80431, 80432, 80433, 96810, 96812, 96813, 96816, 96819, 80439, 88631, 96821, 96825, 80444, 80445, 96828, 80450, 80451, 80452, 80455, 80456, 80457, 80458, 80460, 80462, 80464, 80466, 80467, 80471, 80472, 88664, 80474, 80477, 80478, 80479, 80480, 80483, 80485, 80487, 92524, 80490, 80491, 80492, 80493, 80495, 92526, 80498, 80499, 80500, 80501, 80503, 80504, 92528, 80508, 80509, 80510, 80511, 80512, 80519, 80520, 80521, 80523, 80524, 80525, 80526, 80527, 80528, 80531, 80532, 80533, 80536, 80539, 80541, 80548, 80549, 80550, 80555, 80556, 80559, 80560, 80561, 80563, 80565, 80568, 80569, 80571, 80572, 80573, 80576, 80577, 80579, 80582, 80583, 88776, 80585, 80586, 88778, 80589, 80592, 80594, 80597, 80599, 80602, 80606, 88857, 88858, 88859, 88860, 88864, 88869, 88870, 88871, 88873, 88874, 88880, 88881, 88882, 88883, 88884, 88886, 88887, 88888, 88891, 88893, 88894, 88895, 88897, 88901, 88902, 88904, 88905, 88906, 88907, 88908, 88909, 92570, 88912, 88913, 88914, 88915, 92571, 88917, 88918, 88919, 88921, 88923, 88924, 88925, 92578, 92581, 92583, 95925, 95929 ]
13e1990ca592df267558a53306197d4dbe1dc1cd
ce619437be3f83258a9b66e19d9eb6f756b97281
/uptous/uptous/model/Feed.swift
9e75343abb65dca952252de94dccd87f80b74c92
[]
no_license
uptous/iPhone-Version-2
ccd76baf8746223d74dfc1ffbc0c921ae6c4ddf6
1a3ae9d0d8ddcad389248571aa5d99158ee90ab5
refs/heads/master
2023-06-08T06:56:46.976676
2020-05-25T23:32:02
2020-05-25T23:32:02
69,285,966
0
0
null
null
null
null
UTF-8
Swift
false
false
2,807
swift
// // Feed.swift // uptous // // Created by Roshan Gita on 8/14/16. // Copyright © 2016 UpToUs. All rights reserved. // import UIKit class Feed: NSObject { var feedId: Int? var communityId: Int? var ownerId: Int? var ownerName: String? var ownerPhotoUrl: String? var ownerBackgroundColor: String? var ownerTextColor: String? var createDate: Double? var modifiedDate: Double? var communityName: String? var communityLogoUrl: String? var communityBackgroundColor: String? var communityTextColor: String? var newsType: String? var newsItemId: Int? var newsItemIndex: String? var newsItemName: String? var newsItemDescription: String? var newsItemUrl: String? var newsItemPhoto: String? var ownerEmail: String? var comments: NSArray? init(info: NSDictionary?) { super.init() self.feedId = info?.object(forKey: "feedId") as? Int ?? 0 self.communityId = info?.object(forKey: "communityId") as? Int ?? 0 self.ownerId = info?.object(forKey: "ownerId") as? Int ?? 0 self.ownerName = info?.object(forKey: "ownerName") as? String ?? "" self.ownerPhotoUrl = info?.object(forKey: "ownerPhotoUrl") as? String ?? "" self.ownerBackgroundColor = info?.object(forKey: "ownerBackgroundColor") as? String ?? "" self.ownerTextColor = info?.object(forKey: "ownerTextColor") as? String ?? "" self.createDate = info?.object(forKey: "createDate") as? Double ?? 0 self.modifiedDate = info?.object(forKey: "modifiedDate") as? Double ?? 0 self.communityName = info?.object(forKey: "communityName") as? String ?? "" self.communityLogoUrl = info?.object(forKey: "communityLogoUrl") as? String ?? "" self.communityBackgroundColor = info?.object(forKey: "communityBackgroundColor") as? String ?? "" self.communityTextColor = info?.object(forKey: "communityTextColor") as? String ?? "" self.communityName = info?.object(forKey: "communityName") as? String ?? "" self.newsType = info?.object(forKey: "newsType") as? String ?? "" self.newsItemId = info?.object(forKey: "newsItemId") as? Int ?? 0 self.newsItemIndex = info?.object(forKey: "newsItemIndex") as? String ?? "" self.newsItemName = info?.object(forKey: "newsItemName") as? String ?? "" self.newsItemDescription = info?.object(forKey: "newsItemDescription") as? String ?? "" self.newsItemUrl = info?.object(forKey: "newsItemUrl") as? String ?? "" self.newsItemPhoto = info?.object(forKey: "newsItemPhoto") as? String ?? "" self.ownerEmail = info?.object(forKey: "ownerEmail") as? String ?? "" self.comments = info?.object(forKey: "comments") as? NSArray ?? [] } }
[ -1 ]
ece242f37ee735857334a339ddbecdf8ed8fbe19
229cf3b6acd4a7ccdb99a2ee987336c57ec2f19e
/PlaceOnTheWall/Views/SinglePictureCell/SinglePictureCell.swift
8bac10f847b2a66a1854e4adffe567750e847447
[]
no_license
Soyka13/PlaceOnTheWall
9b55cdcd3496f6b50407c9026a0bc9fff9d70e56
bbcb1260a4cb46be672676d6325085a555fb3474
refs/heads/main
2023-05-06T20:18:17.817271
2021-05-27T13:04:18
2021-05-27T13:04:18
345,790,041
0
0
null
null
null
null
UTF-8
Swift
false
false
502
swift
// // SinglePictureCell.swift // PlaceOnTheWall // // Created by Olena Stepaniuk on 07.03.2021. // import UIKit class SinglePictureCell: UITableViewCell { @IBOutlet weak var picture: UIImageView! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 320001, 337412, 227845, 333831, 227849, 227852, 333837, 372750, 372753, 196114, 372754, 327190, 328214, 287258, 370207, 243746, 287266, 281636, 327224, 327225, 307277, 327248, 235604, 235611, 213095, 213097, 310894, 213109, 148600, 403068, 410751, 300672, 373913, 148637, 148638, 276639, 148648, 300206, 361651, 327360, 223437, 291544, 306907, 337627, 176358, 271087, 325874, 338682, 276746, 276756, 203542, 261406, 349470, 396065, 111912, 369458, 369461, 282934, 342850, 342851, 151881, 430412, 283471, 283472, 270679, 287067, 350050, 270691, 257898, 330602, 179568, 317296, 317302, 244600, 179578, 179580, 211843, 213891, 36743, 209803, 211370, 288690, 281014, 430546, 430547, 180695, 180696, 284131, 344039, 196076, 310778, 305661 ]
1f344397f07bbad12180a22f48e5ba5fd6fbdc3e
5a23a394ea69031f7eec99f2a338f347dc5e6cbd
/SHIELDHeroTracker/HeroTableViewController.swift
88e1a51aa09ebc43c77819b1c8572018af2c4ab7
[]
no_license
bmolinadelcampo/SHIELDHeroTracker
e496b9ef821e5184c9098278279b7890fba049e7
83163a3ddf6f82d87c89ea36cb730cbe874e7710
refs/heads/master
2016-09-13T07:26:01.534271
2016-04-26T13:16:06
2016-04-26T13:16:06
57,032,630
0
0
null
null
null
null
UTF-8
Swift
false
false
2,532
swift
// // HeroTableViewController.swift // SHIELDHeroTracker // // Created by Belén Molina del Campo on 25/04/2016. // Copyright © 2016 Belén Molina del Campo. All rights reserved. // import UIKit class HeroTableViewController: UITableViewController { var heroList: [Hero] = [] override func viewDidLoad() { super.viewDidLoad() self.title = "S.H.I.E.L.D Hero Tracker" loadHeroes() } // MARK: - Table view data source override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return heroList.count } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("heroCell", forIndexPath: indexPath) let currentHero = heroList[indexPath.row] cell.textLabel?.text = currentHero.name cell.detailTextLabel?.text = currentHero.homeworld return cell } // MARK: Navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "showDetail" { if let destinationViewController = segue.destinationViewController as? HeroDetailViewController { let selectedCell: UITableViewCell = sender as! UITableViewCell let selectedHero = heroList[(tableView.indexPathForCell(selectedCell)?.row)!] destinationViewController.hero = selectedHero } } } // MARK: Private Methods func loadHeroes() { if let path = NSBundle.mainBundle().pathForResource("heroes", ofType: "json") { do { let data = try! NSData(contentsOfFile: path, options: NSDataReadingOptions.DataReadingMappedIfSafe) print(data) if let jsonResult = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers) as? [[String: AnyObject]] { for heroDictionary in jsonResult { let newHero = Hero(dictionary: heroDictionary) heroList.append(newHero) } } } catch { print("error") } } } }
[ -1 ]
422dac5ba6407993babf11e5c26f577867235e88
967b755b13c84855ce986ac91e879a834952c864
/poof/Views/ContentView.swift
cafba232ddcc13cc5c3d348359e31fb750517377
[]
no_license
8ruka/poof
158a8ff461c0621710c6ba4d5fb560bf79a0ab33
d14657ed799c3afe18dc88c4213679f942909f2f
refs/heads/master
2020-09-02T06:06:03.653235
2019-11-17T16:23:49
2019-11-17T16:23:49
219,150,500
0
0
null
null
null
null
UTF-8
Swift
false
false
551
swift
// // ContentView.swift // poof // // Created by 松原明香 on 2019/09/24. // Copyright © 2019 松原明香. All rights reserved. // import SwiftUI struct ContentView: View { @EnvironmentObject var poof:Poof var body: some View { Group{ if poof.gameactive { LevelView() } else{ MenuView() } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environmentObject(Poof()) } }
[ -1 ]
0066e4c1d349090d5dbcdd4851603342e024d62d
b9f2ed98a1fc1245e414016991a751613a682e5a
/raywenderlich/Graphics+Animation/Pet Finder_Starter/Pet Finder/AppDelegate.swift
faa63c874dfaed33e05fa7d4203e2b6d2567885c
[]
no_license
abhijeetMishra101/raywenderlich
465b84fea3e667da4abdbcba8dc2556f1498920e
8c11aabd3b90fa996e75d4430d73b17deb86b679
refs/heads/master
2021-01-13T14:56:33.993870
2017-02-21T09:49:49
2017-02-21T09:49:49
76,640,668
0
0
null
null
null
null
UTF-8
Swift
false
false
527
swift
// // AppDelegate.swift // Pet Finder // // Created by Essan Parto on 5/16/15. // Copyright (c) 2015 Ray Wenderlich. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let currentTheme = ThemeManager.currentTheme() ThemeManager.applyTheme(theme: currentTheme) return true } }
[ -1 ]
9551c143f1465746ba6af972a1856b7563afa15a
193a486fc3f4ebe20417c646ce619b514721c7f7
/GatorRenter/MyApartmentsViewController.swift
262fe21370f81993940f628bcd2b39a1b17d4c68
[]
no_license
anilphoenix/GatorRenter
e2371137f7c53c1141dbafa1542b18e9c252556a
8949ed98b6a24764b252691077a185396a8430ca
refs/heads/master
2021-01-12T07:50:19.644258
2017-03-24T08:47:07
2017-03-24T08:47:07
77,036,602
0
0
null
null
null
null
UTF-8
Swift
false
false
3,008
swift
// // MyApartmentsViewController.swift // GatorRenter // // Created by Saad Abdullah Gondal on 3/23/17. // Copyright © 2017 fdai4856. All rights reserved. // import UIKit class MyApartmentsViewController: UIViewController { @IBOutlet weak var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.setNavigationBarItem() } @IBAction func postApartmentTouchUpInside(_ sender: Any) { // let storyboard = UIStoryboard(name: "Main", bundle: nil) // let addApartmentViewController = storyboard.instantiateViewController(withIdentifier: "AddApartmentViewController") as! AddApartmentViewController performSegue(withIdentifier:"AddApartmentForm", sender: self) } } extension MyApartmentsViewController : UITableViewDelegate { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { if let menu = LeftMenu(rawValue: indexPath.row) { switch menu { case .main, .login, .signup, .logout, .myApartments, .account, .nonMenu: return BaseTableViewCell.height() } } return 0 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // var _menu: LeftMenu? = LeftMenu(rawValue: indexPath.row)! // if userLoggedIn && (_menu?.rawValue)! > 0 { // _menu = LeftMenu(rawValue: (_menu?.rawValue)! + 2)! // } // // if let menu = _menu { // self.changeViewController(menu) // } } func scrollViewDidScroll(_ scrollView: UIScrollView) { // if self.tableView == scrollView { // // } } } extension MyApartmentsViewController : UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // if let _ = UserDefaults.standard.dictionary(forKey: "UserInfo") { // menus = loggedInMenus // } // else { // menus = loggedOutMenus // } return 1 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { // if let menu = LeftMenu(rawValue: indexPath.row) { // switch menu { // case .main, .login, .signup, .logout, .myApartments, .account, .nonMenu: // let cell = BaseTableViewCell(style: UITableViewCellStyle.subtitle, reuseIdentifier: BaseTableViewCell.identifier) // cell.setData(menus[indexPath.row]) // return cell // } // } return UITableViewCell() } }
[ -1 ]
146a2cec9a74d2b3938e7268815e99a024123325
28e4eef87645a041e4b25d0e67c599aaf52f2fe2
/My Grape Vine/My Grape Vine/SortingTableVC.swift
6086338659378b28433327d2fecd7e79e5968db5
[]
no_license
bxc1712/WineJournal
9382378b470506914376cdba42627e934fad2757
52038c4d75a3f80ff7339e9efe2ab1b1aa783f2c
refs/heads/master
2021-03-13T00:46:42.919275
2017-05-17T19:26:30
2017-05-17T19:26:30
91,472,423
0
0
null
null
null
null
UTF-8
Swift
false
false
3,450
swift
// // SortingTableVC.swift // My Grape Vine // // Created by BENJAMIN CHENG (RIT Student) on 5/16/17. // Copyright © 2017 Daniel Martin (RIT Student). All rights reserved. // import UIKit class SortingTableVC: UITableViewController { override func viewDidLoad() { super.viewDidLoad() // Uncomment the following line to preserve selection between presentations // self.clearsSelectionOnViewWillAppear = false // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return WineData.sharedData.sortingOptions.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "ascDesc", for: indexPath) cell.textLabel?.text = WineData.sharedData.sortingOptions[indexPath.row] return cell } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { var order = String() order = WineData.sharedData.sortingOptions[indexPath.row] print(order) } /* // Override to support conditional editing of the table view. override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the specified item to be editable. return true } */ /* // Override to support editing the table view. override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { // Delete the row from the data source tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } */ /* // Override to support rearranging the table view. override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } */ /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
b9b13cfe2ca6e4b519a5dd20f2d41857cf8fa478
16c467d570a9077fb716572650951dc8ce382049
/Tests/VaporRestKitTests/Models/Entities/ReferralCode.swift
8ee4d0914594e29c0f30697d0568424fd816d2dc
[ "MIT" ]
permissive
fananek/vapor-rest-kit
8083dc12d2bbb2eadb8927cf54235dbdd9a5c0e7
dcf58f637d5d815ca60a2d439714eb36e95ccb7e
refs/heads/master
2023-02-02T16:43:59.594413
2020-12-19T14:25:48
2020-12-19T14:25:48
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,752
swift
// // File.swift // // // Created by Sergey Kazakov on 09.06.2020. // import Vapor import Fluent import VaporRestKit extension ReferralCode: FieldsProvidingModel { enum Fields: String, FieldKeyRepresentable { case code } } final class ReferralCode: Model, Content { static var schema = "referal_codes" init() { } @ID(custom: .id) var id: Int? @Field(key: Fields.code.key) var code: String @Children(for: \.$refrerralCode) var users: [User] init(id: Int? = nil, code: String = "") { self.id = id self.code = code } } //MARK:- InitMigratableSchema extension ReferralCode: InitMigratableSchema { static func prepare(on schemaBuilder: SchemaBuilder) -> EventLoopFuture<Void> { return schemaBuilder .field(.id, .int, .identifier(auto: true)) .field(Fields.code.key, .string, .required) .create() } } extension ReferralCode { struct Output: ResourceOutputModel { let id: Int? let code: String init(_ model: ReferralCode, req: Request) { id = model.id code = model.code } } struct Input: ResourceUpdateModel { let code: String func update(_ model: ReferralCode) -> ReferralCode { model.code = code return model } static func validations(_ validations: inout Validations) { } } struct PatchInput: ResourcePatchModel { let code: String? func patch(_ model: ReferralCode) -> ReferralCode { model.code = code ?? model.code return model } static func validations(_ validations: inout Validations) { } } }
[ -1 ]
246195db9bd065d3320e487e4c134900b74bcef9
1e064663189001e0cfbdb8bae6d9b91113e70f1f
/Specs/TBX/generated/Swift/Sources/Requests/UserService/UserServiceCreateToken.swift
16f3a0cf702dddc5499f5318973d1b321757544a
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
massiveinteractive/SwagGen
58cf3606722570d2b323d37a522a62d74c8a9ebc
a8e170cb045e33e99cfd2d0c578c1db62387d9b0
refs/heads/master
2021-06-23T12:27:13.914824
2019-05-28T03:44:21
2019-05-28T03:44:21
188,953,669
1
3
MIT
2021-01-11T16:22:31
2019-05-28T04:27:04
Swift
UTF-8
Swift
false
false
6,931
swift
// // Generated by SwagGen // https://github.com/yonaskolb/SwagGen // import Foundation extension TBX.UserService { /** Create a Token to automatically sing in a customer without pass to IDP login page */ public enum UserServiceCreateToken { public static let service = APIService<Response>(id: "UserService.createToken", tag: "UserService", method: "POST", path: "/UserServices/token", hasBody: true) public final class Request: APIRequest<Response> { public struct Options { /** The customer subscriber id */ public var subscriberId: String /** The customer country code */ public var country: String /** Type of Token */ public var type: String /** Extra data to device */ public var attributes: String? /** Token credits */ public var credits: Double? /** Token expiration date */ public var expiration: DateTime? public init(subscriberId: String, country: String, type: String, attributes: String? = nil, credits: Double? = nil, expiration: DateTime? = nil) { self.subscriberId = subscriberId self.country = country self.type = type self.attributes = attributes self.credits = credits self.expiration = expiration } } public var options: Options public init(options: Options) { self.options = options super.init(service: UserServiceCreateToken.service) } /// convenience initialiser so an Option doesn't have to be created public convenience init(subscriberId: String, country: String, type: String, attributes: String? = nil, credits: Double? = nil, expiration: DateTime? = nil) { let options = Options(subscriberId: subscriberId, country: country, type: type, attributes: attributes, credits: credits, expiration: expiration) self.init(options: options) } public override var formParameters: [String: Any] { var params: [String: Any] = [:] params["subscriberId"] = options.subscriberId params["country"] = options.country params["type"] = options.type if let attributes = options.attributes { params["attributes"] = attributes } if let credits = options.credits { params["credits"] = credits } if let expiration = options.expiration?.encode() { params["expiration"] = expiration } return params } } public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { public typealias SuccessType = TokenObject /** Request was successful */ case status200(TokenObject) /** Bad Request */ case status400(ResponseError) /** Unauthorized */ case status401(ResponseError) /** Customer or Device not Found */ case status404(ResponseError) /** Device was Logged Out or the customer not longer exists */ case status410(ResponseError) public var success: TokenObject? { switch self { case .status200(let response): return response default: return nil } } public var failure: ResponseError? { switch self { case .status400(let response): return response case .status401(let response): return response case .status404(let response): return response case .status410(let response): return response default: return nil } } /// either success or failure value. Success is anything in the 200..<300 status code range public var responseResult: APIResponseResult<TokenObject, ResponseError> { if let successValue = success { return .success(successValue) } else if let failureValue = failure { return .failure(failureValue) } else { fatalError("Response does not have success or failure response") } } public var response: Any { switch self { case .status200(let response): return response case .status400(let response): return response case .status401(let response): return response case .status404(let response): return response case .status410(let response): return response } } public var statusCode: Int { switch self { case .status200: return 200 case .status400: return 400 case .status401: return 401 case .status404: return 404 case .status410: return 410 } } public var successful: Bool { switch self { case .status200: return true case .status400: return false case .status401: return false case .status404: return false case .status410: return false } } public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { switch statusCode { case 200: self = try .status200(decoder.decode(TokenObject.self, from: data)) case 400: self = try .status400(decoder.decode(ResponseError.self, from: data)) case 401: self = try .status401(decoder.decode(ResponseError.self, from: data)) case 404: self = try .status404(decoder.decode(ResponseError.self, from: data)) case 410: self = try .status410(decoder.decode(ResponseError.self, from: data)) default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) } } public var description: String { return "\(statusCode) \(successful ? "success" : "failure")" } public var debugDescription: String { var string = description let responseString = "\(response)" if responseString != "()" { string += "\n\(responseString)" } return string } } } }
[ -1 ]
9874a55d8a23e266913c3cfe5aad5d1dac4909f5
f76dba0e01695b24e323d3b0fed8e64994748ddb
/UltimatePegSolitaireTests/DepthFirstSearchTest.swift
14438de6f14c61fc0c31924c40007af2667f745a
[ "Apache-2.0" ]
permissive
mkhrapov/ultimate-peg-solitaire
fe82d93306ccfeeb9a60306b0439822dfe675dd0
5069b9f8ae6dc5fdecf36fecd4899f326c1c5fff
refs/heads/master
2021-08-08T09:36:03.144906
2021-07-18T18:39:34
2021-07-18T18:39:34
186,185,957
4
5
null
null
null
null
UTF-8
Swift
false
false
3,310
swift
// // DepthFirstSearchTest.swift // UltimatePegSolitaireTests // // Created by Maksim Khrapov on 1/8/20. // Copyright © 2020 Maksim Khrapov. All rights reserved. // // https://www.ultimatepegsolitaire.com/ // https://github.com/mkhrapov/ultimate-peg-solitaire // // 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, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import XCTest class DepthFirstSearchTest: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testEmptyBoard() { let b = Board(7, 7, 3, 3, "English", [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]) let graph = GraphRepresentation(b) XCTAssert(!graph.isConnected()) } func testConnectedBoard() { let b = Board(7, 7, 3, 3, "English", [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0 ]) let graph = GraphRepresentation(b) XCTAssert(graph.isConnected()) } func testDisjointBoard() { let b = Board(7, 7, 3, 3, "English", [ 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1 ]) let graph = GraphRepresentation(b) XCTAssert(!graph.isConnected()) } func testFullyDisconnectedNode() { let b = Board(7, 7, 3, 3, "English", [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1 ]) let graph = GraphRepresentation(b) XCTAssert(!graph.isConnected()) } func testNodeOnlyConnectedByTheAngle() { let b = Board(7, 7, 3, 3, "English", [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1 ]) let graph = GraphRepresentation(b) XCTAssert(!graph.isConnected()) } }
[ -1 ]
79ee87c57380a1f815502d5a2a272c0984cacbfb
256e819d9a35f87fd4ffc24d66b2175fd9b64993
/Carthage/Checkouts/swift-sdk/Source/AssistantV2/Models/DialogSuggestion.swift
b68c91e4603162331c17bf338425c87c7d3e6e9b
[ "MIT", "Apache-2.0" ]
permissive
arakilian0/zfood
bb1aefb65d8c0eedd93143ae2c1867305e9388da
7d82975cf6ef6d3afefdf72db7232e2762d57850
refs/heads/master
2020-06-16T04:05:25.992334
2019-08-25T07:50:55
2019-08-25T07:50:55
195,474,775
7
0
null
null
null
null
UTF-8
Swift
false
false
1,519
swift
/** * (C) Copyright IBM Corp. 2018. * * 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, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **/ import Foundation import RestKit /** DialogSuggestion. */ public struct DialogSuggestion: Codable, Equatable { /** The user-facing label for the disambiguation option. This label is taken from the **user_label** property of the corresponding dialog node. */ public var label: String /** An object defining the message input to be sent to the assistant if the user selects the corresponding disambiguation option. */ public var value: DialogSuggestionValue /** The dialog output that will be returned from the Watson Assistant service if the user selects the corresponding option. */ public var output: [String: JSON]? // Map each property name to the key that shall be used for encoding/decoding. private enum CodingKeys: String, CodingKey { case label = "label" case value = "value" case output = "output" } }
[ -1 ]
1db40a7dafbce7590aee08c3ae76f532a629edef
47fedf81eca4a40edf02d9621ab1ae05f93df0c2
/Pokefy/HomeViewController.swift
27066c4f3f5a662725866c15b516c31f67d70b00
[]
no_license
ThePowerOfSwift/christmas-photo-effect
de1a3f47ecce1f615c14fb629e19be936d1da65b
5d9a4a41397486bb7b454e673aa67c148a0dfbb0
refs/heads/master
2021-10-28T03:40:00.861019
2019-04-21T11:09:12
2019-04-21T11:09:12
null
0
0
null
null
null
null
UTF-8
Swift
false
false
7,423
swift
// // HomeViewController.swift // Pokefy // // Created by Saad on 7/24/16. // Copyright © 2016 Saad. All rights reserved. // import UIKit import GoogleMobileAds class HomeViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIAlertViewDelegate, GADInterstitialDelegate { @IBOutlet var sliderImage: UIImageView! @IBOutlet var containerWidthConstraint: NSLayoutConstraint! var iMinSessions = 3 var iTryAgainSessions = 6 override func viewDidLoad() { super.viewDidLoad() screenWidth = UIScreen.main.bounds.size.width screenHeight = UIScreen.main.bounds.size.height init_data() if (UI_USER_INTERFACE_IDIOM() == .pad) { Helper.changeMultiplier(containerWidthConstraint, multiplier: 0.8) } let images = [UIImage(named: "slider1")!, UIImage(named: "slider2")!, UIImage(named: "slider3")!, UIImage(named: "slider4")!] sliderImage.animationImages = images sliderImage.animationDuration = 10 sliderImage.startAnimating() /*UIView.transition(with: sliderImage, duration: 5, options: .transitionFlipFromBottom, animations: {() -> Void in self.sliderImage.image! = UIImage(named: "slider1")! }, completion: {(_ done: Bool) -> Void in UIView.transition(with: self.sliderImage, duration: 5, options: .transitionFlipFromBottom, animations: {() -> Void in self.sliderImage.image! = UIImage(named: "slider2")! }, completion: {(_ done: Bool) -> Void in UIView.transition(with: self.sliderImage, duration: 5, options: .transitionFlipFromBottom, animations: {() -> Void in self.sliderImage.image! = UIImage(named: "slider3")! }, completion: {(_ done: Bool) -> Void in }) }) })*/ // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func viewWillAppear(_ animated: Bool) { rateMe() interstitialAd = createAndLoadInterstitial() stickersImageArray.removeAll() stickersImagePosition.removeAll() } func init_data() { if(UserDefaults.standard.bool(forKey: "HasLaunchedOnce")) { // app already launched print("Already Launched") } else { // This is the first launch ever print("First Launch") UserDefaults.standard.set(true, forKey: "HasLaunchedOnce") //In App Purchase Initialization UserDefaults.standard.set(100, forKey: "CoinCount") UserDefaults.standard.set(unlockedStickers, forKey: "UnlockedStickers") UserDefaults.standard.set(false, forKey: "RemoveWatermarkAd") UserDefaults.standard.synchronize() } } func imagePickerController(_ picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [AnyHashable: Any]?) { takenImage = image self.dismiss(animated: false, completion: nil) goToCropImageVC() } func goToCropImageVC() { let ciVC = self.storyboard?.instantiateViewController(withIdentifier: "CropViewController") as! CropViewController present(ciVC, animated: true, completion: nil) } @IBAction func moreAppsButtonTapped(_ sender: UIButton) { //showInterstitialAd() UIApplication.shared.openURL(NSURL(string: DEVELOPER_PAGE_LINK)! as URL) } @IBAction func purchaseButtonTapped(_ sender: UIButton) { let iapVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "InAppPurchaseViewController") as! InAppPurchaseViewController self.addChildViewController(iapVC) iapVC.view.frame = self.view.frame self.view.addSubview(iapVC.view) iapVC.didMove(toParentViewController: self) } @IBAction func rateButtonTapped(_ sender: UIButton) { UIApplication.shared.openURL(URL(string: APP_STORE_LINK)!) } @IBAction func cameraButtonTapped(_ sender: UIButton) { if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.camera) { let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType = UIImagePickerControllerSourceType.camera; imagePicker.modalTransitionStyle = UIModalTransitionStyle.crossDissolve self.present(imagePicker, animated: true, completion: nil) } } @IBAction func libraryButtonTapped(_ sender: UIButton) { if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.photoLibrary) { let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType = UIImagePickerControllerSourceType.photoLibrary; imagePicker.modalTransitionStyle = UIModalTransitionStyle.crossDissolve self.present(imagePicker, animated: true, completion: nil) } } func rateMe() { let neverRate = UserDefaults.standard.bool(forKey: "neverRate") var numLaunches = UserDefaults.standard.integer(forKey: "numLaunches") + 1 if (!neverRate && (numLaunches == iMinSessions || numLaunches >= (iMinSessions + iTryAgainSessions + 1))) { showRateMe() numLaunches = iMinSessions + 1 } UserDefaults.standard.set(numLaunches, forKey: "numLaunches") } func showRateMe() { let alert = UIAlertController(title: "Rate Us", message: "Do you love this app?", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "Rate it Now!", style: UIAlertActionStyle.default, handler: { alertAction in UIApplication.shared.openURL(URL(string : APP_STORE_LINK)!) alert.dismiss(animated: true, completion: nil) })) alert.addAction(UIAlertAction(title: "No Thanks", style: UIAlertActionStyle.default, handler: { alertAction in UserDefaults.standard.set(true, forKey: "neverRate") alert.dismiss(animated: true, completion: nil) })) alert.addAction(UIAlertAction(title: "Maybe Later", style: UIAlertActionStyle.default, handler: { alertAction in alert.dismiss(animated: true, completion: nil) })) self.present(alert, animated: true, completion: nil) } func createAndLoadInterstitial() -> GADInterstitial { let request = GADRequest() let interstitial = GADInterstitial(adUnitID: ADMOB_AD_UNIT_ID_INTERSTATIAL) interstitial.delegate = self interstitial.load(request) return interstitial } func showInterstitialAd() { if interstitialAd != nil { if interstitialAd!.isReady { interstitialAd?.present(fromRootViewController: self) print("Ad presented") } else { print("Ad was not ready for presentation") } } } }
[ -1 ]
0f725898994c3e3b211d791d48c05b3e97b4863e
27608eb5db85a0c1e900ba845cdac57270be9a48
/Krypto/viewController/CardLinkingViewController.swift
80c88b59a9a960359745cf6463eda2a39e7f9e83
[]
no_license
kuramu1108/krypto
c714d65d50957ba8c744fc6977221097158d5a35
a242fc496c77d1c90f3bfd8e63ceac113a232f05
refs/heads/master
2022-11-16T20:30:21.047285
2020-07-15T12:46:42
2020-07-15T12:46:42
279,866,406
0
0
null
null
null
null
UTF-8
Swift
false
false
4,104
swift
// // SecondViewController.swift // Krypto // // Created by Po-Hao Chen on 2020/5/29. // Copyright © 2020 Po-Hao Chen. All rights reserved. // import UIKit import RxSwift import RxCocoa class CardLinkingViewController: UIViewController,UITextFieldDelegate { let vm = CardLinkingViewModel() let bag = DisposeBag() @IBOutlet weak var nickname: UITextField! @IBOutlet weak var CardNumberField: UITextField! @IBOutlet weak var NameField: UITextField! @IBOutlet weak var expiryMonth: UITextField! @IBOutlet weak var expiryYear: UITextField! @IBOutlet weak var CVVField: UITextField! var activeField: UITextField? override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. setupUI() setupBinding() } func setupUI() { self.title = "Card Linking" self.CardNumberField.delegate = self self.NameField.delegate = self self.expiryMonth.delegate = self self.CVVField.delegate = self self.expiryYear.delegate = self self.nickname.delegate = self self.CardNumberField.keyboardType = UIKeyboardType.numberPad self.expiryMonth.keyboardType = UIKeyboardType.numberPad self.CVVField.keyboardType = UIKeyboardType.numberPad } func setupBinding() { vm.isValidCard .observeOn(MainScheduler.instance) .subscribe(onNext: { [unowned self] isValid in if isValid { let alert = UIAlertController(title: "Card Linked", message: "You can now deposit with your card", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Confirm", style: .default, handler: { (action) in self.nickname.text = "" self.CardNumberField.text = "" self.NameField.text = "" self.expiryMonth.text = "" self.expiryYear.text = "" self.CVVField.text = "" return })) self.present(alert, animated: true) } else { let alert = UIAlertController(title: "Card Not Valid", message: "Please check the detail entered", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { (action) in return })) self.present(alert, animated: true) } }) .disposed(by: bag) } @IBAction func confirmAttempt(_ sender: Any) { vm.saveCard(nickname: nickname.text!, cardNumber: CardNumberField.text!, cardHolder: NameField.text!, expiryMonth: expiryMonth.text!, expiryYear: expiryYear.text!, cvv: CVVField.text!) } // MARK: - TextField func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { var maxLength = 0 if textField == CardNumberField { maxLength = 16 } else if textField == NameField{ maxLength = 20 } else if textField == expiryMonth { maxLength = 2 } else if textField == expiryYear { maxLength = 2 } else if textField == CVVField { maxLength = 3 } else if textField == nickname { maxLength = 30 } let currentString : NSString = textField.text! as NSString let newString:NSString = currentString.replacingCharacters(in: range, with: string) as NSString return newString.length <= maxLength } func textFieldDidBeginEditing(_ textField: UITextField) { activeField = textField } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { activeField?.resignFirstResponder() } func textFieldShouldReturn(_ textField: UITextField) -> Bool { textField.resignFirstResponder() return true } }
[ -1 ]
2eff1aa5d2cd1729df8274768c7ffcba97555f2f
b24b11581d462180062555a021ce7cb77184abfc
/HT 1UITests/HT_1UITests.swift
f620482329b2b4ecca89f0d87f99018dcdf46de4
[]
no_license
rimaltseva/Homework-1
d0444524148ad151f5d0386661c771dcb12e79d4
3179de2dbcf0d814166117f18fe54e5bf1933d66
refs/heads/main
2023-02-04T07:02:43.733981
2020-12-03T00:32:36
2020-12-03T00:32:36
317,976,040
0
0
null
null
null
null
UTF-8
Swift
false
false
1,430
swift
// // HT_1UITests.swift // HT 1UITests // // Created by Маргарита Мальцева on 02.12.2020. // import XCTest class HT_1UITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } } }
[ 360463, 155665, 376853, 344106, 253996, 385078, 163894, 180279, 319543, 352314, 213051, 376892, 32829, 286787, 352324, 237638, 352327, 385095, 393291, 163916, 368717, 311373, 196687, 278607, 311377, 254039, 426074, 368732, 180317, 32871, 352359, 221292, 278637, 385135, 319599, 376945, 131190, 385147, 131199, 426124, 196758, 49308, 65698, 311459, 49317, 377008, 377010, 180409, 295099, 377025, 377033, 164043, 417996, 254157, 368849, 368850, 139478, 229591, 385240, 254171, 147679, 147680, 311520, 205034, 254189, 286957, 254193, 344312, 336121, 262403, 147716, 385291, 368908, 180494, 262419, 368915, 254228, 319764, 278805, 377116, 254250, 311596, 131374, 418095, 336177, 368949, 180534, 155968, 287040, 311622, 270663, 319816, 368969, 254285, 180559, 377168, 344402, 229716, 368982, 270703, 139641, 385407, 385409, 270733, 106893, 385423, 385433, 213402, 385437, 254373, 156069, 385448, 385449, 311723, 115116, 385463, 319931, 278974, 336319, 336323, 188870, 278988, 278992, 262619, 377309, 377310, 369121, 369124, 279014, 270823, 279017, 311787, 213486, 360945, 139766, 393719, 279030, 377337, 279033, 254459, 410108, 410109, 262657, 377346, 279042, 279053, 410126, 262673, 385554, 393745, 303635, 279060, 279061, 254487, 410138, 279066, 188957, 377374, 385569, 385578, 377388, 197166, 393775, 418352, 33339, 352831, 33344, 385603, 377419, 385612, 303693, 426575, 385620, 369236, 115287, 189016, 270938, 287327, 279143, 279150, 287345, 352885, 352886, 344697, 189054, 287359, 385669, 369285, 311944, 344714, 311950, 377487, 311953, 287379, 336531, 180886, 426646, 352921, 377499, 221853, 344737, 295591, 352938, 295598, 418479, 279215, 279218, 164532, 336565, 287418, 377531, 303802, 377534, 377536, 66243, 385737, 287434, 385745, 279249, 303826, 369365, 369366, 385751, 230105, 361178, 352989, 352990, 418529, 295649, 385763, 295653, 369383, 230120, 361194, 312046, 418550, 344829, 279293, 205566, 197377, 434956, 312076, 295698, 418579, 426772, 197398, 426777, 221980, 344864, 197412, 336678, 262952, 189229, 262957, 164655, 197424, 328495, 197428, 336693, 230198, 377656, 426809, 197433, 222017, 295745, 377669, 197451, 369488, 279379, 385878, 385880, 295769, 197467, 435038, 230238, 279393, 303973, 279398, 385895, 197479, 385901, 197489, 295799, 164730, 336765, 254851, 369541, 172936, 320394, 426894, 189327, 377754, 337226, 172971, 140203, 377778, 304050, 189362, 189365, 377789, 189373, 345030, 345034, 279499, 418774, 386007, 386009, 418781, 386016, 123880, 418793, 320495, 222193, 435185, 271351, 214009, 312313, 435195, 312317, 328701, 386049, 328705, 418819, 410629, 377863, 189448, 230411, 320526, 361487, 435216, 386068, 254997, 336928, 336930, 410665, 345137, 361522, 312372, 238646, 238650, 320571, 386108, 410687, 336962, 238663, 377927, 361547, 205911, 156763, 361570, 230500, 214116, 214119, 402538, 279659, 173168, 230514, 238706, 279666, 312435, 377974, 66684, 377986, 279686, 402568, 222344, 140426, 337037, 386191, 410772, 222364, 418975, 124073, 402618, 148674, 402632, 148687, 402641, 189651, 419028, 279766, 189656, 304353, 279780, 222441, 279789, 386288, 66802, 271607, 369912, 386296, 369913, 419066, 386300, 279803, 386304, 320769, 369929, 419097, 320795, 115997, 222496, 320802, 304422, 369964, 353581, 116014, 312628, 345397, 345398, 386363, 222523, 230730, 353611, 337228, 353612, 345418, 296269, 222542, 353617, 238928, 296274, 378201, 230757, 296304, 312688, 337280, 353672, 263561, 296328, 296330, 304523, 370066, 9618, 411028, 279955, 370072, 148899, 148900, 361928, 337359, 329168, 312785, 222674, 329170, 353751, 280025, 239069, 329181, 320997, 361958, 271850, 280042, 280043, 271853, 329198, 411119, 337391, 116209, 296434, 386551, 288252, 312830, 271880, 198155, 304655, 329231, 370200, 222754, 157219, 157220, 394793, 312879, 288305, 288319, 288322, 280131, 288328, 353875, 99937, 345697, 312937, 271980, 206447, 403057, 42616, 337533, 280193, 370307, 419462, 149127, 149128, 419464, 288391, 411275, 214667, 239251, 345753, 198304, 255651, 337590, 370359, 280252, 280253, 321217, 239305, 296649, 403149, 313042, 345813, 370390, 272087, 345817, 337638, 345832, 181992, 345835, 288492, 141037, 313082, 288508, 288515, 173828, 395018, 395019, 116491, 395026, 124691, 116502, 435993, 345882, 411417, 321308, 255781, 362281, 378666, 403248, 378673, 345910, 182070, 182071, 436029, 345918, 337734, 280396, 272207, 272208, 337746, 395092, 362326, 345942, 370526, 345950, 362336, 255844, 296807, 214894, 362351, 313200, 214896, 313204, 124795, 182145, 280451, 67464, 305032, 337816, 124826, 239515, 329627, 354210, 436130, 436135, 10153, 313257, 362411, 370604, 362418, 411587, 280517, 362442, 346066, 231382, 354268, 436189, 403421, 329696, 354273, 403425, 190437, 354279, 436199, 174058, 337899, 354283, 247787, 296942, 247786, 313322, 436209, 124912, 239610, 182277, 346117, 403463, 43016, 354312, 354311, 354310, 313356, 436235, 419857, 305173, 436248, 223269, 346153, 354346, 313388, 124974, 272432, 403507, 378933, 378934, 436283, 288835, 403524, 436293, 313415, 239689, 436304, 223317, 411738, 272477, 280676, 313446, 395373, 288878, 346237, 215165, 436372, 329884, 378186, 362658, 436388, 215204, 125108, 133313, 395458, 338118, 436429, 346319, 321744, 379102, 387299, 18661, 379110, 338151, 125166, 149743, 379120, 436466, 125170, 411892, 436471, 395511, 313595, 436480, 125184, 272644, 125192, 338187, 338188, 125197, 395536, 125200, 338196, 272661, 379157, 125204, 157973, 125215, 125216, 338217, 125225, 321839, 125236, 362809, 379193, 395591, 289109, 272730, 436570, 215395, 239973, 280938, 321901, 354671, 362864, 354672, 272755, 354678, 199030, 223611, 248188, 313726, 436609, 240003, 436613, 395653, 395660, 264591, 272784, 420241, 240020, 190870, 43416, 190872, 289185, 436644, 289195, 272815, 436659, 338359, 436677, 289229, 281038, 281039, 256476, 420326, 166403, 322057, 420374, 322077, 289328, 330291, 322119, 191065, 436831, 420461, 313970, 346739, 346741, 420473, 297600, 166533, 363155, 346771, 264855, 363161, 289435, 436897, 248494, 166581, 355006, 363212, 363228, 436957, 322269, 436960, 264929, 338658, 289511, 330473, 346859, 330476, 289517, 215790, 199415, 289534, 322302, 35584, 133889, 322312, 346889, 264971, 322320, 166677, 207639, 363295, 355117, 191285, 273209, 355129, 273211, 355136, 355138, 420680, 355147, 355148, 355153, 281426, 387927, 363353, 363354, 281434, 322396, 420702, 363361, 363362, 412516, 355173, 355174, 281444, 207724, 355182, 207728, 420722, 314240, 158594, 330627, 240517, 265094, 387977, 396171, 355216, 224146, 224149, 256918, 256919, 256920, 240543, 256934, 273336, 289720, 289723, 273341, 330688, 379845, 363462, 19398, 273353, 191445, 207839, 347104, 314343, 134124, 412653, 248815, 257007, 347122, 437245, 257023, 125953, 396292, 330759, 347150, 330766, 412692, 330789, 248871, 281647, 412725, 257093, 404550, 314437, 207954, 339031, 404582, 257126, 265318, 322664, 265323, 396395, 404589, 273523, 363643, 248960, 150656, 363658, 404622, 224400, 265366, 347286, 429209, 339101, 429216, 339106, 380069, 265381, 3243, 208044, 322733, 421050, 339131, 265410, 183492, 273616, 421081, 339167, 298209, 421102, 363769, 52473, 208123, 52476, 412926, 437504, 322826, 388369, 380178, 429332, 126229, 412963, 257323, 437550, 273713, 298290, 208179, 159033, 347451, 216387, 372039, 257353, 257354, 109899, 437585, 331091, 150868, 314708, 372064, 429410, 437602, 281958, 388458, 265579, 306541, 314734, 314740, 314742, 421240, 314745, 224637, 388488, 298378, 306580, 282008, 396697, 314776, 282013, 290206, 396709, 298406, 241067, 314797, 380335, 355761, 421302, 134586, 380348, 216510, 380350, 216511, 306630, 200136, 273865, 306634, 339403, 372172, 413138, 421338, 437726, 429540, 3557, 3559, 191980, 282097, 191991, 265720, 216575, 290304, 372226, 437766, 323083, 208397, 323088, 413202, 413206, 388630, 175640, 216610, 372261, 347693, 323120, 396850, 200245, 323126, 290359, 134715, 323132, 421437, 396865, 282182, 413255, 273992, 265800, 421452, 265809, 396885, 290391, 265816, 396889, 306777, 388699, 396896, 323171, 388712, 388713, 314997, 290425, 339579, 396927, 282248, 224907, 396942, 405140, 274071, 323226, 208547, 208548, 405157, 388775, 282279, 364202, 421556, 224951, 224952, 306875, 282302, 323262, 323265, 241360, 241366, 224985, 282330, 159462, 372458, 397040, 12017, 323315, 274170, 200444, 175874, 249606, 323335, 282379, 216844, 372497, 397076, 421657, 339746, 216868, 241447, 167720, 257831, 421680, 282418, 421686, 274234, 241471, 339782, 315209, 159563, 241494, 339799, 307038, 274276, 282471, 274288, 372592, 274296, 339840, 315265, 372625, 282517, 298912, 118693, 438186, 126896, 151492, 380874, 372699, 323554, 380910, 380922, 380923, 274432, 372736, 241695, 315431, 430120, 102441, 315433, 430127, 405552, 282671, 241717, 249912, 225347, 307269, 421958, 233548, 176209, 381013, 53334, 315477, 356446, 323678, 438374, 176231, 438378, 233578, 217194, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 241809, 323730, 430231, 200856, 422044, 192670, 192671, 299166, 258213, 299176, 323761, 184498, 430263, 266427, 356550, 299208, 372943, 266447, 258263, 356575, 307431, 438512, 372979, 389364, 381173, 135416, 356603, 184574, 266504, 217352, 61720, 381210, 315674, 282908, 389406, 282912, 233761, 438575, 315698, 266547, 397620, 332084, 438583, 127292, 438592, 332100, 323914, 201037, 397650, 348499, 250196, 348501, 389465, 332128, 110955, 242027, 242028, 160111, 250227, 315768, 291193, 438653, 291200, 266628, 340356, 242059, 225684, 373141, 373144, 291225, 389534, 397732, 373196, 176602, 242138, 184799, 291297, 201195, 324098, 233987, 340489, 397841, 283154, 258584, 397855, 291359, 348709, 348710, 397872, 283185, 234037, 340539, 266812, 438850, 348741, 381515, 348748, 430681, 332379, 242274, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 356990, 291455, 373377, 422529, 201348, 152196, 356998, 348807, 356999, 316044, 316050, 275102, 176805, 340645, 422567, 176810, 160441, 422591, 291529, 225996, 135888, 242385, 234216, 373485, 373486, 21239, 275193, 348921, 234233, 242428, 299777, 430853, 430860, 62222, 430880, 234276, 234290, 152372, 160569, 430909, 160576, 348999, 283466, 439118, 234330, 275294, 381791, 127840, 357219, 439145, 177002, 308075, 242540, 242542, 381811, 201590, 177018, 398205, 340865, 291713, 349066, 316299, 349068, 234382, 308111, 381840, 308113, 390034, 373653, 430999, 209820, 381856, 398244, 185252, 422825, 381872, 177074, 398268, 349122, 398275, 373705, 127945, 340960, 398305, 340967, 398313, 234476, 127990, 349176, 201721, 349179, 234499, 357380, 398370, 357413, 357420, 300087, 21567, 308288, 398405, 349254, 218187, 250955, 300109, 234578, 250965, 439391, 250982, 398444, 62574, 357487, 300147, 119925, 349304, 234626, 349315, 349317, 234635, 373902, 177297, 324761, 234655, 234662, 373937, 373939, 324790, 300215, 218301, 283841, 283846, 259275, 316628, 259285, 357594, 414956, 251124, 316661, 292092, 439550, 439563, 242955, 414989, 259346, 349458, 382243, 382246, 382257, 292145, 382264, 333115, 193853, 193858, 251212, 406862, 234830, 259408, 283990, 357720, 300378, 300379, 316764, 374110, 234864, 259449, 382329, 357758, 243073, 357763, 112019, 398740, 234902, 374189, 251314, 284086, 259513, 54719, 292291, 300490, 300526, 259569, 251379, 300539, 398844, 210429, 366081, 316951, 374297, 153115, 431646, 349727, 431662, 374327, 210489, 235069, 349764, 292424, 292426, 128589, 333389, 333394, 349780, 128600, 235096, 300643, 300645, 415334, 54895, 366198, 210558, 210559, 415360, 325246, 333438, 415369, 431754, 210569, 267916, 415376, 259741, 153252, 399014, 210601, 202413, 317102, 415419, 259780, 333508, 267978, 333522, 325345, 333543, 431861, 284410, 161539, 284425, 300812, 284430, 366358, 169751, 431901, 341791, 325411, 186148, 186149, 333609, 284460, 202541, 431918, 399148, 153392, 431935, 415555, 325444, 153416, 325449, 341837, 415566, 431955, 325460, 317268, 341846, 300893, 259937, 382820, 276326, 415592, 292713, 292719, 325491, 341878, 276343, 350072, 333687, 317305, 112510, 325508, 333700, 243590, 325514, 350091, 350092, 350102, 350108, 333727, 219046, 284584, 292783, 300983, 128955, 219102, 292835, 6116, 317416, 432114, 325620, 415740, 268286, 415744, 333827, 243720, 399372, 153618, 358418, 178215, 325675, 243763, 358455, 325695, 399433, 104534, 194667, 260206, 432241, 284789, 374913, 374914, 415883, 333968, 153752, 333990, 104633, 260285, 227517, 268479, 374984, 301270, 301271, 325857, 334049, 268515, 383208, 317676, 260337, 260338, 432373, 375040, 309504, 432387, 260355, 375052, 194832, 325904, 391448, 334104, 268570, 178459, 186660, 268581, 334121, 358698, 317738, 260396, 325930, 432435, 358707, 178485, 358710, 14654, 268609, 227655, 383309, 383327, 391521, 366948, 416101, 416103, 383338, 432503, 432511, 211327, 227721, 285074, 252309, 39323, 285083, 317851, 285089, 375211, 334259, 129461, 342454, 358844, 293309, 317889, 326083, 416201, 129484, 154061, 416206, 326093, 432608, 285152, 195044, 391654, 432616, 334315, 375281, 293368, 317949, 334345, 309770, 342537, 432650, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 293420, 219694, 219695, 375345, 432694, 244279, 309831, 375369, 375373, 416334, 301647, 416340, 244311, 416353, 260705, 375396, 268901, 244326, 244345, 334473, 375438, 326288, 285348, 293552, 342705, 285362, 383668, 342714, 39616, 383708, 342757, 269036, 432883, 203511, 342775, 383740, 416509, 359166, 162559, 375552, 432894, 228099, 285443, 285450, 383755, 326413, 285467, 318247, 342827, 391980, 318251, 301883, 342846, 416577, 244569, 375644, 252766, 293729, 351078, 342888, 392057, 211835, 269179, 392065, 260995, 400262, 392071, 424842, 252812, 400271, 392080, 400282, 7070, 211871, 359332, 359333, 293801, 326571, 252848, 326580, 261045, 261046, 326586, 359365, 211913, 342990, 252878, 433104, 56270, 359380, 433112, 433116, 359391, 187372, 343020, 383980, 203758, 383994, 171009, 384004, 433166, 384015, 433173, 293911, 326684, 252959, 384031, 375848, 318515, 203829, 261191, 375902, 375903, 392288, 253028, 351343, 187505, 138354, 187508, 384120, 302202, 285819, 392317, 343166, 384127, 392320, 285823, 285833, 285834, 318602, 228492, 187539, 359574, 285850, 351389, 302239, 253098, 302251, 367791, 367792, 367798, 64699, 294075, 228541, 343230, 367809, 253124, 113863, 351445, 310496, 195809, 253168, 351475, 351489, 367897, 367898, 245018, 130342, 130344, 130347, 261426, 212282, 294210, 359747, 359748, 146760, 146763, 114022, 253288, 425327, 425331, 163190, 327030, 384379, 253316, 294278, 384391, 318860, 253339, 253340, 318876, 343457, 245160, 359860, 359861, 343480, 310714, 228796, 228804, 425417, 310731, 327122, 425434, 310747, 310758, 253431, 359931, 187900, 343552, 245249, 228868, 409095, 359949, 294413, 253456, 302613, 253462, 146976, 245290, 245291, 343606, 163385, 425534, 138817, 147011, 147020, 179800, 196184, 343646, 212574, 204386, 155238, 204394, 138862, 310896, 188021, 294517, 286351, 188049, 425624, 229021, 245413, 286387, 384693, 376502, 286392, 302778, 409277, 286400, 319176, 409289, 425682, 286419, 294621, 245471, 155360, 294629, 212721, 163575, 286457, 286463, 319232, 360194, 409355, 155408, 417556, 294699, 204600, 319289, 384826, 409404, 360253, 409416, 376661, 237397, 368471, 425820, 368486, 384871, 409446, 368489, 40809, 425832, 417648, 417658, 360315, 253828, 327556, 311183, 425875, 294806, 294808, 253851, 376733, 204702, 319393, 294820, 253868, 204722, 188349, 98240, 212947, 212953, 360416, 294887, 253930, 327666, 385011 ]
144066d5cd50ee0c6080f7d9872db7627916f7a2
80f59f5799a75146789695ca87f30ceafc2bda78
/Sources/MessagePack/Encoder/MessagePackEncoder.swift
2ccf0eaab1612b2701e784cd2d4447fe115cdc3c
[ "MIT" ]
permissive
HieuLsw/MessagePack
5fd8facb8c0df6b44fdc0e60864e62c399aee147
844d6d07abdab459f439176d064802c52478eb78
refs/heads/master
2020-03-13T10:11:08.276685
2018-04-23T16:53:38
2018-04-23T16:53:38
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,625
swift
import Foundation /** */ public class MessagePackEncoder { func encode(_ value: Encodable) throws -> Data { let encoder = _MessagePackEncoder() try value.encode(to: encoder) return encoder.data } } protocol MessagePackEncodingContainer { var data: Data { get } } class _MessagePackEncoder { var codingPath: [CodingKey] = [] var userInfo: [CodingUserInfoKey : Any] = [:] fileprivate var container: MessagePackEncodingContainer? var data: Data { return container?.data ?? Data() } } extension _MessagePackEncoder: Encoder { fileprivate func assertCanCreateContainer() { precondition(self.container == nil) } func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> where Key : CodingKey { assertCanCreateContainer() let container = KeyedContainer<Key>(codingPath: self.codingPath, userInfo: self.userInfo) self.container = container return KeyedEncodingContainer(container) } func unkeyedContainer() -> UnkeyedEncodingContainer { assertCanCreateContainer() let container = UnkeyedContainer(codingPath: self.codingPath, userInfo: self.userInfo) self.container = container return container } func singleValueContainer() -> SingleValueEncodingContainer { assertCanCreateContainer() let container = SingleValueContainer(codingPath: self.codingPath, userInfo: self.userInfo) self.container = container return container } }
[ -1 ]
0566dffe2ca7439652848c678ca5fda131ddfe9f
7074f1236b15ed199c6757541178e2182247fb70
/SwiftUI_Demo_Second/Main/PokeMaster/View/ToolButtonModifier.swift
16e97d810d30cf22e622ad9c21a4e95972d3dfeb
[ "MIT" ]
permissive
Lang-FZ/SwiftUI_Demo_Second
4ad43aa7e59255e887703c7cbf0ea9ab4c238dbd
23e91512d925f401b1a9592bcfdef2251c52beb8
refs/heads/master
2020-12-23T16:20:04.065333
2020-03-20T17:17:13
2020-03-20T17:17:13
237,202,836
0
0
null
null
null
null
UTF-8
Swift
false
false
403
swift
// // ToolButtonModifier.swift // SwiftUI_Demo_Second // // Created by LFZ on 2020/2/12. // Copyright © 2020 LFZ. All rights reserved. // import SwiftUI struct ToolButtonModifier: ViewModifier { func body(content: Content) -> some View { content .font(.system(size: 25)) .foregroundColor(.white) .frame(width: 30, height: 30) } }
[ -1 ]
aab4081643a521ed780fd331712e49a3d1239a2a
482969431aa83f1fada5dab249a867081ccf24e3
/ostelco-ios-client/ViewControllers/Home/HomeViewController.swift
a21ebb61d6cac96d660aab9ec789100218887962
[]
no_license
sgoodwin/ostelco-ios-client
37f10bce2d7c4397992dcf2c092b7275ca99d045
f386169bac19058b184d57d3647345044eef79f1
refs/heads/master
2020-11-25T03:52:22.573014
2019-10-08T15:42:53
2019-10-08T15:42:53
189,954,095
0
0
null
2019-06-03T07:15:20
2019-06-03T07:15:20
null
UTF-8
Swift
false
false
7,820
swift
// // HomeViewController.swift // ostelco-ios-client // // Created by mac on 2/25/19. // Copyright © 2019 mac. All rights reserved. // import ostelco_core import OstelcoStyles import PromiseKit import UIKit class HomeViewController: ApplePayViewController { private var newSubscriber = false var availableProducts: [Product] = [] @IBOutlet private weak var balanceLabel: DataAmountOnHomeLabel! @IBOutlet private weak var scrollView: UIScrollView! @IBOutlet private weak var buyButton: UIButton! @IBOutlet private weak var countryButton: UIButton! @IBOutlet private weak var messageLabel: UILabel! @IBOutlet private weak var welcomeLabel: UILabel! let buyText = NSLocalizedString("Buy Data", comment: "Primary action button on Home") let refreshBalanceText = NSLocalizedString("Updating data balance...", comment: "Loading text while determining data balance.") private lazy var refreshControl = UIRefreshControl() private lazy var byteCountFormatter: ByteCountFormatter = { let formatter = ByteCountFormatter() formatter.countStyle = .binary return formatter }() private func showToppedUpMessage() { welcomeLabel.text = NSLocalizedString("You have been topped up! 🎉", comment: "Success message when user buys more data.") messageLabel.text = NSLocalizedString("Thanks for using OYA", comment: "Thank you message when user buys more data") welcomeLabel.alpha = 1.0 messageLabel.alpha = 1.0 UIView.animate( withDuration: 2.0, delay: 2.0, options: .curveEaseIn, animations: { [weak self] in self?.hideMessage() }, completion: nil) } private func hideMessage() { welcomeLabel.alpha = 0.0 messageLabel.alpha = 0.0 } deinit { NotificationCenter.default.removeObserver(self) } override func viewDidLoad() { super.viewDidLoad() buyButton.setTitle(buyText, for: .normal) registerForPushNotificationsIfNeeded() balanceLabel.dataAmountString = nil scrollView.alwaysBounceVertical = true scrollView.bounces = true refreshControl.addTarget(self, action: #selector(didPullToRefresh), for: .valueChanged) refreshControl.attributedTitle = NSMutableAttributedString(string: refreshBalanceText) scrollView.addSubview(refreshControl) refreshBalance() LocationController.shared.startUpdatingLocation() NotificationCenter.default.addObserver(self, selector: #selector(countryChanged(_:)), name: CurrentCountryChanged, object: nil) updateButtonFor(country: LocationController.shared.currentCountry) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) fetchProducts() } @objc func countryChanged(_ notification: NSNotification) { guard let controller = notification.object as? LocationController else { fatalError("Something other than the location controller is posting this notification!") } updateButtonFor(country: controller.currentCountry) } private func updateButtonFor(country: Country?) { countryButton.setTitle(country?.nameOrPlaceholder, for: .normal) } private func registerForPushNotificationsIfNeeded() { PushNotificationController.shared.checkSettingsThenRegisterForNotifications(authorizeIfNotDetermined: true) .catch { error in switch error { case PushNotificationController.Error.notAuthorized: // This is an expected error type, we don't need to do anything. break default: ApplicationErrors.log(error) } } } internal func fetchProducts() { getProducts() .done { [weak self] products in products.forEach { debugPrint($0) } guard let self = self else { return } self.availableProducts = products } .catch { error in ApplicationErrors.log(error) } } override func paymentSuccessful(_ product: Product?) { refreshBalance() showToppedUpMessage() } func refreshBalance() { // Call the bundles API APIManager.shared.primeAPI .loadBundles() .ensure { [weak self] in self?.refreshControl.endRefreshing() } .done { [weak self] bundles in debugPrint(bundles) self?.updateBalance(from: bundles) } .catch { error in ApplicationErrors.log(error) } } @objc func didPullToRefresh() { hideMessage() refreshBalance() } @IBAction private func buyDataTapped(_ sender: Any) { OstelcoAnalytics.logEvent(.BuyDataClicked) showProductListActionSheet(products: self.availableProducts) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "setupApplePay", let toVC = segue.destination as? SetupApplePayViewController { toVC.delegate = self } } private func updateBalance(from bundles: [PrimeGQL.BundlesQuery.Data.Context.Bundle]) { guard let bundle = bundles.first else { return } let formattedBalance = self.byteCountFormatter.string(fromByteCount: bundle.balance) self.balanceLabel.dataAmountString = formattedBalance } private func showSetupApplePay() -> Bool { var showSetup = false let applePayError: ApplePayError? = canMakePayments() switch applePayError { case .unsupportedDevice?: debugPrint("Apple Pay is not supported on this device") showSetup = true case .noSupportedCards?: debugPrint("No supported cards setup in Apple Pay") showSetup = true case .otherRestrictions?: debugPrint("Some restriction with Apple Pay") showSetup = true default: debugPrint("Apple Pay is already setup") showSetup = false } if showSetup { performSegue(withIdentifier: "setupApplePay", sender: self) } return showSetup } private func showProductListActionSheet(products: [Product]) { let alertCtrl = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) for product in products { let buyAction = UIAlertAction(title: product.label, style: .default) {_ in #if STRIPE_PAYMENT self.startStripePay(product: product) #else // Before we start payment, check if Apple pay is setup correctly. if !self.showSetupApplePay() { self.startApplePay(product: product) } #endif } alertCtrl.addAction(buyAction) } #if STRIPE_PAYMENT let addCardsAction = UIAlertAction(title: "Setup Cards", style: .default) {_ in self.showPaymentOptions() } alertCtrl.addAction(addCardsAction) #endif alertCtrl.addAction(.cancelAction()) self.presentActionSheet(alertCtrl) } } // MARK: - SetupApplePayViewControllerDelegate extension HomeViewController: SetupApplePayViewControllerDelegate { func didFinish(sender: SetupApplePayViewController) { dismiss(animated: true) } func didCancel(sender: SetupApplePayViewController) { dismiss(animated: true) } }
[ -1 ]
b32ea31b1ae3c756a6935d4b215d536ffc965f6b
f43e3771333fca45868270c206c0cd0ad21a31fe
/personRecord/View/CustomView/TableCell/costomTableViewCell.swift
b63b55e2e44acd71c7cf778779ab03eafc8a5813
[]
no_license
manami011/PersonRecord
3e6e7f44530e2feeb6f176f084f871ba24b39343
695537be8cc27ee41a4e824f4dc64637ed393120
refs/heads/main
2023-06-05T20:12:25.407878
2021-06-25T02:41:15
2021-06-25T02:41:15
368,067,584
0
0
null
null
null
null
UTF-8
Swift
false
false
511
swift
// // costomTableViewCell.swift // personRecord // // Created by 竹内愛実 on 2021/05/26. // import UIKit class costomTableViewCell: UITableViewCell { @IBOutlet weak var cellButton: UIButton! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 320001, 337412, 227845, 333831, 227849, 227852, 333837, 372750, 372753, 196114, 372754, 327190, 328214, 287258, 370207, 243746, 287266, 281636, 327224, 327225, 307277, 327248, 235604, 235611, 213095, 213097, 310894, 213109, 148600, 403068, 410751, 300672, 373913, 148637, 148638, 276639, 148648, 300206, 361651, 327360, 223437, 291544, 306907, 337627, 176358, 271087, 325874, 338682, 276746, 276756, 203542, 261406, 349470, 396065, 225060, 111912, 369458, 369461, 282934, 342850, 342851, 151881, 430412, 283471, 283472, 270679, 287067, 350050, 270691, 257898, 330602, 179568, 317296, 317302, 244600, 179578, 179580, 211843, 213891, 36743, 209803, 211370, 288690, 281014, 430546, 430547, 180695, 180696, 284131, 344039, 323561, 196076, 310778, 305661 ]
cba4c152b4fbcdb0899093d6fe7d39bb6615d02d
8994d6a64622b8015237c59242cfb18856b2321a
/Pods/Stripe/Stripe/STPImageLibrary.swift
ad91e642fb8747c65c102fe722bfe0fe304771fb
[ "MIT" ]
permissive
worstkiller/ios_stripe_subscription_swiftui
c93f6aacc0ce22ee2399143c1bbeb6821fabdad0
37aa166a513ef9c788d9991bf67c0edb5b72d67f
refs/heads/main
2023-08-28T18:17:28.562245
2021-10-26T18:20:18
2021-10-26T18:20:18
421,469,836
3
1
null
null
null
null
UTF-8
Swift
false
false
9,885
swift
// // STPImageLibrary.swift // Stripe // // Created by Jack Flintermann on 6/30/16. // Copyright © 2016 Stripe, Inc. All rights reserved. // // // STPImages.m // Stripe // // Created by Jack Flintermann on 6/30/16. // Copyright © 2016 Stripe, Inc. All rights reserved. // import Foundation import UIKit /// This class lets you access card icons used by the Stripe SDK. All icons are 32 x 20 points. public class STPImageLibrary: NSObject { /// An icon representing Apple Pay. @objc public class func applePayCardImage() -> UIImage { return self.safeImageNamed("stp_card_applepay") } /// An icon representing American Express. @objc public class func amexCardImage() -> UIImage { return self.cardBrandImage(for: .amex) } /// An icon representing Diners Club. @objc public class func dinersClubCardImage() -> UIImage { return self.cardBrandImage(for: .dinersClub) } /// An icon representing Discover. @objc public class func discoverCardImage() -> UIImage { return self.cardBrandImage(for: .discover) } /// An icon representing JCB. @objc public class func jcbCardImage() -> UIImage { return self.cardBrandImage(for: .JCB) } /// An icon representing Mastercard. @objc public class func mastercardCardImage() -> UIImage { return self.cardBrandImage(for: .mastercard) } /// An icon representing UnionPay. @objc public class func unionPayCardImage() -> UIImage { return self.cardBrandImage(for: .unionPay) } /// An icon representing Visa. @objc public class func visaCardImage() -> UIImage { return self.cardBrandImage(for: .visa) } /// An icon to use when the type of the card is unknown. @objc public class func unknownCardCardImage() -> UIImage { return self.cardBrandImage(for: .unknown) } /// This returns the appropriate icon for the specified card brand. @objc(brandImageForCardBrand:) public class func cardBrandImage(for brand: STPCardBrand) -> UIImage { return self.brandImage(for: brand, template: false) } /// This returns the appropriate icon for the specified bank brand. @objc(brandImageForFPXBankBrand:) public class func fpxBrandImage(for brand: STPFPXBankBrand) -> UIImage { let imageName = "stp_bank_fpx_\(STPFPXBank.identifierFrom(brand) ?? "")" let image = self.safeImageNamed( imageName, templateIfAvailable: false) return image } /// An icon representing FPX. @objc public class func fpxLogo() -> UIImage { return self.safeImageNamed("stp_fpx_logo", templateIfAvailable: false) } /// A large branding image for FPX. @objc public class func largeFpxLogo() -> UIImage { return self.safeImageNamed("stp_fpx_big_logo", templateIfAvailable: false) } /// An icon representing Afterpay. @objc public class func afterpayLogo() -> UIImage { switch (Locale.current.languageCode, Locale.current.regionCode) { case ("en", "GB"): return self.safeImageNamed("clearpay_mark", templateIfAvailable: false) default: return self.safeImageNamed("afterpay_mark", templateIfAvailable: false) } } /// This returns the appropriate icon for the specified card brand as a /// single color template that can be tinted @objc(templatedBrandImageForCardBrand:) public class func templatedBrandImage( for brand: STPCardBrand ) -> UIImage { return self.brandImage(for: brand, template: true) } /// This returns a small icon indicating the CVC location for the given card brand. @objc(cvcImageForCardBrand:) public class func cvcImage(for brand: STPCardBrand) -> UIImage { let imageName = brand == .amex ? "stp_card_cvc_amex" : "stp_card_cvc" return self.safeImageNamed(imageName) } /// This returns a small icon indicating a card number error for the given card brand. @objc(errorImageForCardBrand:) public class func errorImage(for brand: STPCardBrand) -> UIImage { let imageName = brand == .amex ? "stp_card_error_amex" : "stp_card_error" return self.safeImageNamed(imageName) } @objc class func safeImageNamed(_ imageName: String) -> UIImage { return self.safeImageNamed(imageName, templateIfAvailable: false) } @objc class func addIcon() -> UIImage { return self.safeImageNamed("stp_icon_add", templateIfAvailable: true) } @objc class func bankIcon() -> UIImage { return self.safeImageNamed("stp_icon_bank", templateIfAvailable: true) } @objc class func checkmarkIcon() -> UIImage { return self.safeImageNamed("stp_icon_checkmark", templateIfAvailable: true) } @objc class func largeCardFrontImage() -> UIImage { return self.safeImageNamed("stp_card_form_front", templateIfAvailable: true) } @objc class func largeCardBackImage() -> UIImage { return self.safeImageNamed("stp_card_form_back", templateIfAvailable: true) } @objc class func largeCardAmexCVCImage() -> UIImage { return self.safeImageNamed("stp_card_form_amex_cvc", templateIfAvailable: true) } @objc class func largeShippingImage() -> UIImage { return self.safeImageNamed("stp_shipping_form", templateIfAvailable: true) } @objc class func safeImageNamed( _ imageName: String, templateIfAvailable: Bool ) -> UIImage { let image = imageNamed(imageName, templateIfAvailable: templateIfAvailable) ?? UIImage() assert(image.size != .zero, "Failed to find an image named \(imageName)") // Vend a dark variant if available // Workaround until we can use image assets if isDarkMode(), let darkImage = imageNamed(imageName + "_dark", templateIfAvailable: templateIfAvailable) { return darkImage } else { return image } } private class func imageNamed( _ imageName: String, templateIfAvailable: Bool ) -> UIImage? { var image = UIImage( named: imageName, in: StripeBundleLocator.resourcesBundle, compatibleWith: nil) if image == nil { image = UIImage(named: imageName) } if templateIfAvailable { image = image?.withRenderingMode(.alwaysTemplate) } return image } class func brandImage( for brand: STPCardBrand, template isTemplate: Bool ) -> UIImage { var shouldUseTemplate = isTemplate var imageName: String? switch brand { case .amex: imageName = shouldUseTemplate ? "stp_card_amex_template" : "stp_card_amex" case .dinersClub: imageName = shouldUseTemplate ? "stp_card_diners_template" : "stp_card_diners" case .discover: imageName = shouldUseTemplate ? "stp_card_discover_template" : "stp_card_discover" case .JCB: imageName = shouldUseTemplate ? "stp_card_jcb_template" : "stp_card_jcb" case .mastercard: imageName = shouldUseTemplate ? "stp_card_mastercard_template" : "stp_card_mastercard" case .unionPay: if Locale.current.identifier.lowercased().hasPrefix("zh") { imageName = shouldUseTemplate ? "stp_card_unionpay_template_zh" : "stp_card_unionpay_zh" } else { imageName = shouldUseTemplate ? "stp_card_unionpay_template_en" : "stp_card_unionpay_en" } case .unknown: shouldUseTemplate = true imageName = "stp_card_unknown" case .visa: imageName = shouldUseTemplate ? "stp_card_visa_template" : "stp_card_visa" @unknown default: shouldUseTemplate = true imageName = "stp_card_unknown" } let image = self.safeImageNamed( imageName ?? "", templateIfAvailable: shouldUseTemplate) return image } class func image( withTintColor color: UIColor, for image: UIImage ) -> UIImage { var newImage: UIImage? UIGraphicsBeginImageContextWithOptions(image.size, false, image.scale) color.set() let templateImage = image.withRenderingMode(.alwaysTemplate) templateImage.draw( in: CGRect( x: 0, y: 0, width: templateImage.size.width, height: templateImage.size.height)) newImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return newImage! } } // MARK: - v2 Images extension STPCardBrand { /// Returns a borderless image of the card brand's logo func makeCarouselImage() -> UIImage { let imageName: String switch self { case .JCB: imageName = "card_jcb" case .visa: imageName = "card_visa" case .amex: imageName = "card_amex" case .mastercard: imageName = "card_mastercard" case .discover: imageName = "card_discover" case .dinersClub: imageName = "card_diners" case .unionPay: imageName = "card_unionpay" case .unknown: imageName = "card_unknown" } let brandImage = STPImageLibrary.safeImageNamed(imageName, templateIfAvailable: false) // Don't allow tint colors to change the brand images. return brandImage.withRenderingMode(.alwaysOriginal) } } func isDarkMode() -> Bool { if #available(iOS 13.0, *) { if UITraitCollection.current.userInterfaceStyle == .dark { return true } } return false }
[ -1 ]
ded4de2d0a585daa5c9f4e3301301010a4b7fd4d
858f985a50883f84e340e3b2454db71fd51a4506
/gridLayout/ViewController.swift
36ed13cff0d1cf68d811ddb20ead84ff5fd14f0b
[]
no_license
MayurBakraniya/collectionGridLayout
6ca16c5eb8e9a718215cd41cadcb2498fa3a6727
a71bdbdbe0de9c101715ed5bb71d6491109ae533
refs/heads/main
2023-03-19T20:33:42.870047
2021-03-02T11:36:47
2021-03-02T11:36:47
343,753,236
0
0
null
null
null
null
UTF-8
Swift
false
false
3,332
swift
// // ViewController.swift // gridLayout // // Created by MAC on 02/03/21. // import UIKit import CollectionViewGridLayout class ViewController: UIViewController { @IBOutlet weak var collectionView: UICollectionView! public var numberOfColumns: Int = 3 var overViewArr = [#imageLiteral(resourceName: "Group 621"),#imageLiteral(resourceName: "Group 39"),#imageLiteral(resourceName: "Group 548"),#imageLiteral(resourceName: "logo"),#imageLiteral(resourceName: "Group 22-1"),#imageLiteral(resourceName: "contacts"),#imageLiteral(resourceName: "Group 24"),#imageLiteral(resourceName: "Group 13"),#imageLiteral(resourceName: "settings-2"),#imageLiteral(resourceName: "settings-1"),#imageLiteral(resourceName: "Group 23"),#imageLiteral(resourceName: "Vector")] var overviewDesArr = ["Profile","Currency","Charity","My SENG","Pools","Contact","Tips","Message","Chat","Settings","Payments","Service"] override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. collectionViewSetup() } func collectionViewSetup(){ collectionView.delegate = self collectionView.dataSource = self collectionView.register(UINib(nibName: "CollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "CollectionViewCell") } } extension ViewController:UICollectionViewDelegate,UICollectionViewDataSource{ public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, numberOfColumnsForSection section: Int) -> Int { return self.numberOfColumns } public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return overViewArr.count } public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CollectionViewCell", for: indexPath) as! CollectionViewCell cell.imgView.image = overViewArr[indexPath.row] cell.lbl.text = overviewDesArr[indexPath.row] return cell } } extension ViewController:CollectionViewDelegateVerticalGridLayout{ public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, rowSpacingForSection section: Int) -> CGFloat { return 10 } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, columnSpacingForSection section: Int) -> CGFloat { return 10 } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSection section: Int) -> UIEdgeInsets { return UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, heightForItemAt indexPath: IndexPath, columnWidth: CGFloat) -> CGFloat { return UIScreen.main.bounds.height/5 } public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { print("Select [\(indexPath.section), \(indexPath.row)]") } }
[ -1 ]
a0b085fc2feafd1b567d413dcceccb71fe08a0b2
1382fc1bd5256977d203548d7987709b4b01b54e
/RAHHAL/PopOverSegueForShipmentTypeVC.swift
31c220526903752e8baa6a1e38ff523a48760765
[]
no_license
player-freelancer/RAHHAL_swift
91a0dcf8361a7af30c1a9b0d8bb7d4b5662e2df4
cd9abaaa7461250600407bd6578052b47f819d92
refs/heads/master
2021-09-05T14:19:35.626676
2018-01-15T16:32:35
2018-01-15T16:32:35
115,732,639
0
0
null
null
null
null
UTF-8
Swift
false
false
873
swift
// // PopOverSegueForShipmentTypeVC.swift // RAHHAL // // Created by Macbook on 12/18/17. // Copyright © 2017 RAJ. All rights reserved. // import UIKit class PopOverSegueForShipmentTypeVC: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ 287243, 277006, 282128, 286234, 317473, 295460, 284197, 286249, 286257, 300086, 286775, 279096, 288827, 226878, 159812, 228932, 293961, 288331, 288332, 284240, 212561, 280146, 237655, 200802, 292451, 276580, 309353, 311913, 307311, 284277, 284279, 284289, 280710, 227984, 282262, 117399, 280219, 299165, 225955, 326311, 302256, 276150, 280760, 299709, 283839, 277696, 227523, 228551, 280777, 279754, 284361, 298189, 229585, 307410, 226009, 298202, 298204, 280797, 298207, 363743, 278752, 282338, 290020, 291556, 294636, 234223, 289524, 280821, 288501, 280824, 358137, 358139, 280832, 230147, 226055, 369434, 287007, 315170, 277797, 282917, 304933, 283433, 289578, 282411, 289596, 288579, 293700, 300358, 234829, 279380, 279386, 298842, 241499, 298843, 311645, 289120, 308064, 296813, 313711, 276849, 315250, 291709, 290175, 275842, 224643, 183173, 313733, 226705, 310673, 306577, 226196, 279442, 306578, 227740, 294812, 277406, 275358, 289187, 288165, 284586, 289196, 277421, 370093, 297903, 230323, 289204, 278968, 298936, 127418, 281530, 278973, 291774, 295874, 299973, 289224, 280015, 281042, 301012, 301016, 163289, 280028, 280029, 280030, 279011, 294889, 286189, 277487, 308721, 293874, 227315, 296436, 277502 ]
b31b8816c6d1b90f9c417a6fe2e77cbd96849bd4
b5499d90f827a85306af31693687e824cea5645c
/PickerForMaster/FileSMS.swift
a4c6162cf6f2d8356e2d2db8ff461610a7b4b727
[]
no_license
nvtinh368/PickerForMaster
7cc79713abd889f6e994aad3630cd7107702afdf
683b6911bba59fe41db3ad66be063d63741ae09e
refs/heads/main
2023-04-19T05:43:15.390078
2021-04-26T10:29:09
2021-04-26T10:29:09
361,708,977
0
0
null
null
null
null
UTF-8
Swift
false
false
202
swift
// // FileSMS.swift // PickerForMaster // // Created by Nguyen Van Tinh on 4/26/21. // import Foundation public class FileSMS{ public static func Check() { print("Ok demo") } }
[ -1 ]
9ea4d5a8ec59a4ffd9e9067e1a31a6ea5a12ad38
21cfbb41db5f5f85d613f34719e7804fac9af436
/Twitter/MenuProfileTableViewCell.swift
f7216b5f0ad52920069d687f5d9c4a4a0381987c
[ "Apache-2.0" ]
permissive
akishinagawa/TwitterRedux
7e229c88d00640f789110006eb10af3272af1134
7f50fd6f9957f00571499189b7d87ee4b6b18fa6
refs/heads/master
2021-01-12T11:29:58.914791
2016-11-08T00:09:34
2016-11-08T00:09:34
72,940,046
0
0
null
null
null
null
UTF-8
Swift
false
false
656
swift
// // MenuProfileTableViewCell.swift // Twitter // // Created by Akifumi Shinagawa on 11/6/16. // Copyright © 2016 codepath. All rights reserved. // import UIKit class MenuProfileTableViewCell: UITableViewCell { @IBOutlet weak var userImage: UIImageView! @IBOutlet weak var userNameLabel: UILabel! @IBOutlet weak var userTagLineLabel: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 320001, 337412, 227845, 333831, 418824, 227849, 196108, 327181, 203788, 227852, 333837, 372750, 372753, 196114, 372754, 327190, 328214, 287258, 370207, 243746, 287266, 281636, 310840, 327224, 327225, 123451, 314431, 307277, 327248, 235604, 214104, 235611, 281183, 339039, 340582, 213095, 213097, 155243, 163949, 340589, 310894, 222836, 430197, 213109, 148600, 403068, 410751, 300672, 135815, 373913, 148637, 148638, 276639, 148648, 300206, 361651, 327360, 279757, 223437, 312531, 312535, 291544, 306907, 337627, 176358, 249067, 249068, 249069, 271087, 325874, 338682, 300800, 300801, 300802, 348935, 276746, 271117, 276756, 203542, 302875, 261406, 349470, 396065, 111912, 266538, 369458, 369461, 282934, 257858, 342850, 342851, 151881, 366412, 430412, 283470, 283471, 283472, 283473, 270679, 230746, 287067, 287068, 287069, 336734, 336738, 350050, 270691, 257898, 330602, 330605, 179568, 317296, 216438, 262518, 317302, 244600, 179578, 179580, 226176, 211843, 213891, 36743, 209803, 289684, 334229, 311700, 288149, 337317, 211370, 288690, 281014, 282552, 317377, 282576, 430546, 430547, 180695, 180696, 282584, 358875, 248284, 284131, 344039, 196076, 217069, 310778, 305661 ]
d1766bb1895c765dbceb61955d4ab7a4dc75834d
23422f3cab19dadeb88858723b1158f781ed3dac
/MarvelHeroes/Common/Constants.swift
efd913708cad7ac538acc4e0c33963e21f78e3a6
[]
no_license
drakerr/MarvelHeroes
0c30fbd87fbe3384b52b7398ea75c605ca185e72
600f6c06feb5b59f2ac82cec1db793bf5f9129ac
refs/heads/master
2020-04-12T19:07:33.538504
2019-01-09T15:59:35
2019-01-09T15:59:35
162,700,291
0
0
null
null
null
null
UTF-8
Swift
false
false
564
swift
// // Constants.swift // MarvelHeroes // // Created by Aleix on 21/12/2018. // Copyright © 2018 Aleix Cos. All rights reserved. // import Foundation struct Endpoints { static let marvelBaseEndPoint = "https://gateway.marvel.com/" static let marvelCharactersEndPoint = "/v1/public/characters" static let marvelCharacterComicsEndPoint = "v1/public/characters/%i/comics" } struct Constants { static let marvelPublicApiKey = "0e492281edff9203a367b6fa83fdd51b" static let marvelPrivateApiKey = "12c64de3c7fa61ea919d0779a87fe46455ae6d45" }
[ -1 ]
1d727ceb2436a71edb389c2d4a322cf2ac5189c5
a80fdce0a1bc0290d25e46682b836da78f5799b9
/傘2.0/AppDelegate.swift
2580370ce5e8fd28f19774d080b595c8a0c3e2fd
[]
no_license
Wu-yu-Xiang/-
a6f0411f2f5f1a15f983a96f26042f48e3daad3f
8b5b8a209ccc97caad00ca10496eada0d6ec4726
refs/heads/master
2022-05-25T22:45:29.173218
2020-05-02T14:16:21
2020-05-02T14:16:21
260,703,059
0
0
null
null
null
null
UTF-8
Swift
false
false
2,163
swift
// // AppDelegate.swift // 傘2.0 // // Created by chang on 2019/10/31. // Copyright © 2019 chang. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 278556, 229405, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 319544, 204856, 229432, 286776, 286778, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 303230, 327814, 131209, 303241, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 278849, 319810, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 320007, 287238, 172552, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 311850, 279082, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189040, 172660, 287349, 189044, 189039, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 287390, 303773, 172702, 172705, 287394, 172707, 164509, 303780, 287398, 205479, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 279231, 287427, 312005, 312006, 107208, 107212, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 312048, 230128, 312050, 230131, 189169, 205564, 303871, 230146, 295685, 328453, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 304007, 320391, 213895, 304009, 304011, 230284, 304013, 295822, 213902, 279438, 189329, 295825, 189331, 304019, 58262, 304023, 279452, 410526, 279461, 279462, 304042, 213931, 304055, 230327, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 132165, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 205931, 296044, 164973, 205934, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 296264, 238919, 320840, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 148843, 230763, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 280021, 239064, 329177, 288217, 288218, 280027, 288220, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 321022, 206336, 402942, 296450, 296446, 230916, 230919, 214535, 304651, 370187, 304653, 230923, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 280276, 313044, 321239, 280283, 18140, 313052, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 419570, 288499, 321266, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 337732, 280388, 304968, 280393, 280402, 173907, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 313340, 239612, 288764, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 215154, 313458, 280691, 149618, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 275606, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 321740, 313548, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 280819, 157940, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 240011, 199051, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 240132, 223749, 305668, 330244, 223752, 150025, 338440, 281095, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 142226, 240535, 289687, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 306555, 314747, 298365, 290171, 290174, 224641, 281987, 314756, 298372, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 175770, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 307009, 413506, 241475, 307012, 298822, 148946, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 217179, 315483, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 176311, 184503, 307385, 307386, 258235, 307388, 176316, 307390, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 242043, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 299440, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127431, 315856, 176592, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 291314, 127474, 291317, 135672, 233979, 291323, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 135844, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 349027, 242530, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 291714, 291716, 234373, 316294, 226182, 234375, 308105, 226185, 234379, 201603, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324508, 291742, 324504, 234398, 234401, 291747, 291748, 234405, 324518, 291750, 324520, 234407, 234410, 291754, 291756, 324522, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 324548, 234437, 226239, 226245, 234439, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 234520, 316439, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 308291, 316483, 160835, 234563, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 234648, 275608, 234650, 308379, 324757, 234653, 300189, 119967, 324766, 324768, 283805, 234657, 242852, 234661, 300197, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 300223, 234687, 300226, 308418, 283844, 300229, 308420, 308422, 234692, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 300299, 177419, 242957, 300301, 275725, 177424, 283917, 349451, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 324978, 136562, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 308790, 284215, 316983, 194103, 284218, 194101, 226877, 292414, 284223, 284226, 284228, 292421, 243268, 284231, 226886, 128584, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 292433, 284243, 300628, 284245, 194130, 284247, 317015, 235097, 243290, 276052, 276053, 284249, 300638, 284251, 284253, 284255, 284258, 243293, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 276086, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292479, 284290, 325250, 284292, 292485, 276098, 292481, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 284511, 317279, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 358292, 284564, 317332, 284566, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301015, 301017, 292828, 276446, 153568, 276448, 292839, 276455, 292843, 276460, 292845, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 276539, 235581, 178238, 325692, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 350299, 194649, 350302, 194654, 227423, 178273, 309346, 227426, 309348, 350308, 309350, 194660, 309352, 350313, 309354, 301163, 350316, 292968, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 227571, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 227810, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 293706, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 276579, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 293882, 302075, 121850, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 293960, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 302218, 294026, 285835, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 310659, 351619, 294276, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 245191, 310727, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 40488, 294439, 294440, 40491, 294443, 294445, 196133, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 400976, 212560, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 302793, 294601, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 311048, 294664, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 319390, 237470, 40865, 319394, 294817, 294821, 311209, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
5a501458f60f0e569b7d14f01ec9d64100b1c6cc
f814944fb2812e72daa3b63df4b8f9f9346e9e5a
/BIB Individuals/Sence/Services/presenter/ServicesPresenter.swift
0c009ce102e27c62fc6158baa09885378232dffb
[]
no_license
hamadaRagab88/BIB-Individual
5e4dbd1def51a0daf739debca69931d67dff5193
97a1be0d38582f60df9ed03de1daf762fbcebfd2
refs/heads/main
2023-07-03T12:39:47.774351
2021-08-01T23:25:02
2021-08-01T23:25:02
391,762,035
0
0
null
null
null
null
UTF-8
Swift
false
false
414
swift
// // ServicesPresenter.swift // BIB Individuals // // Created by Apple on 7/30/21. // import Foundation class ServicesPresenter: BasePresenter { weak var view: ServicesViewProtocol? var router: ServicesRouter init(view: ServicesViewProtocol?,router: ServicesRouter) { self.router = router self.view = view } } extension ServicesPresenter: ServicesPresenterProtocol{ }
[ -1 ]
386c4635f9670a3eb94e54ee1b1432807074b2ac
7df5c6b2f2bdc3aef5ce86dc6085f540c5944524
/GameStuff/Joystick/Joystick.swift
a8329945522534c1de1826521412a49dff330df2
[]
no_license
highborncow/GameStuff
b855acbb20c62cab3883e1f3d01c243f4e73a7c1
f91589b718eca7a376b21d2aac150cac68d23ab4
refs/heads/master
2020-03-19T08:34:50.407303
2018-06-06T19:48:54
2018-06-06T19:48:54
136,216,731
0
0
null
null
null
null
UTF-8
Swift
false
false
2,746
swift
// // Joystick.swift // GameStuff // // Created by Augusto Avelino on 05/06/18. // Copyright © 2018 Augusto Avelino. All rights reserved. // import SpriteKit class Joystick: SKShapeNode { // MARK: Properties let radius: CGFloat var direction: CGVector { guard let control = childNode(withName: "control") else { return .zero } return CGVector(dx: control.position.x / radius, dy: control.position.y / radius) } var activeTouch: UITouch? // MARK:- Initializers init(centeredAt center: CGPoint = CGPoint(x: 65, y: 65), withRadius aRadius: CGFloat = 50) { radius = aRadius let control = SKShapeNode(circleOfRadius: radius * 3/5) control.name = "control" super.init() addChild(control) path = UIBezierPath(arcCenter: .zero, radius: radius, startAngle: 0, endAngle: 2 * CGFloat.pi, clockwise: true).cgPath position = center control.position = .zero isUserInteractionEnabled = true } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } // MARK:- Methods // MARK: Overrides override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { guard let touch = touches.first, let control = childNode(withName: "control") else { return } let location = touch.location(in: self) if activeTouch == nil { activeTouch = touch } control.position = location } override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) { guard let scene = parent as? SKScene, let touch = activeTouch, let control = childNode(withName: "control") else { return } let sceneLocation = touch.location(in: scene) let location = touch.location(in: self) if contains(sceneLocation) { control.position = location } else { let dist = CGFloat(distance(double2(Double(sceneLocation.x), Double(sceneLocation.y)), double2(Double(position.x), Double(position.y)))) let x = sceneLocation.x - position.x let y = sceneLocation.y - position.y control.position = CGPoint(x: radius * (x / dist), y: radius * (y / dist)) } } override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { if let control = childNode(withName: "control") { control.position = .zero } activeTouch = nil } override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { if let control = childNode(withName: "control") { control.position = .zero } activeTouch = nil } }
[ -1 ]
5fe5ef913efc2e0d6d29eb4e13caab4abc9c4240
162efdd3d22835ae405de065c4880632ebc27245
/Chat App/Models/StatusModel.swift
037b97144336f3ce3960402c7536a5037611dbec
[]
no_license
appwithash/Chat-App
5da21a6fafd64326b18b50429045de1c527b9821
a1903b34eb9fa83901fbd127d24f195babccd8f9
refs/heads/main
2023-06-20T23:31:41.889706
2021-07-25T05:48:24
2021-07-25T05:48:24
388,747,836
1
0
null
null
null
null
UTF-8
Swift
false
false
570
swift
// // StoryModel.swift // Chat App // // Created by ashutosh on 20/07/21. // import SwiftUI class StatusModel : Identifiable,ObservableObject{ @Published var username : String @Published var profileImage : Image @Published var isStorySet : Bool @Published var storyImage : Image init(username : String, profileImage : Image=Image(systemName: "person"),isStorySet : Bool=true,storyImage : Image) { self.username=username self.profileImage=profileImage self.isStorySet=isStorySet self.storyImage=storyImage } }
[ -1 ]
f2dcba77ca9e4087fb3521cf150630897140db4d
99b64cecdf0c3267680bd7b62b87dd21533b979e
/practice/ViewController.swift
1e445d820df23c65825a49abec719dc5dac1ebeb
[]
no_license
parkSDO/practice
b0350ccdf76ac6977c584e5f5b07363ac9496caa
fd531ab4782733d4b5e518d67ca93b7c704ee46e
refs/heads/master
2021-04-22T06:39:24.301982
2017-07-06T15:36:16
2017-07-06T15:36:16
94,599,518
0
0
null
null
null
null
UTF-8
Swift
false
false
2,945
swift
// // ViewController.swift // practice // // Created by SangDo on 2017. 6. 8.. // Copyright © 2017년 SangDo. All rights reserved. import UIKit import Firebase import FirebaseAuth import GoogleSignIn class ViewController: UIViewController, GIDSignInUIDelegate { @IBOutlet weak var name: UITextField! @IBOutlet weak var pass: UITextField! var dbRef: FIRDatabaseReference! override func viewDidLoad() { super.viewDidLoad() dbRef = FIRDatabase.database().reference() GIDSignIn.sharedInstance().uiDelegate = self } override func viewDidAppear(_ animated: Bool) { } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func clickLogin(_ sender: Any) { if name.text == "" || pass.text == "" { let alert = UIAlertController(title: "입력해주세요", message: "", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.default, handler: nil)) self.present(alert, animated: true, completion: nil) return } let userId = name.text! let password = pass.text! dbRef.child("user").child(userId).observeSingleEvent(of: .value, with: { snapshot in if !snapshot.exists() { let alert = UIAlertController(title: "사용자가 없습니다.", message: "", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.default, handler: nil)) self.present(alert, animated: true, completion: nil) return } if let firebaseDic = snapshot.value as? [String: AnyObject] { let dbId = firebaseDic["name"] let dbPass = firebaseDic["pass"] if dbId as? String == userId { if dbPass as? String == password { let vc = self.storyboard?.instantiateViewController(withIdentifier: "SuccessViewController") as! SuccessViewController self.present(vc, animated: true, completion: nil) } else { let alert = UIAlertController(title: "비밀번호가 맞지 않습니다.", message: "", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.default, handler: nil)) self.present(alert, animated: true, completion: nil) return } } } }) } //google Login func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) { print("success") } }
[ -1 ]
9f991313bfcdc841dffad91acb2f0843c1699aa9
0797bd619f1d7539954e895735bc6ea1833d21d5
/OpenQuizz/OpenQuizz/Supporting Files/SceneDelegate.swift
00ee360f914772b594227ee11ec215ab03413661
[]
no_license
D-David-IOS/OpenclassroomsProject
86f6652fbc28bf008f7cf563ffd03a6cad189304
78d84f4bd4e1aedb1622d73821744121bc34add9
refs/heads/master
2023-06-04T15:01:41.210335
2021-06-24T13:33:53
2021-06-24T13:33:53
366,455,673
0
0
null
null
null
null
UTF-8
Swift
false
false
2,297
swift
// // SceneDelegate.swift // OpenQuizz // // Created by Debehogne David on 20/05/2021. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 393277, 376906, 327757, 254032, 368728, 180314, 254045, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 377047, 418008, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 385281, 336129, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 393613, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 164362, 328207, 410129, 393748, 262679, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 385671, 148106, 213642, 377485, 352919, 98969, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 344777, 418508, 385743, 385749, 139998, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 361490, 386070, 271382, 336922, 345119, 377888, 214060, 345134, 345139, 361525, 386102, 361537, 377931, 345172, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 345247, 361645, 345268, 402615, 361657, 337093, 402636, 328925, 165086, 66783, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 419360, 370208, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 337601, 403139, 337607, 419528, 419531, 272083, 394967, 419543, 419545, 345819, 419548, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 362274, 378664, 354107, 345916, 354112, 370504, 329545, 345932, 370510, 354132, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 346059, 247760, 346064, 346069, 419810, 329699, 354275, 190440, 354314, 346140, 436290, 395340, 378956, 436307, 338005, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 346317, 411862, 256214, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 387314, 436474, 321787, 379135, 411905, 411917, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 321911, 420237, 379279, 272787, 354728, 338353, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 248332, 330254, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 346736, 191093, 346743, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 355029, 264919, 256735, 338661, 264942, 363252, 338680, 264965, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 355151, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 265215, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 248952, 420985, 330886, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 126279, 437576, 437584, 331089, 437588, 331094, 396634, 175451, 437596, 429408, 175458, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 175487, 249215, 175491, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 224885, 224888, 224891, 224895, 372354, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 339664, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 397089, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 257869, 257872, 225105, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 339818, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 438438, 225448, 438441, 356521, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 381212, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 250203, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 340380, 373149, 70048, 356783, 373169, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 258723, 332455, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 348983, 340792, 398141, 357202, 389971, 357208, 389979, 430940, 357212, 357215, 439138, 201580, 201583, 349041, 340850, 381815, 430967, 324473, 398202, 119675, 340859, 324476, 430973, 324479, 340863, 324482, 373635, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 357411, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 341072, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 210132, 333016, 210139, 210144, 218355, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 210261, 365912, 259423, 374113, 251236, 374118, 333164, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 349762, 333396, 374359, 333400, 366173, 423529, 423533, 210547, 415354, 333440, 267910, 267929, 333512, 259789, 366301, 333535, 153311, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 341877, 399222, 325494, 333690, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 350153, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 219144, 268299, 333838, 350225, 186388, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 342113, 252021, 342134, 374904, 268435, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 350449, 375027, 358645, 350459, 350462, 350465, 350469, 268553, 350477, 268560, 350481, 432406, 350487, 325915, 350491, 325918, 350494, 325920, 350500, 194854, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 268702, 342431, 375209, 375220, 334263, 326087, 358857, 195041, 334312, 104940, 375279, 416255, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 334425, 326240, 375401, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 326417, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326463, 326468, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 433001, 400238, 326511, 211826, 211832, 392061, 351102, 359296, 252801, 260993, 351105, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 252838, 359335, 211885, 252846, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 343132, 384099, 384102, 384108, 367724, 187503, 343155, 384115, 212095, 351366, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 367801, 384189, 384192, 351424, 343232, 367817, 244938, 384202, 253132, 326858, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 376111, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 359887, 359891, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 253445, 359948, 359951, 245295, 359984, 343610, 400977, 400982, 179803, 155241, 245358, 155255, 155274, 368289, 245410, 425639, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 384831, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
e4d20c0442ad6026df39747ac2316b4242c8e68c
d4d38deca35e47e573e6e6a0eb10ec03f6f6bfb0
/OTPAuthUI/Sources/OTPAuthImageView.swift
ed99c999f20d8f6e87bd3bccb79472ee8ee684f3
[ "MIT" ]
permissive
merci-app/mcikit-packages-ios
55b8434470da1038ceac5229d9d9a13deb553a52
bb8357bd1217f94029b8ece81dc57b93cc3fa22c
refs/heads/master
2023-02-17T08:24:14.642255
2021-01-14T20:09:45
2021-01-14T20:09:45
257,993,547
4
0
MIT
2020-08-25T12:31:38
2020-04-22T18:59:36
Swift
UTF-8
Swift
false
false
3,309
swift
// // OTPAuthImageView.swift // // // Created by Tiago Oliveira on 01/07/20. // Copyright © 2020 Conductor Solucoes. All rights reserved. // import UIKit import OTPAuth class OTPAuthImageView: UIImageView { @IBInspectable var color: UIColor = .black private var otpAuth: OTPAuth? private var vat: String? private var value: String? private func generateQRCode() { guard let currentToken = otpAuth?.currentToken, let vat = vat, let amount = value?.normalize() else { return } let code = "\(vat)\(currentToken)\(amount)" var context: CIContext! if let device: MTLDevice = MTLCreateSystemDefaultDevice() { context = CIContext(mtlDevice: device, options: nil) } else { context = CIContext() } guard let data = code.data(using: .isoLatin1), let filter = CIFilter(name: "CIQRCodeGenerator") else { return } filter.setValue(data, forKey: "inputMessage") filter.setValue("Q", forKey: "inputCorrectionLevel") let transform = CGAffineTransform(scaleX: 10, y: 10) guard let ciFilterImage = filter.outputImage?.transformed(by: transform), let ciTintImage = ciFilterImage.tint(using: color) else { return } guard let cgImage = context.createCGImage(ciTintImage, from: ciTintImage.extent, format: CIFormat.RGBA8, colorSpace: CGColorSpaceCreateDeviceRGB()) else { return } self.image = UIImage(cgImage: cgImage) } func generateToken(vat: String, otpAuth: OTPAuth, value: String = "", color: UIColor = .black) { self.vat = vat self.otpAuth = otpAuth self.value = value generateQRCode() NotificationCenter.default.addObserver( self, selector: #selector(tokenTick(_:)), name: Notification.Name.OTPAuthNotification.tokenTick, object: otpAuth ) otpAuth.startNotificattion() } deinit { otpAuth?.stopNotification() NotificationCenter.default.removeObserver( self, name: Notification.Name.OTPAuthNotification.tokenTick, object: otpAuth ) } } // MARK: - Notification Center extension OTPAuthImageView { @objc public func tokenTick(_ notification: Notification) { DispatchQueue.main.async { self.generateQRCode() } } } // MARK: - Numbers only extension String { func normalize() -> String { if self != "" { let string = self.replacingOccurrences(of: "\\D*", with: "", options: .regularExpression, range: nil) return string.padding(leftTo: 10, withPad: "0") } else { return "" } } func padding(leftTo paddedLength: Int, withPad pad: String, startingAt padStart: Int = 0) -> String { let rightPadded = self.padding(toLength: max(count, paddedLength), withPad: pad, startingAt: padStart) return "".padding(toLength: paddedLength, withPad: rightPadded, startingAt: count % paddedLength) } }
[ -1 ]
78852e5bddebee1e99add2d179b5c84b226ef48c
b4015d7a5692f4b9d2052337d4078756220050f6
/unit_test/test_exampleTests.swift
bba0605f28e525bedd9ee6bfd20ecb471b979470
[]
no_license
dev-wd/simple_swift_example
d733759ec532482262b29e870edd3a3bd69d457a
65b87e02081352b425e4b31a9424f00c2c39d632
refs/heads/master
2020-09-21T16:08:01.951865
2020-03-09T10:35:25
2020-03-09T10:35:25
224,843,169
3
0
null
null
null
null
UTF-8
Swift
false
false
635
swift
import XCTest @testable import test_example class test_exampleTests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testLiamIsStudent() { let liam = Person(personName: "Liam",age:26) XCTAssert(!liam.isStudent) } func testEllaIsStudent() { let ella = Person(personName: "Ella",age:25) XCTAssert(!ella.isStudent) } }
[ -1 ]
b348def6f8bcaf46859d1bbf756601b3fa28435b
9809c8c30cd11f96de9c4dea2b222d62d5ae6d26
/Tests/SwiftLintFrameworkTests/DisableAllTests.swift
16e4470bb32f41e289392a22fdec828a049c066b
[ "MIT" ]
permissive
417-72KI/SwiftLint
156dc6da7faceebd5e7d15f0b145506594dafa5f
d6ff2a7f37dbc211f4bd219f3e52946fbb50772d
refs/heads/master
2023-04-18T12:46:33.653463
2023-01-01T22:23:50
2023-01-01T22:23:50
221,587,004
1
0
MIT
2023-04-04T01:31:34
2019-11-14T01:42:35
Swift
UTF-8
Swift
false
false
5,799
swift
import SwiftLintFramework import XCTest class DisableAllTests: XCTestCase { /// Example violations. Could be replaced with other single violations. private let violatingPhrases = [ Example("let r = 0"), // Violates identifier_name Example(#"let myString:String = """#), // Violates colon_whitespace Example("// TODO: Some todo") // Violates todo ] // MARK: Violating Phrase /// Tests whether example violating phrases trigger when not applying disable rule func testViolatingPhrase() { for violatingPhrase in violatingPhrases { XCTAssertEqual( violations(violatingPhrase.with(code: violatingPhrase.code + "\n")).count, 1, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } // MARK: Enable / Disable Base /// Tests whether swiftlint:disable all protects properly func testDisableAll() { for violatingPhrase in violatingPhrases { let protectedPhrase = violatingPhrase.with(code: "// swiftlint:disable all\n" + violatingPhrase.code) XCTAssertEqual( violations(protectedPhrase).count, 0, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } /// Tests whether swiftlint:enable all unprotects properly func testEnableAll() { for violatingPhrase in violatingPhrases { let unprotectedPhrase = violatingPhrase.with(code: """ // swiftlint:disable all \(violatingPhrase.code) // swiftlint:enable all \(violatingPhrase.code)\n """) XCTAssertEqual( violations(unprotectedPhrase).count, 1, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } // MARK: Enable / Disable Previous /// Tests whether swiftlint:disable:previous all protects properly func testDisableAllPrevious() { for violatingPhrase in violatingPhrases { let protectedPhrase = violatingPhrase .with(code: """ \(violatingPhrase.code) // swiftlint:disable:previous all\n """) XCTAssertEqual( violations(protectedPhrase).count, 0, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } /// Tests whether swiftlint:enable:previous all unprotects properly func testEnableAllPrevious() { for violatingPhrase in violatingPhrases { let unprotectedPhrase = violatingPhrase.with(code: """ // swiftlint:disable all \(violatingPhrase.code) \(violatingPhrase.code) // swiftlint:enable:previous all\n """) XCTAssertEqual( violations(unprotectedPhrase).count, 1, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } // MARK: Enable / Disable Next /// Tests whether swiftlint:disable:next all protects properly func testDisableAllNext() { for violatingPhrase in violatingPhrases { let protectedPhrase = violatingPhrase.with(code: "// swiftlint:disable:next all\n" + violatingPhrase.code) XCTAssertEqual( violations(protectedPhrase).count, 0, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } /// Tests whether swiftlint:enable:next all unprotects properly func testEnableAllNext() { for violatingPhrase in violatingPhrases { let unprotectedPhrase = violatingPhrase.with(code: """ // swiftlint:disable all \(violatingPhrase.code) // swiftlint:enable:next all \(violatingPhrase.code)\n """) XCTAssertEqual( violations(unprotectedPhrase).count, 1, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } // MARK: Enable / Disable This /// Tests whether swiftlint:disable:this all protects properly func testDisableAllThis() { for violatingPhrase in violatingPhrases { let rawViolatingPhrase = violatingPhrase.code.replacingOccurrences(of: "\n", with: "") let protectedPhrase = violatingPhrase.with(code: rawViolatingPhrase + "// swiftlint:disable:this all\n") XCTAssertEqual( violations(protectedPhrase).count, 0, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } /// Tests whether swiftlint:enable:next all unprotects properly func testEnableAllThis() { for violatingPhrase in violatingPhrases { let rawViolatingPhrase = violatingPhrase.code.replacingOccurrences(of: "\n", with: "") let unprotectedPhrase = violatingPhrase.with(code: """ // swiftlint:disable all \(violatingPhrase.code) \(rawViolatingPhrase)// swiftlint:enable:this all\n" """) XCTAssertEqual( violations(unprotectedPhrase).count, 1, #function, file: violatingPhrase.file, line: violatingPhrase.line) } } }
[ -1 ]
3bc2c4aeb8e54800372be1e25280e025ce46dbfb
8f10c3b96d35db64649daccce3aebed4ecfdab7c
/podcast-iosTests/Scenes/PodcastScene/PodcastViewControllerTests.swift
47ac2a8acd2f5ddd4aec993533a1d0a932487f30
[ "MIT" ]
permissive
Maetschl/ios-podcast
7705a0460368efa47ea43e5e0a1d5087c6ad533e
6622d4a5dbc1bb071f43a9f3964920bc29f5bd00
refs/heads/master
2020-11-27T03:00:06.563998
2019-12-20T20:30:05
2019-12-20T20:30:05
229,280,635
0
1
null
null
null
null
UTF-8
Swift
false
false
1,164
swift
// // PodcastViewControllerTests.swift // podcast-iosTests // // Created by Julian Arias Maetschl on 12/20/19. // Copyright © 2019 Julian Arias Maetschl. All rights reserved. // import XCTest @testable import podcast_ios class PodcastViewControllerTests: XCTestCase { var sut: PodcastViewController! var interactor: PodcastBussinessLogicSpy! var window: UIWindow! override func setUp() { super.setUp() window = UIWindow() let bundle = Bundle.main let storyboard = UIStoryboard(name: "Main", bundle: bundle) sut = storyboard.instantiateViewController(withIdentifier: "PodcastViewController") as! PodcastViewController interactor = PodcastBussinessLogicSpy() sut.interactor = interactor } override func tearDown() { sut = nil super.tearDown() } func loadView() { window.addSubview(sut.view) RunLoop.current.run(until: Date()) } func testViewLifeCycleCallsInteractorGetPodcastList() { // Given // When loadView() // Then XCTAssertTrue(interactor.getPodcastListCalled) } }
[ -1 ]
6223c5589d12b4c07036163af59a804f1bff1715
f62a9a4325e20407bf381a2c4d90a26f0c60c48a
/TwoDimensionalSampleCode/TwoDimensionalSampleCode/TwoDimensional.swift
1ad6b2786bc8fe47e69d075b6532c63f7c0ba001
[]
no_license
CSCI-S-65G/CodeSamples
2d4f44ae2244dafd6f43b6868802fb95cb75d77f
164b625008380ffdaa56772106aa4204988715f0
refs/heads/master
2020-12-24T10:10:34.704592
2016-07-27T14:15:24
2016-07-27T14:15:24
62,466,673
1
0
null
null
null
null
UTF-8
Swift
false
false
9,179
swift
// // TwoDimensional.swift // TwoDimensionalSampleCode // // Created by Jp LaFond on 7/2/16. // Copyright © 2016 Jp LaFond. All rights reserved. // import Foundation // MARK: - typealias definitions /// A useful feature of Swift that lets you convert a known class to an alias to minimize typing. This is especially useful in closure definitions. typealias LifeGrid = [[Int]] typealias CellCoordinates = (row: Int, column: Int) // MARK: - CellState definition /** * CellState * * Note: * Rules of _*Conway's Game of Life*_: * * Dead cells: * * 3 interesting neighbors: Reproduction (Alive) * * Otherwise, stays Dead *** * * Living cells (interesting): * * <2 interesting neighbors: Starvation (Dead) * * 2-3 interesting neighbors: Alive * * >3 interesting neighbors: Overcrowding (Dead) */ enum CellState { case dead case reproduction case starvation case alive case overcrowding /// Dynamic variable to clarify death var isDead: Bool { switch (self) { case .dead, .starvation, .overcrowding: return true case .reproduction, .alive: return false } } /** * Variant initializer to encorporate the rules of _*Conway's Game of Life*_ */ init(cell: Int, neighborCount: Int) { let isAlive = cell == TwoDimensional.interestingValue if isAlive == false { // Dead path if neighborCount == 3 { self = .reproduction } else { self = .dead } } else { // Alive path if neighborCount < 2 { self = .starvation } else if neighborCount == 2 || neighborCount == 3 { self = .alive } else { self = .overcrowding } } } } /** This class will create a two dimensional Int array and instantiate it with random values. */ class TwoDimensional { // MARK: - Properties let columnsMax : Int let rowsMax : Int var lifeGrid : LifeGrid private static let interestingValue = 1 // MARK: - Life cycle methods /** Initialize the two-dimensional array defined in this class. If the values are negative, they'll be normalized to zero values. - Parameter columnsMax: non-zero maximum - Parameter rowsMax: non-zero maximum */ init(columns: Int, rows: Int) { // Validate the inputs if (columns < 0) { columnsMax = 0 } else { columnsMax = columns } if (rows < 0) { rowsMax = 0 } else { rowsMax = rows } // Instantiate the array lifeGrid = Array(count: rowsMax, repeatedValue: Array(count: columnsMax, repeatedValue: 0)) // Set it to a random value for col in 0..<columnsMax { for row in 0..<rowsMax { lifeGrid[row][col] = Int(arc4random_uniform(3)) } } } // MARK: - Conway Game of Life Methods // This illustrates code samples within comments /** * Calculate the eight neighbors of a known coordinate * * ```` * X X X O O -- Simple Case * X T X O O * X X X O O * O O O O O * * T X O O X -- Wrapped case * X X O O X * O O O O O * X X O O X * ```` * * - Parameter targetCoordinate: of the target cell * * - Returns: an array of the targets neighbors; nil, if the coordinates are invalid */ func neighborsOf(targetCoordinate: CellCoordinates) -> [CellCoordinates]? { // Validate the input if targetCoordinate.row < 0 || targetCoordinate.row >= rowsMax || targetCoordinate.column < 0 || targetCoordinate.column >= columnsMax { print ("target (r: (\(targetCoordinate.row)) c: (\(targetCoordinate.column)) invalid") return nil } // Loop through the grid and normalize the values let rowMin = targetCoordinate.row - 1 let rowMax = targetCoordinate.row + 1 let colMin = targetCoordinate.column - 1 let colMax = targetCoordinate.column + 1 var neighbors = [CellCoordinates]() for row in rowMin ... rowMax { for col in colMin ... colMax { var tmpRow = row % rowsMax var tmpCol = col % columnsMax if tmpRow < 0 { tmpRow = (tmpRow + rowsMax) % rowsMax } if tmpCol < 0 { tmpCol = (tmpCol + columnsMax) % columnsMax } if tmpRow != targetCoordinate.row || tmpCol != targetCoordinate.column { neighbors.append(CellCoordinates(row: tmpRow, column: tmpCol)) } } } // print ("Neighbors: <\(neighbors)> of " + // "<R: \(targetCoordinate.row), " + // "C: \(targetCoordinate.column)>") return neighbors } /** * Census of the neighbors of a known target * * - Parameter targetCoordinate: of the cell * - Parameter lifeGrid: to evaluate * * - Returns: the number of interesting neighbors; 0 for a invalid targetCoordinate */ func neighborCensusOf(targetCoordinate: CellCoordinates, in lifeGrid: LifeGrid) -> Int { // Validate the neighbors list, as it doesn't return, // if the CellCoordinates are invalid guard let neighbors = neighborsOf(targetCoordinate) else { print ("No neighbors found for (r \(targetCoordinate.row)) c (\(targetCoordinate.column))") return 0 } var neighborCensus = 0 for neighbor in neighbors { if lifeGrid[neighbor.row][neighbor.column] == TwoDimensional.interestingValue { neighborCensus += 1 } } return neighborCensus } /** A count of all interesting cells in the lifeGrid - Parameter lifeGrid: to count - Returns: count of interesting cells */ func censusOf(lifeGrid: LifeGrid) -> Int { var census = 0 for intArray in lifeGrid { for intValue in intArray { if intValue == TwoDimensional.interestingValue { census += 1 } } } return census } /** Pretty prints a life grid - Parameter lifeGrid: to print - Returns: a pretty printable string */ func prettyPrint(lifeGrid: LifeGrid) -> String { let derivedColumns = lifeGrid.count let derivedRows : Int if (derivedColumns == 0) { derivedRows = 0 } else if let firstElement = lifeGrid.first { derivedRows = firstElement.count } else { // Should never happen, but belt and suspendering to catch any logical failures. print("lifeGrid: <\(lifeGrid)>") derivedRows = 0 } var prettyPrintLog = "[\(derivedColumns)x\(derivedRows)]\n" for intArray in lifeGrid { for intValue in intArray { // prettyPrintLog += "\(intValue) " prettyPrintLog += (intValue == TwoDimensional.interestingValue) ? "X " : "O " } prettyPrintLog += "\n" } return prettyPrintLog } /** * Step method to generate the next iteration of the * lifeGrid */ func step(lifeGrid: LifeGrid) -> LifeGrid { // Validate if lifeGrid.isEmpty { print ("lifegrid is empty") prettyPrint(lifeGrid) return LifeGrid() } // Create the second lifegrid to write into var nextLifeGrid = Array(count: rowsMax, repeatedValue: Array(count: columnsMax, repeatedValue: 0)) // Walk the current grid and populate the new one for row in 0..<rowsMax { for col in 0..<columnsMax { // Get the current cell let cellStatus = lifeGrid[row][col] // Get the neighbor census let neighborCensus = neighborCensusOf(CellCoordinates(row: row, column: col), in: lifeGrid) // What's the next cell state going to be let nextCellState = CellState(cell: cellStatus, neighborCount: neighborCensus) // Generate the next value interestingValue == alive; otherwise, 0 nextLifeGrid[row][col] = (nextCellState.isDead ? 0 : TwoDimensional.interestingValue) } } return nextLifeGrid } }
[ -1 ]
f13731a98681456d9b1178dfc0d5291109692749
8ab9519652a60f7fe2c979113ab3d6f681388c1b
/Concentration.swift
0a7abef1ad4af80acdbf8bc9ffbb9f4e7462b394
[]
no_license
MalikMAta/Concentration-lab-1
3aa4acfe163835403d98e7b7d0441b1495152b27
e4713ba9741fecafb12a2c280c4b187507310d4a
refs/heads/master
2020-04-26T12:59:06.810707
2019-12-16T19:28:39
2019-12-16T19:28:39
173,566,743
0
0
null
null
null
null
UTF-8
Swift
false
false
3,693
swift
// // Concentration.swift // Concentration // // Created by Malik Ata on 2/12/19. // Copyright © 2019 admin. All rights reserved. // import Foundation class Concentration { private(set) var cards = [Card]() //variable for the score that is matched or unmatched private(set) var scoreBoard = 0 private struct Points { static let matchBonus = 1 static let missMatchPenalty = 1 } //keep track of how many flips occured private(set) var flipCount = 0 private(set) var cardLooked: Set<Int> = [] private var indexOfOneAndOnlyFaceUpCard: Int? { get { var foundIndex: Int? for index in cards.indices { if cards[index].isFaceUp { if foundIndex == nil { foundIndex = index } else { return nil } } } return foundIndex } set{ for index in cards.indices{ cards[index].isFaceUp = (index == newValue) }}} func chooseCard(at index: Int) { assert(cards.indices.contains(index), "Concentration.chooseCard(at: \(index)) : Choosen index out of range") if !cards[index].isMatched { flipCount += 1 if let matchIndex = indexOfOneAndOnlyFaceUpCard, matchIndex != index { if cards[matchIndex].identifier == cards[index].identifier { //cards match cards[matchIndex].isMatched = true cards[index].isMatched = true // Increase the score scoreBoard += Points.matchBonus } else { if cardLooked.contains(matchIndex) { scoreBoard -= Points.missMatchPenalty } cardLooked.insert(index) cardLooked.insert(matchIndex) } cards[index].isFaceUp = true } else { indexOfOneAndOnlyFaceUpCard = index } } } //function to reset the game to the intial state func resetGame (){ //after the game resets, shuffle the cards shuffleTheCards() //set the cardLooked, flipount, and the score booard of the game to zero cardLooked = []; flipCount = 0 ; scoreBoard = 0 //set the cards all to false for faceup for index in cards.indices { cards[index].isFaceUp = false cards[index].isMatched = false } } init (numberOfPairsOfCards: Int) { assert(numberOfPairsOfCards > 0, "Concentration.init(\(numberOfPairsOfCards)): you must have at least one pair of cards") for _ in 1...numberOfPairsOfCards{ let card = Card() cards += [card , card] } shuffleTheCards() } //to do // function to shuffle the cards private func shuffleTheCards() { //for all the cards all 26 for _ in 0..<cards.count { //used sort method instead od swap cards.sort(by: {_,_ in arc4random() > arc4random()}) } } }
[ -1 ]
4205e228e1fb624e2223444acc63974189051cd4
83fc9f48c28b501df7ba128fc387861db9a57533
/SwiftWin/Program v1.swift
3abbfede1a7632263715093b49290a5485a409b7
[]
no_license
Siemargl/El-sDistance
b21444b13c183d62076af9d3e319764139e0bd1b
1fa4278ad32428e8bb7c0843e39c25018a98013c
refs/heads/master
2021-01-14T19:31:19.889922
2020-02-25T10:49:53
2020-02-25T10:49:53
242,731,475
0
1
null
null
null
null
UTF-8
Swift
false
false
1,529
swift
/* Нахождение расстояния Левенштейна Версия для Windows.Native, Elements.Island */ class Program { public static func LevDist(_ s1: UInt8[], _ s2: UInt8[]) -> Int32! { var m = s1.Length var n = s2.Length // Edge cases. if m == 0 { return n } else { if n == 0 { return m } } var range = Range(0 ... (n + 1)) var v0: Swift.Array<Int64> = range.GetSequence() var v1 = Swift.Array<Int64>(v0); // var v1 = v0; // must copy, but make a ref /* // variant with Int32, but without Range var v0 = Swift.Array<Int32>(capacity: n + 2); for i in 0...n+1 { v0.insert(i, at: i) } var v1 = Swift.Array<Int32>(v0); */ var i = 0 while i < m { v1[0] = i + 1 var j = 0 while j < n { var substCost = (s1[i] == s2[j] ? v0[j] : v0[j] + 1) var delCost = v0[j + 1] + 1 var insCost = v1[j] + 1 v1[j + 1] = Math.Min(substCost, delCost) if insCost < v1[j + 1] { v1[j + 1] = insCost } inc(j) }var temp = v0 v0 = v1 v1 = temp inc(i) }return v0[n] } } var b1 = [UInt8](repeating: 61 as! UInt8, count: 20000) var b2: UInt8[] = b1 var b3 = Swift.Array<UInt8>(repeating: UInt8(63), count: 20000) print("Start Distance"); var execTimer: StopWatch! = StopWatch() execTimer.Start() print(Program.LevDist(b1, b2)) print(Program.LevDist(b1, b3)) execTimer.Stop() var execTime: Float64 = execTimer.ElapsedMilliseconds / 1000.0 / 10 print(execTime, "s") return 0
[ -1 ]
5ac337fb4cb90042f5fad1ed0c7fcf5a52e74331
725f05dd98682f82a4af9a8bd4d01497284a4cc2
/Sources/App/Services/TownsRepository.swift
377b1667d5f664bae6b7e2d61252eb83a7462c91
[ "MIT" ]
permissive
tombuildsstuff/towns-api-vapor
cfe6be34edb4488262e88f3c1fc8deb330c79f42
aeb326e4423ee76897df18e5b303edb6ffe6fc5d
refs/heads/master
2020-04-09T19:16:51.137783
2016-09-13T06:57:50
2016-09-13T06:57:50
68,046,317
0
0
null
null
null
null
UTF-8
Swift
false
false
379
swift
class TownsRepository { func getAll() -> [Town] { return [ Town(name: "Winchester", country: "England"), Town(name: "Berlin", country: "Germany"), Town(name: "Sienna", country: "Italy"), Town(name: "Amsterdam", country: "The Netherlands"), Town(name: "Havana", country: "Cuba"), ] } }
[ -1 ]
1d3fdee28ae56d09cabb5795c602135c4a89af3c
7c1a62b23ebd604861cea2b44615fb12ccc81fa5
/Project3/Project1/SceneDelegate.swift
b7faa481b578c0003fe51911e35d9fada0314661
[]
no_license
paigupai/100_Days_of_Swift_Notes
7247a8080023a23f970868997b3808e046d682e2
d168b7348a316d1d1e4f6b06008916d2f5dd1053
refs/heads/master
2023-01-28T09:11:15.053930
2020-06-17T11:07:22
2020-06-17T11:07:22
249,469,999
0
0
null
null
null
null
UTF-8
Swift
false
false
2,337
swift
// // SceneDelegate.swift // Project1 // // Created by paigu on 2020/04/04. // Copyright © 2020 paigu. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 16444, 393277, 376906, 327757, 254032, 286804, 368728, 254045, 368736, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 180432, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 336124, 385281, 336129, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 98819, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 418508, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 361490, 386070, 271382, 336922, 345119, 377888, 328747, 214060, 345134, 345139, 361525, 361537, 377931, 197708, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 337048, 345247, 361645, 337072, 345268, 337076, 402615, 361657, 402636, 328925, 165086, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 115973, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 419360, 370208, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 403139, 337607, 419528, 419531, 272083, 394967, 419543, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 362274, 378664, 354107, 345916, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 247760, 346064, 346069, 329699, 354275, 190440, 247790, 354314, 346140, 337980, 436290, 395340, 378956, 436307, 338005, 329816, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 346317, 411862, 256214, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 272787, 354728, 338353, 338363, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 330612, 330643, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 330750, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 331089, 437588, 396634, 175451, 437596, 429408, 175458, 208228, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 175487, 249215, 175491, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 339401, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 372354, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 397089, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 438438, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356631, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 250203, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 340639, 258723, 332455, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 430940, 357212, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 340859, 324476, 430973, 119675, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 366173, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 267929, 333472, 333512, 259789, 358100, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333593, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 399222, 325494, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 334047, 350449, 375027, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 342431, 375209, 326059, 375220, 342453, 334263, 326087, 358857, 195041, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 244309, 334425, 326240, 375401, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 384099, 384102, 384108, 367724, 326764, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 384189, 384192, 351424, 343232, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 343399, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 155241, 138865, 155255, 155274, 368289, 245410, 425639, 245415, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
83be9b6f61581d7eb5737e47f0ba6894ca95b6ed
c20e3fdc240968218197ab710e564daba65c8c83
/SaveEarth/SaveEarth/Controller/TabBarController.swift
34b06cbb2eb31260a8dd545472b9731502569f3e
[]
no_license
seungbong88/SaveEarth
24a700d4e81051b7deefd3d8486de9a6e9865b1b
1bd82d8d69acb25e8562e040feddafc132f01efc
refs/heads/master
2023-02-24T16:58:29.304605
2021-01-31T10:01:10
2021-01-31T10:01:10
306,861,998
1
0
null
null
null
null
UTF-8
Swift
false
false
711
swift
// // TabBarControllerViewController.swift // SaveEarth // // Created by seungbong on 2020/10/24. // Copyright © 2020 한승희. All rights reserved. // import UIKit class TabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ -1 ]
72a51d6a3906f276372f3811a36d25e02df04b0e
4f8ceb020802b788c6b90f24cbf3188737669474
/AppStorageExam/AppStorageExamUITests/AppStorageExamUITests.swift
f7468e672fe969bdfce3e240d4d1e439799beee3
[]
no_license
erdiergene/WWDC2020
bcc017f90d12ac6f21f72bb8a757fc998756a69b
625f27c2c1af7d2d7a28abae7b981729afaa1e36
refs/heads/master
2022-11-19T06:57:43.205336
2020-07-26T09:21:00
2020-07-26T09:21:00
282,535,253
1
0
null
null
null
null
UTF-8
Swift
false
false
1,436
swift
// // AppStorageExamUITests.swift // AppStorageExamUITests // // Created by Macbook PRO on 12.07.2020. // import XCTest class AppStorageExamUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } } }
[ 360463, 376853, 344106, 253996, 385078, 163894, 319543, 352314, 376892, 32829, 352324, 352327, 385095, 393291, 163916, 368717, 196687, 254039, 426074, 368732, 32871, 352359, 221292, 385135, 376945, 385147, 426124, 196758, 49308, 65698, 49317, 377008, 377010, 377025, 377033, 164043, 417996, 254157, 368849, 368850, 139478, 385240, 254171, 147679, 147680, 205034, 254189, 254193, 344312, 336121, 262403, 147716, 368908, 180494, 262419, 368915, 254228, 377116, 254250, 131374, 418095, 336177, 368949, 180534, 155968, 270663, 319816, 368969, 254285, 180559, 377168, 344402, 368982, 270703, 139641, 385407, 385409, 270733, 106893, 385423, 385433, 213402, 385437, 254373, 385448, 385449, 311723, 115116, 385463, 336319, 336323, 188870, 262619, 377309, 377310, 369121, 369124, 270823, 213486, 360945, 139766, 393719, 377337, 254459, 410108, 410109, 262657, 377346, 410126, 262673, 385554, 393745, 254487, 410138, 188957, 377374, 385569, 385578, 377388, 197166, 393775, 418352, 33339, 352831, 33344, 385603, 385612, 426575, 385620, 369236, 270938, 352885, 352886, 344697, 385669, 369285, 344714, 377487, 180886, 426646, 352921, 377499, 344737, 352938, 418479, 164532, 336565, 377531, 377534, 377536, 385737, 385745, 369365, 369366, 385751, 361178, 352989, 352990, 418529, 295649, 385763, 369383, 361194, 418550, 344829, 197377, 434956, 418579, 426772, 197398, 426777, 344864, 197412, 336678, 189229, 197424, 197428, 336693, 377656, 426809, 197433, 222017, 377669, 197451, 369488, 385878, 385880, 197467, 435038, 385895, 197479, 385901, 197489, 164730, 254851, 369541, 172936, 426894, 189327, 377754, 172971, 140203, 377778, 189362, 189365, 377789, 345034, 418774, 386007, 386009, 418781, 386016, 123880, 418793, 222193, 435185, 271351, 435195, 328701, 386049, 328705, 418819, 410629, 377863, 189448, 320526, 361487, 435216, 386068, 254997, 336928, 336930, 410665, 345137, 361522, 386108, 410687, 377927, 361547, 205911, 361570, 214116, 214119, 402538, 173168, 377974, 66684, 402568, 140426, 337037, 386191, 410772, 222364, 418975, 124073, 402618, 402632, 148687, 402641, 419028, 222441, 386288, 66802, 271607, 369912, 386296, 369913, 419066, 386300, 386304, 320769, 369929, 419097, 320795, 115997, 222496, 369964, 353581, 116014, 312628, 345397, 386363, 337226, 353611, 337228, 353612, 378186, 353617, 378201, 312688, 337280, 353672, 263561, 304523, 370066, 9618, 411028, 370072, 148900, 361928, 337359, 329168, 353751, 329181, 320997, 361958, 271850, 271853, 411119, 116209, 386551, 312830, 271880, 198155, 329231, 370200, 157219, 157220, 394793, 353875, 99937, 345697, 271980, 206447, 403057, 42616, 337533, 370307, 419462, 149127, 419464, 149128, 411275, 214667, 345753, 255651, 337590, 370359, 403149, 345813, 370390, 272087, 345817, 337638, 345832, 181992, 345835, 141037, 173828, 395018, 395019, 395026, 124691, 435993, 345882, 411417, 321308, 255781, 362281, 378666, 403248, 378673, 345910, 182070, 182071, 436029, 337734, 272207, 272208, 337746, 395092, 362326, 345942, 370526, 345950, 362336, 255844, 214894, 362351, 214896, 124795, 182145, 337816, 124826, 329627, 354210, 436130, 436135, 10153, 362411, 370604, 362418, 411587, 362442, 346066, 354268, 436189, 403421, 329696, 354273, 403425, 190437, 354279, 436199, 174058, 337899, 354283, 247787, 247786, 313322, 124912, 436209, 182277, 346117, 354310, 43016, 354312, 354311, 403463, 436235, 419857, 436248, 346153, 124974, 272432, 403507, 378933, 378934, 436283, 403524, 436293, 436304, 411738, 272477, 395373, 346237, 436372, 362658, 436388, 125108, 133313, 395458, 338118, 436429, 346319, 321744, 379102, 387299, 18661, 379110, 125166, 149743, 379120, 125170, 436466, 411892, 436471, 395511, 436480, 125184, 272644, 125192, 338187, 338188, 125197, 395536, 125200, 338196, 272661, 379157, 125204, 157973, 125215, 125216, 338217, 125225, 125236, 362809, 379193, 395591, 272730, 436570, 215395, 362864, 354672, 272755, 354678, 248188, 313726, 436609, 240003, 436613, 395653, 395660, 264591, 272784, 420241, 43416, 436644, 272815, 436659, 338359, 436677, 256476, 420326, 166403, 322057, 420374, 322077, 330291, 191065, 436831, 420461, 313970, 346739, 346741, 420473, 166533, 363155, 346771, 264855, 363161, 436897, 355006, 363228, 436957, 436960, 264929, 338658, 346859, 330476, 35584, 133889, 346889, 264971, 322320, 207639, 363295, 355117, 191285, 273209, 355129, 273211, 355136, 355138, 420680, 355147, 355148, 355153, 387927, 363353, 363354, 322396, 420702, 363361, 363362, 412516, 355173, 355174, 207724, 355182, 207728, 420722, 330627, 265094, 387977, 396171, 355216, 224146, 224149, 256918, 256919, 256920, 256934, 273336, 273341, 330688, 379845, 363462, 273353, 207839, 347104, 134124, 412653, 248815, 257007, 347122, 437245, 257023, 125953, 396292, 330759, 347150, 330766, 412692, 330789, 248871, 412725, 257093, 404550, 314437, 339031, 404582, 257126, 265318, 265323, 396395, 404589, 273523, 363643, 248960, 150656, 363658, 404622, 224400, 265366, 347286, 429209, 339101, 429216, 339106, 380069, 265381, 421050, 265410, 183492, 273616, 421081, 339167, 421102, 363769, 52473, 52476, 412926, 437504, 388369, 380178, 429332, 126229, 412963, 257323, 437550, 273713, 208179, 159033, 347451, 216387, 257353, 257354, 109899, 437585, 331091, 150868, 372064, 429410, 437602, 388458, 265579, 314734, 314740, 314742, 421240, 314745, 388488, 314776, 396697, 396709, 380331, 380335, 355761, 421302, 134586, 380348, 216510, 216511, 380350, 200136, 273865, 339403, 372172, 413138, 421338, 437726, 429540, 3557, 3559, 191980, 191991, 265720, 216575, 372226, 437766, 208397, 323088, 413202, 413206, 388630, 175640, 216610, 372261, 347693, 323120, 396850, 200245, 323126, 134715, 421437, 396865, 413255, 273992, 265800, 421452, 265809, 396885, 265816, 396889, 388699, 396896, 323171, 388712, 388713, 339579, 396927, 224907, 396942, 405140, 274071, 208547, 208548, 405157, 388775, 364202, 421556, 224951, 224952, 323262, 323265, 241360, 241366, 224985, 159462, 372458, 397040, 12017, 274170, 175874, 249606, 323335, 372497, 397076, 421657, 339746, 241447, 167720, 257831, 421680, 421686, 274234, 241471, 339782, 315209, 241494, 339799, 274276, 274288, 372592, 274296, 339840, 315265, 372625, 118693, 438186, 151492, 380874, 372699, 380910, 380922, 380923, 274432, 372736, 241695, 315431, 430120, 315433, 430127, 405552, 249912, 225347, 421958, 176209, 381013, 53334, 356446, 438374, 176231, 438378, 217194, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 323730, 430231, 200856, 422044, 192670, 192671, 258213, 323761, 430263, 266427, 372943, 266447, 258263, 356575, 438512, 372979, 389364, 381173, 135416, 356603, 266504, 61720, 381210, 315674, 389406, 438575, 266547, 397620, 332084, 438583, 127292, 438592, 332100, 397650, 348499, 250196, 348501, 389465, 332128, 110955, 242027, 160111, 250227, 438653, 266628, 340356, 225684, 373141, 373144, 389534, 397732, 373196, 242138, 184799, 201195, 324098, 340489, 397841, 258584, 397855, 348709, 348710, 397872, 340539, 266812, 438850, 348741, 381515, 348748, 430681, 332379, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 356990, 373377, 422529, 201348, 152196, 356998, 348807, 356999, 316050, 275102, 176805, 340645, 422567, 176810, 160441, 422591, 135888, 242385, 373485, 373486, 21239, 275193, 348921, 430853, 430860, 62222, 430880, 152372, 160569, 430909, 160576, 348999, 439118, 275294, 381791, 127840, 357219, 439145, 242540, 242542, 381811, 201590, 398205, 340865, 349066, 316299, 349068, 381840, 390034, 373653, 430999, 209820, 381856, 398244, 185252, 422825, 381872, 398268, 349122, 398275, 127945, 373705, 340960, 398305, 398313, 127990, 349176, 201721, 349179, 357380, 398370, 357413, 357420, 21567, 398405, 218187, 250955, 250965, 439391, 250982, 398444, 62574, 357487, 119925, 349304, 349315, 349317, 373902, 177297, 324761, 373937, 373939, 218301, 259275, 259285, 357594, 414956, 251124, 439550, 439563, 242955, 414989, 259346, 349458, 259347, 382243, 382246, 382257, 382264, 333115, 193853, 251212, 406862, 259408, 316764, 374110, 259449, 382329, 357758, 243073, 357763, 112019, 398740, 374189, 251314, 259513, 54719, 259569, 251379, 398844, 210429, 366081, 153115, 431646, 349727, 431662, 374327, 210489, 349764, 128589, 333394, 349780, 415334, 54895, 366198, 210558, 210559, 415360, 333438, 415369, 210569, 431754, 267916, 415376, 259741, 153252, 399014, 210601, 202413, 317102, 415419, 259780, 333508, 267978, 333522, 325345, 431861, 161539, 366358, 169751, 431901, 341791, 325411, 333609, 399148, 202541, 431918, 153392, 431935, 415555, 325444, 325449, 341837, 415566, 431955, 325460, 317268, 341846, 259937, 382820, 415592, 325491, 341878, 276343, 350072, 333687, 317305, 112510, 325508, 333700, 243590, 350091, 350092, 350102, 350108, 333727, 219046, 128955, 219102, 6116, 432114, 415740, 268286, 415744, 333827, 243720, 399372, 153618, 358418, 178215, 325675, 243763, 358455, 325695, 399433, 104534, 260206, 432241, 374913, 374914, 415883, 333968, 333990, 104633, 260285, 268479, 374984, 334049, 325857, 268515, 383208, 317676, 260337, 260338, 432373, 375040, 432387, 260355, 375052, 325904, 194832, 391448, 334104, 268570, 178459, 186660, 268581, 358698, 325930, 260396, 432435, 358707, 178485, 358710, 14654, 268609, 383309, 383327, 391521, 366948, 416101, 383338, 432503, 432511, 252309, 39323, 317851, 375211, 129461, 342454, 358844, 317889, 326083, 416201, 129484, 154061, 416206, 432608, 195044, 391654, 432616, 334315, 375281, 334345, 432650, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 219694, 219695, 375345, 432694, 375369, 375373, 416334, 416340, 244311, 260705, 416353, 375396, 268901, 244326, 244345, 375438, 326288, 383668, 342714, 39616, 383708, 269036, 432883, 203511, 342775, 383740, 416509, 359166, 162559, 375552, 432894, 383755, 326413, 318247, 342827, 391980, 318251, 375610, 342846, 416577, 416591, 244569, 375644, 252766, 351078, 342888, 392057, 211835, 269179, 392065, 260995, 400262, 392071, 424842, 400271, 392080, 400282, 7070, 211871, 359332, 359333, 326571, 252848, 326580, 261045, 261046, 326586, 359365, 211913, 252878, 342990, 433104, 359380, 433112, 433116, 359391, 187372, 343020, 383980, 383994, 171009, 384004, 433166, 384015, 433173, 326684, 252959, 384031, 375848, 261191, 375902, 375903, 392288, 253028, 351343, 187505, 138354, 384120, 392317, 343166, 384127, 392320, 359574, 351389, 253098, 367791, 367792, 367798, 343230, 367809, 253124, 113863, 351445, 195809, 253168, 351475, 351489, 367897, 367898, 245018, 130347, 261426, 212282, 359747, 359748, 146760, 146763, 114022, 253288, 425327, 425331, 163190, 384379, 253316, 384391, 253339, 253340, 343457, 245160, 359860, 359861, 343480, 425417, 327122, 425434, 310747, 253431, 359931, 187900, 343552, 409095, 359949, 253456, 253462, 146976, 245290, 245291, 343606, 163385, 425534, 138817, 147011, 147020, 179800, 343646, 155238, 204394, 138862, 188021, 425624, 245413, 384693, 376502, 409277, 319176, 409289, 425682, 245471, 155360, 212721, 163575, 319232, 360194, 409355, 155408, 417556, 204600, 319289, 384826, 409404, 360253, 409416, 376661, 368471, 425820, 368486, 409446, 425832, 368489, 40809, 384871, 417648, 417658, 360315, 253828, 327556, 425875, 253851, 376733, 204702, 253868, 204722, 188349, 212947, 212953, 360416, 253930, 385011 ]
d22f9d6e2e052092b42b16978e20d7511b1d89c2
047d5d412c95075c9a33eec41f592fb26ac4a06c
/UIPressTest/ViewController.swift
d70d879e8f1077b29a596eb6bea2222043a4087b
[]
no_license
Zedd0202/UIKeyTest
4b5eb97df57b30eef91cc7fcc1945b9a101d95b9
656054d645b9aadd9f4cfa446716ca47f73f7f1e
refs/heads/master
2022-07-19T01:36:32.028321
2020-05-22T02:37:33
2020-05-22T02:37:33
264,416,736
0
0
null
null
null
null
UTF-8
Swift
false
false
581
swift
// // ViewController.swift // UIPressTest // // Created by Zedd on 2020/05/16. // Copyright © 2020 Zedd. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var myLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() } override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) { for press in presses { guard let key = press.key else { continue } self.myLabel.text = "응 \(key.characters) 누른 부분이야~" } } }
[ -1 ]