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
11fc5044596a4ad2fed7cfb764d9690c929214b2
58a2995dd249b73813a4be2c16c552d7f5620bfe
/automation/resource-manager/Sources/automation/protocols/DscNodeConfigurationProtocol.swift
44c1d8c89357570b5219020d7d103dab59d7b19c
[ "MIT" ]
permissive
Azure/azure-libraries-for-swift
e577d83d504f872cf192c31d97d11edafc79b8be
b7321f3c719c381894e3ee96c5808dbcc97629d7
refs/heads/master
2023-05-30T20:22:09.906482
2021-02-01T09:29:10
2021-02-01T09:29:10
106,317,605
9
5
MIT
2021-02-01T09:29:11
2017-10-09T18:02:45
Swift
UTF-8
Swift
false
false
566
swift
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. import Foundation // DscNodeConfigurationProtocol is definition of the dsc node configuration. public protocol DscNodeConfigurationProtocol : ProxyResourceProtocol { var lastModifiedTime: Date? { get set } var creationTime: Date? { get set } var configuration: DscConfigurationAssociationPropertyProtocol? { get set } }
[ -1 ]
eb51ac22709cf4c35f6424241450ff196705a7dc
aa4b81c904d78ad253e37ec2d86ccd8d88aab06d
/MapKitAppCoreData/Reminder.swift
78830cf0ae66cfffb204cfb577643ec9792f99e5
[]
no_license
gaylejj/MapKitAppCoreData
61849807c2530b21b76a7ed26e449eb66b930c98
7f76b0730cf84dfe914e2fc4bd4565d50e94f3b5
refs/heads/master
2021-01-10T21:42:50.889054
2014-09-11T16:20:14
2014-09-11T16:20:14
null
0
0
null
null
null
null
UTF-8
Swift
false
false
320
swift
// // Reminder.swift // MapKitAppCoreData // // Created by Jeff Gayle on 8/20/14. // Copyright (c) 2014 Jeff Gayle. All rights reserved. // import Foundation import CoreData class Reminder: NSManagedObject { @NSManaged var lat: NSNumber @NSManaged var long: NSNumber @NSManaged var message: String }
[ -1 ]
34fa77aafc2841e182dee0644a5fc8425e714238
85281116322ab758f6d51caa345e5dbeb1abb44b
/Rack/Rack.swift
fac27963cf39b4cf8d640b3eb71ee2ca1a01b04b
[]
no_license
jsmilani/SwiftRack
5ed2376edab2fdc71a7ed962c2115c7ab85de890
07e14e74b8b7810cee5685445d0a5c1b5c8a8349
refs/heads/master
2016-09-06T16:11:22.593567
2015-09-14T00:32:41
2015-09-14T00:32:41
42,418,133
0
0
null
null
null
null
UTF-8
Swift
false
false
1,774
swift
// // Rack.swift // Rack // // Created by John Smilanick on 9/13/15. // Copyright (c) 2015 John Smilanick. All rights reserved. // import Foundation protocol RackApp { func call(env: Rack.Env) -> Rack.Response } protocol RackMiddleware { init(app: RackApp) func call(env: Rack.Env) -> Rack.Response } class Rack { typealias Code = Int typealias Body = [String] // multi-part body typealias Header = [String : String] typealias Response = (Int, Header, Body) typealias Params = [String : AnyObject] enum Method : String { case GET = "GET" case POST = "POST" case PUT = "PUT" case DELETE = "DELETE" case HEAD = "HEAD" case OPTIONS = "OPTIONS" case TRACE = "TRACE" case CONNECT = "CONNECT" } class Env { let ParsedParamsKey = "rack.parsedParams" let server : String = "" let host : String = "" let port : Int = 80 let scheme : String = "" let ssl : Bool = false let method : Method = .GET let header : Header = [:] let path : String = "" let query : String = "" var userData : [String: AnyObject] = [:] func params() -> Params { var parsedParams = self.userData[ParsedParamsKey] as? Params if parsedParams == nil { var newParsedParams = Rack.parseNestedQuery(query) self.userData["ParsedParamsKey"] = newParsedParams return newParsedParams } return parsedParams! } } // Utils class func parseNestedQuery(query : String) -> Params { var params = Params() return params } }
[ -1 ]
ef5e4aa96f903d2928e40298294b436192004114
bbe6122ccfdec1afed247fccbe32c93614b5aaee
/Swift_Day5/Swift_Day05/Swift_Day05/ViewController.swift
1f85d9f3f25d07478eb80d4b326b32cdc085942c
[]
no_license
tranhieutt/Swift_traning
715bdf3fadeff43af1b702a19808e48577d722d2
1d62f9079a940ad153097106d5c40a720a8cae49
refs/heads/master
2021-01-10T01:56:19.143604
2016-02-11T10:26:45
2016-02-11T10:26:45
43,535,819
14
2
null
2015-12-07T02:34:29
2015-10-02T04:27:08
Swift
UTF-8
Swift
false
false
839
swift
// // ViewController.swift // Swift_Day05 // // Created by Dang Thai Son on 9/28/15. // Copyright © 2015 Dang Thai Son. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let exString: String = "123456789" print("Using original function: \(exString.characters.count)") print("Use String Extension: \(exString.length)") // Substirng Extension print("Substring \(exString.subString(1, length: 5))") // Replace String let newString = exString.replace("123", withString: "111") print("Repacled String: \(newString)") // Implement Spellcheck :D } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } }
[ -1 ]
28ae446b5a7582113404ae9fd96a0bb4996c1efa
745e04e2ad8d9f5aea5ea1909446d325552eb2b3
/Sources/PDQ/Extensions/Protocols.swift
7be317676a099b70df02110385f5e9e45f664145
[]
no_license
bengottlieb/PDQ
a2fee190c9ead233b9851dcd3e50888b8d77aa41
e4b4feb0a32c218f2ad3d9c5b58d6fddd8de63ac
refs/heads/main
2023-07-08T11:07:49.148859
2021-08-21T02:20:39
2021-08-21T02:20:39
313,998,242
0
0
null
null
null
null
UTF-8
Swift
false
false
382
swift
// // Protocols.swift // PDQ // // Created by Ben Gottlieb on 2/5/18. // Copyright © 2018 Stand Alone, Inc. All rights reserved. // import Foundation public protocol PDQViewDelegate: AnyObject { func highlightsChanged(in: PDQView) func visiblePageChanged(in: PDQView) func setControls(visible: Bool, in: PDQView, with duration: TimeInterval) func didClick(on url: URL) }
[ -1 ]
dc5addb372685560e1286875aa2ea3527fcbfb56
a4247abda96d61ae1f5e8436906a0e4c0cd48177
/SF2Reader/FileManagement/pResourceManager.swift
88ffbe4489af98df77c5089d88c3ade3191d717b
[]
no_license
Orphee3/iOS
53e2eed83073746dd781b1ccda175d2871104f47
cb1ca6a39c8329e994d7a5ffa7aebc81acb800e9
refs/heads/master
2020-12-20T06:25:48.572915
2016-04-20T21:50:02
2016-04-20T22:42:15
30,858,617
1
1
null
2016-02-23T23:24:34
2015-02-16T07:48:01
Swift
UTF-8
Swift
false
false
678
swift
// // pResourceManager.swift // FileManagement // // Created by JohnBob on 25/03/2015. // Copyright (c) 2015 __ORPHEE__. All rights reserved. // import Foundation /// Classes charged with managing resources for an iOS app should follow this protocol. public protocol pResourceManager { /// Creates ressource file at given path. /// /// - parameter path: The path leading to the resource file. /// /// - returns: `true` on success, `false` on failure. func createResource(path: String) -> Bool; /// Deletes the managed resource /// /// - returns: `true` on success, `false` on failure. func deleteResource() -> Bool; }
[ -1 ]
ac3fe20ef3a87666e19401487d9ebbde7e0e4e7c
358b58d63567de98a01e8dda18be71d203df7236
/UI/Protocols/RxAlertProtocol.swift
a2893a9f9ec44e3eff227ea67154f652cd6c3162
[]
no_license
andraskadar/goeurotest
791ae75d9496e00327e20aaf77ae2dbe32b8600b
45baeeef009877346397ca9b745847d8164a6d7f
refs/heads/master
2021-07-11T22:22:13.095853
2017-10-16T21:47:04
2017-10-16T21:47:04
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,947
swift
// // RxAlertProtocol.swift // goeurotest // // Created by Andras Kadar on 2017. 10. 16.. // Copyright © 2017. andraskadar. All rights reserved. // import UIKit import RxSwift struct AlertMessage { var title: String? var message: String? var actions: [AlertAction] var needsCancelAction: Bool var needsOkAction: Bool } struct AlertAction { var title: String var isDestructive: Bool var callback: (() -> Void)? } protocol AlertProtocol { } protocol AlertSignalProtocol { var showAlert: Observable<AlertMessage> { get } } extension AlertProtocol where Self: DisposableProtocol, Self: UIViewController { func handleAlerts(for signal: AlertSignalProtocol) { handleAlerts(observable: signal.showAlert) } func handleAlerts(observable: Observable<AlertMessage>) { observable .observeOn(MainScheduler.instance) .subscribe(onNext: { [weak self] message in self?.present(message: message) }) .addDisposableTo(disposeBag) } func present(message: AlertMessage, style: UIAlertControllerStyle = .alert) { let controller = UIAlertController( title: message.title, message: message.message, preferredStyle: style) message.actions.forEach { action in controller.addAction( UIAlertAction( title: action.title, style: action.isDestructive ? .destructive : .default, handler: { (_) in action.callback?() }) ) } if message.needsCancelAction { controller.addAction( UIAlertAction( title: "general.cancel".localized, style: .cancel, handler: nil) ) } if message.needsOkAction { controller.addAction( UIAlertAction( title: "general.ok".localized, style: .cancel, handler: nil) ) } present(controller, animated: true, completion: nil) } }
[ -1 ]
33b6f72f63254d31c45a8b9853e2829521842f9b
c9f36b0e2ea9ad168f87471a294bb13ec25757b3
/ManatthanChallenge/Controller/People/ProfileViewController.swift
cb203606722f27c74f22fd2ad7df662cc6856356
[]
no_license
vincy1097/ManatthanChallenge
162f1ae6c3720ec556e4e0885f7b1516f3194a27
4227b367490f86485f194f96c961f21ea5f160f3
refs/heads/master
2021-08-31T06:26:28.446086
2017-12-20T14:31:16
2017-12-20T14:31:16
114,135,488
0
0
null
null
null
null
UTF-8
Swift
false
false
892
swift
// // ProfileViewController.swift // Manhattan Challenge // // Created by Michele De Sena on 13/12/2017. // Copyright © 2017 Michele De Sena. All rights reserved. // import UIKit class ProfileViewController: 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. } */ }
[ 279041, 279046, 309264, 281107, 279064, 300057, 295460, 286249, 296489, 197677, 281142, 300089, 238653, 226878, 277057, 288321, 286786, 129604, 228932, 288332, 278606, 212561, 228945, 203858, 300116, 300629, 276054, 237655, 280146, 212573, 200802, 309347, 309349, 309351, 309353, 286314, 296042, 277612, 311913, 164974, 284275, 284276, 284277, 294518, 314996, 277108, 284279, 292478, 284287, 278657, 281218, 284289, 281221, 284293, 284298, 303242, 311437, 227984, 303760, 278675, 349332, 226454, 226455, 226456, 226458, 284315, 284317, 278686, 284323, 282275, 278693, 284328, 313007, 284336, 276150, 280760, 277180, 296638, 283839, 277696, 280770, 280772, 228551, 280775, 284361, 230604, 298189, 302286, 230608, 317137, 290004, 284373, 290006, 189655, 302295, 226009, 298202, 298204, 280797, 278749, 298207, 278752, 290016, 298206, 298211, 290020, 363743, 301284, 284391, 280808, 277224, 199402, 280810, 234223, 358127, 312049, 286963, 289524, 280821, 226038, 286965, 333048, 288501, 120054, 358139, 280826, 280832, 276736, 230147, 358147, 278791, 312586, 287231, 300817, 278298, 329499, 287004, 287005, 281373, 287007, 295711, 281380, 233767, 315177, 130346, 282922, 289578, 312107, 282926, 283433, 113972, 159541, 289596, 283453, 278845, 289600, 279360, 283461, 234829, 298830, 296272, 279380, 295766, 289112, 279386, 298843, 188253, 292701, 311645, 308064, 200549, 227688, 216433, 277364, 290166, 292730, 333179, 207738, 290175, 224643, 313733, 183173, 304012, 233869, 304015, 300432, 310673, 370093, 226196, 284570, 275358, 284574, 289697, 284577, 289187, 289190, 289191, 305577, 284586, 291755, 276396, 277420, 277422, 279982, 286126, 297903, 305582, 230323, 289196, 277429, 277430, 282548, 277432, 277433, 277434, 293816, 127418, 278973, 291774, 293308, 298951, 286158, 280015, 301012, 280029, 280030, 286175, 279011, 289771, 286189, 183278, 298989, 282095, 237556, 292341, 302580, 236022, 288251, 286204, 290303 ]
78f50de0142061f62790cba0785fbfe62a84ae35
07d0c23d1dc2fb3f8b320ac3b857059b3e7a4e9b
/StackExchangeAPI/Model/TopAnswerers.swift
55bbbfa95dc9462026f45950ee5bc49a3c9ceed8
[]
no_license
SerxhioGugo/StackExchangeAPI
bf5ee2a7c76961e2331a41d703c24a092fc5ddd2
748f9067d8368e4ccaf37e362cfb7eb1e0089815
refs/heads/master
2020-04-06T13:12:08.708665
2018-11-14T04:05:21
2018-11-14T04:05:21
157,488,668
0
0
null
null
null
null
UTF-8
Swift
false
false
807
swift
// // TopAnswerers.swift // StackExchangeAPI // // Created by Serxhio Gugo on 10/17/18. // Copyright © 2018 Serxhio Gugo. All rights reserved. // import Foundation struct JSONResponse: Codable { let items: [Items]? } struct Items: Codable { let user: User? let postCount: Int? let score: Int? private enum CodingKeys: String, CodingKey { case user, score case postCount = "post_count" } } struct User: Codable { let reputation: Int? let userType: String? let profileImage: String? let name: String? let link: String? private enum CodingKeys: String, CodingKey { case reputation, link case userType = "user_type" case profileImage = "profile_image" case name = "display_name" } }
[ -1 ]
6563137f2d0162fe7ed2e9a82c84241d1b868ba0
a3ad0d0f0c2779967533e76160e2c09838e7e338
/UserDefaults3-2-1/ViewController.swift
4214fdf2a6f8564a7e6c61f68ed08c5a8f05820c
[]
no_license
cwalter50/UserDefaults3-2-1
af9c8569c5d1d6de1a27d1ddbf4f8c978353bee8
94f6cb95a86e1d5d8d28d922550c51eeae74c37a
refs/heads/master
2020-09-14T17:56:25.080966
2019-11-21T20:11:36
2019-11-21T20:11:36
223,207,096
0
0
null
null
null
null
UTF-8
Swift
false
false
4,682
swift
// // ViewController.swift // UserDefaults3-2-1 // // Created by on 11/21/19. // Copyright © 2019 DocsApps. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var topLabel: UILabel! @IBOutlet weak var currentScoreLabel: UILabel! @IBOutlet weak var bestScoreLabel: UILabel! @IBOutlet weak var gameButton: UIButton! var timer = Timer() var count = 0.0 // this will be used to keep track of the time in the game and also how the user compares to the solution var goal = 0 var highScore = 0.0 var scores: [Double] = [] // this will keep track of all the scores... override func viewDidLoad() { super.viewDidLoad() topLabel.text = "0.00" gameButton.setTitle("Start", for: .normal) currentScoreLabel.text = "Current Score\n---" bestScoreLabel.text = "Best Score\n---" loadFromUserDefaults() } @IBAction func startButtonTapped(_ sender: UIButton) { // if timer is off... start the timer and reset count if !timer.isValid { startTimer() } else { // the game is live. the next click should... // 1. stop the timer timer.invalidate() // 2. compare users time to solution. (Remember count is usertime) let timeDifference = count - 3 // 3. display results if timeDifference > 0 { currentScoreLabel.text = String(format: "Current Score\n+%.02f ", timeDifference) } else if timeDifference < 0 { currentScoreLabel.text = String(format: "Current Score\n%.02f ", timeDifference) // negative sign shows up automatically } else { currentScoreLabel.text = String(format: "Current Score\n%.02f PERFECT!!!", timeDifference) } // 4. add score to scores array scores.append(timeDifference) // 5. compare results to best score displayBestScore() // 6. save to userdefaults if we beat best score.. } } func displayBestScore() { // loop through array of scores and find the closest one to 0. remmeber absolutevalue print("bestscore: \(highScore)") var bestscore = highScore print("all scores: \(scores)") for score in scores { print("comparing best score: \(score.magnitude)") if score.magnitude < bestscore { bestscore = score.magnitude print("bestscore is now \(score)") } } print("Displaying bestscore \(bestscore)") highScore = bestscore bestScoreLabel.text = String(format: "Best Score\n%.02f", bestscore) saveToUserDefaults() } func startTimer() { // get a new goal // goal = Int.random(in: 1...5) // // gameButton.setTitle("Goal:\(goal)", for: .normal) count = 0.0 // reset count timer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(updateTimer), userInfo: nil, repeats: true) } @objc func updateTimer() { if count >= 7.0 { timer.invalidate() } else { count += 0.01 // format to hundredths topLabel.text = String(format: "%.02f ", count) } } func saveToUserDefaults() { let defaults = UserDefaults.standard defaults.set(highScore, forKey: "HighScore") // save scores // this will help me display game averages and all stats... defaults.setValue(scores, forKey: "scores") } func loadFromUserDefaults() { let defaults = UserDefaults.standard // load high score! highScore = defaults.double(forKey: "HighScore") // fix highscore if this is the first time loading... let hasLoadedBefore = defaults.bool(forKey: "first") // defaults to false if it doesn't exist if hasLoadedBefore == false { print("inside isFirstTimeLoading") highScore = 10.0 defaults.set(true, forKey: "first") } bestScoreLabel.text = String(format: "Best Score\n%.02f", highScore) //load scores scores = defaults.array(forKey: "scores") as? [Double] ?? [Double]() } }
[ -1 ]
966f98b7b438efcb39284dbe3d820ca6783ea9cb
a7d5581aaa26440af62712b3a68c8bd5a155249c
/dev-profile/dev-profile/ViewController.swift
3edb8db3103385d054c753bb2a5dd955e2ccd094
[]
no_license
aaronjohal/auto-layouts
ab17f558b8081299f36b8cf4f7a89daa847fd982
13fd3537f7497d677c83ce79044287193984fc94
refs/heads/master
2021-05-25T08:55:51.216846
2020-04-08T10:20:54
2020-04-08T10:20:54
253,750,244
0
0
null
null
null
null
UTF-8
Swift
false
false
337
swift
// // ViewController.swift // dev-profile // // Created by Aaron Johal on 07/04/2020. // Copyright © 2020 Aaron Johal. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } }
[ 361600, 327555, 356742, 409238, 188950, 342552, 391456, 372769, 245024, 354729, 225460, 396725, 381122, 146645, 225504, 383969, 247652, 247653, 247655, 345966, 345972, 345976, 415355 ]
10e1c188451e5f005c7ab36c178aa38221f008fb
2f8444b56c24d412451d1c3c011526202ef88f46
/Sources/Injection.swift
a4e785d7f40392ee450dbdb3124121dcd1f64915
[ "MIT" ]
permissive
rogerluan/Injection
f442925ffdb926a100b3a46368b3c7aa04eacd2b
330ebc40b868b8b1fcd65bbc12db361e61e5f9b4
refs/heads/main
2023-05-02T14:31:23.716403
2021-05-18T04:30:31
2021-05-18T04:30:31
368,398,943
0
0
MIT
2021-05-18T04:20:51
2021-05-18T04:20:51
null
UTF-8
Swift
false
false
6,184
swift
import Foundation public typealias DependencyFactory = () -> Any public protocol Dependency { var factory: DependencyFactory { get } var isSingleton: Bool { get } var type: Any.Type { get } } extension Dependency { var typeName: String { String(describing: type) } } final class DependencyContainer<T>: Dependency { let isSingleton: Bool let type: Any.Type let factory: DependencyFactory init(isSingleton: Bool, factory: @escaping () -> T) { self.isSingleton = isSingleton type = T.self self.factory = { factory() } } } public enum Error: LocalizedError, Hashable { case noDependenciesInjected case multipleDependencyInjection case duplicateDependency(String) case failedToResolveDependency(String) public var errorDescription: String? { switch self { case let .duplicateDependency(name): return "Dependency \(name) can only be registered once." case let .failedToResolveDependency(name): return "Dependency \(name) could not be resolved." case .multipleDependencyInjection: return "Can only inject dependencies once." case .noDependenciesInjected: return "No dependencies injected." } } } final class Dependencies { var instances: [String: Any] = [:] var injected: [String: Dependency] = [:] private let lock: NSLocking = NSRecursiveLock() init() {} static var shared = Dependencies() func inject(_ dependencies: [Dependency]) throws { lock.lock() defer { lock.unlock() } guard !dependencies.isEmpty else { throw Error.noDependenciesInjected } guard injected.isEmpty else { throw Error.multipleDependencyInjection } for dependency in dependencies { guard injected[dependency.typeName] == nil else { throw Error.duplicateDependency(dependency.typeName) } injected[dependency.typeName] = dependency } } func resolve<T>() throws -> T { let typeName = String(describing: T.self) guard let injectedDependency = injected[typeName] else { throw Error.failedToResolveDependency(typeName) } let resolved: T if injectedDependency.isSingleton { let buildBlock: () -> T = { let instance = injectedDependency.factory() as! T self.instances[typeName] = instance return instance } resolved = instances[typeName] as? T ?? buildBlock() } else { resolved = injectedDependency.factory() as! T } return resolved } } // MARK: - Public API /// Resolves the dependency by fetching the component of type `T` from the registered dependencies. If the component is not found an error is thrown. public func resolve<T>() throws -> T { try Dependencies.shared.resolve() } /// Resolves the dependency by fetching the component of type `T` from the registered dependencies. public func resolveOptional<T>() -> T? { try? Dependencies.shared.resolve() as T } // MARK: Property Wrappers /// Creates a `Dependency` eagerly injectable through `@Inject var variableName: Dependency`. @propertyWrapper public struct Inject<T> { public let wrappedValue: T public init() { wrappedValue = try! resolve() } // As of Swift 5.3 property wrapper initializers cannot use `throws`. It will crash & burn } /// Creates a `Dependency` lazily injectable through `@LazyInject var variableName: Dependency`. @propertyWrapper public enum LazyInject<T> { case unresolved(() throws -> T) case resolved(T) public init() { self = .unresolved { try resolve() } } public var wrappedValue: T { mutating get { switch self { case let .unresolved(resolver): let dependency = try! resolver() // As of Swift 5.3 variables cannot use `throws`. It will crash & burn self = .resolved(dependency) return dependency case let .resolved(dependency): return dependency } } } } /// Creates an `Optional<Dependency>` injectable through `@OptionalInject var variableName: Dependency?`, lazily instantiated. @propertyWrapper public enum OptionalInject<T> { case unresolved(() -> T?) case resolved(T?) public init() { self = .unresolved { resolveOptional() } } public var wrappedValue: T? { mutating get { switch self { case let .unresolved(resolver): let dependency = resolver() self = .resolved(dependency) return dependency case let .resolved(dependency): return dependency } } } } // MARK: Function Builders @resultBuilder public enum DependenciesBuilder { public static func buildBlock(_ children: [Dependency]...) -> [Dependency] { children.flatMap { $0 } } } /// A new instance of `T` is created each time it is injected. The internal container holds no reference to it. public func factory<T>(constructor: @escaping () -> T) -> [Dependency] { [DependencyContainer(isSingleton: false, factory: constructor)] } /// The same instance of `T` is returned each time it is injected. An instance like this has its lifetime connected to the internal container instance, which essencially is the app lifetime. public func singleton<T>(constructor: @escaping () -> T) -> [Dependency] { [DependencyContainer(isSingleton: true, factory: constructor)] } /// An helper function to create a smaller module of dependencies that can be combined when using the `inject` method. public func module(@DependenciesBuilder makeChildren: () -> [Dependency]) -> [Dependency] { makeChildren() } /// This method adds an array of `Dependency`'s to the available dependencies to be injected. It should be called when the /// app is initialized or at least before any of the injected properties get initialized, otherwise there will be blood. /// /// - Note: It should be used only once. public func inject(@DependenciesBuilder makeDependencies: () -> [Dependency]) throws { try Dependencies.shared.inject(makeDependencies()) }
[ -1 ]
aa4b2b5abd62d59e30cf979f96a516268a24fd5a
4d44efd7dd63246d3da48298a1e967cf2783aa8c
/Booking App/InformacionHotel.swift
08983cd43177deedbd787db5cb898b8ea7879ab7
[]
no_license
Adrc95/BookingApp
250bd81538144d7bec787f1d80c6bef45f4a61b4
3ff5c2097921f982e301d41aa846086d2214b95a
refs/heads/master
2021-01-20T09:14:53.768499
2017-05-04T06:57:18
2017-05-04T06:57:18
90,230,451
0
0
null
null
null
null
UTF-8
Swift
false
false
1,818
swift
// // InformacionHotel.swift // Booking App // // Created by user126228 on 27/4/17. // Copyright © 2017 user126228. All rights reserved. // import UIKit class InformacionHotel: UIViewController { @IBOutlet var imagenHotel: UIImageView! var hotel:Hotel! var fechaReserva:String! var pdf:String! override func viewDidLoad() { super.viewDidLoad() imagenHotel.image = hotel.imagen nombre.text = hotel.nombre direccion.text = hotel.url fecha.text = fechaReserva } @IBOutlet var nombre: UILabel! @IBOutlet var fecha: UILabel! @IBOutlet var direccion: UILabel! override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func onClickUrl(_ sender: UIButton) { performSegue(withIdentifier: "url", sender: nil) } @IBAction func onClickMapa(_ sender: UIButton) { performSegue(withIdentifier: "mapa", sender: nil) } @IBAction func onClickMasInfo(_ sender: UIButton) { performSegue(withIdentifier: "pdf", sender: nil) } @IBAction func onClickInicio(_ sender: UIButton) { performSegue(withIdentifier: "inicio", sender: nil) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if(segue.identifier == "mapa"){ let controlador = segue.destination as? Mapa controlador?.hotel = hotel } else if(segue.identifier == "url") { let controlador = segue.destination as? Url controlador?.url = hotel.url } else if(segue.identifier == "pdf") { let controlador = segue.destination as? vistapdf controlador?.pdf = pdf } } }
[ -1 ]
fdd20263bbddc552d088d27c7a0780478f266c4f
5fe74f05eaa5edcfe5ab8c5e9dbb13d18731a6db
/Tic Tac Toe/Tic Tac Toe/ViewController.swift
aa128c5b9586de59c923f11f13973f69a8322a66
[]
no_license
bits2learn/SwiftWorkspace
63ef47504069aa3552df6f91a99bcd247abf3e74
d481b8335b96bd1b052a82fdbc9e8812a64e90dd
refs/heads/master
2021-01-01T15:51:30.804347
2015-06-19T06:30:21
2015-06-19T06:30:21
37,561,631
0
0
null
null
null
null
UTF-8
Swift
false
false
4,858
swift
// // ViewController.swift // Tic Tac Toe // // Created by Nishant Chapa on 4/2/15. // Copyright (c) 2015 BitsFriends. All rights reserved. // import UIKit class ViewController: UIViewController { //1 = noughts, 2 = crosses var activePlayer = 1 var gameState = [0, 0, 0, 0, 0, 0, 0, 0, 0] var winningCombinations = [[0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8], [0,4,8], [2,4,6]] var gameActive = true @IBOutlet var button: UIButton! @IBOutlet var messageLabel: UILabel! @IBOutlet var playAgainButton: UIButton! @IBAction func playAgainButtonPressed(sender: AnyObject) { activePlayer = 1 gameState = [0, 0, 0, 0, 0, 0, 0, 0, 0] gameActive = true var button : UIButton for var i = 0; i < 9; i++ { button = view.viewWithTag(i) as UIButton! button.setImage(nil, forState: .Normal) } messageLabel.hidden = true playAgainButton.hidden = true messageLabel.center = CGPointMake(messageLabel.center.x - 400, messageLabel.center.y) playAgainButton.center = CGPointMake(playAgainButton.center.x - 400, playAgainButton.center.y) } @IBAction func buttonPressed(sender: AnyObject) { if gameState[sender.tag] == 0 && gameActive == true { var image = UIImage() gameState[sender.tag] = activePlayer if activePlayer == 1 { image = UIImage(named: "nought.png")! activePlayer = 2 } else { image = UIImage(named: "cross.png")! activePlayer = 1 } sender.setImage(image, forState: .Normal) for combination in winningCombinations { if gameState[combination[0]] != 0 && gameState[combination[0]] == gameState[combination[1]] && gameState[combination[1]] == gameState[combination[2]] { var labelText = "Noughts have won!" if gameState[combination[0]] == 2 { labelText = "Crosses have won!" } messageLabel.text = labelText messageLabel.hidden = false playAgainButton.hidden = false UIView.animateWithDuration(0.5, animations: { () -> Void in self.messageLabel.center = CGPointMake(self.messageLabel.center.x - 400, self.messageLabel.center.y) self.playAgainButton.center = CGPointMake(self.playAgainButton.center.x - 400, self.playAgainButton.center.y) }) gameActive = false } } } var counter = 0 for var j = 0; j < 9 ; j++ { if gameState[j] == 0 { counter++ } } if counter == 0 && gameActive == true { messageLabel.text = "We have no winner" messageLabel.hidden = false playAgainButton.hidden = false UIView.animateWithDuration(0.5, animations: { () -> Void in self.messageLabel.center = CGPointMake(self.messageLabel.center.x - 400, self.messageLabel.center.y) self.playAgainButton.center = CGPointMake(self.playAgainButton.center.x - 400, self.playAgainButton.center.y) }) gameActive = false } } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. messageLabel.hidden = true playAgainButton.hidden = true messageLabel.center = CGPointMake(messageLabel.center.x - 400, messageLabel.center.y) playAgainButton.center = CGPointMake(playAgainButton.center.x - 400, playAgainButton.center.y) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func viewDidLayoutSubviews() { } }
[ -1 ]
d29a0e8577cd95d043f6df3876ae8d5de2b97713
d50759c3853dc3cdc66c837bca4c6e0fd1557ba4
/tutorial_Combine_SwiftUI/tutorial_Combine_SwiftUITests/tutorial_Combine_SwiftUITests.swift
e571da21ae3271e16b223b3d7e5feda317d37282
[]
no_license
sEmoto0808/tutorial_Combine_x_SwiftUI
241c613acb564907ad357d038875c041a8c812fa
9c766e6ff6e9a1d4335faa85ca695b8379487bae
refs/heads/main
2023-02-08T01:26:16.866586
2020-12-28T12:49:56
2020-12-28T12:49:56
324,527,977
0
0
null
null
null
null
UTF-8
Swift
false
false
961
swift
// // tutorial_Combine_SwiftUITests.swift // tutorial_Combine_SwiftUITests // // Created by 江本匠 on 2020/12/26. // import XCTest @testable import tutorial_Combine_SwiftUI class tutorial_Combine_SwiftUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. } 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 { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() throws { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 360462, 16419, 229413, 204840, 344107, 155694, 253999, 229430, 163896, 180280, 352315, 376894, 352326, 196691, 385116, 237663, 254048, 319591, 221290, 352368, 204916, 131191, 196760, 426138, 49316, 173, 32941, 377009, 295098, 417988, 417994, 139479, 254170, 229597, 311519, 205035, 336120, 344313, 327929, 147717, 368905, 180493, 254226, 368916, 262421, 377114, 237856, 237857, 254251, 311597, 98610, 180535, 336183, 254286, 344401, 377169, 368981, 155990, 368984, 98657, 270701, 270706, 139640, 246137, 311685, 106888, 385417, 311691, 385422, 213403, 385454, 377264, 311738, 33211, 336320, 311745, 254406, 188871, 328152, 287198, 319981, 254456, 377338, 377343, 254465, 139792, 303636, 393751, 254488, 377376, 377386, 197167, 385588, 352829, 115270, 385615, 426576, 369235, 139872, 139892, 344696, 287352, 311941, 336518, 369289, 311945, 344715, 311949, 287374, 377489, 311954, 352917, 230040, 271000, 377497, 303771, 377500, 205471, 344738, 139939, 352937, 336558, 205487, 303793, 336564, 287417, 287422, 377539, 164560, 385747, 361176, 418520, 287452, 369385, 312052, 172792, 344827, 221948, 344828, 205568, 295682, 197386, 434957, 426774, 197399, 426775, 344865, 197411, 189228, 295724, 197422, 353070, 164656, 295729, 353078, 197431, 336702, 353109, 377686, 230234, 189275, 435039, 295776, 303972, 385893, 246643, 295798, 361337, 254850, 369538, 295824, 140204, 377772, 304051, 230332, 377790, 353215, 213957, 345033, 386006, 418776, 50143, 123881, 271350, 295927, 328700, 328706, 410627, 320516, 295942, 386056, 353290, 254987, 377869, 238610, 418837, 140310, 369701, 238639, 312373, 238651, 132158, 361535, 336960, 377926, 361543, 361566, 304222, 173166, 377972, 377983, 402565, 386189, 337039, 238743, 238765, 238769, 402613, 353479, 353481, 353482, 402634, 189653, 419029, 148696, 296153, 304351, 222440, 328940, 66801, 353523, 386294, 386301, 320770, 386306, 66825, 369930, 328971, 353551, 320796, 222494, 66862, 353584, 345396, 386359, 116026, 378172, 312648, 337225, 304456, 337227, 230729, 238927, 353616, 378209, 386412, 296307, 116084, 337281, 148867, 378244, 296329, 296335, 9619, 370071, 173491, 304564, 353719, 361927, 148940, 353750, 271843, 361963, 296433, 329225, 296461, 304656, 329232, 370197, 402985, 394794, 288309, 312889, 288327, 239198, 99938, 312940, 222832, 247416, 370296, 337534, 337535, 263809, 288392, 239250, 419478, 345752, 255649, 337591, 403148, 9936, 9937, 370388, 272085, 345814, 345821, 321247, 321249, 345833, 345834, 67315, 173814, 288512, 288516, 321302, 345879, 321310, 255776, 362283, 378668, 296755, 345919, 436031, 403267, 345929, 337745, 18262, 362327, 345951, 362337, 345955, 296806, 214895, 313199, 362352, 182144, 305026, 329622, 337815, 436131, 354212, 436137, 362417, 362431, 174019, 214984, 362443, 354269, 329695, 354272, 436191, 354274, 337895, 354280, 247785, 313319, 174057, 436205, 362480, 346118, 43014, 354316, 313357, 346162, 288828, 436285, 288833, 288834, 436292, 403525, 436301, 338001, 338003, 280661, 329814, 338007, 280675, 280677, 43110, 321637, 436329, 215164, 215166, 280712, 346271, 436383, 362659, 239793, 182456, 379071, 149703, 346314, 321745, 387296, 280802, 379106, 346346, 321772, 338164, 436470, 149760, 411906, 272658, 272660, 338218, 321840, 379186, 321860, 289110, 272729, 215385, 354676, 354677, 436608, 362881, 240002, 436611, 395659, 395661, 108944, 190871, 149916, 420253, 141728, 289189, 108972, 272813, 338356, 436661, 289232, 256477, 174593, 420369, 207393, 289332, 174648, 338489, 338490, 297560, 354911, 436832, 436834, 420463, 346737, 313971, 346740, 420471, 330379, 117396, 346772, 264856, 289434, 346779, 314040, 363211, 363230, 264928, 338662, 346858, 330474, 289518, 363263, 117517, 322319, 166676, 207640, 289576, 355121, 191283, 273207, 355130, 289598, 355137, 355139, 420677, 355146, 355152, 355154, 355165, 355178, 207727, 330609, 207732, 158593, 224145, 355217, 256922, 289690, 420773, 256935, 289703, 363438, 347055, 289727, 273344, 330689, 363458, 379844, 19399, 248796, 248797, 207838, 347103, 347123, 240630, 257024, 330754, 330763, 248872, 314436, 314448, 339030, 257125, 273515, 404593, 363641, 363644, 150657, 248961, 330888, 347283, 363669, 339100, 380061, 429214, 199839, 265379, 249002, 306346, 3246, 421048, 265412, 290000, 298208, 298212, 298213, 330984, 298221, 298228, 363771, 437505, 322824, 257305, 339234, 372009, 412971, 306494, 216386, 224586, 331090, 314710, 372054, 159066, 314720, 380271, 208244, 249204, 290173, 306559, 314751, 298374, 314758, 314760, 142729, 388487, 314766, 290207, 314783, 314789, 208293, 314791, 396711, 396712, 380337, 380338, 150965, 380357, 339398, 306639, 413137, 429542, 372227, 323080, 175639, 388632, 396827, 134686, 355876, 347694, 265798, 265804, 396882, 44635, 396895, 323172, 224883, 314998, 323196, 339584, 339585, 224901, 298661, 61101, 364207, 224946, 110268, 224958, 274115, 306890, 241361, 298720, 175873, 339715, 339720, 372496, 323346, 249626, 339745, 257830, 421672, 339762, 339783, 216918, 241495, 241528, 339841, 315273, 315274, 372626, 380821, 118685, 298909, 323507, 290745, 274371, 151497, 372701, 298980, 380908, 315432, 102445, 233517, 176175, 241716, 225351, 315465, 307289, 315487, 356447, 438377, 233589, 266357, 422019, 241808, 381073, 299174, 258214, 405687, 258239, 389313, 299203, 299209, 372941, 266449, 307435, 438511, 381172, 356602, 184575, 381208, 151839, 233762, 217380, 151847, 332083, 332085, 332089, 438596, 332101, 323913, 348492, 323920, 348500, 168281, 332123, 332127, 242023, 160110, 242033, 291192, 315770, 340357, 225670, 242058, 373134, 242078, 315810, 315811, 381347, 340398, 127427, 324039, 373197, 160225, 291311, 291333, 340490, 258581, 234036, 315960, 348732, 242237, 70209, 348742, 70215, 348749, 381517, 332378, 201308, 111208, 184940, 373358, 389745, 209530, 356989, 373375, 152195, 348806, 316049, 111253, 316053, 111258, 111259, 176808, 299699, 422596, 422599, 291530, 225995, 242386, 422617, 422626, 234217, 299759, 348920, 291585, 430849, 291592, 62220, 422673, 430865, 291604, 422680, 152365, 422703, 422709, 152374, 160571, 430910, 160575, 160580, 348998, 381773, 201551, 242529, 357218, 349026, 127841, 275303, 308076, 242541, 177019, 185211, 308092, 398206, 291712, 381829, 316298, 349067, 349072, 390045, 185250, 185254, 373687, 349121, 381897, 373706, 316364, 349171, 349175, 201720, 127992, 357379, 308243, 201755, 357414, 357423, 300084, 308287, 218186, 250954, 250956, 341073, 439384, 300135, 316520, 349294, 357486, 144496, 300150, 291959, 300151, 160891, 341115, 300158, 349316, 349318, 373903, 169104, 177296, 119962, 300187, 300188, 300201, 300202, 373945, 259268, 62665, 283852, 259280, 316627, 333011, 357595, 333022, 234742, 128251, 439562, 292107, 414990, 251153, 177428, 349462, 382258, 300343, 382269, 177484, 406861, 259406, 234831, 374109, 333160, 316787, 382330, 357762, 112017, 234898, 259475, 275859, 357786, 251298, 333220, 374191, 210358, 300489, 366037, 210390, 210391, 210393, 144867, 366053, 54765, 251378, 308723, 300536, 210433, 366083, 259599, 308756, 398869, 374296, 374299, 308764, 349726, 431649, 349741, 169518, 431663, 194110, 349763, 218696, 292425, 128587, 333388, 349781, 128599, 333408, 374372, 300644, 415338, 243307, 54893, 325231, 366203, 325245, 194180, 415375, 153251, 300714, 210603, 415420, 333503, 259781, 333517, 333520, 325346, 153319, 325352, 325371, 243472, 366360, 169754, 325404, 399147, 431916, 300848, 259899, 325439, 325445, 153415, 341836, 415567, 325457, 317269, 341847, 350044, 128862, 292712, 423789, 325492, 276341, 341879, 317304, 333688, 112509, 55167, 325503, 333701, 243591, 317323, 350093, 325518, 333722, 350109, 292771, 415655, 243637, 301008, 153554, 219101, 292836, 292837, 317415, 325619, 432116, 292858, 415741, 333828, 358410, 399373, 317467, 145435, 325674, 129076, 243767, 358456, 194666, 260207, 432240, 415881, 104587, 235662, 284826, 333991, 194782, 301279, 317664, 243962, 375039, 325905, 325912, 211235, 432421, 211238, 358703, 358709, 383311, 366930, 383332, 383336, 211326, 317831, 252308, 39324, 121245, 375207, 342450, 293303, 293310, 416197, 129483, 342476, 317901, 334290, 342498, 358882, 334309, 391655, 432618, 375276, 416286, 375333, 358954, 244269, 375343, 23092, 375351, 244281, 301638, 309830, 293448, 55881, 416341, 416351, 268899, 39530, 244347, 326287, 375440, 334481, 318106, 318107, 342682, 318130, 383667, 293556, 342713, 39614, 375526, 342762, 342763, 293612, 154359, 432893, 162561, 383754, 310036, 326429, 293664, 326433, 342820, 400166, 293672, 375609, 252741, 293711, 244568, 244570, 342887, 211829, 400252, 359298, 359299, 260996, 113542, 392074, 318364, 310176, 310178, 293800, 236461, 252847, 326581, 326587, 326601, 211914, 359381, 433115, 359387, 343005, 64485, 326635, 187374, 383983, 318461, 293886, 293893, 433165, 384016, 146448, 433174, 252958, 252980, 359478, 203830, 359495, 392290, 253029, 351344, 187506, 285814, 392318, 384131, 302216, 326804, 351390, 343203, 253099, 253100, 318639, 367799, 113850, 294074, 343234, 302274, 367810, 253125, 351446, 195808, 310497, 253167, 302325, 351478, 261377, 351490, 253216, 351537, 261425, 286013, 146762, 294218, 294219, 318805, 425304, 163175, 327024, 318848, 253317, 384393, 368011, 318864, 318868, 310692, 245161, 286129, 286132, 343476, 228795, 425405, 302531, 163268, 425418, 286172, 359930, 286202, 302590, 253451, 253452, 359950, 146964, 253463, 286244, 245287, 245292, 425535, 196164, 179801, 196187, 343647, 310889, 204397, 138863, 188016, 294529, 229001, 188048, 425626, 302754, 40614, 384695, 327358, 212685, 384720, 302802, 212716, 212717, 360177, 319233, 360195, 286494, 409394, 360252, 319292, 360264, 376669, 245599, 425825, 368488, 425833, 417654, 188292, 253829, 294807, 376732, 311199, 253856, 319392, 294823, 327596, 294843, 188348, 237504, 294850, 384964, 344013, 212942, 24532, 212951, 360417, 253929, 311281, 311282 ]
ffddd5f03cb770d2087b45dc7998bb8f1912a483
09c520054039361d85c25b790b237b9e92654b3b
/WhatCook/Scenes/Recipes/Cells/Presenter/RecipeCollectionCellPresenter.swift
b5e36dc9967450fd22de57acc5c723d4c0c7c208
[]
no_license
SSerggreSS/WhatCook
0f376177c8413832b5d2b32831745b6bef4d857b
bd23b3cea96a165b950258e0c47bf3c1e488afeb
refs/heads/master
2023-07-28T06:08:25.493046
2021-09-13T21:37:00
2021-09-13T21:37:00
367,888,064
1
0
null
2021-05-27T17:27:39
2021-05-16T13:28:22
Swift
UTF-8
Swift
false
false
3,460
swift
// // RecipeCollectionCellPresenter.swift // WhatCook // // Created by Сергей Бей on 12.06.2021. // import Foundation import UIKit class RecipeCollectionCellPresenter { let reusableType: Reusable.Type = RecipesViewCell.self ///Model recipe private(set) var recipe: Recipe! private(set) var realmRecipe: RRecipe! private var isFavorite = false ///Service for upload image by url private(set) var imageUploadService: ImageUploadServiceProtocol /// Image for meal form recipe weak var view: RecipeCollectionCellInput? lazy private var realmService: DataBaseServiceProtocol! = RealmService() init(recipe: Recipe, imageUploadService: ImageUploadServiceProtocol) { self.recipe = recipe self.imageUploadService = imageUploadService realmRecipe = RecipeMapper.mapTo(item: recipe) //self.recipeIsFavorite() } } //MARK: private extension RecipeCollectionCellPresenter private extension RecipeCollectionCellPresenter { func updateTitle() { view?.updateTitle(text: recipe.name) } func recipeIsFavorite() { let recipes = realmService.realm.objects(RRecipe.self).filter("id == %@", realmRecipe.id) if recipes.isEmpty { isFavorite = false } else { isFavorite = true } } func nameForPictureOfFavorites() -> String { if isFavorite { return "star.fill" } else { return "star" } } } //MARK: - RecipeCollectionViewCellOutput extension RecipeCollectionCellPresenter: RecipeCollectionViewCellOutput { func viewIsReady() { updateTitle() if let imageData = recipe.imageData { self.view?.updateMealImageWith(data: imageData) } else { imageUploadService.getImageDataBy(urlString: recipe.imageUrl) { [weak self] result in switch result { case .failure(let error): //TODO: process error fatalError(error.rawValue) case .success(let data): self?.view?.updateMealImageWith(data: data) self?.recipe.imageData = data } } } let nameFavoriteImage = nameForPictureOfFavorites() view?.setFavoriteButtonImageWith(name: nameFavoriteImage) } func addOrDeleteRecipeInFavorites() { let recipes = realmService.realm.objects(RRecipe.self).filter("id == %@", realmRecipe.id) if !recipes.isEmpty { realmService.deleteObject([realmRecipe]) { [weak self] in self?.view?.setFavoriteButtonImageWith(name: "star") print("💥💥💥 !!!Recipe will be deleted in favorites!!! 💥💥💥") } realmRecipe = RecipeMapper.mapTo(item: recipe) } else { realmService.writeObject([realmRecipe], succesCompletion: { [weak self] in //TODO: показать тостер что рецепт добавлен в избранное self?.view?.setFavoriteButtonImageWith(name: "star.fill") print("★★★ !!!Recipe will be added in favorites!!! ★★★") }) } //TODO: обработать отсутствие рецепта } }
[ -1 ]
f4a8a5f827a493cde294933d89b5ec97d6f51563
989d71f15a65efe7e2c1c7da337e8e1ce558cc9c
/plugins/example_plugin/macos/Classes/ExamplePlugin.swift
fcf39f5b2a09bde32456089217414d037c40bd8c
[ "Apache-2.0" ]
permissive
ThomasSalvetat/vtah_flutter_intro
7938c559104d3fc9e81b5687edeef422d7f5971d
35cb2eafa143ee9ab50d01e513818a261cceacb3
refs/heads/develop
2020-08-18T05:47:45.858920
2019-10-21T20:57:05
2019-10-21T20:59:23
215,754,321
0
0
null
2019-10-21T19:37:47
2019-10-17T09:29:04
Dart
UTF-8
Swift
false
false
1,248
swift
// Copyright 2019 Google LLC // // 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 Cocoa import FlutterMacOS public class ExamplePlugin: NSObject, FlutterPlugin { public static func register(with registrar: FlutterPluginRegistrar) { let channel = FlutterMethodChannel(name: "example_plugin", binaryMessenger: registrar.messenger) let instance = ExamplePlugin() registrar.addMethodCallDelegate(instance, channel: channel) } public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { switch call.method { case "getPlatformVersion": result("macOS " + ProcessInfo.processInfo.operatingSystemVersionString) default: result(FlutterMethodNotImplemented) } } }
[ -1 ]
74598dba1feaa08ff7f9569985cdd63f5c2d3474
0ba04cc74bc1ca852fd9d702b451d00c102865cc
/BMI Calculator/Controllers/BMI.swift
614d033dcf279a3a401ce4b804ae8b5751922284
[]
no_license
khalilpan/iOS-BMI-Calculator
4447ac9fe6c67a5607146440fd0a6baa83a80b0e
b1f9e780324c659f8a208fc2a6ffcb7f55697510
refs/heads/main
2023-08-23T21:38:07.062426
2021-10-18T01:23:47
2021-10-18T01:23:47
418,300,709
1
0
null
null
null
null
UTF-8
Swift
false
false
183
swift
// // BMI.swift // BMI Calculator // // Created by khalil panahi on 16/10/21. // import UIKit struct BMI { let value: Float let advice: String let color : UIColor }
[ -1 ]
a8cc5f7c930340d06e484e1e4528466866554f89
d2cfcd04cfd36ba90b964478ab47ac72eb9802c5
/CookingManager/CookingManager/HomeViewController.swift
fc8a401dcf21ece2409d994133b7a059ec93fadc
[]
no_license
phamvietduy/CookingManager
4a285faaef283ed2411ee60d7dc10dc9638c039c
4d2aa530ff1518f59e5a7137cf5fe04712bf136c
refs/heads/master
2021-01-22T11:28:50.051518
2017-06-15T01:58:34
2017-06-15T01:58:34
92,701,790
0
0
null
null
null
null
UTF-8
Swift
false
false
4,088
swift
// // ViewController.swift // CookingManager // // Created by Duy Pham Viet on 2017/05/29. // Copyright © 2017 Duy Pham Viet. All rights reserved. // import UIKit import Alamofire import AlamofireObjectMapper class HomeViewController: UIViewControllerBase, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var tableView: UITableView! var arrayGeoPoint : [GeoPointModel]?; override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. self.setupTable() self.getPoint(complete: { (arrayPoint : [GeoPointModel]) in self.arrayGeoPoint = arrayPoint self.tableView.reloadData() }) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if SupportFunctions.hasAppToken() == false{ let credentialRequest = APICredentialRequestEntity() credentialRequest.os = "ios" credentialRequest.version = "10.1" credentialRequest.key = "AEwrAbHiHaj4tr8b" credentialRequest.doRequest { (complete : ResponseParser<APICredentialResponseEntity>) in debugPrint(complete.responseObject as Any) if complete.isSucc == true && complete.responseObject != nil { SupportFunctions.userDefault(setObject: (complete.responseObject?.token)!, forKey: Constant.UserDefault.userToken) SupportFunctions.userDefault(setObject: (complete.responseObject?.credential)!, forKey: Constant.UserDefault.appToken) self.getGeoPoints() } } } else{ self.getGeoPoints() } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } func setupTable(){ tableView.register(UINib.init(nibName: FoodViewCell.className(), bundle: nil), forCellReuseIdentifier: FoodViewCell.className()) tableView.estimatedRowHeight = 100.0 tableView.rowHeight = UITableViewAutomaticDimension tableView.delegate = self tableView.dataSource = self } func getGeoPoints() { let geoPointRequest = APIGeoPointRequestEntity() geoPointRequest.position_token = "d076187278d7bc44" geoPointRequest.doRequest(complete: { (response : ResponseParser<APIGeoPointResponseEntity>) in if(response.isSucc == true) { debugPrint(response.responseObject as Any) GeoPointModel.saveArrayPoint(arrayPoint: response.responseObject?.positions, complete: { (success: Bool, errorCode:String?) in if success == true{ self.arrayGeoPoint = GeoPointModel.fetchAllData() self.tableView.reloadData() } }) } else{ debugPrint("error code : \(response.code), description: \(response.message)") } }) } func getPoint(complete : @escaping(_ arrayPoint : [GeoPointModel]) -> Void){ DispatchQueue.global().async { let arr = GeoPointModel.fetchAllData() DispatchQueue.main.async { complete(arr) } } } //MARK: view controller protocol override var hasNavigationBar: Bool{ return false } //MARK: collectionview protocol func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return arrayGeoPoint?.count ?? 0 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: FoodViewCell.className(), for: indexPath) as! FoodViewCell cell.setGeoPointData(data: (arrayGeoPoint?[indexPath.row])!) return cell } }
[ -1 ]
82f6053a57186bad72096fcd4487a84572d87320
8c523bcfe58754cfd23a533301359cb615c7bdb0
/Ratings/Ratings/AppDelegate.swift
df749445c225f07c870cfeaecf2df4048f4244a6
[]
no_license
joon-so/SmartphoneGameProgramming
af865c9d88db9d41887f27073a4bdf86fc3500ad
e33f0e78029b7755e39404d6750537aa866f6fba
refs/heads/main
2023-05-14T12:52:36.758481
2021-06-12T19:18:45
2021-06-12T19:18:45
376,364,357
0
0
null
null
null
null
UTF-8
Swift
false
false
1,344
swift
// // AppDelegate.swift // Ratings // // Created by KPUGAME on 2021/03/22. // import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 213048, 385081, 376889, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 418007, 418010, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 385280, 336128, 262404, 164106, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 393538, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 246123, 262507, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 262566, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 410128, 393747, 254490, 188958, 385570, 33316, 377383, 197159, 352821, 197177, 418363, 188987, 369223, 385609, 385616, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 328378, 164538, 328386, 344776, 352968, 352971, 418507, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 344835, 336643, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 361288, 336711, 328522, 336714, 426841, 197468, 254812, 361309, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 386003, 345043, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 386073, 336921, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 66782, 222437, 386285, 328941, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181649, 181654, 230809, 181670, 181673, 181678, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 419410, 394853, 345701, 222830, 370297, 403070, 353919, 403075, 345736, 198280, 403091, 345749, 419483, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 419517, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 141051, 337668, 362247, 395021, 362255, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 354150, 354156, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 346063, 247759, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329885, 411805, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 338381, 330189, 338386, 256472, 338403, 338409, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 436962, 338660, 338664, 264941, 363251, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 387944, 355179, 330610, 355218, 330642, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 347176, 396328, 158761, 199728, 396336, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 412764, 339036, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265432, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 347437, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 249214, 175486, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 339420, 249308, 339424, 249312, 339428, 339434, 249328, 69113, 372228, 208398, 380432, 175635, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 372353, 224897, 216707, 421508, 126596, 224904, 224909, 11918, 159374, 224913, 126610, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 257704, 224936, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 257787, 225020, 257790, 339710, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 372499, 167700, 225048, 257819, 225053, 184094, 225058, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 274280, 257896, 257901, 225137, 339826, 257908, 225141, 257912, 225148, 257916, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 372738, 405533, 430129, 266294, 266297, 421960, 356439, 430180, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 225493, 266453, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 397571, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 389502, 250238, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 160234, 127471, 340472, 381436, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 381481, 356907, 324139, 324142, 356916, 324149, 324155, 348733, 324164, 356934, 348743, 381512, 324170, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 373398, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 357069, 332493, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 348978, 152370, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 119674, 324475, 430972, 340858, 340861, 324478, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 381946, 349180, 439294, 431106, 209943, 357410, 250914, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 209995, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 349308, 210044, 349311, 160895, 152703, 210052, 210055, 349319, 218247, 210067, 210071, 210077, 210080, 251044, 210084, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 218360, 251128, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 210260, 365911, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 251271, 136590, 374160, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 415216, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 153227, 333498, 210631, 333511, 259788, 358099, 153302, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 210719, 358191, 366387, 210739, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 358255, 268143, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 333774, 358371, 350189, 350193, 350202, 333818, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 350467, 325891, 350475, 375053, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 325919, 350498, 194852, 350504, 358700, 391468, 350509, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 416157, 268701, 342430, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 358961, 383536, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 375574, 162591, 326441, 383793, 326451, 326454, 260924, 375612, 244540, 326460, 326467, 244551, 326473, 326477, 416597, 326485, 326490, 342874, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 359366, 326598, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 261147, 359451, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 384181, 367800, 351423, 384191, 384198, 326855, 244937, 253130, 343244, 146642, 359649, 343270, 351466, 351479, 384249, 343306, 261389, 359694, 384269, 253200, 261393, 384275, 245020, 245029, 171302, 351534, 376110, 245040, 384314, 425276, 212291, 384323, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 179802, 155239, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 425649, 155322, 425662, 155327, 155351, 155354, 212699, 155363, 245475, 155371, 245483, 409335, 155393, 155403, 155422, 360223, 155438, 155442, 155447, 417595, 360261, 155461, 376663, 155482, 261981, 425822, 376671, 155487, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 147317, 262005, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 253926, 327654, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
f157e7ce307fcfda70281d912badfb04d67b691d
7eefee1aa13f4725e500ca73a41e676b99a00c17
/SQLiteModel/Relationship.swift
e0088a2efbbabe1c47c3c5e0914c2a0a204a2fa3
[ "MIT" ]
permissive
jhurray/SQLiteModel
8f4751230a234242dd1689ded40af2965f3aaba5
953fc44341da2cbbee581901e3e46663e8822836
refs/heads/master
2021-01-21T13:56:52.752925
2016-05-03T16:43:24
2016-05-03T16:43:24
48,557,994
32
3
null
null
null
null
UTF-8
Swift
false
false
1,904
swift
// // Relationship.swift // SQLiteModel // // Created by Jeff Hurray on 1/17/16. // Copyright © 2016 jhurray. All rights reserved. // import Foundation import SQLite public struct Relationship<DataType> { internal typealias UnderlyingType = DataType internal var template: String internal var unique: Bool internal var reference: Int = -1 } extension Relationship where DataType : SQLiteModel { public init(_ template: String, unique: Bool = false) { self.template = template self.unique = unique } } extension Relationship where DataType : CollectionType, DataType.Generator.Element : SQLiteModel { public init(_ template: String, unique: Bool = false) { self.template = template self.unique = unique } } extension Relationship where DataType : _OptionalType{ internal init(_ relationship: Relationship<DataType.WrappedType>) { self.template = relationship.template self.unique = relationship.unique } public init(_ template: String, unique: Bool = false) { self.template = template self.unique = unique } } public struct RelationshipSetter { internal let action: (SQLiteSettable) -> Void } internal struct RelationshipReferenceTracker { private static var sharedInstance = RelationshipReferenceTracker() private var tracker = [String : String]() static func currentTemplate<U: SQLiteModel, V: SQLiteModel>(key: (U.Type, V.Type)) -> String { guard let value = self.sharedInstance.tracker["\(key.0)_\(key.1)"] else { fatalError("SQLiteModel Error: Improper table access for a relationship.") } return value } static func setTemplate<U: SQLiteModel, V: SQLiteModel>(key: (U.Type, V.Type), template: String) { self.sharedInstance.tracker["\(key.0)_\(key.1)"] = template } }
[ -1 ]
f1a3a1f62c3092d49d3e68802ac85fea93b7ea02
758ff41a35dfc51074cccda449e9ca9b8ef115ed
/pageViewcontrolller/pageViewcontrolller/pageViewController3.swift
7d31c62e9a0e872d842b16be20dba4518fa331d1
[]
no_license
0966474398/pageViewController
d6641b96fa0c9593285339fe62b953809b50550b
f26c21bc0658e5aad7ff01c91f9f076033fec4c5
refs/heads/master
2022-07-09T23:51:11.523561
2020-05-17T09:19:58
2020-05-17T09:19:58
264,622,787
0
0
null
null
null
null
UTF-8
Swift
false
false
721
swift
// // pageViewController3.swift // pageViewcontrolller // // Created by Nguyen Quoc Dich on 5/17/20. // Copyright © 2020 Nguyen.Quoc.Dich. All rights reserved. // import UIKit class pageViewController3: UIViewController { 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 ]
82dfe2591086af0af636d25a94d0cbbd56f5d22d
ee71ce1ab3a71bd0d15bdb537851cb0379d1e02c
/Models/Frameworks/ProjectInit.swift
03dd3b29b52973a8195f4534142f04f6f002eb23
[ "MIT" ]
permissive
MoonfishApp/Composite
9c08d3ecf3ed2b863b1ee875f72ef21ad99b4a25
1ccde807c690739b1739e22f02213e195265a992
refs/heads/master
2022-12-17T20:12:53.635892
2020-09-17T20:58:08
2020-09-17T20:58:08
null
0
0
null
null
null
null
UTF-8
Swift
false
false
13,913
swift
// // ProjectInit.swift // SCE // // Created by Ronald "Danger" Mannak on 1/4/19. // Copyright © 2019 A Puzzle A Day. All rights reserved. // import Cocoa /** */ class ProjectInit: NSObject { let frameworkInterface: FrameworkInterface /// Shortcut to the framework init struct let frameworkInit: FrameworkInit let framework: DependencyFrameworkViewModel let platform: DependencyPlatformViewModel let operationQueue = OperationQueue() /// Progress from 0 to 100. Min value set to 10 to indicate progress to user @objc private (set) dynamic var progress: Double = 10 private var progressObserver: NSKeyValueObservation! /// Maximum number of operations private var maxOperationCount: Int = 0 /// Name of the project (and project directory) let projectName: String /// The directory in which the project directory will be created. /// E.g. ~/Development/ The directory that will be created by ProjectInit /// will be ~/Development/<ProjectName> let baseDirectory: String var projectDirectory: URL { return URL(fileURLWithPath: baseDirectory).appendingPathComponent(projectName) } let template: Template? let projectFileURL: URL /// If a new project has to be created based on an existing contract, /// importFile will contain the location of the existing contract let importFile: URL? /// URL of where importFile will be copied to /// The project's default file will be set to this url var importFileDestination: URL? { guard let importFile = importFile else { return nil } let importFilename = importFile.lastPathComponent return URL(fileURLWithPath: baseDirectory).appendingPathComponent(projectName).appendingPathComponent(framework.contractDirectory).appendingPathComponent(importFilename) } /// Call when project initialization finished successfully or unsuccessfully. /// Success: exit status = 0, error = nil. var finished: (Int, Error?) -> Void = {_,_ in } /// Stdout var output: (String)->Void = {_ in } // TODO: add env arguments init(directory: URL, template: Template? = nil, framework: DependencyFrameworkViewModel, platform: DependencyPlatformViewModel, importFile: URL? = nil) throws { // Set properties self.projectName = directory.lastPathComponent //.replacingOccurrences(of: " ", with: "-") // e.g. "MyProject" self.baseDirectory = directory.deletingLastPathComponent().path // e.g. "/~/Documents/" self.template = template self.framework = framework self.platform = platform self.importFile = importFile projectFileURL = URL(fileURLWithPath: baseDirectory).appendingPathComponent(projectName).appendingPathComponent("\(projectName).composite") // Fetch framework init from FrameworkInterface.plist frameworkInterface = try FrameworkInterface.loadCommands(for: framework.framework.name) if let template = template, let commands = template.initType.commands(frameworkInterface) { frameworkInit = commands } else { frameworkInit = frameworkInterface.initInterface.initTemplate } // Set up queue operationQueue.maxConcurrentOperationCount = 1 operationQueue.qualityOfService = .userInitiated } // Just checking we don't have a retain cycle // If all is well, app will crash deinit { print("Deinit ProjectInit") assertionFailure() } static func canCreateProject(at url: URL) -> Bool { return FileManager.default.fileExists(atPath: url.path) == false } func initializeProject(output: @escaping (String)->Void, finished: @escaping (Int, Error?) -> Void) throws { // 1. Set closure properties self.finished = finished self.output = output // 2. Keep track of completion progress progressObserver = operationQueue.observe(\OperationQueue.operationCount, options: .new) { queue, change in if queue.operationCount > self.maxOperationCount { self.maxOperationCount = queue.operationCount } self.progress = 10 + (1.0 - (Double(queue.operationCount) / Double(self.maxOperationCount))) * 90.0 } // 3. Fetch framework version if let version = versionOperation() { operationQueue.addOperation(version) let printOperation = printVersion() operationQueue.addOperation(printOperation) printOperation.addDependency(version) } // 4. Create project directory (if needed) // Some frameworks create the project directory themselves. // If so, createProjectDirectory is false let bashDirectory: String if frameworkInit.createProjectDirectory == true { bashDirectory = URL(fileURLWithPath: baseDirectory).appendingPathComponent(projectName).path try FileManager.default.createDirectory(atPath: bashDirectory, withIntermediateDirectories: true) } else { bashDirectory = baseDirectory } // 5. Initialize new FrameworkInit instance // E.g. etherlime init // from bashDirectory set in step 1 if let initOperation = frameworkInitOperation(directory: bashDirectory) { operationQueue.addOperation(initOperation) } // 6. Create directory structure (if the framework doesn't do that already) if let createDirectoriesOperation = createDirectoriesOperation() { operationQueue.addOperation(createDirectoriesOperation) } // 7. Copy template files to the project and rename to project name if necessary if let copyFiles = copyFilesOperation() { operationQueue.addOperation(copyFiles) } // 8. Copy imported file if let copyImportedFile = copyImportedFileOperation() { operationQueue.addOperation(copyImportedFile) } // 8. Create new project file operationQueue.addOperation(createProjectFile()) // 9. Call finished operationQueue.addOperation(finishedSuccessfully()) // 10. Open project file // Nope, that's handled by projectInitWindow // operationQueue.addOperation(openProject()) } func cancel() { operationQueue.cancelAllOperations() // Check if all operations cancel correctly } } // Operation creators extension ProjectInit { /// Called by Operation creators when they encounter an error /// /// /// - Parameter error: <#error description#> private func exitWithError(exitStatus: Int, error: Error?) { // 1. Cancel all operation in the queue cancel() // Send error message to stdout self.output((error ?? CompositeError.initError("Initialization error")).localizedDescription) // 2. Finish init with call to finished and pass error finished(exitStatus, error) } /// fetches framework version /// /// - Returns: operation private func versionOperation() -> Operation? { // Find the dependency that sets the framework version // Return nil if version is already set guard framework.version.isEmpty, let dependency = self.framework.dependencies.filter({ $0.isFrameworkVersion == true }).first else { return nil } let operation = dependency.versionQueryOperation() return operation } /// Outputs framework name and version number to stdout /// TODO: this doesn't work. all dependencies have empty version strings. /// /// - Returns: operation private func printVersion() -> Operation { return BlockOperation { self.output(self.framework.name + " " + self.framework.version) } } /// Operation to creates the directory structure of the project /// (e.g. contracts, test, migrations, etc.) /// /// - Parameter output: stdout output /// - Returns: nil when the initDirectories in the framework interface was not set. /// (in that case the framework init command will have created the directory structure private func createDirectoriesOperation() -> Operation? { guard let directories = frameworkInterface.initInterface.initDirectories, directories.count > 0 else { return nil } let operation = BlockOperation { for directory in directories { let url = self.projectDirectory.appendingPathComponent(directory, isDirectory: true) do { try FileManager.default.createDirectory(at: url, withIntermediateDirectories: true) } catch { self.finished(0, CompositeError.initError("Error creating directory \(url.path)")) return } } } return operation } /// Operation copying files from the Composite bundle to the project file /// /// - Parameter output: stdout output /// - Returns: returns nil if no files need to be copied private func copyFilesOperation() -> Operation? { guard let copyFiles = self.template?.copyFiles else { return nil } let operation = BlockOperation { // Copy files for file in copyFiles { do { let newFilename = try file.copy(projectName: self.projectName, projectDirectory: self.projectDirectory, subdirectory: self.framework.name) self.output("Copied \(newFilename) to \(file.destination).") } catch { self.output("Error copying \(file.filename) to \(file.destination):") self.finished(0, error) return } } } return operation } private func copyImportedFileOperation() -> Operation? { guard let importFile = self.importFile, let destination = self.importFileDestination else { return nil } return BlockOperation { do { try FileManager.default.copyItem(at: importFile, to: destination) } catch { self.output("Error copying \(importFile) to \(destination):") self.finished(0, error) return } } } /// <#Description#> /// /// - Parameters: /// - directory: <#directory description#> /// - output: <#output description#> /// - Returns: nil if no commands are found private func frameworkInitOperation(directory: String) -> Operation? { guard frameworkInit.commands.isEmpty == false else { return nil } let operation: BashOperation do { operation = try BashOperation(directory: directory, commands: frameworkInit.commands) operation.outputClosure = output operation.completionBlock = { if let exitStatus = operation.exitStatus, exitStatus != 0 { self.exitWithError(exitStatus: exitStatus, error: CompositeError.initError("Error initializing project")) return } } return operation } catch { exitWithError(exitStatus: 0, error: error) } return nil } private func createProjectFile() -> Operation { return BlockOperation { // this has to be relative, since we're storing the path in the project document on disk // if importFile then substract project directory // var openFile: String? = nil // if let templateFile = self.template?.openFile { // openFile = self.projectDirectory.appendingPathComponent(templateFile).path // } else if let importFile = self.importFileDestination { // openFile = importFile.path.replacingOccurrences(of: self.projectDirectory.path, with: "") // } let openFile = self.template?.openFile ?? self.importFileDestination?.path.replacingOccurrences(of: self.projectDirectory.path, with: "") let project = Project(name: self.projectName, platformName: self.platform.name, frameworkName: self.framework.name, frameworkVersion: self.framework.version, defaultOpenFile: openFile) let document = ProjectDocument(project: project, url: self.projectFileURL) document.save(to: self.projectFileURL, ofType: ProjectDocument.fileExtension, for: .saveToOperation, completionHandler: { error in if let error = error { assertionFailure(error.localizedDescription) } }) } } private func finishedSuccessfully() -> Operation { return BlockOperation{ self.output("Initialization successful") self.finished(0, nil) } } // private func openProject() -> Operation { // // return BlockOperation{ // DocumentController.shared.openDocument(withContentsOf: self.projectFileURL, display: true) { (document, wasAlreadyOpen, error) in // // guard error == nil else { // self.output("Error opening \(self.projectFileURL)") // self.finished(0, error) // return // } // } // } // } }
[ -1 ]
5fbf09c2db42d8cf576d5c1f821caad07adad2ec
3d144a23e67c839a4df1c073c6a2c842508f16b2
/validation-test/compiler_crashers_fixed/25632-swift-stmt-walk.swift
a7227e73ddf2c58d4ca62fd02155b83d34e835c7
[ "Apache-2.0", "Swift-exception" ]
permissive
apple/swift
c2724e388959f6623cf6e4ad6dc1cdd875fd0592
98ada1b200a43d090311b72eb45fe8ecebc97f81
refs/heads/main
2023-08-16T10:48:25.985330
2023-08-16T09:00:42
2023-08-16T09:00:42
44,838,949
78,897
15,074
Apache-2.0
2023-09-14T21:19:23
2015-10-23T21:15:07
C++
UTF-8
Swift
false
false
442
swift
// This source file is part of the Swift.org open source project // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // RUN: not %target-swift-frontend %s -typecheck {B:{{}a{{}a{{{}}}}}}protocol a{struct S<T:B
[ 74170, 74206, 74941, 74942, 74943, 74945, 74947, 74949, 74950, 74951, 74952, 74953, 74954, 74956, 74958, 74959, 74960, 74961, 74962, 74963, 74964, 74965, 74966, 74967, 74968, 74969, 74970, 74971, 74972, 74973, 74974, 74975, 74976, 74977, 74978, 74979, 74980, 74981, 74982, 74983, 74984, 74985, 74986, 74987, 74988, 74990, 74991, 74992, 74993, 74995, 74997, 74999, 75000, 75003, 75004, 75005, 75008, 75010, 75011, 75012, 75013, 75014, 75015, 75016, 75017, 75018, 75020, 75021, 75022, 75023, 75024, 75025, 75026, 75027, 75029, 75030, 75033, 75034, 75035, 75037, 75038, 75039, 75040, 75042, 75043, 75044, 75045, 75046, 75047, 75048, 75049, 75050, 75051, 75052, 75053, 75054, 75055, 75056, 75058, 75061, 75062, 75063, 75064, 75065, 75066, 75067, 75068, 75069, 75070, 75071, 75072, 75073, 75075, 75076, 75077, 75078, 75079, 75080, 75081, 75082, 75083, 75084, 75085, 75087, 75089, 75090, 75092, 75093, 75094, 75095, 75096, 75097, 75098, 75100, 75102, 75103, 75104, 75105, 75107, 75108, 75109, 75110, 75111, 75112, 75113, 75116, 75117, 75118, 75119, 75120, 75122, 75123, 75125, 75127, 75128, 75129, 75130, 75131, 75132, 75133, 75134, 75135, 75136, 75137, 75138, 75139, 75140, 75141, 75142, 75143, 75144, 75145, 75147, 75148, 75149, 75150, 75151, 75152, 75153, 75154, 75155, 75157, 75158, 75160, 75162, 75163, 75164, 75166, 75167, 75168, 75169, 75170, 75172, 75173, 75174, 75176, 75178, 75179, 75180, 75181, 75182, 75183, 75184, 75185, 75186, 75187, 75188, 75189, 75190, 75191, 75192, 75193, 75194, 75195, 75196, 75198, 75199, 75200, 75201, 75202, 75203, 75204, 75205, 75206, 75207, 75208, 75209, 75210, 75211, 75212, 75213, 75214, 75215, 75216, 75217, 75218, 75219, 75220, 75221, 75222, 75223, 75224, 75225, 75226, 75227, 75228, 75229, 75230, 75231, 75233, 75235, 75236, 75237, 75238, 75239, 75240, 75241, 75242, 75243, 75245, 75247, 75249, 75250, 75251, 75252, 75253, 75254, 75255, 75256, 75257, 75258, 75260, 75261, 75262, 75264, 75265, 75266, 75267, 75268, 75269, 75270, 75271, 75272, 75273, 75274, 75275, 75276, 75277, 75278, 75279, 75280, 75282, 75285, 75286, 75288, 75289, 75291, 75293, 75294, 75295, 75296, 75297, 75298, 75299, 75301, 75302, 75303, 75304, 75305, 75306, 75307, 75308, 75310, 75312, 75313, 75314, 75315, 75316, 75317, 75320, 75321, 75322, 75323, 75324, 75325, 75326, 75327, 75329, 75330, 75331, 75333, 75334, 75335, 75337, 75338, 75340, 75341, 75342, 75343, 75346, 75347, 75348, 75349, 75350, 75351, 75352, 75353, 75356, 75357, 75358, 75359, 75360, 75362, 75363, 75364, 75365, 75366, 75367, 75368, 75369, 75370, 75371, 75372, 75373, 75375, 75376, 75377, 75378, 75379, 75382, 75383, 75384, 75385, 75386, 75387, 75388, 75389, 75391, 75392, 75394, 75395, 75396, 75400, 75401, 75402, 75403, 75404, 75405, 75406, 75407, 75409, 75410, 75411, 75412, 75413, 75414, 75415, 75416, 75417, 75418, 75420, 75422, 75424, 75425, 75426, 75427, 75428, 75430, 75431, 75432, 75435, 75439, 75440, 75441, 75443, 75444, 75445, 75446, 75447, 75448, 75449, 75450, 75453, 75454, 75455, 75456, 75457, 75458, 75459, 75461, 75462, 75463, 75464, 75465, 75466, 75467, 75468, 75469, 75470, 75471, 75472, 75473, 75474, 75476, 75477, 75478, 75479, 75481, 75483, 75484, 75485, 75486, 75487, 75488, 75489, 75491, 75492, 75493, 75494, 75495, 75496, 75497, 75498, 75499, 75500, 75502, 75503, 75504, 75505, 75506, 75507, 75508, 75509, 75510, 75513, 75514, 75515, 75516, 75517, 75518, 75519, 75520, 75521, 75522, 75523, 75524, 75525, 75526, 75527, 75528, 75529, 75530, 75531, 75532, 75533, 75534, 75535, 75536, 75537, 75538, 75539, 75540, 75541, 75543, 75544, 75545, 75546, 75547, 75548, 75549, 75550, 75551, 75553, 75554, 75555, 75556, 75557, 75558, 75559, 75560, 75561, 75562, 75564, 75565, 75566, 75568, 75569, 75570, 75571, 75572, 75573, 75575, 75578, 75579, 75581, 75583, 75584, 75585, 75586, 75587, 75588, 75589, 75590, 75592, 75594, 75595, 75596, 75597, 75598, 75599, 75600, 75601, 75602, 75603, 75604, 75605, 75606, 75607, 75608, 75610, 75612, 75613, 75614, 75616, 75618, 75619, 75620, 75621, 75622, 75623, 75625, 75626, 75627, 75628, 75630, 75631, 75633, 75635, 75636, 75637, 75638, 75639, 75640, 75641, 75642, 75643, 75645, 75646, 75648, 75649, 75650, 75652, 75653, 75655, 75656, 75657, 75658, 75659, 75660, 75661, 75662, 75663, 75664, 75665, 75666, 75669, 75670, 75671, 75672, 75674, 75676, 75677, 75678, 75679, 75681, 75682, 75683, 75684, 75685, 75686, 75687, 75688, 75689, 75690, 75691, 75692, 75694, 75696, 75697, 75699, 75700, 75704, 75705, 75706, 75707, 75708, 75710, 75712, 75713, 75714, 75715, 75716, 75717, 75718, 75719, 75720, 75721, 75722, 75723, 75724, 75726, 75728, 75729, 75731, 75732, 75733, 75734, 75735, 75736, 75737, 75738, 75739, 75740, 75741, 75744, 75745, 75746, 75747, 75748, 75749, 75750, 75751, 75753, 75754, 75755, 75756, 75757, 75758, 75759, 75760, 75761, 75762, 75763, 75764, 75766, 75767, 75768, 75769, 75772, 75773, 75775, 75776, 75777, 75778, 75779, 75781, 75783, 75785, 75786, 75787, 75788, 75789, 75791, 75792, 75793, 75794, 75795, 75796, 75797, 75798, 75800, 75801, 75802, 75803, 75804, 75806, 75810, 75811, 75812, 75813, 75814, 75815, 75816, 75817, 75818, 75819, 75820, 75821, 75822, 75823, 75824, 75825, 75826, 75827, 75828, 75829, 75830, 75831, 75832, 75834, 75835, 75836, 75838, 75839, 75840, 75841, 75842, 75843, 75844, 75845, 75846, 75847, 75848, 75849, 75850, 75851, 75852, 75853, 75854, 75855, 75856, 75857, 75858, 75859, 75860, 75862, 75863, 75864, 75865, 75866, 75867, 75868, 75869, 75871, 75872, 75873, 75874, 75877, 75878, 75879, 75880, 75882, 75884, 75885, 75886, 75887, 75888, 75890, 75891, 75892, 75893, 75894, 75895, 75896, 75897, 75898, 75899, 75900, 75901, 75903, 75905, 75906, 75907, 75908, 75909, 75910, 75911, 75912, 75913, 75914, 75915, 75916, 75917, 75918, 75921, 75922, 75924, 75925, 75926, 75927, 75928, 75929, 75930, 75931, 75932, 75933, 75934, 75935, 75937, 75938, 75939, 75940, 75941, 75943, 75944, 75945, 75946, 75947, 75948, 75949, 75950, 75951, 75952, 75953, 75954, 75955, 75956, 75957, 75958, 75959, 75960, 75961, 75962, 75963, 75964, 75965, 75966, 75967, 75968, 75969, 75970, 75971, 75972, 75973, 75975, 75976, 75977, 75978, 75979, 75980, 75981, 75982, 75983, 75984, 75985, 75987, 75988, 75989, 75990, 75991, 75993, 75994, 75995, 75996, 75997, 75998, 75999, 76001, 76002, 76003, 76004, 76007, 76008, 76009, 76010, 76011, 76012, 76013, 76015, 76018, 76019, 76020, 76021, 76022, 76024, 76025, 76026, 76027, 76028, 76029, 76030, 76031, 76032, 76035, 76036, 76038, 76039, 76040, 76041, 76042, 76043, 76044, 76045, 76046, 76047, 76048, 76049, 76050, 76051, 76052, 76053, 76054, 76055, 76056, 76058, 76059, 76060, 76061, 76062, 76064, 76065, 76067, 76068, 76069, 76070, 76071, 76072, 76073, 76075, 76076, 76077, 76078, 76079, 76080, 76081, 76082, 76083, 76084, 76085, 76086, 76087, 76089, 76090, 76091, 76092, 76093, 76094, 76095, 76096, 76097, 76098, 76099, 76101, 76102, 76104, 76105, 76106, 76107, 76108, 76109, 76110, 76111, 76113, 76115, 76116, 76117, 76120, 76121, 76122, 76123, 76124, 76125, 76126, 76127, 76129, 76130, 76131, 76133, 76134, 76135, 76136, 76137, 76138, 76139, 76140, 76141, 76142, 76143, 76144, 76145, 76146, 76147, 76149, 76150, 76151, 76152, 76153, 76155, 76157, 76158, 76159, 76160, 76162, 76163, 76164, 76165, 76167, 76168, 76169, 76170, 76171, 76172, 76173, 76174, 76175, 76176, 76177, 76179, 76180, 76181, 76182, 76184, 76185, 76186, 76187, 76189, 76191, 76192, 76193, 76194, 76195, 76196, 76197, 76198, 76199, 76200, 76201, 76202, 76203, 76205, 76208, 76209, 76210, 76211, 76213, 76215, 76216, 76217, 76218, 76219, 76220, 76221, 76222, 76223, 76224, 76225, 76226, 76227, 76228, 76229, 76232, 76234, 76235, 76236, 76237, 76238, 76239, 76240, 76241, 76242, 76243, 76244, 76247, 76250, 76252, 76253, 76254, 76255, 76256, 76257, 76259, 76261, 76262, 76263, 76264, 76266, 76267, 76268, 76269, 76270, 76271, 76272, 76273, 76274, 76275, 76276, 76277, 76278, 76279, 76281, 76282, 76283, 76284, 76285, 76286, 76287, 76288, 76290, 76291, 76292, 76293, 76294, 76295, 76296, 76297, 76298, 76299, 76300, 76301, 76303, 76304, 76305, 76306, 76307, 76308, 76309, 76310, 76311, 76313, 76314, 76315, 76316, 76317, 76318, 76319, 76320, 76321, 76322, 76323, 76324, 76326, 76327, 76328, 76329, 76330, 76331, 76332, 76333, 76334, 76335, 76336, 76337, 76338, 76339, 76341, 76342, 76343, 76344, 76345, 76347, 76349, 76350, 76351, 76352, 76353, 76354, 76356, 76357, 76358, 76359, 76360, 76362, 76363, 76364, 76365, 76366, 76367, 76368, 76369, 76370, 76371, 76373, 76375, 76376, 76379, 76380, 76381, 76382, 76383, 76384, 76385, 76386, 76388, 76389, 76390, 76391, 76392, 76393, 76395, 76396, 76397, 76398, 76399, 76401, 76402, 76403, 76404, 76405, 76408, 76409, 76410, 76411, 76412, 76413, 76414, 76415, 76417, 76418, 76420, 76422, 76423, 76424, 76425, 76426, 76427, 76428, 76429, 76430, 76431, 76433, 76434, 76435, 76436, 76437, 76438, 76439, 76440, 76441, 76442, 76443, 76445, 76446, 76447, 76448, 76449, 76451, 76452, 76453, 76454, 76455, 76456, 76457, 76459, 76460, 76462, 76463, 76464, 76465, 76466, 76467, 76468, 76469, 76470, 76471, 76473, 76475, 76476, 76477, 76479, 76480, 76481, 76482, 76483, 76485, 76486, 76488, 76489, 76490, 76491, 76492, 76494, 76497, 76498, 76499, 76500, 76501, 76503, 76504, 76506, 76507, 76508, 76509, 76510, 76511, 76512, 76513, 76514, 76515, 76516, 76517, 76518, 76519, 76522, 76523, 76524, 76525, 76526, 76527, 76528, 76529, 76530, 76531, 76532, 76533, 76534, 76535, 76536, 76537, 76538, 76539, 76540, 76541, 76542, 76543, 76544, 76545, 76546, 76547, 76548, 76549, 76550, 76552, 76553, 76554, 76555, 76556, 76557, 76558, 76559, 76560, 76561, 76562, 76563, 76564, 76565, 76566, 76567, 76568, 76569, 76572, 76573, 76574, 76575, 76576, 76577, 76578, 76579, 76582, 76583, 76584, 76585, 76586, 76587, 76588, 76589, 76590, 76591, 76592, 76593, 76594, 76595, 76596, 76597, 76598, 76599, 76600, 76601, 76602, 76604, 76605, 76607, 76609, 76610, 76611, 76612, 76613, 76614, 76615, 76616, 76618, 76619, 76620, 76621, 76623, 76624, 76625, 76626, 76628, 76630, 76631, 76633, 76634, 76635, 76636, 76637, 76638, 76640, 76641, 76642, 76643, 76644, 76645, 76647, 76648, 76649, 76650, 76651, 76653, 76654, 76655, 76657, 76658, 76659, 76660, 76661, 76662, 76663, 76665, 76666, 76667, 76668, 76669, 76670, 76671, 76672, 76673, 76674, 76675, 76676, 76678, 76681, 76682, 76683, 76684, 76685, 76687, 76688, 76689, 76690, 76691, 76692, 76693, 76694, 76695, 76696, 76697, 76698, 76699, 76700, 76702, 76703, 76704, 76705, 76706, 76707, 76708, 76709, 76710, 76711, 76713, 76714, 76715, 76716, 76717, 76718, 76719, 76720, 76721, 76722, 76723, 76724, 76725, 76726, 76727, 76728, 76729, 76730, 76731, 76733, 76734, 76735, 76736, 76737, 76738, 76739, 76740, 76741, 76742, 76743, 76744, 76745, 76746, 76748, 76749, 76751, 76752, 76753, 76754, 76755, 76757, 76758, 76759, 76760, 76761, 76762, 76763, 76764, 76765, 76766, 76768, 76770, 76771, 76772, 76773, 76774, 76775, 76776, 76777, 76778, 76780, 76781, 76783, 76785, 76786, 76787, 76788, 76789, 76790, 76791, 76794, 76795, 76797, 76800, 76801, 76802, 76803, 76804, 76805, 76806, 76807, 76808, 76809, 76810, 76811, 76812, 76813, 76814, 76815, 76816, 76817, 76819, 76820, 76821, 76822, 76823, 76824, 76825, 76826, 76827, 76828, 76829, 76830, 76831, 76832, 76833, 76834, 76835, 76836, 76838, 76841, 76842, 76843, 76844, 76847, 76849, 76851, 76852, 76853, 76854, 76856, 76857, 76858, 76859, 76860, 76862, 76863, 76864, 76865, 76866, 76868, 76871, 76872, 76873, 76874, 76875, 76876, 76877, 76878, 76879, 76880, 76882, 76884, 76885, 76887, 76888, 76889, 76891, 76892, 76895, 76896, 76897, 76898, 76900, 76902, 76903, 76904, 76905, 76906, 76907, 76908, 76909, 76910, 76911, 76912, 76914, 76915, 76916, 76917, 76918, 76919, 76920, 76921, 76922, 76923, 76924, 76925, 76926, 76927, 76928, 76929, 76930, 76931, 76932, 76933, 76934, 76937, 76938, 76940, 76941, 76942, 76943, 76944, 76945, 76947, 76948, 76949, 76950, 76951, 76952, 76953, 76954, 76955, 76956, 76957, 76959, 76960, 76961, 76962, 76963, 76964, 76965, 76966, 76967, 76968, 76969, 76970, 76971, 76972, 76973, 76974, 76975, 76976, 76978, 76979, 76980, 76981, 76983, 76984, 76985, 76986, 76987, 76990, 76991, 76992, 76993, 76994, 76995, 76996, 76997, 76999, 77000, 77001, 77002, 77003, 77004, 77006, 77007, 77008, 77009, 77010, 77011, 77012, 77013, 77014, 77015, 77017, 77018, 77019, 77020, 77021, 77022, 77023, 77025, 77026, 77028, 77029, 77030, 77031, 77032, 77033, 77034, 77035, 77036, 77037, 77038, 77039, 77040, 77041, 77042, 77043, 77044, 77045, 77046, 77047, 77048, 77049, 77050, 77051, 77052, 77054, 77055, 77056, 77057, 77058, 77059, 77060, 77061, 77062, 77063, 77064, 77065, 77066, 77067, 77068, 77069, 77071, 77073, 77074, 77076, 77077, 77078, 77079, 77082, 77084, 77087, 77088, 77090, 77091, 77092, 77093, 77094, 77095, 77096, 77097, 77098, 77100, 77101, 77102, 77103, 77106, 77107, 77108, 77110, 77111, 77112, 77113, 77115, 77116, 77117, 77118, 77120, 77121, 77122, 77123, 77124, 77125, 77126, 77127, 77129, 77130, 77131, 77132, 77134, 77135, 77136, 77137, 77138, 77139, 77140, 77141, 77143, 77144, 77145, 77146, 77147, 77148, 77150, 77151, 77154, 77155, 77156, 77157, 77158, 77159, 77160, 77161, 77162, 77163, 77164, 77165, 77166, 77169, 77170, 77172, 77173, 77174, 77175, 77176, 77177, 77179, 77180, 77182, 77183, 77184, 77185, 77186, 77187, 77188, 77189, 77190, 77191, 77192, 77193, 77194, 77195, 77196, 77198, 77200, 77201, 77202, 77203, 77205, 77208, 77209, 77210, 77211, 77212, 77213, 77214, 77215, 77216, 77217, 77219, 77220, 77221, 77222, 77223, 77224, 77225, 77226, 77227, 77228, 77229, 77230, 77231, 77232, 77233, 77234, 77235, 77236, 77237, 77238, 77239, 77240, 77241, 77242, 77243, 77244, 77245, 77246, 77248, 77249, 77252, 77254, 77255, 77256, 77257, 77258, 77259, 77260, 77261, 77262, 77263, 77264, 77265, 77266, 77267, 77268, 77269, 77270, 77271, 77272, 77273, 77274, 77275, 77276, 77277, 77278, 77280, 77281, 77282, 77284, 77285, 77286, 77287, 77289, 77290, 77291, 77292, 77293, 77294, 77295, 77296, 77297, 77298, 77299, 77300, 77302, 77303, 77305, 77306, 77307, 77310, 77311, 77314, 77315, 77316, 77317, 77318, 77320, 77321, 77322, 77323, 77325, 77327, 77328, 77329, 77330, 77331, 77332, 77333, 77334, 77335, 77336, 77337, 77338, 77339, 77340, 77341, 77342, 77344, 77345, 77347, 77348, 77351, 77352, 77355, 77358, 77359, 77360, 77361, 77362, 77363, 77364, 77365, 77366, 77367, 77368, 77369, 77370, 77371, 77373, 77374, 77375, 77377, 77379, 77380, 77381, 77382, 77383, 77384, 77385, 77386, 77387, 77388, 77389, 77390, 77391, 77392, 77393, 77394, 77395, 77396, 77397, 77398, 77399, 77400, 77402, 77404, 77405, 77406, 77408, 77409, 77411, 77412, 77413, 77414, 77415, 77416, 77417, 77419, 77420, 77422, 77423, 77424, 77425, 77426, 77427, 77428, 77430, 77431, 77432, 77433, 77434, 77435, 77436, 77437, 77439, 77440, 77441, 77442, 77443, 77444, 77445, 77446, 77447, 77448, 77449, 77450, 77451, 77452, 77453, 77454, 77455, 77456, 77457, 77458, 77459, 77460, 77461, 77462, 77464, 77465, 77466, 77467, 77468, 77469, 77470, 77471, 77472, 77473, 77476, 77477, 77478, 77479, 77480, 77483, 77484, 77485, 77486, 77488, 77489, 77490, 77491, 77492, 77493, 77494, 77495, 77496, 77497, 77498, 77499, 77501, 77502, 77503, 77504, 77505, 77506, 77507, 77508, 77509, 77510, 77511, 77512, 77513, 77514, 77515, 77516, 77517, 77518, 77520, 77521, 77522, 77523, 77524, 77525, 77527, 77529, 77530, 77531, 77532, 77533, 77534, 77535, 77536, 77537, 77538, 77540, 77542, 77543, 77544, 77545, 77546, 77547, 77549, 77550, 77551, 77552, 77553, 77554, 77555, 77556, 77557, 77558, 77559, 77560, 77561, 77562, 77563, 77564, 77566, 77567, 77568, 77569, 77570, 77571, 77572, 77573, 77574, 77575, 77577, 77578, 77579, 77580, 77581, 77582, 77584, 77585, 77586, 77588, 77589, 77590, 77591, 77592, 77593, 77594, 77595, 77596, 77597, 77598, 77599, 77601, 77602, 77603, 77606, 77607, 77608, 77609, 77610, 77611, 77612, 77613, 77615, 77616, 77617, 77618, 77619, 77620, 77621, 77622, 77623, 77624, 77626, 77627, 77628, 77629, 77630, 77631, 77632, 77633, 77634, 77635, 77636, 77637, 77638, 77639, 77640, 77642, 77643, 77645, 77646, 77647, 77648, 77649, 77650, 77651, 77653, 77654, 77655, 77656, 77657, 77659, 77661, 77662, 77663, 77664, 77666, 77667, 77668, 77670, 77672, 77673, 77675, 77676, 77678, 77679, 77680, 77681, 77682, 77684, 77687, 77688, 77689, 77690, 77691, 77692, 77693, 77694, 77695, 77696, 77698, 77699, 77700, 77701, 77702, 77704, 77706, 77707, 77708, 77709, 77710, 77712, 77713, 77714, 77715, 77716, 77717, 77718, 77719, 77720, 77721, 77722, 77723, 77725, 77727, 77728, 77730, 77731, 77732, 77733, 77734, 77735, 77736, 77737, 77738, 77740, 77741, 77742, 77743, 77744, 77746, 77747, 77749, 77750, 77751, 77752, 77753, 77754, 77755, 77756, 77757, 77758, 77759, 77761, 77763, 77764, 77765, 77766, 77767, 77768, 77769, 77770, 77772, 77773, 77774, 77775, 77777, 77778, 77779, 77780, 77781, 77782, 77783, 77784, 77785, 77786, 77787, 77788, 77789, 77791, 77792, 77793, 77794, 77795, 77796, 77797, 77798, 77799, 77801, 77803, 77804, 77805, 77806, 77807, 77808, 77809, 77810, 77813, 77814, 77815, 77817, 77818, 77819, 77820, 77824, 77825, 77826, 77827, 77828, 77829, 77831, 77832, 77833, 77834, 77835, 77836, 77837, 77838, 77839, 77840, 77841, 77842, 77843, 77844, 77845, 77846, 77847, 77848, 77849, 77850, 77851, 77852, 77854, 77855, 77857, 77858, 77859, 77860, 77861, 77862, 77863, 77864, 77865, 77866, 77868, 77869, 77870, 77871, 77872, 77873, 77874, 77875, 77876, 77877, 77878, 77879, 77880, 77882, 77883, 77884, 77885, 77886, 77887, 77888, 77890, 77891, 77892, 77894, 77895, 77896, 77897, 77898, 77899, 77900, 77903, 77904, 77909, 77910, 77911, 77912, 77913, 77914, 77915, 77916, 77917, 77918, 77919, 77920, 77921, 77922, 77923, 77925, 77926, 77927, 77929, 77930, 77931, 77932, 77934, 77935, 77936, 77937, 77938, 77939, 77941, 77942, 77943, 77944, 77945, 77947, 77948, 77949, 77950, 77951, 77952, 77954, 77955, 77956, 77957, 77958, 77959, 77960, 77961, 77962, 77964, 77965, 77966, 77969, 77970, 77971, 77973, 77974, 77975, 77976, 77977, 77978, 77979, 77980, 77981, 77982, 77983, 77984, 77986, 77987, 77988, 77989, 77990, 77991, 77992, 77993, 77994, 77995, 77996, 77997, 77998, 77999, 78000, 78001, 78002, 78003, 78004, 78005, 78006, 78007, 78008, 78009, 78010, 78011, 78012, 78013, 78014, 78015, 78016, 78019, 78021, 78022, 78023, 78024, 78025, 78026, 78027, 78028, 78031, 78033, 78034, 78035, 78036, 78037, 78038, 78040, 78041, 78042, 78045, 78046, 78047, 78048, 78049, 78050, 78051, 78052, 78053, 78054, 78055, 78058, 78059, 78060, 78061, 78062, 78063, 78065, 78066, 78067, 78068, 78069, 78070, 78071, 78072, 78073, 78074, 78075, 78076, 78077, 78078, 78079, 78080, 78081, 78082, 78083, 78084, 78085, 78086, 78087, 78088, 78089, 78090, 78091, 78092, 78093, 78094, 78095, 78096, 78097, 78098, 78099, 78100, 78101, 78104, 78105, 78106, 78109, 78110, 78112, 78113, 78114, 78115, 78116, 78117, 78118, 78119, 78121, 78122, 78123, 78124, 78126, 78127, 78129, 78130, 78131, 78132, 78133, 78134, 78136, 78137, 78138, 78139, 78140, 78141, 78142, 78143, 78144, 78145, 78146, 78147, 78148, 78149, 78150, 78152, 78153, 78154, 78155, 78156, 78157, 78158, 78160, 78161, 78162, 78163, 78164, 78166, 78168, 78169, 78170, 78171, 78172, 78173, 78174, 78176, 78177, 78179, 78181, 78182, 78183, 78184, 78185, 78186, 78187, 78188, 78189, 78190, 78191, 78192, 78193, 78194, 78195, 78196, 78197, 78198, 78199, 78200, 78201, 78202, 78203, 78204, 78205, 78206, 78207, 78208, 78209, 78210, 78212, 78213, 78214, 78215, 78216, 78217, 78218, 78219, 78220, 78221, 78222, 78223, 78224, 78225, 78226, 78227, 78228, 78229, 78230, 78231, 78232, 78234, 78235, 78236, 78237, 78238, 78239, 78240, 78241, 78242, 78243, 78244, 78246, 78247, 78249, 78250, 78251, 78252, 78253, 78254, 78255, 78256, 78257, 78258, 78259, 78261, 78262, 78263, 78264, 78265, 78266, 78267, 78268, 78269, 78271, 78273, 78275, 78276, 78277, 78278, 78279, 78280, 78281, 78282, 78285, 78286, 78287, 78288, 78289, 78290, 78291, 78292, 78293, 78294, 78295, 78296, 78297, 78298, 78299, 78300, 78301, 78304, 78305, 78307, 78308, 78310, 78311, 78312, 78315, 78316, 78317, 78318, 78319, 78320, 78321, 78322, 78323, 78324, 78325, 78326, 78327, 78328, 78330, 78331, 78332, 78333, 78334, 78335, 78336, 78337, 78338, 78339, 78340, 78341, 78342, 78343, 78345, 78346, 78347, 78348, 78349, 78350, 78351, 78352, 78354, 78355, 78356, 78357, 78358, 78359, 78360, 78361, 78362, 78364, 78365, 78366, 78367, 78368, 78369, 78370, 78371, 78372, 78373, 78374, 78375, 78376, 78377, 78378, 78379, 78380, 78381, 78382, 78383, 78384, 78385, 78386, 78387, 78388, 78389, 78390, 78391, 78394, 78395, 78397, 78398, 78399, 78402, 78404, 78405, 78406, 78407, 78408, 78409, 78410, 78411, 78412, 78413, 78414, 78415, 78417, 78418, 78419, 78420, 78421, 78422, 78423, 78424, 78425, 78426, 78428, 78429, 78430, 78432, 78433, 78434, 78435, 78436, 78437, 78438, 78439, 78440, 78441, 78442, 78443, 78444, 78446, 78447, 78448, 78449, 78450, 78451, 78453, 78456, 78457, 78458, 78459, 78460, 78462, 78463, 78464, 78465, 78466, 78467, 78468, 78469, 78470, 78471, 78472, 78473, 78474, 78476, 78478, 78479, 78480, 78481, 78482, 78483, 78484, 78485, 78486, 78487, 78489, 78490, 78491, 78493, 78494, 78495, 78497, 78498, 78499, 78500, 78501, 78502, 78503, 78504, 78508, 78509, 78510, 78511, 78512, 78513, 78514, 78515, 78516, 78517, 78518, 78519, 78520, 78521, 78522, 78523, 78524, 78525, 78526, 78527, 78528, 78529, 78530, 78531, 78533, 78534, 78536, 78538, 78539, 78541, 78543, 78544, 78545, 78547, 78548, 78549, 78550, 78551, 78553, 78554, 78556, 78557, 78558, 78559, 78560, 78561, 78562, 78563, 78564, 78565, 78566, 78567, 78568, 78569, 78570, 78573, 78575, 78578, 78579, 78580, 78581, 78582, 78583, 78584, 78587, 78588, 78589, 78591, 78592, 78593, 78594, 78596, 78598, 78600, 78601, 78602, 78603, 78606, 78607, 78608, 78609, 78610, 78611, 78612, 78613, 78614, 78616, 78617, 78618, 78619, 78620, 78623, 78624, 78625, 78627, 78628, 78629, 78630, 78632, 78633, 78634, 78635, 78636, 78637, 78638, 78639, 78640, 78641, 78642, 78643, 78644, 78645, 78646, 78647, 78648, 78649, 78650, 78652, 78653, 78654, 78655, 78656, 78657, 78658, 78661, 78662, 78663, 78664, 78665, 78667, 78668, 78669, 78670, 78671, 78673, 78675, 78678, 78679, 78681, 78682, 78683, 78684, 78686, 78689, 78691, 78692, 78694, 78697, 78698, 78699, 78700, 78701, 78702, 78703, 78704, 78706, 78707, 78708, 78709, 78710, 78711, 78712, 78713, 78714, 78715, 78716, 78717, 78718, 78719, 78720, 78721, 78723, 78724, 78725, 78727, 78728, 78729, 78730, 78733, 78734, 78735, 78736, 78738, 78739, 78740, 78741, 78742, 78743, 78744, 78745, 78746, 78748, 78749, 78750, 78751, 78752, 78753, 78755, 78756, 78757, 78758, 78759, 78760, 78761, 78762, 78763, 78764, 78766, 78767, 78768, 78769, 78770, 78771, 78772, 78773, 78774, 78776, 78777, 78778, 78780, 78781, 78783, 78784, 78785, 78786, 78787, 78788, 78789, 78790, 78791, 78792, 78793, 78794, 78795, 78796, 78797, 78798, 78799, 78800, 78801, 78802, 78803, 78804, 78806, 78807, 78808, 78809, 78810, 78811, 78812, 78813, 78814, 78815, 78817, 78818, 78819, 78820, 78821, 78822, 78823, 78824, 78825, 78827, 78828, 78829, 78831, 78832, 78833, 78834, 78835, 78836, 78837, 78838, 78840, 78841, 78842, 78843, 78844, 78845, 78846, 78847, 78848, 78849, 78850, 78851, 78852, 78853, 78854, 78856, 78857, 78858, 78859, 78860, 78861, 78862, 78863, 78864, 78865, 78866, 78868, 78869, 78870, 78871, 78872, 78873, 78874, 78875, 78877, 78878, 78879, 78880, 78881, 78882, 78883, 78884, 78886, 78888, 78889, 78890, 78892, 78893, 78894, 78895, 78896, 78897, 78898, 78899, 78900, 78901, 78903, 78904, 78905, 78906, 78907, 78908, 78909, 78910, 78912, 78913, 78914, 78918, 78920, 78921, 78922, 78924, 78925, 78926, 78927, 78928, 78930, 78931, 78932, 78933, 78935, 78936, 78937, 78938, 78939, 78941, 78942, 78943, 78944, 78945, 78946, 78947, 78948, 78950, 78952, 78953, 78954, 78955, 78956, 78957, 78958, 78959, 78960, 78961, 78962, 78963, 78965, 78966, 78968, 78971, 78972, 78974, 78975, 78976, 78977, 78978, 78979, 78981, 78982, 78983, 78984, 78985, 78986, 78987, 78988, 78989, 78990, 78991, 78992, 78993, 78994, 78995, 78996, 78997, 78999, 79000, 79001, 79002, 79003, 79004, 79006, 79007, 79008, 79009, 79010, 79011, 79012, 79013, 79014, 79015, 79016, 79017, 79018, 79019, 79021, 79022, 79023, 79024, 79025, 79026, 79027, 79028, 79030, 79031, 79032, 79033, 79034, 79035, 79036, 79037, 79038, 79039, 79040, 79041, 79042, 79043, 79044, 79045, 79046, 79047, 79048, 79049, 79050, 79051, 79054, 79055, 79057, 79058, 79059, 79060, 79061, 79063, 79064, 79065, 79067, 79068, 79069, 79070, 79071, 79074, 79075, 79076, 79077, 79078, 79080, 79081, 79082, 79083, 79084, 79085, 79086, 79089, 79090, 79091, 79092, 79093, 79094, 79095, 79096, 79097, 79098, 79099, 79100, 79102, 79103, 79104, 79105, 79106, 79107, 79108, 79110, 79111, 79112, 79114, 79115, 79116, 79117, 79119, 79120, 79121, 79122, 79123, 79125, 79126, 79127, 79128, 79129, 79130, 79131, 79132, 79133, 79134, 79135, 79137, 79138, 79139, 79142, 79143, 79144, 79145, 79146, 79148, 79151, 79152, 79153, 79154, 79155, 79156, 79157, 79158, 79159, 79160, 79161, 79162, 79163, 79164, 79165, 79167, 79169, 79170, 79171, 79172, 79173, 79175, 79176, 79177, 79178, 79179, 79180, 79181, 79182, 79183, 79184, 79185, 79186, 79187, 79188, 79189, 79191, 79192, 79193, 79194, 79196, 79197, 79198, 79201, 79202, 79203, 79204, 79205, 79207, 79208, 79210, 79212, 79213, 79214, 79215, 79216, 79217, 79218, 79219, 79220, 79221, 79222, 79223, 79225, 79226, 79227, 79228, 79229, 79231, 79232, 79233, 79234, 79236, 79237, 79238, 79239, 79240, 79241, 79242, 79243, 79244, 79245, 79246, 79247, 79248, 79249, 79250, 79251, 79252, 79253, 79255, 79256, 79258, 79259, 79260, 79262, 79263, 79264, 79265, 79266, 79267, 79268, 79269, 79270, 79271, 79272, 79274, 79275, 79276, 79277, 79278, 79279, 79281, 79283, 79284, 79285, 79287, 79288, 79289, 79290, 79291, 79292, 79293, 79294, 79295, 79296, 79297, 79298, 79299, 79300, 79301, 79304, 79305, 79306, 79307, 79308, 79310, 79311, 79312, 79313, 79314, 79315, 79316, 79318, 79319, 79320, 79321, 79322, 79324, 79325, 79327, 79328, 79329, 79330, 79331, 79332, 79334, 79335, 79336, 79337, 79338, 79339, 79340, 79342, 79344, 79345, 79346, 79347, 79348, 79349, 79350, 79352, 79353, 79354, 79356, 79357, 79358, 79359, 79360, 79361, 79362, 79365, 79366, 79369, 79370, 79371, 79372, 79373, 79374, 79375, 79376, 79377, 79381, 79383, 79384, 79385, 79386, 79387, 79388, 79389, 79390, 79391, 79392, 79394, 79395, 79396, 79397, 79398, 79399, 79400, 79401, 79402, 79403, 79404, 79405, 79406, 79407, 79408, 79409, 79410, 79411, 79412, 79413, 79414, 79415, 79416, 79417, 79418, 79419, 79420, 79421, 79422, 79423, 79424, 79425, 79426, 79427, 79428, 79429, 79430, 79431, 79432, 79433, 79435, 79436, 79438, 79439, 79440, 79441, 79442, 79444, 79445, 79447, 79448, 79449, 79450, 79451, 79452, 79454, 79455, 79457, 79459, 79460, 79461, 79462, 79464, 79465, 79466, 79467, 79468, 79469, 79470, 79471, 79472, 79473, 79474, 79477, 79478, 79479, 79480, 79481, 79482, 79483, 79484, 79485, 79488, 79489, 79491, 79492, 79493, 79494, 79496, 79497, 79498, 79499, 79500, 79501, 79502, 79505, 79506, 79508, 79509, 79510, 79513, 79514, 79515, 79516, 79517, 79518, 79519, 79520, 79521, 79522, 79523, 79524, 79525, 79526, 79527, 79528, 79529, 79532, 79533, 79534, 79535, 79537, 79538, 79539, 79540, 79541, 79542, 79543, 79544, 79547, 79548, 79549, 79550, 79551, 79552, 79553, 79555, 79556, 79557, 79558, 79560, 79561, 79562, 79563, 79564, 79565, 79566, 79567, 79569, 79570, 79572, 79573, 79574, 79575, 79577, 79578, 79579, 79580, 79581, 79582, 79583, 79585, 79587, 79588, 79591, 79592, 79594, 79595, 79596, 79598, 79599, 79600, 79601, 79602, 79603, 79605, 79606, 79607, 79608, 79609, 79610, 79611, 79612, 79613, 79615, 79616, 79617, 79618, 79619, 79620, 79621, 79622, 79623, 79624, 79625, 79626, 79628, 79629, 79631, 79632, 79633, 79634, 79636, 79637, 79638, 79639, 79640, 79641, 79642, 79643, 79644, 79645, 79646, 79647, 79648, 79649, 79651, 79654, 79655, 79656, 79657, 79658, 79659, 79660, 79661, 79662, 79663, 79665, 79666, 79668, 79669, 79670, 79671, 79672, 79673, 79674, 79675, 79676, 79677, 79678, 79680, 79681, 79682, 79683, 79684, 79685, 79686, 79687, 79688, 79689, 79690, 79692, 79693, 79694, 79695, 79697, 79698, 79699, 79700, 79701, 79702, 79704, 79705, 79706, 79707, 79708, 79709, 79710, 79711, 79712, 79713, 79714, 79716, 79717, 79718, 79719, 79720, 79722, 79723, 79724, 79725, 79726, 79727, 79728, 79729, 79730, 79732, 79733, 79734, 79735, 79736, 79738, 79739, 79740, 79741, 79742, 79743, 79746, 79748, 79749, 79750, 79751, 79752, 79753, 79754, 79755, 79756, 79757, 79758, 79759, 79760, 79761, 79762, 79763, 79764, 79765, 79766, 79767, 79768, 79769, 79770, 79772, 79774, 79775, 79777, 79778, 79779, 79780, 79781, 79782, 79783, 79784, 79785, 79786, 79787, 79788, 79789, 79790, 79791, 79793, 79794, 79795, 79798, 79799, 79800, 79801, 79802, 79803, 79804, 79805, 79808, 79811, 79812, 79813, 79814, 79815, 79816, 79817, 79818, 79819, 79820, 79821, 79822, 79823, 79824, 79825, 79826, 79827, 79828, 79829, 79830, 79831, 79832, 79833, 79835, 79836, 79838, 79839, 79840, 79842, 79843, 79844, 79845, 79846, 79847, 79849, 79851, 79855, 79856, 79857, 79858, 79859, 79861, 79862, 79863, 79864, 79865, 79866, 79867, 79868, 79869, 79870, 79871, 79872, 79873, 79874, 79875, 79876, 79878, 79879, 79880, 79881, 79882, 79883, 79884, 79885, 79886, 79887, 79888, 79891, 79892, 79893, 79894, 79895, 79896, 79897, 79898, 79899, 79900, 79901, 79903, 79904, 79905, 79907, 79908, 79909, 79910, 79911, 79912, 79913, 79914, 79915, 79916, 79917, 79918, 79919, 79920, 79922, 79923, 79924, 79926, 79927, 79928, 79929, 79930, 79931, 79932, 79934, 79935, 79936, 79937, 79938, 79939, 79940, 79941, 79943, 79944, 79946, 79947, 79948, 79949, 79950, 79951, 79952, 79953, 79955, 79957, 79958, 79959, 79960, 79961, 79962, 79963, 79965, 79966, 79967, 79968, 79969, 79971, 79972, 79973, 79974, 79975, 79976, 79977, 79979, 79981, 79982, 79983, 79984, 79985, 79986, 79987, 79988, 79989, 79990, 79991, 79993, 79994, 79997, 79998, 79999, 80000, 80002, 80003, 80004, 80005, 80006, 80007, 80008, 80009, 80011, 80012, 80013, 80015, 80016, 80017, 80019, 80020, 80021, 80022, 80024, 80026, 80028, 80029, 80030, 80031, 80033, 80034, 80035, 80036, 80037, 80038, 80039, 80040, 80042, 80043, 80044, 80045, 80047, 80048, 80049, 80050, 80051, 80052, 80054, 80055, 80056, 80057, 80058, 80060, 80061, 80062, 80063, 80064, 80065, 80066, 80067, 80069, 80070, 80072, 80073, 80074, 80075, 80077, 80078, 80080, 80081, 80082, 80083, 80084, 80085, 80086, 80087, 80089, 80090, 80092, 80093, 80094, 80095, 80096, 80098, 80099, 80100, 80102, 80103, 80106, 80108, 80109, 80110, 80111, 80114, 80115, 80116, 80118, 80119, 80120, 80121, 80122, 80124, 80125, 80126, 80127, 80128, 80129, 80130, 80131, 80133, 80134, 80137, 80138, 80139, 80140, 80141, 80142, 80143, 80144, 80145, 80146, 80147, 80148, 80149, 80150, 80151, 80152, 80153, 80154, 80155, 80156, 80157, 80158, 80159, 80160, 80161, 80162, 80163, 80164, 80165, 80166, 80167, 80169, 80170, 80171, 80173, 80174, 80175, 80176, 80178, 80179, 80180, 80181, 80182, 80183, 80184, 80185, 80186, 80187, 80189, 80190, 80191, 80192, 80193, 80194, 80195, 80196, 80197, 80198, 80199, 80200, 80201, 80202, 80203, 80205, 80206, 80207, 80208, 80209, 80210, 80211, 80212, 80213, 80214, 80215, 80216, 80217, 80218, 80219, 80220, 80221, 80222, 80223, 80225, 80226, 80227, 80228, 80229, 80230, 80231, 80232, 80233, 80234, 80235, 80237, 80239, 80242, 80243, 80244, 80245, 80246, 80247, 80248, 80249, 80250, 80252, 80253, 80254, 80255, 80256, 80258, 80259, 80263, 80264, 80266, 80267, 80268, 80270, 80272, 80273, 80275, 80276, 80278, 80280, 80281, 80282, 80283, 80284, 80285, 80286, 80289, 80290, 80291, 80292, 80293, 80294, 80295, 80296, 80297, 80299, 80300, 80301, 80303, 80305, 80306, 80308, 80309, 80311, 80312, 80313, 80314, 80315, 80317, 80318, 80319, 80320, 80321, 80323, 80324, 80325, 80327, 80329, 80330, 80332, 80333, 80335, 80337, 80338, 80339, 80340, 80341, 80342, 80343, 145878, 80344, 80346, 80347, 80348, 80349, 80350, 80351, 80345, 80353, 80354, 80355, 80356, 80357, 80358, 80359, 80362, 80363, 80364, 80365, 80366, 80367, 80368, 80369, 80370, 80372, 80373, 80374, 80375, 80376, 80377, 80379, 80380, 80381, 80382, 80383, 80384, 80385, 80386, 80387, 80389, 80390, 80391, 80392, 80393, 80394, 80395, 80397, 80398, 80399, 80401, 80402, 80403, 80404, 80407, 80408, 80409, 80410, 80412, 80413, 80414, 80415, 80417, 80418, 80420, 80421, 80422, 80423, 80425, 80426, 80427, 80429, 80430, 80431, 80432, 80433, 80434, 80435, 80437, 80438, 80439, 80441, 80443, 80444, 80445, 80446, 80447, 80449, 80450, 80451, 80452, 80453, 80455, 80456, 80457, 80458, 80459, 80460, 80462, 80463, 80464, 80465, 80466, 80467, 80468, 80469, 80470, 80471, 80472, 80473, 80474, 80477, 80478, 80479, 80480, 80481, 80483, 80484, 80485, 80487, 80488, 80490, 80491, 80492, 80493, 80495, 80496, 80497, 80498, 80499, 80500, 80501, 80502, 80503, 80504, 80505, 80506, 80507, 80508, 80509, 80510, 80511, 80512, 80513, 80516, 80517, 80519, 80520, 80521, 80522, 80523, 80524, 80525, 80526, 80527, 80528, 80529, 80530, 80531, 80532, 80533, 80534, 80535, 80536, 80537, 80538, 80539, 80540, 80541, 80543, 80545, 80548, 80549, 80550, 80551, 80553, 80554, 80555, 80556, 80557, 80558, 80559, 80560, 80561, 80563, 80564, 80565, 80566, 80567, 80568, 80569, 80570, 80571, 80572, 80573, 80574, 80575, 80576, 80577, 80578, 80579, 80580, 80581, 80582, 80583, 80584, 80585, 80586, 80588, 80589, 80590, 80591, 80592, 80593, 80594, 80595, 80597, 80598, 80599, 80600, 80601, 80602, 80603, 80605, 80606, 80607, 87746, 88094, 88115, 88256, 88631, 88664, 88766, 88776, 88778, 88856, 88857, 88858, 88859, 88860, 88861, 88862, 88864, 88865, 88867, 88868, 88869, 88870, 88871, 88873, 88874, 88875, 88876, 88877, 88878, 88880, 88881, 88882, 88883, 88884, 88886, 88887, 88888, 88889, 88890, 88891, 88892, 88893, 88894, 88895, 88896, 88897, 88898, 88899, 88900, 88901, 88902, 88903, 88904, 88905, 88906, 88907, 88908, 88909, 88911, 88912, 88913, 88914, 88915, 88917, 88918, 88919, 88921, 88922, 88923, 88924, 88925, 91280, 91314, 91316, 91317, 91351, 91362, 91645, 91646, 91647, 91648, 91650, 91651, 91652, 91653, 91654, 91656, 91658, 91659, 91660, 91662, 91664, 91665, 91666, 91669, 91670, 91672, 91674, 91675, 91676, 91678, 91679, 91680, 91681, 91682, 91683, 91684, 91686, 91688, 91689, 91690, 91691, 91694, 91695, 91699, 91701, 91702, 91703, 91705, 91706, 91707, 91708, 91711, 91712, 91713, 91714, 91715, 91716, 91717, 91720, 91721, 91724, 91725, 91726, 91728, 91729, 91730, 91731, 91733, 91734, 91735, 91736, 91738, 91740, 91741, 91742, 91743, 91745, 91746, 91747, 91749, 91753, 91754, 91755, 91757, 91758, 91759, 91760, 91761, 91762, 91763, 91764, 91765, 91766, 91767, 91768, 91769, 91771, 91772, 91774, 91775, 91777, 91779, 91782, 91783, 91784, 91785, 91789, 91790, 91792, 91794, 91795, 91796, 91799, 91800, 91801, 91802, 91803, 91805, 91806, 91808, 91810, 91811, 91812, 91813, 91814, 91815, 91816, 91817, 91818, 91819, 91821, 91822, 91823, 91824, 91825, 91827, 91828, 91829, 91830, 91831, 91832, 91833, 91834, 91835, 91837, 91838, 91840, 91842, 91843, 91844, 91845, 91846, 91847, 91848, 91849, 91850, 91852, 91853, 91854, 91856, 91858, 91860, 91862, 91864, 91865, 91866, 91867, 91869, 91870, 91871, 91872, 91873, 91874, 91875, 91876, 91879, 91880, 91881, 91882, 91883, 91884, 91885, 91886, 91887, 91888, 91889, 91890, 91891, 91893, 91894, 91895, 91896, 91897, 91898, 91899, 91900, 91901, 91902, 91903, 91904, 91905, 91906, 91908, 91909, 91914, 91915, 91916, 91917, 91918, 91919, 91920, 91922, 91926, 91927, 91928, 91929, 91930, 91933, 91934, 91935, 91936, 91937, 91939, 91940, 91941, 91943, 91946, 91947, 91948, 91949, 91950, 91953, 91956, 91957, 91959, 91960, 91962, 91964, 91965, 91966, 91970, 91972, 91974, 91975, 91976, 91978, 91980, 91981, 91982, 91983, 91987, 91988, 91989, 91995, 91996, 91997, 91999, 92000, 92002, 92003, 92004, 92005, 92008, 92009, 92010, 92011, 92012, 92013, 92014, 92016, 92017, 92018, 92019, 92020, 92021, 92023, 92024, 92025, 92026, 92028, 92029, 92030, 92032, 92033, 92035, 92036, 92037, 92039, 92040, 92041, 92042, 92043, 92044, 92045, 92046, 92047, 92048, 92050, 92051, 92053, 92054, 92055, 92059, 92060, 92061, 92062, 92063, 92065, 92066, 92067, 92069, 92071, 92072, 92073, 92074, 92075, 92077, 92079, 92081, 92082, 92083, 92085, 92087, 92088, 92091, 92095, 92096, 92099, 92100, 92101, 92102, 92103, 92104, 92107, 92108, 92109, 92111, 92112, 92114, 92115, 92116, 92117, 92119, 92120, 92121, 92123, 92124, 92125, 92126, 92127, 92128, 92131, 92136, 92141, 92142, 92144, 92145, 92146, 92147, 92149, 92150, 92151, 92152, 92153, 92154, 92158, 92159, 92160, 92161, 92164, 92165, 92167, 92168, 92169, 92170, 92171, 92172, 92173, 92174, 92175, 92176, 92177, 92178, 92179, 92180, 92181, 92182, 92183, 92184, 92186, 92187, 92188, 92189, 92190, 92192, 92193, 92194, 92196, 92197, 92198, 92199, 92200, 92201, 92202, 92203, 92204, 92205, 92207, 92208, 92209, 92210, 92211, 92212, 92213, 92214, 92215, 92216, 92217, 92221, 92222, 92223, 92225, 92226, 92227, 92228, 92229, 92231, 92232, 92234, 92235, 92236, 92237, 92238, 92240, 92241, 92242, 92243, 92244, 92245, 92246, 92247, 92248, 92250, 92252, 92253, 92254, 92256, 92258, 92259, 92262, 92264, 92265, 92267, 92268, 92272, 92274, 92275, 92276, 92277, 92278, 92279, 92280, 92281, 92283, 92285, 92286, 92287, 92289, 92290, 92292, 92293, 92294, 92295, 92296, 92297, 92298, 92299, 92300, 92302, 92303, 92306, 92308, 92309, 92311, 92313, 92314, 92315, 92316, 92318, 92319, 92320, 92321, 92323, 92325, 92326, 92327, 92330, 92332, 92333, 92335, 92339, 92341, 92342, 92346, 92347, 92348, 92349, 92350, 92351, 92352, 92354, 92355, 92357, 92359, 92361, 92362, 92364, 92365, 92366, 92367, 92368, 92369, 92370, 92371, 92372, 92373, 92376, 92377, 92378, 92379, 92380, 92382, 92384, 92385, 92386, 92387, 92388, 92389, 92390, 92391, 92392, 92393, 92394, 92395, 92397, 92398, 92401, 92402, 92403, 92404, 92405, 92406, 92407, 92408, 92409, 92411, 92413, 92414, 92415, 92417, 92420, 92421, 92422, 92423, 92425, 92426, 92428, 92429, 92430, 92431, 92434, 92437, 92438, 92439, 92440, 92441, 92442, 92443, 92444, 92445, 92446, 92447, 92448, 92449, 92450, 92451, 92452, 92454, 92455, 92456, 92457, 92460, 92461, 92463, 92464, 92465, 92466, 92467, 92468, 92469, 92470, 92471, 92472, 92473, 92474, 92475, 92476, 92477, 92478, 92479, 92480, 92481, 92482, 92483, 92484, 92485, 92487, 92488, 92490, 92491, 92492, 92493, 92494, 92497, 92498, 92499, 92503, 92504, 92505, 92508, 92509, 92510, 92511, 92513, 92514, 92515, 92517, 92518, 92519, 92522, 92524, 92526, 92527, 92528, 92529, 92530, 92531, 92532, 92533, 92534, 92535, 92536, 92537, 92539, 92542, 92543, 92545, 92546, 92547, 92548, 92549, 92550, 92551, 92552, 92553, 92554, 92555, 92557, 92558, 92560, 92562, 92563, 92564, 92565, 92566, 92567, 92568, 92569, 92570, 92571, 92572, 92573, 92574, 92575, 92576, 92577, 92578, 92579, 92580, 92581, 92582, 92583, 92584, 92586, 92587, 92588, 92589, 92590, 92591, 92592, 92593, 92594, 92596, 92598, 92599, 92600, 92602, 92603, 92604, 92606, 92608, 92610, 92611, 92612, 92615, 92616, 92617, 92618, 92619, 92620, 92621, 92622, 92623, 92626, 92627, 92628, 92629, 92630, 92633, 92634, 92635, 92636, 92637, 92638, 92641, 92642, 92644, 92645, 92646, 92647, 92648, 92649, 92650, 92651, 92652, 92653, 92655, 92656, 92657, 92658, 92660, 92661, 92663, 92664, 92666, 92667, 92668, 92670, 92672, 92673, 92675, 92676, 92677, 92678, 92679, 92680, 92681, 92682, 92683, 92686, 92687, 92688, 92689, 92690, 92691, 92692, 92693, 92694, 92695, 92696, 92698, 92700, 92701, 92702, 92703, 92704, 92705, 92706, 92707, 92709, 92710, 92711, 92712, 92715, 92716, 92717, 92718, 92719, 92720, 92721, 92722, 92723, 92724, 92726, 92727, 92728, 92729, 92730, 92731, 92732, 92733, 92734, 92735, 92736, 92737, 92739, 92740, 92741, 92742, 92743, 92745, 92747, 92748, 92749, 92753, 92754, 92755, 92757, 92759, 92760, 92761, 92762, 92763, 92764, 92765, 92766, 92767, 92770, 92771, 92773, 92774, 92775, 92776, 92778, 92779, 92780, 92781, 92782, 92783, 92784, 92785, 92786, 92787, 92788, 92789, 92790, 92791, 92792, 92795, 92797, 92800, 92802, 92803, 92804, 92805, 92807, 92808, 92809, 92811, 92812, 92813, 92814, 92815, 92818, 92820, 92821, 92822, 92823, 92824, 92825, 92827, 92828, 92830, 92831, 92835, 92836, 92837, 92838, 92839, 92841, 92843, 92844, 92846, 92847, 92848, 92850, 92851, 92852, 92854, 92855, 92856, 92857, 92858, 92860, 92863, 92864, 92865, 92866, 92868, 92869, 92871, 92872, 92873, 92875, 92876, 92877, 92879, 92880, 92882, 92883, 92884, 92885, 92886, 92888, 92890, 92891, 92892, 92893, 92894, 92897, 92900, 92901, 92902, 92903, 92904, 92905, 92906, 92907, 92908, 92911, 92913, 92914, 92915, 92916, 92918, 92921, 92922, 92923, 92925, 92927, 92929, 92932, 92934, 92935, 92938, 92939, 92941, 92943, 92945, 92946, 92950, 92951, 92952, 92953, 92954, 92955, 92956, 92961, 92962, 92963, 92965, 92966, 92968, 92969, 92971, 92972, 92973, 92974, 92975, 92978, 92979, 92980, 92981, 92982, 92983, 92984, 92987, 92989, 92991, 92993, 92994, 92995, 92996, 92997, 92998, 92999, 93002, 93003, 93006, 93007, 93009, 93010, 93013, 93014, 93015, 93016, 93017, 93019, 93020, 93021, 93023, 93024, 93025, 93027, 93028, 93030, 93031, 93032, 93034, 93035, 93036, 93037, 93038, 93039, 93041, 93043, 93044, 93045, 93047, 93048, 93049, 93050, 93052, 93056, 93057, 93058, 93059, 93061, 93064, 93065, 93066, 93067, 93069, 93070, 93072, 93073, 93074, 93075, 93076, 93077, 93078, 93080, 93082, 93085, 93086, 93087, 93088, 93091, 93092, 93093, 93094, 93096, 93097, 93098, 93099, 93100, 93101, 93102, 93103, 93105, 93106, 93107, 93108, 93109, 93110, 93112, 93113, 93114, 93115, 93116, 93117, 93118, 93119, 93120, 93121, 93122, 93124, 93125, 93126, 93129, 93130, 93132, 93134, 93136, 93137, 93138, 93139, 93140, 93142, 93143, 93145, 93146, 93147, 93148, 93149, 93150, 93151, 93152, 93153, 93154, 93155, 93158, 93160, 93161, 93162, 93164, 93165, 93166, 93167, 93168, 93170, 93172, 93173, 93175, 93176, 93177, 93178, 93180, 93182, 93183, 93185, 93186, 93187, 93189, 93190, 93192, 93193, 93194, 93195, 93197, 93198, 93199, 93200, 93205, 93207, 93208, 93210, 93211, 93213, 93214, 93215, 93216, 93217, 93219, 93220, 93221, 93222, 93223, 93227, 93228, 93229, 93230, 93232, 93233, 93234, 93235, 93237, 93238, 93239, 93240, 93241, 93243, 93244, 93245, 93246, 93247, 93248, 93249, 93250, 93251, 93252, 93254, 93255, 93256, 93257, 93258, 93259, 93263, 93265, 93266, 93267, 93268, 93269, 93270, 93271, 93273, 93274, 93275, 93276, 93277, 93278, 93279, 93280, 93281, 93282, 93283, 93284, 93286, 93287, 93289, 93290, 93291, 93292, 93293, 93294, 93295, 93296, 93297, 93298, 93301, 93302, 93303, 93305, 93307, 93308, 93309, 93310, 93311, 93312, 93313, 93314, 93317, 93318, 93319, 93320, 93321, 93322, 93325, 93326, 93328, 93331, 93332, 93333, 93334, 93335, 93336, 93337, 93338, 93339, 93340, 93341, 93342, 93343, 93344, 93345, 93346, 93347, 93348, 93350, 93351, 93352, 93353, 93354, 93355, 93356, 93358, 93359, 93360, 93361, 93362, 93363, 93364, 93365, 93366, 93368, 93371, 93372, 93373, 93376, 93378, 93380, 93381, 93382, 93383, 93385, 93386, 93387, 93388, 93389, 93390, 93391, 93392, 93393, 93394, 93399, 93400, 93401, 93402, 93403, 93404, 93405, 93407, 93409, 93411, 93412, 93413, 93415, 93419, 93420, 93421, 93422, 93424, 93427, 93428, 93429, 93430, 93431, 93432, 93433, 93434, 93435, 93436, 93437, 93438, 93439, 93440, 93441, 93442, 93443, 93444, 93445, 93446, 93447, 93448, 93449, 93450, 93451, 93452, 93453, 93454, 93456, 93458, 93459, 93460, 93462, 93464, 93465, 93466, 93468, 93469, 93470, 93471, 93472, 93473, 93474, 93475, 93476, 93478, 93479, 93480, 93481, 93483, 93484, 93485, 93486, 93487, 93488, 93489, 93490, 93491, 93492, 93493, 93494, 93495, 93497, 93498, 93499, 93500, 93502, 93503, 93504, 93505, 93506, 93509, 93510, 93511, 93512, 93513, 93514, 93515, 93519, 93520, 93521, 93522, 93524, 93525, 93526, 93527, 93528, 93529, 93530, 93531, 93534, 93537, 93538, 93539, 93541, 93542, 93544, 93545, 93546, 93548, 93549, 93550, 93551, 93552, 93554, 93555, 93556, 93557, 93558, 93559, 93560, 93561, 93563, 93564, 93565, 93566, 93567, 93569, 93570, 93571, 93572, 93573, 93574, 93575, 93576, 93577, 93578, 93579, 93580, 93581, 93582, 93583, 93584, 93585, 93587, 93588, 93590, 93591, 93592, 93595, 93596, 93599, 93600, 93602, 93604, 93605, 93606, 93608, 93609, 93610, 93612, 93613, 93614, 93615, 93618, 93619, 93622, 93623, 93624, 93625, 93627, 93628, 93629, 93630, 93633, 93635, 93636, 93637, 93641, 93642, 93643, 93646, 93647, 93648, 93649, 93652, 93654, 93655, 93656, 93658, 93660, 93661, 93664, 93665, 93667, 93668, 93669, 93670, 93671, 93672, 93673, 93674, 93675, 93678, 93679, 93681, 93682, 93683, 93684, 93685, 93686, 93688, 93689, 93691, 93692, 93693, 93694, 93696, 93697, 93698, 93699, 93700, 93701, 93702, 93705, 93707, 93708, 93709, 93714, 93715, 93716, 93717, 93718, 93719, 93720, 93721, 93724, 93725, 93727, 93728, 93729, 93730, 93731, 93732, 93733, 93735, 93736, 93737, 93738, 93739, 93741, 93742, 93743, 93744, 93745, 93747, 93748, 93750, 93751, 93754, 93756, 93758, 93759, 93760, 93762, 93763, 93764, 93765, 93766, 93767, 93768, 93770, 93771, 93772, 93773, 93774, 93775, 93777, 93778, 93779, 93781, 93782, 93785, 93787, 93788, 93789, 93791, 93792, 93793, 93794, 93796, 93797, 93799, 93800, 93801, 93802, 93806, 93808, 93809, 93810, 93811, 93813, 93814, 93815, 93816, 93818, 93820, 93821, 93822, 93823, 93824, 93825, 93826, 93827, 93828, 93831, 93832, 93835, 93836, 93841, 93844, 93846, 93847, 93848, 93849, 93851, 93852, 93854, 93855, 93856, 93857, 93859, 93860, 93861, 93865, 93866, 93867, 93868, 93870, 93871, 93872, 93873, 93874, 93875, 93877, 93878, 93879, 93881, 93882, 93883, 93885, 93889, 93890, 93891, 93892, 93894, 93895, 93896, 93897, 93899, 93900, 93902, 93903, 93904, 93905, 93906, 93907, 93908, 93909, 93911, 93912, 93913, 93914, 93915, 93916, 93917, 93919, 93920, 93921, 93922, 93923, 93924, 93925, 93926, 93927, 93928, 93929, 93930, 93931, 93932, 93933, 93934, 93935, 93936, 93937, 93938, 93940, 93941, 93942, 93943, 93944, 93945, 93946, 93947, 93948, 93951, 93952, 93953, 93954, 93957, 93958, 93960, 93961, 93962, 93963, 93964, 93965, 93966, 93967, 93968, 93970, 93971, 93973, 93974, 93975, 93977, 93978, 93979, 93980, 93982, 93985, 93986, 93987, 93988, 93989, 93992, 93993, 93994, 93995, 93998, 94000, 94001, 94004, 94005, 94006, 94007, 94008, 94010, 94012, 94013, 94014, 94015, 94016, 94018, 94019, 94020, 94021, 94022, 94024, 94025, 94026, 94027, 94028, 94029, 94030, 94031, 94033, 94034, 94035, 94036, 94037, 94038, 94039, 94040, 94041, 94042, 94044, 94045, 94046, 94047, 94048, 94049, 94050, 94051, 94052, 94053, 94054, 94055, 94056, 94059, 94060, 94061, 94063, 94064, 94068, 94069, 94070, 94071, 94072, 94073, 94074, 94078, 94079, 94080, 94081, 94082, 94083, 94084, 94085, 94086, 94088, 94089, 94090, 94092, 94093, 94094, 94095, 94096, 94097, 94099, 94100, 94101, 94103, 94104, 94106, 94107, 94108, 94109, 94111, 94112, 94114, 94116, 94118, 94122, 94123, 94124, 94126, 94127, 94128, 94130, 94132, 94133, 94135, 94136, 94138, 94139, 94140, 94142, 94146, 94147, 94148, 94149, 94150, 94151, 94152, 94154, 94156, 94157, 94158, 94160, 94162, 94164, 94167, 94168, 94170, 94171, 94172, 94173, 94174, 94178, 94179, 94181, 94182, 94183, 94184, 94185, 94186, 94187, 94189, 94190, 94191, 94192, 94195, 94197, 94198, 94199, 94200, 94201, 94202, 94203, 94204, 94205, 94206, 94209, 94211, 94212, 94214, 94215, 94216, 94217, 94218, 94220, 94221, 94222, 94224, 94225, 94226, 94228, 94229, 94231, 94232, 94234, 94236, 94237, 94238, 94239, 94240, 94241, 94242, 94244, 94246, 94250, 94251, 94252, 94253, 94255, 94259, 94260, 94262, 94263, 94264, 94265, 94270, 94271, 94272, 94273, 94274, 94275, 94276, 94277, 94278, 94279, 94280, 94281, 94282, 94283, 94284, 94285, 94286, 94287, 94289, 94290, 94291, 94292, 94295, 94296, 94298, 94299, 94301, 94303, 94304, 94306, 94308, 94309, 94310, 94311, 94312, 94314, 94315, 94316, 94317, 94318, 94319, 94320, 94322, 94323, 94324, 94325, 94326, 94327, 94328, 94330, 94331, 94332, 94334, 94335, 94336, 94337, 94338, 94339, 94340, 94343, 94344, 94349, 94352, 94353, 94354, 94355, 94356, 94357, 94358, 94359, 94360, 94362, 94363, 94366, 94368, 94369, 94372, 94373, 94374, 94375, 94377, 94378, 94379, 94380, 94383, 94385, 94386, 94387, 94389, 94390, 94391, 94392, 94393, 94394, 94395, 94396, 94397, 94399, 94400, 94401, 94404, 94405, 94406, 94408, 94409, 94410, 94411, 94412, 94413, 94414, 94415, 94416, 94417, 94419, 94420, 94421, 94422, 94424, 94425, 94426, 94428, 94430, 94431, 94432, 94433, 94434, 94435, 94436, 94437, 94438, 94439, 94440, 94441, 94443, 94444, 94445, 94448, 94450, 94451, 94452, 94453, 94454, 94455, 94458, 94460, 94461, 94462, 94464, 94466, 94467, 94468, 94471, 94472, 94473, 94474, 94475, 94476, 94478, 94479, 94480, 94481, 94483, 94484, 94485, 94486, 94488, 94491, 94492, 94496, 94497, 94498, 94499, 94500, 94501, 94502, 94503, 94504, 94505, 94506, 94507, 94508, 94509, 94511, 94512, 94513, 94514, 94515, 94516, 94517, 94518, 94519, 94521, 94524, 94525, 94526, 94529, 94530, 94531, 94532, 94533, 94534, 94535, 94536, 94537, 94539, 94540, 94543, 94544, 94546, 94547, 94548, 94549, 94551, 94552, 94553, 94554, 94556, 94558, 94559, 94560, 94561, 94562, 94563, 94565, 94567, 94568, 94569, 94570, 94572, 94573, 94574, 94575, 94580, 94581, 94582, 94583, 94584, 94585, 94586, 94588, 94589, 94591, 94593, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94603, 94604, 94605, 94606, 94607, 94609, 94610, 94611, 94613, 94614, 94615, 94616, 94618, 94620, 94622, 94623, 94624, 94625, 94628, 94629, 94630, 94631, 94632, 94633, 94635, 94636, 94637, 94638, 94639, 94640, 94642, 94644, 94645, 94646, 94647, 94648, 94649, 94650, 94652, 94653, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94676, 94678, 94680, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94691, 94692, 94693, 94694, 94695, 94696, 94697, 94698, 94699, 94700, 94701, 94702, 94703, 94704, 94705, 94708, 94709, 94711, 94712, 94714, 94715, 94716, 94719, 94720, 94721, 94722, 94723, 94724, 94725, 94726, 94727, 94729, 94730, 94731, 94733, 94736, 94737, 94738, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94747, 94748, 94749, 94750, 94753, 94754, 94756, 94757, 94758, 94759, 94760, 94761, 94762, 94763, 94764, 94766, 94767, 94768, 94769, 94770, 94771, 94772, 94774, 94775, 94776, 94777, 94778, 94779, 94780, 94781, 94783, 94785, 94786, 94787, 94788, 94789, 94792, 94793, 94795, 94800, 94802, 94804, 94805, 94806, 94807, 94808, 94809, 94810, 94811, 94813, 94814, 94815, 94816, 94817, 94818, 94819, 94820, 94821, 94822, 94824, 94825, 94826, 94828, 94831, 94832, 94833, 94835, 94836, 94838, 94839, 94840, 94841, 94842, 94843, 94844, 94845, 94846, 94848, 94851, 94852, 94853, 94854, 94855, 94857, 94858, 94859, 94860, 94862, 94863, 94864, 94865, 94866, 94867, 94868, 94870, 94872, 94873, 94874, 94875, 94876, 94877, 94878, 94879, 94880, 94882, 94883, 94884, 94886, 94887, 94890, 94891, 94892, 94893, 94894, 94898, 94900, 94901, 94902, 94903, 94904, 94905, 94906, 94907, 94908, 94909, 94910, 94911, 94913, 94914, 94916, 94917, 94918, 94919, 94920, 94921, 94923, 94926, 94927, 94929, 94932, 94933, 94935, 94936, 94937, 94938, 94939, 94941, 94942, 94944, 94945, 94946, 94947, 94949, 94950, 94951, 94952, 94953, 94954, 94955, 94956, 94957, 94960, 94962, 94963, 94964, 94965, 94966, 94967, 94968, 94969, 94970, 94971, 94974, 94975, 94976, 94978, 94979, 94980, 94984, 94985, 94986, 94989, 94990, 94991, 94992, 94994, 94995, 94996, 94998, 94999, 95000, 95001, 95002, 95005, 95006, 95007, 95009, 95010, 95011, 95015, 95017, 95018, 95019, 95020, 95021, 95022, 95023, 95024, 95025, 95026, 95028, 95030, 95032, 95033, 95034, 95035, 95036, 95039, 95040, 95041, 95042, 95044, 95045, 95046, 95047, 95048, 95049, 95050, 95052, 95055, 95056, 95058, 95059, 95060, 95062, 95067, 95069, 95071, 95072, 95073, 95074, 95075, 95076, 95077, 95079, 95080, 95082, 95083, 95084, 95086, 95087, 95088, 95091, 95092, 95093, 95095, 95096, 95097, 95099, 95100, 95101, 95102, 95105, 95106, 95107, 95108, 95110, 95111, 95112, 95113, 95114, 95115, 95116, 95118, 95120, 95121, 95123, 95124, 95126, 95127, 95128, 95129, 95130, 95131, 95132, 95133, 95134, 95135, 95136, 95137, 95138, 95139, 95142, 95143, 95145, 95146, 95147, 95151, 95152, 95153, 95154, 95155, 95156, 95157, 95159, 95160, 95161, 95162, 95163, 95164, 95165, 95166, 95167, 95168, 95170, 95171, 95172, 95173, 95174, 95175, 95176, 95177, 95178, 95179, 95181, 95182, 95184, 95186, 95187, 95188, 95189, 95191, 95192, 95193, 95195, 95196, 95197, 95198, 95199, 95200, 95201, 95203, 95204, 95205, 95206, 95207, 95208, 95209, 95210, 95211, 95212, 95214, 95215, 95216, 95219, 95220, 95221, 95222, 95223, 95224, 95225, 95226, 95227, 95228, 95229, 95231, 95232, 95233, 95234, 95235, 95236, 95238, 95240, 95241, 95242, 95244, 95245, 95246, 95248, 95250, 95251, 95252, 95254, 95255, 95256, 95257, 95258, 95260, 95261, 95262, 95264, 95265, 95266, 95267, 95268, 95269, 95270, 95271, 95273, 95278, 95280, 95282, 95284, 95285, 95286, 95287, 95289, 95290, 95291, 95292, 95294, 95295, 95296, 95297, 95299, 95300, 95301, 95302, 95303, 95304, 95308, 95309, 95310, 95311, 95312, 95315, 95316, 95317, 95318, 95320, 95321, 95323, 95326, 95327, 95329, 95330, 95331, 95332, 95333, 95334, 95336, 95337, 95338, 95340, 95341, 95342, 95343, 95344, 95345, 95346, 95347, 95348, 95349, 95350, 95352, 95353, 95354, 95355, 95356, 95357, 95359, 95360, 95361, 95362, 95363, 95364, 95365, 95366, 95367, 95368, 95369, 95370, 95371, 95372, 95374, 95376, 95377, 95378, 95379, 95380, 95381, 95383, 95384, 95386, 95387, 95388, 95389, 95390, 95392, 95393, 95394, 95395, 95396, 95397, 95399, 95400, 95402, 95405, 95406, 95408, 95410, 95411, 95412, 95414, 95415, 95417, 95419, 95420, 95421, 95424, 95425, 95426, 95427, 95428, 95430, 95432, 95433, 95434, 95435, 95436, 95438, 95440, 95442, 95443, 95444, 95446, 95448, 95449, 95451, 95452, 95454, 95455, 95456, 95459, 95461, 95462, 95463, 95464, 95465, 95467, 95468, 95469, 95470, 95471, 95473, 95474, 95475, 95476, 95477, 95478, 95481, 95482, 95483, 95485, 95486, 95487, 95490, 95494, 95499, 95500, 95501, 95502, 95503, 95504, 95505, 95506, 95507, 95508, 95509, 95510, 95511, 95512, 95514, 95516, 95517, 95518, 95519, 95520, 95523, 95524, 95525, 95526, 95528, 95529, 95530, 95531, 95532, 95533, 95535, 95536, 95539, 95540, 95543, 95544, 95545, 95547, 95548, 95550, 95552, 95553, 95555, 95556, 95558, 95559, 95560, 95561, 95563, 95565, 95566, 95567, 95569, 95570, 95571, 95572, 95574, 95575, 95576, 95577, 95578, 95579, 95580, 95582, 95583, 95584, 95585, 95586, 95587, 95588, 95589, 95590, 95592, 95593, 95595, 95597, 95598, 95599, 95600, 95601, 95602, 95603, 95604, 95605, 95608, 95609, 95610, 95611, 95612, 95614, 95616, 95617, 95618, 95620, 95621, 95622, 95623, 95624, 95625, 95626, 95627, 95629, 95630, 95631, 95632, 95635, 95636, 95637, 95638, 95639, 95641, 95642, 95643, 95644, 95645, 95646, 95647, 95649, 95651, 95653, 95656, 95657, 95658, 95659, 95660, 95662, 95666, 95667, 95669, 95671, 95672, 95673, 95674, 95675, 95676, 95678, 95679, 95681, 95682, 95684, 95685, 95686, 95689, 95690, 95693, 95694, 95695, 95696, 95697, 95698, 95699, 95700, 95704, 95706, 95707, 95709, 95710, 95711, 95712, 95713, 95714, 95715, 95716, 95717, 95718, 95719, 95720, 95721, 95722, 95723, 95724, 95725, 95726, 95727, 95728, 95729, 95732, 95733, 95734, 95735, 95736, 95737, 95738, 95739, 95741, 95742, 95743, 95744, 95745, 95746, 95747, 95750, 95752, 95753, 95754, 95755, 95757, 95760, 95762, 95764, 95766, 95767, 95768, 95770, 95772, 95773, 95774, 95775, 95777, 95778, 95779, 95780, 95782, 95783, 95785, 95789, 95790, 95791, 95792, 95793, 95794, 95795, 95796, 95797, 95801, 95803, 95804, 95805, 95806, 95808, 95809, 95810, 95811, 95812, 95813, 95816, 95817, 95819, 95820, 95823, 95824, 95825, 95827, 95828, 95829, 95830, 95831, 95832, 95833, 95834, 95835, 95836, 95837, 95839, 95841, 95842, 95843, 95844, 95845, 95847, 95848, 95849, 95850, 95851, 95852, 95853, 95854, 95857, 95858, 95859, 95860, 95861, 95862, 95864, 95865, 95866, 95867, 95869, 95870, 95871, 95872, 95874, 95875, 95877, 95878, 95879, 95880, 95881, 95882, 95884, 95885, 95888, 95889, 95892, 95893, 95896, 95897, 95899, 95900, 95902, 95903, 95906, 95907, 95909, 95910, 95912, 95914, 95915, 95917, 95919, 95920, 95921, 95922, 95923, 95924, 95925, 95926, 95927, 95928, 95929, 95931, 95932, 95934, 95935, 95936, 95938, 95939, 95940, 95941, 95942, 95944, 95945, 95946, 95947, 95948, 95949, 95951, 95954, 95955, 95956, 95957, 95958, 95959, 95960, 95961, 95962, 95963, 95965, 95966, 95968, 95969, 95970, 95971, 95972, 95975, 95976, 95977, 95979, 95981, 95983, 95984, 95985, 95986, 95987, 95988, 95990, 95991, 95992, 95993, 95996, 95997, 95998, 95999, 96001, 96002, 96003, 96004, 96005, 96006, 96008, 96009, 96012, 96013, 96014, 96015, 96017, 96018, 96019, 96020, 96021, 96022, 96023, 96024, 96027, 96028, 96029, 96030, 96031, 96033, 96034, 96035, 96036, 96037, 96038, 96041, 96044, 96045, 96046, 96047, 96048, 96049, 96050, 96052, 96053, 96054, 96056, 96057, 96058, 96059, 96060, 96061, 96062, 96064, 96066, 96067, 96069, 96070, 96071, 96072, 96074, 96075, 96076, 96077, 96078, 96081, 96084, 96085, 96088, 96089, 96091, 96092, 96093, 96094, 96097, 96100, 96101, 96103, 96106, 96107, 96109, 96110, 96111, 96113, 96114, 96115, 96116, 96117, 96118, 96119, 96121, 96122, 96124, 96125, 96126, 96128, 96129, 96131, 96132, 96133, 96135, 96137, 96141, 96142, 96143, 96144, 96145, 96147, 96149, 96150, 96151, 96152, 96154, 96155, 96156, 96157, 96158, 96159, 96161, 96162, 96163, 96164, 96165, 96166, 96167, 96168, 96169, 96173, 96174, 96175, 96176, 96177, 96178, 96179, 96180, 96183, 96184, 96185, 96187, 96188, 96189, 96190, 96191, 96192, 96193, 96194, 96195, 96196, 96197, 96198, 96201, 96202, 96203, 96205, 96207, 96208, 96209, 96212, 96213, 96214, 96216, 96218, 96220, 96221, 96224, 96225, 96226, 96227, 96228, 96229, 96231, 96233, 96234, 96235, 96236, 96237, 96238, 96239, 96241, 96242, 96243, 96244, 96246, 96247, 96248, 96249, 96250, 96251, 96255, 96256, 96257, 96258, 96260, 96261, 96263, 96264, 96268, 96269, 96270, 96271, 96273, 96274, 96275, 96276, 96277, 96278, 96279, 96280, 96281, 96282, 96284, 96285, 96286, 96287, 96288, 96289, 96290, 96292, 96294, 96296, 96297, 96298, 96300, 96301, 96302, 96305, 96308, 96309, 96310, 96312, 96314, 96315, 96317, 96318, 96319, 96321, 96322, 96324, 96325, 96326, 96327, 96329, 96330, 96332, 96333, 96334, 96337, 96338, 96340, 96341, 96342, 96344, 96345, 96346, 96348, 96349, 96352, 96353, 96354, 96355, 96357, 96358, 96359, 96361, 96362, 96365, 96368, 96369, 96370, 96371, 96372, 96373, 96374, 96376, 96377, 96378, 96380, 96381, 96382, 96383, 96384, 96385, 96386, 96387, 96389, 96390, 96393, 96394, 96395, 96396, 96397, 96398, 96400, 96401, 96403, 96405, 96406, 96407, 96408, 96409, 96410, 96411, 96412, 96413, 96414, 96416, 96417, 96418, 96419, 96420, 96421, 96423, 96424, 96425, 96427, 96428, 96429, 96430, 96432, 96433, 96434, 96435, 96436, 96437, 96438, 96440, 96443, 96444, 96445, 96446, 96447, 96448, 96449, 96450, 96451, 96452, 96453, 96454, 96456, 96457, 96458, 96459, 96461, 96462, 96463, 96464, 96465, 96466, 96467, 96468, 96469, 96470, 96471, 96472, 96473, 96474, 96475, 96476, 96477, 96478, 96479, 96480, 96481, 96483, 96485, 96488, 96489, 96490, 96492, 96493, 96494, 96495, 96496, 96498, 96499, 96501, 96504, 96506, 96508, 96510, 96511, 96512, 96514, 96516, 96517, 96518, 96519, 96520, 96524, 96525, 96527, 96528, 96529, 96533, 96534, 96535, 96536, 96537, 96538, 96539, 96540, 96542, 96543, 96544, 96546, 96548, 96549, 96551, 96552, 96554, 96555, 96556, 96557, 96559, 96560, 96561, 96562, 96563, 96565, 96566, 96568, 96570, 96571, 96573, 96574, 96576, 96578, 96579, 96580, 96581, 96582, 96583, 96584, 96585, 96586, 96587, 96588, 96590, 96591, 96592, 96596, 96597, 96598, 96601, 96602, 96603, 96604, 96605, 96606, 96607, 96608, 96609, 96611, 96612, 96613, 96614, 96615, 96617, 96618, 96620, 96621, 96622, 96625, 96627, 96628, 96629, 96630, 96631, 96632, 96633, 96635, 96636, 96637, 96639, 96641, 96642, 96644, 96645, 96646, 96648, 96649, 96650, 96651, 96653, 96654, 96656, 96657, 96658, 96660, 96661, 96662, 96664, 96665, 96666, 96667, 96668, 96669, 96670, 96672, 96673, 96674, 96676, 96679, 96680, 96681, 96682, 96684, 96685, 96686, 96687, 96690, 96691, 96692, 96693, 96695, 96699, 96700, 96701, 96702, 96703, 96704, 96705, 96706, 96707, 96710, 96711, 96712, 96713, 96714, 96718, 96720, 96721, 96723, 96724, 96725, 96726, 96728, 96729, 96730, 96731, 96732, 96733, 96734, 96735, 96736, 96737, 96738, 96739, 96740, 96741, 96742, 96744, 96746, 96747, 96749, 96750, 96751, 96752, 96753, 96754, 96755, 96756, 96757, 96758, 96759, 96761, 96762, 96765, 96766, 96768, 96770, 96774, 96777, 96778, 96779, 96782, 96783, 96784, 96785, 96787, 96788, 96791, 96792, 96793, 96794, 96796, 96797, 96798, 96799, 96800, 96801, 96803, 96804, 96805, 96806, 96807, 96809, 96810, 96812, 96813, 96815, 96816, 96817, 96818, 96819, 96821, 96822, 96824, 96825, 96826, 96828, 96830, 96831 ]
3822b4b81439a56db04a5cbfaf76cfd997cf0c39
278268e1bddeef35df48abb55612e99f76808cf2
/Task_Assignment/Task_Assignment/API_Manager/ResponseModel.swift
378e6123cf633034682fe1d8205b1eb9a384907d
[]
no_license
TestFlutter/AboutCanada
76509e5ddb752ddb63bd1279a15431c5c0cc376a
b44422a807be2795353874575f02b661e0f8d711
refs/heads/master
2023-01-10T10:58:08.625906
2020-11-07T06:42:06
2020-11-07T06:42:06
310,783,233
0
0
null
null
null
null
UTF-8
Swift
false
false
556
swift
// // ResponseModel.swift // Task_Assignment // // Created by Manikanta on 06/11/20. // import Foundation import Foundation struct ResponseModel: Decodable { let title: String? let rows: [Content]? enum CodingKeys: String, CodingKey { case title, rows } init(from decoder: Decoder) throws { let values = try decoder.container(keyedBy: CodingKeys.self) title = try values.decodeIfPresent(String.self, forKey: .title) rows = try values.decodeIfPresent([Content].self, forKey: .rows) } }
[ -1 ]
6094615f58397ee64f446f7e928cfbc306716b98
402c83160c23773d82a28400bf10840e2f6804b0
/Want A Meal/Want A Meal/Want A Meal/data.swift
2a62b21f098734210a90bab413e5d38fd450bf61
[]
no_license
cindywxw/iOS_Development
4c37f3ee4ef19548282fef90faa60f3fc1518f76
76b244b764f9c49a178ae940c2341987d7c335fb
refs/heads/master
2021-01-20T04:17:22.161056
2017-12-21T06:02:16
2017-12-21T06:02:16
89,672,375
0
0
null
null
null
null
UTF-8
Swift
false
false
2,267
swift
// // dish.swift // Want A Meal // // Created by Cynthia on 09/03/2017. // Copyright © 2017 Cynthia. All rights reserved. // import UIKit import Foundation import SystemConfiguration // dish has properties of name, price, and image, used in "Menu" class dish { var name: String? var price: Double? var image: UIImage? init(name: String?, price: Double?, image: UIImage?) { self.name = name self.price = price self.image = image } } /// attribute: http://stackoverflow.com/questions/30743408/check-for-internet-connection-in-swift-2-ios-9 // check the network availability public class Reachability { class func isConnectedToNetwork() -> Bool { var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0)) zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) zeroAddress.sin_family = sa_family_t(AF_INET) let defaultRouteReachability = withUnsafePointer(to: &zeroAddress) { $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {zeroSockAddress in SCNetworkReachabilityCreateWithAddress(nil, zeroSockAddress) } } var flags: SCNetworkReachabilityFlags = SCNetworkReachabilityFlags(rawValue: 0) if SCNetworkReachabilityGetFlags(defaultRouteReachability!, &flags) == false { return false } /* Only Working for WIFI let isReachable = flags == .reachable let needsConnection = flags == .connectionRequired return isReachable && !needsConnection */ // Working for Cellular and WIFI let isReachable = (flags.rawValue & UInt32(kSCNetworkFlagsReachable)) != 0 let needsConnection = (flags.rawValue & UInt32(kSCNetworkFlagsConnectionRequired)) != 0 let ret = (isReachable && !needsConnection) return ret } } //class order { // var name: String? //// var item: dish? // var quantity: Int? // // init(name: String?, quantity: Int?) { // self.name = name // self.quantity = quantity // // } // //}
[ 317216, 369729, 243718, 391623, 341929, 317578, 300203, 132365, 210845, 258319, 178355, 140084, 340280, 330972, 198205, 361279 ]
b31fb4ba21ab8bf4144a597ff4930a820be57dcb
9fb715592b948c288eee65a274b8f83c47d7e0f1
/DevPods/ShowDetails/ShowDetails/Module/Domain/UseCases/MarkAsFavoriteUseCase.swift
c30f3524a452fdc2e13b8fff2896d62c5a155432
[ "MIT" ]
permissive
dani-d-dev/TVToday
24a0cbcf0a1838dab49b56f1b976a4309763981a
b89788e5284a67e635ace0462325035a76837890
refs/heads/master
2022-12-01T17:05:34.129081
2020-08-22T08:42:55
2020-08-22T08:42:55
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,505
swift
// // MarkAsFavoriteUseCase.swift // TVToday // // Created by Jeans Ruiz on 6/23/20. // Copyright © 2020 Jeans. All rights reserved. // import RxSwift import Shared public protocol MarkAsFavoriteUseCase { func execute(requestValue: MarkAsFavoriteUseCaseRequestValue) -> Observable<Result<Bool, Error>> } public struct MarkAsFavoriteUseCaseRequestValue { let showId: Int let favorite: Bool } public final class DefaultMarkAsFavoriteUseCase: MarkAsFavoriteUseCase { private let accountShowsRepository: AccountTVShowsRepository private let keychainRepository: KeychainRepository public init(accountShowsRepository: AccountTVShowsRepository, keychainRepository: KeychainRepository) { self.accountShowsRepository = accountShowsRepository self.keychainRepository = keychainRepository } public func execute(requestValue: MarkAsFavoriteUseCaseRequestValue) -> Observable<Result<Bool, Error>> { guard let account = keychainRepository.fetchLoguedUser() else { return Observable.just(Result.failure(CustomError.genericError)) } return accountShowsRepository.markAsFavorite( session: account.sessionId, userId: String(account.id), tvShowId: requestValue.showId, favorite: requestValue.favorite) .flatMap { _ -> Observable<Result<Bool, Error>> in return Observable.just( Result.success(requestValue.favorite) ) } .catchErrorJustReturn( Result.failure(CustomError.genericError) ) } }
[ -1 ]
35f369f5f50358a1bce2340c496491ce05501b4d
2601d9d664fbd042fd1bac2c6e819915402142f5
/submodules/InstantPageUI/Sources/InstantPageSlideshowItem.swift
d812d7e85ed0e456cc40cde224cd73a3d2ae8409
[]
no_license
TelegramOrg/Telegram-iOS
42ee56feadc910475cbdfc4a39a5dbeddf2bdde2
c4ec7cf628fdf899a09fff03ea663e12ecba44f7
refs/heads/master
2023-08-31T10:23:14.591652
2023-08-18T20:08:55
2023-08-18T20:10:24
157,783,472
42
36
null
2018-11-15T23:02:36
2018-11-15T23:02:36
null
UTF-8
Swift
false
false
2,255
swift
import Foundation import UIKit import TelegramCore import AsyncDisplayKit import TelegramPresentationData import TelegramUIPreferences import AccountContext import ContextUI final class InstantPageSlideshowItem: InstantPageItem { var frame: CGRect let webPage: TelegramMediaWebpage let wantsNode: Bool = true let separatesTiles: Bool = false let medias: [InstantPageMedia] init(frame: CGRect, webPage: TelegramMediaWebpage, medias: [InstantPageMedia]) { self.frame = frame self.webPage = webPage self.medias = medias } func node(context: AccountContext, strings: PresentationStrings, nameDisplayOrder: PresentationPersonNameOrder, theme: InstantPageTheme, sourceLocation: InstantPageSourceLocation, openMedia: @escaping (InstantPageMedia) -> Void, longPressMedia: @escaping (InstantPageMedia) -> Void, activatePinchPreview: ((PinchSourceContainerNode) -> Void)?, pinchPreviewFinished: ((InstantPageNode) -> Void)?, openPeer: @escaping (EnginePeer) -> Void, openUrl: @escaping (InstantPageUrlItem) -> Void, updateWebEmbedHeight: @escaping (CGFloat) -> Void, updateDetailsExpanded: @escaping (Bool) -> Void, currentExpandedDetails: [Int : Bool]?) -> InstantPageNode? { return InstantPageSlideshowNode(context: context, sourceLocation: sourceLocation, theme: theme, webPage: webPage, medias: self.medias, openMedia: openMedia, longPressMedia: longPressMedia, activatePinchPreview: activatePinchPreview, pinchPreviewFinished: pinchPreviewFinished) } func matchesAnchor(_ anchor: String) -> Bool { return false } func matchesNode(_ node: InstantPageNode) -> Bool { if let node = node as? InstantPageSlideshowNode { return self.medias == node.medias } else { return false } } func distanceThresholdGroup() -> Int? { return 3 } func distanceThresholdWithGroupCount(_ count: Int) -> CGFloat { if count > 3 { return 1000.0 } else { return CGFloat.greatestFiniteMagnitude } } func linkSelectionRects(at point: CGPoint) -> [CGRect] { return [] } func drawInTile(context: CGContext) { } }
[ -1 ]
6fd96abf3b2c0275d79c53d0b7da6a50fe43181c
e9818546d803b2064bc7ff8a15a0399680f2e30e
/sampleTableView001/AppDelegate.swift
0e1725ffa10e98530bf7849f7cfcad36145cc72d
[]
no_license
ei17ringo/sampleTableView00120171002
7beece71b2d59882034b33c91432064107f7e842
66d5662286502d5255265e9780fe3151407e2084
refs/heads/master
2021-07-23T01:50:36.783706
2017-11-03T04:16:45
2017-11-03T04:16:45
109,351,311
0
0
null
null
null
null
UTF-8
Swift
false
false
2,194
swift
// // AppDelegate.swift // sampleTableView001 // // Created by Eriko Ichinohe on 2017/10/30. // Copyright © 2017年 Eriko Ichinohe. 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, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 204856, 229432, 286778, 286791, 237640, 278605, 286797, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 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, 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, 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, 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, 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, 352880, 189039, 295538, 172660, 189040, 189044, 287349, 287355, 287360, 295553, 295557, 311942, 303751, 287365, 352905, 311946, 279178, 287371, 311951, 287377, 172691, 311957, 287381, 221850, 287386, 230045, 287390, 303773, 164509, 172705, 287394, 172702, 303780, 172707, 287398, 205479, 279208, 287400, 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, 279267, 312035, 295654, 279272, 312048, 230128, 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, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 304007, 320391, 213895, 304009, 304011, 230284, 304013, 279438, 295822, 213902, 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, 295949, 230413, 197645, 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, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 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, 230679, 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, 230763, 410987, 148843, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 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, 288212, 222676, 148946, 288214, 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, 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, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 313027, 280260, 206536, 280264, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 18140, 313052, 288478, 313055, 321252, 313066, 280302, 288494, 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, 280388, 337732, 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, 239586, 313320, 231404, 124913, 165876, 321528, 313340, 239612, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 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, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 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, 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, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 240011, 199051, 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, 223749, 240132, 281095, 223752, 338440, 150025, 330244, 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, 182926, 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, 338823, 322440, 314249, 240519, 183184, 142226, 240535, 289687, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 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, 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, 323090, 282130, 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, 324757, 282261, 175770, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 306904, 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, 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, 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, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 176311, 299191, 307385, 307386, 258235, 307388, 176316, 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, 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, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 299440, 299444, 127413, 283062, 291254, 127417, 291260, 127421, 283069, 127424, 299457, 127429, 127431, 315856, 176592, 127440, 315860, 176597, 127447, 283095, 127449, 299481, 176605, 242143, 127455, 127457, 291299, 127460, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 135672, 127480, 291323, 233979, 127485, 127490, 291330, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 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, 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, 226053, 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, 185173, 234329, 234333, 308063, 234336, 234338, 349027, 242530, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 201603, 291714, 234373, 316294, 226182, 234375, 308105, 291716, 226185, 234379, 324490, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 234410, 291754, 291756, 324522, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 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, 324599, 234487, 234490, 234493, 234496, 316416, 308226, 234501, 275462, 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, 308291, 316483, 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, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 234648, 234653, 300189, 119967, 324766, 324768, 283805, 234657, 242852, 234661, 283813, 300197, 234664, 275626, 234667, 316596, 308414, 300223, 234687, 300226, 308418, 283844, 300229, 308420, 308422, 226500, 234692, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 300289, 292097, 161027, 300292, 300294, 275719, 234760, 300299, 177419, 242957, 283917, 300301, 177424, 275725, 349464, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 324978, 136562, 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, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 226802, 292338, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 308790, 284215, 194103, 316983, 284218, 194101, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 292433, 284243, 300628, 284245, 194130, 284247, 317015, 235097, 243290, 276053, 284249, 284251, 300638, 284253, 284255, 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, 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, 276166, 284358, 358089, 284362, 276170, 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, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 317279, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 358292, 284564, 317332, 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, 292839, 276455, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 317456, 276496, 317458, 178195, 243733, 317468, 243740, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 194654, 178273, 309346, 194657, 309348, 350308, 309350, 227426, 309352, 350313, 309354, 301163, 350316, 194660, 227430, 276583, 276590, 350321, 284786, 276595, 301167, 350325, 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, 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, 309779, 317971, 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, 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, 342707, 318132, 154292, 293555, 277173, 285368, 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, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 293706, 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, 276579, 293811, 293817, 293820, 203715, 326603, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 326638, 277486, 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, 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, 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, 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, 163272, 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, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 40488, 278057, 294439, 40491, 294440, 294443, 294445, 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, 343757, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 278238, 229086, 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, 280021, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 237470, 40865, 319394, 294817, 294821, 311209, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
f7be351c54209eaa5375f0025acd49a277e7664d
fa23e80cc2b5e36d3a8405834e17aef172373894
/Practice-ChatMessages/ChatMessages/ContentView.swift
4ab4d4cb888a4157249f5b08b8a27beab9f9aae3
[]
no_license
pd95/HWS-Live-2021
e53083264b147649aad53a661a50629b8c7c1daa
0971a7580bbf1627b047642cf2cbab2dc979a784
refs/heads/main
2023-08-03T07:38:56.284579
2021-09-30T15:55:52
2021-09-30T15:55:52
392,088,296
6
2
null
null
null
null
UTF-8
Swift
false
false
2,172
swift
// // ContentView.swift // ChatMessages // // Created by Philipp on 02.08.21. // import SwiftUI struct User: Codable, Identifiable { let id: UUID let name: String let age: Int } struct Message: Codable, Identifiable { let id: Int let from: String let message: String } struct ContentView: View { @State private var user: User? @State private var messages = [Message]() @State private var favoriteMessageID = Set<Int>() var title: String { guard let user = user else { return "Loading..." } return "\(user.name), \(user.age)" } var body: some View { NavigationView { List { ForEach(messages) { message in Section(header: HStack { Text("\(message.from): ").bold() Image(systemName: "heart.fill") .foregroundColor(.red) .opacity(favoriteMessageID.contains(message.id) ? 1 : 0) }) { Text(message.message) } } } .navigationBarTitle(title) .task { let userURL = URL(string: "https://hws.dev/user-24601.json")! let messageURL = URL(string: "https://hws.dev/user-messages.json")! let favoritesURL = URL(string: "https://hws.dev/user-favorites.json")! do { async let user: User = URLSession.shared.decode(from: userURL) async let messages: [Message] = URLSession.shared.decode(from: messageURL) async let favorites: [Int] = URLSession.shared.decode(from: favoritesURL) self.messages = try await messages self.user = try await user self.favoriteMessageID = Set(try await favorites) } catch { print(error.localizedDescription) } } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
[ -1 ]
3f16b7e6cd6cd231f03087be88c3a86524808cd5
e3f588ef30907695e7b9215500b50ed0221cfa5d
/PokeSearch/AppDelegate.swift
cb946c7bd114941cba03d1b22ce7757c88bba6f4
[]
no_license
jthomson93/PokeSearch
7cba1df8c8c014cb88c8bb59835367a12bb2eac3
b9617f9833625ea723dfa878acc6445ea95713e0
refs/heads/master
2021-01-17T16:42:25.362994
2017-02-25T18:54:02
2017-02-25T18:54:02
83,146,524
0
0
null
null
null
null
UTF-8
Swift
false
false
4,669
swift
// // AppDelegate.swift // PokeSearch // // Created by James Thomson on 25/02/2017. // Copyright © 2017 James Thomson. All rights reserved. // import UIKit import CoreData import Firebase import GeoFire @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. FIRApp.configure() 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:. // Saves changes in the application's managed object context before the application terminates. self.saveContext() } // MARK: - Core Data stack lazy var persistentContainer: NSPersistentContainer = { /* The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail. */ let container = NSPersistentContainer(name: "PokeSearch") container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. /* Typical reasons for an error here include: * The parent directory does not exist, cannot be created, or disallows writing. * The persistent store is not accessible, due to permissions or data protection when the device is locked. * The device is out of space. * The store could not be migrated to the current model version. Check the error message to determine what the actual problem was. */ fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }() // MARK: - Core Data Saving support func saveContext () { let context = persistentContainer.viewContext if context.hasChanges { do { try context.save() } catch { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. let nserror = error as NSError fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } } }
[ 294405, 243717, 163848, 313353, 320008, 320014, 313360, 288275, 322580, 289300, 290326, 329747, 139803, 322080, 306721, 229408, 296483, 322083, 229411, 306726, 309287, 308266, 292907, 217132, 322092, 40495, 316465, 288306, 322102, 324663, 308281, 322109, 286783, 315457, 313409, 320582, 309832, 288329, 215117, 196177, 241746, 344661, 231000, 212571, 300124, 309342, 325220, 306790, 310378, 296043, 311914, 322666, 334446, 307310, 292466, 314995, 307315, 314487, 291450, 314491, 318599, 312970, 239252, 311444, 294038, 311449, 323739, 300194, 298662, 233644, 286896, 295600, 300208, 286389, 294070, 125111, 234677, 299706, 309439, 235200, 284352, 296641, 242371, 302787, 284360, 321228, 319181, 298709, 284374, 189654, 182486, 320730, 241371, 311516, 179420, 357083, 317665, 298210, 311525, 288489, 290025, 229098, 307436, 304365, 323310, 125167, 313073, 286455, 306424, 322299, 319228, 302332, 319231, 184576, 309505, 241410, 311043, 366339, 309509, 318728, 125194, 234763, 125201, 296218, 313116, 237858, 326434, 295716, 313125, 300836, 289577, 125226, 133421, 317233, 241971, 316726, 318264, 201530, 313660, 159549, 287038, 292159, 218943, 288578, 301893, 234828, 292172, 321364, 243032, 230748, 258397, 294238, 298844, 199020, 293741, 266606, 319342, 292212, 313205, 244598, 316788, 124796, 196988, 305022, 317821, 243072, 314241, 303999, 242050, 325509, 293767, 316300, 306576, 322448, 308114, 319900, 298910, 313250, 308132, 316327, 306605, 316334, 324015, 324017, 200625, 300979, 316339, 322998, 296888, 316345, 67000, 300987, 319932, 310718, 292288, 317888, 312772, 298950, 306632, 310733, 289744, 310740, 235994, 286174, 315359, 240098, 323555, 236008, 319465, 248299, 311789, 326640, 188913, 203761, 320498, 314357, 288246, 309243, 300540, 310782 ]
3b5116f34b4d634daf10cf5d7197eb8466dc0a8a
d4b2ff53585e13f4ecf7d2d0377dc9acb52d69d9
/wheregottime/AppDelegate.swift
9c84b638f0b221e3310f7842742b442f5865d916
[]
no_license
iuhuiq/wheregottime
ed642337bca72d7a52e89a06da6c993b873c2c14
f6c071e29f92d01cb6cee5686b219a31d035064d
refs/heads/master
2021-06-27T05:04:10.081240
2017-09-14T12:12:37
2017-09-14T12:12:37
103,527,591
0
0
null
null
null
null
UTF-8
Swift
false
false
2,166
swift
// // AppDelegate.swift // wheregottime // // Created by qiuhui on 14/9/17. // Copyright © 2017 qiuhui. 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, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 286776, 319544, 286778, 229432, 204856, 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, 286922, 286924, 286926, 319694, 286928, 131281, 131278, 278743, 278747, 295133, 155872, 131299, 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, 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, 287238, 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, 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, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 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, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 213902, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 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, 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, 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, 214294, 304416, 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, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 148946, 239064, 288217, 329177, 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, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 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, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 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, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 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, 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, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 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, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 280937, 313705, 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, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 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, 240519, 322440, 314249, 338823, 183184, 289687, 224151, 240535, 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, 298365, 290174, 306555, 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, 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, 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, 118593, 307009, 413506, 307012, 241475, 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, 44948, 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, 299003, 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, 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, 323763, 184503, 299191, 176311, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 295583, 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, 291226, 242075, 283033, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 283069, 127424, 299457, 127429, 127431, 127434, 315856, 127440, 176592, 315860, 176597, 127447, 283095, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 127460, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 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, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 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, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 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, 292433, 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, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 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, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 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, 234648, 275606, 234650, 275608, 324757, 300189, 324766, 119967, 234653, 308379, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 324768, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 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, 292192, 316768, 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, 284076, 144814, 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, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 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, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 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, 350299, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 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, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 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, 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, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 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, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 285368, 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, 293696, 310080, 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, 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, 244731, 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, 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, 310486, 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, 384302, 285999, 277804, 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, 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, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 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, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 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, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 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, 319187, 278227, 286420, 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, 280021, 237409, 294776, 360317, 294785, 327554, 360322, 40840, 294803, 40851, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
7ccb0c9940a95aa3a1d49764a9b08903a3ebb636
e40132c9870f98798e4cafe6ed843070cebcf92e
/assiment2/enterNameView.swift
05a9ac5e54e892d1a9ff3258b61e99f08fafab65
[]
no_license
JezuzCrist/ass2IOSclass
5b42435a81c0017f0678921c1381a8a0c7bfa13f
2c7965de3b25375f0d9ecfa5824286d89a83b7fe
refs/heads/master
2020-06-11T01:31:02.542904
2016-12-07T09:51:29
2016-12-07T09:51:29
75,822,198
0
0
null
null
null
null
UTF-8
Swift
false
false
1,313
swift
// // enterNameView.swift // assiment2 // // Created by macDevMachinVB on 06/12/2016. // Copyright © 2016 macDevMachinVB. All rights reserved. // import UIKit protocol enterNameDelegate { func onSave(username:String)->Void func nextScreen()->Void } class enterNameView: UIViewController { var delegate:enterNameDelegate? @IBOutlet weak var slidetText: UILabel! @IBOutlet weak var usernameTextField: UITextField! var sliderValue:String?{ didSet{ if(self.slidetText != nil){ self.slidetText.text = self.sliderValue } } } @IBAction func backPressed(_ sender: Any) { self.dismiss(animated: true, completion: nil) } @IBAction func nextPressed(_ sender: Any) { if(self.delegate != nil){ self.delegate?.nextScreen() self.dismiss(animated: true, completion: self.delegate?.nextScreen) } } @IBAction func savePressed(_ sender: Any) { if(self.delegate != nil){ self.delegate?.onSave(username:self.usernameTextField.text!) } } override func viewDidLoad() { super.viewDidLoad() if(sliderValue != nil){ self.slidetText.text = sliderValue } } }
[ -1 ]
d5d37016797ab9ca28f87b139b87c67bd6163fd4
3eb915801c3dc5b3a72aa96261aca88460ff0495
/Meat Spin/Meat Spin/ViewController.swift
8fc4e6f1fc77ffaf99d4aed843fffd32bd35f3d3
[ "MIT" ]
permissive
wademauger/SWEN-356
e6a8e43ed177f0b93c36d5b2f527f03c21221a73
fbc6c7548ce332da4e13d9da8346c6e87d2a27a5
refs/heads/master
2021-09-10T09:32:22.168751
2018-03-23T16:06:09
2018-03-23T16:06:09
120,334,247
1
0
null
null
null
null
UTF-8
Swift
false
false
1,494
swift
// // ViewController.swift // Meat Spin // // Created by Matthew Vogt on 2/9/18. // Copyright © 2018 SWEN-356. All rights reserved. // import UIKit import UserNotifications // Comment your name below when you get xcode to build and run! // Dan Sweetman // Matthew Vogt // Arshdeep Khalsa // Wade Mauger class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() //Use function when testing //sendNotification(title:"Chicken is done", body:"Tap to view more", time:5.0); } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /** Sends a notification after a specified amount of time @param title Title of notification @param body Body of notification @param time Specified time for notification to trigger */ func sendNotification(title: String, body: String, time: Double){ let content = UNMutableNotificationContent() content.title = title content.body = body content.sound = UNNotificationSound.default() let trigger = UNTimeIntervalNotificationTrigger(timeInterval: time, repeats: false) let request = UNNotificationRequest(identifier: "DoneChicken", content: content, trigger: trigger) UNUserNotificationCenter.current().add(request, withCompletionHandler: nil) } }
[ -1 ]
3e93744c054c4efef2db4dc5394a777de874ba5c
bd8a645e97d461274ec0c8c2dcae6a2c368258aa
/HanabiExample/HanabiExample/ContentViewController.swift
8e485a8ee8767b19a25a518383db4a896779094d
[ "MIT" ]
permissive
carabina/Hanabi
87ab09b3a55d265813d93815dc657d20e69cecff
efc5a7af95c376a5e2fff379147e8f75a404d40c
refs/heads/master
2021-01-17T16:05:17.111522
2015-11-25T17:43:11
2015-11-25T17:43:11
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,638
swift
// // ContentViewController.swift // Example // // Created by Ivan Lisovyi on 21/11/2015. // Copyright © 2015 Ivan Lisovyi. All rights reserved. // import UIKit class ContentViewController: UIViewController { @IBOutlet weak var collectionView: UICollectionView? override func viewDidLoad() { super.viewDidLoad() setupNavigationBar() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } override func preferredStatusBarStyle() -> UIStatusBarStyle { return .LightContent } private func setupNavigationBar() { let label = UILabel(frame: CGRectMake(0, 0, 200, 30)) label.font = UIFont.systemFontOfSize(21) label.textColor = UIColor.darkGrayColor() label.textAlignment = .Center label.text = "Manga Genres" navigationItem.titleView = label } } extension ContentViewController: UICollectionViewDataSource { func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 9 } func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { let cellIdentifier = "cellIdentifier" let cell = collectionView.dequeueReusableCellWithReuseIdentifier(cellIdentifier, forIndexPath: indexPath) as! ContentCollectionViewCell cell.imageView?.image = imageAtIndex(indexPath.row) return cell } func imageAtIndex(index: Int) -> UIImage? { return UIImage(named: String(index)) } }
[ -1 ]
cceb9b77ffe693d7d48f72902e85e8befc431e50
a36f724bffa0fa55f2b19eab83eb0484185a1f72
/LogicPuzzlesSwift/Puzzles/TapARow/TapARowGameState.swift
b41b97f2baae4bc5412ae69a81a295bb821a5239
[]
no_license
zwvista/LogicPuzzlesSwift
329716bd81e5d17ea19a04be7c7d7749f1e9eca5
93701ce4c69c956e6d40a0674b307732dcb36236
refs/heads/master
2021-08-31T13:01:02.085170
2021-08-02T02:42:31
2021-08-02T02:42:31
67,041,881
5
1
null
null
null
null
UTF-8
Swift
false
false
6,487
swift
// // TapARowGameState.swift // LogicPuzzlesSwift // // Created by 趙偉 on 2016/09/19. // Copyright © 2016年 趙偉. All rights reserved. // import Foundation class TapARowGameState: GridGameState<TapARowGameMove> { var game: TapARowGame { get { getGame() as! TapARowGame } set { setGame(game: newValue) } } override var gameDocument: GameDocumentBase { TapARowDocument.sharedInstance } var objArray = [TapARowObject]() override func copy() -> TapARowGameState { let v = TapARowGameState(game: game, isCopy: true) return setup(v: v) } func setup(v: TapARowGameState) -> TapARowGameState { _ = super.setup(v: v) v.objArray = objArray return v } required init(game: TapARowGame, isCopy: Bool = false) { super.init(game: game) guard !isCopy else {return} objArray = Array<TapARowObject>(repeating: TapARowObject(), count: rows * cols) for p in game.pos2hint.keys { self[p] = .hint(state: .normal) } updateIsSolved() } subscript(p: Position) -> TapARowObject { get { self[p.row, p.col] } set { self[p.row, p.col] = newValue } } subscript(row: Int, col: Int) -> TapARowObject { get { objArray[row * cols + col] } set { objArray[row * cols + col] = newValue } } override func setObject(move: inout TapARowGameMove) -> Bool { let p = move.p let (o1, o2) = (self[p], move.obj) if case .hint = o1 { return false } guard String(describing: o1) != String(describing: o2) else { return false } self[p] = o2 updateIsSolved() return true } override func switchObject(move: inout TapARowGameMove) -> Bool { let markerOption = MarkerOptions(rawValue: self.markerOption) func f(o: TapARowObject) -> TapARowObject { switch o { case .empty: return markerOption == .markerFirst ? .marker : .wall case .wall: return markerOption == .markerLast ? .marker : .empty case .marker: return markerOption == .markerFirst ? .wall : .empty case .hint: return o } } move.obj = f(o: self[move.p]) return setObject(move: &move) } /* iOS Game: Logic Games/Puzzle Set 10/Tap-A-Row Summary Tap me a row, please Description 1. Plays with the same rules as Tapa with these variations: 2. The number also tells you the filled cell count for that row. 3. In other words, the sum of the digits in that row equals the number of that row. */ private func updateIsSolved() { isSolved = true // A number indicates how many of the surrounding tiles are filled. If a // tile has more than one number, it hints at multiple separated groups // of filled tiles. func computeHint(filled: [Int]) -> [Int] { if filled.isEmpty { return [0] } var hint = [Int]() for j in 0..<filled.count { if j == 0 || filled[j] - filled[j - 1] != 1 { hint.append(1) } else { hint[hint.count - 1] += 1 } } if filled.count > 1 && hint.count > 1 && filled.last! - filled.first! == 7 { hint[0] += hint.last!; hint.removeLast() } return hint.sorted() } func isCompatible(computedHint: [Int], givenHint: [Int]) -> Bool { if computedHint == givenHint { return true } if computedHint.count != givenHint.count { return false } let h1 = Set(computedHint) var h2 = Set(givenHint) h2.remove(-1) return h2.isSubset(of: h1) } for (p, arr2) in game.pos2hint { let filled = [Int](0..<8).filter { let p2 = p + TapARowGame.offset[$0] return isValid(p: p2) && String(describing: self[p2]) == String(describing: TapARowObject.wall) } let arr = computeHint(filled: filled) let s: HintState = arr == [0] ? .normal : isCompatible(computedHint: arr, givenHint: arr2) ? .complete : .error self[p] = .hint(state: s) if s != .complete { isSolved = false } } guard isSolved else {return} // Filled tiles can't cover an area of 2*2 or larger (just like Nurikabe). // Tiles with numbers can be considered 'empty'. for r in 0..<rows - 1 { for c in 0..<cols - 1 { let p = Position(r, c) if TapARowGame.offset2.testAll({os in let o = self[p + os] if case .wall = o { return true } else { return false } }) { isSolved = false; return } } } let g = Graph() var pos2node = [Position: Node]() for r in 0..<rows { for c in 0..<cols { let p = Position(r, c) if case .wall = self[p] { pos2node[p] = g.addNode(p.description) } } } for (p, node) in pos2node { for os in TapARowGame.offset { let p2 = p + os guard let node2 = pos2node[p2] else {continue} g.addEdge(node, neighbor: node2) } } // The goal is to fill some tiles forming a single orthogonally continuous // path. Just like Nurikabe. let nodesExplored = breadthFirstSearch(g, source: pos2node.first!.value) if nodesExplored.count != pos2node.count { isSolved = false; return } // 2. The number also tells you the filled cell count for that row. // 3. In other words, the sum of the digits in that row equals the number // of that row. for r in 0..<rows { var n1 = 0, n2 = 0 for c in 0..<cols { let p = Position(r, c) switch self[p] { case .wall: n1 += 1 case .hint: let arr = game.pos2hint[p]! n2 += arr.reduce(0, +) default: break } } if n2 != 0 && n1 != n2 { isSolved = false; return } } } }
[ -1 ]
814daf16fb270c451ef9f9d37c57b4693b780e24
92ae11d2f38a2d908276e4c983109baae576f65e
/CafeNIBMCustomer/Controller/CartViewController.swift
83c63f61ecd5d7ff6ecb94bf42ab97c41a56912c
[]
no_license
ImalkaM/CafeNIBMCustomer
12618c3175711d1d7f5e6f2236dc33be0e339ff8
bb048e8f2dad3ff077c2a6325da56725933b684b
refs/heads/main
2023-04-03T13:49:37.480125
2021-04-13T17:01:00
2021-04-13T17:01:00
356,761,703
0
0
null
null
null
null
UTF-8
Swift
false
false
4,269
swift
// // CartViewController.swift // CafeNIBMCustomer // // Created by Imalka Muthukumara on 2021-04-12. // import UIKit import Firebase import Loaf class CartViewController: UIViewController { @IBOutlet weak var cartTableView: UITableView! @IBOutlet weak var totalPriceLabel: UILabel! var ref: DatabaseReference! let sessionMGR = SessionManager() var cartItems:[CartItem] = [] var totalPrice:Double = 0.0 override func viewDidLoad() { super.viewDidLoad() self.cartItems = CartHandler.getCartItems() cartTableView.register(UINib(nibName: K.nibNameCartTable, bundle: nil), forCellReuseIdentifier: K.cartTableCell) totalPriceLabel.text = String(calTotal()) ref = Database.database().reference() } @IBAction func backButtonPressed(_ sender: UIButton) { dismiss(animated: true, completion: nil) } @IBAction func purchaseButtontapped(_ sender: UIButton) { saveOrder() } } extension CartViewController:UITableViewDelegate{ } extension CartViewController:UITableViewDataSource{ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { cartItems.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: K.cartTableCell, for: indexPath) as! CartTableViewCell cell.name.text = cartItems[indexPath.row].itemName cell.foodImage.kf.setImage(with: URL(string: cartItems[indexPath.row].itemImgRes)) cell.qtyLabel.text = String(cartItems[indexPath.row].itemCount) cell.price.text = "RS.\(String(cartItems[indexPath.row].itemTotal))" cell.indexPath = indexPath cell.delegate = self return cell } } extension CartViewController: CartItemDelegate { func plusButtonTapped(at indexPath: IndexPath) { self.cartItems[indexPath.row].itemCount += 1 totalPrice = calTotal() totalPriceLabel.text = String(totalPrice) self.cartTableView.reloadData() } func minusButtontapped(at indexPath: IndexPath) { self.cartItems[indexPath.row].itemCount -= 1 totalPrice = calTotal() totalPriceLabel.text = String(totalPrice) if cartItems[indexPath.row].itemCount == 0{ cartItems.remove(at: indexPath.row) cartTableView.deleteRows(at: [indexPath], with: .fade) //orderDetails.remove(at: indexPath.row) } self.cartTableView.reloadData() } func calTotal() ->Double{ var tempTotal:Double = 0.0 for items in cartItems{ tempTotal += items.itemTotal } return tempTotal } } extension CartViewController{ func saveOrder(){ var orderData: [String: Any] = [:] var foodItemInfo:[String:Any] = [:] for index in 0..<cartItems.count{ foodItemInfo.removeAll() foodItemInfo["foodName"] = cartItems[index].itemName foodItemInfo["qunatity"] = cartItems[index].itemCount foodItemInfo["foodPrice"] = cartItems[index].itemTotal orderData["\(index)"] = foodItemInfo } var order:[String:Any] = [:] order["status"] = "Pending" order["orderItems"] = orderData self.ref.child("orders").child(sessionMGR.getUserData().email .replacingOccurrences(of: "@", with: "_") .replacingOccurrences(of: ".", with: "_") ).childByAutoId() .setValue(order){ (error, ref) in if let err = error{ Loaf("\(err.localizedDescription)", state: .error, sender: self).show() } else{ Loaf("Order added successfully", state: .success, sender: self).show() CartHandler.clearCart() self.cartTableView.reloadData() self.dismiss(animated: true, completion: nil) } } } }
[ -1 ]
124089f6a7ad61ac94f6d70cd2303bb3d25d5b8a
8411af94608d51dadff8cbc423b9c848470a1154
/iosDemo/TemplateProject/TemplateProject/SwiftBase/Base/Extension/UIKit/UITextField+Extensions.swift
61b3fea7c2f1c65d7f36de7b7fb6a94c6bba5b1d
[]
no_license
zhouzhicun/iosDemoProject
c86c482485ba0da680104eb63d4736688d5fa0ca
54c93a53a0534d606fc40f8d7903511f48d871cc
refs/heads/main
2023-05-03T23:17:39.853357
2021-05-09T12:01:02
2021-05-09T12:01:02
365,732,278
1
0
null
null
null
null
UTF-8
Swift
false
false
1,426
swift
// // UITextField+Extensions.swift // demoProject // // Created by zzc on 2021/4/25. // import Foundation import UIKit extension UITextField { //设置text func setTextItem(_ textItem: TextItem) { self.text = textItem.text self.font = textItem.font self.textColor = textItem.color } //设置placeHolder func setPlaceHolder(_ textItem: TextItem) { if let text = textItem.text { if let font = textItem.font, let color = textItem.color { let style = self.defaultTextAttributes[NSAttributedString.Key.paragraphStyle] as? NSParagraphStyle let resultStyle = style?.mutableCopy() as! NSMutableParagraphStyle resultStyle.minimumLineHeight = self.font!.lineHeight - (self.font!.lineHeight - font.lineHeight) / 2.0 let attrString = NSMutableAttributedString.init(string: text) let attributes = [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: color, NSAttributedString.Key.paragraphStyle: resultStyle] attrString.addAttributes(attributes, range: NSRange(location: 0, length: text.count)) attributedPlaceholder = attrString } else { placeholder = text } } } }
[ -1 ]
6a84fbd4aa3bb14a6a14c2c2f5539b10d814b96c
af65701af91365f65b72311b61e9faece6a127f4
/car3/Styling/Constants.swift
19c53b5adf311db00d2c78fa6631003eb77e7596
[]
no_license
Aaronsquires/car3
41e968815ab6cb2b2e91eeb7a4f8b6214f2c6288
cf1d8f1f87eb12d497a963fa7f7b845a6cdc12c7
refs/heads/main
2023-04-13T22:57:14.747251
2021-04-21T16:32:05
2021-04-21T16:32:05
359,614,279
0
0
null
null
null
null
UTF-8
Swift
false
false
205
swift
import Foundation struct Constants { struct Storyboard { static let homeViewController = "HomeVC" static let WelcomeViewController = "baseVC" } }
[ -1 ]
d23a767144a8668b27443214aca6b2fd645399cf
3134d76bf342e684005c019051177fe6f7abff65
/iXper/Services/DateTimeService.swift
c0ff30873c53b42f9cc520498a9eabfbcae8852a
[]
no_license
Helder-Pinto/IXper
e185fd6afd781ac278cc6deac15c0ddcbcc4f783
b09585079ad039263e2d6554e8b3c375124795b9
refs/heads/master
2022-02-11T06:15:26.053521
2019-08-14T07:02:30
2019-08-14T07:02:30
198,088,578
0
0
null
null
null
null
UTF-8
Swift
false
false
2,333
swift
// // CalendarModel.swift // iXper // // Created by Afonso Pinto, Helder Manuel on 06/08/2019. // Copyright © 2019 Helder Pinto. All rights reserved. // import Foundation import UIKit import RxSwift struct DateTimeService { let date = Date() let calendar = Calendar.current let dateFormatter = DateFormatter() var month: String { let monthUnit = calendar.component(.month, from: date) return calendar.monthSymbols[monthUnit-1]} var year: Int { return calendar.component(.year, from: date)} var day: Int { return calendar.component(.day, from: date)} var weekDay: String { let weekdayUnit = calendar.component(.weekday, from: date) return calendar.weekdaySymbols[weekdayUnit-1] } var monthDays: Int{ if let interval = calendar.dateInterval(of: .month, for: date) { return calendar.dateComponents([.day], from: interval.start, to: interval.end).day ?? 0} return 0} var time: String { dateFormatter.dateFormat = "HH:mm" return dateFormatter.string(from: Date())} func timeDifference(start: String, end: String) -> String { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "HH:mm" if let timeThen = dateFormatter.date(from: start), let timeNow = dateFormatter.date(from: end) { let calendar = Calendar.current let dateComponents = calendar.dateComponents([.hour, .minute], from: timeThen, to: timeNow) let date = calendar.date(from: dateComponents)! return dateFormatter.string(from: date) } return "" } // Number of days in a month func monthDays(_ month: String) -> Int { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "MM" guard let date = dateFormatter.date(from: month) else {return calendar.component(.month, from: Date())} if let interval = calendar.dateInterval(of: .month, for: date) { return calendar.dateComponents([.day], from: interval.start, to: interval.end).day ?? 0} return 0} }
[ -1 ]
3fe13ce604d7c9302f5480040b108b76d4c64b31
133372b0a2708dd98df5efc3fceb5b41e68969f6
/challenge8.swift
432b258743f5887568a0c8dffaf2d326b8778b0d
[]
no_license
hayagreevvaradarajan/SwiftHomeworkChallenges
c8fd96ad046f766c9def728bf211ddd54a093b84
228375b6270d4fba2c25b0d0cc8fe37755ee8622
refs/heads/master
2023-05-08T10:53:29.597495
2021-06-04T13:01:34
2021-06-04T13:01:34
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,064
swift
/* Question: Create a function called walk which will take two parameters and will return a String. The first parameter should be named direction and will be of type String, the argument label should be set as _. The second parameter should be named steps and will be of type Int, the argument label should be set as _. Inside the function return a string on which direction you have walked and how many steps did you take. Don’t forget to type cast steps The format of the return statement should be: return "You have walked " + String(steps) + " steps to the " + direction Then, create a String called resultStr and assign to it the function and what data you want to display. Finally, print the contents of resultStr. As an example let’s assume that direction is “North” and steps is 5. The resulting output should be: You have walked 5 steps to the North */ func walk(_ direction:String, _ steps:Int) -> String{ return "You have walked " + String(steps) + " steps to the " + direction } var resultStr:String = walk("East", 10) print(resultStr)
[ -1 ]
3305bc80a8776aeec14e161e03a9c1bc7d8d6201
264d574f6a56c138d29af174ee0f40566eb8646e
/Lulu_UsersList/Lulu_UsersList/AppDelegate.swift
420e88f68947041854d920eaf76903fb2e530f91
[]
no_license
skv6631/UsersList
cc2cf6618061fafce3475d7d30477a47031424e0
4600993fd9e0d3d9bb53855a142c60e372979792
refs/heads/master
2023-04-18T21:38:47.003830
2021-04-28T10:28:22
2021-04-28T10:28:22
362,344,151
0
0
null
null
null
null
UTF-8
Swift
false
false
1,350
swift
// // AppDelegate.swift // Lulu_UsersList // // Created by E5000416 on 28/04/21. // import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 213048, 385081, 376889, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 418007, 418010, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 385280, 336128, 262404, 180490, 164106, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 393538, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 246123, 262507, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 262566, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 410128, 393747, 254490, 188958, 385570, 33316, 197159, 377383, 352821, 197177, 418363, 188987, 369223, 385609, 385616, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 328378, 164538, 328386, 352968, 344776, 418507, 352971, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 344835, 336643, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 361288, 336711, 328522, 336714, 426841, 197468, 254812, 361309, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 66782, 222437, 328941, 386285, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181649, 181654, 230809, 181673, 181681, 337329, 181684, 361917, 181696, 337349, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 419410, 345701, 394853, 222830, 370297, 403070, 353919, 403075, 198280, 345736, 403091, 345749, 419483, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 419517, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 141051, 337668, 362247, 395021, 362255, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 354150, 354156, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329885, 411805, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 338381, 330189, 338386, 256472, 338403, 338409, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 355028, 273108, 264918, 183005, 256734, 436962, 338660, 338664, 264941, 363251, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 347176, 158761, 396328, 199728, 330800, 396336, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 412764, 339036, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265432, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 347437, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 249214, 175486, 175489, 249218, 249227, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 339428, 339434, 249328, 69113, 372228, 208398, 380432, 175635, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 372353, 224897, 216707, 421508, 126596, 224904, 224909, 159374, 11918, 224913, 126610, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 257704, 224936, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 257787, 225020, 257790, 339710, 225025, 257794, 257801, 339721, 257804, 225038, 257807, 225043, 167700, 372499, 225048, 257819, 225053, 184094, 225058, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 225148, 257916, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 266297, 421960, 356439, 430180, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 225493, 266453, 225496, 225499, 225502, 225505, 356578, 217318, 225510, 225514, 225518, 372976, 381176, 397571, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 332152, 389502, 250238, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 160234, 127471, 340472, 381436, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324164, 356934, 348743, 381512, 324170, 324173, 324176, 389723, 332380, 381545, 340627, 373398, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 348978, 152370, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 357211, 430939, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 119674, 324475, 340858, 340861, 324478, 430972, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 381946, 349180, 439294, 431106, 209943, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 349308, 210044, 160895, 152703, 349311, 210052, 349319, 210055, 218247, 210067, 210071, 210077, 210080, 251044, 210084, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 218360, 251128, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 210260, 365911, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 251271, 136590, 374160, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 415216, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 153227, 333498, 210631, 333511, 259788, 358099, 153302, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 210719, 358191, 366387, 210739, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 341851, 350045, 399199, 259938, 399206, 399215, 268143, 358255, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 333774, 358371, 350189, 350193, 350202, 333818, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 350467, 325891, 350475, 375053, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 325919, 350498, 194852, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 268701, 416157, 342430, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 391690, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 358961, 383536, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 375574, 162591, 326441, 383793, 326451, 326454, 375612, 260924, 244540, 326460, 326467, 244551, 326473, 326477, 416597, 326485, 326490, 342874, 326502, 433000, 375656, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 384181, 367800, 351423, 384191, 384198, 326855, 244937, 253130, 343244, 146642, 359649, 343270, 351466, 351479, 384249, 343306, 261389, 384269, 359694, 253200, 261393, 384275, 245020, 245029, 171302, 351534, 376110, 245040, 384314, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 179802, 155239, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 425649, 155322, 425662, 155327, 155351, 155354, 212699, 155363, 245475, 155371, 245483, 409335, 155393, 155403, 155422, 360223, 155438, 155442, 155447, 417595, 155461, 360261, 376663, 155482, 261981, 425822, 376671, 155487, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 147317, 262005, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 384977, 393169, 155611, 253923, 155619, 155621, 253926, 327654, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
e0c4b7dd5521d7b27c1cb195bc2f77eaa248a775
7d3ad95333f6c8284cae33dd2af710ea093d86b1
/GetItDone/View/WelcomeScreen.swift
56a4eba8b3476849695882d53d9fe4e11168b88e
[]
no_license
khalilpan/iOS_GetItDone
90d3392025e2a53093d099eaf50e5a20333abad6
eabc601ca8cd54a5e07c8d4152c00d01f819acf8
refs/heads/main
2023-08-27T08:45:55.313670
2021-11-07T12:44:10
2021-11-07T12:44:10
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,387
swift
// // WelcomeScreen.swift // GetItDone // // Created by khalil.panahi on 05/11/21. // import UIKit class WelcomeScreen: UIView { var buttonPressAction: (() -> Void)? lazy var backGround: UIView = { let view = BackgroundGradient() view.backgroundColor = .cyan view.layer.cornerRadius = 24 view.translatesAutoresizingMaskIntoConstraints = false return view }() lazy var titleLabel: UILabel = { let view = CustomLabel(title: "GET IT DONE.", size: 24, textAlignment: .center) view.translatesAutoresizingMaskIntoConstraints = false return view }() lazy var descriptionLabel: UILabel = { let view = CustomLabel(title: "Welcome, \nGET IT DONE is a TO DO list app.", size: 20, textAlignment: .center) view.numberOfLines = 2 view.translatesAutoresizingMaskIntoConstraints = false return view }() lazy var copyrightLabel: UILabel = { let view = CustomLabel(title: "© Copyright | KhalilPan", color: .black, size: 10, textAlignment: .center) view.translatesAutoresizingMaskIntoConstraints = false return view }() lazy var nextButton: UIButton = { let view = CustomButton(title: "START WINNING", type: .roundedText, cornerRadius: 25) view.addTarget(self, action: #selector(self.buttonHandler), for: .touchUpInside) return view }() override init(frame: CGRect = .zero) { super.init(frame: frame) backgroundColor = .white setupView() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } @objc func buttonHandler() { // to add animation when button pressed UIView.animate(withDuration: 0.1, delay: 0, usingSpringWithDamping: 0.9, initialSpringVelocity: 1, options: .curveEaseIn) { // will run when action starts(will decrease button size) self.nextButton.transform = CGAffineTransform(scaleX: 0.92, y: 0.92) } completion: { _ in UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 0.9, initialSpringVelocity: 1, options: .curveEaseIn) { // will run when action got complete(will change button size back) self.nextButton.transform = CGAffineTransform(scaleX: 1, y: 1) } self.buttonPressAction?() } } } //MARK: - CodeView extension WelcomeScreen: CodeView { func buildView() { addSubview(backGround) addSubview(titleLabel) addSubview(descriptionLabel) addSubview(copyrightLabel) addSubview(nextButton) } func setupConstraints() { var constraints = [NSLayoutConstraint]() constraints.append(backGround.leadingAnchor.constraint(equalTo: safeAreaLayoutGuide.leadingAnchor, constant: 20)) constraints.append(backGround.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor, constant: 20)) constraints.append(backGround.trailingAnchor.constraint(equalTo: safeAreaLayoutGuide.trailingAnchor, constant: -20)) constraints.append(backGround.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor, constant: -20)) constraints.append(titleLabel.centerXAnchor.constraint(equalTo: backGround.centerXAnchor)) constraints.append(titleLabel.topAnchor.constraint(equalTo: backGround.topAnchor, constant: 20)) constraints.append(descriptionLabel.centerXAnchor.constraint(equalTo: backGround.centerXAnchor)) constraints.append(descriptionLabel.centerYAnchor.constraint(equalTo: backGround.centerYAnchor)) constraints.append(copyrightLabel.topAnchor.constraint(equalTo: backGround.bottomAnchor, constant: 5)) constraints.append(copyrightLabel.centerXAnchor.constraint(equalTo: backGround.centerXAnchor)) constraints.append(nextButton.bottomAnchor.constraint(equalTo: backGround.bottomAnchor, constant: -20)) constraints.append(nextButton.centerXAnchor.constraint(equalTo: backGround.centerXAnchor)) constraints.append(nextButton.widthAnchor.constraint(equalTo: backGround.widthAnchor, multiplier: 0.6)) constraints.append(nextButton.heightAnchor.constraint(equalToConstant: 50)) NSLayoutConstraint.activate(constraints) } func setupAddicionalConfiguration() { } }
[ -1 ]
bf84bde2b26f07f49f70f5c73d7f11c998b0d6a9
a093716b043a8238b9ca85b56e743fb056ab06a7
/Assassin Game/LoginViewController.swift
bedb290720724b33a124ccdc4aa6e010b17c1993
[]
no_license
AriaCundick/Assassin-Game
d8e95ea65168165fc3f70cfb46ccec336cfefb64
741a30043f9d9e00c95e1775ebcee11fc845511f
refs/heads/master
2021-01-22T17:58:09.023368
2015-06-17T03:18:13
2015-06-17T03:18:13
37,244,364
0
0
null
null
null
null
UTF-8
Swift
false
false
1,249
swift
// // LoginViewController.swift // Assassin Game // // Created by Aria Cundick on 6/16/15. // Copyright (c) 2015 Code on the Cawb. All rights reserved. // import UIKit class LoginViewController: UIViewController { //MARK: - IBOutlet vars @IBOutlet weak var txtUsername: UITextField! @IBOutlet weak var txtPassword: UITextField! 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: - IBAction functions @IBAction func btnLogin_Clicked(sender: AnyObject) { //add code to validate credentials later //transition to main screen let VC = self.storyboard!.instantiateViewControllerWithIdentifier("Main") as! UINavigationController VC.modalTransitionStyle = .CrossDissolve self.presentViewController(VC, animated: true, completion: nil) //self.navigationController!.pushViewController(VC, animated: true) //self.navigationController!.performSegueWithIdentifier("Main", sender: sender) } }
[ -1 ]
fd323c3be988790b4cb0872f9a0a31abc18b4e4e
0a8208aa9e24626e6c2161fa2dc8f23b2dad77c5
/Remote/AppDelegate.swift
8163b2b64d402b2237980f4c55508401887096a2
[]
no_license
sygops/remote
a0cc0ebf82c1818c6de7da77c49a50fe40cf8fff
5a4ba451fe9e954dda44508dc1d0ba1fda287de8
refs/heads/master
2020-04-27T00:06:53.723664
2016-06-06T04:56:03
2016-06-06T04:56:03
173,924,426
1
0
null
2019-03-05T10:20:52
2019-03-05T10:20:52
null
UTF-8
Swift
false
false
1,679
swift
// // AppDelegate.swift // Remote // // Created by Michaël Villar on 7/25/15. // Copyright (c) 2015 michaelvillar. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window:UIWindow? var viewController:ViewController! var launchedShortcutItem: UIApplicationShortcutItem? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { self.viewController = ViewController() self.window = UIWindow() self.window?.makeKeyAndVisible() self.window?.frame = UIScreen.mainScreen().bounds self.window?.rootViewController = self.viewController if let shortcutItem = launchOptions?[UIApplicationLaunchOptionsShortcutItemKey] as? UIApplicationShortcutItem { launchedShortcutItem = shortcutItem } return true } func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -> Void) { switch shortcutItem.type { case "com.michaelvillar.remote.power_on": self.viewController.sendCommand("power_on") break case "com.michaelvillar.remote.power_off": self.viewController.sendCommand("power_off") break case "com.michaelvillar.remote.input_wii": self.viewController.sendCommand("input_wii") break case "com.michaelvillar.remote.input_apple": self.viewController.sendCommand("input_apple") break default: break } } func applicationDidBecomeActive(application: UIApplication) { self.viewController.reconnect() } }
[ -1 ]
cd0865f6d611b28bc5b1e826b9f2438130c70264
f6da15402c572d11894fb59cefe779501146a5a7
/App/Self App/Models/Final - Self - Models/Community.swift
aca401fd40c1fd51d63301ae4f45445fca771d84
[]
no_license
jamiedevivoo/Self
08042fadd2ee74406c6926e3c9064e74e2b60afe
405ede9b837881a4e4a51f8caccb8927d6a4f30e
refs/heads/master
2023-01-28T06:09:46.705093
2020-02-07T16:52:04
2020-02-07T16:52:04
169,979,136
1
2
null
2023-01-09T11:36:57
2019-02-10T13:06:23
Swift
UTF-8
Swift
false
false
22
swift
struct Community { }
[ -1 ]
72bff7abb3c365de1aeb76832050a3f519bf9db5
07875f88ab95ec2bd92eb0ed7f98417e979da69a
/weather/Classes/BusinessLogicLayer/Services/ConcreteServices/WeatherService/WeatherService.swift
19d63cd77aceb5260b8c9536493fd5415d88026b
[ "MIT" ]
permissive
ipBill/Swift-Viper-Weather-App
fc94cc80b809b74bee36d067cf4eb1a6071ed018
d302cc230b5937aabf1c01622061246d8ca9cc24
refs/heads/master
2020-03-15T03:59:17.876829
2018-04-08T14:51:11
2018-04-08T14:51:11
null
0
0
null
null
null
null
UTF-8
Swift
false
false
571
swift
// // Created by Юрий Трыков on 30.09.17. // Copyright (c) 2017 trykov. All rights reserved. // import Foundation public protocol WeatherService { func filterCities(_ searchString: String, _ cities:[CityPlainObject]) -> [CityPlainObject] } class WeatherServiceImpl: WeatherService { func filterCities(_ searchString: String, _ cities: [CityPlainObject]) -> [CityPlainObject] { return cities.filter({ (city: CityPlainObject) -> Bool in return city.name.lowercased().range(of: searchString.lowercased()) != nil }) } }
[ -1 ]
d2c6d318e4299cafc81a5ef31f3cc9594726b8f7
c6a0a64ea56a1b0bb8b3fe0e0785c12bb0156fe3
/Carbon Footprint.playground/Sources/IsometricView.swift
148e05cef649da4570934dfda5b342ce85f0a1fe
[]
no_license
irangareddy/Carbon-Footprint
061e3eb68639f9f94cd660a5b1525c71d7992274
85c1cbdedf9d334931b1f1299ee34f6bc528bebe
refs/heads/main
2023-05-13T18:48:12.496372
2021-06-03T16:19:03
2021-06-03T16:19:03
373,566,398
0
0
null
2021-06-03T16:19:04
2021-06-03T16:03:32
null
UTF-8
Swift
false
false
2,164
swift
import Foundation import SwiftUI import PlaygroundSupport public struct IColors { static let background: Color = Color(#colorLiteral(red: 0.9490196078, green: 0.9647058824, blue: 1, alpha: 1)) static let cardColor: Color = Color(#colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)) static let shadowColor: Color = Color(#colorLiteral(red: 0.2156862745, green: 0.3294117647, blue: 0.6666666667, alpha: 1)) } public struct IsometricView: View { @State private var bouncing = false public init() {} public var body: some View { HStack { Spacer() VStack { Spacer() Group { Group { ZStack(alignment: .topLeading) { RoundedRectangle(cornerRadius: 40) .foregroundColor(IColors.shadowColor.opacity(0.2)) .frame(width: 300, height: 300, alignment: .center) RoundedRectangle(cornerRadius: 40) .foregroundColor(IColors.cardColor) .frame(width: 280, height: 280, alignment: .center) .offset(x: -10.0, y: -10.0) .blur(radius: 20.0) } } .rotationEffect(Angle.init(degrees: 45)) .scaleEffect(y: 0.5) } .shadow(color: IColors.shadowColor.opacity(0.1), radius: 15, x: 0, y: 100) .offset(y: bouncing ? 15 : -15) .animation( Animation .easeInOut(duration: 2.0) .repeatForever(autoreverses: true) ) Spacer() } Spacer() } .background(IColors.background.edgesIgnoringSafeArea(.all)) .onAppear { self.bouncing.toggle() } } }
[ -1 ]
efb6f96890d1951dbc9134917fd54a01d778ddfc
a27eb9e9742b841b83595aff9d0bcdcb2ae0ab6b
/Sources/watchOS/UI/InterfaceControllerTools.swift
3d0af897e32e0f271b6ba2e6d350b0b3c37750a2
[ "MIT" ]
permissive
appstud/iOSTools
4fb7875215c56b5854487e754d964491cb1d122e
19cf3f484dffb2344572d615f7179d3134f07729
refs/heads/master
2020-03-18T12:06:26.018636
2018-02-26T20:26:13
2018-02-26T20:26:13
134,708,925
0
0
MIT
2018-05-24T11:58:21
2018-05-24T11:58:20
null
UTF-8
Swift
false
false
1,131
swift
// // MultiProgressControllerTools.swift // watchTest WatchKit Extension // // Created by Vladas Zakrevskis on 11/29/17. // Copyright © 2017 Vladas Zakrevskis. All rights reserved. // #if os(watchOS) import WatchKit public extension WKInterfaceController { class var className: String { return String(describing: self) } func push<T: WKInterfaceController>(_ controller: T.Type) { pushController(withName: controller.className, context: nil) } func present<T: WKInterfaceController>(_ controller: T.Type) { presentController(withName: controller.className, context: nil) } func reload<T: WKInterfaceController>(_ controller: T.Type) { WKInterfaceController.reloadRootControllers(withNamesAndContexts: [(name: controller.className, context: controller.className as AnyObject)]) } func reload<T: WKInterfaceController>(_ controllers: [T.Type]) { WKInterfaceController.reloadRootControllers(withNamesAndContexts: controllers.map { (name: $0.className, context: $0.className as AnyObject) }) } } #endif
[ -1 ]
e4181254dba6b24c9b64d0fa5169202fbd3350e9
7fec8b1206ede825e79fc9f2dd328a2bb3d7aba0
/Gerador numero/Gerador numero/SceneDelegate.swift
029fbc053cca7a7cf0f815ead43de20efc9ef9fc
[]
no_license
cesaralmeida93/SWIFT-UDEMY
fc343dff74a3b5ca488dc5e5a086454da3192971
577c55fc6a258aa64fdcd7c58db8b1e40143f881
refs/heads/master
2021-04-11T02:12:29.844918
2020-11-01T23:27:38
2020-11-01T23:27:38
248,985,180
0
0
null
2020-03-31T18:12:18
2020-03-21T13:47:39
Swift
UTF-8
Swift
false
false
2,361
swift
// // SceneDelegate.swift // Gerador numero // // Created by GSW Mobile Team on 22/03/20. // Copyright © 2020 GSW Mobile Team. 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, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 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, 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, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 377867, 328715, 361490, 386070, 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, 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, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 247639, 337751, 370520, 313181, 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, 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, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 272787, 354728, 338353, 338363, 338382, 248279, 256474, 182755, 338404, 338411, 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, 338661, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 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, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 339199, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 331089, 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, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 175637, 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, 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, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 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, 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, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 250239, 332162, 348548, 356741, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 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, 381546, 119432, 340628, 184983, 373399, 340639, 258723, 332455, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 430940, 357212, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 119675, 340859, 324476, 430973, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 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, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 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, 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, 333838, 350225, 350232, 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, 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, 334312, 104940, 375279, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 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, 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, 359471, 375868, 384099, 384102, 384108, 367724, 326764, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 384152, 384158, 384161, 351399, 384169, 367795, 384182, 384189, 384192, 351424, 343232, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 384209, 146644, 351450, 384225, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 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, 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, 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 ]
de99c04bcc371bbf290cd47c7a9951a09269e204
0819053a43fddf6804ed2f2fb9a3af8d9505e941
/Landmarks/Landmarks/LandmarkDetail.swift
c3f90580e1040550fbd882c682572a82fd86e2ff
[]
no_license
eotrokov/swift_learn
142e92dd3d9d49ee8d3c5e351187e2937f0410e3
244d8ae1602407997f65e35a5eb5d92d6d8cb501
refs/heads/master
2020-09-09T01:32:32.873849
2019-12-02T15:57:31
2019-12-02T15:57:31
221,303,070
0
0
null
null
null
null
UTF-8
Swift
false
false
2,748
swift
// // LandmarkDetail.swift // Landmarks // // Created by Евгений Отроков on 01.12.2019. // Copyright © 2019 Евгений Отроков. All rights reserved. // import SwiftUI struct LandmarkDetail: View { @EnvironmentObject var userData: UserData var landmark: Landmark var landmarkIndex: Int { userData.landmarks.firstIndex(where: { $0.id == landmark.id })! } var body: some View { VStack { MapView(coordinate: landmark.locationCoordinate) .frame(height: 300) CircleImage(image: landmark.image) .offset(y: -130) .padding(.bottom, -130) VStack(alignment: .leading) { HStack { Text(landmark.name) .font(.title) Button(action: { self.userData.landmarks[self.landmarkIndex].isFavorite.toggle() }) { if self.userData.landmarks[self.landmarkIndex].isFavorite { Image(systemName: "star.fill") .foregroundColor(Color.yellow) } else { Image(systemName: "star") .foregroundColor(Color.gray) } } } HStack(alignment: .top) { Text(landmark.park) .font(.subheadline) Spacer() Text(landmark.state) .font(.subheadline) } } .padding() Spacer() }.navigationBarTitle(Text(landmark.name), displayMode: .inline) } } struct LandmarkDetail_Previews: PreviewProvider { static var previews: some View { LandmarkDetail(landmark: landmarkData[0]) .environmentObject(UserData()) } }
[ 286807 ]
ceb48ad74b0297e14edefcab6d7ef0e6ca99f04e
7486df44d57448f529bafc247348669ed3f1afaf
/AccountingApp/Xibs/ProfileCell.swift
4bc09dc5019434bd53cef0fbe5743a5ccaba4732
[]
no_license
jeewanct/AccountingApp
a6aa10c6889b98ef66d947c5e09c014fdee384f9
40a32b4c2d2eda95ab303d7bc8e440629dd9187d
refs/heads/master
2020-04-14T17:36:00.182204
2019-03-01T18:37:25
2019-03-01T18:37:25
163,986,225
0
0
null
null
null
null
UTF-8
Swift
false
false
732
swift
// // ProfileCell.swift // AccountingApp // // Created by JEEVAN TIWARI on 20/12/18. // Copyright © 2018 AccountingApp. All rights reserved. // import UIKit class ProfileCell: UITableViewCell{ @IBOutlet weak var optionImageView: UIImageView! @IBOutlet weak var optionLabel: UILabel! @IBOutlet weak var activityIndicator: UIActivityIndicatorView! override func awakeFromNib() { super.awakeFromNib() } func hideActivityIndicator(){ self.activityIndicator.stopAnimating() self.activityIndicator.isHidden = true } func showActivityIndicator(){ self.activityIndicator.isHidden = false self.activityIndicator.startAnimating() } }
[ -1 ]
c7016a25f881adfafddab34887efadb2c6e4e5c6
359dc6fb7465d607b8bd0f9d35b563fedfd71ba9
/sdk/CSViewController.swift
299ec48a1537af88ab78dd6fa9b77934906b1f47
[]
no_license
jessicalostinspace/tune-species-hack
01125670e5a134e6d1b174b712cbb2fc6ecd9d84
ebae7fea1cd7ae75571b7cdc63be44ee28178fa1
refs/heads/master
2021-01-17T13:01:31.812134
2016-06-15T20:05:45
2016-06-15T20:05:45
58,838,313
1
0
null
null
null
null
UTF-8
Swift
false
false
10,698
swift
import Foundation import GLKit import OpenGLES protocol CSStereoRendererDelegate { func setupRendererWithView(view:GLKView) func shutdownRendererWithView(view:GLKView) func rendererDidChangeSize(size:CGSize) func prepareNewFrameWithHeadViewMatrix(headViewMatrix:GLKMatrix4) func drawEyeWithEye(eye:EyeMatrix) func finishFrameWithViewportRect(viewport:CGRect) } class EyeMatrix { var eye:Eye = Eye(type: EyeType.Monocular) var eyeType:EyeType = EyeType.Monocular init() { } init(eye:Eye) { self.eye = eye eyeType = eye.eyeType } func eyeViewMatrix() -> GLKMatrix4 { return eye.eyeView } func perspectiveMatrixWithZNear(zNear:Float, zFar:Float) -> GLKMatrix4 { return eye.calculatePerspective(zNear,zFar) } } class CSViewController : GLKViewController { var rendererDelegate:CSStereoRendererDelegate? var distortionRenderer:DistortionRenderer = DistortionRenderer() var headTracker:HeadTracker = HeadTracker() var headTransform:HeadTransform = HeadTransform() var monocularEye:Eye = Eye(type: EyeType.Monocular) var leftEye:Eye = Eye(type: EyeType.Left) var rightEye:Eye = Eye(type: EyeType.Right) var leftEyeMatrix: EyeMatrix = EyeMatrix() var rightEyeMatrix: EyeMatrix = EyeMatrix() var vrModeEnabled: Bool = true var distortionCorrectionEnabled: Bool = true var vignetteEnabled: Bool = false var chromaticAberrationCorrectionEnabled: Bool = false var restoreGLStateEnabled: Bool = false var neckModelEnabled: Bool = false var glContext:EAGLContext? var projectionChanged:Bool = true var headMountedDisplay:HeadMountedDisplay = HeadMountedDisplay(screen: UIScreen.mainScreen()) var glLock:NSRecursiveLock = NSRecursiveLock() var distortionRendererReady:Bool = false override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) setup() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setup() } func setup() { UIApplication.sharedApplication().idleTimerDisabled = true headTracker.startTracking(UIApplication.sharedApplication().statusBarOrientation) } override func viewDidLoad() { super.viewDidLoad() self.glContext = EAGLContext(API: .OpenGLES2) if self.glContext == nil { print("Failed to create ES context") } let view = self.view as! GLKView view.context = self.glContext! view.drawableDepthFormat = .Format24 rendererDelegate?.setupRendererWithView(view) GLCheckForError() } override func glkView(view: GLKView, drawInRect rect: CGRect) { if self.paused || !headTracker.isReady() { return } if !distortionRendererReady && distortionCorrectionEnabled { return } GLCheckForError() let lockAcquired = glLock.tryLock() if !lockAcquired { return } if distortionCorrectionEnabled { distortionRenderer.beforeDrawFrame() drawFrameWithHeadTransform(headTransform, leftEye, rightEye) view.bindDrawable() distortionRenderer.afterDrawFrame() } else { self.drawFrameWithHeadTransform(headTransform, leftEye, rightEye) } self.finishFrameWithViewPort(monocularEye.viewport) GLCheckForError() glLock.unlock() } func update() { if self.paused || !headTracker.isReady() { return } self.calculateFrameParametersWithHeadTransform(headTransform, leftEye, rightEye, monocularEye) } func drawFrameWithHeadTransform(headTransform:HeadTransform, _ leftEye:Eye, _ rightEye:Eye) { rendererDelegate!.prepareNewFrameWithHeadViewMatrix(headTransform.headView) GLCheckForError() glEnable(GLenum(GL_SCISSOR_TEST)) leftEye.viewport.setGLViewport() leftEye.viewport.setGLScissor() leftEyeMatrix.eye = leftEye self.rendererDelegate!.drawEyeWithEye(leftEyeMatrix) rightEye.viewport.setGLViewport() rightEye.viewport.setGLScissor() rightEyeMatrix.eye = rightEye self.rendererDelegate!.drawEyeWithEye(rightEyeMatrix) } func calculateFrameParametersWithHeadTransform(headTransform:HeadTransform, _ leftEye:Eye, _ rightEye:Eye, _ monocularEye:Eye) { let deviceParams = headMountedDisplay.cardboardParams let halfInterLensDistance = deviceParams.interLensDistance * 0.5 self.headTransform.headView = headTracker.getLastHeadView() let leftEyeTranslate = GLKMatrix4MakeTranslation(halfInterLensDistance, 0, 0) let rightEyeTranslate = GLKMatrix4MakeTranslation(-halfInterLensDistance, 0, 0) self.leftEye.eyeView = GLKMatrix4Multiply( leftEyeTranslate, headTransform.headView) self.rightEye.eyeView = GLKMatrix4Multiply( rightEyeTranslate, headTransform.headView) if projectionChanged { let screenParams = headMountedDisplay.screenParams monocularEye.viewport.setViewport(0, 0, screenParams.width(), screenParams.height()) // todo: monocular mode if distortionCorrectionEnabled { self.updateEyeFovs() distortionRenderer.fovDidChange(headMountedDisplay, leftEye.fov, rightEye.fov, virtualEyeToScreenDistance()) distortionRendererReady = true } else { updateUndistortedFOVAndViewport() } leftEye.projectionChanged = true rightEye.projectionChanged = true monocularEye.projectionChanged = true projectionChanged = false } if distortionCorrectionEnabled && distortionRenderer.viewportsChanged { distortionRenderer.updateViewports(&leftEye.viewport, &rightEye.viewport) } } func finishFrameWithViewPort(viewport:Viewport) { viewport.setGLViewport() viewport.setGLScissor() rendererDelegate!.finishFrameWithViewportRect(viewport.toCGRect()) } func updateEyeFovs() { let deviceParams = headMountedDisplay.cardboardParams let screenParams = headMountedDisplay.screenParams let distortion = deviceParams.distortion let eyeToScreenDistance = self.virtualEyeToScreenDistance() // same let interLensDistance = deviceParams.interLensDistance //same let maxLeftEyeFOV = deviceParams.maximumLeftEyeFOV //same let outerDistance:Float = (screenParams.widthInMeters() - interLensDistance ) / 2.0 let innerDistance:Float = interLensDistance / 2.0 let bottomDistance:Float = deviceParams.verticalDistanceToLensCenter - screenParams.borderSizeMeters let topDistance:Float = screenParams.heightInMeters() + screenParams.borderSizeMeters - deviceParams.verticalDistanceToLensCenter let outerAngle = GLKMathRadiansToDegrees(atanf(distortion.distort(outerDistance / eyeToScreenDistance))) let innerAngle = GLKMathRadiansToDegrees(atanf(distortion.distort(innerDistance / eyeToScreenDistance))) let bottomAngle = GLKMathRadiansToDegrees(atanf(distortion.distort(bottomDistance / eyeToScreenDistance))) let topAngle = GLKMathRadiansToDegrees(atanf(distortion.distort(topDistance / eyeToScreenDistance))) leftEye.fov.left = min(outerAngle, maxLeftEyeFOV.left) leftEye.fov.right = min(innerAngle, maxLeftEyeFOV.right) leftEye.fov.bottom = min(bottomAngle, maxLeftEyeFOV.bottom) leftEye.fov.top = min(topAngle, maxLeftEyeFOV.top) rightEye.fov.left = leftEye.fov.right rightEye.fov.right = leftEye.fov.left rightEye.fov.bottom = leftEye.fov.bottom rightEye.fov.top = leftEye.fov.top } func updateUndistortedFOVAndViewport() { let deviceParams = headMountedDisplay.cardboardParams let screenParams = headMountedDisplay.screenParams let halfInterLensDistance:Float = deviceParams.interLensDistance * 0.5 let eyeToScreenDistance:Float = self.virtualEyeToScreenDistance() let left = screenParams.widthInMeters() let right = halfInterLensDistance let bottom = deviceParams.verticalDistanceToLensCenter - screenParams.borderSizeMeters let top = screenParams.borderSizeMeters + screenParams.heightInMeters() - deviceParams.verticalDistanceToLensCenter leftEye.fov.left = GLKMathRadiansToDegrees(atan2f(left, eyeToScreenDistance)) leftEye.fov.right = GLKMathRadiansToDegrees(atan2f(right, eyeToScreenDistance)) leftEye.fov.bottom = GLKMathRadiansToDegrees(atan2f(bottom, eyeToScreenDistance)) leftEye.fov.top = GLKMathRadiansToDegrees(atan2f(top, eyeToScreenDistance)) rightEye.fov.left = GLKMathRadiansToDegrees(atan2f(right, eyeToScreenDistance)) rightEye.fov.right = GLKMathRadiansToDegrees(atan2f(left, eyeToScreenDistance)) rightEye.fov.bottom = GLKMathRadiansToDegrees(atan2f(bottom, eyeToScreenDistance)) rightEye.fov.top = GLKMathRadiansToDegrees(atan2f(top, eyeToScreenDistance)) let halfViewport = screenParams.width() / 2 leftEye.viewport.setViewport(0, 0, halfViewport, screenParams.height()) rightEye.viewport.setViewport(halfViewport, 0, halfViewport, screenParams.height()) } func virtualEyeToScreenDistance() -> Float { return headMountedDisplay.cardboardParams.screenToLensDistance } func getFrameParameters(layer: Float, zNear: Float, zFar: Float) { } }
[ -1 ]
dae7d54663f9dda7205e886f22a4c48b94808644
cd3b57b9c890a7844ec2c65e67916aa28bf3147d
/Pod/Classes/ui/CardKit/ManageCardModule/ManageCard/Views/MainView/ManageShiftCardMainViewTheme2.swift
0d703c7cd7b728fdc96bdf4daf145bf9a48adb66
[ "MIT" ]
permissive
nejcpintar/apto-ui-sdk-ios
7a414e28327b54833e33c37c15512e2015cce396
4a164cd225e90b7887c83e83486a2bf23d2fd79c
refs/heads/master
2023-04-10T00:17:59.679800
2021-04-13T08:19:48
2021-04-13T08:19:48
357,475,387
0
0
MIT
2021-04-13T08:29:24
2021-04-13T08:14:55
Swift
UTF-8
Swift
false
false
7,448
swift
// // ManageCardMainViewTheme2.swift // AptoSDK // // Created by Takeichi Kanzaki on 2018-12-12. // import UIKit import AptoSDK import SnapKit class ManageCardMainViewTheme2: UIView, CardPresentationProtocol { private var isActivateCardFeatureEnabled = false { didSet { activeStateReceived = true } } private var cardState = FinancialAccountState.inactive { didSet { creditCardView.set(cardState: cardState) } } private var fundingSourceState: FundingSourceState? private var activeStateReceived = false private var balanceReceived = false private var shouldUpdateTopMessageView = false private var topMessageViewType = TopMessageViewType.none { didSet { shouldUpdateTopMessageView = oldValue != topMessageViewType } } private let gearView = UIImageView(image: UIImage.imageFromPodBundle("btn_card_settings")) private let creditCardView: CreditCardView private let backgroundView = UIView() private unowned let delegate: ManageCardMainViewDelegate private let uiConfiguration: UIConfig private var showPhysicalCardActivationMessage = true init(uiConfiguration: UIConfig, cardStyle: CardStyle?, delegate: ManageCardMainViewDelegate) { self.uiConfiguration = uiConfiguration self.delegate = delegate self.creditCardView = CreditCardView(uiConfiguration: uiConfiguration, cardStyle: cardStyle) super.init(frame: .zero) setUpUI() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func willMove(toWindow newWindow: UIWindow?) { // Remove any presented message when the view in removed from the hierarchy if newWindow == nil { hideMessage(animated: false) } super.willMove(toWindow: newWindow) } @objc private func cardTapped() { hideMessage(animated: true) delegate.cardTapped() } @objc private func cardSettingsTapped() { delegate.cardSettingsTapped() } @objc private func balanceTapped() { delegate.balanceTapped() } func set(card: Card?) { guard let card = card else { return } guard let userToken = AptoPlatform.defaultManager().currentToken()?.token else { return } self.creditCardView.configure(with: PCIConfiguration( apiKey: AptoPlatform.defaultManager().apiKey, userToken: userToken, cardId: card.accountId, lastFour: card.lastFourDigits, name: card.cardHolder, environment: AptoPlatform.defaultManager().environment )) } func set(cardNetwork: CardNetwork?) { self.creditCardView.set(cardNetwork: cardNetwork) } func set(fundingSource: FundingSource?) { fundingSourceState = fundingSource?.state balanceReceived = true if let fundingSource = fundingSource, fundingSource.balance != nil { creditCardView.set(validFundingSource: fundingSource.state == .valid) if fundingSource.state == .invalid { topMessageViewType = .invalidBalance showInvalidBalanceMessage() } } else { showNoBalanceMessage() creditCardView.set(validFundingSource: false) } } func set(physicalCardActivationRequired: Bool?, showMessage: Bool) { showPhysicalCardActivationMessage = showMessage // If balance is not valid ignore the physical card activation guard topMessageViewType != .invalidBalance || topMessageViewType != .noBalance else { return } if physicalCardActivationRequired == true { topMessageViewType = .activatePhysicalCard showActivatePhysicalCardMessage() } else { topMessageViewType = .none if shouldUpdateTopMessageView { hideMessage() } } } func setSpendable(amount: Amount?, nativeAmount: Amount?) { } func set(cardState: FinancialAccountState?) { if let cardState = cardState { self.cardState = cardState gearView.isHidden = cardState == .created } else { self.cardState = .inactive } } func set(cardStyle: CardStyle?) { creditCardView.set(cardStyle: cardStyle) } func set(activateCardFeatureEnabled: Bool?) { isActivateCardFeatureEnabled = activateCardFeatureEnabled ?? false } func set(showInfo: Bool?) { if let visible = showInfo { creditCardView.set(showInfo: visible) } } func scale(factor scaleFactor: CGFloat) { layoutBackgroundView(scaleFactor: scaleFactor) } } // MARK: - Setup UI private extension ManageCardMainViewTheme2 { func setUpUI() { backgroundColor = uiConfiguration.uiBackgroundSecondaryColor setUpCreditCardView() setUpGearView() } func setUpCreditCardView() { creditCardView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(cardTapped))) addSubview(creditCardView) creditCardView.snp.makeConstraints { make in make.left.right.equalToSuperview().inset(26) make.height.equalTo(creditCardView.snp.width).dividedBy(cardAspectRatio) make.top.equalToSuperview().offset(12) make.bottom.equalToSuperview().inset(16) } backgroundView.backgroundColor = uiConfiguration.uiNavigationSecondaryColor addSubview(backgroundView) layoutBackgroundView(scaleFactor: 0) bringSubviewToFront(creditCardView) } func layoutBackgroundView(scaleFactor: CGFloat) { backgroundView.snp.removeConstraints() backgroundView.snp.makeConstraints { make in make.left.right.equalToSuperview() make.top.equalToSuperview() make.height.equalTo(creditCardView).dividedBy(2 + 3 * scaleFactor).offset(12) } } func setUpGearView() { gearView.contentMode = .center gearView.backgroundColor = uiConfiguration.uiPrimaryColor gearView.layer.cornerRadius = 18 gearView.layer.shadowOffset = CGSize(width: 0, height: 2) gearView.layer.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.6).cgColor gearView.layer.shadowOpacity = 1 gearView.layer.shadowRadius = 4 gearView.isUserInteractionEnabled = true gearView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(cardSettingsTapped))) addSubview(gearView) gearView.snp.makeConstraints { make in make.height.width.equalTo(36) make.top.equalToSuperview().offset(6) make.right.equalToSuperview().inset(20) } } func showInvalidBalanceMessage() { show(message: "invalid-balance.message".podLocalized(), title: "invalid-balance.title".podLocalized(), animated: false, isError: true, uiConfig: uiConfiguration) { [unowned self] in self.balanceTapped() } } func showNoBalanceMessage() { show(message: "no-balance.message".podLocalized(), title: "no-balance.title".podLocalized(), animated: false, isError: true, uiConfig: uiConfiguration) { [unowned self] in self.balanceTapped() } } func showActivatePhysicalCardMessage() { guard showPhysicalCardActivationMessage else { return } show(message: "manage_card.activate_physical_card_overlay.message".podLocalized(), title: "manage_card.activate_physical_card_overlay.title".podLocalized(), animated: false, isError: false, uiConfig: uiConfiguration) { [unowned self] in self.activatePhysicalCard() } } } // MARK: - MessageView actions extension ManageCardMainViewTheme2 { func activatePhysicalCard() { delegate.activatePhysicalCardTapped() } }
[ -1 ]
c70914dac0c533ff605afec236c747e958191819
7cc87f0833810526f014a88353aa445be1976b19
/gplayer/Utilities/UIKitExtension.swift
41b5a5e4e20c615c255785a8a6f94fb0c34a920f
[]
no_license
dminoror/gplayer-iOS
264c05f44c2629c7b8f07b6beb8d625b3eabf29b
8a2ee8a8d13dab959a0051e504fa731500e6d695
refs/heads/main
2023-08-18T09:57:58.781956
2021-10-15T09:38:28
2021-10-15T09:38:28
null
0
0
null
null
null
null
UTF-8
Swift
false
false
7,895
swift
// // UIKitExtension.swift // gplayer // // Created by DoubleLight on 2020/9/7. // Copyright © 2020 dminoror. All rights reserved. // import UIKit struct ViewModelAlertContent { let title: String? let message: String? var options: [ViewModelAlertOption] } struct ViewModelAlertOption { let title: String let type: UIAlertAction.Style let closure: (() -> Void)? } extension UIViewController { func showLoading() { let loadingView = UIActivityIndicatorView(style: .large) loadingView.translatesAutoresizingMaskIntoConstraints = false self.view.addSubview(loadingView) self.view.addConstraint(NSLayoutConstraint(item: loadingView, attribute: .centerX, relatedBy: .equal, toItem: self.view, attribute: .centerX, multiplier: 1, constant: 0)) self.view.addConstraint(NSLayoutConstraint(item: loadingView, attribute: .centerY, relatedBy: .equal, toItem: self.view, attribute: .centerY, multiplier: 1, constant: 0)) loadingView.startAnimating() } func stopLoading() { if let loadingView = self.view.subviews.first(where: { (view) -> Bool in return view.isKind(of: UIActivityIndicatorView.self) }) { loadingView.removeFromSuperview() } } func showAlert(content: ViewModelAlertContent?) { let alert = UIAlertController(title: content?.title, message: content?.message, preferredStyle: .alert) if let options = content?.options { for (_, element) in options.enumerated() { alert.addAction(UIAlertAction(title: element.title, style: .default, handler: { (action) in if let closure = element.closure { closure() } })) } } self.present(alert, animated: true, completion: nil) } } extension UIColor { enum CommonColors { case background case text case maxTrack case playingCell case notLoadedProgress case actionSheetBackground case actionSheetBorderLine } convenience init(commonType: CommonColors) { switch commonType { case .background: self.init(named: "Background")! case .text: self.init(named: "Text")! case .maxTrack: self.init(named: "MaxTrack")! case .playingCell: self.init(named: "PlayingCell")! case .notLoadedProgress: self.init(named: "NotLoadedProgress")! case .actionSheetBackground: self.init(named: "ActionSheetBackground")! case .actionSheetBorderLine: self.init(named: "ActionSheetBorderLine")! } } class var background: UIColor { get { return UIColor(commonType: .background) } } class var text: UIColor { get { return UIColor(commonType: .text) } } class var maxTrack: UIColor { get { return UIColor(commonType: .maxTrack) } } class var playingCell: UIColor { get { return UIColor(commonType: .playingCell) } } class var notLoadedProgress: UIColor { get { return UIColor(commonType: .notLoadedProgress) } } class var actionSheetBackground: UIColor { get { return UIColor(commonType: .actionSheetBackground) } } class var actionSheetBorderLine: UIColor { get { return UIColor(commonType: .actionSheetBorderLine) } } } extension UIScreen { enum sizeType { case iPhone case iPhoneX case iPad } static func getSizeType() -> sizeType { if (UIDevice().userInterfaceIdiom == .phone) { switch (UIScreen.main.nativeBounds.height) { case 1136, 1334, 1920, 2208: return .iPhone case 2436, 2688, 1792: return .iPhoneX default: return .iPhone } } else { return .iPad } } static func screenRatio(value: CGFloat) -> CGFloat { let type = UIScreen.getSizeType() if (type == .iPhoneX) { return value * 1.2 } return value } static var safeArea: UIEdgeInsets { get { if let safeArea = UIApplication.shared.windows.first?.safeAreaInsets { return safeArea } return UIEdgeInsets.zero } } static var safeSize: CGSize { get { let safeArea = UIScreen.safeArea let size = CGSize(width: UIScreen.main.bounds.width - safeArea.left - safeArea.right, height: UIScreen.main.bounds.height - safeArea.top - safeArea.bottom) return size } } static func takeScreenshot(_ shouldSave: Bool = true) -> UIImage? { var screenshotImage: UIImage? guard let layer = UIApplication.shared.windows.first?.layer else { return nil } let scale = UIScreen.main.scale UIGraphicsBeginImageContextWithOptions(layer.frame.size, false, scale); guard let context = UIGraphicsGetCurrentContext() else {return nil} layer.render(in:context) screenshotImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() if let image = screenshotImage, shouldSave { UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) } return screenshotImage } } extension UIImage { func resizeImage(size: CGSize) -> UIImage { let renderer = UIGraphicsImageRenderer(size: size) let newImage = renderer.image { [weak self] (context) in self?.draw(in: renderer.format.bounds) } return newImage } func resizeImage(width: CGFloat) -> UIImage { let size = CGSize(width: width, height: self.size.height * width / self.size.width) let renderer = UIGraphicsImageRenderer(size: size) let newImage = renderer.image { [weak self] (context) in self?.draw(in: renderer.format.bounds) } return newImage } func blur(radius: CGFloat) -> UIImage? { guard let gaussianBlurFilter = CIFilter(name: "CIGaussianBlur") else { return self } gaussianBlurFilter.setDefaults() guard let cgImage = self.cgImage else { return self } let inputImage = CIImage(cgImage: cgImage) gaussianBlurFilter.setValue(inputImage, forKey: kCIInputImageKey) gaussianBlurFilter.setValue((radius), forKey: kCIInputRadiusKey) guard let outputImage = gaussianBlurFilter.outputImage else { return self } let context = CIContext(options: nil) guard let outputCGImage = context.createCGImage(outputImage, from: inputImage.extent) else { return self } return UIImage(cgImage: outputCGImage) } class func systemWithColor(systemName: String, color: UIColor) -> UIImage? { if let image = UIImage(systemName: systemName) { return image.withTintColor(color).withRenderingMode(.alwaysOriginal) } return nil } } extension CALayer{ func addBorder(edge: UIRectEdge, color: UIColor, thickness: CGFloat) { let borders = CALayer() switch edge { case .top: borders.frame = CGRect(x: 0, y: 0, width: frame.width, height: thickness); break case .bottom: borders.frame = CGRect(x: 0, y: frame.height - thickness, width: frame.width, height: thickness); case .left: borders.frame = CGRect(x: 0, y: 0 + thickness, width: thickness, height: frame.height - thickness * 2); case .right: borders.frame = CGRect(x: frame.width - thickness, y: 0 + thickness, width: thickness, height: frame.height - thickness * 2); default: break } borders.backgroundColor = color.cgColor; self.addSublayer(borders); } }
[ -1 ]
870a5f2bf5cf903d0ab50454a2ac85ad17e1aa13
af758a982c575f594ef86e29f588040ad5c8f46a
/On the Map/API Client/Models/StudentLocations.swift
ad1c3b5dfeef479040dcccca9f17673f691de54e
[]
no_license
elina-mns/On-the-Map
acff568d1d81d7e7f4cc7329c6fd34fdb98213a3
201fa0931230342c0dea5bd2b3035957417d2b6c
refs/heads/main
2023-01-09T15:14:48.574492
2020-10-25T02:09:53
2020-10-25T02:09:53
300,093,955
0
0
null
null
null
null
UTF-8
Swift
false
false
189
swift
// // StudentLocations.swift // On the Map // // Created by Elina Mansurova on 2020-10-02. // import Foundation struct StudentLocations: Codable { let results: [StudentLocation] }
[ -1 ]
80ec77f03c0564cfb62b870defe7a0f85284b64e
4f5bdafd0a27bf2ab4f7fa7ab4acdc00b446e8cd
/ChatAway/Extensions/Cache+Extension.swift
ea455b78507c2ebdadc2a9f14f3740a150334ddd
[]
no_license
lpuentes19/ChatAway
2adb75723525ace6868c49b1fea7c0f82daf0609
11f8a18fc878e658513c895a31f194d265665cc4
refs/heads/master
2021-08-23T06:26:32.372916
2017-12-03T22:05:11
2017-12-03T22:05:11
108,922,251
1
0
null
null
null
null
UTF-8
Swift
false
false
1,156
swift
// // Cache+Extension.swift // ChatAway // // Created by Luis Puentes on 11/2/17. // Copyright © 2017 LuisPuentes. All rights reserved. // import UIKit let imageCache = NSCache<AnyObject, AnyObject>() extension UIImageView { func loadImageUsingCacheWith(urlString: String) { self.image = nil // Check cache for image first if let cachedImage = imageCache.object(forKey: urlString as AnyObject) as? UIImage { self.image = cachedImage return } // Otherwise fire off a new download let url = URL(string: urlString) URLSession.shared.dataTask(with: url!, completionHandler: { (data, response, error) in if error != nil { print(error!.localizedDescription) return } DispatchQueue.main.async { if let downloadedImage = UIImage(data: data!) { imageCache.setObject(downloadedImage, forKey: urlString as AnyObject) self.image = downloadedImage } } }).resume() } }
[ 214967 ]
091ca2ad80f0a156d20859b1613f04ab45bd44da
d2a125647d4cb770b6c1fd263fd3ca07e6094cd7
/Extensions/StringExtensions.swift
d9d66f4496b756bab71e11b151335516d26a4d6c
[ "MIT" ]
permissive
Chand-dev/Swifter
4a72fc248cbca4880c51759167bdf9231eb4bf94
74cac29b947b1c6e26ac68a384ba7e8fa73770dd
refs/heads/master
2022-03-29T15:24:29.449523
2020-01-10T09:53:10
2020-01-10T10:01:39
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,736
swift
// // StringExtension.swift // // Created by Rok Gregorič // Copyright © 2018 Rok Gregorič. All rights reserved. // import Foundation extension String { var url: URL? { return URL(string: self) } var fileURL: URL? { return URL(fileURLWithPath: self) } var urlEncoded: String { return escaped(.urlHostAllowed).replace("+", with: "%2B").replace("&", with: "%26") } var htmlEncoded: String { return replace("&", with: "&amp;").replace("\"", with: "&quot;").replace("'", with: "&#39;").replace("<", with: "&lt;").replace(">", with: "&gt;") } var urlDecoded: String { return removingPercentEncoding ?? "" } var trimmed: String { return trimmingCharacters(in: .whitespacesAndNewlines) } var digits: String { return components(separatedBy: CharacterSet.decimalDigits.inverted).joined() } var removedSpacesAndNewlines: String { return components(separatedBy: CharacterSet.whitespacesAndNewlines).joined() } func escaped(_ characterSet: CharacterSet) -> String { return addingPercentEncoding(withAllowedCharacters: characterSet) ?? "" } func replace(_ substring: String, with: String) -> String { return replacingOccurrences(of: substring, with: with) } func replace(_ substring: String, with: String, options: NSString.CompareOptions) -> String { return replacingOccurrences(of: substring, with: with, options: options) } func regplace(_ regexp: String, with: String) -> String { return replace(regexp, with: with, options: .regularExpression) } func remove(_ substring: String) -> String { return replace(substring, with: "") } func regmove(_ regexp: String) -> String { return regplace(regexp, with: "") } func splitString(_ string: String, length: Int) -> [String] { return stride(from: 0, to: string.count, by: length).reversed().map { let endIndex = string.index(string.endIndex, offsetBy: -$0) let startIndex = string.index(endIndex, offsetBy: -length, limitedBy: string.startIndex) return String(string[startIndex!..<endIndex]) } } func spacedString(at spacedIncrement: Int) -> String? { let splitString = self.splitString(self, length: spacedIncrement) return splitString.joined(separator: " ") } var localized: String { return NSLocalizedString(self, comment: "") } subscript (i: Int) -> String { return self[i ..< i + 1] } func substring(from: Int) -> String { return self[min(from, count) ..< count] } func substring(to: Int) -> String { return self[0 ..< clamp(to, min: 0, max: count)] } func substring(from: Int, to: Int) -> String { return substring(from: from).substring(to: to-from) } subscript(r: Range<Int>) -> String { let range = Range(uncheckedBounds: (lower: clamp(r.lowerBound, min: 0, max: count), upper: clamp(r.upperBound, min: 0, max: count))) let start = index(startIndex, offsetBy: range.lowerBound) let end = index(start, offsetBy: range.upperBound - range.lowerBound) return String(self[start ..< end]) } typealias RegexMatch = (match: String, range: NSRange) func matches(for regex: String) -> [RegexMatch] { do { let regex = try NSRegularExpression(pattern: regex) let results = regex.matches(in: self, range: NSRange(location: 0, length: ns.length)) return results.map { (match: ns.substring(with: $0.range), range: $0.range) } } catch _ { return [] } } var ns: NSString { return self as NSString } var trimmedEmpty: String? { return trimmed.nilIfEmpty } var comparable: String? { return trimmedEmpty?.lowercased() } static func random(length: Int) -> String { let letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" return String(length.maps { letters.randomElement()! }) } static func randomDigits(length: Int) -> String { let letters = "0123456789" return String(length.maps { letters.randomElement()! }) } var firstCapitalized: String { return substring(to: 1).capitalized + substring(from: 1) } var isValidEmail: Bool { let regExp = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,10}" let predicate = NSPredicate(format:"SELF MATCHES %@", regExp) return predicate.evaluate(with: self) } var int: Int { return Int(digits) ?? 0 } var float: Float { let arr = components(separatedBy: ".") let major = arr.object(at: 0).flatMap(Int.init) ?? 0 let minor = arr.object(at: 1).flatMap(Int.init) ?? 0 let str = String(format: "%d.%d", major, minor) return Float(str) ?? 0 } } extension Substring { var string: String { return String(self) } }
[ -1 ]
5c6b5229fd9a56f63802b648e226957c60062c59
bf4a8a74dea51cb067b520b14328e442c2dcae7c
/PackageSwiftFiles/indigothm_SwiftServer-Package.swift
bb8fea7c13b7d35a62c7d12906bcc0dfc0c20264
[ "MIT" ]
permissive
johndpope/swift-package-crawler-data
927600ee51ca3dbb9fb0f2a56e65ce7469567f85
e86be27163976619a8e1cffd966e87d0f74793d7
refs/heads/master
2021-01-16T18:23:10.026311
2016-07-22T11:14:06
2016-07-22T11:14:06
null
0
0
null
null
null
null
UTF-8
Swift
false
false
342
swift
// // Package.swift // SwiftServer // // Created by Ilia Tikhomirov on 24/02/16. // Copyright © 2016 Ilia Tikhomirov. All rights reserved. // import Foundation import PackageDescription let package = Package( name: "SS", dependencies: [ .Package(url: "https://github.com/loganwright/vapor.git", majorVersion: 0) ] )
[ -1 ]
036ca308583406225348ea64648785a6b955eefd
9a8d1ca9ee43236ad17b9000f5a7125586a1b797
/TestSber/Classes/Modules/ DetailNewsVC/DetailNewsViewController.swift
7f69cd99b2db099257091323a2fe6584e1bf6927
[]
no_license
albeg/testSber
f170f749b0be649959ee56ba917d5de9120d5e13
8d3189d00151793cbb24b84da9938b2b4d087614
refs/heads/master
2022-07-07T07:53:54.328996
2020-05-08T22:09:08
2020-05-08T22:09:08
null
0
0
null
null
null
null
UTF-8
Swift
false
false
3,153
swift
// // DetailNewsViewController.swift // TestSber // // Created by Viacheslav Loie on 26.04.2020. // Copyright © 2020 SberTestViper. All rights reserved. // import UIKit import PanModal class DetailNewsViewController: UIViewController, DetailNewsViewInConnection, PanModalPresentable { // MARK: - tableView var tableView: UITableView = UITableView() // MARK: - presenter var presenter: DetailNewsViewOutConnection? // MARK: - safeArea var safeArea: UILayoutGuide! // MARK: - presenter override func viewDidLoad() { super.viewDidLoad() setupTableView() presenter?.viewDidLoad() registerCells() safeArea = view.layoutMarginsGuide tableView.estimatedRowHeight = 155.0 tableView.rowHeight = UITableView.automaticDimension tableView.separatorStyle = .none view.backgroundColor = .white } // MARK: - viewWillAppear override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) presenter?.viewWillAppear() setupNavBar() } // MARK: - dissmis func dissMiss() { dismiss(animated: true, completion: nil) } // MARK: - setupTableView func setupTableView() { view.addSubview(tableView) tableView.translatesAutoresizingMaskIntoConstraints = false tableView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true tableView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor).isActive = true tableView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true tableView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor).isActive = true view.backgroundColor = .white } } // MARK: - setupNavBar() extension DetailNewsViewController { private func setupNavBar() { navigationController?.setNavigationBarHidden(false, animated: true) title = "Новости партнеров" navigationController?.navigationBar.titleTextAttributes = [ NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20), NSAttributedString.Key.foregroundColor: UIColor.sberGreen] } } //UIFont.semibold20 // MARK: - PanModal extension DetailNewsViewController { var panScrollable: UIScrollView? { return tableView } var cornerRadius: CGFloat { return 20 } var allowsTapToDismiss: Bool { return true } var allowsDragToDismiss: Bool { return true } var shortFormHeight: PanModalHeight { return .contentHeight(view.frame.height) } var longFormHeight: PanModalHeight { return shortFormHeight } } // MARK: - decorate extension DetailNewsViewController { func decorate() { } } // MARK: - registerCells extension DetailNewsViewController { func registerCells() { tableView.register(TitleTableViewCell.self, forCellReuseIdentifier: TitleTableViewCell.reuseId) tableView.register(TimerTableViewCell.self, forCellReuseIdentifier: TimerTableViewCell.reuseId) tableView.register(DescriptionTableViewCell.self, forCellReuseIdentifier: DescriptionTableViewCell.reuseId) tableView.register(NewsTitleTableViewCell.self, forCellReuseIdentifier: NewsTitleTableViewCell.reuseId) } }
[ -1 ]
9a66cc79158eeafdd9046d04e7448e563a844011
3b8b2c559191e64e8b9246a19d52e6f00a17c5e2
/TipCalculator/SettingsViewController.swift
d245d7aeca6ba4123ba2e39460c1f89c329363b2
[ "Apache-2.0" ]
permissive
AjithSinghKshatri/iOSTipCalculator
3c65861b2d2b8b87662d50b37add3a8424d1b755
8d195815a2585c473969da60f096e50d06763404
refs/heads/master
2020-05-24T22:14:13.416551
2017-03-14T01:27:26
2017-03-14T01:27:26
84,886,189
0
0
null
null
null
null
UTF-8
Swift
false
false
1,763
swift
// // SettingsViewController.swift // TipCalculator // // Created by Kshatri, Ajith Singh (CORP) on 3/7/17. // Copyright © 2017 Kshatri, Ajith Singh (CORP). All rights reserved. // import UIKit class SettingsViewController: UIViewController { @IBOutlet weak var tipControl: UISegmentedControl! @IBOutlet weak var customTheme: UISwitch! override func viewDidLoad() { super.viewDidLoad() let defaults = UserDefaults.standard let intValue = defaults.integer(forKey: "default") let theme = defaults.bool(forKey: "customTheme") tipControl.selectedSegmentIndex = intValue; if theme { customThemeLoad() } else{ defaultTheme() } defaults.synchronize() } func customThemeLoad(){ self.view.backgroundColor = UIColor(red: 0.8, green: 0.7, blue: 0.7, alpha: 1.0) } func defaultTheme(){ self.view.backgroundColor = UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func changeTheme(_ sender: Any) { let defaults = Foundation.UserDefaults.standard defaults.set(customTheme.isOn, forKey: "customTheme") defaults.synchronize() if customTheme.isOn{ customThemeLoad() } else { defaultTheme() } defaults.synchronize() } @IBAction func onTipChanged(_ sender: Any) { let defaults = Foundation.UserDefaults.standard defaults.set(tipControl.selectedSegmentIndex, forKey: "default") defaults.synchronize() } }
[ -1 ]
3e33ad1058664e7996138c8fd6a9b4be7d8e5e91
de8d1e5ed40c0c40f608d99bcc3e7c9eddd689c0
/Lab23/Diary.swift
59aa2d0516da5473de7380e4489043f23cf56bd5
[]
no_license
kararmehdihabib/Diary-with-Map-
d9431deb3b7a57c73d06b95bbacf74b0b0a4317e
3ff37f14f7f296caf2e522adbe2511bdc78cfb9a
refs/heads/master
2021-01-10T09:40:33.571981
2015-10-29T08:40:53
2015-10-29T08:40:53
45,170,628
0
1
null
null
null
null
UTF-8
Swift
false
false
3,179
swift
// // Diary.swift // Lab23 // // Created by karar on 27/04/15. // Copyright (c) 2015 karar. All rights reserved. // import Foundation import MapKit class Diary: NSObject, NSCoding { var entries: [DiaryDay] let DIARYENTRY_CELL_IDENTIFIER = "DiaryEntryCell" let DATE_FORMAT = "dd.MM.YYYY" /* NSCoding */ required init(coder aDecoder: NSCoder) { // Load previous values self.entries = aDecoder.decodeObjectForKey("entries") as [DiaryDay] } override init() { self.entries = [DiaryDay]() } /* NSCoding */ func encodeWithCoder(aCoder: NSCoder) { // Encode values for saving aCoder.encodeObject(self.entries, forKey: "entries") } func addEntry(date: NSDate, text: String, location: CLLocation, locationString: String, image: UIImage) { // An entry must have some content if !text.isEmpty { var existingDateIndex = -1 var f = NSDateFormatter() f.dateFormat = DATE_FORMAT for (index, day) in enumerate(self.entries) { if day.dateString == f.stringFromDate(date) { existingDateIndex = index break } } // Was a matching DiaryDay found if existingDateIndex >= 0 { // Generate a new entry and append it into the correct DiaryDay self.entries[existingDateIndex].entries.append(DiaryEntry(date: date, text: text, location: location, locationString: locationString, image: image)) } else { // Generate a new entry and a new DiaryDay for it self.entries.append(DiaryDay(date: date, firstEntry: DiaryEntry(date: date, text: text, location: location, locationString: locationString, image: image))) } self.entries = self.getSorted() } } func addEntry(newEntry: DiaryEntry) { if !newEntry.text.isEmpty { var existingDateIndex = -1 for (index, day) in enumerate(self.entries) { if day.dateString == newEntry.dateString { existingDateIndex = index break } } // Was a matching DiaryDay found if existingDateIndex >= 0 { // Generate a new entry and append it into the correct DiaryDay self.entries[existingDateIndex].entries.append(newEntry) } else { // Generate a new entry and a new DiaryDay for it self.entries.append(DiaryDay(date: newEntry.date, firstEntry: newEntry)) } self.entries = self.getSorted() } } // Get diary entries sorted by time, grouped by DiaryDay func getSorted() -> [DiaryDay] { // Sort within the days first self.entries = self.entries.map { $0.entries = $0.getSorted() return $0 } // And then sort the days return sorted(self.entries, <) } }
[ -1 ]
2845fa2f03abbf268625074a95e0c8a34c3b66bc
2af083f9908dba0c3e224711171d4b9ffc25cabb
/stay trust/stay trust/ContentView.swift
2bbf82773cbf98e141368ad2c3ea5073361a20e9
[]
no_license
HaibinZHAO-950102/learn-Xcode-for-IOS-app
c8d842d4b1717c0e212992a950042ecd18973a10
59584e79d088fcf69f7f0d2461a33e6d97c92677
refs/heads/master
2023-05-07T10:22:48.485025
2021-05-19T15:00:42
2021-05-19T15:00:42
343,546,595
0
0
null
null
null
null
UTF-8
Swift
false
false
460
swift
// // ContentView.swift // stay trust // // Created by Haibin Zhao on 05.03.21. // import SwiftUI struct ContentView: View { var body: some View { VStack{ Text("Please Don't Delete this APP!") .font(.largeTitle) Text("Only to let the iPhone trust my Developer Accont.") } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
[ -1 ]
6c7e6bf8c7348e50d5d45976261465567c9187f7
9438ad2cd6bcb083b641d45eef085fc4239eda2c
/Navigation/ProfileCoordinator.swift
002df025e00b3bfa49d5975a87370008c8a3fde0
[]
no_license
ivankamenev/IOSINT
07caeccb42fecf54dfb6753de9ec8de2da42e940
c865beeb1f9347e486b03c9734330375ac74a2a0
refs/heads/main
2023-06-20T03:19:30.819975
2021-05-09T10:43:37
2021-05-09T10:43:37
349,389,462
0
0
null
2021-03-23T10:24:12
2021-03-19T10:48:46
Swift
UTF-8
Swift
false
false
1,781
swift
// // ProfileCoordinator.swift // Navigation // // Created by Ivan Kamenev on 12.04.2021. // Copyright © 2021 Artem Novichkov. All rights reserved. // import Foundation import UIKit class ProfileCoordinator: Coordinator { var tabBarController: UITabBarController? var navigationController: UINavigationController? init(navigationController: UINavigationController, tabBarController: UITabBarController?) { self.navigationController = navigationController self.tabBarController = tabBarController } func loginButtonPressed() { let profile = ProfileViewController() profile.coordinator = self navigationController?.pushViewController(profile, animated: true) } func photosSelected() { let photosViewController = PhotosViewController() navigationController?.pushViewController(photosViewController, animated: true) } func showAlert(error: Errors) { var alertMessage = "" switch error { case .loginIsEmpty: alertMessage = "Введите логин" case .passIsEmpty: alertMessage = "Введите пароль" case .incorrectLogin: alertMessage = "Введён неверный логин" case .incorrectPass: alertMessage = "Введён неверный пароль" } let alertController = UIAlertController(title: "Ошибка!", message: alertMessage, preferredStyle: .alert) let okAction = UIAlertAction(title: "OK", style: .default) { _ in print("OK") } alertController.addAction(okAction) navigationController?.present(alertController, animated: true, completion: nil) } }
[ -1 ]
bd6379b68e384ab38f2ca220ead7116bf043059c
3d44f52d049634d5e547987b84af98e42db35d66
/Daily Vibes/New Group/notifications/DVLNTableViewController.swift
62228a23ad7970b25dac689f01e8c747ee7b8853
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
dailyvibes/dailyvibes.ios.swift
b8b2f18220cb6baefbccf573770653ddb6cdc26f
dcd56f42fa77e672e8bb6cd4e4fde0def56308cb
refs/heads/master
2020-05-26T23:31:30.829949
2019-05-24T12:06:18
2019-05-24T12:06:18
188,411,432
6
1
null
null
null
null
UTF-8
Swift
false
false
6,586
swift
// // DVLNTableViewController.swift // Daily Vibes // // Created by Alex Kluew on 2018-05-21. // Copyright © 2018 Alex Kluew. All rights reserved. // import SwiftTheme import UIKit import UserNotifications class DVLNTableViewController: ThemableTableViewController, UNUserNotificationCenterDelegate { var isGrantedNotificationAccess: Bool = false var requestData: [UNNotificationRequest]? lazy var customSelectionView: UIView = { let view = UIView(frame: .zero) view.theme_backgroundColor = "Global.selectionBackgroundColor" return view }() override func viewDidLoad() { super.viewDidLoad() let cancelButton = UIBarButtonItem.init(barButtonSystemItem: .cancel, target: self, action: #selector(handleCancelButton)) cancelButton.accessibilityIdentifier = "dvln_cancel_btn" self.navigationItem.leftBarButtonItem = cancelButton UNUserNotificationCenter.current().requestAuthorization( options: [.alert,.sound,.badge], completionHandler: { (granted,error) in self.isGrantedNotificationAccess = granted if !granted{ //add alert to complain } }) // self.title = NSLocalizedString("Notifications", tableName: "Localizable", bundle: .main, value: "** DID NOT FIND Notifications String **", comment: "") let vctitle = NSLocalizedString("Notifications", tableName: "Localizable", bundle: .main, value: "** DID NOT FIND Notifications String **", comment: "") setupVCTwoLineTitle(withTitle: vctitle, withSubtitle: nil) UNUserNotificationCenter.current().delegate = self navigationController?.navigationBar.isTranslucent = false tableView.theme_backgroundColor = "Global.backgroundColor" tableView.theme_separatorColor = "ListViewController.separatorColor" // tableView.tableFooterView = UIView.init(coder: .init()) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) UIApplication.shared.theme_setStatusBarStyle("UIStatusBarStyle", animated: true) UNUserNotificationCenter.current().getPendingNotificationRequests(completionHandler: { requests -> () in // print("\(requests.count) requests -------") for request in requests { if self.requestData == nil { self.requestData = [UNNotificationRequest]() } guard var _requestData = self.requestData else { return; } _requestData.append(request) self.requestData = _requestData // print(request.identifier) } // print(self.requestData) }) let screenRect = UIScreen.main.bounds let screenWidth = screenRect.size.width let screenHeight = screenRect.size.height self.preferredContentSize = CGSize(width: (screenWidth - 32), height: (screenHeight/2)) // UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: {deliveredNotifications -> () in // print("\(deliveredNotifications.count) Delivered notifications-------") // for notification in deliveredNotifications{ // print(notification.request.identifier) // } // }) } @objc func handleCancelButton() { closeView() } fileprivate func closeView() { let isPresentingInADDMode = presentingViewController is DailyVibesTabBarViewController if isPresentingInADDMode { dismiss(animated: true, completion: nil) } else if let owningNavigationController = navigationController { owningNavigationController.popViewController(animated: true) } else { fatalError("DVLNTableViewController is not inside a navigation controller.") } } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { guard let _requestData = requestData else { return 0 } return _requestData.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "basicNotificationCell", for: indexPath) cell.theme_backgroundColor = "Global.barTintColor" cell.textLabel?.theme_textColor = "Global.textColor" cell.detailTextLabel?.theme_textColor = "Global.placeholderColor" cell.selectedBackgroundView = customSelectionView if let _requestData = requestData { let cellData = _requestData[indexPath.row] cell.textLabel?.text = "\(cellData.content.title): \(cellData.content.body)" cell.detailTextLabel?.text = cellData.content.categoryIdentifier } return cell } // Override to support conditional editing of the table view. override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { return true } // Override to support editing the table view. override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { if let deleteNotificationID = self.requestData?.remove(at: indexPath.row) { let toDelete = deleteNotificationID.identifier UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: [toDelete]) tableView.deleteRows(at: [indexPath], with: .fade) } } } /* // 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 ]
ee26fa9585ac943aaf4cdec1faa56ec810bf8517
8eabcdc6b7713dde61dd4cb99cc5ee665279ac90
/Blog/Managers/CoreDataManager.swift
9f667d54034bc5100524ea6eaba9dea676296af0
[]
no_license
le0zh0u/blog-app
f437e95e83afb47393d191189962921225235ea5
9bad8fda428093aeaecc2838d2a8bd38f31e3f5f
refs/heads/main
2023-02-04T21:38:52.222730
2020-12-17T13:55:32
2020-12-17T13:55:32
319,024,355
0
0
null
null
null
null
UTF-8
Swift
false
false
531
swift
// // CoreDataManager.swift // Blog // // Created by 周椿杰 on 2020/12/6. // import Foundation import CoreData class CoreDataManager { static func getAllPosts() ->[Post] { var posts = [Post]() let request: NSFetchRequest<Post> = Post.fetchRequest() do{ posts = try PersistenceController.shared.container.viewContext.fetch(request) } catch let error as NSError { print(error.localizedDescription) } return posts } }
[ -1 ]
feddf8cb59dd98cac31d731ad7128d96276433e5
3e500dabd68e94f23df972827b880278aeab3ee2
/CupcakeCorner-SwiftUI/Views/ContentView.swift
f579d0d5530100e32a88b60a3ffbc9c6465fbb2f
[]
no_license
aldibatyr/cupcake-commerce-swiftui
6a2e141ba693f0d9d2a08dbba448b8014d710fd3
356cc65559a5a6690d3881b5f6f461fa4a3ae218
refs/heads/master
2022-09-21T01:03:42.279515
2020-06-04T02:25:09
2020-06-04T02:25:09
269,198,138
0
0
null
null
null
null
UTF-8
Swift
false
false
1,815
swift
// // ContentView.swift // CupcakeCorner-SwiftUI // // Created by Aldiyar B on 6/3/20. // Copyright © 2020 Aldiyar B. All rights reserved. // import SwiftUI struct ContentView: View { @ObservedObject var order = OrderWrapper() var body: some View { NavigationView{ Form { Section { Picker(selection: $order.order.type, label: Text("Select your cake type")) { ForEach(0..<OrderStruct.types.count, id: \.self) { Text(OrderStruct.types[$0]) } } Stepper(value: $order.order.quantity, in: 3...20) { Text("Number of cakes: \(order.order.quantity)") } } Section { Toggle(isOn: $order.order.specialRequestEnabled.animation()) { Text("Any special request?") } if order.order.specialRequestEnabled { Toggle(isOn: $order.order.extraFrosting, label: { Text("Add extra frosting") }) Toggle(isOn: $order.order.addSprinkles, label: { Text("Add extra sprinkles") }) } } Section { NavigationLink(destination: AddressView(order: order), label: { Text("Delivery details") }) } }.navigationBarTitle("Cupcake Corner") } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
[ 350466, 359829 ]
57fd99e9c9b2f7d4f81112a5636d0042ee4ec26c
b58e3b6dcde5baa2e22afac6123d0c487b1c61f2
/iOS/greener/greener/Flow/Categories/CategoriesViewController.swift
eccd0088b920207a26aa9794a387b24679ac1c63
[ "Apache-2.0" ]
permissive
rkhanna-olx/Greener
95df691b28d001a9bbbe9923426389440944252d
23a2a80ed40729a29129fb1eba0e9650cb6f9e71
refs/heads/master
2023-06-01T11:05:32.446743
2021-06-23T04:25:56
2021-06-23T04:25:56
378,047,173
0
0
null
null
null
null
UTF-8
Swift
false
false
428
swift
// // CategoriesViewController.swift // greener // // Created by Rahul on 17/06/21. // import Foundation import UIKit import MVVMRB protocol CategoriesViewControllerDependencyProtocol { } protocol CategoriesViewControllerProtocol{ } class CategoriesViewController: BaseViewController<CategoriesViewControllerDependencyProtocol, CategoriesViewModelProtocol, CategoriesRouterProtocol>, CategoriesViewControllerProtocol { }
[ -1 ]
c3c4134478c5a1a217044f29951b5d3465c103a6
7fd2bff30d66feaf44d996032447ebadd24e735a
/PLUTrainer/PLUTrainer/Controller/QuizVC.swift
0828dedc02762dea04eb51d797e14eeb928367aa
[ "MIT" ]
permissive
MondaleFelix/PLUTrainer
3000d0d233275b139e0ffb4d344d3780dcac3b9b
24b89c90126366d6ee0248627de9e646c5a5c3c8
refs/heads/master
2020-12-05T17:46:30.078610
2020-08-02T23:09:31
2020-08-02T23:09:31
232,193,705
0
0
null
null
null
null
UTF-8
Swift
false
false
7,121
swift
// // ViewController.swift // PLUTrainer // // Created by Mondale on 1/7/20. // Copyright © 2020 Mondale. All rights reserved. import UIKit import CoreData class QuizVC: UIViewController, UITextFieldDelegate, ReturnButtonNameDelegate { func getButtonLabel(buttonDigits: String) { if buttonDigits == "ent" { let correctAnswer = quiz.checkAnswer(pluLabel.text!) feedBackImage.isHidden = false if correctAnswer { // self.view.backgroundColor = .green let checkmark = UIImage(systemName: "checkmark")! let checkmarkGreen = checkmark.withTintColor(.green, renderingMode: .alwaysOriginal) feedBackImage.image = checkmarkGreen pluLabel.text = "Correct!" } else { // self.view.backgroundColor = .red let xmark = UIImage(systemName: "xmark")! let xmarkRed = xmark.withTintColor(.red, renderingMode: .alwaysOriginal) feedBackImage.image = xmarkRed pluLabel.text = "Incorrect!" } Timer.scheduledTimer(timeInterval: 0.35, target: self, selector: #selector(updateUI), userInfo: nil, repeats: false) } else { pluLabel.text = buttonDigits } } var coreData = CoreDataStack() var quiz = Quiz.sharedInstance var foodImage = UIImageView() var feedBackImage = UIImageView() var foodLabel = UILabel() var pluLabel = UILabel() var keyboard = Keyboard() var stackView = UIStackView() override func viewDidLoad() { super.viewDidLoad() fetchProduce() configureUI() configureStackView() updateUI() addBarButtonItem() } override func viewWillAppear(_ animated: Bool) { updateUI() } private func configureUI(){ // Produce Image foodImage.translatesAutoresizingMaskIntoConstraints = false foodImage.contentMode = .scaleAspectFit feedBackImage.translatesAutoresizingMaskIntoConstraints = false feedBackImage.contentMode = .scaleAspectFit feedBackImage.isHidden = true feedBackImage.layer.zPosition = 1; view.addSubview(feedBackImage) // Produce Label foodLabel.translatesAutoresizingMaskIntoConstraints = false foodLabel.textAlignment = .center foodLabel.font = UIFont(name: "SFProText-Light", size: 26) // Code Label pluLabel.translatesAutoresizingMaskIntoConstraints = false pluLabel.font = UIFont(name: "SFProText-Light", size: 36) pluLabel.textAlignment = .center keyboard.translatesAutoresizingMaskIntoConstraints = false keyboard.delegate = self NSLayoutConstraint.activate([ foodImage.widthAnchor.constraint(equalToConstant: view.frame.width), foodImage.heightAnchor.constraint(equalToConstant: view.frame.height/4), keyboard.heightAnchor.constraint(equalToConstant: view.frame.height/3), feedBackImage.widthAnchor.constraint(equalToConstant: view.frame.width), feedBackImage.heightAnchor.constraint(equalToConstant: view.frame.height/4), feedBackImage.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor, constant: 5) ]) } private func addBarButtonItem(){ navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Refresh", style: .done, target: self, action: #selector(refreshButtonPressed)) } private func fetchProduce() { self.coreData.fetchPersistedData { (fetchItemsResult) in switch fetchItemsResult { case let .success(items): for item in items { let newItem = ProduceOLD(image: UIImage(data: item.image!)!, name: item.name, plu: item.plu) self.quiz.quiz.append(newItem) } case .failure(let error): print(error) } } } @objc func refreshButtonPressed() { quiz.quiz = [] self.fetchProduce() let alert = UIAlertController(title: "Quiz Refreshed", message: "Quiz has been reset", preferredStyle: UIAlertController.Style.alert) alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil)) self.present(alert, animated: true, completion: nil) } // @objc func checkButtonTapped() { // let userAnswer = pluLabel.text! // let correctAnswer = quiz.checkAnswer(userAnswer) // // if correctAnswer { // self.view.backgroundColor = .green // } else { // self.view.backgroundColor = .red // } // // } func configureStackView() { view.addSubview(stackView) stackView.axis = .vertical stackView.translatesAutoresizingMaskIntoConstraints = false stackView.distribution = .fillProportionally stackView.spacing = 5 stackView.addArrangedSubview(foodImage) stackView.addArrangedSubview(foodLabel) stackView.addArrangedSubview(pluLabel) stackView.addArrangedSubview(keyboard) NSLayoutConstraint.activate([ stackView.leadingAnchor.constraint(equalTo: view.leadingAnchor), stackView.trailingAnchor.constraint(equalTo: view.trailingAnchor), stackView.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor, constant: 10), stackView.bottomAnchor.constraint(equalTo: view.layoutMarginsGuide.bottomAnchor), ]) } // Grabs the produce UI from model @objc func updateUI(){ let produce = quiz.getFood() pluLabel.text = quiz.getUserInput() foodLabel.text = produce.name // pluLabel.text = "94011" pluLabel.text = "PLU Code?" foodImage.image = produce.image self.view.backgroundColor = .white feedBackImage.isHidden = true } // @IBAction func refreshButtonPressed(_ sender: UIBarButtonItem) { // quiz.quiz = pluList.pluList // updateUI() // } func deleteButtonPressed(_ sender: UIButton) { quiz.deleteNumber() updateUI() } // // @objc func submitButtonPressed(_ sender: UIButton) { // let userAnswer = pluLabel.text! // let correctAnswer = quiz.checkAnswer(userAnswer) // // if correctAnswer { // self.view.backgroundColor = .green // } else { // self.view.backgroundColor = .red // } // // // quiz.clearUserInput() // Timer.scheduledTimer(timeInterval: 0.2, target: self, selector: #selector(updateUI), userInfo: nil, repeats: false) // } // }
[ -1 ]
795ca96c6e759383819d8a5a98aed16ace06ab1e
c36845fa2a358a7009ff20d814921e11f366747a
/Sources/SwiftSDAIap242/entity-ap242/S/string_expression.swift
2f673bd18f74599226b4816f7701e3a5d9a6d482
[ "MIT" ]
permissive
tsun7170/SwiftSDAIap242
d7aaa707099ded34539ef82318ab7e2f73e3bd04
d1b72f0b5586db6cdd8a19c55fef120e943b7b6a
refs/heads/main
2022-09-04T02:02:06.286519
2022-08-14T11:09:16
2022-08-14T11:09:16
413,585,320
1
0
null
null
null
null
UTF-8
Swift
false
false
14,343
swift
/* file: string_expression.swift generated: Mon Jan 3 16:32:52 2022 */ /* This file was generated by the EXPRESS to Swift translator "exp2swift", derived from STEPcode (formerly NIST's SCL). exp2swift version: v.1.0.1, derived from stepcode v0.8 as of 2019/11/23 WARNING: You probably don't want to edit it since your modifications will be lost if exp2swift is used to regenerate it. */ import SwiftSDAIcore extension AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { //MARK: -ENTITY DEFINITION in EXPRESS /* ENTITY string_expression ABSTRACT SUPERTYPE OF ( ONEOF ( simple_string_expression, index_expression, substring_expression, concat_expression, format_function, string_defined_function ) ) SUBTYPE OF ( expression ); END_ENTITY; -- string_expression (line:30892 file:ap242ed2_mim_lf_v1.101.TY.exp) */ //MARK: - ALL DEFINED ATTRIBUTES /* SUPER- ENTITY(1) generic_expression (no local attributes) SUPER- ENTITY(2) expression (no local attributes) ENTITY(SELF) string_expression (no local attributes) SUB- ENTITY(4) concat_expression REDCR: operands, TYPE: LIST [2 : ?] OF string_expression -- EXPLICIT -- OVERRIDING ENTITY: multiple_arity_generic_expression SUB- ENTITY(5) string_literal ATTR: the_value, TYPE: STRING -- EXPLICIT SUB- ENTITY(6) maths_string_variable (no local attributes) SUB- ENTITY(7) string_variable (no local attributes) SUB- ENTITY(8) simple_string_expression (no local attributes) SUB- ENTITY(9) index_expression ATTR: operand, TYPE: generic_expression -- DERIVED (AMBIGUOUS/MASKED) := SELF\binary_generic_expression.operands[1] ATTR: index, TYPE: generic_expression -- DERIVED := SELF\binary_generic_expression.operands[2] SUB- ENTITY(10) substring_expression ATTR: operand, TYPE: generic_expression -- DERIVED (AMBIGUOUS/MASKED) := SELF\multiple_arity_generic_expression.operands[1] ATTR: index1, TYPE: generic_expression -- DERIVED := SELF\multiple_arity_generic_expression.operands[2] ATTR: index2, TYPE: generic_expression -- DERIVED := SELF\multiple_arity_generic_expression.operands[3] SUB- ENTITY(11) format_function ATTR: value_to_format, TYPE: generic_expression -- DERIVED := SELF\binary_generic_expression.operands[1] ATTR: format_string, TYPE: generic_expression -- DERIVED := SELF\binary_generic_expression.operands[2] SUB- ENTITY(12) string_defined_function (no local attributes) SUB- ENTITY(13) expression_extension_string (no local attributes) */ //MARK: - Partial Entity public final class _string_expression : SDAI.PartialEntity { public override class var entityReferenceType: SDAI.EntityReference.Type { eSTRING_EXPRESSION.self } //ATTRIBUTES // (no local attributes) public override var typeMembers: Set<SDAI.STRING> { var members = Set<SDAI.STRING>() members.insert(SDAI.STRING(Self.typeName)) return members } //VALUE COMPARISON SUPPORT public override func hashAsValue(into hasher: inout Hasher, visited complexEntities: inout Set<SDAI.ComplexEntity>) { super.hashAsValue(into: &hasher, visited: &complexEntities) } public override func isValueEqual(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool { guard let rhs = rhs as? Self else { return false } if !super.isValueEqual(to: rhs, visited: &comppairs) { return false } return true } public override func isValueEqualOptionally(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool? { guard let rhs = rhs as? Self else { return false } var result: Bool? = true if let comp = super.isValueEqualOptionally(to: rhs, visited: &comppairs) { if !comp { return false } } else { result = nil } return result } //EXPRESS IMPLICIT PARTIAL ENTITY CONSTRUCTOR public init() { super.init(asAbstructSuperclass:()) } //p21 PARTIAL ENTITY CONSTRUCTOR public required convenience init?(parameters: [P21Decode.ExchangeStructure.Parameter], exchangeStructure: P21Decode.ExchangeStructure) { let numParams = 0 guard parameters.count == numParams else { exchangeStructure.error = "number of p21 parameters(\(parameters.count)) are different from expected(\(numParams)) for entity(\(Self.entityName)) constructor"; return nil } self.init( ) } } //MARK: - Entity Reference /** ENTITY reference - EXPRESS: ```express ENTITY string_expression ABSTRACT SUPERTYPE OF ( ONEOF ( simple_string_expression, index_expression, substring_expression, concat_expression, format_function, string_defined_function ) ) SUBTYPE OF ( expression ); END_ENTITY; -- string_expression (line:30892 file:ap242ed2_mim_lf_v1.101.TY.exp) ``` */ public final class eSTRING_EXPRESSION : SDAI.EntityReference { //MARK: PARTIAL ENTITY public override class var partialEntityType: SDAI.PartialEntity.Type { _string_expression.self } public let partialEntity: _string_expression //MARK: SUPERTYPES public let super_eGENERIC_EXPRESSION: eGENERIC_EXPRESSION // [1] public let super_eEXPRESSION: eEXPRESSION // [2] public var super_eSTRING_EXPRESSION: eSTRING_EXPRESSION { return self } // [3] //MARK: SUBTYPES public var sub_eCONCAT_EXPRESSION: eCONCAT_EXPRESSION? { // [4] return self.complexEntity.entityReference(eCONCAT_EXPRESSION.self) } public var sub_eSTRING_LITERAL: eSTRING_LITERAL? { // [5] return self.complexEntity.entityReference(eSTRING_LITERAL.self) } public var sub_eMATHS_STRING_VARIABLE: eMATHS_STRING_VARIABLE? { // [6] return self.complexEntity.entityReference(eMATHS_STRING_VARIABLE.self) } public var sub_eSTRING_VARIABLE: eSTRING_VARIABLE? { // [7] return self.complexEntity.entityReference(eSTRING_VARIABLE.self) } public var sub_eSIMPLE_STRING_EXPRESSION: eSIMPLE_STRING_EXPRESSION? { // [8] return self.complexEntity.entityReference(eSIMPLE_STRING_EXPRESSION.self) } public var sub_eINDEX_EXPRESSION: eINDEX_EXPRESSION? { // [9] return self.complexEntity.entityReference(eINDEX_EXPRESSION.self) } public var sub_eSUBSTRING_EXPRESSION: eSUBSTRING_EXPRESSION? { // [10] return self.complexEntity.entityReference(eSUBSTRING_EXPRESSION.self) } public var sub_eFORMAT_FUNCTION: eFORMAT_FUNCTION? { // [11] return self.complexEntity.entityReference(eFORMAT_FUNCTION.self) } public var sub_eSTRING_DEFINED_FUNCTION: eSTRING_DEFINED_FUNCTION? { // [12] return self.complexEntity.entityReference(eSTRING_DEFINED_FUNCTION.self) } public var sub_eEXPRESSION_EXTENSION_STRING: eEXPRESSION_EXTENSION_STRING? { // [13] return self.complexEntity.entityReference(eEXPRESSION_EXTENSION_STRING.self) } //MARK: ATTRIBUTES // OPERAND: (2 AMBIGUOUS REFs) /// __DERIVE__ attribute /// - origin: SUB( ``eFORMAT_FUNCTION`` ) public var FORMAT_STRING: eGENERIC_EXPRESSION? { get { if let cached = cachedValue(derivedAttributeName:"FORMAT_STRING") { return cached.value as! eGENERIC_EXPRESSION? } guard let origin = sub_eFORMAT_FUNCTION else { return nil } let value = eGENERIC_EXPRESSION(origin.partialEntity._format_string__getter(SELF: origin)) updateCache(derivedAttributeName:"FORMAT_STRING", value:value) return value } } /// __EXPLICIT__ attribute /// - origin: SUB( ``eSTRING_LITERAL`` ) public var THE_VALUE: SDAI.STRING? { get { return sub_eSTRING_LITERAL?.partialEntity._the_value } set(newValue) { guard let partial = sub_eSTRING_LITERAL?.super_eSTRING_LITERAL.partialEntity else { return } partial._the_value = SDAI.UNWRAP(newValue) } } /// __DERIVE__ attribute /// - origin: SUB( ``eSUBSTRING_EXPRESSION`` ) public var INDEX2: eGENERIC_EXPRESSION? { get { if let cached = cachedValue(derivedAttributeName:"INDEX2") { return cached.value as! eGENERIC_EXPRESSION? } guard let origin = sub_eSUBSTRING_EXPRESSION else { return nil } let value = eGENERIC_EXPRESSION(origin.partialEntity._index2__getter(SELF: origin)) updateCache(derivedAttributeName:"INDEX2", value:value) return value } } /// __DERIVE__ attribute /// - origin: SUB( ``eSUBSTRING_EXPRESSION`` ) public var INDEX1: eGENERIC_EXPRESSION? { get { if let cached = cachedValue(derivedAttributeName:"INDEX1") { return cached.value as! eGENERIC_EXPRESSION? } guard let origin = sub_eSUBSTRING_EXPRESSION else { return nil } let value = eGENERIC_EXPRESSION(origin.partialEntity._index1__getter(SELF: origin)) updateCache(derivedAttributeName:"INDEX1", value:value) return value } } /// __DERIVE__ attribute /// - origin: SUB( ``eFORMAT_FUNCTION`` ) public var VALUE_TO_FORMAT: eGENERIC_EXPRESSION? { get { if let cached = cachedValue(derivedAttributeName:"VALUE_TO_FORMAT") { return cached.value as! eGENERIC_EXPRESSION? } guard let origin = sub_eFORMAT_FUNCTION else { return nil } let value = eGENERIC_EXPRESSION(origin.partialEntity._value_to_format__getter(SELF: origin)) updateCache(derivedAttributeName:"VALUE_TO_FORMAT", value:value) return value } } /// __EXPLICIT REDEF(DYNAMIC)__ attribute /// - origin: SUB( ``eCONCAT_EXPRESSION`` ) public var OPERANDS: (SDAI.LIST<eSTRING_EXPRESSION>/*[2:nil]*/ )? { get { if let resolved = _multiple_arity_generic_expression._operands__provider(complex: self.complexEntity) { let value = SDAI.LIST<eSTRING_EXPRESSION>(resolved._operands__getter(complex: self.complexEntity)) return value } else { return SDAI.LIST<eSTRING_EXPRESSION>(sub_eCONCAT_EXPRESSION?.super_eMULTIPLE_ARITY_GENERIC_EXPRESSION .partialEntity._operands) } } set(newValue) { if let _ = _multiple_arity_generic_expression._operands__provider(complex: self.complexEntity) { return } guard let partial = sub_eCONCAT_EXPRESSION?.super_eMULTIPLE_ARITY_GENERIC_EXPRESSION.partialEntity else { return } partial._operands = SDAI.UNWRAP( SDAI.LIST<eGENERIC_EXPRESSION>(newValue)) } } /// __DERIVE__ attribute /// - origin: SUB( ``eINDEX_EXPRESSION`` ) public var INDEX: eGENERIC_EXPRESSION? { get { if let cached = cachedValue(derivedAttributeName:"INDEX") { return cached.value as! eGENERIC_EXPRESSION? } guard let origin = sub_eINDEX_EXPRESSION else { return nil } let value = eGENERIC_EXPRESSION(origin.partialEntity._index__getter(SELF: origin)) updateCache(derivedAttributeName:"INDEX", value:value) return value } } //MARK: INITIALIZERS public convenience init?(_ entityRef: SDAI.EntityReference?) { let complex = entityRef?.complexEntity self.init(complex: complex) } public required init?(complex complexEntity: SDAI.ComplexEntity?) { guard let partial = complexEntity?.partialEntityInstance(_string_expression.self) else { return nil } self.partialEntity = partial guard let super1 = complexEntity?.entityReference(eGENERIC_EXPRESSION.self) else { return nil } self.super_eGENERIC_EXPRESSION = super1 guard let super2 = complexEntity?.entityReference(eEXPRESSION.self) else { return nil } self.super_eEXPRESSION = super2 super.init(complex: complexEntity) } public required convenience init?<G: SDAIGenericType>(fromGeneric generic: G?) { guard let entityRef = generic?.entityReference else { return nil } self.init(complex: entityRef.complexEntity) } public convenience init?<S: SDAISelectType>(_ select: S?) { self.init(possiblyFrom: select) } public convenience init?(_ complex: SDAI.ComplexEntity?) { self.init(complex: complex) } //MARK: DICTIONARY DEFINITION public class override var entityDefinition: SDAIDictionarySchema.EntityDefinition { _entityDefinition } private static let _entityDefinition: SDAIDictionarySchema.EntityDefinition = createEntityDefinition() private static func createEntityDefinition() -> SDAIDictionarySchema.EntityDefinition { let entityDef = SDAIDictionarySchema.EntityDefinition(name: "STRING_EXPRESSION", type: self, explicitAttributeCount: 0) //MARK: SUPERTYPE REGISTRATIONS entityDef.add(supertype: eGENERIC_EXPRESSION.self) entityDef.add(supertype: eEXPRESSION.self) entityDef.add(supertype: eSTRING_EXPRESSION.self) //MARK: ATTRIBUTE REGISTRATIONS entityDef.addAttribute(name: "FORMAT_STRING", keyPath: \eSTRING_EXPRESSION.FORMAT_STRING, kind: .derived, source: .subEntity, mayYieldEntityReference: true) entityDef.addAttribute(name: "THE_VALUE", keyPath: \eSTRING_EXPRESSION.THE_VALUE, kind: .explicit, source: .subEntity, mayYieldEntityReference: false) entityDef.addAttribute(name: "INDEX2", keyPath: \eSTRING_EXPRESSION.INDEX2, kind: .derived, source: .subEntity, mayYieldEntityReference: true) entityDef.addAttribute(name: "INDEX1", keyPath: \eSTRING_EXPRESSION.INDEX1, kind: .derived, source: .subEntity, mayYieldEntityReference: true) entityDef.addAttribute(name: "VALUE_TO_FORMAT", keyPath: \eSTRING_EXPRESSION.VALUE_TO_FORMAT, kind: .derived, source: .subEntity, mayYieldEntityReference: true) entityDef.addAttribute(name: "OPERANDS", keyPath: \eSTRING_EXPRESSION.OPERANDS, kind: .explicitRedeclaring, source: .subEntity, mayYieldEntityReference: true) entityDef.addAttribute(name: "INDEX", keyPath: \eSTRING_EXPRESSION.INDEX, kind: .derived, source: .subEntity, mayYieldEntityReference: true) return entityDef } } }
[ -1 ]
249a3f20f9738922563dc68b8e201b20aeded522
ed89f7f3241fca79ad5baa3997fb335d86d5e924
/iOSQuiz/iOSQuizUITests/iOSQuizUITests.swift
8eeff255157588576644d06f10e1ef8f23e59833
[]
no_license
kegplant/iOS_Basics_Assignments
5b1db4faa36f48c1690cbcec536f99ad7aa99003
e82ee2b952e61ab6f9a0833436c1fdc273901b44
refs/heads/master
2021-05-12T16:23:12.343298
2018-01-12T00:25:51
2018-01-12T00:25:51
117,010,869
0
0
null
null
null
null
UTF-8
Swift
false
false
1,229
swift
// // iOSQuizUITests.swift // iOSQuizUITests // // Created by Song on 1/9/18. // Copyright © 2018 Song. All rights reserved. // import XCTest class iOSQuizUITests: XCTestCase { override func setUp() { super.setUp() // 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 // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. XCUIApplication().launch() // 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 tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 333827, 182277, 243720, 282634, 313356, 155665, 305173, 241695, 223269, 229414, 315431, 354342, 102441, 315433, 278571, 313388, 325675, 354346, 282671, 102446, 229425, 243763, 241717, 180279, 229431, 215095, 213051, 288829, 325695, 288835, 286787, 307269, 237638, 313415, 239689, 233548, 311373, 196687, 278607, 311377, 354386, 223317, 315477, 368732, 180317, 323678, 315488, 321632, 45154, 280676, 313446, 215144, 307306, 217194, 233578, 194667, 278637, 288878, 319599, 278642, 284789, 131190, 288890, 215165, 131199, 194692, 278669, 235661, 333968, 241809, 278676, 311447, 153752, 284827, 278684, 329884, 299166, 278690, 311459, 215204, 233635, 333990, 284840, 299176, 184489, 284843, 278698, 323761, 184498, 278707, 278713, 223418, 280761, 180409, 295099, 227517, 258233, 280767, 299197, 299202, 139459, 309443, 176325, 338118, 131270, 299208, 227525, 301255, 280779, 227536, 282832, 301270, 229591, 301271, 280792, 147679, 147680, 311520, 325857, 356575, 280803, 307431, 338151, 295147, 317676, 286957, 395511, 313595, 184574, 309504, 217352, 194832, 227601, 319764, 278805, 338196, 282908, 299294, 311582, 282912, 233761, 278817, 211239, 282920, 334121, 317738, 325930, 311596, 338217, 321839, 336177, 315698, 98611, 282938, 307514, 127292, 278843, 168251, 287040, 311622, 280903, 227655, 323914, 201037, 383309, 229716, 250196, 289109, 379224, 323934, 391521, 239973, 381286, 285031, 313703, 416103, 280938, 242027, 242028, 321901, 354671, 278895, 287089, 250227, 199030, 227702, 315768, 291193, 139641, 223611, 291194, 311679, 211327, 291200, 240003, 313736, 227721, 242059, 106893, 227730, 285074, 240020, 190870, 190872, 291225, 285083, 317851, 293275, 242079, 227743, 285089, 293281, 289185, 305572, 156069, 283039, 301482, 289195, 375211, 311723, 377265, 334259, 338359, 299449, 319931, 311739, 293309, 278974, 336319, 311744, 317889, 336323, 278979, 278988, 129484, 281038, 281039, 278992, 283089, 289229, 326093, 279000, 176602, 242138, 160224, 279009, 291297, 285152, 369121, 188899, 279014, 302539, 279017, 311787, 334315, 281071, 236020, 279030, 311800, 293368, 279033, 317949, 279042, 283138, 233987, 324098, 287237, 334345, 309770, 340489, 342537, 279053, 283154, 303634, 279060, 279061, 303635, 182802, 279066, 322077, 291359, 342560, 370122, 293420, 236080, 289328, 283185, 279092, 23093, 234037, 244279, 338491, 340539, 301635, 309831, 55880, 322119, 377419, 303693, 281165, 301647, 281170, 326229, 115287, 189016, 244311, 287319, 332379, 309847, 111197, 295518, 287327, 283431, 242274, 279143, 279150, 281200, 287345, 313970, 287348, 301688, 189054, 303743, 297600, 287359, 291455, 301702, 164487, 279176, 311944, 334473, 344714, 316044, 311948, 311950, 326288, 311953, 316048, 287379, 336531, 295575, 227991, 289435, 303772, 205469, 221853, 285348, 340645, 314020, 279207, 295591, 176810, 248494, 279215, 293552, 295598, 285362, 299698, 279218, 166581, 164532, 342705, 285360, 154295, 287418, 314043, 303802, 287412, 66243, 291529, 287434, 225996, 363212, 287438, 135888, 279249, 242385, 303826, 369365, 369366, 279253, 158424, 230105, 299737, 322269, 338658, 295653, 342757, 289511, 230120, 234216, 330473, 285419, 330476, 289517, 279278, 312046, 215790, 170735, 125683, 230133, 199415, 342775, 234233, 242428, 279293, 205566, 289534, 35584, 299777, 322302, 228099, 285443, 375552, 291584, 291591, 322312, 346889, 285450, 295688, 312076, 326413, 285457, 295698, 291605, 166677, 207639, 283418, 285467, 221980, 281378, 234276, 336678, 318247, 203560, 279337, 262952, 318251, 293673, 262957, 289580, 164655, 328495, 262953, 234290, 301872, 285493, 230198, 285496, 301883, 201534, 289599, 342846, 222017, 295745, 281407, 293702, 318279, 283466, 281426, 279379, 244569, 234330, 281434, 295769, 201562, 230238, 275294, 301919, 279393, 293729, 357219, 281444, 303973, 279398, 351078, 349025, 243592, 177002, 308075, 242540, 310132, 295797, 228214, 207735, 201590, 295799, 177018, 279418, 308093, 336765, 314240, 291713, 158594, 330627, 340865, 240517, 287623, 228232, 299912, 279434, 320394, 316299, 252812, 234382, 308111, 189327, 308113, 293780, 310166, 289691, 209820, 240543, 283551, 310177, 289699, 189349, 289704, 293801, 279465, 326571, 177074, 304050, 326580, 289720, 326586, 289723, 189373, 213956, 359365, 19398, 345030, 281541, 213961, 127945, 211913, 279499, 56270, 191445, 304086, 183254, 207839, 340960, 234469, 314343, 123880, 340967, 304104, 234476, 183276, 203758, 248815, 320495, 320492, 287730, 240631, 214009, 201721, 312313, 312315, 312317, 234499, 418819, 293894, 330759, 320520, 322571, 230411, 330766, 234513, 238611, 293911, 140311, 238617, 197658, 326684, 336930, 113710, 189487, 281647, 318515, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 336962, 314437, 349254, 238663, 300109, 234578, 207954, 250965, 205911, 339031, 296023, 314458, 156763, 281698, 281699, 230500, 285795, 250982, 322664, 228457, 279659, 318571, 234606, 230514, 238706, 187508, 312435, 279666, 300147, 302202, 285819, 285823, 150656, 234626, 279686, 222344, 285833, 285834, 234635, 228492, 318602, 337037, 177297, 162962, 187539, 347286, 308375, 285850, 296091, 119965, 234655, 300192, 302239, 330912, 306339, 234662, 300200, 302251, 208044, 238764, 3243, 322733, 249003, 294069, 324790, 300215, 64699, 294075, 228541, 339131, 343230, 283841, 148674, 283846, 312519, 279752, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 279775, 304352, 339167, 310496, 298209, 304353, 279780, 228587, 279789, 302319, 316661, 234741, 208123, 292092, 279803, 228608, 234756, 322826, 242955, 312588, 177420, 126229, 320795, 320802, 130342, 304422, 130344, 130347, 292145, 298290, 208179, 312628, 345398, 300342, 159033, 222523, 286012, 181568, 279872, 279874, 300355, 193858, 294210, 216387, 372039, 300354, 304457, 230730, 345418, 294220, 337228, 296269, 224591, 222542, 234830, 296274, 238928, 150868, 331091, 314708, 283990, 357720, 318804, 300378, 300379, 314711, 294236, 314721, 230757, 281958, 314727, 134504, 306541, 327023, 234864, 296304, 312688, 316786, 230772, 314740, 327030, 284015, 310650, 224637, 306558, 337280, 306561, 243073, 179586, 294278, 296328, 296330, 298378, 318860, 314765, 368012, 9618, 279955, 306580, 112019, 224662, 234902, 282008, 292242, 314776, 318876, 282013, 290206, 343457, 148899, 314788, 298406, 282023, 245160, 279979, 279980, 241067, 314797, 286128, 173492, 279988, 286133, 284086, 259513, 310714, 284090, 228796, 54719, 302530, 280003, 228804, 292291, 306630, 310725, 415170, 306634, 300490, 310731, 339403, 234957, 337359, 329168, 312785, 222674, 329170, 280020, 310735, 280025, 310747, 239069, 144862, 286176, 187877, 310758, 280042, 280043, 191980, 300526, 329198, 337391, 282097, 296434, 308722, 40439, 191991, 286201, 288248, 300539, 288252, 210429, 359931, 312830, 290304, 245249, 228868, 323079, 218632, 292359, 302602, 323083, 230922, 294413, 359949, 304655, 323088, 329231, 282132, 302613, 230933, 316951, 175640, 374297, 282135, 302620, 222754, 312879, 230960, 288305, 290359, 239159, 323132, 235069, 157246, 288319, 288322, 280131, 349764, 282182, 194118, 288328, 292424, 292426, 286281, 333389, 349780, 290391, 128600, 235096, 239192, 196184, 306777, 212574, 99937, 204386, 300643, 300645, 282214, 312937, 204394, 138862, 206447, 310896, 314997, 294517, 290425, 288377, 339579, 337533, 325246, 333438, 235136, 280193, 282244, 239238, 288391, 282248, 286344, 179853, 286351, 188049, 229011, 239251, 280217, 323226, 179868, 229021, 302751, 198304, 282272, 245413, 282279, 298664, 298666, 317102, 286387, 300725, 286392, 300729, 302778, 306875, 280252, 280253, 282302, 323262, 286400, 321217, 296636, 280259, 282309, 239305, 296649, 280266, 212684, 306891, 302798, 9935, 241360, 282321, 313042, 286419, 333522, 241366, 280279, 282330, 18139, 294621, 280285, 282336, 325345, 321250, 294629, 153318, 337638, 333543, 12009, 181992, 282347, 288492, 282349, 34547, 67316, 323315, 286457, 284410, 313082, 200444, 288508, 282366, 286463, 319232, 288515, 249606, 282375, 280326, 284425, 300810, 282379, 216844, 116491, 284430, 300812, 280333, 161553, 278292, 118549, 278294, 282390, 116502, 284436, 325403, 321308, 321309, 341791, 241440, 282401, 339746, 282399, 186148, 186149, 216868, 241447, 315172, 280011, 294699, 284460, 286507, 280367, 300849, 282418, 280373, 282424, 280377, 319289, 282428, 280381, 345918, 413500, 280386, 325444, 280391, 153416, 315209, 325449, 159563, 280396, 307024, 325460, 237397, 341846, 18263, 317268, 188250, 284508, 300893, 307038, 370526, 237411, 284515, 276326, 282471, 296807, 292713, 282476, 292719, 313200, 296815, 325491, 313204, 317305, 339840, 280451, 325508, 327556, 333700, 282503, 67464, 305032, 325514, 350091, 350092, 188293, 315272, 311183, 315275, 184207, 282517, 294806, 350102, 214936, 294808, 337816, 239515, 333727, 298912, 319393, 214943, 294820, 118693, 219046, 284584, 294824, 313257, 298921, 292783, 126896, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 24531, 231382, 323554, 292835, 292838, 294887, 317416, 174058, 278507, 313322, 298987, 296942, 311277, 327666, 278515, 325620, 239610 ]
b4f416ac65443b61c1c3a346e6f20365f21e0729
3df8aaddd8e3624c387da0fddd7aa7eca25d9954
/TuAi/Classes/Favourite/View/TAFavouriteVideoChildCell.swift
096fa180ed4438bb9bb01daef1b10923e8df87a5
[ "MIT" ]
permissive
gouyz/GYZTuAi
077b0e5dbc635258a2864817b56c076ea0c837c8
5155ee29eca404c8a33e15bdae81773e8d75dbff
refs/heads/master
2021-01-24T04:56:01.849049
2018-11-01T14:56:14
2018-11-01T14:56:14
122,955,500
1
0
null
null
null
null
UTF-8
Swift
false
false
1,711
swift
// // TAFavouriteVideoChildCell.swift // TuAi // 收藏 child cell // Created by gouyz on 2018/3/9. // Copyright © 2018年 gyz. All rights reserved. // import UIKit class TAFavouriteVideoChildCell: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) self.backgroundColor = kWhiteColor addSubview(iconView) iconView.addSubview(playImgView) addSubview(desLab) iconView.snp.makeConstraints { (make) in make.left.top.right.equalTo(self) make.height.equalTo(80) } playImgView.snp.makeConstraints { (make) in make.center.equalTo(iconView) make.size.equalTo(CGSize.init(width: kTitleHeight, height: kTitleHeight)) } desLab.snp.makeConstraints { (make) in make.left.right.equalTo(iconView) make.bottom.equalTo(-5) make.top.equalTo(iconView.snp.bottom).offset(5) } } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } /// 图片 lazy var iconView: UIImageView = { let imgView = UIImageView() imgView.backgroundColor = kBackgroundColor return imgView }() /// 播放图片 lazy var playImgView: UIImageView = UIImageView.init(image: UIImage.init(named: "icon_video_play")) /// 描述 lazy var desLab : UILabel = { let lab = UILabel() lab.textColor = kBlackFontColor lab.font = k13Font lab.numberOfLines = 2 lab.text = "儿童教育学专家儿童教育学专家儿童教育学专家" return lab }() }
[ -1 ]
40b8ab1e5a7b7db80720d437c88482c7a7379c8f
59c0d519ec891d97a7a9dbc659396fe1e5d0d356
/Flix/Movie.swift
c59737b853c632e37ad1e374846ce2305930af87
[ "Apache-2.0" ]
permissive
Claudiazhaoya/Flix
c8bdfd420bda8e413f9d5a46c807c7ecc8e8d501
e5f275827f29cd6ceacf081cb787272530d9e79e
refs/heads/master
2021-08-24T12:32:51.715279
2017-12-09T22:04:44
2017-12-09T22:04:44
110,316,808
0
0
null
null
null
null
UTF-8
Swift
false
false
1,007
swift
// // Movie.swift // Flix // // Created by Zhaoya Sun on 12/9/17. // Copyright © 2017 CodePath University. All rights reserved. // import Foundation class Movie { var title: String var overview: String var posterUrl: String var backdropBathUrl: String var releaseDate: String init(dictionary: [String: Any]) { title = dictionary["title"] as? String ?? "No title" overview = dictionary["overview"] as? String ?? "No overview" posterUrl = dictionary["poster_path"] as? String ?? "No poster" backdropBathUrl = dictionary["backdrop_path"] as? String ?? "No background Image" releaseDate = dictionary["release_date"] as? String ?? "Release Date unknown" } class func movies(dictionaries: [[String: Any]]) -> [Movie] { var movies: [Movie] = [] for dictionary in dictionaries { let movie = Movie(dictionary: dictionary) movies.append(movie) } return movies } }
[ -1 ]
30726b5221c74599744204f9bc2bac54280a8d1a
ea1298a78db7cae13063e0d727e1f556b2b135ee
/Sources/KLocationRepresentable.swift
86305ddca37b5143e3f8531fdbbc59499d6bd809
[ "MIT" ]
permissive
fr-josh/Karte
86d18b68eb8e27e180a1fa08faa6ce5a1941453d
0750c603bbe1dbd42a18c71dfc8b3a03a0e46259
refs/heads/master
2020-03-19T07:58:09.650340
2018-06-05T11:11:21
2018-06-05T11:11:21
136,164,584
0
0
MIT
2018-06-05T11:03:40
2018-06-05T11:03:39
null
UTF-8
Swift
false
false
1,326
swift
// // LocationRepresentable.swift // Karte // // Created by Kilian Költzsch on 17.04.17. // Copyright © 2017 Karte. All rights reserved. // import Foundation import struct CoreLocation.CLLocationCoordinate2D import class MapKit.MKMapItem import class MapKit.MKPlacemark public protocol KLocationRepresentable { var latitude: Double { get } var longitude: Double { get } /// - Note: This property is not supported by all navigation apps. var name: String? { get } var address: String? { get } } extension KLocationRepresentable { internal var mapItem: MKMapItem { let placemark = MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: self.latitude, longitude: self.longitude)) let mapItem = MKMapItem(placemark: placemark) mapItem.name = self.name return mapItem } internal var coordString: String { return "\(self.latitude),\(self.longitude)" } } extension CLLocationCoordinate2D: KLocationRepresentable { public var name: String? { return nil } public var address: String? { return nil } } extension KLocation: KLocationRepresentable { public var latitude: Double { return self.coordinate.latitude } public var longitude: Double { return self.coordinate.longitude } }
[ -1 ]
39cefbf9cbbca0dceba80b798b1dc216df6ef4aa
51cc04e83637f09b9faf70136bbeb61d0745ffe3
/SampleSiri/SampleSiri/SampleTime/SampleTime.swift
44f9913167b7c7d103738df7ea54a380796f805a
[]
no_license
ZuzannaWeichel/SampleSiri
242c5e041f9fb2256415976e5d0b1c1ae783fe4e
ad96e1cd50eb9700c231c18552b8965e73e23f07
refs/heads/master
2022-11-29T09:18:10.693107
2020-08-14T19:06:38
2020-08-14T19:06:38
287,604,288
0
0
null
null
null
null
UTF-8
Swift
false
false
643
swift
// // SampleTime.swift // SampleSiri // // Created by victor.t.stasek on 3/13/20. // import Foundation class SampleTime { static var sharedInstance = SampleTime() var date : Date! public var militaryFormat = "MM-dd-yyyy HH:mm:ss" public var shortFormat = "MM/dd/yyyy h:mm a" func currentDate() -> Date { date = Date() return date } public func getFormattedTime(format: String, date: Date) -> String { let formatter = DateFormatter() formatter.dateFormat = format let currentDateTime = formatter.string(from: date) return currentDateTime } }
[ -1 ]
7b0a16c604f1f3923e4cfdacd41961b3243e06cd
67cbd32ac586118de4140ea8736c799de7b17640
/WeatherYARCH/Sources/Modules/Cities/CitiesViewController.swift
5da380d00bfa1c4018cfa35ddf12c7bbc3b0b27a
[ "MIT" ]
permissive
FilippLebedev/WeatherVIP
89599482d6dd9e405ebc1ed82cf17161465b6ae3
311a1ec79091135708d40c6b00820d7546b47bf3
refs/heads/master
2020-06-06T01:58:21.331375
2020-01-06T21:11:08
2020-01-06T21:11:08
192,607,772
3
0
null
null
null
null
UTF-8
Swift
false
false
3,344
swift
// // Cities module // Created by Filipp Lebedev on 05/05/2019. // import UIKit import Alertift protocol CitiesDisplayLogic: class { func displayCities(viewModel: Cities.ShowCities.ViewModel) func displayCityDeletion(viewModel: Cities.DeleteCity.ViewModel) } protocol CitiesViewControllerDelegate: AnyObject { func selectCity(id: UniqueIdentifier) func deleteCity(id: UniqueIdentifier) } class CitiesViewController: UIViewController { @IBOutlet weak var tableView: UITableView! var interactor: CitiesBusinessLogic? var state: Cities.ViewControllerState = .loading var tableDataSource: CitiesTableDataSource = CitiesTableDataSource() var tableHandler: CitiesTableDelegate = CitiesTableDelegate() var tableStateManager: TableStateManager = CitiesTableStateManager() func setup(interactor: CitiesBusinessLogic, initialState: Cities.ViewControllerState = .loading) { self.interactor = interactor self.state = initialState tableHandler.delegate = self tableDataSource.delegate = self } override func viewDidLoad() { super.viewDidLoad() tableView.delegate = tableHandler tableView.dataSource = tableDataSource tableView.tableFooterView = UIView(frame: .zero) tableStateManager.tableView = tableView interactor?.setupCitiesObserving(request: Cities.ShowCities.Request()) } private func updateView(_ models: [CitiesCityModel]) { tableDataSource.representableViewModels = models tableHandler.representableViewModels = models tableView.reloadData() } private func pushCity(id: UniqueIdentifier) { let cityController = CityBuilder().set(initialState: .initial(id: id)).build() navigationController?.pushViewController(cityController, animated: true) } } extension CitiesViewController: CitiesDisplayLogic { func displayCities(viewModel: Cities.ShowCities.ViewModel) { display(newState: viewModel.state) } func displayCityDeletion(viewModel: Cities.DeleteCity.ViewModel) { if viewModel.isSuccess { // View will update automatically by notification } else if let message = viewModel.errorMessage { Alertift.alert(title: "Error", message: message) .action(.default("OK")) .show() } } private func display(newState: Cities.ViewControllerState) { state = newState switch state { case .loading: tableStateManager.setResultState() case let .error(message): Alertift.alert(title: "Error", message: message) .action(.default("OK")) .show() tableStateManager.setResultState() case let .result(items): updateView(items) tableStateManager.setResultState() case .emptyResult: updateView([]) tableStateManager.setEmptyState() } } } extension CitiesViewController: CitiesViewControllerDelegate { func selectCity(id: UniqueIdentifier) { pushCity(id: id) } func deleteCity(id: UniqueIdentifier) { interactor?.deleteCity(request: Cities.DeleteCity.Request(cityId: id)) } }
[ -1 ]
ac374aba5a54a9491f9483c32e276e0cea16530f
3d144a23e67c839a4df1c073c6a2c842508f16b2
/test/APINotes/versioned-objc-dynamic-lookup.swift
ea819c9353908f23e0d1f1d3b3874c8692f78848
[ "Apache-2.0", "Swift-exception" ]
permissive
apple/swift
c2724e388959f6623cf6e4ad6dc1cdd875fd0592
98ada1b200a43d090311b72eb45fe8ecebc97f81
refs/heads/main
2023-08-16T10:48:25.985330
2023-08-16T09:00:42
2023-08-16T09:00:42
44,838,949
78,897
15,074
Apache-2.0
2023-09-14T21:19:23
2015-10-23T21:15:07
C++
UTF-8
Swift
false
false
1,921
swift
// RUN: %empty-directory(%t) // RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 5 %s 2>&1 | %FileCheck -check-prefix=CHECK-DIAGS -check-prefix=CHECK-DIAGS-5 %s // RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 4 %s 2>&1 | %FileCheck -check-prefix=CHECK-DIAGS -check-prefix=CHECK-DIAGS-4 %s // REQUIRES: objc_interop import APINotesFrameworkTest func testRenamedClassMembers(obj: AnyObject) { // CHECK-DIAGS-4: swift:[[@LINE+1]]:{{[0-9]+}}: error: 'doImportantThings()' has been renamed to 'swift4DoImportantThings()' obj.doImportantThings() // CHECK-DIAGS-5: swift:[[@LINE-1]]:{{[0-9]+}}: error: 'doImportantThings()' has been renamed to 'finalDoImportantThings()' // CHECK-DIAGS-4-NOT: swift:[[@LINE+1]]:{{[0-9]+}}: obj.swift4DoImportantThings() // CHECK-DIAGS-5: swift:[[@LINE-1]]:{{[0-9]+}}: error: 'swift4DoImportantThings()' has been renamed to 'finalDoImportantThings()' // CHECK-DIAGS-4: swift:[[@LINE+1]]:{{[0-9]+}}: error: 'finalDoImportantThings()' has been renamed to 'swift4DoImportantThings()' obj.finalDoImportantThings() // CHECK-DIAGS-5-NOT: swift:[[@LINE-1]]:{{[0-9]+}}: // CHECK-DIAGS-4: swift:[[@LINE+1]]:{{[0-9]+}}: error: 'importantInstanceProperty' has been renamed to 'swift4InstanceProperty' _ = obj.importantInstanceProperty // CHECK-DIAGS-5: swift:[[@LINE-1]]:{{[0-9]+}}: error: 'importantInstanceProperty' has been renamed to 'finalInstanceProperty' // CHECK-DIAGS-4-NOT: swift:[[@LINE+1]]:{{[0-9]+}}: _ = obj.swift4InstanceProperty // CHECK-DIAGS-5: swift:[[@LINE-1]]:{{[0-9]+}}: error: 'swift4InstanceProperty' has been renamed to 'finalInstanceProperty' // CHECK-DIAGS-4: swift:[[@LINE+1]]:{{[0-9]+}}: error: 'finalInstanceProperty' has been renamed to 'swift4InstanceProperty' _ = obj.finalInstanceProperty // CHECK-DIAGS-5-NOT: swift:[[@LINE-1]]:{{[0-9]+}}: }
[ 81722, 70654 ]
499928b69cd76fe87827913ad2decdffd7001fbc
39efe35fabe5625868951e1a734556e11585e1b3
/AssignmentRNSSI/Model/PinAnnotation.swift
3b654ebafad1ccb3cb7a3c048bb7a0e6fdcfedc9
[]
no_license
dinesh2910/Track-Airport-Weather-Conditions
c6946deaea094d9d09f6e379a892c1825ec396bb
af1c48090b4a7e9a26a0cf7a6466abd777525fce
refs/heads/master
2020-03-07T13:59:32.605186
2018-03-31T08:54:46
2018-03-31T08:54:46
127,515,817
1
0
null
null
null
null
UTF-8
Swift
false
false
647
swift
// // PinAnnotation.swift // AssignmentRNSSI // // Created by dinesh danda on 3/29/18. // Copyright © 2018 dinesh danda. All rights reserved. // import Foundation import MapKit import Foundation import UIKit class PinAnnotation : NSObject, MKAnnotation { private var coord: CLLocationCoordinate2D = CLLocationCoordinate2D(latitude: 0, longitude: 0) var coordinate: CLLocationCoordinate2D { get { return coord } } var annTitle : String = "" var annSubtitle : String = "" func setCoordinate(newCoordinate: CLLocationCoordinate2D) { self.coord = newCoordinate } }
[ -1 ]
c7967271d4a489c8494b22fa7d856684b2b99739
143d0ef3c1dd8ede669152d2adfbb802bdcc25c0
/Spot/Controller/Authentication Controllers/LoginViewController.swift
d689715f7f59d1fa1f8870e9d7b62ea52f0c80c1
[ "MIT" ]
permissive
Djayl/Spot
4df2da3654130a9d9c8962b9e5e04a984c5b8be8
23354f0f117ed396d0fe2c5a37686d41e74b164b
refs/heads/master
2020-07-25T10:53:48.387889
2020-02-27T12:31:13
2020-02-27T12:31:13
208,264,448
1
0
null
null
null
null
UTF-8
Swift
false
false
3,902
swift
// // LoginViewController.swift // Spot // // Created by MacBook DS on 17/09/2019. // Copyright © 2019 Djilali Sakkar. All rights reserved. // import UIKit import ProgressHUD @available(iOS 13.0, *) final class LoginViewController: UIViewController { // MARK: - Outlets @IBOutlet private weak var loginButton: CustomButton! @IBOutlet private weak var emailTextField: UITextField! @IBOutlet private weak var passwordTextField: UITextField! // MARK: - View Life Cycle override func viewDidLoad() { super.viewDidLoad() hideKeyboardWhenTappedAround() emailTextField.delegate = self passwordTextField.delegate = self navigationController?.navigationBar.barTintColor = UIColor.white setupTextFields() } // MARK: - Actions @IBAction private func loginAction(_ sender: Any) { logIn() } @IBAction private func resetPassword() { guard let email = emailTextField.text, emailTextField.text?.isEmpty == false else { ProgressHUD.showError("Merci de renseigner une adresse mail.") return } let authService = AuthService() authService.resetMyPassword(email: email, onSucess: { self.view.endEditing(true) ProgressHUD.showSuccess("Un mail vient de vous être transmis. Merci de vérifier votre boite mail et suivre les indications.") }) { (errorMessage) in ProgressHUD.showError(errorMessage) } // authService.resetPassword(email: email) { [weak self] authDataResult, error in // if error == nil && authDataResult != nil { // self?.showSimpleAlert(message: "Un mail vient de vous être transmis") // print("password send") // } else { // print("thers is an error") // self?.presentAlert(with: error?.localizedDescription ?? "Erreur réseau") // } // } } @IBAction private func noAccount(_ sender: Any) { performSegue(withIdentifier: "goToSignUp", sender: self) } // MARK: - Methods private func setupTextFields() { emailTextField.layer.borderWidth = 1 emailTextField.layer.borderColor = Colors.blueBalloon.cgColor emailTextField.layer.cornerRadius = 5 passwordTextField.layer.cornerRadius = 5 passwordTextField.layer.borderWidth = 1 passwordTextField.layer.borderColor = Colors.blueBalloon.cgColor } private func logIn() { guard let email = emailTextField.text, !email.isEmpty else { self.loginButton.shake() presentAlert(with: "Merci d'entrer une adresse mail") return } guard let password = passwordTextField.text, !password.isEmpty else { self.loginButton.shake() presentAlert(with: "Merci d'entrer un mot de passe") return } let authService = AuthService() authService.signIn(email: email, password: password) { [weak self] authDataResult, error in if error == nil && authDataResult != nil { NotificationCenter.default.post(name: Notification.Name("showSpots"), object: nil) self?.dismiss(animated: true, completion: nil) } else { print("Error loging user: \(error!.localizedDescription)") self?.presentAlert(with: error?.localizedDescription ?? "Erreur réseau") } } } } // MARK: - UITextfield Delegate @available(iOS 13.0, *) extension LoginViewController: UITextFieldDelegate { internal func textFieldShouldReturn(_ textField: UITextField) -> Bool { textField.resignFirstResponder() return true } }
[ -1 ]
bd1a0743127346c5c28b4231f2b36221e2f4ab21
05fcca8fd8fa15ac3afac49b542837f8b602a669
/LoremPicsum/Model/ImageCache.swift
7e88cb3cfa10886aa490ea7abd109b5b52d10dd2
[]
no_license
ionel71089/lorempicsum
08af2748f1fa6f3c49d666ff02f36699b9236584
3c86d1cac5c4b7a7f0762b6e6fdee4adaec8759a
refs/heads/master
2022-06-15T10:12:19.865962
2020-05-09T10:43:40
2020-05-09T10:43:40
262,549,509
0
0
null
null
null
null
UTF-8
Swift
false
false
566
swift
// // ImageCache.swift // LoremPicsum // // Created by Ionel Lescai on 08/05/2020. // Copyright © 2020 Ionel Lescai. All rights reserved. // import UIKit class ImageCache { private var cache = NSCache<NSString, UIImage>() init() { cache.countLimit = 100 } subscript(id: String) -> UIImage? { get { cache.object(forKey: NSString(string: id)) } set { if let image = newValue { cache.setObject(image, forKey: NSString(string: id)) } } } }
[ -1 ]
d6d0ac5df44f8adadc2cb36b4c2d5ba6b683e87f
8378e37f65ed04c187e0320f1ade3d955ba00355
/EventManagerUICollectionView/HeaderView.swift
d1a647acfcd18f50ec6bee45d292db7c26dc4d77
[]
no_license
HuynhThienIOS/IOS-SWIFT3-GST2017-EventManagerUICollectionView
150d9fcc441d29a97db210c7388064695dfdb638
bbd9704d5659c5bc6836a381ec16d4e826b68079
refs/heads/master
2021-01-20T08:33:35.463478
2017-05-06T16:02:10
2017-05-06T16:02:10
90,163,018
1
0
null
null
null
null
UTF-8
Swift
false
false
471
swift
// // HeaderView.swift // EventManagerUICollectionView // // Created by Thiện Huỳnh on 5/5/17. // Copyright © 2017 Thiện Huỳnh. All rights reserved. // import UIKit class HeaderView: UICollectionReusableView { @IBOutlet weak var dayImage: UIImageView! @IBOutlet weak var dayName: UILabel! func didSet(dayEvent: DayEvent) { dayImage.image = UIImage(named: dayEvent.dayImageName) dayName.text = dayEvent.dayImageName } }
[ -1 ]
f947b95f56c61f21998da08caf408235b3c22ff6
70f3f5f6ae2ff5904e1f46881fe2711c3e0de173
/Continuum/Resources/AppDelegate.swift
3ddf1870636b7bcfba29e003fe682c1f63467c2c
[]
no_license
dustin-koch/DustinGram
883642d6a4d688433892c1571c2b318ab5b70bea
d59ccf3071a64c9b8f43ed55354864b511ab60d3
refs/heads/master
2020-05-31T20:23:39.263292
2019-06-05T22:01:22
2019-06-05T22:01:22
190,474,855
1
0
null
null
null
null
UTF-8
Swift
false
false
2,181
swift
// // AppDelegate.swift // Continuum // // Created by Dustin Koch on 6/4/19. // Copyright © 2019 Rabbit Hole Fashion. 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, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 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, 254563, 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, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 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, 238528, 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, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 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, 214294, 304416, 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, 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, 288212, 222676, 148946, 288214, 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, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 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, 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, 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, 182517, 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, 354656, 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, 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, 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, 241821, 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, 295583, 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, 127431, 127434, 315856, 176592, 127440, 315860, 176597, 127447, 283095, 299481, 127449, 176605, 242143, 127455, 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, 119509, 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, 348950, 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, 291742, 226200, 234398, 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, 234510, 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, 177318, 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, 284076, 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, 316959, 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, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 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, 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, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 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, 129200, 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, 227571, 309491, 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, 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, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 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, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 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, 244731, 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, 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, 310486, 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, 384302, 285999, 277804, 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, 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, 302534, 310727, 245191, 64966, 163272, 277959, 277963, 302541, 277966, 302543, 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, 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, 122517, 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, 352008, 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, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
64639f62c036761aa63b9ee9efadf18ee4548038
f9577f4e3383089bab3c706c913c97a28f182ec9
/Sources/Cardano/Ed25519Signature.swift
7b37d7f1c8955b7e57a8dda9db65619278c44015
[ "Apache-2.0" ]
permissive
ngoluuduythai/Cardano.swift
063938e6f6635ce216a00a9eae42d3de07ff565a
460fe1934209e7ba9a8f88c6ba150bc3dd19290a
refs/heads/main
2023-07-10T05:04:14.872786
2021-08-13T17:22:49
2021-08-13T17:22:49
null
0
0
null
null
null
null
UTF-8
Swift
false
false
961
swift
// // Ed25519Signature.swift // // // Created by Ostap Danylovych on 13.05.2021. // import Foundation import CCardano public typealias Ed25519Signature = CCardano.Ed25519Signature extension Ed25519Signature: CType {} extension Ed25519Signature { public init(data: Data) throws { self = try data.withCData { bytes in RustResult<Self>.wrap { result, error in cardano_ed25519_signature_from_bytes(bytes, result, error) } }.get() } public func data() throws -> Data { var data = try RustResult<CData>.wrap { result, error in cardano_ed25519_signature_to_bytes(self, result, error) }.get() return data.owned() } public func hex() throws -> String { var chars = try RustResult<CharPtr>.wrap { result, error in cardano_ed25519_signature_to_hex(self, result, error) }.get() return chars.owned() } }
[ -1 ]
62559a890991b3158987e1740058701e20c6e5b7
1ac6c17f12398cdef65907224eac14a074bdca12
/View/HeaderView.swift
81de58adc1da54fa4ad5632f7963ce481a347311
[]
no_license
mdeuschle/Tacos
7fd6a06ce51572edd4b1e0c22749bb532a74731e
d0644a05f5c77d634ddbebed21c64e2fe01301cc
refs/heads/master
2021-08-16T02:36:31.554960
2017-11-18T20:43:00
2017-11-18T20:43:00
110,342,166
0
0
null
null
null
null
UTF-8
Swift
false
false
195
swift
// // HeaderView.swift // Tacos // // Created by Matt Deuschle on 11/11/17. // Copyright © 2017 Matt Deuschle. All rights reserved. // import UIKit class HeaderView: UIView, DropShadow {}
[ -1 ]
2f07b5c6961f75469c7cf81a8534328bf683913b
45d7c9d199aee3b28f66b475a64bd31b5be10891
/tvOS/CoreLocation/CLCircularRegion.swift
9e6476d4ae88566f820e2979eec558493777d94c
[]
no_license
DougGregor/swift-concurrency-objc
f8ba0cfa2a4153d1cd129d7d61060d0a47067847
5ab47b4f70a675a4298dc00b1526505b964b4061
refs/heads/xcode-12-2-beta-3
2023-01-28T12:41:18.646533
2020-10-15T19:42:00
2020-10-15T19:42:00
304,435,605
40
8
null
2020-10-15T20:05:54
2020-10-15T20:02:53
Swift
UTF-8
Swift
false
false
150
swift
@available(tvOS 7.0, *) class CLCircularRegion : CLRegion { init(center: CLLocationCoordinate2D, radius: CLLocationDistance, identifier: String) }
[ -1 ]
7bf7d48cdc731bca3d725898570ceeb56be3353f
2c17852be21b7544fec74d87a1e4546aa6f20b2b
/Lifespice/Lifespice/FilteredEventListViewController.swift
11f5112da9051a285bb26c57c70a9d2e338be3e2
[]
no_license
VictoriaSnow/lifespice
063bf362fb9cb22e6cd5153a75ca07f4f7c20ce8
a08db1fe77fa90fe38140abbbf0d986df4d05de9
refs/heads/master
2021-01-10T00:59:24.178291
2015-05-02T00:37:42
2015-05-02T00:37:42
27,366,064
0
1
null
null
null
null
UTF-8
Swift
false
false
3,339
swift
// // FilteredEventListViewController.swift // Lifespice // // Created by Victoria Bian on 1/16/15. // Copyright (c) 2015 Lifespice. All rights reserved. // import UIKit class FilteredEventListViewController: 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 numberOfSectionsInTableView(tableView: UITableView) -> Int { // #warning Potentially incomplete method implementation. // Return the number of sections. return 0 } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete method implementation. // Return the number of rows in the section. return 0 } /* override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath) as UITableViewCell // Configure the cell... return cell } */ /* // Override to support conditional editing of the table view. override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { // Return NO 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, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if editingStyle == .Delete { // Delete the row from the data source tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .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, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { } */ /* // Override to support conditional rearranging of the table view. override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { // Return NO 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 prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ }
[ 278662, 278663, 279327, 228131, 227493, 228133, 287271, 282918, 285243, 288190, 277184, 283460, 283464, 283465, 275541, 207957, 276319, 276320, 276322, 276323, 277604, 276324, 284151, 213880 ]
cedead8859d85da97e48094739a4661d4faec357
dfc20abcae0b8123c18e36fa1c19c87068ef3ad4
/DeezerMusic/SingleStream/Login/ViewModel/LoginViewModel.swift
87bb84d7179357ffcc0f87a86e9be323d4212c97
[]
no_license
ZvonimirMedak/DeezerMusic-SingleStream
a9ea24c90b6b14f56394e02a9a5deec4fd3ed5e7
00ba96ac2e751a2d6d0b8f885a461c5d7dd4707d
refs/heads/main
2023-05-29T22:39:30.435077
2021-06-11T10:37:55
2021-06-11T10:37:55
375,990,262
0
0
null
null
null
null
UTF-8
Swift
false
false
2,158
swift
// // ___HEADERFILE___ // import Foundation import RxSwift import RxCocoa import LocalAuthentication class LoginViewModelImpl: LoginViewModel { var input: PublishSubject<LoginInput> = PublishSubject() var output: BehaviorRelay<LoginOutput> = BehaviorRelay.init(value: LoginOutput(event: nil)) } extension LoginViewModelImpl { func bindViewModel() -> [Disposable] { var disposables = [Disposable]() disposables.append(self.input .observeOn(ConcurrentDispatchQueueScheduler.init(qos: .background)) .flatMap{ [unowned self] (input) -> Observable<LoginOutput> in switch input { case .login: return handleLogin() } }.bind(to: output)) return disposables } func handleLogin() -> Observable<LoginOutput> { let context = LAContext() context.localizedCancelTitle = R.string.localizable.enter_username_password() var error: NSError? if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) { let reason = R.string.localizable.log_in_to_account() context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason ) { [unowned self] success, error in if success { output.accept(LoginOutput(event: .loginResult)) } else { print(error?.localizedDescription ?? R.string.localizable.auth_failed()) } } } else { print(error?.localizedDescription ?? R.string.localizable.can_not_evaluate()) } return .just(LoginOutput(event: nil)) } } protocol LoginViewModel { var input: PublishSubject<LoginInput> {get} func bindViewModel() -> [Disposable] var output: BehaviorRelay<LoginOutput> {get} } enum LoginInput: Equatable{ case login } public struct LoginOutput{ public var event: LoginOutputEvent? } public enum LoginOutputEvent{ case loginResult }
[ -1 ]
54cc3fa4a19178ec72cc88f67e47758735f69ee9
df9f3d2656151acac8541bfe296cc6afa285b153
/FacePickerTests/FacePickerTests.swift
946ae6c64bf7291cc2d9e82f03c8e199623cccd5
[]
no_license
pizFunk/FacePicker
0df2332f3033d117cd026817a860e835deeec969
6262f3006dea045b52d7087cccc59948f736708e
refs/heads/master
2020-03-29T10:50:42.640945
2018-10-19T15:30:22
2018-10-19T15:30:22
149,825,070
0
0
null
null
null
null
UTF-8
Swift
false
false
972
swift
// // FacePickerTests.swift // FacePickerTests // // Created by matthew on 9/5/18. // Copyright © 2018 matthew. All rights reserved. // import XCTest @testable import FacePicker class FacePickerTests: 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. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 313357, 305179, 98333, 313375, 102437, 292902, 354343, 204840, 354345, 227370, 233517, 155694, 229424, 282672, 229430, 180280, 288834, 286788, 311372, 223316, 280661, 315476, 307289, 237663, 315487, 45153, 309345, 280675, 227428, 307301, 280677, 313447, 131178, 278634, 278638, 288879, 284788, 223350, 233590, 280694, 237689, 288889, 131191, 131198, 215166, 292992, 194691, 227460, 280712, 215178, 235662, 311438, 278677, 284826, 278691, 233636, 299174, 233642, 284842, 153776, 184505, 278714, 223419, 227513, 295098, 299198, 280768, 280778, 282831, 280795, 227548, 229597, 301279, 311519, 286958, 184570, 227578, 184575, 309503, 282909, 278816, 282913, 233762, 217380, 211238, 280887, 278842, 315706, 307517, 287041, 287043, 311621, 139589, 280902, 319813, 227654, 6481, 305495, 6489, 168281, 323935, 321894, 416104, 280939, 285040, 313713, 199029, 291192, 311681, 227725, 240016, 190871, 285084, 242078, 61857, 285090, 61859, 289189, 299441, 283064, 278970, 293306, 291267, 127427, 127428, 278989, 281037, 281040, 326100, 278999, 176601, 188894, 287198, 279008, 160225, 285150, 279013, 279018, 291311, 309744, 279029, 233978, 291333, 287241, 279050, 283153, 303636, 291358, 180771, 293419, 244269, 283182, 283184, 236081, 23092, 234036, 279094, 289332, 115270, 293448, 377418, 281166, 281171, 66150, 111208, 279146, 281199, 295536, 287346, 287352, 301689, 279164, 189057, 152203, 117397, 230040, 289434, 303771, 221852, 279206, 295599, 285361, 303793, 299699, 342706, 166582, 289462, 314040, 158394, 285371, 285372, 285373, 287422, 285374, 303803, 66242, 287433, 154316, 287439, 279252, 96984, 289502, 234217, 342762, 230125, 289518, 279280, 230134, 199414, 154359, 228088, 299770, 279294, 205568, 242433, 295682, 299776, 285444, 322313, 291604, 166676, 283419, 234277, 283430, 262951, 279336, 289576, 262954, 318250, 295724, 312108, 285487, 164656, 301871, 303920, 262962, 230199, 293693, 281408, 295744, 295746, 318278, 201551, 281433, 230234, 301918, 295776, 279392, 293730, 303972, 230248, 177001, 308076, 400239, 207732, 295798, 228215, 209783, 209785, 279417, 177019, 291712, 287622, 113542, 228233, 228234, 308107, 56208, 308112, 234386, 293781, 324507, 310176, 310178, 283558, 289703, 279464, 293800, 310182, 236461, 293806, 304051, 189374, 289727, 213960, 279498, 316364, 191446, 50143, 326635, 203757, 289774, 183279, 304110, 287731, 295927, 304122, 312314, 234500, 277509, 322570, 230410, 234514, 308243, 277524, 140310, 293910, 197657, 281626, 238623, 189474, 300068, 238639, 300084, 238651, 308287, 234577, 296019, 234587, 277597, 304222, 113760, 281697, 230499, 281700, 285798, 300135, 322663, 228458, 207979, 279660, 15471, 312434, 285814, 300151, 285820, 300158, 150657, 285828, 279685, 285830, 222343, 302216, 302213, 228491, 228493, 162961, 185493, 296086, 238743, 187544, 119962, 296092, 302240, 330913, 306338, 300201, 249002, 300202, 279728, 238769, 294074, 228542, 283840, 302274, 279747, 283847, 283852, 279760, 290000, 189652, 279765, 279774, 304351, 310497, 298212, 304356, 290022, 279785, 228588, 234733, 298221, 279792, 298228, 302325, 234742, 228600, 216315, 292091, 292107, 173334, 339234, 130338, 130343, 298291, 286018, 113987, 300359, 230729, 294218, 234827, 177484, 222541, 296270, 234831, 238927, 314709, 357719, 292195, 294243, 230756, 281957, 230765, 284014, 306542, 296303, 296307, 290173, 306559, 148867, 294275, 298374, 142729, 368011, 296335, 112017, 306579, 282007, 318875, 310692, 279974, 282022, 282024, 310701, 286132, 279989, 228795, 292292, 300487, 306631, 296392, 280010, 300489, 310732, 312782, 64975, 222675, 228827, 286172, 280032, 144867, 187878, 280041, 306673, 296433, 306677, 280055, 300535, 288249, 286202, 300536, 290300, 286205, 302590, 290301, 294400, 296448, 282114, 230913, 306692, 306693, 296461, 282129, 308756, 282136, 282141, 230943, 286244, 288309, 290358, 288318, 280130, 288326, 288327, 282183, 218696, 228943, 286288, 300630, 290390, 128599, 235095, 306776, 239198, 300644, 282213, 317032, 222832, 314998, 288378, 294529, 239237, 286343, 288392, 229001, 290443, 310923, 323217, 229020, 282271, 282273, 302754, 282276, 40613, 40614, 290471, 40615, 282280, 229029, 298667, 286388, 286391, 300728, 306874, 280251, 282303, 286399, 280257, 282312, 280267, 9936, 9937, 302802, 212688, 280278, 282327, 286423, 278233, 18138, 278234, 67292, 298712, 294622, 298720, 278240, 288491, 282348, 239341, 280300, 284401, 282355, 323316, 313081, 229113, 286459, 194304, 288512, 282369, 288516, 280327, 216839, 280329, 282378, 300811, 321295, 321302, 284442, 286494, 294700, 282417, 200498, 296755, 345919, 282438, 304977, 307025, 413521, 18262, 216918, 307031, 280410, 188251, 284507, 300894, 237408, 284512, 302946, 284514, 296806, 276327, 282474, 288619, 288620, 280430, 282480, 313203, 300918, 194429, 67463, 110480, 184208, 282518, 282519, 214937, 214938, 294809, 298909, 294814, 311199, 319392, 300963, 294823, 298920, 284587, 292782, 294843, 98239, 237504, 280514, 280519, 214984, 344013, 301008, 194515, 292837, 294886, 296941, 278512, 311282, 292858 ]
328581b8e1ae8c610c25f6314c998670f9391688
4fe05d8c563c41f192a32a9ba8c40939de09c5dd
/AppCoda/SwiftUITinderTrip/SwiftUITinderTrip/ContentView.swift
f9d2b7d9567020a1416fc2becc83e3319043c1b2
[]
no_license
vijayvir/LeoSwiftUI
3acf96b78b862128f6436f8d2f68adfe0d34b680
3039c2140ebc3e785deba276091801f1d1ffba1f
refs/heads/main
2023-04-27T10:53:31.265646
2021-05-17T07:13:59
2021-05-17T07:13:59
362,315,342
0
0
null
null
null
null
UTF-8
Swift
false
false
337
swift
// // ContentView.swift // SwiftUITinderTrip // // Created by Simon Ng on 24/8/2020. // import SwiftUI struct ContentView: View { var body: some View { Text("Hello, world!") .padding() } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
[ 369287, 126601, 343054, 108815, 108816, 256912, 108818, 347284, 386582, 357409, 252964, 153644, 378669, 372654, 372271, 223152, 180531, 375348, 343100, 384701, 372030, 214591, 349760, 374977, 147012, 420678, 204999, 356551, 272204, 345165, 353614, 357838, 391504, 212948, 379094, 352984, 411736, 398298, 260702, 379103, 345188, 357220, 168045, 207725, 66799, 369905, 162298, 360956, 377982 ]
3a534342939f79b9d9624c16ebeba4c6b2de3121
db3a389cce65abc7b40b5eebc9577922b587023a
/NohanaImagePicker/NohanaImagePickerController.swift
bae0c4911507646755ff2f1f571c73cac5af665f
[ "Apache-2.0" ]
permissive
nohana/NohanaImagePicker
41c2aa5697a82fade506bf157f3760dbaeda2b3b
7ba5c5ea556992cd78103b6b0021551c2607f6d5
refs/heads/master
2023-05-13T20:37:12.342269
2023-04-27T06:06:13
2023-04-27T06:06:13
56,303,825
248
70
Apache-2.0
2023-04-27T06:06:14
2016-04-15T08:24:14
Swift
UTF-8
Swift
false
false
9,695
swift
/* * Copyright (C) 2016 nohana, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.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 &quot;AS IS&quot; 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 UIKit import Photos public enum MediaType: Int { case any = 0, photo, video } @objc public protocol NohanaImagePickerControllerDelegate { func nohanaImagePickerDidCancel(_ picker: NohanaImagePickerController) func nohanaImagePicker(_ picker: NohanaImagePickerController, didFinishPickingPhotoKitAssets pickedAssts: [PHAsset]) @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, willPickPhotoKitAsset asset: PHAsset, pickedAssetsCount: Int) -> Bool @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, didPickPhotoKitAsset asset: PHAsset, pickedAssetsCount: Int) @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, willDropPhotoKitAsset asset: PHAsset, pickedAssetsCount: Int) -> Bool @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, didDropPhotoKitAsset asset: PHAsset, pickedAssetsCount: Int) @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, didSelectPhotoKitAsset asset: PHAsset) @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, didSelectAssetDateSectionAssets assets: [PHAsset], date: Date?) @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, didSelectPhotoKitAssetList assetList: PHAssetCollection) @objc optional func nohanaImagePickerDidSelectMoment(_ picker: NohanaImagePickerController) -> Void @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, assetListViewController: UICollectionViewController, cell: UICollectionViewCell, indexPath: IndexPath, photoKitAsset: PHAsset) -> UICollectionViewCell @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, assetDetailListViewController: UICollectionViewController, cell: UICollectionViewCell, indexPath: IndexPath, photoKitAsset: PHAsset) -> UICollectionViewCell @objc optional func nohanaImagePicker(_ picker: NohanaImagePickerController, assetDetailListViewController: UICollectionViewController, didChangeAssetDetailPage indexPath: IndexPath, photoKitAsset: PHAsset) @objc optional func nohanaImagePickerDidTapAddPhotoButton(_ picker: NohanaImagePickerController) @objc optional func nohanaImagePickerDidTapAuthorizeAllPhotoButton(_ picker: NohanaImagePickerController) } open class NohanaImagePickerController: UIViewController { open var maximumNumberOfSelection: Int = 21 // set 0 to no limit open var numberOfColumnsInPortrait: Int = 4 open var numberOfColumnsInLandscape: Int = 7 open weak var delegate: NohanaImagePickerControllerDelegate? open var shouldShowMoment: Bool = true open var shouldShowEmptyAlbum: Bool = false open var toolbarHidden: Bool = false open var canPickAsset = { (asset: Asset) -> Bool in return true } open var config: Config = Config() open var canPickDateSection: Bool = false open var titleTextAttributes: [NSAttributedString.Key: Any] = { return [ .foregroundColor: UIColor.black, .font: UIFont.systemFont(ofSize: 17, weight: .semibold) ] }() open var isHiddenPhotoAuthorizationLimitedView: Bool = false lazy var assetBundle: Bundle = { #if SWIFT_PACKAGE return Bundle.module #else let bundle = Bundle(for: type(of: self)) if let path = bundle.path(forResource: "NohanaImagePicker", ofType: "bundle") { return Bundle(path: path)! } return bundle #endif }() let pickedAssetList: PickedAssetList let mediaType: MediaType let enableExpandingPhotoAnimation: Bool let assetCollectionSubtypes: [PHAssetCollectionSubtype] let defaultAssetCollection: PHAssetCollection? public init() { assetCollectionSubtypes = [ .albumRegular, .albumSyncedEvent, .albumSyncedFaces, .albumSyncedAlbum, .albumImported, .albumMyPhotoStream, .albumCloudShared, .smartAlbumGeneric, .smartAlbumFavorites, .smartAlbumRecentlyAdded, .smartAlbumUserLibrary ] mediaType = .photo pickedAssetList = PickedAssetList() enableExpandingPhotoAnimation = true defaultAssetCollection = nil super.init(nibName: nil, bundle: nil) self.pickedAssetList.nohanaImagePickerController = self } public init(assetCollectionSubtypes: [PHAssetCollectionSubtype], mediaType: MediaType, enableExpandingPhotoAnimation: Bool, defaultAssetCollection: PHAssetCollection?) { self.assetCollectionSubtypes = assetCollectionSubtypes self.mediaType = mediaType self.enableExpandingPhotoAnimation = enableExpandingPhotoAnimation self.defaultAssetCollection = defaultAssetCollection if let assetCollection = self.defaultAssetCollection { if !assetCollectionSubtypes.contains(assetCollection.assetCollectionSubtype) { fatalError("defaultAssetCollection doesn't contain the specified PHAssetCollectionSubtype") } } pickedAssetList = PickedAssetList() super.init(nibName: nil, bundle: nil) self.pickedAssetList.nohanaImagePickerController = self } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override open func viewDidLoad() { super.viewDidLoad() // show rootViewController let storyboard = UIStoryboard(name: "NohanaImagePicker", bundle: assetBundle) let rootViewController = storyboard.instantiateViewController(identifier: "RootViewController", creator: { coder in RootViewController(coder: coder, nohanaImagePickerController: self) }) let navigationController: UINavigationController = { if enableExpandingPhotoAnimation { return AnimatableNavigationController(rootViewController: rootViewController) } else { return UINavigationController(rootViewController: rootViewController) } }() let navigationBarAppearance = navigationBarAppearance(self) navigationController.navigationBar.standardAppearance = navigationBarAppearance navigationController.navigationBar.scrollEdgeAppearance = navigationBarAppearance navigationController.navigationBar.compactAppearance = navigationBarAppearance navigationController.navigationBar.tintColor = config.color.navigationBarForeground let toobarAppearance = toolBarAppearance(self) navigationController.toolbar.standardAppearance = toobarAppearance #if swift(>=5.5) if #available(iOS 15.0, *) { navigationController.toolbar.scrollEdgeAppearance = toobarAppearance } #endif navigationController.toolbar.compactAppearance = toobarAppearance navigationController.toolbar.tintColor = config.color.navigationBarForeground addChild(navigationController) view.addSubview(navigationController.view) NSLayoutConstraint.activate([ navigationController.view.topAnchor.constraint(equalTo: view.topAnchor), navigationController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), navigationController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), navigationController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), ]) navigationController.view.layoutIfNeeded() navigationController.didMove(toParent: self) } open func pickAsset(_ asset: Asset) { _ = pickedAssetList.pick(asset: asset) } open func dropAsset(_ asset: Asset) { _ = pickedAssetList.drop(asset: asset) } } extension NohanaImagePickerController { public struct Config { public struct Color { public var background: UIColor? public var empty: UIColor? public var separator: UIColor? public var navigationBarBackground: UIColor = .white public var navigationBarForeground: UIColor = .black public var navigationBarDoneBarButtonItem: UIColor = .black } public var color = Color() public struct Image { public var pickedSmall: UIImage? public var pickedLarge: UIImage? public var droppedSmall: UIImage? public var droppedLarge: UIImage? } public var image = Image() public struct Strings { public var albumListTitle: String? public var albumListMomentTitle: String? public var albumListEmptyMessage: String? public var albumListEmptyDescription: String? public var albumListEmptyAlertButtonOK: String? public var toolbarTitleNoLimit: String? public var toolbarTitleHasLimit: String? } public var strings = Strings() } }
[ -1 ]
c476a39c8f5bcc1ae449dd16e6bfb792327bfc8e
f711c38df9fe7bab27dead51b7fcc388f6b3de33
/Apple Pie/ViewController.swift
f84daafd66bb3ea3c3e7dc7d82e146657cd2ddf1
[]
no_license
uros01/Apple-Pie
1a06ce96f03df3f8b86c10b477942cb20656bb7d
95837bc3b4a3c0a5008ab9a28c30e68f1f83fe29
refs/heads/master
2020-04-24T00:58:57.342452
2019-03-02T14:56:09
2019-03-02T14:56:09
171,580,231
0
0
null
null
null
null
UTF-8
Swift
false
false
2,391
swift
// // ViewController.swift // Apple Pie // // Created by student18 on 2/19/19. // Copyright © 2019 Uros Kalicanin. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var treeImageView: UIImageView! @IBOutlet weak var correctWordLabel: UILabel! @IBOutlet weak var scoreLabel: UILabel! @IBOutlet var letterButtons: [UIButton]! var listOfWorsds = ["buccaneer", "swift", "glorious", "incandescent", "bug", "program"] let incorrectMovesAllowed = 7 var totalWins = 0 { didSet { newRound() } } var totalLosses = 0 { didSet { newRound() } } var currentGame: Game! @IBAction func buttonPressed(_ sender: UIButton) { sender.isEnabled = false let letterString = sender.title(for: .normal)! let letter = Character(letterString.lowercased()) currentGame.playerGuessed(letter: letter) updateGameState() } override func viewDidLoad() { super.viewDidLoad() newRound() } func newRound() { if !listOfWorsds.isEmpty { let newWord = listOfWorsds.removeFirst() currentGame = Game(word: newWord, incorrectMovesRemaining: incorrectMovesAllowed, gussedLetter: []) enableLetterButtons(true) updateUI() } else { enableLetterButtons(false) } } func enableLetterButtons(_ enable: Bool) { for button in letterButtons { button.isEnabled = enable } } func updateUI() { var letters = [String]() for letter in currentGame.formattedWord.characters { letters.append(String(letter)) } let wordWithSpacing = letters.joined(separator: " ") correctWordLabel.text = wordWithSpacing scoreLabel.text = "Wins: \(totalWins), Losses: \(totalLosses)" treeImageView.image = UIImage(named: "Tree \(currentGame.incorrectMovesRemaining)") } func updateGameState() { if currentGame.incorrectMovesRemaining == 0 { totalLosses += 1 } else if currentGame.word == currentGame.formattedWord { totalWins += 1 } else { updateUI() } } }
[ 342681 ]
ec1aded254d799e81664be5aab67d01a4d783048
f60ac4c3caf4d57d3cd2aeeb5191ca1f5f1adad7
/BMI Calculator/Controllers/ResultViewController.swift
2c11de30954961e62af83093a9082be769837990
[]
no_license
Yash-devasp/bmi-calculator-ios
17f617211daba13c1801a7915c6877ed3186443f
cf88c4ae8aa242492abb07abd33e256e7cc28f25
refs/heads/master
2022-11-17T08:35:57.254604
2020-07-19T05:08:07
2020-07-19T05:08:07
280,795,607
0
0
null
null
null
null
UTF-8
Swift
false
false
708
swift
// // ResultViewController.swift // BMI Calculator // // Created by Yash Goswami on 12/06/20. // Copyright © 2020 Angela Yu. All rights reserved. // import UIKit class ResultViewController: UIViewController { 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. } */ }
[ 347111, 317931, 185524, 185525, 321399, 361496 ]
a19b02c97162d17912f4637849630f134b79c8de
d23a361356b5c144c257d5fd71f9fa30217a7cb1
/zoonline-ios/NetWorkErrorCollectionViewCell.swift
491e78954654f6888707d5b2369146325b9096c2
[]
no_license
takoikatakotako/zoonline-ios
b440c2483d21c901e034176f34788ec4d595f045
5bb312084a6a91b6ad8a778514ee0b306d841f6b
refs/heads/master
2021-10-24T12:29:28.301645
2019-02-11T09:54:02
2019-02-11T09:54:02
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,668
swift
import UIKit class NetWorkErrorCollectionViewCell: UICollectionViewCell { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder)! } override init(frame: CGRect) { super.init(frame: frame) } override func prepareForReuse() { super.prepareForReuse() } override func layoutSubviews() { super.layoutSubviews() let cellWidth: CGFloat = self.frame.width let cellHeight: CGFloat = self.frame.height let errorLabel = UILabel() errorLabel.text = "ネットワークエラー" errorLabel.frame = CGRect(x: 0, y: cellHeight*0.05, width: cellWidth, height: cellHeight*0.1) errorLabel.textColor = UIColor(named: "darkPink") errorLabel.font = UIFont.boldSystemFont(ofSize: 20) errorLabel.textAlignment = NSTextAlignment.center self.contentView.addSubview(errorLabel) let messageLabel = UILabel() messageLabel.text = "通信を確認してください" messageLabel.frame = CGRect(x: 0, y: cellHeight*0.15, width: cellWidth, height: cellHeight*0.1) messageLabel.textColor = UIColor.black messageLabel.font = UIFont.systemFont(ofSize: 20) messageLabel.textAlignment = NSTextAlignment.center self.contentView.addSubview(messageLabel) let penguinImgView = UIImageView() penguinImgView.image = UIImage(named: "chara_penpen") penguinImgView.frame = CGRect(x: 0, y: cellHeight*0.3, width: cellWidth, height: cellHeight*0.6) penguinImgView.contentMode = UIView.ContentMode.scaleAspectFit self.contentView.addSubview(penguinImgView) } }
[ -1 ]
ca5b632f91fb218ff4643af367573ed22e09887f
cca0dec9641c2a0409489f5db94b9b111e53f7ce
/Sources/Swim/Database/CSV/CSVColumn.swift
53002ce0586a31ec9c1c4876cf9474d65b3eb57f
[]
no_license
es-kumagai/Swim
87994d63ff9694f39ddc8ba1ad6f8c5f4b85926c
52ea99fe91efb9363c071a9a9d6ad87a3c084ecf
refs/heads/main
2023-08-09T21:33:13.383385
2023-07-19T17:31:55
2023-07-19T17:31:55
78,932,881
0
0
null
null
null
null
UTF-8
Swift
false
false
1,320
swift
// // CSVColumn.swift // Swim // // Created by Tomohiro Kumagai on 2020/12/09. // extension CSV { public struct Column<Target> where Target : CSVLineConvertible { public typealias KeyPath = PartialKeyPath<Target> public var name: String public var keyPath: KeyPath public var datatype: CSVColumnConvertible.Type public init<Value>(_ name: String, keyPath: Swift.KeyPath<Target, Value>) where Value : CSVColumnConvertible { self.name = name self.keyPath = keyPath self.datatype = Value.self } } public struct AnyColumn { public private(set) var column: CustomDebugStringConvertible public private(set) var columnType: Any.Type public init<Target>(_ column: Column<Target>) where Target : CSVLineConvertible { self.column = column self.columnType = type(of: column) } } } extension CSV.Column : CustomDebugStringConvertible { public var debugDescription: String { return "\(name): \(datatype)" } } extension CSV.AnyColumn : CustomDebugStringConvertible { public var debugDescription: String { return column.debugDescription } }
[ -1 ]
8c53bbc708fd5d33b1bdf8e5cd0dffb9c625b1ec
c95294ebcf5cd3bdea5042f698b8053859a6d875
/threadsApp/threadsApp/Profile/Profile/User_Profile/Edit User/EditUserVC.swift
0fcfb120389bf283c7bee37d116c59381eb60d4f
[ "MIT" ]
permissive
baskar44/threadsApp
9a5d1c325e6b849904c10c09f416b288836eb895
3744a1c49b6764ac13a22eeeea02abe42202fc3f
refs/heads/master
2021-04-06T20:05:49.198595
2018-03-15T02:17:49
2018-03-15T02:17:49
125,296,799
0
0
null
null
null
null
UTF-8
Swift
false
false
7,894
swift
// // EditUserVC.swift // threadsApp // // Created by Gururaj Baskaran on 15/12/17. // Copyright © 2017 Gururaj Baskaran. All rights reserved. // import UIKit import Firebase import CoreData class EditUserVC: ViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { /* enum EditUserBranch { case username case fullname case bio case visibility case changePassword } //Local Enum enum EditUserFailedType: String { case usernameIsEmpty = "Username field is empty" case usernameAlreadyExists = "Username already exists" case currentUserIsNoLongerActive = "Lost connection with active user. Reload Application and try again." case currentUsernameIsNil = "Lost connection with active user's username. Reload Application and try again." case profileImageUpdateFailed = "Profile image failed to update. Try again." case editProcessFailed = "Failed to complete edit process. Try again" } enum WarningType: String { case currentUsernameOrVisibilityIsNil = "Lost connection with active user's username. Reload Application and try again." case profileImageHasBeenChanged = "Cancel without saving changes to profile image?" case unsavedDataExists = "Cancel without saving changes?" case errorWhileProcessingCancel = "Error while processing cancel" } //IBOutlets @IBOutlet weak var tableView: UITableView! @IBOutlet weak var userProfileImageView: UIImageView! @IBOutlet weak var profileImageActivityIndicator: UIActivityIndicatorView! @IBOutlet weak var curtainView: UIView! @IBOutlet weak var tableViewBottomLayoutConstraint: NSLayoutConstraint! //Table View Outlets Variables weak var usernameTextField: UITextField! weak var fullnameTextField: UITextField! weak var bioTextView: UITextView! weak var visibilitySwith: UISwitch! //Main Constants let tableViewDisplay: [[EditUserBranch]] = [[.username], [.fullname], [.bio], [.visibility], [.changePassword]] let picker = UIImagePickerController() //Main Variables internal var didChangeProfileImage: Bool = false //View Life Cycle override func viewDidLoad() { super.viewDidLoad() run() } private func run(){ guard toggle(curtainView: curtainView, to: .open) else { //error handle return } //getting bar button items //left: cancel and right: save //1 Setting up navigation bar let leftBarButtonItems = [UIBarButtonItem(title: s_._Cancel, style: .plain, target: self, action: #selector(handleCancelButtonTapped))] let rightBarButtonItems = [UIBarButtonItem(title: s_._Save, style: .plain, target: self, action: #selector(handleSaveButtonTapped))] guard setupNavigationController(isNavigationBarHidden: false, prefersLargeTitles: true, title: s_._Edit_User, leftBarButtonItems: leftBarButtonItems, rightBarButtonItems: rightBarButtonItems) else { //error handle return } //2 Setting up tab bar controller guard setupTabBarController(isHidden: true) else { //error handle return } //3 Setting up table view guard setupTableView(tableView: tableView, delegate: self, dataSource: self, register: [.textField, .textView, .switchType, .typical]) else { //error handle return } addNotifications() setupProfileImageView { (didSetup, error) in if didSetup { guard self.toggle(curtainView: self.curtainView, to: .closed) else { //error handle return } }else { //error handle if let error = error { } } } } private func setupProfileImageView(completion: @escaping (Bool, Error?) -> Void){ userProfileImageView.layer.cornerRadius = userProfileImageView.frame.height/2 let tap = UITapGestureRecognizer(target: self, action: #selector(handleUIImageViewTapped)) userProfileImageView.addGestureRecognizer(tap) if let profileImageURL = currentUserStructure?.profileImageURL { userProfileImageView.loadImageUsingCacheWithURLString(imageURL: profileImageURL, completion: { (didLoadImage, error) in completion(didLoadImage, error) }) }else { userProfileImageView.backgroundColor = .blue completion(true, nil) } } @objc private func handleUIImageViewTapped(){ self.view.isUserInteractionEnabled = false let alertViewController = UIAlertController(title: s_._Edit_Profile_Image, message: "Change or remove profile image", preferredStyle: .actionSheet) let changeAction = UIAlertAction(title: s_._Change, style: .default) { (alert) in self.picker.delegate = self self.picker.allowsEditing = false self.present(self.picker, animated: true, completion: nil) } let removeAction = UIAlertAction(title: s_._Remove, style: .default) { (alert) in self.currentUserStructure?.removeProfileImage(completion: { (didRemove, error) in if didRemove { //maybe later //handle }else { //error handle if let error = error { } } alertViewController.dismiss(animated: true, completion: { self.view.isUserInteractionEnabled = true }) }) } let cancelAction = UIAlertAction(title: s_._Cancel, style: .cancel) { (alert) in self.view.isUserInteractionEnabled = true } alertViewController.addAction(changeAction) alertViewController.addAction(removeAction) alertViewController.addAction(cancelAction) present(alertViewController, animated: true) { self.view.isUserInteractionEnabled = false } } private func addNotifications(){ NotificationCenter.default.addObserver(self, selector: #selector(updateTableView), name: Notification.Name.UIKeyboardWillChangeFrame, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(updateTableView), name: Notification.Name.UIKeyboardWillHide, object: nil) } @objc private func updateTableView(notifcation: Notification) { if let info = notifcation.userInfo, let keyWindow = UIApplication.shared.keyWindow { if let keyboardEndFrameCoordinates = info[UIKeyboardFrameEndUserInfoKey] as? NSValue { let rectVal = keyboardEndFrameCoordinates.cgRectValue let keyboardEndFrame = self.view.convert(rectVal, to: view.window) let navBarHeight = navigationController?.navigationBar.frame.height ?? 0 //let height = keyWindow.frame.height - keyboardEndFrame.height - userProfileImageView.frame.height - navBarHeight - 50 tableViewBottomLayoutConstraint.constant = -(keyboardEndFrame.height) //let frame = CGRect(x: tableView.frame.minX, y: tableView.frame.minY, width: tableView.frame.width, height:height) //tableView.frame = frame view.layoutIfNeeded() } } } */ }
[ -1 ]
fd5d5ca8e6d00a60c4a01ebd29e0fca361be5d44
663af8215036bbd8c31fcae88d8020f80bcc5d23
/Examples/NewsFeed/NewsFeed/Models/Like.swift
d71a58efddc74cccf7e056770d6ad4b83ccd1c91
[ "MIT" ]
permissive
cjbatin/Kakapo
52f58f97d092c9c70216cea686998e67715f21fc
13cb1fb02a519d5b06957829bb865687b38c90d4
refs/heads/master
2020-12-12T07:40:53.663666
2020-01-15T13:27:20
2020-01-15T13:27:20
234,080,801
0
0
MIT
2020-01-15T12:56:22
2020-01-15T12:56:21
null
UTF-8
Swift
false
false
800
swift
// // Like.swift // NewsFeed // // Created by Alex Manzella on 08/07/16. // Copyright © 2016 devlucky. All rights reserved. // import Foundation import Kakapo import Fakery import SwiftyJSON enum LikeableEntityType: String { case Post = "post" case Comment = "comment" } protocol Likeable: Storable, Serializable { var likes: [Like] { get set} } struct Like: Serializable, Storable, JSONInitializable { let id: String let author: User init(id: String, store: Store) { self.id = id author = store.create(User.self).first! } init(json: JSON) { id = json["id"].stringValue author = User(json: json["author"]) } init(id: String, author: User) { self.id = id self.author = author } }
[ -1 ]
9b1b45826a08532e61357fb9ba6028d319b118a1
133b787d783970bf4bdd6b1cf4347e9a6d755c3e
/classThree/codeSwag/codeSwag/Controller/ProductsVC.swift
5939c7d78fbe718a1babcc72281ec710f9197295
[]
no_license
stephanlunang/swift_5_class
6468d7b4e79f1faf723bfd7a02ca0316d9e83a68
dc453ae3033d8183083238ee5d15fa96a0de1e39
refs/heads/master
2022-12-22T03:51:28.180614
2020-06-02T21:25:19
2020-06-02T21:25:19
249,091,003
0
0
null
2022-12-12T23:23:47
2020-03-22T01:20:15
Makefile
UTF-8
Swift
false
false
1,719
swift
// // ProductVC.swift // codeSwag // // Created by Stephan Ng on 5/8/20. // Copyright © 2020 Stephan Ng. All rights reserved. // import UIKit // UICollectionViewDelegate and UICollectionViewDataSource are requried for collection views class ProductsVC: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource { @IBOutlet weak var productsCollection: UICollectionView! private(set) public var products = [Product]() override func viewDidLoad() { super.viewDidLoad() // Required for collection views to function productsCollection.dataSource = self productsCollection.delegate = self } // Allows you to pass which products category from the click on the previous VC func initProducts (category: Category) { products = DataService.instance.getProducts(forCategoryTitle: category.title) navigationItem.title = category.title } // Collection view protocol stubs, clicked the red x after adding the UICollection types to the inherited classes func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { // Only have one section, so you only need to return products.count return products.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ProductCell", for: indexPath) as? ProductCell { let product = products[indexPath.row] cell.updateView(product: product) return cell } return ProductCell() } }
[ -1 ]
c81de01ceb203324adcd1f39f529e2bc240570ee
f16d8dade9d7fc5a78f333636b8a9b674d6c7548
/AmericanDream/AmericanDream/json-helpers.swift
82c501a42f8d8204173158bfca6819365cac7f7c
[]
no_license
Kylta/AmericanDream_OCP9
81e4e4ca5faef1abe62ad0b0cd4ca7e7d9bea726
a4ab09af38b1f25a81cc1a66140335507699bd0e
refs/heads/master
2020-04-28T23:22:29.429734
2019-03-19T08:05:30
2019-03-19T08:05:30
174,625,753
0
0
null
null
null
null
UTF-8
Swift
false
false
806
swift
// // json-helpers.swift // AmericanDream // // Created by Christophe Bugnon on 14/03/2019. // Copyright © 2019 Christophe Bugnon. All rights reserved. // import Foundation extension JSONDecoder { func decode<T: Decodable>(_ type: T.Type, withJSONObject object: Any, options opt: JSONSerialization.WritingOptions = []) throws -> T { let data = try JSONSerialization.data(withJSONObject: object, options: opt) return try decode(T.self, from: data) } } struct Service { static func getJSON(from data: Data, atKeyPath keyPath: String) throws -> Any { guard let json = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any], let result = json?[keyPath] else { throw NSError() } return result } }
[ -1 ]
eda44e28676ba131a28a0aa4fda64f30ba11427d
c7b86394ee24943f43076df603e535da535edfef
/BrastlewarkApp/Scenes/CitizenDetail/CitizenDetailWireframe.swift
8f67fbac6c522934dd18726f3746ff173fd8459c
[]
no_license
fmferrari/BrastlewarkApp
5e0e9382bf5102a0f98098f94bb45c11721d4872
c6a5438b23cd4528ba445291e71c658e35eb4aa8
refs/heads/master
2022-08-11T13:00:15.986228
2018-09-02T22:23:39
2019-06-08T17:23:20
146,127,820
0
1
null
2022-07-22T02:01:26
2018-08-25T20:33:34
Swift
UTF-8
Swift
false
false
838
swift
// // CitizenDetailWireframe.swift // BrastlewarkApp // // Created by Felipe Ferrari on 26/08/2018. // Copyright © 2018 Felipe Ferrari. All rights reserved. // import Foundation class CitizenDetailWireframe: ObservableViewWireframe<CitizenDetailPresenter> { let citizenDetailPresenter : CitizenDetailPresenter required init(navigation: Navigation, citizen: Citizen, citizenRepository: CitizenRepository ) { let view = CitizenDetailViewController() citizenDetailPresenter = CitizenDetailPresenter( citizen: citizen, view: view, genderInteractor: GetGenderInteractor(citizenRepository: citizenRepository) ) super.init(navigation: navigation, presenter: citizenDetailPresenter) viewController = view } required init(navigation: Navigation) { fatalError("init(navigation:) has not been implemented") } }
[ -1 ]
d7a8b766adfdf39f9d904508cf8e26598740842e
8edff709e49c501b5df88020ac5226e8b491dc68
/CGPhoto/View/CGPHPhotoView.swift
47afda43588de7192e0f97d9e92fbbcb91885d9e
[]
no_license
root338/CGPhoto
18c09a51e72c4c1144a6cd0013dac6dc0fbbe747
cc2f9644d9614886e8a0fa19241de6c9bcbc7ddd
refs/heads/master
2021-09-02T00:05:05.404191
2017-12-29T09:33:11
2017-12-29T09:33:11
110,228,084
0
0
null
null
null
null
UTF-8
Swift
false
false
2,910
swift
// // CGPHPhotoView.swift // CGPhoto // // Created by DY on 2017/12/5. // Copyright © 2017年 DY. All rights reserved. // import UIKit class CGPHPhotoView: UIView { let collectionView : UICollectionView let style = CGPHAssetCollectionStyle.default var estimatedImageSize : CGSize { return itemSize.scale() } fileprivate var itemSize = CGSize.zero fileprivate var didCalculateWidth = CGFloat(0) fileprivate var sectionInset = UIEdgeInsets.zero override convenience init(frame: CGRect) { var width = frame.size.width if width == 0 { width = UIScreen.main.bounds.size.width } let flowLayout = UICollectionViewFlowLayout.init(maxWidth: width, insets: .zero) self.init(frame: frame, layout: flowLayout) didCalculateWidth = width } init(frame: CGRect, layout: UICollectionViewLayout) { collectionView = UICollectionView.init(frame: .init(origin: .zero, size: frame.size), collectionViewLayout: layout) if let flowLayout = layout as? UICollectionViewFlowLayout { itemSize = flowLayout.itemSize } super.init(frame: frame) self.addSubview(collectionView) self.setupContentSubviewsLayout() collectionView.backgroundColor = UIColor.white } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } func resetAssetListFlowLayout() { guard self.style == .default else { return } let width = self.bounds.width var insets = UIEdgeInsets.zero if #available(iOS 11.0, *) { insets = self.safeAreaInsets } if width != didCalculateWidth || insets != sectionInset { let flowLayout = UICollectionViewFlowLayout.init(maxWidth: width, insets: insets) collectionView.setCollectionViewLayout(flowLayout, animated: false, completion: { (isFinished) in }) didCalculateWidth = width sectionInset = insets } } //MARK:- 重写系统方法 override func safeAreaInsetsDidChange() { if #available(iOS 11.0, *) { super.safeAreaInsetsDidChange() self.resetAssetListFlowLayout() } } override var bounds: CGRect { didSet { self.resetAssetListFlowLayout() } } } fileprivate extension CGPHPhotoView { func setupContentSubviewsLayout() { if self.style == .default { collectionView.cg_autoEdgesInsetsZeroToSuperview() } } }
[ -1 ]