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
3f9c0e8b04f56ff8da100ee06ee93c0cc4cfb240
5c921d3653c8293a4df102f605f1210aa3b0f197
/MetalEasyFoundation/Root/Setting/LanguageController.swift
9ddc72813c57616a69676697623a0915c9eed47f
[ "MIT" ]
permissive
Lang-FZ/MetalEasyFoundation
c740227a97c78a043abfcda3512dd17177657725
02fc1d1230737d208288c67ab9d8f3eec1a04451
refs/heads/master
2020-05-30T10:44:39.445514
2020-01-04T10:51:10
2020-01-04T10:51:10
189,679,148
14
3
null
null
null
null
UTF-8
Swift
false
false
2,797
swift
// // LanguageController.swift // MetalEasyFoundation // // Created by LFZ on 2019/6/3. // Copyright © 2019 LFZ. All rights reserved. // import UIKit class LanguageController: BaseViewController { lazy private var model: BaseListModel = { let model = BaseListModel.init([:]) let model1 = BaseListModel.init([:]) model1.title = "setting.language.chinese" model1.action = { [weak self] (title) in self?.saveLanguage("zh-Hans") } let model2 = BaseListModel.init([:]) model2.title = "setting.language.english" model2.action = { [weak self] (title) in self?.saveLanguage("en") } model.data.append(model1) model.data.append(model2) return model }() lazy private var language_table: ASTableNode = { let language_table = ASTableNode.init(style: .plain) language_table.frame = CGRect.init(x: 0, y: kNaviBarH, width: kScreenW, height: kScreenH-kNaviBarH) language_table.delegate = self language_table.dataSource = self language_table.backgroundColor = UIColor.init("#F0F0F0", alpha: 0.8) language_table.view.separatorStyle = .none language_table.view.scrollIndicatorInsets = UIEdgeInsets.zero return language_table }() override func viewDidLoad() { super.viewDidLoad() view.addSubnode(language_table) language_table.reloadData() } deinit { print("Language-deinit") } } extension LanguageController: ASTableDelegate, ASTableDataSource { func numberOfSections(in tableNode: ASTableNode) -> Int { return 1 } func tableNode(_ tableNode: ASTableNode, numberOfRowsInSection section: Int) -> Int { return model.data.count } func tableNode(_ tableNode: ASTableNode, nodeBlockForRowAt indexPath: IndexPath) -> ASCellNodeBlock { let block: ASCellNodeBlock = { [weak self] in let node = BaseListNode() node.model = self?.model.data[indexPath.row] ?? BaseListModel.init([:]) node.isLast = (indexPath.row == ((self?.model.data.count ?? 0)-1)) return node } return block } func tableNode(_ tableNode: ASTableNode, didSelectRowAt indexPath: IndexPath) { tableNode.deselectRow(at: indexPath, animated: true) model.data[indexPath.row].action?("") } } extension LanguageController { private func saveLanguage(_ language:String) { if language != LocalizationTool.getCurrentLanguage() { let _ = LocalizationTool.saveCurrentLanguage(language) } navigationController?.popViewController(animated: true) } }
[ -1 ]
4304d9e0731eef8b24bfa4e72ec8819ea26d0665
56b5dd440841af4fd6e22bab70be3c02a7a104ec
/cyberpaysdk/Classes/utils/AnyDecodable.swift
b10134fea7ec361601799d70e0afd137113d9469
[ "MIT" ]
permissive
cyberspace-ltd/cyberpay-iosx
6d96cf107074eb69391807c0397c54477cc1905b
1499d4b3550e2ec99e0d6b583463383a27f09094
refs/heads/master
2020-09-20T07:58:10.877662
2020-05-16T17:43:44
2020-05-16T17:43:44
224,416,628
0
0
null
null
null
null
UTF-8
Swift
false
false
4,619
swift
import Foundation /** visit: https://github.com/Flight-School/AnyCodable/blob/master/Sources/AnyCodable/AnyCodable.swift A type-erased `Decodable` value. The `AnyDecodable` type forwards decoding responsibilities to an underlying value, hiding its specific underlying type. You can decode mixed-type values in dictionaries and other collections that require `Decodable` conformance by declaring their contained type to be `AnyDecodable`: let json = """ { "boolean": true, "integer": 1, "double": 3.14159265358979323846, "string": "string", "array": [1, 2, 3], "nested": { "a": "alpha", "b": "bravo", "c": "charlie" } } """.data(using: .utf8)! let decoder = JSONDecoder() let dictionary = try! decoder.decode([String: AnyCodable].self, from: json) */ public struct AnyDecodable: Decodable { public let value: Any public init<T>(_ value: T?) { self.value = value ?? () } } #if swift(>=4.2) @usableFromInline protocol _AnyDecodable { var value: Any { get } init<T>(_ value: T?) } #else protocol _AnyDecodable { var value: Any { get } init<T>(_ value: T?) } #endif extension AnyDecodable: _AnyDecodable {} extension _AnyDecodable { public init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() if container.decodeNil() { self.init(NSNull()) } else if let bool = try? container.decode(Bool.self) { self.init(bool) } else if let int = try? container.decode(Int.self) { self.init(int) } else if let uint = try? container.decode(UInt.self) { self.init(uint) } else if let double = try? container.decode(Double.self) { self.init(double) } else if let string = try? container.decode(String.self) { self.init(string) } else if let array = try? container.decode([AnyCodable].self) { self.init(array.map { $0.value }) } else if let dictionary = try? container.decode([String: AnyCodable].self) { self.init(dictionary.mapValues { $0.value }) } else { throw DecodingError.dataCorruptedError(in: container, debugDescription: "AnyCodable value cannot be decoded") } } } extension AnyDecodable: Equatable { public static func == (lhs: AnyDecodable, rhs: AnyDecodable) -> Bool { switch (lhs.value, rhs.value) { case is (NSNull, NSNull), is (Void, Void): return true case let (lhs as Bool, rhs as Bool): return lhs == rhs case let (lhs as Int, rhs as Int): return lhs == rhs case let (lhs as Int8, rhs as Int8): return lhs == rhs case let (lhs as Int16, rhs as Int16): return lhs == rhs case let (lhs as Int32, rhs as Int32): return lhs == rhs case let (lhs as Int64, rhs as Int64): return lhs == rhs case let (lhs as UInt, rhs as UInt): return lhs == rhs case let (lhs as UInt8, rhs as UInt8): return lhs == rhs case let (lhs as UInt16, rhs as UInt16): return lhs == rhs case let (lhs as UInt32, rhs as UInt32): return lhs == rhs case let (lhs as UInt64, rhs as UInt64): return lhs == rhs case let (lhs as Float, rhs as Float): return lhs == rhs case let (lhs as Double, rhs as Double): return lhs == rhs case let (lhs as String, rhs as String): return lhs == rhs case let (lhs as [String: AnyDecodable], rhs as [String: AnyDecodable]): return lhs == rhs case let (lhs as [AnyDecodable], rhs as [AnyDecodable]): return lhs == rhs default: return false } } } extension AnyDecodable: CustomStringConvertible { public var description: String { switch value { case is Void: return String(describing: nil as Any?) case let value as CustomStringConvertible: return value.description default: return String(describing: value) } } } extension AnyDecodable: CustomDebugStringConvertible { public var debugDescription: String { switch value { case let value as CustomDebugStringConvertible: return "AnyDecodable(\(value.debugDescription))" default: return "AnyDecodable(\(description))" } } }
[ 29792 ]
d523aeb24d850f54906343d83ccc93f0bb1c3d8d
639d0ed6753b657cedc3b15eeb94f671ab9f8783
/gameSenseSports/ProfileViewController.swift
e013af7d018f6d8631826023a6d8e8370782c4de
[]
no_license
pablit07/gamesense.ios
14ddcba8b245ceea22f751e7df2ffc6b559cb736
89e8d9cb9d22f9b9db325ea3dc1f9d4884aa6381
refs/heads/master
2020-06-14T19:14:29.365139
2017-11-10T16:05:52
2017-11-10T16:05:52
75,346,516
2
0
null
2017-11-02T15:11:57
2016-12-02T00:56:15
C
UTF-8
Swift
false
false
7,145
swift
// // ProfileViewController.swift // gameSenseSports // // Created by Ra on 8/14/17. // Copyright © 2017 gameSenseSports. All rights reserved. // import UIKit enum NavOrder: Int { case home = 0 case account = 1 case userGuide = 2 case myScores = 3 case logout = 4 } class ProfileViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var menuView: UIView! public var selected = 0 var animated = false @IBOutlet weak var tableView: UITableView! var soundSwitch: UISwitch! @IBOutlet weak var username: UILabel! override func viewDidLoad() { super.viewDidLoad() self.soundSwitch = UISwitch(frame: CGRect(x: 30, y: 8, width: 39, height: 41)) self.soundSwitch.addTarget(self, action: #selector(changeSwitch(_:)), for: .valueChanged) self.soundSwitch.isOn = UserDefaults.standard.object(forKey: Constants.kSound) as? Int == 1 self.tableView.tableFooterView = self.getFooter() if let userDefault = UserDefaults.standard.object(forKey: Constants.kUsernameKey) as? String { username.text = userDefault } menuView.frame.origin.x = 0 - menuView.frame.size.width // Do any additional setup after loading the view, typically from a nib. } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseOut, animations: { self.menuView.frame.origin.x = 0 }, completion: { finished in self.menuView.layer.masksToBounds = false self.menuView.layer.shadowColor = UIColor.black.cgColor self.menuView.layer.shadowOpacity = 0.5 self.menuView.layer.shadowOffset = CGSize(width: -1, height: 1) self.menuView.layer.shadowRadius = 1 self.menuView.layer.shadowPath = UIBezierPath(rect: self.menuView.bounds).cgPath self.menuView.layer.shouldRasterize = true self.menuView.layer.rasterizationScale = UIScreen.main.scale }) } func numberOfSectionsInTableView(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 5 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "menuCell", for: indexPath) let label = cell.viewWithTag(2) as! UILabel let icon = cell.viewWithTag(1) as! UIImageView switch (NavOrder(rawValue: indexPath.row)!) { case NavOrder.home: label.text = "Home" let image = UIImage(named:"home.png") icon.image = image break case NavOrder.account: label.text = "Account" let image = UIImage(named:"account.png") icon.image = image break case NavOrder.userGuide: label.text = "User Guide" let image = UIImage(named:"tutorial-icon.png") icon.image = image break case NavOrder.myScores: label.text = "My Scores" let image = UIImage(named:"charts.png") icon.image = image break case NavOrder.logout: label.text = "Log Out" let image = UIImage(named:"logout.png") icon.image = image break } return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { //Home let row = NavOrder(rawValue: indexPath.row) if (row == NavOrder.home) { let presentingViewController = self.presentingViewController as! UINavigationController var rootDrillListViewController: DrillListViewController? for vc in presentingViewController.viewControllers.reversed() { if vc is DrillListViewController { rootDrillListViewController = vc as? DrillListViewController } } presentingViewController.popToViewController(rootDrillListViewController!, animated: false) self.dismissMenu() } // Safari if row == NavOrder.account || row == NavOrder.myScores { var url = "" switch row! { case NavOrder.account: url = "https://app.gamesensesports.com/dashboard/subscriptions" break case NavOrder.myScores: url = "https://app.gamesensesports.com/dashboard/score-chart" break default: break } if #available(iOS 10.0, *) { UIApplication.shared.open(NSURL(string:url)! as URL, options: [:], completionHandler: nil) } else { // Fallback on earlier versions UIApplication.shared.openURL(NSURL(string:url)! as URL) } } //Web View (not used) // if (false) { // self.selected = indexPath.row // self.performSegue(withIdentifier: "profileWebview", sender: nil) // } //User Guide if (row == NavOrder.userGuide) { DispatchQueue.main.async { self.performSegue(withIdentifier: "userguide", sender: self) } } //Logout if (row == NavOrder.logout) { let appDelegate = UIApplication.shared.delegate as! AppDelegate appDelegate.apiToken = "" self.view.window!.rootViewController?.dismiss(animated: false, completion: nil) } } func getFooter() -> UIView? { let footerView = UIView(frame: CGRect(x: 0, y: 0, width: 171, height: 50)) footerView.addSubview(self.soundSwitch) let soundLabel = UILabel(frame: CGRect(x: 85, y: 14, width: 50, height: 21)) soundLabel.text = "Sound" soundLabel.textColor = UIColor.white footerView.addSubview(soundLabel) return footerView } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func dismissMenu(sender: UIButton) { self.dismissMenu() } @IBAction func changeSwitch(_ sender: UISwitch) { if sender.isOn { UserDefaults.standard.setValue(1, forKey: Constants.kSound) } else { UserDefaults.standard.setValue(0, forKey: Constants.kSound) } } func dismissMenu() { UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseOut, animations: { self.menuView.frame.origin.x = 0 - self.menuView.frame.size.width }, completion: { finished in self.dismiss(animated: false, completion: nil) }) } }
[ -1 ]
24ac7593b6e09ac63bba43b70dae59fae9fa8bd6
b0b01138f0f279c73214c2a12b18c075a8f3c771
/BeerApp/Model/Beer.swift
dd093d79492ca884cf6136d650490c7aad59f65c
[]
no_license
hammedopejin/BeerApp
d1920c42bc02154409332a4167877ac61d7e45fd
64df26b80a7f7296a4eb8dd0a615739b10841f8f
refs/heads/master
2020-05-21T05:02:58.316932
2019-05-10T03:24:09
2019-05-10T03:24:09
185,912,134
0
0
null
null
null
null
UTF-8
Swift
false
false
1,092
swift
// // Beer.swift // BeerApp // // Created by mac on 5/9/19. // Copyright © 2019 mac. All rights reserved. // import Foundation enum BeerErrors: Error { case missing(String) } class Beer { let name: String let id: String let description: String let imageUrl: String init?(json: [String:Any]) throws { guard let name = json["name"] as? String else {throw BeerErrors.missing("Missing Name")} guard let id = json["id"] as? String else {throw BeerErrors.missing("Missing ID")} var imageUrl = "beer" if let imageDict = json["labels"] as? [String:String] { imageUrl = imageDict["large"] ?? "beer" } var description = "No description for this beer!" if let style = json["style"] as? [String : Any] { description = style["description"] as? String ?? "No description for this beer!" } self.name = name self.id = id self.imageUrl = imageUrl self.description = description } }
[ -1 ]
063021c603fe1dcd9a82db4a987a38542c278478
6d7622957e9e818d627bd50fb6495d06df7bd30a
/Sources/SwiftPrint/AddressIcons.swift
6abfd644f60d052bb78fcc50715d79ebad3cc24c
[ "MIT" ]
permissive
optionaldev/SwiftPrint
a00620a3c4593d228b8e590d572fde52b150dda4
77bfb713191853447d8359fb40d7b1d8523b538d
refs/heads/main
2023-03-30T21:02:28.490414
2021-04-07T05:36:25
2021-04-07T05:36:25
340,758,090
0
0
null
null
null
null
UTF-8
Swift
false
false
1,285
swift
// // The project. // Created by optionaldev on 28/02/2021. // Copyright © 2021 optionaldev. All rights reserved. // internal struct Constants { static let icons = ["💜", "💛", "💚", "💙", "❤️", "💟", "❇️", "㊗️", "🚹", "🚺", "🚼", "🅰️", "⏺", "🔴", "🔵", "🔶", "🔥", "👚", "👗", "🍷", "🍔", "🦊", "🍋", "🍎", "🍏", "🌵", "🔮", "🥑", "💎", "💊", "🧸", "🖼", "🥎"] } internal struct AddressIcons { init() {} var currentIndex: Int = 0 var addressToIconDictionary: [String: String] = [:] mutating func icon(for addressString: String) -> String? { if let icon = addressToIconDictionary[addressString] { return icon } else { if currentIndex < Constants.icons.count - 1 { addressToIconDictionary[addressString] = Constants.icons[currentIndex] currentIndex += 1 return addressToIconDictionary[addressString] } else { addressToIconDictionary[addressString] = Constants.icons[0] currentIndex = 1 return addressToIconDictionary[addressString] } } } }
[ -1 ]
3c0e28ad6d37a11543c0d52408705dab30fbfc3d
62359dcf471fb075d6de67fb1d2b5e29d6dbb062
/TaskList/AppDelegate.swift
4ae58765f801d3ed5ebe12e36e5e49348db857d5
[]
no_license
Bobstyle23/To-Do-List
094d2428a0a816baa7d43f7a5f8a0b02511b3465
66b2bb2825c85a91cb532cf1d9ec978731d251be
refs/heads/master
2022-11-29T23:13:25.016475
2020-07-28T10:28:45
2020-07-28T10:28:45
283,178,872
0
0
null
null
null
null
UTF-8
Swift
false
false
1,444
swift
// // AppDelegate.swift // TaskList // // Created by MukhammadBobur Pakhriyev on 2020/07/26. // Copyright © 2020 MukhammadBobur Pakhriyev. All rights reserved. // import UIKit @UIApplicationMain 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, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 336128, 385280, 262404, 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, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 410128, 393747, 254490, 188958, 385570, 33316, 197159, 377383, 352821, 188987, 418363, 369223, 385609, 385616, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 336512, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 328378, 328386, 352968, 418507, 352971, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 328522, 336714, 426841, 254812, 361309, 197468, 361315, 361322, 328573, 377729, 369542, 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, 222437, 386285, 328941, 386291, 345376, 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, 345701, 394853, 222830, 370297, 353919, 403075, 345736, 198280, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 337599, 419527, 419530, 419535, 272081, 419542, 394966, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 337668, 362247, 395021, 362255, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 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, 329867, 329885, 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, 248111, 362822, 436555, 190796, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 338409, 248308, 199164, 330252, 199186, 330267, 354855, 10828, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 264918, 183005, 256734, 338660, 338664, 264941, 363251, 207619, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 387944, 355179, 330610, 330642, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 330748, 330760, 330768, 248862, 396328, 158761, 199728, 396336, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 183383, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 339097, 248985, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 437620, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 249312, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 421508, 224904, 11918, 159374, 224913, 126610, 339601, 224916, 224919, 126616, 224922, 208538, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 257724, 224959, 257732, 224965, 339662, 224975, 257747, 224981, 257761, 224993, 257764, 224999, 339695, 225012, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 372499, 167700, 225048, 257819, 225053, 184094, 225058, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 397112, 225082, 397115, 225087, 225092, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 339814, 225127, 257896, 274280, 257901, 225137, 257908, 225141, 257912, 257916, 225148, 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, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 266453, 225493, 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, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 389502, 250238, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 381512, 324170, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 373398, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389892, 373510, 389926, 152370, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 324472, 398201, 119674, 340858, 324475, 430972, 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, 349180, 439294, 431106, 209943, 209946, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210039, 341113, 349308, 210044, 349311, 160895, 152703, 210052, 349319, 210055, 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, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 365911, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 136590, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 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, 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, 268143, 358255, 399215, 358259, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 333774, 358371, 350189, 350193, 350202, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 416157, 342430, 268701, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 260801, 350917, 391894, 154328, 416473, 64230, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 375574, 162591, 326441, 326451, 326454, 326460, 244540, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 326502, 375656, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 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, 384107, 367723, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 384181, 384191, 351423, 384198, 326855, 244937, 253130, 343244, 146642, 359649, 343270, 351466, 351479, 384249, 343306, 261389, 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, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 155322, 425662, 155327, 155351, 155354, 212699, 155363, 245475, 245483, 155371, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 262005, 147317, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 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 ]
8f8be00cb43e419b25635f0f0de16ee60172a555
19bd7ad8e790962f782dbb92197b64e0c3980aa3
/Sample/Sample/AppDelegate.swift
491c23e27ee0b12d87c8631689080bfe8aa12447
[ "MIT" ]
permissive
Meniny/EnumCollection
5162743df01827bca01dad4f597db9cae3d8fa57
4910734e72f9f12b8dbe5ec7d1e764b004bdcc7f
refs/heads/master
2021-01-16T05:22:52.886263
2019-04-16T02:44:41
2019-04-16T02:44:41
99,990,481
10
3
null
null
null
null
UTF-8
Swift
false
false
2,207
swift
// // AppDelegate.swift // Sample // // Created by Meniny on 2017-08-11. // Copyright © 2017年 Meniny. 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, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 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, 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, 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, 213575, 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, 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, 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, 303981, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 234648, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 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, 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, 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, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 148946, 288214, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 320998, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 206336, 296450, 148990, 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, 198310, 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, 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, 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, 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, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 354656, 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, 330244, 281095, 223752, 150025, 338440, 240132, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 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, 240519, 322440, 314249, 338823, 183184, 142226, 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, 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, 196133, 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, 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, 44948, 298901, 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, 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, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 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, 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, 127490, 283142, 127494, 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, 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, 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, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 324490, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 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, 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, 324757, 308379, 300189, 324766, 119967, 234653, 324768, 234657, 283805, 242852, 300197, 234661, 283813, 234664, 177318, 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, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 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, 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, 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, 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, 276206, 358128, 284399, 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, 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, 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, 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, 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, 342707, 154292, 318132, 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, 293706, 277329, 162643, 310100, 301911, 277337, 301913, 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, 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, 285792, 277601, 203872, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 285835, 302218, 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, 327240, 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, 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, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
fa42ec44428722aa59232d81195265600b6230d5
c6a6a0da6d329da159d12a377669cda8f238b062
/Bamboo Breakout/EndScreen/EndScene.swift
2eeb2026ec42f7102a0908f7e569c6c770241cac
[]
no_license
balagurubaran/bricks-break-2048
c9c0d80b51fd2696fbd1e9f48f3229ad29f55e5f
98b26c33fe88bca74220d317df0db54f1135e26d
refs/heads/master
2021-07-08T14:22:08.560837
2021-04-30T21:20:28
2021-04-30T21:20:28
88,044,825
0
0
null
null
null
null
UTF-8
Swift
false
false
1,119
swift
import SpriteKit class EndScene: SKScene { let reveal = SKTransition.push(with: .right, duration: 0.33) override func didMove(to view: SKView) { for each in self.scene?.children ?? []{ each.zPosition = 1 } print(self.scene?.children.count) } // override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { for t in touches { self.touchDown(atPoint: t.location(in: self)) } for touch in touches { } } func touchDown(atPoint pos : CGPoint) { var newScene = SKScene() let touchedNode = self.atPoint(pos) if(touchedNode.name == "menu"){ newScene = MenuScene(fileNamed:"MenuScene")! newScene.scaleMode = .aspectFill self.view?.presentScene(newScene, transition: reveal) } else { retry() } } func retry() { let newScene = GameScene(fileNamed:"GameScene")! newScene.scaleMode = .fill self.view?.presentScene(newScene, transition: reveal) } }
[ -1 ]
5d582bd2297f09d57d6bf356009bfc9c5c7c788e
9f554461cd09d79b53ddccc48e36fefe77a90795
/PerseusShelfUnion/PerseusShelfUnion/Controller/L_LoginViewController.swift
b6e6bed68cc7030540abe67c843c1c8d9dcc1f3b
[]
no_license
sakamoto2333/PerseusShelfUnion
d9922239bb0f5d3c5ef9baf65dfc6d65da5ecae9
7c52afde2635ab5d8b9d89e74f594cceab60a2a4
refs/heads/Debug
2021-01-12T10:02:25.109652
2017-01-12T07:29:44
2017-01-12T07:29:44
76,340,118
1
0
null
2017-01-10T06:55:20
2016-12-13T08:46:35
Swift
UTF-8
Swift
false
false
3,827
swift
// // LoginViewController.swift // PerseusShelfUnion // // Created by 123 on 16/12/14. // Copyright © 2016年 XHVolunteeriOS. All rights reserved. // import UIKit var UserId = "" var IsProved: Int! class L_LoginViewController: UIViewController { @IBOutlet weak var id: TextFieldFrame! @IBOutlet weak var password: TextFieldFrame! let loginmodel = LoginModel() let Loginmodel = LoginModel() override func viewDidLoad() { super.viewDidLoad() loginmodel.loadData() password.isSecureTextEntry = true if loginmodel.LoginList.count > 0 { id.text = loginmodel.LoginList.first?.Name password.text = loginmodel.LoginList.first?.Password LoginButtonTouch(Any.self) } // Do any additional setup after loading the view. } override func viewDidDisappear(_ animated: Bool) { NotificationCenter.default.removeObserver(self) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func L_back(segue:UIStoryboardSegue) { } @IBAction func LoginButtonTouch(_ sender: Any) { loginmodel.loadData() loginmodel.LoginList.removeAll() loginmodel.saveData() NotificationCenter.default.addObserver(self, selector: #selector(self.LoginUser(_:)), name: NSNotification.Name(rawValue: "LoginUser"), object: nil) Messages().showNow(code: 0x1004) self.view.isUserInteractionEnabled = false let Requesting = Model_LoginUser.Requesting(UserName: id.text!, Password: password.text!) UserReposity().LoginUser(Requesting: Requesting) } func LoginUser(_ notification:Notification) { self.view.isUserInteractionEnabled = true if let Response:Model_LoginUser.Response = notification.object as! Model_LoginUser.Response?{ if (Response.Code == Model_LoginUser.CodeType.登录成功){ Messages().show(code: 0x1005) loginmodel.loadData() loginmodel.LoginList.append(LoginPassword(Name: id.text!, Password: password.text!)) loginmodel.saveData() UserId = Response.UserID! IsProved = Response.IsProved self.performSegue(withIdentifier: "ToMainView", sender: self) } else if(Response.Code == Model_LoginUser.CodeType.没有该用户){ Messages().showError(code: 0x1006) } else if(Response.Code == Model_LoginUser.CodeType.用户名密码不正确){ Messages().showError(code: 0x1001) } else if(Response.Code == Model_LoginUser.CodeType.该用户尚未启动){ Messages().showError(code: 0x1007) } else if(Response.Code == Model_LoginUser.CodeType.请输入密码){ Messages().showError(code: 0x3001) } else if(Response.Code == Model_LoginUser.CodeType.请输入用户名) { Messages().showError(code: 0x3000) } else{ Messages().showError(code: 0x1002) } } NotificationCenter.default.removeObserver(self) } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { self.view.endEditing(true) } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
8b36df00c16f893587c345eb7feb5fd3c0f2247a
03280c62007c9773a05e4784fb9038333c60c1bf
/Sources/Views/NotificationBanner.swift
27de52bb12a40d6fef7c40b3adcac55a2b7beeed
[ "MIT" ]
permissive
turlodales/ello-ios
7aaa5f65214a69465149a035bfe59f694ab3a5ef
55cb128f2785b5896094d5171c65a40dc0304d5f
refs/heads/master
2022-01-25T18:00:25.713444
2022-01-17T00:40:16
2022-01-17T00:40:16
230,545,872
0
0
MIT
2022-01-17T05:56:35
2019-12-28T02:11:07
Swift
UTF-8
Swift
false
false
2,408
swift
//// /// NotificationBanner.swift // import CRToast struct NotificationBanner { static func displayAlert(payload: PushPayload) { guard !Globals.isTesting else { return } configureDefaultsWith(payload: payload) CRToastManager.showNotification(withMessage: payload.message) {} } static func displayAlert(message: String) { guard !Globals.isTesting else { return } configureDefaults() CRToastManager.showNotification(withMessage: message) {} } static func dismissAlert() { guard !Globals.isTesting else { return } configureDefaults() CRToastManager.dismissNotification(true) } } private extension NotificationBanner { static func configureDefaults() { CRToastManager.setDefaultOptions( [ kCRToastTimeIntervalKey: 4, kCRToastNotificationTypeKey: CRToastType.navigationBar.rawValue, kCRToastNotificationPresentationTypeKey: CRToastPresentationType.cover.rawValue, kCRToastTextColorKey: UIColor.white, kCRToastBackgroundColorKey: UIColor.black, kCRToastAnimationOutDirectionKey: CRToastAnimationDirection.top.rawValue, kCRToastAnimationInTimeIntervalKey: DefaultAnimationDuration, kCRToastAnimationOutTimeIntervalKey: DefaultAnimationDuration, kCRToastFontKey: UIFont.defaultFont(), kCRToastTextAlignmentKey: NSTextAlignment.left.rawValue, kCRToastTextMaxNumberOfLinesKey: 2, ] ) } static func configureDefaultsWith(payload: PushPayload) { configureDefaults() let interactionResponder = CRToastInteractionResponder( interactionType: CRToastInteractionType.tap, automaticallyDismiss: true ) { _ in postNotification( PushNotificationNotifications.interactedWithPushNotification, value: payload ) } let dismissResponder = CRToastInteractionResponder( interactionType: CRToastInteractionType.swipe, automaticallyDismiss: true ) { _ in } CRToastManager.setDefaultOptions( [ kCRToastInteractionRespondersKey: [interactionResponder, dismissResponder], ] ) } }
[ -1 ]
f2cf80a543596ad977212316fbe59113889de545
f383d904b4531781bed8d9fce41ef828bb2f8c03
/第九次作业/作业九--二题/ViewController.swift
7b705f82110df02c51c030499cba43af90a4dace
[]
no_license
WweiZhang/IOS-homework
4f253702c27f4fd9c9b2e0f10b93322abac022d8
d3beec5c0e0d47c2960adb208c8b60439d3964a0
refs/heads/master
2020-04-03T19:05:45.734888
2018-12-19T03:19:35
2018-12-19T03:19:35
155,509,929
0
0
null
null
null
null
UTF-8
Swift
false
false
2,147
swift
// // ViewController.swift // 作业九--二三题 // // Created by student on 2018/11/10. // Copyright © 2018年 zw. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } @IBAction func actionSheet(_ sender: Any) { let alert = UIAlertController(title: "action sheet", message: "please choose color", preferredStyle: .actionSheet) alert.addAction(UIAlertAction(title: "RED", style: .default, handler: { (action) in self.view.backgroundColor = UIColor.red})) alert.addAction(UIAlertAction(title: "GREEN", style: .default, handler: { (action) in self.view.backgroundColor = UIColor.green})) alert.addAction(UIAlertAction(title: "BLUE", style: .default, handler: { (action) in self.view.backgroundColor = UIColor.blue})) alert.addAction(UIAlertAction(title: "WHILE", style: .default, handler: { (action) in self.view.backgroundColor = UIColor.white})) present(alert, animated: true, completion: nil) } @IBAction func alert(_ sender: Any) { let alert = UIAlertController(title: "Alert", message: "login message", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "LOGIN", style: .default, handler: { (action) in guard let username = alert.textFields?.first?.text, let password = alert.textFields?.last?.text else{ return } // print("\(username) \(password)") })) alert.addAction(UIAlertAction(title: "CANCEL", style: .cancel, handler: { (action) in })) alert.addTextField { (textField) in textField.placeholder = "your user name?" } alert.addTextField { (textField) in textField.placeholder = "your password?" textField.isSecureTextEntry = true } present(alert, animated: true, completion: nil) } }
[ -1 ]
2c518eae10a6d0754c1c0457047df4af2dfce59a
5293ee3d754993f5ff75f10629166d47ac0d30b7
/Meme1.0/Meme1.0Tests/Meme1_0Tests.swift
3a856596621fd9ef466cb10d8d43bf7a712e4eeb
[]
no_license
Atheer-95/MyMemes1.0
871913671293b8ed23467f6437a5bcb87f5e9a13
10b44fc483514ab4fd35998169b7e5426f564d9a
refs/heads/main
2023-04-23T21:50:58.154710
2021-05-10T18:07:40
2021-05-10T18:07:40
366,132,293
0
0
null
null
null
null
UTF-8
Swift
false
false
893
swift
// // Meme1_0Tests.swift // Meme1.0Tests // // Created by Eth Os on 04/09/1442 AH. // import XCTest @testable import Meme1_0 class Meme1_0Tests: 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. } } }
[ 333828, 43014, 358410, 354316, 313357, 360462, 399373, 182296, 317467, 145435, 16419, 223268, 229413, 204840, 315432, 325674, 344107, 102445, 155694, 176175, 253999, 233517, 346162, 129076, 241716, 229430, 243767, 163896, 180280, 358456, 352315, 288828, 436285, 376894, 288833, 288834, 436292, 403525, 352326, 225351, 315465, 436301, 338001, 196691, 338003, 280661, 329814, 307289, 200794, 385116, 356447, 254048, 237663, 315487, 280675, 280677, 43110, 319591, 321637, 436329, 194666, 221290, 438377, 260207, 352368, 432240, 204916, 233589, 266357, 131191, 215164, 215166, 422019, 329859, 280712, 415881, 104587, 235662, 241808, 381073, 196760, 284826, 426138, 346271, 436383, 362659, 49316, 299174, 333991, 258214, 333992, 32941, 239793, 377009, 405687, 182456, 295098, 258239, 379071, 389313, 299203, 149703, 299209, 346314, 372941, 266449, 321745, 139479, 254170, 229597, 194782, 301279, 311519, 317664, 280802, 379106, 387296, 346346, 205035, 307435, 321772, 438511, 381172, 436470, 327929, 243962, 344313, 184575, 149760, 375039, 411906, 147717, 368905, 180493, 325905, 254226, 272658, 272660, 368916, 262421, 325912, 381208, 377114, 151839, 237856, 237857, 233762, 211235, 217380, 432421, 211238, 338218, 254251, 251213, 311597, 358703, 321840, 98610, 332083, 379186, 332085, 358709, 180535, 336183, 332089, 321860, 332101, 438596, 323913, 348492, 383311, 323920, 344401, 366930, 377169, 348500, 368981, 155990, 289110, 368984, 272729, 168281, 215385, 332123, 332127, 98657, 383332, 242023, 383336, 270701, 160110, 242033, 270706, 354676, 354677, 139640, 291192, 106874, 211326, 436608, 362881, 240002, 436611, 311685, 225670, 317831, 106888, 340357, 242058, 385417, 373134, 385422, 108944, 252308, 190871, 213403, 149916, 39324, 121245, 242078, 420253, 141728, 315810, 315811, 381347, 289189, 108972, 272813, 340398, 385454, 377264, 342450, 338356, 436661, 293303, 311738, 33211, 293310, 336320, 311745, 342466, 127427, 416197, 254406, 188871, 324039, 129483, 342476, 373197, 289232, 328152, 256477, 287198, 160225, 342498, 358882, 334309, 340453, 391655, 432618, 375276, 319981, 291311, 254456, 377338, 377343, 254465, 174593, 291333, 348682, 340490, 139792, 420369, 303636, 258581, 393751, 416286, 377376, 207393, 375333, 358954, 377386, 244269, 197167, 375343, 385588, 289332, 234036, 375351, 174648, 338489, 338490, 244281, 348732, 352829, 315960, 242237, 70209, 348742, 115270, 70215, 293448, 55881, 301638, 309830, 348749, 381517, 385615, 426576, 340558, 369235, 416341, 297560, 332378, 201308, 354911, 416351, 139872, 436832, 436834, 268899, 111208, 39530, 184940, 373358, 420463, 346737, 389745, 313971, 139892, 346740, 420471, 344696, 287352, 209530, 244347, 356989, 373375, 152195, 311941, 348806, 336518, 369289, 311945, 330379, 344715, 311949, 287374, 326287, 375440, 316049, 311954, 334481, 117396, 111253, 316053, 346772, 230040, 264856, 111258, 363163, 111259, 271000, 289434, 303771, 205471, 318106, 318107, 342682, 139939, 344738, 176808, 352937, 205487, 303793, 318130, 299699, 293556, 336564, 383667, 314040, 287417, 342713, 39614, 287422, 377539, 422596, 422599, 291530, 225995, 363211, 164560, 242386, 385747, 361176, 418520, 422617, 287452, 363230, 264928, 422626, 375526, 234217, 346858, 330474, 342762, 293612, 342763, 289518, 299759, 369385, 377489, 312052, 154359, 348920, 172792, 344827, 221948, 432893, 363263, 205568, 162561, 291585, 295682, 430849, 35583, 291592, 197386, 383754, 62220, 117517, 434957, 322319, 422673, 377497, 430865, 166676, 291604, 310036, 197399, 207640, 422680, 426774, 426775, 326429, 293664, 344865, 377500, 326433, 342820, 197411, 400166, 289576, 293672, 295724, 152365, 197422, 353070, 164656, 295729, 422703, 191283, 189228, 422709, 152374, 197431, 273207, 375609, 355130, 160571, 353078, 336702, 289598, 160575, 430910, 160580, 252741, 420677, 381773, 201551, 293711, 353109, 377686, 244568, 230234, 189275, 244570, 435039, 295776, 242529, 357218, 349026, 303972, 385893, 342887, 355178, 308076, 242541, 207727, 207729, 330609, 246643, 207732, 295798, 361337, 177019, 185211, 308092, 398206, 400252, 291712, 158593, 254850, 359298, 260996, 359299, 113542, 369538, 381829, 316298, 392074, 349067, 295824, 224145, 349072, 355217, 256922, 289690, 318364, 390045, 310176, 185250, 310178, 420773, 185254, 256935, 289703, 293800, 140204, 236461, 363438, 252847, 347055, 377772, 316333, 304051, 326581, 373687, 316343, 326587, 230332, 377790, 289727, 273344, 349121, 363458, 330689, 353215, 379844, 213957, 19399, 359364, 326601, 345033, 373706, 316364, 359381, 386006, 418776, 433115, 248796, 343005, 359387, 50143, 347103, 340961, 340955, 130016, 64485, 123881, 326635, 187374, 383983, 347123, 240630, 271350, 201720, 127992, 295927, 349175, 328700, 318461, 293886, 257024, 328706, 330754, 320516, 293893, 295942, 357379, 386056, 410627, 353290, 254987, 330763, 377869, 433165, 384016, 238610, 308243, 418837, 140310, 433174, 201755, 252958, 369701, 357414, 248872, 238639, 357423, 252980, 300084, 359478, 312373, 203830, 238651, 308287, 248901, 257094, 359495, 377926, 218186, 250954, 314448, 341073, 339030, 353367, 439384, 361566, 304222, 392290, 253029, 257125, 300135, 316520, 273515, 173166, 357486, 144496, 351344, 187506, 404593, 377972, 285814, 291959, 300150, 300151, 363641, 160891, 363644, 341115, 300158, 377983, 392318, 248961, 150657, 384131, 349316, 402565, 349318, 302216, 330888, 386189, 373903, 169104, 177296, 326804, 363669, 238743, 119962, 300187, 300188, 339100, 351390, 199839, 380061, 429214, 343203, 265379, 300201, 249002, 253099, 253100, 238765, 3246, 300202, 306346, 238769, 318639, 402613, 367799, 421048, 373945, 113850, 294074, 302274, 367810, 259268, 253125, 265412, 353479, 62665, 402634, 283852, 259280, 290000, 316627, 333011, 189653, 419029, 351446, 148696, 296153, 357595, 134366, 359647, 304351, 195808, 298208, 310497, 298212, 298213, 222440, 330984, 328940, 298221, 253167, 298228, 302325, 234742, 386294, 351476, 351478, 128251, 363771, 386301, 261377, 351490, 320770, 386306, 437505, 322824, 439562, 292107, 328971, 369930, 414990, 353551, 251153, 177428, 349462, 257305, 250192, 320796, 222494, 253216, 339234, 372009, 412971, 353584, 351537, 261425, 382258, 345396, 300343, 386359, 116026, 378172, 286013, 306494, 382269, 216386, 193859, 312648, 337225, 304456, 230729, 146762, 224586, 177484, 294218, 259406, 234831, 238927, 294219, 331090, 353616, 406861, 318805, 314710, 372054, 425304, 159066, 374109, 314720, 378209, 163175, 333160, 386412, 380271, 327024, 296307, 116084, 208244, 249204, 316787, 382330, 290173, 306559, 314751, 318848, 337281, 148867, 378244, 357762, 253317, 298374, 314758, 314760, 142729, 296329, 368011, 384393, 388487, 314766, 296335, 318864, 112017, 234898, 9619, 259475, 275859, 318868, 370071, 357786, 290207, 314783, 251298, 310692, 314789, 333220, 314791, 396711, 245161, 396712, 374191, 286129, 380337, 173491, 286132, 150965, 304564, 353719, 380338, 210358, 228795, 425405, 302531, 163268, 380357, 339398, 361927, 300489, 425418, 306639, 413137, 353750, 23092, 210390, 210391, 210393, 210392, 286172, 144867, 271843, 429542, 361963, 296433, 251378, 308723, 300536, 286202, 359930, 302590, 210433, 372227, 366083, 323080, 329225, 253451, 253452, 296461, 359950, 259599, 304656, 329232, 146964, 398869, 308756, 253463, 370197, 175639, 374296, 388632, 374299, 308764, 349726, 134686, 396827, 431649, 355876, 286244, 245287, 402985, 394794, 245292, 349741, 347694, 169518, 431663, 288309, 312889, 194110, 425535, 235070, 349763, 196164, 265798, 288327, 218696, 292425, 128587, 265804, 333388, 396882, 349781, 128599, 179801, 44635, 239198, 343647, 333408, 396895, 99938, 300644, 323172, 310889, 415338, 243307, 312940, 54893, 204397, 138863, 188016, 222832, 325231, 224883, 120427, 314998, 370296, 366203, 323196, 325245, 337534, 337535, 339584, 263809, 294529, 339585, 194180, 224901, 288392, 229001, 415375, 188048, 239250, 419478, 345752, 425626, 255649, 302754, 153251, 298661, 40614, 300714, 210603, 224946, 337591, 384695, 110268, 415420, 224958, 327358, 333503, 274115, 259781, 306890, 403148, 212685, 333517, 9936, 9937, 241361, 302802, 333520, 272085, 345814, 370388, 384720, 313041, 224984, 345821, 321247, 298720, 321249, 325346, 153319, 325352, 345833, 345834, 212716, 212717, 372460, 360177, 67315, 173814, 325371, 288512, 319233, 175873, 339715, 288516, 360195, 339720, 243472, 372496, 323346, 321302, 345879, 366360, 249626, 325404, 286494, 321310, 255776, 339745, 341796, 257830, 421672, 362283, 378668, 399147, 431916, 300848, 409394, 296755, 259899, 319292, 360252, 325439, 345919, 436031, 403267, 153415, 360264, 345929, 341836, 415567, 325457, 255829, 317269, 362327, 18262, 216918, 241495, 341847, 350044, 346779, 128862, 245599, 345951, 362337, 376669, 345955, 425825, 307039, 296806, 292712, 425833, 423789, 214895, 362352, 313199, 325492, 276341, 417654, 341879, 241528, 317304, 333688, 112509, 55167, 182144, 325503, 305026, 339841, 188292, 333701, 253829, 243591, 315273, 315274, 350093, 325518, 372626, 380821, 329622, 294807, 337815, 333722, 376732, 118685, 298909, 311199, 319392, 350109, 253856, 292771, 354212, 436131, 294823, 415655, 436137, 327596, 362417, 323507, 243637, 290745, 294843, 188348, 362431, 237504, 294850, 274371, 384964, 214984, 151497, 362443, 344013, 212942, 301008, 153554, 212946, 24532, 346067, 212951, 354269, 219101, 372701, 329695, 360417, 436191, 292836, 292837, 298980, 337895, 354280, 313319, 317415, 253929, 380908, 436205, 247791, 362480, 311281, 311282, 325619, 432116, 292858, 415741, 352917 ]
593ba06ca21159c41c2dc5c4eacf29558fb8f745
ba8b7141d6dc6851e3cacc1531fcec39f0392448
/BookAlgorithmDataStructure01/chap01/sum.swift
e3327e10f41027143a3579e6f266cb3c0e946ae3
[]
no_license
cloudsquare22/BookAlgorithmDataStructure01
de5af9e41ecd685dbb9d18d84443730850d7b676
2283fd450165ce8edf03e9770423c33715b31c65
refs/heads/master
2020-12-09T07:58:59.054058
2020-01-11T14:22:36
2020-01-11T14:22:36
233,243,148
0
0
null
null
null
null
UTF-8
Swift
false
false
420
swift
import Foundation func sum() { // aからnまでの総和を求める(for文) print("aからnまでの総和を求めます。") var a = Int(input("整数a:"))! var b = Int(input("整数b:"))! if a > b { (a, b) = (b, a) } var sum = 0 for i in a...b { sum += i // sumに1を加える } print("\(a)から\(b)までの総和は\(sum)です。") }
[ -1 ]
a158db050c54bf42771e8dfe374fa94632392232
27f473ccc76bb3da481eafb8cd2da4b78058096a
/[탐욕법] 조이스틱.swift
7b831a7391155a2cf01c2d57b1707e6d7362bb97
[ "MIT" ]
permissive
ChangYeop-Yang/Study-Algorithm
07f838be1a41d6f6a1293a21ae4b7e9f623b39f4
7dc83df6ad4bb015ef46788e72e10ea6b5ec84cf
refs/heads/master
2022-03-07T13:26:06.781186
2022-02-26T15:35:17
2022-02-26T15:35:17
70,337,924
7
0
null
null
null
null
UTF-8
Swift
false
false
2,545
swift
import Foundation func distance(_ target: String, index: inout String.Index) -> Int { // ▶ - 커서를 오른쪽으로 이동 var rightIndex: String.Index = index while target.endIndex != rightIndex && target[rightIndex] == "A" { target.formIndex(after: &rightIndex) } // ◀ - 커서를 왼쪽으로 이동 (첫 번째 위치에서 왼쪽으로 이동하면 마지막 문자에 커서) var leftIndex: String.Index = index var leftDistance: Int = Int.zero if index == target.startIndex { leftDistance += 1 leftIndex = target.index(before: target.endIndex) } while target[leftIndex] == "A" { leftDistance += 1 if leftIndex == target.startIndex { leftIndex = target.index(before: target.endIndex) continue } target.formIndex(before: &leftIndex) } let rightDistance = abs(target.distance(from: index, to: rightIndex)) if rightIndex == target.endIndex || rightDistance > leftDistance { index = leftIndex return leftDistance } else { index = rightIndex return rightDistance } } /** ▲ - 다음 알파벳 ▼ - 이전 알파벳 `(A에서 아래쪽으로 이동하면 Z로)` ◀ - 커서를 왼쪽으로 이동 `(첫 번째 위치에서 왼쪽으로 이동하면 마지막 문자에 커서)` ▶ - 커서를 오른쪽으로 이동 */ func solution(_ name: String) -> Int { // MARK: - 맨 처음엔 A로만 이루어져 있습니다. let alphabat: [UInt8] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".compactMap { $0.asciiValue } var replace = name let target = String(repeating: "A", count: name.count) var result = Int.zero var index = target.startIndex while target != replace { // MARK: - 커서 이동의 최솟값을 찾습니다. result += distance(replace, index: &index) // MARK: - 알파벳의 최솟값을 찾습니다. if replace[index] != "A" { let firstIndex = alphabat.firstIndex(of: replace[index].asciiValue!)! let leftValue = alphabat.distance(from: alphabat.endIndex, to: firstIndex) let rightValue = alphabat.distance(from: alphabat.startIndex, to: firstIndex) replace.replaceSubrange(index...index, with: "A") result += min(abs(leftValue), rightValue) } } // MARK: - 조이스틱 조작 횟수의 최솟값 return result }
[ -1 ]
36145642434796f60b0effc22ce0dae01d363a99
033e278c00ccc9e978797d3a84a625cd6b0a54b3
/dope/ViewController/ViewController.swift
4b048f5c8f9734a4a6c3e87d25acfc759cfaa373
[]
no_license
codemonkeyhhq/Dope_dairy
6adcca7c1034f50782226411fec2206db749173f
024f190334aef4cc27312166242b8236785a683a
refs/heads/master
2020-07-28T06:55:58.324625
2019-10-08T00:11:15
2019-10-08T00:11:15
209,344,411
1
0
null
null
null
null
UTF-8
Swift
false
false
1,546
swift
// // ViewController.swift // dope // // Created by Jiaming Duan on 4/24/19. // Copyright © 2019 HaoqiHuang. All rights reserved. // import UIKit import CoreData class ViewController: UIViewController { static var user:UserAccount?=nil @IBAction func signIn(_ sender: UIButton) { if valiateData(){ ViewController.user=SearchHelper.userSearchByAccount(account: accountText.text!) performSegue(withIdentifier: "login", sender: nil) }else{ Note.note(content: "please type correct information") } } @IBOutlet weak var accountText: UITextField! @IBOutlet weak var passWordText: UITextField! func valiateData()->Bool{ if accountText.text==nil{return false} if passWordText.text==nil{return false} if (accountText.text?.count)!<1{return false} if (passWordText.text?.count)!<1{return false} let u1=SearchHelper.userSearchByAccount(account:accountText.text!) let u2=SearchHelper.userSearchByPassword(password: passWordText.text!) if u1==nil || u2==nil{return false} return u1?.id==u2?.id } override func viewDidLoad() { super.viewDidLoad() // let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "Book") // let deleteRequest = NSBatchDeleteRequest(fetchRequest: fetchRequest) // // do{ // try PersistenceService.context.execute(deleteRequest) // }catch let error as NSError{ // // } } }
[ -1 ]
6d9d024d334c266ad92a20f9f5363e40eacdb430
261a1ccd37b360fe878e04137355d9b566c5f28f
/iconFit/ViewController.swift
2e92e0c99d7e00808d44900d28a10ddedb723d4f
[]
no_license
peterfei/iconClip
2b611a9b97ad58094af7cd0897c0c1a219117d16
8f34eeaa6c726b301d11ee0bb9e09f124393e98d
refs/heads/master
2021-01-12T10:18:28.631045
2016-12-20T05:25:02
2016-12-20T05:25:02
76,416,605
1
0
null
null
null
null
UTF-8
Swift
false
false
6,833
swift
// // ViewController.swift // iconFit // // Created by peterfei on 2016/12/14. // Copyright © 2016年 peterfei. All rights reserved. // import Cocoa let kIPhone: String = "iPhone" let kIPad: String = "iPad" let kMacOS: String = "macOS" let kAppIconFolderName: String = "AppIcon.appiconset" let kAppIconContensFileName: String = "Contents.json" public enum AppImageType : Int { case iPhone case iPad case iPhoneIpad case macOS } class ViewController: NSViewController { @IBOutlet weak var imageView: DragImageView! var imageScaleConfig: NSDictionary? @IBOutlet weak var makeScale: NSButton! var largeImagePath: String? var assetPath: String? var exportPath: String? override func viewDidLoad() { super.viewDidLoad() self.setUpUIView() self.readImageScaleConfig() // Do any additional setup after loading the view. } @IBAction func makeAppIconAction(_ sender: NSButton) { self.makeAsserts() } func setUpUIView() { // 调用代理 self.imageView.delegate = self } //plist文件读取 func readImageScaleConfig() { let filePath = Bundle.main.path(forResource: "imageSize", ofType: "plist") let dataMap = NSDictionary(contentsOfFile: filePath!) self.imageScaleConfig = dataMap } override var representedObject: Any? { didSet { // Update the view, if already loaded. } } func makeAsserts() { if (self.largeImagePath==nil || self.exportPath==nil) { startLocalNotification(message: "Oop...",info: "请将上传文件拖入") return } // let selectedIndex = 3 let appIconType = AppImageType.init(rawValue: 3)! //图片裁剪 self.makeAppIconWithType(appIconType) startLocalNotification(message: "Success",info: "文件切割成功") } //根据1024*1024大图生成不同平台图标 func makeAppIconWithType (_ type:AppImageType) { let imageFolerPath = (self.exportPath! as NSString).appendingPathComponent(kAppIconFolderName) print("imageFolerPath is \(imageFolerPath)") let fm = FileManager() let success = fm.createPathIfNeded(path: imageFolerPath) if !success { return } //清除目录,防止以前存在垃圾文件 fm.clearAllFilesAtPath(path: imageFolerPath) let largeImage = NSImage(contentsOfFile: self.largeImagePath!) let configs = self.platAssetsConfig(type) for config in configs { let imageSizeConfig = config["imageSizeConfig"] as? Dictionary<String,Any> let imageFlag = config["imageFlag"]! let keys = imageSizeConfig?.keys for key in keys! { let scales = imageSizeConfig?[key] as! [NSNumber] let size = Int(key)! for scaleNum in scales { print("key = \(key) type = \(scaleNum.className)") let scale = scaleNum.intValue let retion = scale let imageSize = NSSize(width: size*retion, height: size*retion) //按新的尺寸生成图像 let image = largeImage?.reSize(size: imageSize) var imageName: String if retion == 1 { imageName = "icon_\(imageFlag)_\(size).png" } else { imageName = "icon_\(imageFlag)_\(size)@\(retion)x.png" } let imagePath = (imageFolerPath as NSString).appendingPathComponent(imageName) //保存图像 print("path is \(imagePath)") image?.saveAtPath(path: imagePath) } } } } func select_folder (){ let openPanel = NSOpenPanel() openPanel.title = "请选择您的保存目录" openPanel.message = "请选择您的保存目录" openPanel.showsResizeIndicator=true openPanel.canChooseDirectories = true openPanel.canChooseFiles = false openPanel.allowsMultipleSelection = false openPanel.canCreateDirectories = true // openPanel.delegate = appDelegate openPanel.begin { (result) -> Void in if(result == NSFileHandlingPanelOKButton){ let path = openPanel.url!.path print("selected folder is \(path)") self.exportPath = path // self.watchFolderLabel.stringValue = path; // no need when binding // self.savePref("watchFolder", value: path); } } } //获取不同平台的图片配置 func platAssetsConfig(_ type: AppImageType) ->[Dictionary<String,Any>] { var configs: [Dictionary<String,Any>] switch type { case .iPhone: let config = self.imageScaleConfig?[kIPhone] configs = [[ "imageSizeConfig":config!, "imageFlag":kIPhone ]] break case .iPad: let config = self.imageScaleConfig?[kIPad] configs = [[ "imageSizeConfig":config!, "imageFlag":kIPad ]] break case .macOS: let config = self.imageScaleConfig?[kMacOS] configs = [[ "imageSizeConfig":config!, "imageFlag":kMacOS ]] break default: // iPhoneIPad let iPhoneConfig = self.imageScaleConfig?[kIPhone] let iPadConfig = self.imageScaleConfig?[kIPad] configs = [[ "imageSizeConfig":iPhoneConfig!, "imageFlag":kIPhone ], ["imageSizeConfig":iPadConfig!, "imageFlag":kIPad ] ] break } return configs } //用户当前文档目录 func usrDocPath() ->String { let path = NSSearchPathForDirectoriesInDomains(.desktopDirectory,.userDomainMask,true)[0] return path } } extension ViewController: DragImageZoneDelegate { func didFinishDragWithFile(_ filePath:String) { NSLog("filePath \(filePath)") self.largeImagePath = filePath self.select_folder() // self.exportPath = self.usrDocPath() // self.exportButton.isEnabled = true } }
[ -1 ]
a4ec16862b27d2b380c17a08992f6c5e56f58faa
96b0b53c9ac2873aab66e0d793aae093b965655d
/Tumblr/AppDelegate.swift
a789dd3d1ff1685a9df8a25e87ecd4b2dfc5b787
[ "MIT" ]
permissive
Nana-Muthuswamy/TumblrLite
3baa1f4b5d5cd51b8187c178865822703a2588b8
7fc1bee0eea6dff5f091585d6a815a3e6aef8a58
refs/heads/master
2021-01-19T08:13:54.432273
2017-04-08T06:56:34
2017-04-08T06:56:34
87,614,086
0
0
null
null
null
null
UTF-8
Swift
false
false
2,176
swift
// // AppDelegate.swift // Tumblr // // Created by Curtis Wilcox on 3/29/17. // Copyright © 2017 DevFountain LLC. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 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, 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, 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, 254563, 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, 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, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 213902, 189329, 295825, 304019, 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, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 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, 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, 279929, 181626, 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, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 280021, 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, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 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, 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, 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, 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, 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, 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, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 240535, 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, 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, 290174, 298365, 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, 324757, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 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, 148946, 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, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 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, 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, 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, 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, 226185, 308105, 234379, 324490, 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, 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, 308379, 300189, 324766, 119967, 234653, 283805, 234657, 324768, 242852, 300197, 234661, 283813, 234664, 177318, 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, 275725, 349451, 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, 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, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 276052, 284253, 235097, 284255, 300638, 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, 284566, 399252, 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, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 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, 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, 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, 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, 342707, 154292, 277173, 318132, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 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, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 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, 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, 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, 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, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
57f0f8f23362d6cdc5ca9de1a697058a2d9856f4
98af12bc0017b1a657476604d56fe902dcc83240
/Flo/MedalDrawing.playground/Contents.swift
265e9e82294992f7969dfaa963c5c4283cb2de82
[]
no_license
moraisandre/Flo
4dcc4ed55da6e228d7fa423d5e7ae59dcf49b23f
2293e8e2ecaaadcf4c1ce518d523e6b6805c6d0c
refs/heads/master
2020-12-25T14:34:06.344580
2016-07-28T01:39:37
2016-07-28T01:39:37
62,523,715
0
0
null
null
null
null
UTF-8
Swift
false
false
3,277
swift
//: Playground - noun: a place where people can play import UIKit let size = CGSize(width: 120, height: 200) UIGraphicsBeginImageContextWithOptions(size, false, 0.0) let context = UIGraphicsGetCurrentContext() //Gold colors let darkGoldColor = UIColor(red: 0.6, green: 0.5, blue: 0.15, alpha: 1.0) let midGoldColor = UIColor(red: 0.86, green: 0.73, blue: 0.3, alpha: 1.0) let lightGoldColor = UIColor(red: 1.0, green: 0.98, blue: 0.9, alpha: 1.0) //Lower Ribbon var lowerRibbonPath = UIBezierPath() lowerRibbonPath.moveToPoint(CGPointMake(0, 0)) lowerRibbonPath.addLineToPoint(CGPointMake(40,0)) lowerRibbonPath.addLineToPoint(CGPointMake(78, 70)) lowerRibbonPath.addLineToPoint(CGPointMake(38, 70)) lowerRibbonPath.closePath() UIColor.redColor().setFill() lowerRibbonPath.fill() //Add Shadow let shadow:UIColor = UIColor.blackColor().colorWithAlphaComponent(0.80) let shadowOffset = CGSizeMake(2.0, 2.0) let shadowBlurRadius: CGFloat = 5 CGContextSetShadowWithColor(context, shadowOffset, shadowBlurRadius, shadow.CGColor) CGContextBeginTransparencyLayer(context, nil) //Clasp var claspPath = UIBezierPath(roundedRect: CGRectMake(36, 62, 43, 20), cornerRadius: 5) claspPath.lineWidth = 5 darkGoldColor.setStroke() claspPath.stroke() //Medallion var medallionPath = UIBezierPath(ovalInRect: CGRect(origin: CGPointMake(8, 72), size: CGSizeMake(100, 100))) CGContextSaveGState(context) medallionPath.addClip() let gradient = CGGradientCreateWithColors( CGColorSpaceCreateDeviceRGB(), [darkGoldColor.CGColor, midGoldColor.CGColor, lightGoldColor.CGColor], [0, 0.51, 1]) CGContextDrawLinearGradient(context, gradient, CGPointMake(40, 40), CGPointMake(100,160),CGGradientDrawingOptions.DrawsAfterEndLocation) CGContextRestoreGState(context) //Create a transform //Scale it, and translate it right and down var transform = CGAffineTransformMakeScale(0.8, 0.8) transform = CGAffineTransformTranslate(transform, 15, 30) medallionPath.lineWidth = 2.0 //apply the transform to the path medallionPath.applyTransform(transform) medallionPath.stroke() //Upper Ribbon var upperRibbonPath = UIBezierPath() upperRibbonPath.moveToPoint(CGPointMake(68, 0)) upperRibbonPath.addLineToPoint(CGPointMake(108, 0)) upperRibbonPath.addLineToPoint(CGPointMake(78, 70)) upperRibbonPath.addLineToPoint(CGPointMake(38, 70)) upperRibbonPath.closePath() UIColor.blueColor().setFill() upperRibbonPath.fill() //Number One //Must be NSString to be able to use drawInRect() let numberOne = "1" let numberOneRect = CGRectMake(47, 100, 50, 50) let font = UIFont(name: "Academy Engraved LET", size: 60) let textStyle = NSMutableParagraphStyle.defaultParagraphStyle() let numberOneAttributes = [ NSFontAttributeName: font!, NSForegroundColorAttributeName: darkGoldColor] numberOne.drawInRect(numberOneRect, withAttributes:numberOneAttributes) CGContextEndTransparencyLayer(context) //This code must always be at the end of the playground let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext()
[ -1 ]
5ce51d0acbc55689d21207ea308084df6f06438b
89cecd43e8f003bf038b830c38ebd26faba400d1
/SportCarClient/Map/LocSelectPin.swift
639d24b6b4643c74798013c31276cabfdbaaf834
[]
no_license
huangy10/SportCarClient
3c2011e312cd030f16572bd79e78beda38101f19
428e97f93f783ea06a2db3f7286d4c600367ecbb
refs/heads/master
2021-01-17T09:42:04.404968
2016-12-01T13:17:43
2016-12-01T13:17:43
48,122,139
0
2
null
null
null
null
UTF-8
Swift
false
false
739
swift
// // LocSelectPin.swift // SportCarClient // // Created by 黄延 on 16/3/13. // Copyright © 2016年 WoodyHuang. All rights reserved. // import UIKit class UserSelectAnnotationView: BMKAnnotationView { var icon: UIImageView! override init!(annotation: BMKAnnotation!, reuseIdentifier: String!) { super.init(annotation: annotation, reuseIdentifier: reuseIdentifier) self.bounds = CGRect(x: 0, y: 0, width: 38, height: 74) icon = self.addSubview(UIImageView.self).config(UIImage(named: "map_default_marker"), contentMode: .scaleAspectFit) .setFrame(self.bounds) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
[ -1 ]
6a07bdf116435022f2f9aeb333ff0c9ac8fbb92d
1343ad696950f1e5997bf0db25a57fa77d91eda4
/Chapter 05/create_table_view/final/TableViews/TableViews/TableViewController.swift
8bb121deff3bb26176a906b81fcb7da44aa61070
[]
no_license
xboudsady/ios-13-development-essential-training-1
de88a4912836377f57b34d121d53204b23ba3658
996964fb48534df15e2a0a02f9197c6969182734
refs/heads/master
2020-12-01T08:35:45.880679
2019-12-31T04:17:18
2019-12-31T04:17:18
230,592,728
0
0
null
null
null
null
UTF-8
Swift
false
false
2,959
swift
// // TableViewController.swift // TableViews // // Created by Todd Perkins on 9/23/19. // Copyright © 2019 Todd Perkins. All rights reserved. // import UIKit class TableViewController: 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 } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 0 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return 0 } /* override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) // Configure the cell... return cell } */ /* // Override to support conditional editing of the table view. override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the specified item to be editable. return true } */ /* // Override to support editing the table view. override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { // Delete the row from the data source tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } */ /* // Override to support rearranging the table view. override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } */ /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ 294401, 253315, 278662, 318729, 302858, 318730, 374286, 312591, 374289, 336148, 290330, 319773, 248990, 279327, 332323, 282918, 292141, 124670, 281140, 316725, 125110, 303542, 343225, 292155, 285243, 288190, 290167, 176710, 322635, 302924, 253140, 310741, 207957, 357080, 357084, 253309, 167390, 307041, 312673, 311652, 340709, 357093, 357094, 295784, 340712, 292333, 292334, 290158, 290159, 292337, 290162, 290163, 290164, 290165, 125175, 290168, 294525, 123646 ]
ff46eb9200927ba89d18dbc80fb71ff7ec59e74b
671c75f29c9da1ae19e9d78f3e24dd02104727ae
/Capstone/IOS_app/SHAF/SHAF/CalibrationViewController.swift
379ec8ee5e4ea8977504ddc34c97203d5578352e
[ "MIT" ]
permissive
capstone411/SHAF
50b0e2a81a594a6ed8a0d28e93d47b48b774fdfc
1c4776e83eea8fa66fb5d2e864816bdca5f8fff5
refs/heads/master
2021-01-17T11:07:43.887684
2016-06-02T19:44:51
2016-06-02T19:44:51
51,173,666
2
1
null
null
null
null
UTF-8
Swift
false
false
3,383
swift
// // CalibrationViewController.swift // SHAF // // Created by Ahmed Abdulkareem on 5/18/16. // Copyright © 2016 Ahmed Abdulkareem. All rights reserved. // import UIKit class CalibrationViewController: UIViewController { var calibInProcess = false var calibDone = false @IBOutlet weak var startCalibButton: UIButton! override func viewDidLoad() { super.viewDidLoad() // watch for calibration to finish NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(CalibrationViewController.calibComplete(_:)),name:"calibComplete", object: nil) // watch for calibration to fail NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(CalibrationViewController.calibFailed(_:)),name:"calibFailed", object: nil) self.startCalibButton.titleLabel?.text = "Start Calibration" // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func viewWillDisappear(animated: Bool) { NSNotificationCenter.defaultCenter().removeObserver(self) } @IBAction func CalibButtonPressed(sender: AnyObject) { // if they're about to start calibrating if self.startCalibButton.titleLabel?.text?.lowercaseString == "start calibration" { self.startCalibButton.setTitle("Calibrating..", forState: .Normal) self.startCalibButton.enabled = false BLEDiscovery.calibrate(true) BLEDiscovery.assertStop(true) } } // executes when calibration is complete func calibComplete(notification: NSNotification) { dispatch_async(dispatch_get_main_queue()) { BLEDiscovery.calibrate(false) // clear calibration flag self.performSegueWithIdentifier("ReadyIdentifier", sender: nil) } } // executes when calibration fails func calibFailed(notification: NSNotification) { dispatch_async(dispatch_get_main_queue()) { self.startCalibButton.setTitle("Start Calibration", forState: .Normal) BLEDiscovery.calibrate(false) // clear calibration flag self.startCalibButton.enabled = true // enable start calibartion button self.showCalibFailedAlert() // show an error message } } // shows a calibration fail message func showCalibFailedAlert() { // create the alert let alert = UIAlertController(title: "Calibration Failed", message: "Please try again", preferredStyle: UIAlertControllerStyle.Alert) // add an action (button) alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)) // show the alert self.presentViewController(alert, animated: true, completion: nil) } /* // 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. } */ }
[ -1 ]
3996259d22ea7eeea6b42e973df34dc57346b18a
0a6c36114450919021c7acf6d58cbd460eac40d8
/DropBitUITests/UITestCases/ImportWalletUITests.swift
11f29cf7826dd97484e426bd1232cefc55d61da8
[ "MIT" ]
permissive
kievgram/dropbit-ios
7a0757335dde78a44fa0f4675072e2c645be15a5
a66b9416335d065a6498f926e12fa8b01d6f2062
refs/heads/master
2020-12-01T19:49:34.144919
2019-12-16T15:23:40
2019-12-16T15:23:40
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,955
swift
// // ImportWalletUITests.swift // DropBitUITests // // Created by Ben Winters on 11/7/18. // Copyright © 2018 Coin Ninja, LLC. All rights reserved. // import XCTest class ImportWalletUITests: UITestCase, UITestRecoverWordBackupAutomatable { override func setUp() { super.setUp() app.appendTestArguments([.resetPersistence, .skipTwitterAuthentication]) app.launch() } /* func testRestoringWalletShowsFirstAddress() { let recoveryWords = UITestHelpers.recoverOnlyWords() let firstAddress = UITestHelpers.recoverOnlyWordsFirstAddress addSystemAlertMonitor() StartPage() .tapRestore() PinCreationPage() .enterSimplePin(digit: 1, times: 6) RestoreWalletPage() .enterWords(recoveryWords) SuccessFailPage().checkWalletRecoverySucceeded() .tapGoToWallet() DeviceVerificationPage() .tapSkip() PushInfoPage()?.dismiss() WalletOverviewPage() .tapRequest() RequestPayPage() .checkAddressLabelDisplays(expectedAddress: firstAddress) } */ func testRestoringWalletWithUppercaseWordsSucceeds() { let recoveryWords = UITestHelpers.recoverOnlyWords().map { $0.uppercased() } addSystemAlertMonitor() StartPage().tapRestore() PinCreationPage().enterSimplePin(digit: 1, times: 6) RestoreWalletPage().enterWords(recoveryWords) // SuccessFailPage().checkWalletRecoverySucceeded() } func testRestoringLegacyDeactivatedWalletPromptsUserToStartOver() { let recoveryWords = UITestHelpers.recoverOnlyLegacyDeactivatedWords() addSystemAlertMonitor() StartPage().tapRestore() PinCreationPage().enterSimplePin(digit: 2, times: 6) RestoreWalletPage().enterWords(recoveryWords) let title = "You have entered recovery words from a legacy DropBit wallet. We are upgrading all wallets to " + "a new version of DropBit for enhanced security, lower transaction fees, and Lightning support. Please enter " + "the new recovery words you were given upon upgrading, or create a new wallet." let predicate = NSPredicate(format: "label == %@", title) let alertLabel = app.staticTexts.containing(predicate).firstMatch let alertLabelExists = alertLabel.waitForExistence(timeout: 1.0) XCTAssert(alertLabelExists) app.buttons["Start Over"].tap() StartPage().tapNewWallet() PinCreationPage().enterSimplePin(digit: 1, times: 6) DeviceVerificationPage().tapSkip() PushInfoPage()?.dismiss() DropBitMePage()?.tapClose() let backupHeader = backupWalletWarningHeader() backupHeader.tap() performBackup() } func testRestoringLegacyWalletNeedingUpgradeStartsUpgrade() { let recoveryWords = UITestHelpers.recoverOnlyLegacyWords() addSystemAlertMonitor() StartPage().tapRestore() PinCreationPage().enterSimplePin(digit: 1, times: 6) RestoreWalletPage().enterWords(recoveryWords) LightningUpgradeStartPage().tapUpgradeNow() } }
[ -1 ]
1159b8d731673b1982c4691a9cd837754dbefd6a
2d599134d4de206fb49e75c8b6a8d5613a02ebab
/Nike/Helpers/Colors.swift
e8f458aae3f7faff064483965f8741cc23762179
[]
no_license
btn52396/Nike
5feb013859e8a2c25ec9d318191fa7f1aa35a0b2
d3d9e45f31a4b4862ccc7c3d34b3f56e0508e861
refs/heads/master
2023-01-03T09:48:50.732484
2020-10-28T11:03:19
2020-10-28T11:03:19
307,699,651
0
0
null
null
null
null
UTF-8
Swift
false
false
3,175
swift
// // Colors.swift // Nike // // Created by Bryan Nguyen on 10/26/20. // Copyright © 2020 Bryan Nguyen. All rights reserved. // import UIKit // MARK: - Colors extension UIColor { /// Label color public static var label: UIColor = .dynamicColor(light: .black, dark: .white) /// Visit album button title color public static var buttonTitle: UIColor = .white /// Visit album button background color public static var buttonBackground: UIColor = .init(hex: "#D73C4B") /// Primary background color (package view) public static var primaryBackground: UIColor = .dynamicColor(light: .white, dark: .black) /// Secondary background color (view controller) public static var secondaryBackground: UIColor = .dynamicColor(light: .gray(level: 1), dark: .gray(level: 6)) /// Gray color according to the level /// - Parameter level: 1 to 6, light to dark scale /// - Returns: gray color private static func gray(level: Int) -> UIColor { switch max(level, 1) { case 1: return .init(hex: "#DDDFE1") case 2: return .init(hex: "#B4B9BE") case 3: return .init(hex: "#91989E") case 4: return .init(hex: "#4F555C") case 5: return .init(hex: "#31363B") default: return .init(hex: "#14171A") } } } // MARK: - Utility extension UIColor { /// Initializes a color according to the hexadecimal string value /// - Parameters: /// - hex: string representing the color in hexadecimal format /// - alpha: alpha value of the color to be generated /// - Note: the hexadecimal string must be valid (including `#` and `6` hexadecimal digits public convenience init(hex: String, alpha: CGFloat = 1) { guard hex.hasPrefix("#") else { fatalError() } let start = hex.index(hex.startIndex, offsetBy: 1) let hexColor = String(hex[start...]) guard hexColor.count == 6 else { fatalError() } let scanner = Scanner(string: hexColor) var hexNumber: UInt64 = 0 guard scanner.scanHexInt64(&hexNumber) else { fatalError() } let r = CGFloat((hexNumber & 0xFF0000) >> 16) / 255 let g = CGFloat((hexNumber & 0x00FF00) >> 8) / 255 let b = CGFloat((hexNumber & 0x0000FF) >> 0) / 255 self.init(displayP3Red: r, green: g, blue: b, alpha: alpha) } /// Generate a dynamic color that changes according to the operating system dark/light mode /// - Parameters: /// - light: color for light mode /// - dark: color for dark mode /// - Returns: dynamic color public class func dynamicColor(light: UIColor, dark: UIColor) -> UIColor { if #available(iOS 13.0, *) { return UIColor { switch $0.userInterfaceStyle { case .dark: return dark default: return light } } } else { return light } } }
[ -1 ]
28ff9ec934b9e82f41b4b5e9f0503f588f5bd9f3
ddbd63b6fdc36a9513c9848efbde55b02f56f896
/ECE564_HW/Database/DukePerson+CoreDataProperties.swift
037cf3fd291088235b390a1042de1d555d6df4ce
[]
no_license
yueyang0115/contact-book-app
d169f1c46eace396eb26f530a8f0cdcbd4d3132a
b281fcdc4484782870990b9e2a8563a95a5a2cdc
refs/heads/master
2022-12-31T19:14:30.390643
2020-10-12T01:12:51
2020-10-12T01:12:51
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,064
swift
// // DukePerson+CoreDataProperties.swift // ECE564_HW // // Created by 杨越 on 10/2/20. // Copyright © 2020 ECE564. All rights reserved. // // import Foundation import CoreData protocol ECE564 { var hobby : [String]? {get} var language : [String]? {get} } extension DukePerson : ECE564{ @nonobjc public class func fetchRequest() -> NSFetchRequest<DukePerson> { return NSFetchRequest<DukePerson>(entityName: "DukePerson") } @NSManaged public var degree: String? @NSManaged public var email: String? @NSManaged public var firstName: String? @NSManaged public var gender: String? @NSManaged public var hobby: [String]? @NSManaged public var image: String? @NSManaged public var language: [String]? @NSManaged public var lastName: String? @NSManaged public var role: String? @NSManaged public var team: String? @NSManaged public var whereFrom: String? @NSManaged public var id: String? @NSManaged public var netid: String? @NSManaged public var department: String? }
[ -1 ]
fd97a1dd508cded2154a71a25ff432cfd468d8ab
fa60aac7dab3a5cdbe83f602fbe9d455aa0f9b53
/realityKitViewController.swift
f005e3c8e50c38972d785ae07998de79ec972989
[]
no_license
alirothberg/basketballMuseumApp
27e4c91d1405ea7fb67451d18ebf826c1dce5bf0
f88f16b3c5ae7773b35c44b089ad9b660d6a2928
refs/heads/main
2022-12-29T05:05:50.293770
2020-10-11T16:10:42
2020-10-11T16:10:42
303,155,174
0
0
null
null
null
null
UTF-8
Swift
false
false
579
swift
// // realityKitViewController.swift // Duke Basketball Museum // // Created by Ali Rothberg on 7/13/20. // Copyright © 2020 OIT Duke. All rights reserved. // import UIKit import RealityKit class realityKitViewController: UIViewController { @IBOutlet var arView: ARView! override func viewDidLoad() { super.viewDidLoad() // Load the "Box" scene from the "Experience" Reality File let boxAnchor = try! Experience.loadBox() // Add the box anchor to the scene arView.scene.anchors.append(boxAnchor) } }
[ -1 ]
4a46c006de6659b0b367843404c48a5d6095032c
56fa093995a47995b5a3f9a82c5b6e372b4443e4
/Carthage/Checkouts/swift-sdk/Source/DiscoveryV1/Models/ListCollectionsResponse.swift
915a0ad29ea296fb4305ca3c3ac78b1bc9afecd2
[ "Apache-2.0", "MIT" ]
permissive
gain620/food-watch
99c877571d4487ef60dcb0a7940dff32a80c48a5
c57bbec6574a5618bc7547d9e4a24d072bca933e
refs/heads/master
2020-04-29T05:03:40.275482
2019-03-19T16:49:09
2019-03-19T16:49:09
175,868,798
1
0
null
null
null
null
UTF-8
Swift
false
false
1,030
swift
/** * Copyright IBM Corporation 2018 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **/ import Foundation /** ListCollectionsResponse. */ public struct ListCollectionsResponse: Codable, Equatable { /** An array containing information about each collection in the environment. */ public var collections: [Collection]? // Map each property name to the key that shall be used for encoding/decoding. private enum CodingKeys: String, CodingKey { case collections = "collections" } }
[ 309067 ]
8c489ebc52b697aa2b2646d09bff8f41a057f563
8cb424e5242b75fc4042843ecf06d5646665916b
/pixel-city/View/DroppablePin.swift
41cc949a9f5387150ac562bc1603b4ec7376a6c5
[]
no_license
rifqialfaizi/pixel-city
34102e784ba8d249cd954b8ce3776703e5797fe6
5931bf068550c2e7076f74c6f337626656de9832
refs/heads/master
2021-10-21T11:21:21.778344
2021-10-12T08:34:59
2021-10-12T08:34:59
166,500,735
0
0
null
null
null
null
UTF-8
Swift
false
false
466
swift
// // DroppablePin.swift // pixel-city // // Created by Rifqi Alfaizi on 25/12/18. // Copyright © 2018 Rifqi Alfaizi. All rights reserved. // import UIKit import MapKit class DroppablePin: NSObject, MKAnnotation { var coordinate: CLLocationCoordinate2D var identifier: String init(coordinate: CLLocationCoordinate2D, identifier: String) { self.coordinate = coordinate self.identifier = identifier super.init() } }
[ -1 ]
bd553dff2c5d767321c839c3cac2da2771b44d8e
2a27fce47bc1638f18eaabcdd9dfc000525b857c
/RxSwiftUIExample/ViewModel/RecentNewsViewModel.swift
4cfeb66cf4095709fce1e12cb741255eeb910d23
[]
no_license
fumiyasac/RxSwiftUIExample
f2106a6d403a136252fa6a04d4789206f04f0123
c3a8b06069814dd2696d814d6f0add246f7bb11f
refs/heads/master
2022-03-12T12:54:04.979444
2022-02-26T20:32:16
2022-02-26T20:32:16
159,034,298
16
2
null
null
null
null
UTF-8
Swift
false
false
2,225
swift
// // RecentNewsViewModel.swift // RxSwiftUIExample // // Created by 酒井文也 on 2018/12/07. // Copyright © 2018 酒井文也. All rights reserved. // import Foundation import SwiftyJSON import RxSwift import RxCocoa class RecentNewsViewModel { private let newYorkTimesAPI: NewYorkTimesAPI! private let disposeBag = DisposeBag() private var targetPage = 0 // ViewController側で利用するためのプロパティ let isLoading = BehaviorRelay<Bool>(value: false) let isError = BehaviorRelay<Bool>(value: false) let recentNewsLists = BehaviorRelay<[RecentNewsModel]>(value: []) // MARK: - Initializer init(api: NewYorkTimesAPI) { newYorkTimesAPI = api } // MARK: - Function func getRecentNews() { // リクエスト開始時の処理 executeStartRequestAction() // ニュース記事のデータを取得する処理を実行する newYorkTimesAPI.getRecentNewsList(page: targetPage).subscribe( // JSON取得が成功した場合の処理 onSuccess: { json in let targetNewsList = self.getRecentNewsModelListsBy(json: json) self.executeSuccessResponseAction(newList: targetNewsList) }, // JSON取得が失敗した場合の処理 onError: { error in self.executeErrorResponseAction() print("Error: ", error.localizedDescription) } ).disposed(by: disposeBag) } // MARK: - Private Function private func executeStartRequestAction() { isLoading.accept(true) isError.accept(false) } private func executeSuccessResponseAction(newList: [RecentNewsModel]) { recentNewsLists.accept(recentNewsLists.value + newList) targetPage += 1 isLoading.accept(false) } private func executeErrorResponseAction() { isError.accept(true) isLoading.accept(false) } // レスポンスで受け取ったJSONから表示に必要なものを詰め直す private func getRecentNewsModelListsBy(json: JSON) -> [RecentNewsModel] { return json.map{ RecentNewsModel(json: $0.1) } } }
[ -1 ]
69655b41508db3caa45b4504dca64afcaf07a6df
79cc5fb7ec87ec9c8182fbe0e507a555a138ddeb
/GigManager/MapViewController.swift
f6466351a623be318e4b48f0f09f9fbfc9805421
[]
no_license
SeanMurphy15/GigManager
195db3d43a77dc50e2b0ba1c545e6fb53b95b794
e1166f64fb32018a649c7ed5539ea23c03eb8101
refs/heads/master
2021-01-10T15:36:17.224087
2016-03-14T07:32:27
2016-03-14T07:32:27
53,272,886
0
0
null
null
null
null
UTF-8
Swift
false
false
837
swift
// // MapViewController.swift // GigManager // // Created by Sean Murphy on 3/4/16. // Copyright © 2016 Sean Murphy. All rights reserved. // import UIKit import GoogleMaps import MapKit class MapViewController: UIViewController, MKMapViewDelegate{ @IBOutlet weak var menuButton: UIBarButtonItem! @IBOutlet weak var mapView: MKMapView! override func viewDidLoad() { super.viewDidLoad() menuButton.target = self.revealViewController() menuButton.action = Selector("revealToggle:") } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func viewDidAppear(animated: Bool) { } @IBAction func addPlaceButtonPressed(sender: AnyObject) { } }
[ -1 ]
93662e55880e0ab67b41c2108c823b6448c60dc7
2f9d7bca34802eed5a861fc393e8e156fd92bf75
/Offline Capability/Views/ViewControllers/TasksViewController.swift
1007acdaa3dfca0153c523a50b2ec4a40476ab96
[]
no_license
simonangerbauer/bachelor-thesis-project-ios
66a3f367656ff85d7c438f4ea6aad17fe461e422
a0610f2214386fc5961f68127aee12c6828cd32e
refs/heads/master
2020-08-11T20:44:45.703231
2019-03-19T16:09:55
2019-03-19T16:09:55
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,544
swift
import UIKit import RxSwift import RxDataSources import Action import NSObject_Rx /** TasksViewController connects the viewModel to the Tasks View */ class TasksViewController: UIViewController, BindableType { /** TableView to display tasks in */ @IBOutlet var tableView: UITableView! /** Add Button to add new task */ @IBOutlet weak var addButton: UIBarButtonItem! /** The bound view model */ var viewModel: TasksViewModel! /** Called when the view did load. Sets the tableView delegate and datasource */ override func viewDidLoad() { super.viewDidLoad() tableView.dataSource = self; tableView.delegate = self; tableView.rowHeight = UITableViewAutomaticDimension tableView.estimatedRowHeight = 105 setEditing(true, animated: true) } /** Binds the Properties of the viewmodel to the ui controls and connects eventual actions */ func bindViewModel() { viewModel.taskService.tasksSubject .subscribe(onNext: { [weak self] changeset in DispatchQueue.main.async { self?.tableView?.reloadData() } }) .disposed(by: self.rx.disposeBag) addButton.rx.action = viewModel.onCreateTask() } } /** Extension for implementing the UITableViewDataSource methods */ extension TasksViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return viewModel.tasks.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let task = viewModel.tasks[indexPath.row] let cell = tableView.dequeueReusableCell(withIdentifier: "TaskCell") as! TaskTableViewCell cell.configure(with: task) return cell } } /** Extension for implementing the UITableViewDelegate methods */ extension TasksViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: false) viewModel.editAction.execute(viewModel.tasks[indexPath.row]) } func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if(editingStyle == .delete) { let task = viewModel.tasks[indexPath.row] viewModel.delete(task: task) } } }
[ -1 ]
1f01e95b12dfed79a892264a866317fe618552c1
731a4ea30eb7d1f4a1c53e3ac8a0af92af26233d
/Sources/SwiftTerm/iOS/iOSTerminalView.swift
5068e84aaa2e62e8c513fab4b1a52bc77e741bfb
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
LiteCode/SwiftTerm
8b5ef7212164c24f69bf3881cc7f7d19fe7fb573
1933a423c3a27262ea932df8a4a65c3806b1f846
refs/heads/master
2022-10-05T09:33:47.101009
2020-06-05T18:38:12
2020-06-05T18:38:12
260,754,019
0
0
MIT
2020-06-05T18:38:14
2020-05-02T18:51:48
Swift
UTF-8
Swift
false
false
31,623
swift
// // iOSTerminalView.swift // // This is the AppKit version of the TerminalView and holds the state // variables in the `TerminalView` class, but as much of the terminal // implementation details live in the Apple/AppleTerminalView which // contains the shared AppKit/UIKit code // // The indicator "//X" means that this code was commented out from the Mac version for the sake of // porting and need to be audited. // Created by Miguel de Icaza on 3/4/20. // #if os(iOS) import Foundation import UIKit import CoreText import CoreGraphics /** * TerminalView provides an UIKit front-end to the `Terminal` termininal emulator. * It is up to a subclass to either wire the terminal emulator to a remote terminal * via some socket, to an application that wants to run with terminal emulation, or * wiring this up to a pseudo-terminal. * * Users are notified of interesting events in their implementation of the `TerminalViewDelegate` * methods - an instance must be provided to the constructor of `TerminalView`. * * Call the `getTerminal` method to get a reference to the underlying `Terminal` that backs this * view. * * Use the `configureNativeColors()` to set the defaults colors for the view to match the OS * defaults, otherwise, this uses its own set of defaults colors. */ open class TerminalView: UIScrollView, UITextInputTraits, UIKeyInput, UIScrollViewDelegate { struct FontSet { public let normal: UIFont let bold: UIFont let italic: UIFont let boldItalic: UIFont static var defaultFont: UIFont { UIFont.monospacedSystemFont (ofSize: 12, weight: .regular) } public init(font baseFont: UIFont) { self.normal = baseFont self.bold = UIFont (descriptor: baseFont.fontDescriptor.withSymbolicTraits ([.traitBold])!, size: 0) self.italic = UIFont (descriptor: baseFont.fontDescriptor.withSymbolicTraits ([.traitItalic])!, size: 0) self.boldItalic = UIFont (descriptor: baseFont.fontDescriptor.withSymbolicTraits ([.traitItalic, .traitBold])!, size: 0) } // Expected by the shared rendering code func underlinePosition () -> CGFloat { return -1.2 } // Expected by the shared rendering code func underlineThickness () -> CGFloat { return 0.63 } } /** * The delegate that the TerminalView uses to interact with its hosting */ public weak var terminalDelegate: TerminalViewDelegate? var accessibility: AccessibilityService = AccessibilityService() var search: SearchService! var debug: UIView? var pendingDisplay: Bool = false var cellDimension: CellDimension! var caretView: CaretView! var terminal: Terminal! var allowMouseReporting = true var selection: SelectionService! var attrStrBuffer: CircularList<NSAttributedString>! // Attribute dictionary, maps a console attribute (color, flags) to the corresponding dictionary // of attributes for an NSAttributedString var attributes: [Attribute: [NSAttributedString.Key:Any]] = [:] var urlAttributes: [Attribute: [NSAttributedString.Key:Any]] = [:] // Cache for the colors in the 0..255 range var colors: [UIColor?] = Array(repeating: nil, count: 256) var trueColors: [Attribute.Color:UIColor] = [:] var transparent = TTColor.transparent () var fontSet: FontSet /// The font to use to render the terminal public var font: UIFont { get { return fontSet.normal } set { fontSet = FontSet (font: newValue) resetFont(); } } public init(frame: CGRect, font: UIFont?) { self.fontSet = FontSet (font: font ?? FontSet.defaultFont) super.init (frame: frame) setup() } public override init (frame: CGRect) { self.fontSet = FontSet (font: FontSet.defaultFont) super.init (frame: frame) setup() } public required init? (coder: NSCoder) { self.fontSet = FontSet (font: FontSet.defaultFont) super.init (coder: coder) setup() } func setup() { setupOptions () setupGestures () setupAccessoryView () } @objc func pasteCmd(_ sender: Any?) { if let s = UIPasteboard.general.string { send(txt: s) queuePendingDisplay() } } @objc func resetCmd(_ sender: Any?) { terminal.cmdReset() queuePendingDisplay() } @objc func longPress (_ gestureRecognizer: UILongPressGestureRecognizer) { if gestureRecognizer.state == .began { self.becomeFirstResponder() //self.viewForReset = gestureRecognizer.view var items: [UIMenuItem] = [] if UIPasteboard.general.hasStrings { items.append(UIMenuItem(title: "Paste", action: #selector(pasteCmd))) } items.append (UIMenuItem(title: "Reset", action: #selector(resetCmd))) // Configure the shared menu controller let menuController = UIMenuController.shared menuController.menuItems = items // TODO: // - If nothing is selected, offer Select, Select All // - If something is selected, offer copy, look up, share, "Search on StackOverflow" // Set the location of the menu in the view. let location = gestureRecognizer.location(in: gestureRecognizer.view) let menuLocation = CGRect(x: location.x, y: location.y, width: 0, height: 0) //menuController.setTargetRect(menuLocation, in: gestureRecognizer.view!) menuController.showMenu(from: gestureRecognizer.view!, rect: menuLocation) } } func calculateTapHit (gesture: UIGestureRecognizer) -> Position { let point = gesture.location(in: self) let col = Int (point.x / cellDimension.width) let row = Int (point.y / cellDimension.height) if row < 0 { return Position(col: 0, row: 0) } return Position(col: min (max (0, col), terminal.cols-1), row: min (row, terminal.rows-1)) } func encodeFlags (release: Bool) -> Int { let encodedFlags = terminal.encodeButton( button: 1, release: release, shift: false, meta: false, control: terminalAccessory?.controlModifier ?? false) terminalAccessory?.controlModifier = false return encodedFlags } func sharedMouseEvent (gestureRecognizer: UIGestureRecognizer, release: Bool) { let hit = calculateTapHit(gesture: gestureRecognizer) terminal.sendEvent(buttonFlags: encodeFlags (release: release), x: hit.col, y: hit.row) } @objc func singleTap (_ gestureRecognizer: UITapGestureRecognizer) { guard gestureRecognizer.view != nil else { return } if gestureRecognizer.state != .ended { return } if allowMouseReporting && terminal.mouseMode.sendButtonPress() { sharedMouseEvent(gestureRecognizer: gestureRecognizer, release: false) if terminal.mouseMode.sendButtonRelease() { sharedMouseEvent(gestureRecognizer: gestureRecognizer, release: true) } return } } @objc func doubleTap (_ gestureRecognizer: UITapGestureRecognizer) { guard gestureRecognizer.view != nil else { return } if gestureRecognizer.state != .ended { return } if allowMouseReporting && terminal.mouseMode.sendButtonPress() { sharedMouseEvent(gestureRecognizer: gestureRecognizer, release: false) if terminal.mouseMode.sendButtonRelease() { sharedMouseEvent(gestureRecognizer: gestureRecognizer, release: true) } return } else { // endEditing(true) } } @objc func pan (_ gestureRecognizer: UIPanGestureRecognizer) { guard gestureRecognizer.view != nil else { return } if allowMouseReporting { switch gestureRecognizer.state { case .began: // send the initial tap if terminal.mouseMode.sendButtonPress() { sharedMouseEvent(gestureRecognizer: gestureRecognizer, release: false) } case .ended, .cancelled: if terminal.mouseMode.sendButtonRelease() { sharedMouseEvent(gestureRecognizer: gestureRecognizer, release: true) } case .changed: if terminal.mouseMode.sendButtonTracking() { let hit = calculateTapHit(gesture: gestureRecognizer) terminal.sendMotion(buttonFlags: encodeFlags(release: false), x: hit.col, y: hit.row) } default: break } } } func setupGestures () { let longPress = UILongPressGestureRecognizer (target: self, action: #selector(longPress(_:))) longPress.minimumPressDuration = 0.7 addGestureRecognizer(longPress) let singleTap = UITapGestureRecognizer (target: self, action: #selector(singleTap(_:))) addGestureRecognizer(singleTap) let doubleTap = UITapGestureRecognizer (target: self, action: #selector(doubleTap(_:))) doubleTap.numberOfTapsRequired = 2 addGestureRecognizer(doubleTap) let pan = UIPanGestureRecognizer (target: self, action: #selector(pan(_:))) addGestureRecognizer(pan) } var _inputAccessory: UIView? /// /// You can set this property to a UIView to be your input accessory, by default /// this is an instance of `TerminalAccessory` /// public override var inputAccessoryView: UIView? { get { _inputAccessory } set { _inputAccessory = newValue } } /// Returns the inputaccessory in case it is a TerminalAccessory and we can use it var terminalAccessory: TerminalAccessory? { get { _inputAccessory as? TerminalAccessory } } func setupAccessoryView () { let ta = TerminalAccessory(frame: CGRect(x: 0, y: 0, width: frame.width, height: 36), inputViewStyle: .keyboard) ta.terminalView = self inputAccessoryView = ta } func setupOptions () { setupOptions(width: bounds.width, height: bounds.height) layer.backgroundColor = nativeBackgroundColor.cgColor nativeBackgroundColor = UIColor.clear } var _nativeFg, _nativeBg: TTColor! var settingFg = false, settingBg = false /** * This will set the native foreground color to the specified native color (UIColor or NSColor) * and will have this reflected into the underlying's terminal `foregroundColor` and * `backgroundColor` */ public var nativeForegroundColor: UIColor { get { _nativeFg } set { if settingFg { return } settingFg = true _nativeFg = newValue terminal.foregroundColor = nativeForegroundColor.getTerminalColor () settingFg = false } } /** * This will set the native foreground color to the specified native color (UIColor or NSColor) * and will have this reflected into the underlying's terminal `foregroundColor` and * `backgroundColor` */ public var nativeBackgroundColor: UIColor { get { _nativeBg } set { if settingBg { return } settingBg = true _nativeBg = newValue terminal.backgroundColor = nativeBackgroundColor.getTerminalColor () settingBg = false } } var lineAscent: CGFloat = 0 var lineDescent: CGFloat = 0 var lineLeading: CGFloat = 0 open func bufferActivated(source: Terminal) { updateScroller () } open func send(source: Terminal, data: ArraySlice<UInt8>) { terminalDelegate?.send (source: self, data: data) } /** * Given the current set of columns and rows returns a frame that would host this control. */ open func getOptimalFrameSize () -> CGRect { return CGRect (x: 0, y: 0, width: cellDimension.width * CGFloat(terminal.cols), height: cellDimension.height * CGFloat(terminal.rows)) } func getEffectiveWidth (rect: CGRect) -> CGFloat { return rect.width } func updateDebugDisplay () { } open func scrolled(source terminal: Terminal, yDisp: Int) { //XselectionView.notifyScrolled(source: terminal) updateScroller() terminalDelegate?.scrolled(source: self, position: scrollPosition) } open func linefeed(source: Terminal) { selection.selectNone() } func updateScroller () { contentSize = CGSize (width: CGFloat (terminal.buffer.cols) * cellDimension.width, height: CGFloat (terminal.buffer.lines.count) * cellDimension.height) // contentOffset = CGPoint (x: 0, y: CGFloat (terminal.buffer.lines.count-terminal.rows)*cellDimension.height) //Xscroller.doubleValue = scrollPosition //Xscroller.knobProportion = scrollThumbsize } var userScrolling = false func getCurrentGraphicsContext () -> CGContext? { UIGraphicsGetCurrentContext () } func backingScaleFactor () -> CGFloat { UIScreen.main.scale } override public func draw (_ dirtyRect: CGRect) { guard let context = getCurrentGraphicsContext() else { return } // Without these two lines, on font changes, some junk is being displayed nativeBackgroundColor.set () context.clear(dirtyRect) // drawTerminalContents and CoreText expect the AppKit coordinate system context.scaleBy (x: 1, y: -1) context.translateBy(x: 0, y: -frame.height) drawTerminalContents (dirtyRect: dirtyRect, context: context) } public override var frame: CGRect { get { return super.frame } set(newValue) { super.frame = newValue if cellDimension == nil { return } let newRows = Int (newValue.height / cellDimension.height) let newCols = Int (getEffectiveWidth (rect: newValue) / cellDimension.width) if newCols != terminal.cols || newRows != terminal.rows { terminal.resize (cols: newCols, rows: newRows) fullBufferUpdate (terminal: terminal) } accessibility.invalidate () search.invalidate () terminalDelegate?.sizeChanged (source: self, newCols: newCols, newRows: newRows) setNeedsDisplay (frame) } } // iOS Keyboard input // UITextInputTraits public var keyboardType: UIKeyboardType { get { .`default` } } public var keyboardAppearance: UIKeyboardAppearance = .`default` public var returnKeyType: UIReturnKeyType = .`default` // This is wrong, but I can not find another good one public var textContentType: UITextContentType! = .familyName public var isSecureTextEntry: Bool = false public var enablesReturnKeyAutomatically: Bool = false public var autocapitalizationType: UITextAutocapitalizationType = .none public var autocorrectionType: UITextAutocorrectionType = .no public var spellCheckingType: UITextSpellCheckingType = .no public var smartQuotesType: UITextSmartQuotesType = .no public var smartDashesType: UITextSmartDashesType = .no public var smartInsertDeleteType: UITextSmartInsertDeleteType = .no public override var canBecomeFirstResponder: Bool { true } public var hasText: Bool { return true } open func insertText(_ text: String) { if terminalAccessory?.controlModifier ?? false { self.send (applyControlToEventCharacters (text)) terminalAccessory?.controlModifier = false } else { self.send (txt: text) } queuePendingDisplay() } open func deleteBackward() { self.send ([0x7f]) } enum SendData { case text(String) case bytes([UInt8]) } var sentData: SendData? func sendData (data: SendData?) { switch sentData { case .bytes(let b): self.send (b) case .text(let txt): self.send (txt: txt) default: break } } public override func resignFirstResponder() -> Bool { let code = super.resignFirstResponder() if code { keyRepeat?.invalidate() keyRepeat = nil terminalAccessory?.cancelTimer() } return code } var keyRepeat: Timer? public override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) { guard let key = presses.first?.key else { return } sentData = nil switch key.keyCode { case .keyboardCapsLock: break // ignored case .keyboardLeftAlt: break // ignored case .keyboardLeftControl: break // ignored case .keyboardLeftShift: break // ignored case .keyboardLockingCapsLock: break // ignored case .keyboardLockingNumLock: break // ignored case .keyboardLockingScrollLock: break // ignored case .keyboardRightAlt: break // ignored case .keyboardRightControl: break // ignored case .keyboardRightShift: break // ignored case .keyboardScrollLock: break // ignored case .keyboardUpArrow: sentData = .bytes (terminal.applicationCursor ? EscapeSequences.MoveUpApp : EscapeSequences.MoveUpNormal) case .keyboardDownArrow: sentData = .bytes (terminal.applicationCursor ? EscapeSequences.MoveDownApp : EscapeSequences.MoveDownNormal) case .keyboardLeftArrow: sentData = .bytes (terminal.applicationCursor ? EscapeSequences.MoveLeftApp : EscapeSequences.MoveLeftNormal) case .keyboardRightArrow: sentData = .bytes (terminal.applicationCursor ? EscapeSequences.MoveRightApp : EscapeSequences.MoveRightNormal) case .keyboardPageUp: if terminal.applicationCursor { sentData = .bytes (EscapeSequences.CmdPageUp) } else { pageUp() } case .keyboardPageDown: if terminal.applicationCursor { sentData = .bytes (EscapeSequences.CmdPageDown) } else { pageDown() } case .keyboardHome: sentData = .bytes (terminal.applicationCursor ? EscapeSequences.MoveHomeApp : EscapeSequences.MoveHomeNormal) case .keyboardEnd: sentData = .bytes (terminal.applicationCursor ? EscapeSequences.MoveEndApp : EscapeSequences.MoveEndNormal) case .keyboardDeleteForward: sentData = .bytes (EscapeSequences.CmdDelKey) case .keyboardDeleteOrBackspace: sentData = .bytes ([0x7f]) case .keyboardEscape: sentData = .bytes ([0x1b]) case .keyboardInsert: print (".keyboardInsert ignored") break case .keyboardReturn: sentData = .bytes ([10]) case .keyboardTab: sentData = .bytes ([9]) case .keyboardF1: sentData = .bytes (EscapeSequences.CmdF [1]) case .keyboardF2: sentData = .bytes (EscapeSequences.CmdF [2]) case .keyboardF3: sentData = .bytes (EscapeSequences.CmdF [3]) case .keyboardF4: sentData = .bytes (EscapeSequences.CmdF [4]) case .keyboardF5: sentData = .bytes (EscapeSequences.CmdF [5]) case .keyboardF6: sentData = .bytes (EscapeSequences.CmdF [6]) case .keyboardF7: sentData = .bytes (EscapeSequences.CmdF [7]) case .keyboardF8: sentData = .bytes (EscapeSequences.CmdF [8]) case .keyboardF9: sentData = .bytes (EscapeSequences.CmdF [9]) case .keyboardF10: sentData = .bytes (EscapeSequences.CmdF [10]) case .keyboardF11: sentData = .bytes (EscapeSequences.CmdF [11]) case .keyboardF12, .keyboardF13, .keyboardF14, .keyboardF15, .keyboardF16, .keyboardF17, .keyboardF18, .keyboardF19, .keyboardF20, .keyboardF21, .keyboardF22, .keyboardF23, .keyboardF24: break case .keyboardPause, .keyboardStop, .keyboardMute, .keyboardVolumeUp, .keyboardVolumeDown: break default: if key.modifierFlags.contains (.alternate) { sentData = .text("\u{1b}\(key.charactersIgnoringModifiers)") } else { sentData = .text (key.characters) } } //Timer.scheduledTimer(timeInterval: <#T##TimeInterval#>, invocation: <#T##NSInvocation#>, repeats: <#T##Bool#>) sendData (data: sentData) } public override func pressesChanged(_ presses: Set<UIPress>, with event: UIPressesEvent?) { print ("Here\n") } public override func pressesEnded(_ presses: Set<UIPress>, with event: UIPressesEvent?) { // guard let key = presses.first?.key else { return } } /// Confromance to UITextInput // func pabort (_ msg: String) // { // print (msg) // abort () // } // // public func text(in range: UITextRange) -> String? { // pabort ("PROTO: text(in)") // return "test" // } // // public func replace(_ range: UITextRange, withText text: String) { // pabort ("PROTO: replace") // } // // public var selectedTextRange: UITextRange? { // get { // print ("PROTO: TODO selectedTextRange") // return nil // } // set { // pabort ("PROTO: setting selectedtextrange") // } // } // // public var markedTextRange: UITextRange? { // get { // print ("Request for marked-text-range") // return nil // } // } // // public var markedTextStyle: [NSAttributedString.Key : Any]? { // get { // pabort ("PROTO: markedTextStyle") // return nil // } // set { // pabort ("PROTO: set markedTextStyle") // } // } // // public func setMarkedText(_ markedText: String?, selectedRange: NSRange) { // pabort ("PROTO: etMarkedText") // } // // public func unmarkText() { // pabort ("PROTO: unmarktext") // } // // // The text position is relative to the start of the buffer (buffer.yBase) // class TerminalTextPosition: UITextPosition { // var pos: Position // init (_ pos: Position) // { // self.pos = pos // } // } // public var beginningOfDocument: UITextPosition { // get { // return TerminalTextPosition(Position (col: 0, row: 0)) // } // } // // public var endOfDocument: UITextPosition { // get { // return TerminalTextPosition(Position (col: terminal.buffer.cols, row: //terminal.buffer.lines.count)) // } // } // // public func textRange(from fromPosition: UITextPosition, to toPosition: //UITextPosition) -> UITextRange? { // pabort ("PROTO: textRange") // return nil // } // // public func position(from position: UITextPosition, offset: Int) -> UITextPosition? { // pabort ("PROTO: position") // return nil // } // // public func position(from position: UITextPosition, in direction: //UITextLayoutDirection, offset: Int) -> UITextPosition? { // pabort ("PROTO: position2") // return nil // } // // public func compare(_ position: UITextPosition, to other: UITextPosition) -> //ComparisonResult { // if let a = position as? TerminalTextPosition { // if let b = other as? TerminalTextPosition { // switch Position.compare(a.pos, b.pos){ // case .before: // return .orderedAscending // case .after: // return .orderedDescending // case .equal: // return .orderedSame // } // } // } // return .orderedSame // } // // public func offset(from: UITextPosition, to toPosition: UITextPosition) -> Int { // pabort ("PROTO: offset") // return 0 // } // // public weak var inputDelegate: UITextInputDelegate? // // class MyInputTokenizer: NSObject, UITextInputTokenizer { // func pabort (_ msg: String) // { // print (msg) // abort() // } // func rangeEnclosingPosition(_ position: UITextPosition, with granularity: //UITextGranularity, inDirection direction: UITextDirection) -> UITextRange? { // pabort ("PROTO: MIT/Range") // // return nil // } // // func isPosition(_ position: UITextPosition, atBoundary granularity: //UITextGranularity, inDirection direction: UITextDirection) -> Bool { // pabort ("PROTO: MIT/offset") // return false // } // // func position(from position: UITextPosition, toBoundary granularity: //UITextGranularity, inDirection direction: UITextDirection) -> UITextPosition? //{ // pabort ("PROTO: MIT/position1") // return nil // } // // func isPosition(_ position: UITextPosition, withinTextUnit granularity: //UITextGranularity, inDirection direction: UITextDirection) -> Bool { // pabort ("PROTO: MIT/position") // return false // } // // // } // public var tokenizer: UITextInputTokenizer = MyInputTokenizer() // // public func position(within range: UITextRange, farthestIn direction: //UITextLayoutDirection) -> UITextPosition? { // pabort ("PROTO: position3") // return nil // } // // public func characterRange(byExtending position: UITextPosition, in direction: //UITextLayoutDirection) -> UITextRange? { // pabort ("PROTO: characterRnage") // return nil // } // // public func baseWritingDirection(for position: UITextPosition, in direction: //UITextStorageDirection) -> NSWritingDirection { // pabort ("PROTO: baseWritingDirection") // return .leftToRight // } // // public func setBaseWritingDirection(_ writingDirection: NSWritingDirection, for //range: UITextRange) { // pabort ("PROTO: setBaseWritingDirection") // // } // // public func firstRect(for range: UITextRange) -> CGRect { // pabort ("PROTO: firstRect") // return CGRect.zero // } // // public func caretRect(for position: UITextPosition) -> CGRect { // pabort ("PROTO: caretRect") // return CGRect.zero // } // // public func selectionRects(for range: UITextRange) -> [UITextSelectionRect] { // pabort ("PROTO: selectionRects") // return [] // } // // public func closestPosition(to point: CGPoint) -> UITextPosition? { // pabort ("PROTO: closestPosition") // return nil // } // // public func closestPosition(to point: CGPoint, within range: UITextRange) -> //UITextPosition? { // pabort ("PROTO: closestPosition") // return nil // } // // public func characterRange(at point: CGPoint) -> UITextRange? { // pabort ("PROTO: characterRange") // return nil // } // } extension TerminalView: TerminalDelegate { open func isProcessTrusted(source: Terminal) -> Bool { true } open func mouseModeChanged(source: Terminal) { // iOS TODO //X } open func setTerminalTitle(source: Terminal, title: String) { terminalDelegate?.setTerminalTitle(source: self, title: title) } open func sizeChanged(source: Terminal) { terminalDelegate?.sizeChanged(source: self, newCols: source.cols, newRows: source.rows) updateScroller() } open func setTerminalIconTitle(source: Terminal, title: String) { // } // Terminal.Delegate method implementation open func windowCommand(source: Terminal, command: Terminal.WindowManipulationCommand) -> [UInt8]? { return nil } } // Default implementations for TerminalViewDelegate extension TerminalViewDelegate { public func requestOpenLink (source: TerminalView, link: String, params: [String:String]) { if let fixedup = link.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) { if let url = NSURLComponents(string: fixedup) { if let nested = url.url { UIApplication.shared.open (nested) } } } } public func bell (source: TerminalView) { let generator = UINotificationFeedbackGenerator() generator.notificationOccurred(.warning) } } extension UIColor { func getTerminalColor () -> Color { var red: CGFloat = 0.0, green: CGFloat = 0.0, blue: CGFloat = 0.0, alpha: CGFloat = 1.0 self.getRed(&red, green: &green, blue: &blue, alpha: &alpha) return Color(red: UInt16 (red*65535), green: UInt16(green*65535), blue: UInt16(blue*65535)) } func inverseColor() -> UIColor { var red: CGFloat = 0.0, green: CGFloat = 0.0, blue: CGFloat = 0.0, alpha: CGFloat = 1.0 self.getRed(&red, green: &green, blue: &blue, alpha: &alpha) return UIColor (red: 1.0 - red, green: 1.0 - green, blue: 1.0 - blue, alpha: alpha) } // TODO: Come up with something better static var selectedTextBackgroundColor: UIColor { get { UIColor.green } } static func make (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) -> TTColor { return UIColor(red: red, green: green, blue: blue, alpha: 1.0) } static func make (hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat) -> TTColor { return UIColor(hue: hue, saturation: saturation, brightness: brightness, alpha: alpha) } static func make (color: Color) -> UIColor { UIColor (red: CGFloat (color.red) / 65535.0, green: CGFloat (color.green) / 65535.0, blue: CGFloat (color.blue) / 65535.0, alpha: 1.0) } static func transparent () -> UIColor { return UIColor.clear } } #endif
[ -1 ]
4df819d8ebc97d4182ec416e60d435ed3911ad9f
8c200ea35a4b61bb535ed30b02a1a126f42baef1
/Magic-8-Ball/AppDelegate.swift
818f18957184469c782e7a3c08200c1f6d1c9b60
[]
no_license
orellanamilton/Magic-8-Ball
6e71b7edfec4b009535749057d15fdef5b2fdb3f
cf492e876f6cb4172ec10f7c93eb575066a46f81
refs/heads/main
2023-04-12T21:42:55.835247
2021-04-20T12:18:05
2021-04-20T12:18:05
359,631,599
0
0
null
null
null
null
UTF-8
Swift
false
false
1,357
swift
// // AppDelegate.swift // Magic-8-Ball // // Created by Milton Orellana on 19/04/2021. // 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, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 180416, 377036, 180431, 377046, 418007, 418010, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 385280, 262404, 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, 197159, 377383, 352821, 418363, 188987, 369223, 385609, 385616, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 328378, 328386, 352968, 344776, 418507, 352971, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 361288, 336711, 328522, 336714, 426841, 254812, 361309, 197468, 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, 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, 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, 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, 419542, 394966, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 337668, 362247, 395021, 362255, 395029, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 354150, 354156, 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, 329867, 329885, 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, 248111, 362822, 436555, 190796, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 191092, 346742, 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, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 347176, 158761, 199728, 330800, 396336, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 412764, 339036, 257120, 265320, 248951, 420984, 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, 175486, 249214, 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, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 421508, 224904, 11918, 159374, 224913, 126610, 339601, 224916, 224919, 126616, 224922, 208538, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 257801, 339721, 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, 257871, 225103, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 225127, 274280, 257896, 257901, 225137, 257908, 225141, 257912, 257916, 225148, 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, 192673, 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, 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, 324111, 340500, 381481, 356907, 324142, 356916, 324149, 324155, 348733, 324164, 356934, 348743, 381512, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 373398, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389892, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 430939, 357211, 357214, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 340858, 324475, 430972, 340861, 324478, 119674, 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, 357410, 250914, 185380, 357418, 209965, 209968, 209975, 209979, 209987, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 349308, 210044, 349311, 160895, 152703, 210052, 349319, 210055, 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, 136590, 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, 210719, 358191, 366387, 210739, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 341851, 350045, 399199, 259938, 399206, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 350202, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 374902, 432271, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 325919, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 416157, 342430, 268701, 375208, 375216, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 260801, 350917, 391894, 154328, 416473, 64230, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 162591, 326441, 383793, 326451, 326454, 326460, 375612, 260924, 244540, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 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, 384107, 367723, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 384181, 367800, 384191, 351423, 384198, 326855, 244937, 253130, 343244, 146642, 359649, 343270, 351466, 351479, 384249, 343306, 261389, 359694, 384269, 253200, 261393, 384275, 245020, 245029, 171302, 351534, 376110, 384314, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 253303, 154999, 343417, 327034, 384397, 245136, 245142, 245145, 343450, 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, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 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, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 262005, 147317, 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, 155619, 253923, 155621, 253926, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
91443b83f14452854290db892093800fcaf4d514
85ea87e6d547fecdc32a5ae9e5d24f448c9335f0
/electrawalletTests/MockClasses/MockClasses.swift
21c49f108fd5941c21d8b6cd5c75c3a4ae2b5474
[ "MIT" ]
permissive
Jenova7/Electra-ios
6e0894832e6272bae63aa1424f0460ca1a58deec
404ee0876332d4df9630629be2837fff74e3d1c8
refs/heads/master
2020-05-20T05:30:21.779106
2020-02-21T16:18:26
2020-02-21T16:18:26
185,406,124
1
1
MIT
2020-03-06T17:09:48
2019-05-07T13:18:54
C
UTF-8
Swift
false
false
1,850
swift
// // MockClasses.swift // breadwalletTests // // Created by rrrrray-BRD-mac on 2019-01-21. // Copyright © 2019 breadwallet LLC. All rights reserved. // import Foundation import UIKit @testable import breadwallet @testable import BRCore class MockTransaction: Transaction { var currency: Currency var hash: String var blockHeight: UInt64 var confirmations: UInt64 var status: TransactionStatus var direction: TransactionDirection var timestamp: TimeInterval var toAddress: String var amount: UInt256 var mockIsValid: Bool var isValid: Bool { return mockIsValid } convenience init(timestamp: TimeInterval, direction: TransactionDirection, status: TransactionStatus) { self.init(valid: true) self.timestamp = timestamp self.direction = direction self.status = status } init(valid: Bool) { currency = MockCurrency() mockIsValid = valid hash = UUID.init().uuidString blockHeight = 100 confirmations = 2 status = .pending direction = .sent timestamp = Date().timeIntervalSince1970 toAddress = UUID.init().uuidString amount = 0 } } class MockCurrency: Currency { var name: String = "" var symbol: String = "" var code: String = "" var commonUnit: CurrencyUnit = MockCurrencyUnit() var colors: (UIColor, UIColor) = (UIColor(), UIColor()) func isValidAddress(_ address: String) -> Bool { return true } var isSupported: Bool = false init() { } } class MockCurrencyUnit: CurrencyUnit { var decimals: Int = 0 var name: String = "" init() { } } class MockTrackable: Trackable { }
[ -1 ]
85951239ec89fda5c5b0aa59f56be65dee7a8d71
26873e0a1b28351c13fb8268f416a52e9b533892
/Memory Game/Utils/Record.swift
3aea55978894a304f4ac7abae43df1c8d6c7f04f
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
paz-lavi/MemoryGame
3f1d6f9ba1cbb79d1ae2ada1d96e14f1c42e236e
cbe092d9851cd83645fdfb621ebf38e35ceb6da8
refs/heads/main
2023-05-05T02:23:32.035127
2021-05-20T22:43:18
2021-05-20T22:43:18
369,341,129
0
2
null
2021-05-20T22:42:49
2021-05-20T21:22:12
Swift
UTF-8
Swift
false
false
809
swift
// // Record.swift // Memory Game // // Created by Paz Lavi on 30/04/2021. // import Foundation class Record: Codable, Comparable{ var gameDuration: Int = 0 var playerName:String = "" var playerLocation:LatLng? var gameDate:Date? = nil init() { } init (gameDuration:Int, playerName:String, playerLocation:LatLng?){ self.gameDuration = gameDuration self.playerName = playerName self.playerLocation = playerLocation ?? nil self.gameDate = Date() } static func == (lhs: Record, rhs: Record) -> Bool { return lhs.gameDuration == rhs.gameDuration } static func < (lhs: Record, rhs: Record) -> Bool { return (lhs.gameDuration - rhs.gameDuration) > 0 } }
[ -1 ]
7700f3fdd33bef74872b2b5a4835c1bba3994f7d
591c56edddf6ccf0fc9675a07084c7b2800f14ea
/UpToFind/LoginViewController.swift
3892e428fd4bec13f4966b358fd7d97f2db9fac3
[]
no_license
Feriany/UpToFind
92bf9f3969b21271b1bfcbf9c9739b21247f3262
8609d058055cc2e69916d30a6534bfd8276edc7d
refs/heads/master
2020-09-26T03:39:51.821748
2019-12-06T14:26:21
2019-12-06T14:26:21
225,913,168
0
0
null
null
null
null
UTF-8
Swift
false
false
4,692
swift
// // ViewController.swift // UpToFind // // Created by Mohamed RHIMI on 12/1/19. // Copyright © 2019 Mohamed RHIMI. All rights reserved. // import UIKit import FirebaseAuth class LoginViewController: UIViewController { let topImageView = UIImageView() @IBOutlet weak var usernamtext: UITextField! @IBOutlet weak var passwordtext: UITextField! @IBOutlet weak var checked: UIButton! @IBOutlet weak var createAccountBut: UIButton! @IBOutlet weak var forgetPwButt: UIButton! var iconClick = true override func viewDidLoad() { super.viewDidLoad() setUpButton() setUpCheckBox() setUpTextField() setTopImage() usernamtext.becomeFirstResponder() } @IBAction func ischecked(_ sender: Any) { checked.backgroundColor = .clear if iconClick == true { checked.setTitle("✓",for: .normal) checked.tintColor = .black }else{ checked.setTitle("",for: .normal) } iconClick = !iconClick } @IBAction func showPasswords(_ sender: Any) { /* print("show password taped") if(iconClick == true) { passwordtext.secureTextEntry = false } else { passwordtext.secureTextEntry = true } iconClick = !iconClick*/ } func setUpButton(){ Utilities.styleButton(createAccountBut) Utilities.styleButton(forgetPwButt) } func setUpCheckBox() { checked.layer.borderWidth = 1 checked.layer.borderColor = UIColor.black.cgColor } func setUpTextField() { let icon_mail = UIImage(named: "maillogin") Utilities.styleTextField(usernamtext, andImage: icon_mail!) let icon_pw = UIImage(named: "motdepass") let but_pw = UIImage(named: "showpass") Utilities.styleTextFields(passwordtext, andImage: icon_pw!, andrightbut: but_pw!) } @IBAction func createAccountButton(_ sender: Any) { let signupViewController = self.storyboard?.instantiateViewController(identifier: Constants.Storyboard.signupViewController) as? SignUpViewController self.view.window?.rootViewController = signupViewController self.view.window?.makeKeyAndVisible() } @IBAction func loginBut(_ sender: Any) { let email = usernamtext.text!.trimmingCharacters(in: .whitespacesAndNewlines) let password = passwordtext.text!.trimmingCharacters(in: .whitespacesAndNewlines) Auth.auth().signIn(withEmail: email, password: password) { (result, error) in if error != nil { let alert = UIAlertController(title: "Oops!", message: "\(error!.localizedDescription)", preferredStyle: .alert) let action = UIAlertAction(title: "Dismiss", style: .default, handler: nil) alert.addAction(action) self.present(alert, animated: true, completion: nil) } else { let homeViewController = self.storyboard?.instantiateViewController(identifier: Constants.Storyboard.homeViewController) as? ViewController self.view.window?.rootViewController = homeViewController self.view.window?.makeKeyAndVisible() } } } func setTopImage() { view.addSubview(topImageView) topImageView.translatesAutoresizingMaskIntoConstraints = false topImageView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true topImageView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = false topImageView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true topImageView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true topImageView.heightAnchor.constraint(equalToConstant: 170).isActive = true topImageView.image = UIImage(named: "tsc") view.sendSubviewToBack(topImageView) } } extension UIViewController { func dismissKey() { let tap: UITapGestureRecognizer = UITapGestureRecognizer( target: self, action: #selector(UIViewController.dismissKeyboard)) tap.cancelsTouchesInView = true view.addGestureRecognizer(tap) } @objc func dismissKeyboard(){ view.endEditing(true) } }
[ -1 ]
da58c6bdfcdfca0dbaeb61e7369b4d552046b27d
aedb72690edda161af0be42603abdc8340a9941c
/Draftboard/Draftboard/Lineup/LineupSearchCellView.swift
35a8b1320c23139b450d2419328d27d879e3b80f
[]
no_license
nakamotohideyoshi/Draftboard-App
86c18b408756c2fc40f70725c1ce9b8af954f4b5
042cadc12b8cc7a99f0a5c0f4f86f21404a34296
refs/heads/master
2020-09-21T14:07:05.936814
2016-11-04T22:45:56
2016-11-04T22:45:56
224,808,665
0
0
null
null
null
null
UTF-8
Swift
false
false
2,611
swift
// // LineupCell.swift // Draftboard // // Created by Wes Pearce on 9/14/15. // Copyright © 2015 Rally Interactive. All rights reserved. // import UIKit /* class LineupSearchCellView: UITableViewCell { @IBOutlet weak var topBorderView: UIView! @IBOutlet weak var bottomBorderView: UIView! @IBOutlet weak var positionLabel: DraftboardLabel! @IBOutlet weak var avatarImageView: AvatarImageView! @IBOutlet weak var nameLabel: DraftboardLabel! @IBOutlet weak var salaryLabel: DraftboardLabel! @IBOutlet weak var leagueLabel: DraftboardLabel! @IBOutlet weak var statusLabel: DraftboardLabel! @IBOutlet weak var ppgLabel: UILabel! @IBOutlet weak var infoButton: DraftboardButton! @IBOutlet weak var bigInfoButton: UIButton! // @IBOutlet weak var infoButtonImage: UIImageView! @IBOutlet weak var topBorderHeightConstraint: NSLayoutConstraint! @IBOutlet weak var bottomBorderHeightConstraint: NSLayoutConstraint! override func awakeFromNib() { bottomBorderView.hidden = true topBorderHeightConstraint.constant = 1.0 / UIScreen.mainScreen().scale bottomBorderHeightConstraint.constant = 1.0 / UIScreen.mainScreen().scale self.selectedBackgroundView = UIView() self.selectedBackgroundView?.backgroundColor = UIColor(0x0, alpha: 0.05) contentView.userInteractionEnabled = false; } var player: Player? { didSet { avatarImageView.player = player nameLabel.text = player?.shortName positionLabel.text = player?.position // leagueLabel.text = player?.team // statusLabel.text = player?.injury salaryLabel.text = Format.currency.stringFromNumber(player?.salary ?? 0) ppgLabel.text = String(format: "%.2f FPPG", player?.fppg ?? 0) } } var overBudget: Bool = false { didSet { if overBudget { nameLabel.alpha = 0.35 salaryLabel.alpha = 0.35 leagueLabel.alpha = 0.35 statusLabel.alpha = 0.35 } else { nameLabel.alpha = 1.0 salaryLabel.alpha = 1.0 leagueLabel.alpha = 1.0 statusLabel.alpha = 1.0 } } } @IBInspectable var topBorder: Bool = true { didSet { topBorderView.hidden = !topBorder } } @IBInspectable var bottomBorder: Bool = false { didSet { bottomBorderView.hidden = !bottomBorder } } } */
[ -1 ]
ea911033c10c7de3db862234d957103e2ddfcdea
4f5d6dc47401f44701cc9056687e092c36b148c1
/crashes-fuzzing/01329-llvm-bitstreamcursor-readrecord.swift
4e4517557469d92ea91d671d81550797c4e2e317
[ "MIT" ]
permissive
airspeedswift/swift-compiler-crashes
7a81a985a1ed01c9590c7a969f0cd97f42c76362
38b35c0becb391b57025114964bea5b386853bd7
refs/heads/master
2021-01-22T00:03:56.282679
2014-11-22T12:11:17
2014-11-22T12:11:17
26,997,483
2
0
null
null
null
null
UTF-8
Swift
false
false
269
swift
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing struct S : A { init() { static let n1: A<C(bytes: Any) -> String { } protocol d : A { typealias A {
[ -1 ]
45b1a54867b3c88c220ca36835a8abcbb35dba09
ddf2afd106c534ef8ff39a75dae3215e93b07e77
/udacity-on-the-map/User.swift
af1c4646abcc591d3d1eb7ce557515bcaf128ba3
[]
no_license
araustin/udacity-on-the-map
3e86779bc033eff0411257a68493baa1f4abec4b
bc4a3718ff266d00fd6fe985f836acf6a208e17b
refs/heads/master
2020-05-17T04:59:37.589371
2015-06-12T23:07:34
2015-06-12T23:07:34
35,645,937
0
1
null
null
null
null
UTF-8
Swift
false
false
5,269
swift
// // User.swift // udacity-on-the-map // // Created by Ra Ra Ra on 5/22/15. // Copyright (c) 2015 Ra Ra Ra. All rights reserved. // import Foundation class User { /// username of the logged in user static var username = "" /// key for the logged in user static var key = "" /// session id for the logged in user static var sessionId = "" /// Set to false when all user data is finished loading static var loading = true static var firstName = "" static var lastName = "" static var errors: [NSError] = [] /** Make a login request to the Udacity server :param: username The username :param: password The password :param: didComplete The callback function when request competes */ class func logIn(username: String, password: String, didComplete: (success: Bool, errorMessage: String?) -> Void) { let request = NSMutableURLRequest(URL: NSURL(string: "https://www.udacity.com/api/session")!) request.HTTPMethod = "POST" request.addValue("application/json", forHTTPHeaderField: "Accept") request.addValue("application/json", forHTTPHeaderField: "Content-Type") let bodyString = "{\"udacity\": {\"username\": \"\(username)\", \"password\": \"\(password)\"}}" request.HTTPBody = bodyString.dataUsingEncoding(NSUTF8StringEncoding) let session = NSURLSession.sharedSession() let task = session.dataTaskWithRequest(request) { data, response, error in if error != nil { // Handle error… self.errors.append(error) didComplete(success: false, errorMessage: "A network error has occurred.") return } let newData = data.subdataWithRange(NSMakeRange(5, data.length - 5)) /* subset response data! */ let success = User.parseUserData(newData) let errorMessage: String? = success ? nil : "The email or password was not valid." didComplete(success: success, errorMessage: errorMessage) } task.resume() } /** Parse the data elements for the logged in user and store them in the static properties of the User class :param: data The data from the login request :returns: True if everything went well. False otherwise. */ class func parseUserData(data: NSData) -> Bool { var success = true; if let userData = NSJSONSerialization.JSONObjectWithData(data, options: .MutableContainers, error: nil) as? NSDictionary, let account = userData["account"] as? [String: AnyObject], let session = userData["session"] as? [String: String] { User.key = account["key"] as! String User.sessionId = session["id"]! User.getUserDetail() { success in if success { self.loading = false } } } else { success = false } return success; } class func getUserDetail(didComplete: (success: Bool) -> Void) { let request = NSMutableURLRequest(URL: NSURL(string: "https://www.udacity.com/api/users/\(User.key)")!) let session = NSURLSession.sharedSession() let task = session.dataTaskWithRequest(request) { data, response, error in if error != nil { // Handle error... self.errors.append(error) didComplete(success: false) return } let newData = data.subdataWithRange(NSMakeRange(5, data.length - 5)) /* subset response data! */ if let userData = NSJSONSerialization.JSONObjectWithData(newData, options: .MutableContainers, error: nil) as? NSDictionary, let user = userData["user"] as? [String: AnyObject], let firstName = user["first_name"] as? String, let lastName = user["last_name"] as? String { self.firstName = firstName self.lastName = lastName didComplete(success: true) } } task.resume() } class func logOut(didComplete: (success: Bool) -> Void) { let request = NSMutableURLRequest(URL: NSURL(string: "https://www.udacity.com/api/session")!) request.HTTPMethod = "DELETE" var xsrfCookie: NSHTTPCookie? = nil let sharedCookieStorage = NSHTTPCookieStorage.sharedHTTPCookieStorage() for cookie in sharedCookieStorage.cookies as! [NSHTTPCookie] { if cookie.name == "XSRF-TOKEN" { xsrfCookie = cookie } } if let xsrfCookie = xsrfCookie { request.addValue(xsrfCookie.value!, forHTTPHeaderField: "X-XSRF-Token") } let session = NSURLSession.sharedSession() let task = session.dataTaskWithRequest(request) { data, response, error in if error != nil { // Handle error… self.errors.append(error) didComplete(success: false) return } let newData = data.subdataWithRange(NSMakeRange(5, data.length - 5)) /* subset response data! */ didComplete(success: true) } task.resume() } }
[ -1 ]
759a4132e0154eb782934ac1878fee6f12219662
ed1478821fc2f9dca579f179e0eb8c1026247747
/IntroductionSample/View/IntroductionViewController.swift
f231e35438aa9f2c3aba4eff55380bdde4de3601
[]
no_license
satyen95/iOS-Onboarding-Sample
ea7c622af74943acf0fbd6932237a0785375aa71
330dd4b147d176f0ecb2f6a766b95ba6395675b9
refs/heads/master
2021-03-05T12:47:21.647128
2020-03-09T21:09:48
2020-03-09T21:09:48
246,123,001
3
1
null
null
null
null
UTF-8
Swift
false
false
920
swift
// // ViewController.swift // tryLoader // // Created by Satyenkumar Mourya on 01/03/20. // Copyright © 2020 Satyenkumar Mourya. All rights reserved. // import UIKit import Lottie class IntroductionViewController: UIViewController { @IBOutlet weak var animationView: AnimationView! @IBOutlet weak var titleLabel: UILabel! var name: String? var animationName: String? var titleText: String? override func viewDidLoad() { super.viewDidLoad() titleLabel.text = titleText animationView.animation = Animation.named(animationName ?? "carrot") animationView.loopMode = .loop } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) animationView.play() } override func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated) animationView.stop() } }
[ -1 ]
9ec278be86dc808da47787c1818fae828dded0ca
4c6e4965c6ee8f9ce427270229ce22782cf5cb3b
/CircularProgress/CircularProgress/CircularProgressView1.swift
1132b252a2a6328ff306bb5dc56b9b43de6cd9a8
[]
no_license
Lyolia/circle_raw
14f443fe50cd9588f6903c8674633c08220209f0
5c390c3fdcb42122cf66d6b21e65c0b347493171
refs/heads/main
2023-07-23T20:43:28.222290
2021-09-09T14:15:34
2021-09-09T14:15:34
404,749,137
0
0
null
null
null
null
UTF-8
Swift
false
false
1,629
swift
// // CircularProgressView1.swift // CircularProgress // // Created by Алена on 25.03.2021. // import UIKit class CircularProgressView1: UIView { private var circleLayer = CAShapeLayer() private var progressLayer = CAShapeLayer() override init(frame: CGRect) { super.init(frame: frame) createCircularPath() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) createCircularPath() } func createCircularPath() { let circularPath = UIBezierPath(arcCenter: CGPoint(x: frame.size.width / 2.0, y: frame.size.height / 2.0), radius: 80, startAngle: -.pi / 2, endAngle: 3 * .pi / 2, clockwise: true) circleLayer.path = circularPath.cgPath circleLayer.fillColor = UIColor.clear.cgColor circleLayer.lineCap = .round circleLayer.lineWidth = 20.0 circleLayer.strokeColor = UIColor.black.cgColor progressLayer.path = circularPath.cgPath progressLayer.fillColor = UIColor.clear.cgColor progressLayer.lineCap = .round progressLayer.lineWidth = 10.0 progressLayer.strokeEnd = 0 progressLayer.strokeColor = UIColor.red.cgColor layer.addSublayer(circleLayer) layer.addSublayer(progressLayer) } func progressAnimation(duration: TimeInterval) { let circularProgressAnimation = CABasicAnimation(keyPath: "strokeEnd") circularProgressAnimation.duration = duration circularProgressAnimation.toValue = 1.0 circularProgressAnimation.fillMode = .forwards circularProgressAnimation.isRemovedOnCompletion = false progressLayer.add(circularProgressAnimation, forKey: "progressAnim") } }
[ -1 ]
e0abe0e70778afae46ed325ce7a7debc7e3fe29f
51a3db90766ee0c3ae43e0c2d4deb23d2caae1e5
/AnimalEncyclopedia/AnimalFile.swift
ebe7863bfc4626743381159e1b17df634e975012
[]
no_license
miles1020/AnimalEncyclopedia
c9df36714d7cdb7e6f9a7ab91eae38c05c4ca535
14272fb7bea12ef350aebfc2eb5c252308d44aae
refs/heads/master
2022-09-29T07:34:15.041859
2020-05-18T09:01:51
2020-05-18T09:01:51
264,884,344
0
0
null
null
null
null
UTF-8
Swift
false
false
69,058
swift
// // AnimalFile.swift // AnimalEncyclopedia // // Created by HellöM on 2020/5/7. // Copyright © 2020 HellöM. All rights reserved. // import Foundation var animalFilter: Array<Int> = [0, 0, 0, 0] let animalModel: Array<Array<String>> = [["陽明","♂","暴躁","食蟻獸","3月9日","有的","無","義無反顧","https://patchwiki.biligame.com/images/dongsen/a/a2/3f1qchqu7q74dsis7uyz7jfqt6xgo0d.png"],["阿誠","♂","運動","食蟻獸","10月20日","真誠","無","追求本真","https://patchwiki.biligame.com/images/dongsen/0/01/mnuuv9nmyb8q7qv8fuqflzn8ds465zp.png"],["貴妃","♀","成熟","食蟻獸","10月24日","麻煩了","無","女子能頂半邊天","https://patchwiki.biligame.com/images/dongsen/c/c3/p8t76tahby1x89j101hho6ffnxnmoml.png"],["麗婷","♀","元氣","鳥","4月18日","山雀","成為偶像","留得青山在不怕沒柴燒","https://patchwiki.biligame.com/images/dongsen/8/8f/lyy1idgf70u6nyowt5lifixlwo4fxeh.png"],["恰咪","♀","大姐姐","大熊","4月17日","唷咻","無","稟性難移","https://patchwiki.biligame.com/images/dongsen/4/4b/3rb923sgqde5is4t91kh2mm4s28fuct.png"],["鐵熊","♂","暴躁","大熊","7月1日","嗯唔","無","將空罐放入垃圾箱","https://patchwiki.biligame.com/images/dongsen/7/7d/icyc1bivjo9jk1txakfj4pw9wpkpeuo.png"],["喳喳","♀","成熟","鳥","12月4日","喳","無","喙是鳥的財富","https://patchwiki.biligame.com/images/dongsen/a/a6/47kpe9s2rqwsns95mle0nl7sw8q6ra4.png"],["妮雅","♀","大姐姐","大熊","1月16日","呀吶","無","天助自助者","https://patchwiki.biligame.com/images/dongsen/9/9d/j3pzy8brhh5duoc69254qiuawgu6efs.png"],["小雅","♀","普通","食蟻獸","2月6日","優雅","宇航員","久居則安","https://patchwiki.biligame.com/images/dongsen/1/19/jzi70ru0jxnp9a0v1m937v3y1m2wt7v.png"],["李徹","♂","暴躁","鳥","1月27日","貫徹","無","獨斷專行","https://patchwiki.biligame.com/images/dongsen/9/98/7dcxhxlj3zzk0qd2audj9y8ua7vchio.png"],["熊大叔","♂","自戀","大熊","9月27日","咳咳","無","女士優先","https://patchwiki.biligame.com/images/dongsen/8/89/m0okhdls60la08yeqwtkjqfbif8wcc8.png"],["朝陽","♂","暴躁","大熊","7月22日","有喔","無","聚沙成塔","https://patchwiki.biligame.com/images/dongsen/0/0d/0mgqwfkrc3x297y55pxjqalv6lu11b1.png"],["鳳尾","♂","悠閒","鳥","3月4日","如斯","無","明日事明日畢","https://patchwiki.biligame.com/images/dongsen/d/d7/4icwqsjceeke1ft4pcxz9625rwmxuja.png"],["穆穆","♂","暴躁","大熊","7月31日","熊熊","無","寅吃卯糧","https://patchwiki.biligame.com/images/dongsen/2/2f/2569pwaei3p5mce2x2zn6djize71a3o.png"],["安東尼","♂","自戀","食蟻獸","5月19日","歐啦","無","寶刀未老","https://patchwiki.biligame.com/images/dongsen/0/0d/h9o092vymv3i9wh7hw3h6zf7f1v3f5o.png"],["小酒窩","♀","普通","鳥","3月12日","臉紅","無","情人眼里出西施","https://patchwiki.biligame.com/images/dongsen/8/81/duu89um5g4g80lv7ajxp2a817csqvyp.png"],["熊戰士","♂","自戀","大熊","3月31日","over","無","條條大路通羅馬","https://patchwiki.biligame.com/images/dongsen/9/93/fgjyv3jqk743p9b1jsfyldco50rnqpg.png"],["巴克思","♂","悠閒","大熊","8月16日","嗯是","能和各座島上的人交朋友","誠實能讓你走得更遠","https://patchwiki.biligame.com/images/dongsen/0/03/fvd09yel4l88x5pk1rmyiwmf9mhhp1w.png"],["佩希","♀","元氣","食蟻獸","11月9日","希希","無","絕世美女","https://patchwiki.biligame.com/images/dongsen/2/29/2rfhy4aut3y01csbq66kubh0kwk1mwk.png"],["嘰嘰","♀","元氣","鳥","7月13日","嘰","宇航員","早起的鳥兒有蟲吃","https://patchwiki.biligame.com/images/dongsen/a/a2/peygnbpmeg60vwfc7j1vk4sghk1o2ku.png"],["瑞秋","♀","大姐姐","大熊","3月22日","耶呼","無","流行總是周而復始","https://patchwiki.biligame.com/images/dongsen/e/e7/7148nh94i4q82syg04fg0bp8iw5stpn.png"],["太平","♂","運動","大熊","9月26日","太好了","無","和平並非一己之力","https://patchwiki.biligame.com/images/dongsen/b/b1/rqludwtc1t21mysovsikt1ndjqs2kvf.png"],["餘板","♂","悠閒","鳥","8月24日","話說","無","匹夫無罪,懷璧其罪","https://patchwiki.biligame.com/images/dongsen/9/9f/8wjrxnztbhlkglfnw74prxo73twgmte.png"],["糖果","♀","普通","大熊","3月13日","舔舔","無","讀書百遍,其義自見","https://patchwiki.biligame.com/images/dongsen/0/0c/lp09t1ac40s27x1e0q3alhdxbugfmin.png"],["爪爪","♂","暴躁","大熊","10月23日","哇哇","無","年輕時的辛勞彌足珍貴","https://patchwiki.biligame.com/images/dongsen/a/ab/5n8lmrx77x4zaq0c58c751fphgs3g2j.png"],["有美","♀","元氣","食蟻獸","2月16日","真的假的","無","宏偉人生","https://patchwiki.biligame.com/images/dongsen/f/fd/6dckpnus6jnvqyxgvxzvulo3xzesxpo.png"],["紀諾","♂","運動","鳥","2月2日","諾諾","練出很厲害的腹肌","集體行動不如單槍匹馬","https://patchwiki.biligame.com/images/dongsen/6/68/o1xzpnl4pbpnjiluvt7eiqsmej9cpkv.png"],["大功","♂","暴躁","大熊","5月16日","施主","無","可憐天下父母心","https://patchwiki.biligame.com/images/dongsen/b/b6/5vkxwei43ar4fs0nvtkflvxt2bolhpa.png"],["丹丹","♀","元氣","大熊","9月9日","哇哦","成為偶像","熱烈歡迎","https://patchwiki.biligame.com/images/dongsen/8/8c/mqyphld9pr5k88zcymr4mjugln9oh4r.png"],["阿燕","♂","運動","鳥","7月17日","呢喃","無","順其自然","https://patchwiki.biligame.com/images/dongsen/9/93/8gjxl0xwtewfx1frot3soj823141un0.png"],["戀戀","♀","元氣","大熊","9月15日","加油","無","橘生淮南則為橘","https://patchwiki.biligame.com/images/dongsen/e/e5/3z8cu1d44hcxfzx4ho0lrz5pp4jxe3l.png"],["羅迪歐","♂","悠閒","牛","10月29日","了不起","無","寧為雞口,無為牛後","https://patchwiki.biligame.com/images/dongsen/0/07/85nu475h8slfwtaxm47fxd4ujfhapy2.png"],["檸檬娜","♀","普通","貓","3月27日","娜個","無","貓急智生","https://patchwiki.biligame.com/images/dongsen/c/c3/7d99fi1m321r7uqh4ynjemfvmcdhn5f.png"],["戈伍紀","♂","暴躁","貓","11月29日","咦唷","無","一聲二顏三姿態","https://patchwiki.biligame.com/images/dongsen/3/37/tn2whour3unzy1cs0qwkcqpo9bajahq.png"],["阿判","♂","悠閒","貓","1月1日","貓貓","無","貓有九條命","https://patchwiki.biligame.com/images/dongsen/f/fd/mrpv91b59t0faao3ajelo22ybzju2h1.png"],["趙奇","♂","自戀","鳥","6月22日","唷唷唷","無","草木知威","https://patchwiki.biligame.com/images/dongsen/c/cf/565gkqkt79ynxqh784djljoare1sh42.png"],["朱古莉","♀","成熟","貓","2月15日","古古","無","免配送費","https://patchwiki.biligame.com/images/dongsen/4/40/69qnhd2ykyiu4ffwsvgwxbtghgv7ew1.png"],["純純","♀","元氣","貓","6月17日","蜜柑","無","100%鮮榨果汁","https://patchwiki.biligame.com/images/dongsen/f/fa/c9bkzzwegn1aivwocvx1ciag63huhid.png"],["毛樂時","♂","悠閒","牛","4月20日","奔馳","消防員","隨著牛的成長,鼻孔也會變大","https://patchwiki.biligame.com/images/dongsen/f/f5/ezhh3zv7rwqn9a7iplt1cjf8sj1sn0e.png"],["豔后","♀","成熟","貓","9月22日","尼羅","無","適得其反","https://patchwiki.biligame.com/images/dongsen/3/39/0qk07h279fy7r5gxi7gz9bnzwck22tc.png"],["阿一","♂","運動","貓","8月1日","喝","無","必殺技","https://patchwiki.biligame.com/images/dongsen/d/dc/hjv0riyqct10xo1fieojpnscxkerhhh.png"],["圓圓","♀","普通","貓","9月25日","喵","無","貴貓多忘事","https://patchwiki.biligame.com/images/dongsen/d/d5/if6m85xq870gov60x2cd466yhwm5vs1.png"],["文雄","♂","運動","鳥","7月25日","噗噗","無","籠中之鳥","https://patchwiki.biligame.com/images/dongsen/8/85/kifvkn4d05id5j3w47sqj05kyeeldyk.png"],["阿邦","♂","暴躁","貓","12月10日","切","吉他手","必殺技是貓貓拳","https://patchwiki.biligame.com/images/dongsen/b/b0/fzck20tr0fq4vghr32fdftjwjaj7ztv.png"],["爾光","♂","悠閒","貓","4月11日","晃晃","無","有人打你的右臉,連左臉也轉過來由他打","https://patchwiki.biligame.com/images/dongsen/8/88/ixudoc3lyluzyinsezw8ncbncfg7dtb.png"],["羅宋","♂","悠閒、暴躁","牛","5月20日","是唄","無","牛耕田,馬吃谷","https://patchwiki.biligame.com/images/dongsen/6/63/pr7jen0xri93cwywxohddv30jxq1q2t.png"],["珍珍","♀","成熟","貓","9月30日","嗯哼","無","姿態是要擺出來的","https://patchwiki.biligame.com/images/dongsen/7/72/m5qy2ekcw0tbr71z7bch7jgnszrocvq.png"],["彭花","♀","元氣","貓","2月27日","看看","無","美麗不長久,唯有智慧永恆","https://patchwiki.biligame.com/images/dongsen/c/cf/rqhd7zebnj9azof94c3mintkr8iywls.png"],["週之翔","♂","運動","鳥","11月20日","啁啁","音樂家","雞毛蒜皮","https://patchwiki.biligame.com/images/dongsen/2/2b/obdvd9ffgwg7w10yubgqpoats16kzuz.png"],["莎莎","♀","元氣","貓","6月29日","喵嗯","無","笑容讓你變得更加可愛","https://patchwiki.biligame.com/images/dongsen/6/67/pktjtjer77ubhb6dcflz3uf7vg0zdkn.png"],["小玉","♀","成熟","貓","5月29日","嗯嗯","無","知足常樂","https://patchwiki.biligame.com/images/dongsen/8/86/cvvp33t5np0hnq82tn8336eunitoxa1.png"],["大常","♂","運動","牛","4月29日","鬍渣","無","反面教材","https://patchwiki.biligame.com/images/dongsen/9/9a/6chtxm0j01j8cn31hw3kkvw3v1vfa8h.png"],["小虎","♀","元氣","貓","8月13日","喵吼","成為偶像","愛情的蘋果","https://patchwiki.biligame.com/images/dongsen/7/73/6vlkez4zljimukn5ckqketa3ofon6sz.png"],["奧莉","♀","成熟","貓","2月3日","什麼","無","敬人者,人恆敬之","https://patchwiki.biligame.com/images/dongsen/c/c3/8bmpe8jgxlocd9rvuyv95htgo3a5a8j.png"],["施萬德","♂","暴躁","牛","4月30日","呼呼","無","強者落淚時","https://patchwiki.biligame.com/images/dongsen/2/22/lxjv0lo1arpefnac9ysddx2fhvyznwr.png"],["美佳","♀","元氣","貓","3月30日","哪","無","戀愛之心,人皆有之","https://patchwiki.biligame.com/images/dongsen/c/cd/i4tnpwqpj1r8c587peirpu6sly93swj.png"],["仁平","♂","悠閒","貓","1月12日","吶","無","天作之合","https://patchwiki.biligame.com/images/dongsen/3/31/i47tys2ox8ca7nan78f49cnc8g9wzoz.png"],["盧爾曼","♂","暴躁","牛","12月29日","哞","無","只要耐心等待,定會時來運轉","https://patchwiki.biligame.com/images/dongsen/6/6a/6byp2fok2axzgysg9ohvwjnq9myna86.png"],["摔角鴉","♂","自戀","鳥","12月12日","嘎","無","興趣是最好的老師","https://patchwiki.biligame.com/images/dongsen/7/71/sl1zg3z8rb6jzi17ppilwjpn5fu566b.png"],["男子汗","♂","運動","貓","8月17日","打啊","無","鬥爭心","https://patchwiki.biligame.com/images/dongsen/5/53/6pogjdqiua1x1tnzvvdiwbjfp52qkv5.png"],["餘子醬","♀","普通","貓","10月8日","醬醬","無","女人心,海底針","https://patchwiki.biligame.com/images/dongsen/f/fe/0hawmivoi75im2daxz09hdyyqonwrxc.png"],["艾德豪","♂","運動","小熊","9月28日","精神","無","產地直送","https://patchwiki.biligame.com/images/dongsen/7/7b/7s4cbpguae80z6xktuce9k32g1kgkpv.png"],["沛希","♂","悠閒","雞","10月10日","好棒","無","杯弓蛇影","https://patchwiki.biligame.com/images/dongsen/2/22/ewmm6ba71xi8prb32lkgsnzzscahfd3.png"],["櫻桃","♀","元氣","小熊","3月17日","開玩笑的","無","小小一粒山椒也辣勁十足","https://patchwiki.biligame.com/images/dongsen/7/76/fmvygkzkoahgrx1hfnmmf4tk1fkx6vo.png"],["娃娃","♀","元氣","小熊","6月24日","怦怦","漫畫家","糖果讓世界甜美","https://patchwiki.biligame.com/images/dongsen/4/4a/42y0oixbjcr3033iov58pfjop8p2i5k.png"],["金閣","♂","暴躁","雞","11月23日","等待","無","盡人事,聽天命","https://patchwiki.biligame.com/images/dongsen/6/63/s5i5oriz69pozztqx31wupynoihh6pj.png"],["然姐","♀","大姐姐","小熊","6月23日","竟然說","無","孝順要趁早","https://patchwiki.biligame.com/images/dongsen/7/79/1erfp6xljbqj2r349ytevmgz7kcw0ax.png"],["玩具熊","♂","悠閒","小熊","2月10日","玩玩","無","跌跌撞撞的人生","https://patchwiki.biligame.com/images/dongsen/5/57/krd6ijg6345xqm9a1ilsygbbuoj563b.png"],["黃金雞","♂","悠閒","雞","10月14日","很優","無","無知者無畏","https://patchwiki.biligame.com/images/dongsen/e/e1/o1rvyqdbfqev4t4e9mi6y17b59b1pw8.png"],["阿妹","♀","普通","小熊","5月21日","有耶","無","世外桃源夢中見","https://patchwiki.biligame.com/images/dongsen/a/aa/1z17qp0484s064hmfx6mz7o0zg5syfg.png"],["小楓","♀","普通","小熊","6月15日","熊仔","無","誰知盤中餐,粒粒皆辛苦","https://patchwiki.biligame.com/images/dongsen/4/45/qgwupkiydqtssk9lcb20u4vqnhvwcuw.png"],["凱西","♀","成熟","雞","10月24日","咯咯","無","九死一生","https://patchwiki.biligame.com/images/dongsen/7/7e/awj7kx6aqiuoventjw1w3qu7imv1f9n.png"],["瑪丁","♂","悠閒","小熊","4月16日","無","無","無","https://patchwiki.biligame.com/images/dongsen/e/ea/9bhvt5ozyhdr8150f5id27wl8jketka.png"],["嘉弼","♂","暴躁","小熊","8月2日","唉唷","無","禍不單行","https://patchwiki.biligame.com/images/dongsen/f/f7/pguy9t7oidqq3a8ck4ztwbnr9vanjqz.png"],["茶茶","♂","運動","貓","12月20日","之類的","無","路見不平,貓爪相助","https://patchwiki.biligame.com/images/dongsen/4/40/rb53l2onglw3tdaljd6tb5mcy0xaw3x.png"],["陶米咕","♀","普通","雞","4月28日","是唷","無","早睡早起身體好","https://patchwiki.biligame.com/images/dongsen/7/79/njojjwcfp6y5npyyfn8n34ulun4d75j.png"],["佳敏","♀","普通","小熊","5月18日","佳佳","無","以柔克剛","https://patchwiki.biligame.com/images/dongsen/9/93/pxhkzjrtmbjm7hv8fwhdbrf03zk1gid.png"],["蓬蓬","♂","運動","小熊","1月2日","萌","無","幸運來自於勇敢","https://patchwiki.biligame.com/images/dongsen/2/2b/kbs48eg2l0l8j05xkdqsfw7bh4n9qof.png"],["烏骨雞","♂","自戀","雞","12月23日","骨雞","無","入鄉隨俗","https://patchwiki.biligame.com/images/dongsen/7/78/rqqnwch9yd2ty1fzsz3axw9b7eqpfr1.png"],["美玲","♀","成熟","小熊","3月10日","哎呀","無","夢中可以為所欲為","https://patchwiki.biligame.com/images/dongsen/4/49/59o34z38jeoh43oocsdifo0kgm7mvne.png"],["憲雄","♂","暴躁","小熊","12月29日","罷了","無","錢多事更多","https://patchwiki.biligame.com/images/dongsen/1/11/oorndymygs7qo94x27bnsmqt7qdnzcq.png"],["巧巧","♀","大姐姐","貓","4月27日","掰掰","無","耳濡目染","https://patchwiki.biligame.com/images/dongsen/f/f5/41t4355ooxnkjs5hj1h11txy8e9q7jn.png"],["詠旋","♀","成熟","雞","12月9日","哈雷路亞","無","中看不中用","https://patchwiki.biligame.com/images/dongsen/a/a6/rj09p189d8jada21ghlhoj2thg6qhwg.png"],["胖達","♂","悠閒","小熊","8月6日","竹子","無","等待是最美妙的時光","https://patchwiki.biligame.com/images/dongsen/2/2c/g584sd7pval1beky8nkwrlvbto9x8ay.png"],["阿欽","♂","悠閒","小熊","6月11日","真是的","無","天下沒有免費的午飯","https://patchwiki.biligame.com/images/dongsen/e/e5/dbh14ywrx6dakxx0xh7lrv99r30idu4.png"],["阿排","♀","元氣","奶牛","5月10日","牟","無","不說誰知道","https://patchwiki.biligame.com/images/dongsen/a/a2/ohr2rpaqcd4rezm6x25q3arjjcys7n2.png"],["肯肯","♂","運動","雞","10月4日","咕咕","無","無利不起早","https://patchwiki.biligame.com/images/dongsen/c/c1/2o2pfw91po4usgi8im68sah5ejxq9dm.png"],["畢克蘿","♀","普通","小熊","7月12日","馬克杯","無","人心不足蛇吞象","https://patchwiki.biligame.com/images/dongsen/c/cc/629ff1uvi60pnrntbmlo2nimzyz0ew7.png"],["傑克","♂","自戀","貓","10月1日","嚴肅","無","自有品牌","https://patchwiki.biligame.com/images/dongsen/b/bc/p9aoiubbogoydvba1lnyftutmkf2ck7.png"],["帕塔雅","♀","元氣、大姐姐","雞","10月12日","泰泰","無","雁過無痕","https://patchwiki.biligame.com/images/dongsen/f/f5/6s2hmd0wsdncj8qkhx02etqw5nobgvi.png"],["阿西","♂","悠閒","小熊","3月2日","算了","無","有名無實","https://patchwiki.biligame.com/images/dongsen/8/8e/ru4b74i2ibkthnc3nevpa2plcaulepl.png"],["阿龍","♂","悠閒","鱷魚","2月12日","然後","無","魚躍龍門","https://patchwiki.biligame.com/images/dongsen/6/62/m20ph316j0abpi5pohpzkjj8hsunec8.png"],["牧牧","♀","成熟","奶牛","8月25日","牛奶","無","進寸退尺","https://patchwiki.biligame.com/images/dongsen/c/c5/los096pej03ac0g5uet1gx3ygxjvjth.png"],["大吉","♂","悠閒","狗","11月4日","大概","無","賭場得意,情場失意","https://patchwiki.biligame.com/images/dongsen/e/e5/h5cyjbl7jhiu8h20dfe2usem23sccje.png"],["娣雅","♀","大姐姐","鹿","5月4日","隨便啦","無","纖纖玉足","https://patchwiki.biligame.com/images/dongsen/3/3a/j3t4objv0xf9sgth4nzssuwgkttr3ai.png"],["豐年","♂","運動","鱷魚","8月7日","跳","無","肱二頭肌","https://patchwiki.biligame.com/images/dongsen/8/8d/aoiv1wyxdmzlqwqgkn6fy1s1dzork66.png"],["香草","♀","普通","狗","11月16日","對不對","無","實踐出真知","https://patchwiki.biligame.com/images/dongsen/c/c7/nlarmnzsa5h1805mic8gfbeqt9avr7h.png"],["查克","♂","悠閒","鹿","7月27日","鹿鹿","無","失敗是成功之母","https://patchwiki.biligame.com/images/dongsen/0/07/elj9cy38mxqthmkliwahjd5k3ca0c61.png"],["音音","♀","普通","鹿","3月26日","小鹿","無","萬里之行始於足下","https://patchwiki.biligame.com/images/dongsen/9/9a/5pxemeyv8o2mywwf6k6aresy6f9oec1.png"],["晨曦","♀","普通","奶牛","9月20日","微笑","無","金窩銀窩不如自己的草窩","https://patchwiki.biligame.com/images/dongsen/9/9a/7txfdb2hqjhxepvr769nyqrbocykhr4.png"],["羅賓","♂","悠閒","狗","5月13日","狗狗","無","耳聽為虛,眼見為實","https://patchwiki.biligame.com/images/dongsen/6/62/7ed8zmjxsg5hg956giatowj87wcdwl3.png"],["湯姆","♂","自戀","鹿","8月20日","變了","無","逐獸者,目不見太山","https://patchwiki.biligame.com/images/dongsen/c/c6/ij7ucye1q5gqm2eb2n0qdz2aqmjdjpe.png"],["大和","♂","暴躁","鱷魚","5月27日","噗咻","無","只見樹木不見森林","https://patchwiki.biligame.com/images/dongsen/a/a9/4plpg3r25lok9wp90jefc7zirzd9m1w.png"],["雀兒喜","♀","普通","鹿","1月18日","無","無","無","https://patchwiki.biligame.com/images/dongsen/a/a3/8d2qssi2jw02dlfz8tf2ivb17dzqv7y.png"],["小健","♂","熱血好動","鹿","11月7日","梅花","無","三十六計走為上計","https://patchwiki.biligame.com/images/dongsen/d/d0/en26uvg5lcgznlcdpssf8athod4njzk.png"],["玉蘭","♀","成熟","奶牛","2月28日","這樣很好","無","泡沫時代","https://patchwiki.biligame.com/images/dongsen/2/2c/ebkklcmpn60qx771gc2ron2pte0udvd.png"],["阿富","♂","悠閒","狗","8月4日","對吧","無","愚者只看結果,智者究其原因","https://patchwiki.biligame.com/images/dongsen/2/2f/3rn7954x4mvss7pat62sg2unwuoorhm.png"],["潔西卡","♀","大姐姐","鹿","9月19日","西卡","彩妝大師","罵人笨蛋者才是笨蛋","https://patchwiki.biligame.com/images/dongsen/e/e8/0ix0qskel080j2d0gsq5bbx4cndv62q.png"],["海德","♂","運動","鱷魚","11月15日","唰唰","無","揭穿假面具","https://patchwiki.biligame.com/images/dongsen/c/c1/0o9yg767srogxentjkgaw1fy9at2944.png"],["牛奶糖","♀","普通","狗","12月27日","汪","無","恰到好處的幸福才是最棒的","https://patchwiki.biligame.com/images/dongsen/c/ce/ncohbzaiiu4qyfcdfpmd15v44jfl2et.png"],["森森","♂","自戀","鹿","6月7日","鹿營","無","傻得可愛","https://patchwiki.biligame.com/images/dongsen/9/93/natub9hc3xt4duqxedgq5l8ieogc0ej.png"],["阿泥","♂","悠閒","鱷魚","6月9日","鱷泥","無","多睡的孩子長得快","https://patchwiki.biligame.com/images/dongsen/4/4e/jel0bechyn4kcyo3gva5z73k952x0nm.png"],["傅蘭","♀","成熟","狗","10月25日","屋屋","無","薄倖佳人","https://patchwiki.biligame.com/images/dongsen/6/64/pkk961x0ti463ie3pqs2cejb7z6mnp1.png"],["彼得","♂","悠閒","鹿","4月5日","怎麼辦","市長","有名無實","https://patchwiki.biligame.com/images/dongsen/5/5a/h8kt1ys4tvp003qwdg2vecwqnhu3ryp.png"],["愛莉","♀","普通","鱷魚","5月17日","鱷莉","無","以和為貴","https://patchwiki.biligame.com/images/dongsen/c/c5/p02xrv5yfa83gy7fcjbfe31052tf9zv.png"],["約翰","♂","暴躁","狗","11月1日","儂","無","睡眠也算工作","https://patchwiki.biligame.com/images/dongsen/7/73/1oa52oeepp82avwver9j2l7e5odm4sn.png"],["布鹿斯","♂","暴躁","鹿","5月26日","福鹿壽","無","同坐一條船","https://patchwiki.biligame.com/images/dongsen/3/36/asfugf4649czmqigm5axpivuuwwcxn8.png"],["鱷羅思","♀","成熟","鱷魚","11月8日","鱷魚皮","無","以口量心","https://patchwiki.biligame.com/images/dongsen/a/a6/k9vn3t655a4ki632nxmhdo27ufb61wm.png"],["阿笨","♂","悠閒","狗","6月10日","咆","無","不動如山","https://patchwiki.biligame.com/images/dongsen/f/f0/gey80ieaqvjn87z5ggw25pqb4iji2xm.png"],["倪家莉","♀","成熟","鹿","1月4日","是吧","無","改過自新","https://patchwiki.biligame.com/images/dongsen/3/3a/t6cqbgbl3mkasxw9thy0n11pifltfvm.png"],["球藻","♀","普通","鴨","6月27日","球球","無","回憶如潮水湧來","https://patchwiki.biligame.com/images/dongsen/6/61/sde917jaliz3hf9ucags25ak6sgmbuc.png"],["金牌","♂","運動","狗","11月11日","摘","無","抬腿不踢搖尾狗","https://patchwiki.biligame.com/images/dongsen/a/a5/hyeh649whoqz0ignmkq0ess9voifovo.png"],["巨巨","♂","悠閒","大象","7月14日","象象","記者","餵象者不畏象","https://patchwiki.biligame.com/images/dongsen/8/88/55hk86r706wgjzal0f1zu1u196yvxl2.png"],["肥肝","♂","悠閒","鴨","6月25日","或許鴨","無","滿漢全席","https://patchwiki.biligame.com/images/dongsen/7/71/psmk0thlcucjs7bue6t5zi38uda24tp.png"],["皮蛋","♂","運動","鴨","2月1日","蛋是啊","無","春江水暖鴨先知","https://patchwiki.biligame.com/images/dongsen/7/71/aa9fu7fnkxl3giytnfshy4zdjem1adw.png"],["素返真","♀","成熟","鴨","8月12日","相反","無","時間就是金錢","https://patchwiki.biligame.com/images/dongsen/4/4c/g2qz3vp03s1stckr8bw01wljz5wtldw.png"],["海苔裴","♀","元氣","鴨","2月11日","裴裴","無","小身體大食量","https://patchwiki.biligame.com/images/dongsen/e/e4/6skh9jx5x5dvc2l9ohcb5q3pbqdxsea.png"],["文字燒","♂","悠閒","狗","12月31日","什麼字","無","出門在外,不怕丟醜","https://patchwiki.biligame.com/images/dongsen/9/92/kmze66ykg1f6c4bkggi9jqif41vuaet.png"],["阿三","♂","悠閒","大象","10月3日","哈啊","無","還要更多的咖哩!","https://patchwiki.biligame.com/images/dongsen/a/a4/ai1cm3xmxuld41frz7vwaqz41vyjdij.png"],["阿守","♂","運動","鴨","6月13日","呱呱","無","小心路旁","https://patchwiki.biligame.com/images/dongsen/7/7f/bzpikocio5973d6q1mcj9ouumcvvr5w.png"],["李察","♂","悠閒","鴨","1月3日","鴨鴨","無","普天之下莫非王土","https://patchwiki.biligame.com/images/dongsen/d/dd/bu8r96la1xkf0ex4o6l0b8kzisbt0o2.png"],["珮琳","♀","元氣","狗","6月18日","琳琳","無","理所當然","https://patchwiki.biligame.com/images/dongsen/5/54/cxciz6ch2qhmbadda82z5dl54psowud.png"],["亞美","♀","普通","鴨","3月7日","說不定鴨","無","事不宜遲","https://patchwiki.biligame.com/images/dongsen/6/62/3dnh0d2eiuwv528wbn5dn4punieqrpl.png"],["蘇米","♀","成熟","鴨","11月17日","八十八","無","龍生龍,鳳生鳳","https://patchwiki.biligame.com/images/dongsen/3/36/ken3f6k8t384dakj94me6336iqhiyf1.png"],["小八","♂","悠閒","狗","8月3日","那麼那麼","無","清官難斷家務事","https://patchwiki.biligame.com/images/dongsen/f/f1/sb1lxz2m1dgvs9p1vgshluqctcfsd5d.png"],["艾勒芬","♀","成熟","大象","12月8日","魯魯","無","只要結果好那就是好","https://patchwiki.biligame.com/images/dongsen/d/d0/rckuejj2qk0qebtyn6ve4pt2j70e3vm.png"],["卿德","♂","悠閒","鴨","6月30日","唧唧","無","醜小鴨也會變天鵝","https://patchwiki.biligame.com/images/dongsen/d/d2/azej7e6senhkr9vgx39jttqh0qid2a8.png"],["愛哭鬼","♀","元氣","鴨","2月23日","嗚嗚","無","知人知面不知心","https://patchwiki.biligame.com/images/dongsen/b/ba/qv8k4badavn0tnhdvfp9wwiodvl99f8.png"],["麻蓉","♀","元氣","狗","1月11日","一二","無","IT革新","https://patchwiki.biligame.com/images/dongsen/b/bb/crmicitqddd7bku2auo4bbirqpmpwje.png"],["何童","♂","自戀","鴨","12月22日","說真的","無","晚上不睡,早上不起","https://patchwiki.biligame.com/images/dongsen/9/98/m7zhhg7uma7i0c1r2d8lerhf74gxemj.png"],["小鮪","♀","元氣","鴨","2月19日","魚魚","無","愛能創造奇跡","https://patchwiki.biligame.com/images/dongsen/e/e7/mnv0xywskylaa8f5qbh6chbflse5xx4.png"],["花娜","♀","大姐姐","狗","5月11日","聽說娜","無","十八無醜女","https://patchwiki.biligame.com/images/dongsen/0/0b/7s6wdk5ku9g1rzivn6k866c06ifa0xa.png"],["莎莉","♀","普通","大象","1月28日","莎啦啦","無","一白遮三醜","https://patchwiki.biligame.com/images/dongsen/e/e8/kcf5gxv1cer96mcd7x5i7yjx3fbuy0s.png"],["米蘭達","♀","成熟","鴨","4月23日","怎麼回事","無","嚴以律己,寬以待人","https://patchwiki.biligame.com/images/dongsen/9/9e/4mtumgv3tk4s0jc0v5sqpqvb7pdh08z.png"],["安妮","♀","成熟","鴨","4月8日","嘆","無","每天無憂無慮的只有愚人","https://patchwiki.biligame.com/images/dongsen/e/e3/rudqvvjnugkofh1pyzz39xcwumaxubm.png"],["貝果","♀","普通","狗","10月15日","賓果","無","陰盛陽衰","https://patchwiki.biligame.com/images/dongsen/6/6a/7fkncsb4i3xamph092sys0qfzlp8pem.png"],["露露","♀","成熟","大象","1月20日","勇","無","大材小用","https://patchwiki.biligame.com/images/dongsen/6/6f/ejx84zeqk8j32v9isbm48uvqso4mytq.png"],["阿坊","♂","悠閒","鴨","5月25日","餵!媽媽","無","不諳世事,高枕無憂","https://patchwiki.biligame.com/images/dongsen/9/9d/1sgr0325r11bj3kzvxlctwk6ffnnkwu.png"],["包伯","♂","自戀","狗","11月24日","汪想想","無","高枕無憂","https://patchwiki.biligame.com/images/dongsen/4/4e/2qmjbec3fyus66lhtq8e8rkuyksmkuv.png"],["番茄醬","♀","元氣","鴨","7月27日","噗吱","歌手","每天一個蘋果,醫生遠離我","https://patchwiki.biligame.com/images/dongsen/f/f4/oqjj7wie25t3bael1ksqs5fsqqnw60i.png"],["阿刻","♂","悠閒","青蛙","7月8日","嚼嚼","無","濁水無蛙","https://patchwiki.biligame.com/images/dongsen/5/58/dbu7scdrjao5a0vgxh8af5d7a5yy00f.png"],["啡卡","♀","元氣","大象","3月6日","無","無","無","https://patchwiki.biligame.com/images/dongsen/d/db/2803rdcdxwrwpnxhx953ptpijqibres.png"],["比利","♂","暴躁","山羊","8月29日","耶","無","家家有本難唸的經","https://patchwiki.biligame.com/images/dongsen/3/32/qo497aek52jbl95vxsgu2yu1dh9gkqs.png"],["翡翠","♀","普通","青蛙","10月27日","是蛙","無","絕不追吻","https://patchwiki.biligame.com/images/dongsen/e/ec/jql712lgnzfa8lpqd3e6scad9hv2mz2.png"],["迷仔","♂","暴躁","青蛙","6月5日","餵","無","一觸即發","https://patchwiki.biligame.com/images/dongsen/f/f6/q8txnu7am41kz94rbk3txar0liq8rjc.png"],["大大","♂","運動","大象","3月23日","嘻嘻","無","露齒而不笑","https://patchwiki.biligame.com/images/dongsen/2/20/tl6m5wzyhbvt0h4rcv75irezu0aj26n.png"],["亨利","♂","自戀","青蛙","9月21日","滴咕","無","心平氣和","https://patchwiki.biligame.com/images/dongsen/5/59/0b40egp2b7ow9w60jti8m1zzzn9o2wb.png"],["阿田","♂","運動","青蛙","8月3日","蝌蚪","無","青蛙的孩子會游泳","https://patchwiki.biligame.com/images/dongsen/4/40/pdeg0mcbkbb1ormxzkan6pgtkmb1up8.png"],["龐克斯","♂","暴躁","大象","6月9日","搖滾","無","居然自作主張","https://patchwiki.biligame.com/images/dongsen/4/47/colkszeqlgjl44wcolpq4hzft032p8g.png"],["嘉俊","♂","悠閒","青蛙","6月6日","哈啾","無","病從心頭","https://patchwiki.biligame.com/images/dongsen/7/7d/7g5io3kqwvnmvh1pdiqit4h8h9ujd5r.png"],["毒仔","♂","運動","青蛙","10月9日","聒聒","無","井蛙不可語海,夏蟲不可語冰","https://patchwiki.biligame.com/images/dongsen/9/92/t75vh1e5gcz48715cpg8kcrfezqovhe.png"],["泡芙","♀","普通","大象","5月12日","啦啷","無","嘗盡人生百味","https://patchwiki.biligame.com/images/dongsen/3/38/k1yfyahl3gs9ljs7x2s3mi996wbpug4.png"],["雪兒","♀","普通","山羊","3月6日","唄","無","南柯一夢","https://patchwiki.biligame.com/images/dongsen/9/92/tfdojprp04ra4a50g0r5jujozkxdlpp.png"],["春捲","♂","運動","青蛙","12月17日","不客氣","無","蛙跳必有雨","https://patchwiki.biligame.com/images/dongsen/f/f6/qp9or356mx4eprxbhi05ol56x61k8o4.png"],["雷妮","♀","普通","青蛙","2月4日","雨雨","無","不打不相識","https://patchwiki.biligame.com/images/dongsen/e/e4/27l9vlp4npt7splyi4q05pgkfquztv3.png"],["林妲","♀","成熟","青蛙","8月11日","寶貝","無","玫瑰色的人生","https://patchwiki.biligame.com/images/dongsen/4/4e/g4ie0cl055f54ncfwm3a7euiuf0m2fv.png"],["山姆","♂","暴躁","青蛙","8月21日","山山","無","有蛙的地方就有水","https://patchwiki.biligame.com/images/dongsen/d/db/emquelpgwthlebr52sv40ol9wpsofll.png"],["阿原","♂","悠閒","大象","9月7日","毛毛","無","歷史會重演","https://patchwiki.biligame.com/images/dongsen/3/33/3qjoaz07j4okjmky0nb2usicwylf947.png"],["墨墨","♀","普通","山羊","8月24日","書","無","多此一舉","https://patchwiki.biligame.com/images/dongsen/e/e0/bboh9xv51ysue2g1r0v4fqs1vri9i5l.png"],["吸管","♂","自戀","青蛙","7月9日","喝喝","無","知恩圖報","https://patchwiki.biligame.com/images/dongsen/1/12/hihgv2hx28jy7imhxc2z5k8xchmjy6e.png"],["鏘鏘","♂","運動","青蛙","2月13日","機器","無","流水不腐戶樞不蠹","https://patchwiki.biligame.com/images/dongsen/7/79/q2kqasr6hesugklqmoxenym3ohk5nvh.png"],["太子","♂","暴躁","青蛙","7月18日","子曰","無","滴水石穿","https://patchwiki.biligame.com/images/dongsen/7/70/03hahqavmi2h4jj7mll2xicmeep7mln.png"],["剪刀","♀","元氣","青蛙","1月13日","石頭","偶像","忽悲忽喜","https://patchwiki.biligame.com/images/dongsen/8/8a/ffp0aar02eksqqds9atw9aoltbuep1y.png"],["茉莉","♀","普通","大象","11月18日","呼","無","下午茶會","https://patchwiki.biligame.com/images/dongsen/2/2c/kn4oyqbmdvp1naxr0kyj1wqp7na86wk.png"],["亞星","♂","運動","山羊","3月25日","唷喏","把腹肌練成10塊","青春洋溢","https://patchwiki.biligame.com/images/dongsen/a/a2/ln7ds9677x3mmbrvs7sbobet2m5g7le.png"],["青呱","♂","悠閒","青蛙","7月21日","是的","無","貼合三刀片","https://patchwiki.biligame.com/images/dongsen/b/b1/ibim1vghz8f909jjyxjqp4ion0zv33y.png"],["江適","♂","運動","青蛙","2月8日","咕嚕","無","相由心生","https://patchwiki.biligame.com/images/dongsen/d/d7/j893zf7u1cayty1uowpj48jyervqldg.png"],["保羅","♂","悠閒","大象","5月5日","保羅","無","與別人一模一樣","https://patchwiki.biligame.com/images/dongsen/c/c5/70olxzbcxny9ayriswuesp2ibfy2op3.png"],["小睫","♀","大姐姐","青蛙","10月2日","蛤","無","竹籃打水一場空","https://patchwiki.biligame.com/images/dongsen/8/8d/96ovso0lbb4pno1gx6ezwz8j64noofo.png"],["米米","♂","自戀","倉鼠","11月10日","咻咻","無","春眠不覺曉","https://patchwiki.biligame.com/images/dongsen/d/d8/klbh6w1itf1aiqe1ohgl838hkubysuf.png"],["空空","♂","暴躁","猩猩","10月1日","喔喔","無","要透過現象看本質","https://patchwiki.biligame.com/images/dongsen/4/44/hm4dq0lmgyt8ym4esz7il2d9o06qouu.png"],["孔在來","♂","暴躁","河馬","8月18日","覺得是啦","無","10頭河馬鑽不進1個洞","https://patchwiki.biligame.com/images/dongsen/5/52/74g6ceyzk3b96i6i956xbibfj1jblf1.png"],["莉拉","♀","元氣","猩猩","11月1日","無","無","無","https://patchwiki.biligame.com/images/dongsen/8/8c/o2ufo80qh0jkhzl5ebxsojya0w08njb.png"],["阿朗","♂","暴躁","猩猩","9月6日","拍胸脯","無","人有須,木有根","https://patchwiki.biligame.com/images/dongsen/e/ea/48rkiq6xtnvc3b0d7e23bm6gdp25dd9.png"],["歐世豪","♂","運動、暴躁","河馬","1月7日","世世","無","紙上談兵","https://patchwiki.biligame.com/images/dongsen/1/19/ikqwt3dq1h9o480ke1q0mkw4l4zhlqn.png"],["安安","♀","成熟","倉鼠","8月9日","相信我","無","都是反夢","https://patchwiki.biligame.com/images/dongsen/c/c9/q4mw4rwxrhpbtu13fm5sw3hlurmtdfg.png"],["吳紫眉","♀","元氣、成熟","猩猩","9月1日","唉呀","無","胳膊粗,膽子就大","https://patchwiki.biligame.com/images/dongsen/6/66/nahdv9i1uzp8xn87vhrhqdjscbh1y7z.png"],["班長","♀","成熟","山羊","1月14日","起立","無","上流、名門、精英","https://patchwiki.biligame.com/images/dongsen/c/c7/81kle150pdfctdrg1r9sb7pblijogse.png"],["曹珂","♀","元氣","河馬","9月18日","是是","無","沉默是金","https://patchwiki.biligame.com/images/dongsen/5/52/h4uwkdwmnbwn26niy09dtdxbf1xknwk.png"],["哈姆","♂","運動","倉鼠","5月30日","火腿","無","一人計短,二人計長","https://patchwiki.biligame.com/images/dongsen/8/81/5egq9llgwtm3r8thngyfct8fjf2hyb3.png"],["啞鈴","♂","暴躁","猩猩","9月11日","高高","無","虛有其表","https://patchwiki.biligame.com/images/dongsen/c/cd/a55zqrdef7kkktyxc163gi50lt73iu5.png"],["戴維","♂","自戀","河馬","10月15日","Yes","無","國士無雙","https://patchwiki.biligame.com/images/dongsen/5/5d/4rqmnnc0fjrmbmaj75ihcvrectr97d2.png"],["子墨","♂","悠閒","倉鼠","10月19日","忐忑不安","無","行雲流水","https://patchwiki.biligame.com/images/dongsen/2/25/b0e7ejx4h0tfbrqjyvhbd26fkouervl.png"],["阿保","♂","悠閒","猩猩","10月18日","嗚呼","無","無色無味","https://patchwiki.biligame.com/images/dongsen/1/11/3iiszn72bh3y02z42hvzdyhvsuv40oi.png"],["文青","♂","悠閒、自戀","山羊","6月28日","啊","無","文學需沉溺其中","https://patchwiki.biligame.com/images/dongsen/8/8e/fs9mtvm7rv0aczz2klc709oeooloohr.png"],["豆沙","♀","普通","河馬","4月25日","沒錯","護士","舍華求實","https://patchwiki.biligame.com/images/dongsen/7/7f/87kftednofchygtfo3x8n2egl1k3d4k.png"],["蘋果","♀","元氣","倉鼠","9月24日","轉轉","無","近朱者赤","https://patchwiki.biligame.com/images/dongsen/d/dd/1oyxt3seg2gggyhjquhwdncuh0h3h52.png"],["萬泰","♂","運動","猩猩","9月12日","這傢伙","無","語文補習與數學補習","https://patchwiki.biligame.com/images/dongsen/0/0a/pcv310lwe8nfurz45hwodddkgz79tst.png"],["威亞","♂","運動","馬","4月4日","搞笑","無","禍不單行","https://patchwiki.biligame.com/images/dongsen/0/03/62l7bsz16xvrbw8jjylprohoaj09n8n.png"],["雪美","♀","普通","倉鼠","1月30日","對啊","新娘","掌上明珠","https://patchwiki.biligame.com/images/dongsen/3/3c/517wl1nxxlzdww8hvfpwbhk02nn7im4.png"],["阿四","♀","大姐姐","猩猩","4月14日","煞啊","無","一技傍身","https://patchwiki.biligame.com/images/dongsen/e/e4/muz86rthi22e9uxjp0aj2xb49cac3om.png"],["芭芭拉","♀","大姐姐","山羊","12月26日","或許芭","無","禍兮福所倚,福兮禍所伏","https://patchwiki.biligame.com/images/dongsen/b/bd/fk693rcqcidrjrs8ts2pdcp56lmp7q8.png"],["賈寶為","♂","運動","河馬","3月29日","因為","無","不勞而獲","https://patchwiki.biligame.com/images/dongsen/7/7f/rplap7kqzrycu7gevgou7b89j92j7ak.png"],["麥麥","♂","自戀","倉鼠","6月20日","就是這樣","無","學無止境","https://patchwiki.biligame.com/images/dongsen/a/a1/2ldoe8a0yr537pgr85uaar5aw4pkmve.png"],["壯壯","♂","運動","猩猩","3月26日","鋼鋼","無","肌肉發達","https://patchwiki.biligame.com/images/dongsen/1/14/dxpmoaaw8hbp5vpzwbqg920xba2ua0q.png"],["小倉","♂","暴躁","倉鼠","2月25日","怒","無","四海之內皆兄弟","https://patchwiki.biligame.com/images/dongsen/d/d7/mmr82yu5xor08h0de43j4hkl2ajh3e8.png"],["史奈魯","♂","自戀","猩猩","12月5日","同意","無","好人有好報","https://patchwiki.biligame.com/images/dongsen/3/32/esep9p6rng1o34r86bg15kojzmswwc7.png"],["雷姆","♂","悠閒","山羊","1月18日","輕飄","無","吉星高照","https://patchwiki.biligame.com/images/dongsen/9/91/0mw0w2nz56zvpifrapf8ogf2aqnc6jm.png"],["艾咪","♀","成熟","河馬","10月6日","嗶嗶","無","必要就是忠告","https://patchwiki.biligame.com/images/dongsen/6/6d/26xsjrfo4ejciz5lfxtkwb93agnvq6d.png"],["阿栗","♂","悠閒","無尾熊","5月7日","顆顆","無","半斤八兩","https://patchwiki.biligame.com/images/dongsen/0/0d/g0tczkumwnmhf5hikf2rgwigs2j452t.png"],["安索尼","♂","自戀","馬","5月22日","請看","無","業界的純血馬","https://patchwiki.biligame.com/images/dongsen/b/b7/q3k33hekqi95zaqqj9gysq5dpwj259r.png"],["草斑娜","♀","普通","馬","1月25日","說到","無","在熱帶草原吃午餐","https://patchwiki.biligame.com/images/dongsen/8/8a/n74e7mp7zrm7syl51wdk1qeb1sl8slo.png"],["亞莎","♀","成熟","袋鼠","11月12日","嘿","無","血濃於水","https://patchwiki.biligame.com/images/dongsen/9/99/d6sssg6olsv35l9dxl6jt93gqd6f1ju.png"],["莫兒","♀","普通","無尾熊","8月19日","晶亮kira","無","自我意識過剩","https://patchwiki.biligame.com/images/dongsen/b/b7/d1c7gyg0amwiqc90j6529afjruqveco.png"],["小鈾","♀","成熟","馬","2月9日","遊遊","無","洗澡時大家都赤誠相見","https://patchwiki.biligame.com/images/dongsen/d/d8/mptyd9duk68gboc12n92l6ln1pbzjgw.png"],["簡培菈","♀","大姐姐","無尾熊","5月14日","咦","無","大堡礁","https://patchwiki.biligame.com/images/dongsen/e/e6/hbf44jwb4zsnlztzaefot1xcps2h6hk.png"],["小岡","♂","悠閒","馬","1月10日","聽說是","無","秋高馬肥","https://patchwiki.biligame.com/images/dongsen/5/57/et66rqm6lea9c2i584fzmadswb3ankp.png"],["酥餅","♂","悠閒","馬","10月5日","酥酥","無","本末倒置","https://patchwiki.biligame.com/images/dongsen/6/6d/q9tuf5zigsqwi17uqvcg7tj80bmlg2i.png"],["媽咪","♀","普通","袋鼠","12月5日","親親","無","養兒一百歲,常憂九十九","https://patchwiki.biligame.com/images/dongsen/a/a8/d01fez3707oi8jma6ad7hi37ldka38g.png"],["阿得","♀","普通","無尾熊","4月12日","不得了","無","不合時宜的聖誕老人","https://patchwiki.biligame.com/images/dongsen/c/cb/n717nzm6jws9zgi9drk3ayo7z7ujsgi.png"],["小薰","♀","普通","馬","11月28日","蹦","無","防寒規格","https://patchwiki.biligame.com/images/dongsen/1/1a/jzyppv0z5ozo5reb7io9ewpoel35ysw.png"],["敖志明","♂","運動","無尾熊","10月12日","哇。","無","尤加利精油配方","https://patchwiki.biligame.com/images/dongsen/a/a9/4txtpw7gqq1yu34iukiv8s5hsodpe0b.png"],["朱黎","♂","自戀","馬","3月15日","餵!你","無","天馬行空","https://patchwiki.biligame.com/images/dongsen/c/c7/pq9pp4ikfbba4qe54rbappa6xy29hvs.png"],["黑馬","♂","暴躁","馬","6月16日","布魯魯","無","眼睛是心靈的窗戶","https://patchwiki.biligame.com/images/dongsen/6/6e/rgw9ntk063coc7normdou3hd37c2lmj.png"],["童兒","♀","成熟","袋鼠","9月8日","龐克","無","外甥不出舅家門","https://patchwiki.biligame.com/images/dongsen/b/b9/79s9vuad9fpqop5dlgknr1yrhywg8lw.png"],["思穎","♀","普通","無尾熊","6月21日","無尾熊。","無","朝霞不出門,晚霞行千里","https://patchwiki.biligame.com/images/dongsen/d/dd/82vd9kyqcxpy2rqolwdgcu9ygrhu9tq.png"],["舒芙蕾","♀","成熟","馬","12月2日","舒服","無","對馬彈琴","https://patchwiki.biligame.com/images/dongsen/3/32/qt4oxo4nyn621ybj8waa04s14qmf7r2.png"],["羅奇","♂","自戀","無尾熊","10月26日","喂喂","無","眼睛會說話","https://patchwiki.biligame.com/images/dongsen/b/b0/b4bzcaso8ws8xro1qcj0fcjuihdk85e.png"],["雷哈娜","♀","大姐姐","馬","6月4日","哼","無","自力更生","https://patchwiki.biligame.com/images/dongsen/9/97/09tkbzszfnlabu5sxkzb915vomo6xof.png"],["馬星星","♀","元氣","馬","1月31日","嘶嘶","無","做牛做馬","https://patchwiki.biligame.com/images/dongsen/0/06/67uix871ru4edcivfeqijp3emrfi7dg.png"],["希薇亞","♀","大姐姐","袋鼠","5月3日","對耶","無","父母是女兒的鏡子","https://patchwiki.biligame.com/images/dongsen/1/13/s5h7ra9f9cl9c7w2gtqdc8pu0d9np7h.png"],["鋼鎖","♂","暴躁","無尾熊","10月13日","錢錢","無","親兄弟明算賬","https://patchwiki.biligame.com/images/dongsen/c/cf/dmjs3dw9tgo56lbnpgfrb810in5dlsc.png"],["笛笛","♂","悠閒","馬","5月1日","吹捲捲","無","馬耳東風","https://patchwiki.biligame.com/images/dongsen/c/c8/0bdbv5dmy148jwzj6wz7i0dopz7bl23.png"],["聖蘿","♀","元氣","馬","7月11日","走哦","無","未雨綢繆","https://patchwiki.biligame.com/images/dongsen/3/35/4q9luopcjzive7y700cp1y7wxkqhhq6.png"],["縫縫","♀","普通","袋鼠","10月11日","補補","無","溺愛不是真愛","https://patchwiki.biligame.com/images/dongsen/f/f3/ti9k5d68jx41lo7tcwydrssvlc8jx0z.png"],["尤嘉莉","♀","成熟","無尾熊","7月20日","啊啦","無","未審先判","https://patchwiki.biligame.com/images/dongsen/8/87/np28gskvh3c80ecv40jtczapu3dxb3u.png"],["馬譽","♂","自戀","馬","9月16日","不是啦","無","梅花香自苦寒來","https://patchwiki.biligame.com/images/dongsen/e/e6/eppjc6f67k8cs5qubpyj0kw7v049967.png"],["袋鋼","♂","暴躁","袋鼠","4月24日","別裝了","無","有苦就有樂","https://patchwiki.biligame.com/images/dongsen/1/1b/6jp0e69511ua382635cd4iil8p1huhz.png"],["和平","♂","運動","老鼠","7月5日","吱","無","寬以待人易,嚴以律己難","https://patchwiki.biligame.com/images/dongsen/7/73/1y7di93gt1xyon16g2udxbacb76bfg7.png"],["皮猴","♂","暴躁","猴子","12月7日","香蕉","無","偶像演員的猴兒戲","https://patchwiki.biligame.com/images/dongsen/c/c2/ppw0xkl9ix1yut759af7svigv9pmuln.png"],["皇獅","♂","暴躁","獅子","7月23日","聽懂吧","石油王","百獸之王","https://patchwiki.biligame.com/images/dongsen/d/d7/flu90iffdm6h7j6jh16m3oggkn3pfz3.png"],["茜藍","♂","悠閒","老鼠","6月30日","微微","無","一通百通","https://patchwiki.biligame.com/images/dongsen/3/3f/l6masev2ynwhgqiik8nc3muqoxi7uqa.png"],["杜美","♀","普通","老鼠","2月18日","美吧","無","窮要忍,富要省","https://patchwiki.biligame.com/images/dongsen/e/ee/ee9iz1pjbgd4vy0o1a7s5tmyo7pmsp5.png"],["賴恩睿","♂","自戀","獅子","7月29日","正確","無","英雄本色","https://patchwiki.biligame.com/images/dongsen/0/06/mpn3et437nwodgr4fqiyoogsjvitgru.png"],["麥克","♂","暴躁","袋鼠","12月1日","做就對了","無","無差別","https://patchwiki.biligame.com/images/dongsen/0/0e/gutd9fdapglqm349tp2sz76id8g4sun.png"],["阿將","♂","運動","老鼠","8月14日","厲害","無","渴望自由的籠中雀","https://patchwiki.biligame.com/images/dongsen/d/d7/8wh64dtx5i0eewt12a4sqtcn4o1tn4c.png"],["孟琪","♀","成熟","猴子","3月21日","孟孟","無","來者不拒","https://patchwiki.biligame.com/images/dongsen/7/7b/evl4zb8pyitmok5i7lr2h35l0xwop54.png"],["晴天","♂","悠閒","獅子","7月24日","獅獅","無","美好的星期天","https://patchwiki.biligame.com/images/dongsen/6/6d/7bjgpbh8rzm5iev5z0pjmbpu4txqt7l.png"],["阿聘","♂","運動","老鼠","9月13日","可惡","無","窮鼠齧狸","https://patchwiki.biligame.com/images/dongsen/b/b5/ig3bpkwz9ym7krs4bdlkjqs4aal7v4u.png"],["韭菜","♂","暴躁","老鼠","10月17日","非也","無","忍人所不能忍","https://patchwiki.biligame.com/images/dongsen/2/24/7gaw5pv3f0niodgyc694vznx82sljk6.png"],["七七","♀","普通","猴子","8月23日","唔唔","無","第一選擇是香蕉","https://patchwiki.biligame.com/images/dongsen/f/fc/870tidowcze3vja3fpzqo4t4d2ujnuf.png"],["瑪莉亞","♀","普通","袋鼠","5月31日","好唷","無","意氣相投","https://patchwiki.biligame.com/images/dongsen/7/72/8igbn063brd1hmna4rjhmtwszyr6xpm.png"],["甘油","♀","元氣","老鼠","4月13日","滑滑","無","任他泰山壓頂,我自巍然不動","https://patchwiki.biligame.com/images/dongsen/5/5a/jl0p136ll16vbpm9hjisv3pooxhogvu.png"],["天佑","♂","運動","猴子","11月21日","差不多","健身狂魔","山中無老虎猴子稱大王","https://patchwiki.biligame.com/images/dongsen/7/75/65o6boxxh9smu76rb9p3hsqgh8azpw8.png"],["老獅","♂","自戀","獅子","8月14日","上課了","無","因材施教","https://patchwiki.biligame.com/images/dongsen/a/a8/oan43wxd9nxjtobdcttjbd8br708uat.png"],["丸子","♀","普通","老鼠","6月12日","就說吧","無","現在就是最好的時候","https://patchwiki.biligame.com/images/dongsen/0/09/l7wsaw634rfes0dk28p0y3ajx1d6orp.png"],["貝拉","♀","元氣","老鼠","12月28日","嘎哈","無","有理不在聲高","https://patchwiki.biligame.com/images/dongsen/a/ac/ahlsx669hvzhxnios1b21k3orylv1fv.png"],["遠仁","♂","悠閒","猴子","1月19日","猿猿","無","屋漏偏逢連夜雨","https://patchwiki.biligame.com/images/dongsen/d/de/7iinzc4mh7nflcc6axle8fe41mk32mv.png"],["悄俊","♂","暴躁","老鼠","1月17日","躡躡","警官","竊鈎者誅,竊國者侯","https://patchwiki.biligame.com/images/dongsen/c/c6/ko72zjqc754tgnu8jeicwe3v9koloj6.png"],["雪莉","♀","大姐姐","猴子","4月10日","嗚吱吱","無","善始善終","https://patchwiki.biligame.com/images/dongsen/5/58/6ioaexbx5n483jm375o79304nxqvmsm.png"],["李克","♂","運動","獅子","7月10日","哈哈哈","無","勢如破竹","https://patchwiki.biligame.com/images/dongsen/d/d1/h5wtq4bfcz1exkl38sm5g8qqso9mpmt.png"],["西瓜皮","♀","成熟","老鼠","7月7日","說說的","無","華而不實","https://patchwiki.biligame.com/images/dongsen/2/2f/swnl86r4t7m4shwi7j9oczpdu2oenvc.png"],["四月","♀","元氣","猴子","4月2日","哇嗚","無","沐猴而冠,自欺欺猴","https://patchwiki.biligame.com/images/dongsen/d/db/6cwqgm3z7f1qkpr8jxthr3nggdm58pp.png"],["莫敬","♂","運動","獅子","8月8日","男人","無","船到橋頭自然直","https://patchwiki.biligame.com/images/dongsen/1/1f/jw0jnpedfzxo7o65yeqxjjd4wz6k7kw.png"],["羅萱兒","♀","元氣","老鼠","2月24日","可愛","無","隔牆有耳","https://patchwiki.biligame.com/images/dongsen/a/a7/dnuas10v2wcwbelzublkh01tem83ti3.png"],["德里","♂","悠閒","猴子","5月24日","去吧","無","知猴善用","https://patchwiki.biligame.com/images/dongsen/e/e7/lkt0k618jaiud0uunc01hkw0rcs381a.png"],["亞瑟","♂","運動","獅子","8月7日","哪哈","無","水到渠成","https://patchwiki.biligame.com/images/dongsen/2/23/pfwfkhhz6cv0i49y8ispf63daij5eyj.png"],["蒂芬妮","♀","普通","老鷹","3月25日","是呢","無","顧左右而言他","https://patchwiki.biligame.com/images/dongsen/b/b6/4olkj8xwx3dnpiivsj8o5h77knfuuxx.png"],["火鳥","♀","大姐姐","鴕鳥","4月22日","好熱","無","長生不老","https://patchwiki.biligame.com/images/dongsen/c/cd/2m741s6wpa5gu9p5euxtqntogsjuh8i.png"],["果果","♀","成熟","鴕鳥","11月13日","果然","無","顛倒是非,人之常情","https://patchwiki.biligame.com/images/dongsen/1/14/o1bi5ehmjqzb2em69ie8yl5lt8bbbcc.png"],["安谷斯","♂","暴躁","老鷹","2月22日","溜溜","無","是金子總會發光","https://patchwiki.biligame.com/images/dongsen/e/ee/fc41cdvdzsw7ezzqcaz17uv6g01vz5u.png"],["朱祿","♂","悠閒","鴕鳥","9月23日","哎呀呀","無","子孫繁榮","https://patchwiki.biligame.com/images/dongsen/0/08/grwklqd4a2pgijsruj7zda1eqxvlr0d.png"],["起司","♂","自戀","老鼠","12月15日","也是啦","無","每一次相遇都是久別重逢","https://patchwiki.biligame.com/images/dongsen/8/86/ivc4gm2b9c0rnybutp9ddq1gb15qsdw.png"],["歐若拉","♀","普通","企鵝","1月27日","若","無","世間自有溫情在","https://patchwiki.biligame.com/images/dongsen/9/97/gk1iz5nkg7554dcjbygai8hx9or1f27.png"],["阿波羅","♂","暴躁","老鷹","7月4日","唔咿","無","韜光養晦","https://patchwiki.biligame.com/images/dongsen/e/e3/31lebg5sp9fscdk3z34mzr86oebtsrk.png"],["仙仙","♀","普通","鴕鳥","1月15日","千歲","無","步步生花","https://patchwiki.biligame.com/images/dongsen/d/db/4lmlxor5la0tdwdvecu9vl9vsfcu2xz.png"],["浩克","♂","暴躁","老鷹","7月30日","多謝","無","不偷聽他人言","https://patchwiki.biligame.com/images/dongsen/e/e0/j32zlpzdcq1tuigs88egfxi9ct0agcy.png"],["凱恩","♂","自戀","鴕鳥","11月27日","轟隆隆","無","禍從口出","https://patchwiki.biligame.com/images/dongsen/1/19/1coa4egj6wvqtkiit1ghikooq5nmw7i.png"],["張瑜","♂","暴躁","章魚","9月20日","章魚","無","月亮背後暗藏玄機","https://patchwiki.biligame.com/images/dongsen/c/c3/bogw0xegt316vrfhbzz2binuyaxb96g.png"],["企鵝達","♂","運動","企鵝","1月5日","企鵝","無","自私自利","https://patchwiki.biligame.com/images/dongsen/5/55/scif1ak1fwdhtlfb7nl2lsni4gaftv4.png"],["安地斯","♀","成熟","老鷹","11月19日","卡拉卡拉","無","物以類聚","https://patchwiki.biligame.com/images/dongsen/9/9d/2m3gyfjhrpjd3zrshvzwx1jt781z142.png"],["小嵐","♀","普通","鴕鳥","10月21日","鴕鳥","看看海中多姿多彩的魚群","百足之蟲死而不僵","https://patchwiki.biligame.com/images/dongsen/5/54/ox6zvrnwqmkhf9iqguxp11zfa4fhnu1.png"],["銀閣","♂","運動","老鷹","12月11日","呀啊","無","燕雀安知鴻鵠之志","https://patchwiki.biligame.com/images/dongsen/e/e4/3bd68if2sc8wshowwug2o89npcc64vu.png"],["小偲","♀","成熟","鴕鳥","12月21日","是嘛","無","姜還是老的辣","https://patchwiki.biligame.com/images/dongsen/7/73/emotk22s8d2tydzai0ui9pmosrhj3nm.png"],["章立娜","♀","普通","章魚","6月26日","咔","無","化百煉鋼為繞指柔","https://patchwiki.biligame.com/images/dongsen/f/f1/9b7seaokt931ntc4kpwjsmhq4a0r8ve.png"],["羅斯","♂","悠閒","企鵝","1月29日","十字","無","自由散漫","https://patchwiki.biligame.com/images/dongsen/d/da/9601l4myh7juqm2vnu3f6kb4z7pk0dt.png"],["謝博強","♂","運動","老鷹","1月8日","啪沙啪沙","無","雞窩里生出了金鳳凰","https://patchwiki.biligame.com/images/dongsen/c/c4/eu5id2zk5nnpi1cponvyqx8gzih8czg.png"],["鶴茲","♂","運動","鴕鳥","12月1日","機械","無","打鐵趁熱","https://patchwiki.biligame.com/images/dongsen/d/df/bmh96e2zmeax3s1ffnvhd3gg4inte6c.png"],["如意","♀","成熟","老鼠","9月5日","呵呵呵","無","笑口常開,幸福常在","https://patchwiki.biligame.com/images/dongsen/d/df/ft4olv4jfqadzltoi59xx51jl3udxjk.png"],["法蘭克","♂","自戀","老鷹","6月1日","是","無","老鷹不在家,山雀為王","https://patchwiki.biligame.com/images/dongsen/5/5f/k8a53y9nja257aam60ppaqpkif3cuh4.png"],["胡拉拉","♀","元氣","鴕鳥","2月9日","紅鶴","無","當局者迷","https://patchwiki.biligame.com/images/dongsen/7/77/2z5t9yhygcb6aga4408f182b843t4lp.png"],["章丸丸","♂","悠閒","章魚","3月8日","認同","無","買一送一","https://patchwiki.biligame.com/images/dongsen/0/09/lphwha59o6x5smdcpjelmmfavc4shn9.png"],["達滿","♂","暴躁","企鵝","4月6日","“禪”","無","枯榮無常","https://patchwiki.biligame.com/images/dongsen/9/9b/hx2val1g0rbvrgh3cnnrlppkzyg3fyc.png"],["繼光","♂","暴躁","老鷹","12月7日","繼繼","無","謙受益,滿招損","https://patchwiki.biligame.com/images/dongsen/9/91/k1qhth8sh8a7zdj6f1z8nlcnt6p0cq2.png"],["朱莉亞","♀","成熟","鴕鳥","7月31日","吼唷","無","謙受益,滿招損","https://patchwiki.biligame.com/images/dongsen/8/89/pbj278ho6r4vuyczcied2z5711etlzq.png"],["小啾","♀","元氣","老鼠","2月5日","啾啾","無","三思而後行","https://patchwiki.biligame.com/images/dongsen/e/e5/988m0nzr14euy4a67yp5jm2awqr9yfv.png"],["伊比利","♂","運動","豬","4月26日","比利比利","無","天塹變通途","https://patchwiki.biligame.com/images/dongsen/c/c0/cy68m8ev44ou0pwnxol97z185efm32j.png"],["勝利","♂","運動","豬","7月26日","感謝","無","自給自足","https://patchwiki.biligame.com/images/dongsen/2/20/qf20oa4l2yt39uj470p3l9hkjkmkr9q.png"],["謝賓娜","♀","成熟","企鵝","10月16日","滑溜溜","冒險家","國外的月亮也不一定圓","https://patchwiki.biligame.com/images/dongsen/f/fe/mf1s7q6g9u0dhtttzwdqzyoagvl4khq.png"],["仰韶","♀","普通","兔子","3月1日","土俑","無","勿履薄冰","https://patchwiki.biligame.com/images/dongsen/7/75/krizmcsw0syyfl0da665yy2h64xj5fk.png"],["瑪格","♀","普通","豬","9月3日","嗯","無","前方後圓墳","https://patchwiki.biligame.com/images/dongsen/2/26/h2sb45u5rm3u93bjrzjfnb9js7ai73y.png"],["肉肉","♂","悠閒","豬","9月3日","噗","無","山花移來不覺香","https://patchwiki.biligame.com/images/dongsen/4/4b/iosxmq8oodugccuwdh2ju4na4ks5prp.png"],["花壽司","♂","運動","企鵝","11月2日","捲捲","無","活到老學到老","https://patchwiki.biligame.com/images/dongsen/7/71/qnzzn83qvgw44oo37kbgktjwg4yllks.png"],["布蘭妮","♀","成熟","豬","11月14日","討厭啦~","無","五十步笑百步","https://patchwiki.biligame.com/images/dongsen/d/d9/qjk27gnc7tl5hl4yu6sbqldxsmkepoc.png"],["嘟嘟","♀","元氣","豬","7月28日","哇塞","主席","落字為證","https://patchwiki.biligame.com/images/dongsen/a/af/o27p868q3hdhxua7whfyrp8e2zwqdd0.png"],["寶拉","♀","成熟","企鵝","1月23日","唔呼呼","無","找松露全靠豬","https://patchwiki.biligame.com/images/dongsen/e/ec/pp2znp072zvlv2ogiek1m552fgura61.png"],["百川","♂","運動","兔子","11月3日","忍忍","無","不是不報,時候未到","https://patchwiki.biligame.com/images/dongsen/7/78/5p7eo93hwyp55xx9mp5cxaorv1n4afa.png"],["千惠","♀","元氣","豬","5月23日","彈彈","無","不忍之心","https://patchwiki.biligame.com/images/dongsen/b/bd/tp8hsu6ghbpawlaca0dr6kx209hkvky.png"],["博士","♂","運動","豬","10月7日","公畝","無","玉不琢不成器","https://patchwiki.biligame.com/images/dongsen/0/09/363c99jl9nsyn8tkdza1808mfohjh8k.png"],["伏特","♂","自戀","企鵝","10月6日","寶寶","無","知書達理","https://patchwiki.biligame.com/images/dongsen/4/49/ok9r5l58k8dh4jhwu8dbhghca8gtpmq.png"],["古乃欣","♀","大姐姐","豬","4月21日","噗呼呼","無","清涼商務","https://patchwiki.biligame.com/images/dongsen/8/8c/pi1ml6l5423opdr36l5fa0rqund5mz8.png"],["古烈","♂","暴躁","豬","4月7日","萬年","無","混淆黑白","https://patchwiki.biligame.com/images/dongsen/8/8a/dmothrerlmfjpsbcgg1sj8y8bdavq02.png"],["哈奇","♂","悠閒","企鵝","2月21日","候補","無","有其父必有其子","https://patchwiki.biligame.com/images/dongsen/3/3b/8zvcvfw73ru2tm7j2ojiur9madthv0n.png"],["小芽","♀","普通","豬","3月5日","噹啷","無","紅花還須綠葉配","https://patchwiki.biligame.com/images/dongsen/e/ea/q1eil21411kw9jlb6ir6w1r17e7fd5g.png"],["達利","♂","暴躁","豬","11月6日","噗嘻","小提琴家","徒勞無功","https://patchwiki.biligame.com/images/dongsen/6/61/ql02vbtci7ab4hr517r4m0dk6e8jgex.png"],["蕾拉","♀","大姐姐","企鵝","9月2日","這樣唷","無","人生如夢","https://patchwiki.biligame.com/images/dongsen/1/1f/du9y3miwoqbqgcaj2cmpt8vrjbairto.png"],["莉莉安","♀","元氣","兔子","5月9日","好像喔","無","撲克臉","https://patchwiki.biligame.com/images/dongsen/3/3e/4uw8h5r7efsfroiz1fwdfubb3gqxlvd.png"],["阿豬","♂","悠閒","豬","12月30日","懶懶","無","讓心愛的孩子遠行吧","https://patchwiki.biligame.com/images/dongsen/e/e1/bvlhebjvu4srieqmn8rilympp2z9val.png"],["竹輪","♂","悠閒","企鵝","10月30日","所以啦","無","睡得香甜,工作辛苦","https://patchwiki.biligame.com/images/dongsen/1/1e/8301xbo3urk9tch9g6msx6hig6wrrhq.png"],["豚皇","♂","自戀","豬","10月13日","豚","無","先有雞還是先有蛋","https://patchwiki.biligame.com/images/dongsen/1/11/p4yo43embceklejg39wjcao2dflhupm.png"],["冰莎","♀","元氣","企鵝","2月20日","涼爽","無","勝不驕敗不餒","https://patchwiki.biligame.com/images/dongsen/5/51/r4egt0jnu8lxllsxvi70o24uxme25x4.png"],["瑪莎","♀","元氣","兔子","3月14日","啷","無","瑞雪兆豐年","https://patchwiki.biligame.com/images/dongsen/d/d1/ih2tu2bya6cp3b4whqhq2wycrsxnu6e.png"],["露西","♀","普通","豬","6月2日","唷","無","親而有禮","https://patchwiki.biligame.com/images/dongsen/d/d6/r51r1nlkfe734as91v19xf25gg0enk4.png"],["秀益","♂","悠閒","企鵝","2月7日","軋軋","導游","心急吃不了熱豆腐","https://patchwiki.biligame.com/images/dongsen/5/59/i0jmfzci713s9ofwqrg4piif2aw2i0w.png"],["毛海兒","♀","普通","綿羊","4月3日","咩","無","吳越同舟","https://patchwiki.biligame.com/images/dongsen/8/8b/9nmc5pj2daqmr6m6kvxd2hr5zphdbns.png"],["咚比","♂","自戀","兔子","7月10日","無","無","緣分天註定","https://patchwiki.biligame.com/images/dongsen/c/c6/1255403cd6ij684wpn5v8jonw0b1ei0.png"],["阿醋","♂","悠閒","兔子","12月3日","酸酸","無","無","https://patchwiki.biligame.com/images/dongsen/7/7c/4lkhhtbk1dm6dh7mx0zr06jjtist5p8.png"],["草莓","♀","普通","犀牛","3月19日","糖糖","無","人不可貌相","https://patchwiki.biligame.com/images/dongsen/e/ef/77kati0bgxauqxuyu67pwpyjtsm0e2v.png"],["巧蔻","♀","元氣","兔子","1月6日","真的","無","蛋糕吃到飽","https://patchwiki.biligame.com/images/dongsen/2/25/7jzjauc9zfcy88lorf1yuz7mvtftdw0.png"],["大姐頭","♀","成熟","兔子","1月9日","我說呀","無","凡事莫強求","https://patchwiki.biligame.com/images/dongsen/1/13/5azpbdwxoxpz1ljb68lpr08wy4a3gt4.png"],["氈氈","♀","普通","綿羊","4月9日","羊毛","無","面惡心善","https://patchwiki.biligame.com/images/dongsen/7/7b/4fzu1zxj9k2bqx8itjd7hwtl37wvuyv.png"],["阿足","♂","運動","犀牛","5月6日","犀犀","無","100%化纖","https://patchwiki.biligame.com/images/dongsen/6/65/2tazxmv3v4sea1z6vh7dbghw2bnoocd.png"],["法藍琪","♀","成熟","兔子","1月22日","嚕啦啦","無","灰色的腳勝過灰色的屁股","https://patchwiki.biligame.com/images/dongsen/d/d9/n00g59xqa96cfu7kjb085cpj2xocj3o.png"],["柴姐","♀","大姐姐","犀牛","5月28日","超強","無","姐姐不懂妹妹的心","https://patchwiki.biligame.com/images/dongsen/e/e3/c3lbbdzgocb8qssvhixo79zwfmr9xq8.png"],["妙妙","♀","元氣","兔子","3月3日","不妙","無","血氣方剛","https://patchwiki.biligame.com/images/dongsen/b/bc/9vyim332hu5nsf827ptj8opwnrjokr7.png"],["儒林","♂","運動","兔子","1月21日","臣","無","自行前往,就地解散","https://patchwiki.biligame.com/images/dongsen/e/e5/bys6x2eq8pkukt2s3jaaj9eqhxufapk.png"],["夢夢","♀","普通","犀牛","1月24日","嗯噗","無","濯濯如春月柳,軒軒如朝霞舉","https://patchwiki.biligame.com/images/dongsen/e/e1/2y3wxf6fir5k8zxu1ik7hej40ru3el5.png"],["克莉琪","♀","元氣","兔子","8月28日","哩啦啦","無","骰子已經扔出","https://patchwiki.biligame.com/images/dongsen/a/a7/jhciny9gwfym04n74ph0soihjhkb5uw.png"],["猛兔","♂","暴躁","兔子","10月28日","唔賀","無","妹妹不懂姐姐的心","https://patchwiki.biligame.com/images/dongsen/1/17/5aeptqefmdhnn7txpx4hdob27ozbx83.png"],["綿綿","♀","普通","綿羊","4月16日","就這樣呀","無","食物從鬍子掉下來","https://patchwiki.biligame.com/images/dongsen/7/7d/87zyggqsehorpb0evby37v22lsb4k8n.png"],["阿甘","♂","悠閒","兔子","8月10日","就是如此","無","亡羊補牢","https://patchwiki.biligame.com/images/dongsen/4/48/bgxtgs2w76gheg0269u9fp4pr3tx8rn.png"],["月兔","♀","元氣","兔子","12月25日","普通","無","動如脫兔","https://patchwiki.biligame.com/images/dongsen/1/16/ctor1h8rfpfrt78v0ul8ouni7al339l.png"],["阿蹲","♂","暴躁","犀牛","6月17日","混混","成為攝影師","逐二兔者,不得一兔","https://patchwiki.biligame.com/images/dongsen/2/2b/kep0zyjducbpa20y4qxvdtrnw373iky.png"],["風傑","♂","悠閒","兔子","3月11日","風","無","不改初衷","https://patchwiki.biligame.com/images/dongsen/4/48/m5tfdviryiozol7qsv8ji7ddhpon3kd.png"],["珮琪","♀","元氣","兔子","12月16日","琪他","無","君子不立危牆之下","https://patchwiki.biligame.com/images/dongsen/a/a8/1mj4m56aedht79cldybbsbnt0ztrimm.png"],["華爾滋","♀","成熟","綿羊","3月28日","一二三","無","藝術就像金手鐲","https://patchwiki.biligame.com/images/dongsen/2/2d/hy4wi3i6uscn2wcz5v5uq6goczlqz0k.png"],["蜜拉","♀","大姐姐","兔子","7月6日","月球","無","演員無年級","https://patchwiki.biligame.com/images/dongsen/f/f5/46xpeboflx1meoo7q9gy8dbnodr8ff6.png"],["阿飛","♂","悠閒","兔子","3月16日","是啦","無","授人以魚不如授人以漁","https://patchwiki.biligame.com/images/dongsen/b/b8/5poq2lslegj7bwt4lpoyeqfao49lold.png"],["光雄","♂","悠閒","犀牛","3月20日","念念","無","正合我意","https://patchwiki.biligame.com/images/dongsen/4/44/hg3hckbwer9j339rb11moywaj6smy5z.png"],["桑托斯","♂","自戀","兔子","7月24日","朋友","無","殺雞用牛刀","https://patchwiki.biligame.com/images/dongsen/4/4d/5kwnkz7b65lt4r0rm2oc31cvscgff71.png"],["羅塔","♀","元氣","兔子","6月14日","就這樣啦","無","耳朵是裝飾的","https://patchwiki.biligame.com/images/dongsen/5/5c/am40yyinov5mmkclttkyubirkadmquy.png"],["小芹","♀","普通","松鼠","9月4日","啦啦","成為偶像","世界是個大澡堂","https://patchwiki.biligame.com/images/dongsen/3/30/dxppkhuxf3hb0k98ojq5tv7qdypoisz.png"],["瑞奇","♂","悠閒","松鼠","6月3日","是哦","無","緣分是無法解釋的","https://patchwiki.biligame.com/images/dongsen/c/c6/5mgfgi38q1z353mkz2rvc40yioowh6g.png"],["雪花","♀","元氣","綿羊","8月15日","一絲絲","無","童言無忌","https://patchwiki.biligame.com/images/dongsen/8/81/6giwy3r977txgkka02n3rlk3x4gzu1a.png"],["小潤","♂","自戀","松鼠","9月29日","不管怎樣","成為偶像","雨天順延","https://patchwiki.biligame.com/images/dongsen/6/6e/g6cocxxla3629wil6gucwpl6ojtzmt7.png"],["拉拉米","♀","普通","松鼠","6月19日","要是","設計師","一期一會","https://patchwiki.biligame.com/images/dongsen/2/21/3gugjnk28cr8qg8x1uki514uclxz3uw.png"],["彩星","♀","普通","綿羊","12月25日","無","無","熟讀唐詩三百首,不會做詩也會吟","https://patchwiki.biligame.com/images/dongsen/6/68/klaxl8prjk4p3dkly9621q3vzqkjaim.png"],["娜塔麗","♀","成熟","松鼠","11月30日","做得好","無","暫無","https://patchwiki.biligame.com/images/dongsen/4/40/a2ajfmigfx0750e4tboeb956k1i9ies.png"],["雷貝嘉","♀","成熟","松鼠","9月10日","正經","無","世上沒有不透風的牆","https://patchwiki.biligame.com/images/dongsen/4/42/tfcendmm114460krzuncw38g35toxmc.png"],["阿司","♀","成熟","綿羊","10月21日","等啊","無","以畫自省","https://patchwiki.biligame.com/images/dongsen/0/00/l0cf2ywp1xge6fp871oqfclqzy0nz4x.png"],["閃電","♂","暴躁","松鼠","7月9日","閃閃","無","萬綠叢中一點紅","https://patchwiki.biligame.com/images/dongsen/5/51/5qe9feuth9m0juhd3y7xb179dwfvsqn.png"],["茶茶丸","♂","運動","綿羊","3月18日","哇耶","無","多姿多彩的人生","https://patchwiki.biligame.com/images/dongsen/d/d7/orr001b5scgm12acutroxom53ypwy4t.png"],["愛睦","♀","成熟","綿羊","4月2日","愛","無","天真爛漫","https://patchwiki.biligame.com/images/dongsen/3/35/tbbis12vrf1qg8q1poys0030u4b7nc0.png"],["孟珮","♀","普通","松鼠","10月22日","咻","無","100%羊毛","https://patchwiki.biligame.com/images/dongsen/1/14/3oxpxd38p755jomjc4jit9im19tuka0.png"],["咬咬","♀","元氣","松鼠","7月19日","咯吱咯吱","無","莊周夢蝶","https://patchwiki.biligame.com/images/dongsen/9/9a/nhzwz0iex2z2u7zsy46o0xs7xvf5wj9.png"],["溫蒂","♀","大姐姐","綿羊","7月16日","薯薯","無","紅顏薄命","https://patchwiki.biligame.com/images/dongsen/a/a2/7mq0v32x7priwqdbtjod1jokas7pcdy.png"],["小敏","♀","成熟","松鼠","5月2日","喔哼","無","得來速","https://patchwiki.biligame.com/images/dongsen/c/ca/tsp10ljuqsd4kvz943x0dbltz0zip3h.png"],["小桃","♀","元氣","松鼠","6月8日","就是唷","無","色繽紛的世界","https://patchwiki.biligame.com/images/dongsen/8/89/gpzswatfsel82x786vxqz41jyvuhv14.png"],["梅麗諾","♀","成熟","綿羊","11月26日","是的唷","無","花開花落自有時","https://patchwiki.biligame.com/images/dongsen/9/9b/75lfwzz80r5zwdbu8wxotxaidsnkfa6.png"],["軟糖","♀","普通","松鼠","8月5日","甜甜","無","基因是不可戰勝的","https://patchwiki.biligame.com/images/dongsen/c/ca/tin80dfsjanwhjgpg3d19a56rd83dr8.png"],["阿二","♀","元氣","松鼠","3月2日","嘿唷","無","正能量","https://patchwiki.biligame.com/images/dongsen/9/9e/q2zi9f8l8cxhz6ecfo64rlzsqmm5y3b.png"],["彭澎","♀","大姐姐","綿羊","2月14日","辛苦了","無","迅疾如風","https://patchwiki.biligame.com/images/dongsen/d/da/9fzg1ls7g5c3txuxphubiwooxbr4pnc.png"],["嘉治","♂","暴躁","松鼠","9月14日","炯炯","無","人以群分","https://patchwiki.biligame.com/images/dongsen/8/88/faw8dqzaoiwdy5aydcd53reqz91901w.png"],["小影","♀","成熟","松鼠","7月3日","哼哼","無","自己的牙齒比親戚重要","https://patchwiki.biligame.com/images/dongsen/6/6a/22xnhu86ba85vz1sc8a7ejfm7vsyob6.png"],["賈洛斯","♂","暴躁、自戀","綿羊","5月8日","北鼻","無","少女的心與夏日的風","https://patchwiki.biligame.com/images/dongsen/6/6b/da7keq4702or8uryye6gtuvaz8013aa.png"],["克栗斯","♂","運動","松鼠","2月26日","鼓栗鼓栗","無","旁觀者清","https://patchwiki.biligame.com/images/dongsen/b/bc/ekm2yudn1s5612zih4m7wwlu2ius8dq.png"],["賈蘿琳","♀","普通","松鼠","7月15日","你","無","少年壯志","https://patchwiki.biligame.com/images/dongsen/d/da/0ofd7l03sge6meme22rny0g5t4ji3hm.png"],["皮耶羅","♂","自戀","綿羊","4月19日","醜醜","無","支支吾吾","https://patchwiki.biligame.com/images/dongsen/9/97/hu80fyzr8qbhkb20k13iau0rsc6yihf.png"],["穀豐","♂","運動","老虎","8月19日","虎虎","無","宛如小丑","https://patchwiki.biligame.com/images/dongsen/7/7f/jwsyvjwcpppqz3tiql686zchylfww3m.png"],["李可","♂","自戀","狼","12月6日","喔耶","無","全力以赴","https://patchwiki.biligame.com/images/dongsen/e/eb/jcjwvzzmjk45jb9k5birc565es5m8yv.png"],["施傅","♂","暴躁","狼","12月19日","不是嘛","無","黃鼠狼給雞拜年","https://patchwiki.biligame.com/images/dongsen/9/91/g1egdrwvc36wsoyb04qc200964s4vo9.png"],["冰冰","♀","成熟","狼","12月14日","就是說哇","無","他山之石,可以為錯","https://patchwiki.biligame.com/images/dongsen/5/54/hb8mz0w85y37bhihntt2lg2sgoh6uhd.png"],["盧姿","♀","元氣","老虎","8月27日","是喔","動物美容師","香氣襲人","https://patchwiki.biligame.com/images/dongsen/c/c2/b5laxy8ycy0mskwkunh92mb0mie9f9i.png"],["莫妮卡","♀","元氣","狼","8月31日","呀哈","無","反射神經","https://patchwiki.biligame.com/images/dongsen/6/6b/knbp2rll0jrxv0dg852v7vfd526dxxn.png"],["潘奇隆","♂","暴躁","狼","11月5日","不然呢","無","憧憬未來的我","https://patchwiki.biligame.com/images/dongsen/7/7b/gzvtv3f7vwubiyhszmufw8xuyso33jw.png"],["艾栗絲","♀","大姐姐","松鼠","8月30日","當然哦","無","三人成狼","https://patchwiki.biligame.com/images/dongsen/2/2b/56zv4rn61ilgrau9ew8248ofkd6s5o2.png"],["史培亞","♂","暴躁","狼","12月18日","這倒是","無","切忌燥進","https://patchwiki.biligame.com/images/dongsen/1/1a/auyz5rbgrl3lq22lk6032qaw9nsf81x.png"],["阿彪","♂","運動","老虎","5月15日","但是","無","灰色比純黑更好","https://patchwiki.biligame.com/images/dongsen/c/cf/2tycl7qyndgzoz90sxad3rztqaj284p.png"],["羅博","♂","暴躁","狼","11月25日","羅羅","無","術業有專攻","https://patchwiki.biligame.com/images/dongsen/b/b0/6sc4r820h43gljz7rlp92a37qbzbufp.png"],["朱穆朗","♂","暴躁","老虎","8月22日","王","無","畫蛇不必添足","https://patchwiki.biligame.com/images/dongsen/e/ed/ezffzxnypqy04hnnmnj8xaezpgsor29.png"],["范妮沙","♀","成熟","狼","1月26日","喔呵呵","無","前有狼後有虎","https://patchwiki.biligame.com/images/dongsen/f/f6/al2ebe3fm8b9mvrurrxbh3ux2xitl33.png"],["馬麗蓮","♀","成熟","老虎","11月22日","啊哈","無","西裝內里就是這樣","https://patchwiki.biligame.com/images/dongsen/b/b4/hompta8by1y633ydqmp8uldja6mh7bd.png"],["畢安卡","♀","成熟","狼","9月17日","漂亮","無","破鏡重圓","https://patchwiki.biligame.com/images/dongsen/1/1f/0dktb2cyzk4my0h0wrn6k4qzei5fu47.png"],["戈麥斯","♂","暴躁、運動","老虎","8月26日","完全","無","人窮志不窮","https://patchwiki.biligame.com/images/dongsen/b/bc/h937s6xnou6mc9h6ytnx55jsoodda9v.png"],["百合","♀","普通","狼","3月24日","花花","無","熱情風暴","https://patchwiki.biligame.com/images/dongsen/3/38/0yr4p5kk01pxlda7crx34dnmt9siklv.png"],["小雪","♀","元氣","老虎","12月13日","雪豹","無","落花有意,流水無情","https://patchwiki.biligame.com/images/dongsen/7/71/62iqqf2n75p9lu9kofx9rjwyku7bknj.png"],["阿研","♂","悠閒、暴躁","狼","2月17日","咳呵","偶像","月下老人","https://patchwiki.biligame.com/images/dongsen/7/78/jb1yvqgwlfkvbxq7bnh9p2knmd1zd18.png"]]
[ -1 ]
0de0e713b85ebf5ffecdb8b495ea2c29bd5ed1eb
1480b78401d228efe84f8ae8746f7f672d8e90d1
/Sources/App/main.swift
9b211c58f25eba1d523c2966e3c77630cf2479d0
[ "MIT" ]
permissive
tombuildsstuff/vapor-dev-south-coast
79a28b966dc8228d54c7771d01580891a4d85fb5
a9919e3b6ec178391348a50509bdc9afa54c3893
refs/heads/master
2020-06-26T19:50:06.926896
2016-09-08T16:27:20
2016-09-08T16:27:20
67,720,916
0
0
null
null
null
null
UTF-8
Swift
false
false
6,344
swift
import Vapor import HTTP /** Droplets are service containers that make accessing all of Vapor's features easy. Just call `drop.serve()` to serve your application or `drop.client()` to create a client for request data from other servers. */ let drop = Droplet() /** Vapor configuration files are located in the root directory of the project under `/Config`. `.json` files in subfolders of Config override other JSON files based on the current server environment. Read the docs to learn more */ let _ = drop.config["app", "key"]?.string ?? "" /** This first route will return the welcome.html view to any request to the root directory of the website. Views referenced with `app.view` are by default assumed to live in <workDir>/Resources/Views/ You can override the working directory by passing --workDir to the application upon execution. */ drop.get("/") { request in return try drop.view.make("welcome.html") } /** Return JSON requests easy by wrapping any JSON data type (String, Int, Dict, etc) in JSON() and returning it. Types can be made convertible to JSON by conforming to JsonRepresentable. The User model included in this example demonstrates this. By conforming to JsonRepresentable, you can pass the data structure into any JSON data as if it were a native JSON data type. */ drop.get("json") { request in return try JSON(node: [ "number": 123, "string": "test", "array": try JSON(node: [ 0, 1, 2, 3 ]), "dict": try JSON(node: [ "name": "Vapor", "lang": "Swift" ]) ]) } /* Hello Dev South Coast */ drop.get("dev-south-coast") { request in return try JSON(node: [ "hello": "world", "value": request.data["value"]?.string ?? "no value" ]) } /** This route shows how to access request data. POST to this route with either JSON or Form URL-Encoded data with a structure like: { "users" [ { "name": "Test" } ] } You can also access different types of request.data manually: - Query: request.data.query - JSON: request.data.json - Form URL-Encoded: request.data.formEncoded - MultiPart: request.data.multipart */ drop.get("data", Int.self) { request, int in return try JSON(node: [ "int": int, "name": request.data["name"]?.string ?? "no name" ]) } /** Here's an example of using type-safe routing to ensure only requests to "posts/<some-integer>" will be handled. String is the most general and will match any request to "posts/<some-string>". To make your data structure work with type-safe routing, make it StringInitializable. The User model included in this example is StringInitializable. */ drop.get("posts", Int.self) { request, postId in return "Requesting post with ID \(postId)" } /** This will set up the appropriate GET, PUT, and POST routes for basic CRUD operations. Check out the UserController in App/Controllers to see more. Controllers are also type-safe, with their types being defined by which StringInitializable class they choose to receive as parameters to their functions. */ let users = UserController(droplet: drop) drop.resource("users", users) drop.get("leaf") { request in return try drop.view.make("template", [ "greeting": "Hello, world!" ]) } /** A custom validator definining what constitutes a valid name. Here it is defined as an alphanumeric string that is between 5 and 20 characters. */ class Name: ValidationSuite { static func validate(input value: String) throws { let evaluation = OnlyAlphanumeric.self && Count.min(5) && Count.max(20) try evaluation.validate(input: value) } } /** By using `Valid<>` properties, the employee class ensures only valid data will be stored. */ class Employee { var email: Valid<Email> var name: Valid<Name> init(request: Request) throws { email = try request.data["email"].validated() name = try request.data["name"].validated() } } /** Allows any instance of employee to be returned as Json */ extension Employee: JSONRepresentable { func makeJSON() throws -> JSON { return try JSON(node: [ "email": email.value, "name": name.value ]) } } // Temporarily unavailable //drop.any("validation") { request in // return try Employee(request: request) //} /** This simple plaintext response is useful when benchmarking Vapor. */ drop.get("plaintext") { request in return "Hello, World!" } /** Vapor automatically handles setting and retreiving sessions. Simply add data to the session variable and–if the user has cookies enabled–the data will persist with each request. */ drop.get("session") { request in let json = try JSON(node: [ "session.data": "\(request.session)", "request.cookies": "\(request.cookies)", "instructions": "Refresh to see cookie and session get set." ]) var response = try Response(status: .ok, json: json) request.session?["name"] = "Vapor" response.cookies["test"] = "123" return response } /** Add Localization to your app by creating a `Localization` folder in the root of your project. /Localization |- en.json |- es.json |_ default.json The first parameter to `app.localization` is the language code. */ drop.get("localization", String.self) { request, lang in return try JSON(node: [ "title": drop.localization[lang, "welcome", "title"], "body": drop.localization[lang, "welcome", "body"] ]) } /** Middleware is a great place to filter and modifying incoming requests and outgoing responses. Check out the middleware in App/Middleware. You can also add middleware to a single route by calling the routes inside of `app.middleware(MiddlewareType) { app.get() { ... } }` */ drop.middleware.append(SampleMiddleware()) let port = drop.config["app", "port"]?.int ?? 80 // Print what link to visit for default port drop.serve()
[ -1 ]
8223610ba60e26d9692d5ef1214d6dd8f4a0b3e8
1b7252794eeed380a422721c7905e3f2bb78be23
/ExampleMVVM/Domain/Entities/Movie.swift
114a92dafa8af7fb17631e63aaab045ba6202b67
[]
no_license
developersancho/iOS-Clean-Architecture-MVVM
20ddbdbd76f786a06385cf96b410a0f79077c736
6cd4e32b7420ad9dd94dfab03d6fe0a476a8470e
refs/heads/master
2022-04-09T16:40:22.839475
2020-03-26T00:45:08
2020-03-26T00:45:08
null
0
0
null
null
null
null
UTF-8
Swift
false
false
394
swift
// // Movie.swift // ExampleMVVM // // Created by Oleh Kudinov on 01.10.18. // import Foundation typealias MovieId = String struct Movie: Equatable, Identifiable { let id: MovieId let title: String let posterPath: String? let overview: String let releaseDate: Date? } struct MoviesPage: Equatable { let page: Int let totalPages: Int let movies: [Movie] }
[ -1 ]
d7dd2237abf0b0f74a3331b79816d7eacca55b49
3161d4749e5365d77cbb7fb41f39832fc89d81da
/RoyoConsultantVendor/Networking/SocketManager.swift
e5e42c6f0d43a94667733987317352762b4cdf0f
[]
no_license
Icareconnect/IOS
b21730880aebe35f5f49ed25e78559eed0fcd228
7f7dcfa3e696d20dedae30b2e8fb3a53660e6319
refs/heads/main
2023-03-25T18:17:28.450415
2021-03-25T05:32:49
2021-03-25T05:32:49
350,152,204
0
0
null
null
null
null
UTF-8
Swift
false
false
7,375
swift
//// //// SocketManager.swift //// RoyoConsultant //// //// Created by Sandeep Kumar on 20/05/20. //// Copyright © 2020 SandsHellCreations. All rights reserved. //// // import SocketIO enum EventName: String { case sendMessage case messageFromServer case typing case broadcast case acknowledgeMessage case readMessage case deliveredMessage case sendlivelocation } class SocketIOManager { static let shared = SocketIOManager() private let manager = SocketManager.init(socketURL: URL.init(string: BasePath.socketBasePath.rawValue)!, config: [.log(true), .connectParams(["user_id" : "\(/UserPreference.shared.data?.id)"]), .forceNew(true)]) public var didRecieveMessage: ((_ message: Message) -> Void)? public var didRequestCompleted: (() -> Void)? public var didReadMessageByOtherUser: (() -> Void)? public var didDeliveredMessageByOtherUser: (() -> Void)? private var isListening = false public func connect() { let defaultSocket = manager.defaultSocket switch defaultSocket.status { case .disconnected, .notConnected: defaultSocket.connect() case .connected, .connecting: return } isListening ? () : setupListeners() } public func disconnect() { manager.defaultSocket.off(SocketClientEvent.disconnect.rawValue) manager.defaultSocket.off(SocketClientEvent.connect.rawValue) manager.defaultSocket.off(SocketClientEvent.error.rawValue) manager.defaultSocket.off(EventName.sendMessage.rawValue) manager.defaultSocket.off(EventName.messageFromServer.rawValue) manager.defaultSocket.off(EventName.typing.rawValue) manager.defaultSocket.off(EventName.broadcast.rawValue) manager.defaultSocket.off(EventName.acknowledgeMessage.rawValue) manager.defaultSocket.off(EventName.readMessage.rawValue) manager.defaultSocket.off(EventName.deliveredMessage.rawValue) manager.defaultSocket.disconnect() isListening = false } private func setupListeners() { isListening = true manager.defaultSocket.on(SocketClientEvent.disconnect.rawValue) { [weak self] (response, _) in debugPrint("👹👹👹👹👹👹👹👹👹👹 Socket Disconnected: \(response)") self?.disconnect() } manager.defaultSocket.on(SocketClientEvent.connect.rawValue) { (response, _) in debugPrint("😍😍😍😍😍😍😍😍😍😍 Socket Connnected: \(response)") } manager.defaultSocket.on(SocketClientEvent.error.rawValue) { [weak self] (response, socket) in debugPrint("👹👹👹👹👹👹👹👹👹👹 Socket Error: \(response)", socket) self?.disconnect() } manager.defaultSocket.on(EventName.messageFromServer.rawValue) { [weak self] (response, _) in debugPrint("🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦 Chat Message Received: \(response)") guard let messageDict = response.first as? [String : Any] else { return } let model = Message.init(socketResponse: messageDict) self?.deliveredMessage(message: model) self?.didRecieveMessage?(model) if /UIApplication.topVC()?.isKind(of: ChatVC.self) && UIApplication.shared.applicationState == .active { self?.readMessage(message: model) } } manager.defaultSocket.on(EventName.readMessage.rawValue) { [weak self] (response, _) in guard let messageDict = response.first as? [String : Any] else { return } self?.didReadMessageByOtherUser?() debugPrint("😍😍😍😍😍😍😍😍😍😍 Chat Message read by other user: \(messageDict)") } manager.defaultSocket.on(EventName.deliveredMessage.rawValue) { [weak self] (response, _) in guard let messageDict = response.first as? [String : Any] else { return } self?.didDeliveredMessageByOtherUser?() debugPrint("😍😍😍😍😍😍😍😍😍😍 Chat Message delivered to other user: \(messageDict)") } manager.defaultSocket.on(EventName.typing.rawValue) { (response, _) in debugPrint("🤫🤫🤫🤫🤫🤫🤫🤫🤫🤫 Chat User is typing: \(response)") } manager.defaultSocket.on(EventName.acknowledgeMessage.rawValue) { (response, _) in debugPrint("😍😍😍😍😍😍😍😍😍😍 Chat Message Acknowledgement: \(response)") } } func sendMessage(message: Message) { var dict = JSONHelper<Message>().toDictionary(model: message) as? [String : Any] dict?["sentAt"] = Int64(Date().timeIntervalSince1970 * 1000) dict?.removeValue(forKey: "messageId") dict?.removeValue(forKey: "user") manager.defaultSocket.emitWithAck(EventName.sendMessage.rawValue, dict ?? [:]).timingOut(after: 1.0) { [weak self] (response) in let responseDict = (response as? [[String : Any]])?.first if /(responseDict?["status"] as? String) == "REQUEST_COMPLETED" { self?.didRequestCompleted?() } debugPrint("😍😍😍😍😍😍😍😍😍😍 Chat Message sent: \(response)") } } public func readMessage(message: Message?) { let dict = ["messageId" : /message?.messageId, "senderId": /message?.receiverId, "receiverId": /message?.senderId] manager.defaultSocket.emitWithAck(EventName.readMessage.rawValue, dict).timingOut(after: 1.0) { (response) in debugPrint("😍😍😍😍😍😍😍😍😍😍 Chat Message Read from this side: \(response)") } } private func deliveredMessage(message: Message?) { let dict = ["messageId" : /message?.messageId, "senderId": /message?.receiverId, "receiverId": /message?.senderId] manager.defaultSocket.emitWithAck(EventName.deliveredMessage.rawValue, dict).timingOut(after: 1.0) { (response) in debugPrint("😍😍😍😍😍😍😍😍😍😍 Chat Message Delivered from this side: \(response)") } } func sendLocation(request: Requests?) { let loc = LocationManager.shared.locationData let dict = ["request_id" : /request?.id, "lat": "\(/loc.latitude)", "long": "\(/loc.longitude)", "senderId": /request?.to_user?.id, "receiverId": /request?.from_user?.id] as [String : Any] manager.defaultSocket.emitWithAck(EventName.sendlivelocation.rawValue, dict).timingOut(after: 1.0) { (response) in debugPrint("😍😍😍😍😍😍😍😍😍😍 Location sent from this side: \(response)") } } }
[ -1 ]
3f33daf039915047da7b07d9637dd435dda6b745
654996d32b0bdff4cc40433e5d322115f4fad44a
/test/SILGen/objc_ownership_conventions.swift
3315545696a1e7989093a0cd111439326695b1f5
[ "Apache-2.0", "Swift-exception" ]
permissive
Bertug/swift-windows
13713818298c5487bf563ae480cd296c29df9be1
52032518dffb86b664f992369127c96e6fde3ade
refs/heads/stable
2020-07-15T06:07:58.283697
2016-03-31T22:43:25
2016-03-31T22:43:25
56,507,161
1
0
null
2016-04-18T12:46:28
2016-04-18T12:46:28
null
UTF-8
Swift
false
false
10,737
swift
// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s // REQUIRES: objc_interop import gizmo // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions5test3FT_CSo8NSObject func test3() -> NSObject { // initializer returns at +1 return Gizmo() // CHECK: [[CTOR:%[0-9]+]] = function_ref @_TFCSo5GizmoC{{.*}} : $@convention(thin) (@thick Gizmo.Type) -> @owned ImplicitlyUnwrappedOptional<Gizmo> // CHECK-NEXT: [[GIZMO_META:%[0-9]+]] = metatype $@thick Gizmo.Type // CHECK-NEXT: [[GIZMO:%[0-9]+]] = apply [[CTOR]]([[GIZMO_META]]) : $@convention(thin) (@thick Gizmo.Type) -> @owned ImplicitlyUnwrappedOptional<Gizmo> // CHECK: [[GIZMO_NS:%[0-9]+]] = upcast [[GIZMO:%[0-9]+]] : $Gizmo to $NSObject // CHECK: return [[GIZMO_NS]] : $NSObject // CHECK-LABEL: sil shared @_TFCSo5GizmoC{{.*}} : $@convention(thin) (@thick Gizmo.Type) -> @owned ImplicitlyUnwrappedOptional<Gizmo> // alloc is implicitly ns_returns_retained // init is implicitly ns_consumes_self and ns_returns_retained // CHECK: bb0([[GIZMO_META:%[0-9]+]] : $@thick Gizmo.Type): // CHECK-NEXT: [[GIZMO_META_OBJC:%[0-9]+]] = thick_to_objc_metatype [[GIZMO_META]] : $@thick Gizmo.Type to $@objc_metatype Gizmo.Type // CHECK-NEXT: [[GIZMO:%[0-9]+]] = alloc_ref_dynamic [objc] [[GIZMO_META_OBJC]] : $@objc_metatype Gizmo.Type, $Gizmo // CHECK-NEXT: // function_ref // CHECK-NEXT: [[INIT_CTOR:%[0-9]+]] = function_ref @_TTOFCSo5Gizmoc{{.*}} // CHECK-NEXT: [[RESULT:%[0-9]+]] = apply [[INIT_CTOR]]([[GIZMO]]) : $@convention(method) (@owned Gizmo) -> @owned ImplicitlyUnwrappedOptional<Gizmo> // CHECK-NEXT: return [[RESULT]] : $ImplicitlyUnwrappedOptional<Gizmo> } // Normal message send with argument, no transfers. // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions5test5 func test5(g: Gizmo) { var g = g Gizmo.inspect(g) // CHECK: [[CLASS:%.*]] = metatype $@thick Gizmo.Type // CHECK-NEXT: [[METHOD:%.*]] = class_method [volatile] [[CLASS]] : {{.*}}, #Gizmo.inspect!1.foreign // CHECK-NEXT: [[OBJC_CLASS:%[0-9]+]] = thick_to_objc_metatype [[CLASS]] : $@thick Gizmo.Type to $@objc_metatype Gizmo.Type // CHECK: [[V:%.*]] = load // CHECK: strong_retain [[V]] // CHECK: [[G:%.*]] = enum $ImplicitlyUnwrappedOptional<Gizmo>, #ImplicitlyUnwrappedOptional.some!enumelt.1, [[V]] // CHECK-NEXT: apply [[METHOD]]([[G]], [[OBJC_CLASS]]) // CHECK-NEXT: release_value [[G]] } // The argument to consume is __attribute__((ns_consumed)). // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions5test6 func test6(g: Gizmo) { var g = g Gizmo.consume(g) // CHECK: [[CLASS:%.*]] = metatype $@thick Gizmo.Type // CHECK-NEXT: [[METHOD:%.*]] = class_method [volatile] [[CLASS]] : {{.*}}, #Gizmo.consume!1.foreign // CHECK-NEXT: [[OBJC_CLASS:%.*]] = thick_to_objc_metatype [[CLASS]] : $@thick Gizmo.Type to $@objc_metatype Gizmo.Type // CHECK: [[V:%.*]] = load // CHECK: strong_retain [[V]] // CHECK: [[G:%.*]] = enum $ImplicitlyUnwrappedOptional<Gizmo>, #ImplicitlyUnwrappedOptional.some! // CHECK-NEXT: apply [[METHOD]]([[G]], [[OBJC_CLASS]]) // CHECK-NOT: release_value [[G]] } // fork is __attribute__((ns_consumes_self)). // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions5test7 func test7(g: Gizmo) { var g = g g.fork() // CHECK: [[G:%.*]] = load // CHECK-NEXT: retain [[G]] // CHECK-NEXT: [[METHOD:%.*]] = class_method [volatile] [[G]] : {{.*}}, #Gizmo.fork!1.foreign // CHECK-NEXT: apply [[METHOD]]([[G]]) // CHECK-NOT: release [[G]] } // clone is __attribute__((ns_returns_retained)). // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions5test8 func test8(g: Gizmo) -> Gizmo { return g.clone() // CHECK: bb0([[G:%.*]] : $Gizmo): // CHECK-NOT: retain // CHECK: alloc_stack $ImplicitlyUnwrappedOptional<Gizmo> // CHECK-NEXT: [[METHOD:%.*]] = class_method [volatile] [[G]] : {{.*}}, #Gizmo.clone!1.foreign // CHECK-NEXT: [[RESULT:%.*]] = apply [[METHOD]]([[G]]) // CHECK-NEXT: store // CHECK-NEXT: function_ref // CHECK-NEXT: function_ref @_TFs45_stdlib_ImplicitlyUnwrappedOptional_unwrappedurFGSQx_x // CHECK-NEXT: alloc_stack // CHECK-NEXT: apply // CHECK-NEXT: [[RESULT:%.*]] = load // CHECK-NEXT: dealloc_stack // CHECK-NOT: release [[G]] // CHECK-NEXT: dealloc_stack // CHECK-NEXT: release [[G]] // CHECK-NEXT: return [[RESULT]] } // duplicate returns an autoreleased object at +0. // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions5test9 func test9(g: Gizmo) -> Gizmo { return g.duplicate() // CHECK: bb0([[G:%.*]] : $Gizmo): // CHECK-NOT: retain [[G:%0]] // CHECK: alloc_stack // CHECK-NEXT: [[METHOD:%.*]] = class_method [volatile] [[G]] : {{.*}}, #Gizmo.duplicate!1.foreign // CHECK-NEXT: [[RESULT:%.*]] = apply [[METHOD]]([[G]]) // CHECK-NEXT: store [[RESULT]] // CHECK-NEXT: function_ref // CHECK-NEXT: function_ref @_TFs45_stdlib_ImplicitlyUnwrappedOptional_unwrappedurFGSQx_x // CHECK-NEXT: alloc_stack // CHECK-NEXT: apply // CHECK-NEXT: [[RESULT:%.*]] = load // CHECK-NEXT: dealloc_stack // CHECK-NOT: release [[G]] // CHECK-NEXT: dealloc_stack // CHECK-NEXT: release [[G]] // CHECK-NEXT: return [[RESULT]] } // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions6test10 func test10(let g: Gizmo) -> AnyClass { // CHECK: bb0([[G:%[0-9]+]] : $Gizmo): // CHECK: strong_retain [[G]] // CHECK-NEXT: [[NS_G:%[0-9]+]] = upcast [[G:%[0-9]+]] : $Gizmo to $NSObject // CHECK-NEXT: [[GETTER:%[0-9]+]] = class_method [volatile] [[NS_G]] : $NSObject, #NSObject.classProp!getter.1.foreign : NSObject -> () -> AnyObject.Type! , $@convention(objc_method) (NSObject) -> ImplicitlyUnwrappedOptional<@objc_metatype AnyObject.Type> // CHECK-NEXT: [[OPT_OBJC:%.*]] = apply [[GETTER]]([[NS_G]]) : $@convention(objc_method) (NSObject) -> ImplicitlyUnwrappedOptional<@objc_metatype AnyObject.Type> // CHECK: select_enum [[OPT_OBJC]] // CHECK: [[OBJC:%.*]] = unchecked_enum_data [[OPT_OBJC]] // CHECK-NEXT: [[THICK:%.*]] = objc_to_thick_metatype [[OBJC]] // CHECK: [[T0:%.*]] = enum $ImplicitlyUnwrappedOptional<AnyObject.Type>, #ImplicitlyUnwrappedOptional.some!enumelt.1, [[THICK]] // CHECK: [[T0:%.*]] = function_ref @_TFs45_stdlib_ImplicitlyUnwrappedOptional_unwrappedurFGSQx_x // CHECK: apply [[T0]]<AnyObject.Type>([[THICK_BUF:%[0-9]*]], {{.*}}) // CHECK-NEXT: [[RES:%.*]] = load [[THICK_BUF]] // CHECK: strong_release [[G]] : $Gizmo // CHECK: strong_release [[G]] : $Gizmo // CHECK-NEXT: return [[RES]] : $@thick AnyObject.Type return g.classProp } // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions6test11 func test11(let g: Gizmo) -> AnyClass { // CHECK: bb0([[G:%[0-9]+]] : $Gizmo): // CHECK: strong_retain [[G]] // CHECK: [[NS_G:%[0-9]+]] = upcast [[G:%[0-9]+]] : $Gizmo to $NSObject // CHECK: [[GETTER:%[0-9]+]] = class_method [volatile] [[NS_G]] : $NSObject, #NSObject.qualifiedClassProp!getter.1.foreign : NSObject -> () -> AnyObject.Type! , $@convention(objc_method) (NSObject) -> ImplicitlyUnwrappedOptional<@objc_metatype AnyObject.Type> // CHECK-NEXT: [[OPT_OBJC:%.*]] = apply [[GETTER]]([[NS_G]]) : $@convention(objc_method) (NSObject) -> ImplicitlyUnwrappedOptional<@objc_metatype AnyObject.Type> // CHECK: select_enum [[OPT_OBJC]] // CHECK: [[OBJC:%.*]] = unchecked_enum_data [[OPT_OBJC]] // CHECK-NEXT: [[THICK:%.*]] = objc_to_thick_metatype [[OBJC]] // CHECK: [[T0:%.*]] = enum $ImplicitlyUnwrappedOptional<AnyObject.Type>, #ImplicitlyUnwrappedOptional.some!enumelt.1, [[THICK]] // CHECK: [[T0:%.*]] = function_ref @_TFs45_stdlib_ImplicitlyUnwrappedOptional_unwrappedurFGSQx_x // CHECK: apply [[T0]]<AnyObject.Type>([[THICK_BUF:%[0-9]*]], {{.*}}) // CHECK-NEXT: [[RES:%.*]] = load [[THICK_BUF]] // CHECK: strong_release [[G]] : $Gizmo // CHECK: strong_release [[G]] : $Gizmo // CHECK-NEXT: return [[RES]] : $@thick AnyObject.Type return g.qualifiedClassProp } // ObjC blocks should have cdecl calling convention and follow C/ObjC // ownership conventions, where the callee, arguments, and return are all +0. // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions10applyBlock func applyBlock(f: @convention(block) Gizmo -> Gizmo, x: Gizmo) -> Gizmo { // CHECK: bb0([[BLOCK:%.*]] : $@convention(block) (Gizmo) -> @autoreleased Gizmo, [[ARG:%.*]] : $Gizmo): // CHECK: [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]] // CHECK: strong_retain [[BLOCK_COPY]] // CHECK: [[RESULT:%.*]] = apply [[BLOCK_COPY]]([[ARG]]) // CHECK: strong_release [[BLOCK_COPY]] // CHECK: strong_release [[ARG]] // CHECK: strong_release [[BLOCK_COPY]] // CHECK: strong_release [[BLOCK]] // CHECK: return [[RESULT]] return f(x) } // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions15maybeApplyBlock func maybeApplyBlock(f: (@convention(block) Gizmo -> Gizmo)?, x: Gizmo) -> Gizmo? { // CHECK: bb0([[BLOCK:%.*]] : $Optional<@convention(block) Gizmo -> Gizmo>, [[ARG:%.*]] : $Gizmo): // CHECK: [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]] return f?(x) } func useInnerPointer(p: UnsafeMutablePointer<Void>) {} // Handle inner-pointer methods by autoreleasing self after the call. // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions18innerPointerMethod // CHECK: [[USE:%.*]] = function_ref @_TF26objc_ownership_conventions15useInnerPointer // CHECK: [[METHOD:%.*]] = class_method [volatile] %0 : $Gizmo, #Gizmo.getBytes!1.foreign : Gizmo -> () -> UnsafeMutablePointer<()> , $@convention(objc_method) (Gizmo) -> @unowned_inner_pointer UnsafeMutablePointer<()> // CHECK: strong_retain %0 // CHECK: [[PTR:%.*]] = apply [[METHOD]](%0) // CHECK: autorelease_value %0 // CHECK: apply [[USE]]([[PTR]]) // CHECK: strong_release %0 func innerPointerMethod(g: Gizmo) { useInnerPointer(g.getBytes()) } // CHECK-LABEL: sil hidden @_TF26objc_ownership_conventions20innerPointerProperty // CHECK: [[USE:%.*]] = function_ref @_TF26objc_ownership_conventions15useInnerPointer // CHECK: [[METHOD:%.*]] = class_method [volatile] %0 : $Gizmo, #Gizmo.innerProperty!getter.1.foreign : Gizmo -> () -> UnsafeMutablePointer<()> , $@convention(objc_method) (Gizmo) -> @unowned_inner_pointer UnsafeMutablePointer<()> // CHECK: strong_retain %0 // CHECK: [[PTR:%.*]] = apply [[METHOD]](%0) // CHECK: autorelease_value %0 // CHECK: apply [[USE]]([[PTR]]) // CHECK: strong_release %0 func innerPointerProperty(g: Gizmo) { useInnerPointer(g.innerProperty) }
[ 72615, 85571, 90343 ]
94aba2546f5b84036165af390aab5b15f1339240
2eb2b3f46ceeefe42ffefb24e94ee19d3e7b5d2a
/Fructus/App/ContentView.swift
4090457bc8a219a13140ea31a34ce59ce7df2362
[]
no_license
Mixorok/Fructus-SwiftUI2.0
bef40f073c36adf062fce54d6a9ed581654e1caf
faad9aaa8b374c34bd80ea8c9d432e62a32a300e
refs/heads/main
2023-05-03T11:20:39.265691
2021-05-16T13:28:51
2021-05-16T13:28:51
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,303
swift
// // ContentView.swift // Fructus // // Created by Максим on 14.05.2021. // import SwiftUI struct ContentView: View { //MARK: - Properies @State private var isShowingSettings: Bool = false var fruits: [Fruit] = fruitsData //MARK: - Body var body: some View { NavigationView { List{ ForEach(fruits.shuffled()) { item in NavigationLink( destination: FruitDetailView(fruit: item)){ FruitRowView(fruit: item) .padding(.vertical, 4) } } } .navigationTitle("Fruits") .navigationBarItems(trailing: Button(action: {isShowingSettings = true}, label: { Image(systemName: "slider.horizontal.3") }))//:Button .sheet(isPresented: $isShowingSettings){ SettingsView() } }//: Navigation .navigationViewStyle(StackNavigationViewStyle()) } } //MARK: - Preview struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView(fruits: fruitsData) } }
[ 376769, 358692, 358671 ]
a80a5c3314927632d976ac0aed2e20247790d3b4
3863817114db8d214081595596125d4eb44d3f7e
/VTune/Controller/Main/DesignSliderProgress.swift
24ab51ac03273565f6ae4e45cfc72b8ce1f55245
[]
no_license
enjelhutasoit/musicable
8720a90405718d4e08d68320286367746b08b27b
81c6132c69648aaceec8c861e29083fd071cbd18
refs/heads/master
2021-10-28T18:47:52.275382
2020-01-23T07:18:58
2020-01-23T07:18:58
235,083,991
8
0
null
null
null
null
UTF-8
Swift
false
false
351
swift
// // DesignSliderProgress.swift // VTune // // Created by Nova Arisma on 11/7/19. // Copyright © 2019 Jasmine Hanifa Mounir. All rights reserved. // import UIKit @IBDesignable class DesignSliderProgress: UISlider { @IBInspectable var thumbImage: UIImage? {didSet { setThumbImage(thumbImage, for: .normal) } } }
[ -1 ]
3dfd65b8ef816fc79a3ad1dc10c1e6d515245275
c3a9b3bdca7b1dd21a129458eab84186192d39f3
/test/SILOptimizer/noimplicitcopy_trivial.swift
6b44bc109e5d2ef5a0637fb47451581dca629ff6
[ "Apache-2.0", "Swift-exception" ]
permissive
atrick/swift
f4dc13565bfe736d6389bd50680a89f645a3e63f
721f59f46fb5d97a8db1e4a8e33beba0331aa93a
refs/heads/main
2023-08-17T13:54:02.612066
2023-08-04T16:41:50
2023-08-04T16:41:50
260,790,848
5
2
Apache-2.0
2022-03-23T19:02:34
2020-05-02T23:04:48
null
UTF-8
Swift
false
false
36,529
swift
// RUN: %target-swift-frontend -sil-verify-all -enable-experimental-move-only -verify %s -parse-stdlib -emit-sil import Swift public struct Trivial { var value: Int } var boolValue: Bool { return true } public func trivialUseMoveOnlyWithoutEscaping(_ x: Trivial) { } public func trivialSimpleChainTest(_ x: Trivial) { @_noImplicitCopy let x2 = x let y2 = x2 let k2 = y2 trivialUseMoveOnlyWithoutEscaping(k2) } public func trivialSimpleChainTestArg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y2 = x2 // expected-note {{consumed here}} let k2 = y2 trivialUseMoveOnlyWithoutEscaping(k2) } public func trivialSimpleChainTestOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { let y2 = x2 let k2 = y2 trivialUseMoveOnlyWithoutEscaping(k2) } public func trivialMultipleNonConsumingUseTest(_ x: Trivial) { @_noImplicitCopy let x2 = x trivialUseMoveOnlyWithoutEscaping(x2) trivialUseMoveOnlyWithoutEscaping(x2) print(x2) } public func trivialMultipleNonConsumingUseTestArg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} trivialUseMoveOnlyWithoutEscaping(x2) trivialUseMoveOnlyWithoutEscaping(x2) print(x2) // expected-note {{consumed here}} } public func trivialMultipleNonConsumingUseTestOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { trivialUseMoveOnlyWithoutEscaping(x2) trivialUseMoveOnlyWithoutEscaping(x2) print(x2) } public func trivialUseAfterConsume(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let z = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed here}} let _ = y let _ = z print(x2) // expected-note @-1 {{consumed again here}} } public func trivialUseAfterConsumeArg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y = x2 // expected-note {{consumed here}} let z = x2 // expected-note {{consumed here}} let _ = y let _ = z print(x2) // expected-note {{consumed here}} } public func trivialUseAfterConsumeOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let z = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed here}} let _ = y let _ = z print(x2) // expected-note @-1 {{consumed again here}} } public func trivialDoubleConsume(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let z = x2 // expected-note {{consumed again here}} let _ = y let _ = z } public func trivialDoubleConsumeArg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y = x2 // expected-note {{consumed here}} let z = x2 // expected-note {{consumed here}} let _ = y let _ = z } public func trivialDoubleConsumeOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let z = x2 // expected-note {{consumed again here}} let _ = y let _ = z } public func trivialLoopConsume(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed in loop here}} let _ = y } } public func trivialLoopConsumeArg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed here}} let _ = y } } public func trivialLoopConsumeOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed in loop here}} let _ = y } } public func trivialDiamond(_ x: Trivial) { @_noImplicitCopy let x2 = x if boolValue { let y = x2 let _ = y } else { let z = x2 let _ = z } } public func trivialDiamondArg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let z = x2 // expected-note {{consumed here}} let _ = z } } public func trivialDiamondOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { if boolValue { let y = x2 let _ = y } else { let z = x2 let _ = z } } public func trivialDiamondInLoop(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} // expected-error @-1 {{'x2' consumed in a loop}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let z = x2 // expected-note {{consumed in loop here}} // expected-note @-1 {{consumed again here}} let _ = z } } } public func trivialDiamondInLoopArg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let z = x2 // expected-note {{consumed here}} let _ = z } } } public func trivialDiamondInLoopOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed in a loop}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let z = x2 // expected-note {{consumed in loop here}} // expected-note @-1 {{consumed again here}} let _ = z } } } public func trivialAssignToVar1(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} var x3 = x2 // expected-note {{consumed here}} x3 = x2 // expected-note {{consumed again here}} x3 = x print(x3) } public func trivialAssignToVar1Arg(_ x: Trivial, @_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} var x3 = x2 // expected-note {{consumed here}} x3 = x2 // expected-note {{consumed here}} x3 = x print(x3) } public func trivialAssignToVar1OwnedArg(_ x: Trivial, @_noImplicitCopy _ x2: __owned Trivial) { // expected-error {{'x2' consumed more than once}} var x3 = x2 // expected-note {{consumed here}} x3 = x2 // expected-note {{consumed again here}} x3 = x print(x3) } public func trivialAssignToVar2(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} var x3 = x2 // expected-note {{consumed here}} x3 = x2 // expected-note {{consumed again here}} trivialUseMoveOnlyWithoutEscaping(x3) } public func trivialAssignToVar2Arg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} var x3 = x2 // expected-note {{consumed here}} x3 = x2 // expected-note {{consumed here}} trivialUseMoveOnlyWithoutEscaping(x3) } public func trivialAssignToVar2OwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { // expected-error {{'x2' consumed more than once}} var x3 = x2 // expected-note {{consumed here}} x3 = x2 // expected-note {{consumed again here}} trivialUseMoveOnlyWithoutEscaping(x3) } public func trivialAssignToVar3(_ x: Trivial) { @_noImplicitCopy let x2 = x var x3 = x2 x3 = x print(x3) } public func trivialAssignToVar3Arg(_ x: Trivial, @_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} var x3 = x2 // expected-note {{consumed here}} x3 = x print(x3) } public func trivialAssignToVar3OwnedArg(_ x: Trivial, @_noImplicitCopy _ x2: __owned Trivial) { var x3 = x2 x3 = x print(x3) } public func trivialAssignToVar4(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} let x3 = x2 // expected-note {{consumed here}} print(x2) // expected-note {{consumed again here}} print(x3) } public func trivialAssignToVar4Arg(@_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} let x3 = x2 // expected-note {{consumed here}} print(x2) // expected-note {{consumed here}} print(x3) } public func trivialAssignToVar4OwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { // expected-error {{'x2' consumed more than once}} let x3 = x2 // expected-note {{consumed here}} print(x2) // expected-note {{consumed again here}} print(x3) } public func trivialAssignToVar5(_ x: Trivial) { @_noImplicitCopy let x2 = x // expected-error {{'x2' used after consume}} var x3 = x2 // expected-note {{consumed here}} trivialUseMoveOnlyWithoutEscaping(x2) // expected-note {{used here}} x3 = x print(x3) } public func trivialAssignToVar5Arg(_ x: Trivial, @_noImplicitCopy _ x2: Trivial) { // expected-error {{'x2' is borrowed and cannot be consumed}} var x3 = x2 // expected-note {{consumed here}} trivialUseMoveOnlyWithoutEscaping(x2) x3 = x print(x3) } public func trivialAssignToVar5OwnedArg(_ x: Trivial, @_noImplicitCopy _ x2: __owned Trivial) { // expected-error {{'x2' used after consume}} var x3 = x2 // expected-note {{consumed here}} trivialUseMoveOnlyWithoutEscaping(x2) // expected-note {{used here}} x3 = x print(x3) } public func trivialAccessField(_ x: Trivial) { @_noImplicitCopy let x2 = x print(x2.value) for _ in 0..<1024 { print(x2.value) } } public func trivialAccessFieldArg(@_noImplicitCopy _ x2: Trivial) { print(x2.value) for _ in 0..<1024 { print(x2.value) } } public func trivialAccessFieldOwnedArg(@_noImplicitCopy _ x2: __owned Trivial) { print(x2.value) for _ in 0..<1024 { print(x2.value) } } ////////////////////// // Aggregate Struct // ////////////////////// public struct AggStruct { var lhs: Trivial var center: Builtin.Int32 var rhs: Trivial } public func aggStructUseMoveOnlyWithoutEscaping(_ x: AggStruct) { } public func aggStructConsume(_ x: __owned AggStruct) { } public func aggStructSimpleChainTest(_ x: AggStruct) { @_noImplicitCopy let x2 = x let y2 = x2 let k2 = y2 aggStructUseMoveOnlyWithoutEscaping(k2) } public func aggStructSimpleChainTestArg(@_noImplicitCopy _ x2: AggStruct) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y2 = x2 // expected-note {{consumed here}} let k2 = y2 aggStructUseMoveOnlyWithoutEscaping(k2) } public func aggStructSimpleChainTestOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { let y2 = x2 let k2 = y2 aggStructUseMoveOnlyWithoutEscaping(k2) } public func aggStructSimpleNonConsumingUseTest(_ x: AggStruct) { @_noImplicitCopy let x2 = x aggStructUseMoveOnlyWithoutEscaping(x2) } public func aggStructSimpleNonConsumingUseTestArg(@_noImplicitCopy _ x2: AggStruct) { aggStructUseMoveOnlyWithoutEscaping(x2) } public func aggStructSimpleNonConsumingUseTestOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { aggStructUseMoveOnlyWithoutEscaping(x2) } public func aggStructMultipleNonConsumingUseTest(_ x: AggStruct) { @_noImplicitCopy let x2 = x aggStructUseMoveOnlyWithoutEscaping(x2) aggStructUseMoveOnlyWithoutEscaping(x2) print(x2) } public func aggStructMultipleNonConsumingUseTestArg(@_noImplicitCopy _ x2: AggStruct) { // expected-error {{'x2' is borrowed and cannot be consumed}} aggStructUseMoveOnlyWithoutEscaping(x2) aggStructUseMoveOnlyWithoutEscaping(x2) print(x2) // expected-note {{consumed here}} } public func aggStructMultipleNonConsumingUseTestOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { aggStructUseMoveOnlyWithoutEscaping(x2) aggStructUseMoveOnlyWithoutEscaping(x2) print(x2) } public func aggStructUseAfterConsume(_ x: AggStruct) { @_noImplicitCopy let x2 = x // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed here}} let _ = z print(x2) // expected-note {{consumed again here}} } public func aggStructUseAfterConsumeArg(@_noImplicitCopy _ x2: AggStruct) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed here}} let _ = z print(x2) // expected-note {{consumed here}} } public func aggStructUseAfterConsumeOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed here}} let _ = z print(x2) // expected-note {{consumed again here}} } public func aggStructDoubleConsume(_ x: AggStruct) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} let _ = z } public func aggStructDoubleConsumeArg(@_noImplicitCopy _ x2: AggStruct) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed here}} let _ = z } public func aggStructDoubleConsumeOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} let _ = z } public func aggStructLoopConsume(_ x: AggStruct) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed in loop here}} let _ = y } } public func aggStructLoopConsumeArg(@_noImplicitCopy _ x2: AggStruct) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed here}} let _ = y } } public func aggStructLoopConsumeOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed in loop here}} let _ = y } } public func aggStructDiamond(_ x: AggStruct) { @_noImplicitCopy let x2 = x if boolValue { let y = x2 let _ = y } else { let y = x2 let _ = y } } public func aggStructDiamondArg(@_noImplicitCopy _ x2: AggStruct) { // expected-error {{'x2' is borrowed and cannot be consumed}} if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let y = x2 // expected-note {{consumed here}} let _ = y } } public func aggStructDiamondOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { if boolValue { let y = x2 let _ = y } else { let y = x2 let _ = y } } public func aggStructDiamondInLoop(_ x: AggStruct) { @_noImplicitCopy let x2 = x // expected-error @-1 {{'x2' consumed in a loop}} // expected-error @-2 {{'x2' consumed more than once}} // expected-error @-3 {{'x2' consumed more than once}} // expected-error @-4 {{'x2' consumed more than once}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y aggStructConsume(x2) // expected-note {{consumed here}} // expected-note @-1 {{consumed again here}} } else { let y = x2 // expected-note {{consumed here}} // expected-note @-1 {{consumed again here}} let _ = y aggStructConsume(x2) // expected-note {{consumed again here}} // expected-note @-1 {{consumed in loop here}} } } } public func aggStructDiamondInLoopArg(@_noImplicitCopy _ x2: AggStruct) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y aggStructConsume(x2) // expected-note {{consumed here}} } else { let y = x2 // expected-note {{consumed here}} let _ = y aggStructConsume(x2) // expected-note {{consumed here}} } } } public func aggStructDiamondInLoopOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} // expected-error @-3 {{'x2' consumed more than once}} // expected-error @-4 {{'x2' consumed in a loop}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y aggStructConsume(x2) // expected-note @-1 {{consumed here}} // expected-note @-2 {{consumed again here}} } else { let y = x2 // expected-note @-1 {{consumed here}} // expected-note @-2 {{consumed again here}} let _ = y aggStructConsume(x2) // expected-note @-1 {{consumed in loop here}} // expected-note @-2 {{consumed again here}} } } } public func aggStructAccessField(_ x: AggStruct) { @_noImplicitCopy let x2 = x print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } public func aggStructAccessFieldArg(@_noImplicitCopy _ x2: AggStruct) { print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } public func aggStructAccessFieldOwnedArg(@_noImplicitCopy _ x2: __owned AggStruct) { print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } ////////////////////////////// // Aggregate Generic Struct // ////////////////////////////// public struct AggGenericStruct<T> { var lhs: Trivial var rhs: Builtin.RawPointer } public func aggGenericStructUseMoveOnlyWithoutEscaping(_ x: AggGenericStruct<Trivial>) { } public func aggGenericStructConsume(_ x: __owned AggGenericStruct<Trivial>) { } public func aggGenericStructSimpleChainTest(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x let y2 = x2 let k2 = y2 aggGenericStructUseMoveOnlyWithoutEscaping(k2) } public func aggGenericStructSimpleChainTestArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y2 = x2 // expected-note {{consumed here}} let k2 = y2 aggGenericStructUseMoveOnlyWithoutEscaping(k2) } public func aggGenericStructSimpleChainTestOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { let y2 = x2 let k2 = y2 aggGenericStructUseMoveOnlyWithoutEscaping(k2) } public func aggGenericStructSimpleNonConsumingUseTest(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x aggGenericStructUseMoveOnlyWithoutEscaping(x2) } public func aggGenericStructSimpleNonConsumingUseTestArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { aggGenericStructUseMoveOnlyWithoutEscaping(x2) } public func aggGenericStructSimpleNonConsumingUseTestOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { aggGenericStructUseMoveOnlyWithoutEscaping(x2) } public func aggGenericStructMultipleNonConsumingUseTest(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x aggGenericStructUseMoveOnlyWithoutEscaping(x2) aggGenericStructUseMoveOnlyWithoutEscaping(x2) print(x2) } public func aggGenericStructMultipleNonConsumingUseTestArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { // expected-error {{'x2' is borrowed and cannot be consumed}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) aggGenericStructUseMoveOnlyWithoutEscaping(x2) print(x2) // expected-note {{consumed here}} } public func aggGenericStructMultipleNonConsumingUseTestOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { aggGenericStructUseMoveOnlyWithoutEscaping(x2) aggGenericStructUseMoveOnlyWithoutEscaping(x2) print(x2) } public func aggGenericStructUseAfterConsume(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed here}} // expected-note @-1 {{consumed again here}} print(x2) // expected-note @-1 {{consumed again here}} } public func aggGenericStructUseAfterConsumeArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { // expected-error {{'x2' is borrowed and cannot be consumed}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed here}} print(x2) // expected-note {{consumed here}} } public func aggGenericStructUseAfterConsumeOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed here}} // expected-note @-1 {{consumed again here}} print(x2) // expected-note @-1 {{consumed again here}} } public func aggGenericStructDoubleConsume(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} let _ = z } public func aggGenericStructDoubleConsumeArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed here}} let _ = z } public func aggGenericStructDoubleConsumeOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} let _ = z } public func aggGenericStructLoopConsume(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed in loop here}} let _ = y } } public func aggGenericStructLoopConsumeArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed here}} let _ = y } } public func aggGenericStructLoopConsumeOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let y = x2 // expected-note {{consumed in loop here}} let _ = y } } public func aggGenericStructDiamond(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed again here}} } else { let z = x2 let _ = z } } public func aggGenericStructDiamondArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { // expected-error {{'x2' is borrowed and cannot be consumed}} if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed here}} } else { let z = x2 // expected-note {{consumed here}} let _ = z } } public func aggGenericStructDiamondOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { // expected-error @-1 {{'x2' consumed more than once}} if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed again here}} } else { let z = x2 let _ = z } } public func aggGenericStructDiamondInLoop(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} // expected-error @-1 {{'x2' consumed in a loop}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let y = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed in loop here}} let _ = y } } } public func aggGenericStructDiamondInLoopArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let y = x2 // expected-note {{consumed here}} let _ = y } } } public func aggGenericStructDiamondInLoopOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed in a loop}} for _ in 0..<1024 { if boolValue { let y = x2 // expected-note {{consumed here}} let _ = y } else { let y = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed in loop here}} let _ = y } } } public func aggGenericStructAccessField(_ x: AggGenericStruct<Trivial>) { @_noImplicitCopy let x2 = x print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } public func aggGenericStructAccessFieldArg(@_noImplicitCopy _ x2: AggGenericStruct<Trivial>) { print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } public func aggGenericStructAccessFieldOwnedArg(@_noImplicitCopy _ x2: __owned AggGenericStruct<Trivial>) { print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } //////////////////////////////////////////////////////////// // Aggregate Generic Struct + Generic But Body is Trivial // //////////////////////////////////////////////////////////// public func aggGenericStructUseMoveOnlyWithoutEscaping<T>(_ x: AggGenericStruct<T>) { } public func aggGenericStructConsume<T>(_ x: __owned AggGenericStruct<T>) { } public func aggGenericStructSimpleChainTest<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x let y2 = x2 let k2 = y2 aggGenericStructUseMoveOnlyWithoutEscaping(k2) } public func aggGenericStructSimpleChainTestArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y2 = x2 // expected-note {{consumed here}} let k2 = y2 aggGenericStructUseMoveOnlyWithoutEscaping(k2) } public func aggGenericStructSimpleChainTestOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { let y2 = x2 let k2 = y2 aggGenericStructUseMoveOnlyWithoutEscaping(k2) } public func aggGenericStructSimpleNonConsumingUseTest<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x aggGenericStructUseMoveOnlyWithoutEscaping(x2) } public func aggGenericStructSimpleNonConsumingUseTestArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { aggGenericStructUseMoveOnlyWithoutEscaping(x2) } public func aggGenericStructSimpleNonConsumingUseTestOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { aggGenericStructUseMoveOnlyWithoutEscaping(x2) } public func aggGenericStructMultipleNonConsumingUseTest<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x aggGenericStructUseMoveOnlyWithoutEscaping(x2) aggGenericStructUseMoveOnlyWithoutEscaping(x2) print(x2) } public func aggGenericStructMultipleNonConsumingUseTestArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { // expected-error {{'x2' is borrowed and cannot be consumed}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) aggGenericStructUseMoveOnlyWithoutEscaping(x2) print(x2) // expected-note {{consumed here}} } public func aggGenericStructMultipleNonConsumingUseTestOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { aggGenericStructUseMoveOnlyWithoutEscaping(x2) aggGenericStructUseMoveOnlyWithoutEscaping(x2) print(x2) } public func aggGenericStructUseAfterConsume<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x // expected-error @-1 {{'x2' used after consume}} // expected-error @-2 {{'x2' consumed more than once}} // expected-error @-3 {{'x2' consumed more than once}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed here}} // expected-note @-1 {{consumed again here}} print(x2) // expected-note {{consumed here}} // expected-note @-1 {{consumed again here}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) // expected-note @-1 {{used here}} } public func aggGenericStructUseAfterConsumeArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { // expected-error {{'x2' is borrowed and cannot be consumed}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed here}} print(x2) // expected-note {{consumed here}} } public func aggGenericStructUseAfterConsumeOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed more than once}} aggGenericStructUseMoveOnlyWithoutEscaping(x2) let y = x2 // expected-note {{consumed here}} let _ = y aggGenericStructConsume(x2) // expected-note {{consumed again here}} // expected-note @-1 {{consumed here}} print(x2) // expected-note {{consumed again here}} } public func aggGenericStructDoubleConsume<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} let _ = z } public func aggGenericStructDoubleConsumeArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { // expected-error {{'x2' is borrowed and cannot be consumed}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed here}} let _ = z } public func aggGenericStructDoubleConsumeOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { // expected-error {{'x2' consumed more than once}} let y = x2 // expected-note {{consumed here}} let _ = y let z = x2 // expected-note {{consumed again here}} let _ = z } public func aggGenericStructLoopConsume<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let z = x2 // expected-note {{consumed in loop here}} let _ = z } } public func aggGenericStructLoopConsumeArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { let z = x2 // expected-note {{consumed here}} let _ = z } } public func aggGenericStructLoopConsumeOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { // expected-error {{'x2' consumed in a loop}} for _ in 0..<1024 { let z = x2 // expected-note {{consumed in loop here}} let _ = z } } public func aggGenericStructDiamond<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x if boolValue { let z = x2 let _ = z } else { let z = x2 let _ = z } } public func aggGenericStructDiamondArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { // expected-error {{'x2' is borrowed and cannot be consumed}} if boolValue { let z = x2 // expected-note {{consumed here}} let _ = z } else { let z = x2 // expected-note {{consumed here}} let _ = z } } public func aggGenericStructDiamondOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { if boolValue { let z = x2 let _ = z } else { let z = x2 let _ = z } } public func aggGenericStructDiamondInLoop<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x // expected-error {{'x2' consumed more than once}} // expected-error @-1 {{'x2' consumed in a loop}} for _ in 0..<1024 { if boolValue { let z = x2 // expected-note {{consumed here}} let _ = z } else { let y = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed in loop here}} let _ = y } } } public func aggGenericStructDiamondInLoopArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { // expected-error {{'x2' is borrowed and cannot be consumed}} for _ in 0..<1024 { if boolValue { let z = x2 // expected-note {{consumed here}} let _ = z } else { let y = x2 // expected-note {{consumed here}} let _ = y } } } public func aggGenericStructDiamondInLoopOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { // expected-error @-1 {{'x2' consumed more than once}} // expected-error @-2 {{'x2' consumed in a loop}} for _ in 0..<1024 { if boolValue { let z = x2 // expected-note {{consumed here}} let _ = z } else { let y = x2 // expected-note {{consumed again here}} // expected-note @-1 {{consumed in loop here}} let _ = y } } } public func aggGenericStructAccessField<T>(_ x: AggGenericStruct<T>) { @_noImplicitCopy let x2 = x print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } public func aggGenericStructAccessFieldArg<T>(@_noImplicitCopy _ x2: AggGenericStruct<T>) { print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } public func aggGenericStructAccessFieldOwnedArg<T>(@_noImplicitCopy _ x2: __owned AggGenericStruct<T>) { print(x2.lhs) for _ in 0..<1024 { print(x2.lhs) } } /////////////////// // Return Values // /////////////////// public func noImplicitCopyArgReturn(@_noImplicitCopy _ x: Trivial) -> Trivial { // expected-error {{'x' is borrowed and cannot be consumed}} return x // expected-note {{consumed here}} } public func noImplicitCopyArgReturnWithAssign(@_noImplicitCopy _ x: Trivial) -> Trivial { // expected-error {{'x' is borrowed and cannot be consumed}} let y = x // expected-note {{consumed here}} print(y) return x // expected-note {{consumed here}} } public func noImplicitCopyReturn(_ x: Int) -> Int { @_noImplicitCopy let y = x return y } public func noImplicitCopyReturnUse(_ x: Int) -> Int { @_noImplicitCopy let y = x // expected-error {{'y' consumed more than once}} let z = y // expected-note {{consumed here}} let _ = z return y // expected-note {{consumed again here}} }
[ -1 ]
7e4b67001e0969c2e13b21aeee2ed75fba2cb4a5
a7fcf99a43619ee13fae35701df6dd6586769404
/DouBanMovie/DouBanMovieUITests/DouBanMovieUITests.swift
1b7a809e6f9e11c5c8f4e974548bec47e937bd48
[ "MIT" ]
permissive
iJudson/DouBanMovie
8b0628aa4bca5c0a71341d06d5f2c304fe8c5dca
cd03c5b410ea83c1c970fcd2bde230d9b5feb0cf
refs/heads/master
2020-12-02T17:40:25.327976
2017-09-03T09:36:10
2017-09-03T09:36:10
96,407,926
0
0
null
null
null
null
UTF-8
Swift
false
false
1,253
swift
// // DouBanMovieUITests.swift // DouBanMovieUITests // // Created by 陈恩湖 on 2017/9/3. // Copyright © 2017年 Judson. All rights reserved. // import XCTest class DouBanMovieUITests: 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, 243720, 282634, 313356, 155665, 305173, 241695, 223269, 229414, 315431, 292901, 315433, 354342, 325675, 102441, 354346, 124974, 282671, 278571, 229425, 313388, 243763, 321589, 241717, 229431, 180279, 213051, 288829, 325695, 286787, 288835, 307269, 237638, 313415, 239689, 233548, 315468, 311373, 196687, 278607, 311377, 354386, 315477, 223317, 354394, 323678, 315488, 321632, 45154, 315489, 280676, 313446, 215144, 227432, 217194, 194667, 233578, 278637, 307306, 319599, 288878, 278642, 284789, 131190, 249976, 288890, 292987, 215165, 131199, 227459, 194692, 278669, 241809, 323730, 278676, 311447, 153752, 327834, 284827, 329884, 299166, 233635, 215204, 311459, 284840, 299176, 278698, 284843, 184489, 278703, 323761, 184498, 278707, 125108, 180409, 280761, 278713, 295099, 227517, 299197, 280767, 223418, 299202, 139459, 309443, 176325, 131270, 301255, 227525, 280779, 233678, 282832, 321744, 227536, 301270, 301271, 280792, 356575, 311520, 325857, 280803, 182503, 338151, 319719, 307431, 295147, 317676, 286957, 125166, 125170, 313595, 125180, 184574, 125184, 309504, 125192, 125197, 125200, 194832, 227601, 325904, 125204, 319764, 278805, 334104, 315674, 282908, 311582, 125215, 299294, 282912, 233761, 278817, 211239, 282920, 125225, 317738, 325930, 311596, 315698, 98611, 125236, 307514, 282938, 168251, 278843, 287040, 319812, 311622, 227655, 280903, 319816, 323914, 282959, 229716, 289109, 379224, 323934, 391521, 239973, 285031, 313703, 416103, 280938, 242027, 242028, 321901, 278895, 354672, 287089, 227702, 315769, 291194, 291193, 248188, 139641, 313726, 211327, 291200, 311679, 223611, 158087, 313736, 227721, 242059, 285074, 240020, 190870, 315798, 190872, 291225, 285083, 293275, 317851, 242079, 283039, 285089, 227743, 293281, 305572, 156069, 289185, 301482, 289195, 311723, 377265, 338359, 299449, 311739, 319931, 293309, 278974, 311744, 317889, 291266, 278979, 278988, 289229, 281038, 326093, 278992, 283089, 373196, 281039, 279000, 242138, 176602, 285152, 369121, 291297, 160224, 195044, 279009, 242150, 279014, 319976, 279017, 311787, 281071, 319986, 236020, 279030, 311800, 279033, 317949, 279042, 283138, 233987, 287237, 377352, 322057, 309770, 342537, 279053, 182802, 303635, 283154, 279061, 303634, 279060, 279066, 188954, 322077, 291359, 227881, 293420, 289328, 283185, 236080, 279092, 23093, 234037, 244279, 244280, 338491, 234044, 301635, 309831, 55880, 303693, 281165, 301647, 281170, 326229, 309847, 189016, 287319, 111197, 295518, 242274, 244326, 279143, 279150, 281200, 287345, 313970, 287348, 301688, 189054, 287359, 291455, 297600, 303743, 301702, 164487, 279176, 311944, 316044, 311948, 184974, 311950, 316048, 311953, 336531, 287379, 227991, 295575, 289435, 303772, 221853, 205469, 285348, 314020, 279207, 295591, 248494, 318127, 293552, 295598, 285362, 279215, 287412, 166581, 285360, 154295, 342705, 299698, 287418, 314043, 303802, 66243, 291529, 287434, 225996, 363212, 287438, 242385, 303826, 279253, 158424, 230105, 299737, 322269, 342757, 310731, 289511, 230120, 330473, 234216, 285419, 330476, 289517, 279278, 170735, 312046, 125683, 230133, 199415, 234233, 242428, 279293, 205566, 322302, 299777, 228099, 285443, 291591, 295688, 346889, 285450, 322312, 312076, 285457, 295698, 166677, 283418, 285467, 221980, 234276, 283431, 262952, 262953, 279337, 318247, 318251, 262957, 289580, 164655, 328495, 301872, 242481, 303921, 285493, 230198, 285496, 301883, 201534, 281407, 289599, 222017, 295745, 293702, 318279, 283466, 281426, 279379, 295769, 201562, 281434, 322396, 230238, 275294, 301919, 293729, 279393, 349025, 281444, 303973, 230239, 177002, 308075, 242542, 310132, 295797, 201590, 207735, 228214, 177018, 269179, 279418, 308093, 314240, 291713, 158594, 330627, 240517, 287623, 299912, 416649, 279434, 236427, 316299, 228232, 320394, 189327, 308111, 308113, 293780, 310166, 289691, 209820, 277404, 240543, 283551, 310177, 289699, 189349, 293673, 289704, 279465, 177074, 304050, 289720, 289723, 189373, 213956, 281541, 345030, 19398, 213961, 326602, 279499, 56270, 191445, 183254, 304086, 183258, 234469, 340967, 304104, 314343, 324587, 183276, 289773, 203758, 320495, 234476, 320492, 287730, 277493, 240631, 320504, 214009, 234499, 293894, 230411, 322571, 320526, 330766, 234513, 238611, 140311, 293911, 238617, 197658, 330789, 248871, 113710, 189487, 281647, 322609, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 160834, 336962, 314437, 349254, 238663, 300109, 207954, 205911, 296023, 314458, 277600, 281698, 281699, 230500, 285795, 322664, 228457, 318571, 279659, 234606, 300145, 238706, 312435, 187508, 230514, 279666, 302202, 285819, 285823, 150656, 234626, 279686, 222344, 285833, 318602, 285834, 234635, 337037, 228492, 162962, 187539, 308375, 324761, 285850, 296091, 302239, 330912, 300192, 306339, 234662, 300200, 249003, 208044, 238764, 322733, 302251, 3243, 279729, 294069, 300215, 294075, 339131, 228541, 64699, 283841, 148674, 283846, 312519, 279752, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 279775, 304352, 298209, 304353, 310496, 279780, 228587, 279789, 290030, 302319, 251124, 234741, 283894, 279803, 208123, 292092, 228608, 320769, 234756, 322826, 242955, 312588, 318732, 126229, 245018, 320795, 318746, 320802, 304422, 130344, 292145, 298290, 345398, 300342, 159033, 286012, 181568, 279872, 279874, 294210, 216387, 286019, 300354, 300355, 193858, 304457, 345418, 230730, 372039, 296269, 234830, 224591, 238928, 222542, 296274, 314708, 318804, 283990, 314711, 357720, 300378, 300379, 316764, 294236, 314721, 292194, 230757, 281958, 314727, 134504, 306541, 314734, 284015, 234864, 327023, 316786, 296304, 314740, 230772, 314742, 327030, 314745, 290170, 310650, 224637, 306558, 290176, 243073, 179586, 306561, 294278, 296328, 296330, 298378, 318860, 368012, 279955, 306580, 224662, 234902, 282008, 318876, 282013, 290206, 148899, 314788, 314790, 282023, 333224, 298406, 241067, 279980, 314797, 279979, 286128, 173492, 279988, 284086, 284090, 302523, 310714, 228796, 54719, 415170, 292291, 302530, 280003, 228804, 310725, 300488, 306630, 306634, 339403, 280011, 302539, 370122, 310735, 300490, 312785, 327122, 222674, 280020, 280025, 310747, 239069, 144862, 286176, 320997, 310758, 187877, 280042, 280043, 300526, 337391, 282097, 308722, 296434, 306678, 40439, 191991, 288248, 286201, 300539, 288252, 312830, 290304, 286208, 228868, 292359, 218632, 230922, 302602, 323083, 294413, 329231, 304655, 323088, 282132, 230933, 302613, 282135, 316951, 374297, 302620, 313338, 282147, 306730, 312879, 230960, 288305, 239159, 290359, 323132, 157246, 288322, 280131, 349764, 310853, 124486, 194118, 288328, 286281, 292426, 282182, 224848, 224852, 290391, 196184, 239192, 306777, 128600, 235096, 212574, 99937, 204386, 323171, 345697, 300645, 282214, 300643, 312937, 204394, 224874, 243306, 312941, 206447, 310896, 294517, 288377, 290425, 325246, 235136, 280193, 282244, 239238, 288391, 323208, 286344, 282248, 179853, 286351, 188049, 239251, 229011, 280217, 323226, 179868, 229021, 302751, 282272, 198304, 245413, 282279, 298664, 212649, 298666, 317102, 286387, 300725, 337590, 286392, 302778, 306875, 280252, 296636, 282302, 280253, 286400, 323265, 280259, 333508, 282309, 296649, 239305, 306891, 280266, 302798, 9935, 241360, 282321, 333522, 286419, 313042, 241366, 280279, 282330, 18139, 280285, 294621, 282336, 325345, 321250, 294629, 153318, 333543, 12009, 282347, 282349, 323315, 67316, 286457, 284410, 288508, 200444, 282366, 286463, 319232, 278273, 288515, 280326, 282375, 323335, 284425, 300810, 282379, 116491, 280333, 216844, 284430, 300812, 161553, 124691, 278292, 118549, 278294, 282390, 116502, 284436, 325403, 321308, 282399, 241440, 282401, 186148, 186149, 315172, 241447, 294699, 286507, 284460, 280367, 300849, 282418, 280373, 282424, 280377, 321338, 413500, 280381, 345918, 241471, 282428, 280386, 325444, 280391, 325449, 315209, 159563, 280396, 307024, 337746, 317268, 325460, 307030, 237397, 18263, 241494, 188250, 284508, 300893, 307038, 237411, 284515, 276326, 282471, 296807, 292713, 282476, 292719, 296815, 313204, 317305, 124795, 339840, 182145, 315265, 280451, 325508, 333700, 243590, 282503, 67464, 327556, 188293, 325514, 243592, 305032, 315272, 184207, 124816, 315275, 279218, 282517, 294806, 214936, 337816, 294808, 329627, 239515, 214943, 298912, 319393, 294820, 219046, 333734, 294824, 298921, 284584, 313257, 292783, 126896, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 24531, 231382, 329696, 323554, 190437, 292838, 294887, 317416, 313322, 278507, 329707, 298987, 296942, 311277, 124912, 327666, 278515, 325620, 239610 ]
e3f5a286ab31e2a592f10a04572d6d6edca7cf72
4552c6c04d52e2c45f26c8e11018e5144dc18112
/Tests/Get/VersionGraphTests.swift
7c08717e11739b5479abdf91ce562b4b655cb88c
[ "Swift-exception", "Apache-2.0" ]
permissive
hu19891110/swift-package-manager
0ef58c3a29c02e6193a0a2bf098c989e0fde3c87
ac7bfcf638cf461280f1b6aa582f36f0a00ce3b2
refs/heads/master
2021-01-21T15:43:58.581790
2016-07-12T00:21:16
2016-07-12T00:21:16
null
0
0
null
null
null
null
UTF-8
Swift
false
false
14,923
swift
/* This source file is part of the Swift.org open source project Copyright 2015 - 2016 Apple Inc. and the Swift project authors Licensed under Apache License v2.0 with Runtime Library Exception See http://swift.org/LICENSE.txt for license information See http://swift.org/CONTRIBUTORS.txt for Swift project authors */ @testable import struct PackageDescription.Version @testable import Get import XCTest class VersionGraphTests: XCTestCase { func testNoGraph() { class MockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1]) default: fatalError() } } } let rv: [MockCheckout] = try! MockFetcher().recursivelyFetch([(MockProject.A.url, v1..<v1.successor())]) XCTAssertEqual(rv, [ MockCheckout(.A, v1) ]) } func testOneDependency() { class MockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.B.url, v1..<v1.successor())) case .B: return MockCheckout(.B, [v1]) default: fatalError() } } } let rv: [MockCheckout] = try! MockFetcher().recursivelyFetch([(MockProject.A.url, v1..<v1.successor())]) XCTAssertEqual(rv, [ MockCheckout(.B, v1), MockCheckout(.A, v1), ]) } func testOneDepenencyWithMultipleAvailableVersions() { class MockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.B.url, v1..<v2)) case .B: return MockCheckout(.B, [v1, v199, v2, "3.0.0"]) default: fatalError() } } } let rv: [MockCheckout] = try! MockFetcher().recursivelyFetch([(MockProject.A.url, v1..<v1.successor())]) XCTAssertEqual(rv, [ MockCheckout(.B, v199), MockCheckout(.A, v1), ]) } func testTwoDependencies() { class MockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.B.url, v1..<v1.successor())) case .B: return MockCheckout(.B, [v1], (MockProject.C.url, v1..<v1.successor())) case .C: return MockCheckout(.C, [v1]) default: fatalError() } } } let rv: [MockCheckout] = try! MockFetcher().recursivelyFetch([(MockProject.A.url, v1..<v1.successor())]) XCTAssertEqual(rv, [ MockCheckout(.C, v1), MockCheckout(.B, v1), MockCheckout(.A, v1) ]) } func testTwoDirectDependencies() { class MockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.B.url, v1..<v1.successor()), (MockProject.C.url, v1..<v1.successor())) case .B: return MockCheckout(.B, [v1]) case .C: return MockCheckout(.C, [v1]) default: fatalError() } } } let rv: [MockCheckout] = try! MockFetcher().recursivelyFetch([(MockProject.A.url, v1..<v1.successor())]) XCTAssertEqual(rv, [ MockCheckout(.B, v1), MockCheckout(.C, v1), MockCheckout(.A, v1) ]) } func testTwoDirectDependenciesWhereOneAlsoDependsOnTheOther() { class MockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.B.url, v1..<v1.successor()), (MockProject.C.url, v1..<v1.successor())) case .B: return MockCheckout(.B, [v1], (MockProject.C.url, v1..<v1.successor())) case .C: return MockCheckout(.C, [v1]) default: fatalError() } } } let rv: [MockCheckout] = try! MockFetcher().recursivelyFetch([(MockProject.A.url, v1..<v1.successor())]) XCTAssertEqual(rv, [ MockCheckout(.C, v1), MockCheckout(.B, v1), MockCheckout(.A, v1) ]) } func testSimpleVersionRestrictedGraph() { class MockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.C.url, v123..<v2)) case .B: return MockCheckout(.B, [v2], (MockProject.C.url, v123..<v126.successor())) case .C: return MockCheckout(.C, [v126]) default: fatalError() } } } let rv: [MockCheckout] = try! MockFetcher().recursivelyFetch([ (MockProject.A.url, v1..<v1.successor()), (MockProject.B.url, v2..<v2.successor()) ]) XCTAssertEqual(rv, [ MockCheckout(.C, v126), MockCheckout(.A, v1), MockCheckout(.B, v2) ]) } func testComplexVersionRestrictedGraph() { class MyMockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.C.url, Version(1,2,3)..<v2), (MockProject.D.url, v126..<v2.successor()), (MockProject.B.url, v1..<v2.successor())) case .B: return MockCheckout(.B, [v2], (MockProject.C.url, Version(1,2,3)..<v126.successor()), (MockProject.E.url, v2..<v2.successor())) case .C: return MockCheckout(.C, [v126], (MockProject.D.url, v2..<v2.successor()), (MockProject.E.url, v1..<Version(2,1,0))) case .D: return MockCheckout(.D, [v2], (MockProject.F.url, v1..<v2)) case .E: return MockCheckout(.E, [v2], (MockProject.F.url, v1..<v1.successor())) case .F: return MockCheckout(.F, [v1]) } } } let rv: [MockCheckout] = try! MyMockFetcher().recursivelyFetch([ (MockProject.A.url, v1..<v1.successor()), ]) XCTAssertEqual(rv, [ MockCheckout(.F, v1), MockCheckout(.D, v2), MockCheckout(.E, v2), MockCheckout(.C, v126), MockCheckout(.B, v2), MockCheckout(.A, v1) ]) } func testVersionConstrain() { let r1 = Version(1,2,3)..<Version(1,2,5).successor() let r2 = Version(1,2,6)..<Version(1,2,6).successor() let r3 = Version(1,2,4)..<Version(1,2,4).successor() XCTAssertNil(r1.constrain(to: r2)) XCTAssertNotNil(r1.constrain(to: r3)) let r4 = Version(2,0,0)..<Version(2,0,0).successor() let r5 = Version(1,2,6)..<Version(2,0,0).successor() XCTAssertNotNil(r4.constrain(to: r5)) let r6 = Version(1,2,3)..<Version(1,2,3).successor() XCTAssertEqual(r6.constrain(to: r6), r6) } func testTwoDependenciesRequireMutuallyExclusiveVersionsOfTheSameDependency_Simple() { class MyMockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.C.url, Version(1,2,3)..<v2)) case .B: return MockCheckout(.B, [v1], (MockProject.C.url, v2..<v2.successor())) // this is outside the above bounds case .C: return MockCheckout(.C, ["1.2.3", "1.9.9", "2.0.1"]) default: fatalError() } } } var invalidGraph = false do { _ = try MyMockFetcher().recursivelyFetch([ (MockProject.A.url, Version.maxRange), (MockProject.B.url, Version.maxRange) ]) } catch Error.invalidDependencyGraph(let url) { invalidGraph = true XCTAssertEqual(url, MockProject.C.url) } catch { XCTFail() } XCTAssertTrue(invalidGraph) } func testTwoDependenciesRequireMutuallyExclusiveVersionsOfTheSameDependency_Complex() { class MyMockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { switch MockProject(rawValue: url)! { case .A: return MockCheckout(.A, [v1], (MockProject.C.url, Version(1,2,3)..<v2), (MockProject.D.url, v126..<v2.successor()), (MockProject.B.url, v1..<v2.successor())) case .B: return MockCheckout(.B, [v2], (MockProject.C.url, Version(1,2,3)..<v126.successor()), (MockProject.E.url, v2..<v2.successor())) case .C: return MockCheckout(.C, ["1.2.4"], (MockProject.D.url, v2..<v2.successor()), (MockProject.E.url, v1..<Version(2,1,0))) case .D: return MockCheckout(.D, [v2], (MockProject.F.url, v1..<v2)) case .E: return MockCheckout(.E, ["2.0.1"], (MockProject.F.url, v2..<v2.successor())) case .F: return MockCheckout(.F, [v2]) } } } var invalidGraph = false do { _ = try MyMockFetcher().recursivelyFetch([ (MockProject.A.url, v1..<v1.successor()), ]) } catch Error.invalidDependencyGraphMissingTag(let url, _, _) { XCTAssertEqual(url, MockProject.F.url) invalidGraph = true } catch { XCTFail() } XCTAssertTrue(invalidGraph) } func testVersionUnavailable() { class MyMockFetcher: _MockFetcher { override func fetch(url: String) throws -> Fetchable { return MockCheckout(.A, [v2]) } } var success = false do { _ = try MyMockFetcher().recursivelyFetch([(MockProject.A.url, v1..<v2)]) } catch Error.invalidDependencyGraphMissingTag { success = true } catch { XCTFail() } XCTAssertTrue(success) } // // func testGetRequiresUpdateToAlreadyInstalledPackage() { // class MyMockFetcher: MockFetcher { // override func specsForCheckout(_ checkout: MockCheckout) -> [(String, Range<Version>)] { // switch checkout.project { // case .A: return [(MockProject.C.url, Version(1,2,3)..<v2), (MockProject.D.url, v126..<v2.successor()), (MockProject.B.url, v1..<v2.successor())] // case .B: return [(MockProject.C.url, Version(1,2,3)..<v126.successor()), (MockProject.E.url, v2..<v2.successor())] // case .C: return [(MockProject.D.url, v2..<v2.successor()), (MockProject.E.url, v1..<Version(2,1,0))] // case .D: return [(MockProject.F.url, v1..<v2)] // case .E: return [(MockProject.F.url, v2..<v2.successor())] // case .F: return [] // } // } // } // // } static var allTests = [ ("testNoGraph", testNoGraph), ("testOneDependency", testOneDependency), ("testOneDepenencyWithMultipleAvailableVersions", testOneDepenencyWithMultipleAvailableVersions), ("testOneDepenencyWithMultipleAvailableVersions", testOneDepenencyWithMultipleAvailableVersions), ("testTwoDependencies", testTwoDependencies), ("testTwoDirectDependencies", testTwoDirectDependencies), ("testTwoDirectDependenciesWhereOneAlsoDependsOnTheOther", testTwoDirectDependenciesWhereOneAlsoDependsOnTheOther), ("testSimpleVersionRestrictedGraph", testSimpleVersionRestrictedGraph), ("testComplexVersionRestrictedGraph", testComplexVersionRestrictedGraph), ("testVersionConstrain", testVersionConstrain), ("testTwoDependenciesRequireMutuallyExclusiveVersionsOfTheSameDependency_Simple", testTwoDependenciesRequireMutuallyExclusiveVersionsOfTheSameDependency_Simple), ("testTwoDependenciesRequireMutuallyExclusiveVersionsOfTheSameDependency_Complex", testTwoDependenciesRequireMutuallyExclusiveVersionsOfTheSameDependency_Complex), ("testVersionUnavailable", testVersionUnavailable) ] } ///////////////////////////////////////////////////////////////// private private let v1 = Version(1,0,0) private let v2 = Version(2,0,0) private let v123 = Version(1,2,3) private let v126 = Version(1,2,6) private let v199 = Version(1,9,9) private enum MockProject: String { case A case B case C case D case E case F var url: String { return rawValue } } private class MockCheckout: Equatable, CustomStringConvertible, Fetchable { let project: MockProject let children: [(String, Range<Version>)] var availableVersions: [Version] var _version: Version? init(_ project: MockProject, _ availableVersions: [Version], _ dependencies: (String, Range<Version>)...) { self.availableVersions = availableVersions self.project = project self.children = dependencies } init(_ project: MockProject, _ version: Version) { self._version = version self.project = project self.children = [] self.availableVersions = [] } var description: String { return "\(project)\(version)" } func constrain(to versionRange: Range<Version>) -> Version? { return availableVersions.filter{ versionRange ~= $0 }.last } var version: Version { return _version! } func setVersion(_ newValue: Version) throws { _version = newValue } } private func ==(lhs: MockCheckout, rhs: MockCheckout) -> Bool { return lhs.project == rhs.project && lhs.version == rhs.version } private class _MockFetcher: Fetcher { typealias T = MockCheckout func find(url: String) throws -> Fetchable? { return nil } func finalize(_ fetchable: Fetchable) throws -> MockCheckout { return fetchable as! T } func fetch(url: String) throws -> Fetchable { fatalError("This must be implemented in each test") } }
[ -1 ]
75dd62add20d146756013ea44fb54ad334acff40
f5cbe15c02ec3deb342deed437effa1bb86e505f
/Nutracker/Nutracker/SettingsViewController.swift
d861439a4b5fe71a759417e1c94e44ffec1786e3
[]
no_license
markpet/NuTracker
204827be93e3b41839d5c037f7ada5823100af0e
2e8644e15671b23eeb72e8d470e03e5a54aa4c76
refs/heads/master
2020-03-31T09:45:06.230557
2018-10-25T15:41:04
2018-10-25T15:41:04
152,109,305
0
0
null
null
null
null
UTF-8
Swift
false
false
171
swift
// // SettingsViewController.swift // Nutracker // // Created by Mark Peters on 10/23/18. // Copyright © 2018 Mark Peters. All rights reserved. // import Foundation
[ -1 ]
5fe24f98ec444789a860ee70861488d8ff0499b6
cb73fcae1d1dc335e9e9f1dcbd5eba21c91eda36
/LANARS/Model/Worker.swift
38b85f1ce6cca8bbeab29c1ec0f386b7f34dfb96
[]
no_license
sashkoZ/testApp
325733f9a75df885888e904d37ddfa7b31b88a53
db80adcf540059b3aa6dfba50f178af667d47c03
refs/heads/master
2023-03-10T22:50:01.152921
2021-03-01T22:47:03
2021-03-01T22:47:03
343,403,170
0
0
null
null
null
null
UTF-8
Swift
false
false
202
swift
// // File.swift // LANARS // // Created by sashko on 27.02.2021. // import Foundation import RealmSwift class Worker: Object { @objc dynamic var name = "" @objc dynamic var salary = 0.0 }
[ -1 ]
63cfae376c457f9698a710a711754c72adf326bf
7a753e835a949320257a06e52335e014c233e581
/UnderdogDevs/AppDelegate.swift
1cde95666f37aabab75ed672c0a3e6ef3010189a
[ "MIT" ]
permissive
clc80/unit_testing
3b4744992c6416903ff7acfa323e4910a9be6780
3708852e4f52b019c3afc6aa0fd86da5fed28c7d
refs/heads/main
2023-02-03T22:51:14.151772
2020-12-17T01:55:39
2020-12-17T01:55:39
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,357
swift
// // AppDelegate.swift // UnderdogDevs // // Created by Fernando Olivares on 12/15/20. // 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, 164028, 327871, 180416, 377036, 180431, 377046, 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, 262507, 246123, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 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, 164538, 328378, 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, 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, 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, 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, 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, 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, 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, 396328, 158761, 199728, 396336, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 412764, 339036, 257120, 265320, 248951, 420984, 330889, 347287, 339097, 248985, 44197, 380070, 339112, 249014, 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, 175486, 249214, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 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, 266453, 225493, 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, 332117, 348502, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 389502, 250238, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 160234, 127471, 340472, 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, 324472, 398201, 119674, 324475, 430972, 340861, 324478, 340858, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 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, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 210719, 358191, 210739, 366387, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 399215, 358255, 268143, 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, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 350467, 325891, 350475, 375053, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 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, 383536, 358961, 334384, 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, 342874, 326490, 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, 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, 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 ]
a726a3a6b7d3870eb0c0b915bacfad223f1ff04a
127025fc0cf3c4092d948a08138d0c31ca334561
/Dota 2 Directories/Features/Detail Heroes/DetailHeroesViewController.swift
9c358ea833a8e4cdfdd8cdf7c63d42d2bbb5c601
[]
no_license
verreliocr/dota-2-directories
d8a129010d7c6cd2a3cf94f4f217177e2722be7c
12ba97c4ab337f8000397e83cead703908870b10
refs/heads/master
2023-07-08T22:50:36.153032
2021-01-31T17:05:29
2021-01-31T17:05:29
333,814,633
0
0
null
null
null
null
UTF-8
Swift
false
false
3,512
swift
// // DetailHeroesViewController.swift // Dota 2 Directories // // Created by Verrelio C. Rizky on 31/01/21. // import UIKit class DetailHeroesViewController: UIViewController { let presenter: IDetailHeroesPresenter @IBOutlet weak var detailHeroesTableView: UITableView! init(presenter: IDetailHeroesPresenter) { self.presenter = presenter super.init(nibName: "DetailHeroesViewController", bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() setupTableView() presenter.viewLoaded() } private func setupTableView() { detailHeroesTableView.delegate = self detailHeroesTableView.dataSource = self detailHeroesTableView.estimatedRowHeight = 200 detailHeroesTableView.rowHeight = UITableView.automaticDimension detailHeroesTableView.register([HeroTableCell.self, RecommendationTableCell.self]) } } extension DetailHeroesViewController: IDetailHeroesView { func reloadView() { DispatchQueue.main.async { [unowned self] in self.detailHeroesTableView.reloadData() } } } extension DetailHeroesViewController: UITableViewDataSource, UITableViewDelegate { func numberOfSections(in tableView: UITableView) -> Int { return 2 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 1 { return 3 } return 1 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0, let cell: HeroTableCell = tableView.dequeueReusableCell() { cell.bind(imgUrl: presenter.getImgUrl(), name: presenter.getName(), attackRoles: presenter.getAttackRoles(), attributes: presenter.getAttr(), health: presenter.getBaseHealth(), attack: presenter.getBaseHealth(), movSpd: presenter.getMovSpeed()) return cell } if indexPath.section == 1, let cell: RecommendationTableCell = tableView.dequeueReusableCell() { cell.bind(imgUrl: presenter.getImgUrlRecommend(at: indexPath.row), name: presenter.getNameRecommend(at: indexPath.row), attackRoles: presenter.getAttackRolesRecommend(at: indexPath.row)) return cell } return UITableViewCell() } func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if section == 1 { return 56 } return 0 } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if section == 1 { let viewHeader = UIView(frame: CGRect.zero) viewHeader.backgroundColor = .white let titleLabel = UILabel(frame: CGRect(x: 32, y: 8, width: UIScreen.main.bounds.width - 64, height: 40)) titleLabel.font = UIFont.systemFont(ofSize: 24, weight: .semibold) titleLabel.text = presenter.getTitle(for: section) viewHeader.addSubview(titleLabel) return viewHeader } return nil } }
[ -1 ]
0153473718bdf7d1c3c5474b003b1530d0e4eea9
1ec05341cd7d285aea159e3ee730c3edabab6790
/StateMachineSample/Services/Vehicle Control/BluetoothVehicleControlService.swift
b692816449d3b47b85881f7d009947961221c8cd
[]
no_license
calt/StateMachineSample
616e04f81d5ab52f2ff90f9ca0dba0760f8f9433
b30100edaec3d4b306ead30ed7dcda6a9da16033
refs/heads/master
2021-01-07T23:08:46.801163
2020-02-20T09:46:43
2020-02-20T09:46:43
241,846,850
0
0
null
null
null
null
UTF-8
Swift
false
false
540
swift
import Foundation class BluetoothVehicleControlService: VehicleControlServiceType { func unlockVehicle(callback: @escaping (Result<String, VehicleControlError>) -> Void) { DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { callback(.success("Unlocked w/ Bluetooth")) } } func lockVehicle(callback: @escaping (Result<String, VehicleControlError>) -> Void) { DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { callback(.success("Locked w/ Bluetooth")) } } }
[ -1 ]
e3eba0c32cda5ce26450c5217dd6514bbfc50614
00e16f6f1cebcf6cdda5f1cc47489365e708048a
/CoordinatorPatternAndDepedencyInjectionDemoUITests/CoordinatorPatternAndDepedencyInjectionDemoUITests.swift
3c640b06e4b72eec9b98690fea6d34a2516e6595
[]
no_license
HsinChungHan/InterviewPatternDemo
f246e8209b76f85f4085fcbba0971cbf58a0df5e
254a32fa3445595f50a7680e3070d270a8e0952b
refs/heads/main
2023-02-21T09:15:04.188182
2021-01-21T02:40:44
2021-01-21T02:40:44
331,071,689
0
0
null
null
null
null
UTF-8
Swift
false
false
1,525
swift
// // CoordinatorPatternAndDepedencyInjectionDemoUITests.swift // CoordinatorPatternAndDepedencyInjectionDemoUITests // // Created by Chung Han Hsin on 2021/1/20. // import XCTest class CoordinatorPatternAndDepedencyInjectionDemoUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } } }
[ 360463, 376853, 344106, 253996, 163894, 385078, 319543, 352314, 376892, 32829, 352324, 352327, 385095, 393291, 163916, 368717, 196687, 254039, 426074, 368732, 180317, 32871, 352359, 385135, 376945, 385147, 426124, 196758, 49308, 65698, 49317, 377008, 377010, 377025, 377033, 164043, 417996, 254157, 368849, 368850, 139478, 385240, 254171, 147679, 147680, 205034, 254189, 254193, 344312, 336121, 262403, 147716, 368908, 180494, 368915, 254228, 262419, 377116, 254250, 418095, 336177, 368949, 180534, 155968, 270663, 319816, 368969, 254285, 180559, 377168, 344402, 368982, 270703, 139641, 385407, 385409, 106893, 270733, 385423, 385433, 213402, 385437, 254373, 385448, 385449, 311723, 115116, 385463, 336319, 336323, 188870, 262619, 377309, 377310, 369121, 369124, 270823, 360945, 139766, 377337, 254459, 410108, 410109, 262657, 377346, 410126, 393745, 385554, 254487, 410138, 188957, 377374, 385578, 377388, 197166, 393775, 418352, 33339, 352831, 33344, 385603, 385612, 426575, 369236, 385620, 270938, 352885, 352886, 344697, 369285, 385669, 344714, 377487, 180886, 352921, 377499, 344737, 352938, 418479, 164532, 336565, 377531, 377534, 377536, 385737, 385745, 369365, 369366, 385751, 361178, 352989, 352990, 418529, 295649, 385763, 369383, 361194, 418550, 344829, 197377, 434956, 418579, 426772, 197398, 426777, 344864, 197412, 336678, 189229, 197424, 197428, 336693, 377656, 426809, 197433, 222017, 377669, 197451, 369488, 385878, 385880, 197467, 435038, 385895, 197479, 385901, 197489, 164730, 254851, 369541, 172936, 426894, 189327, 377754, 172971, 140203, 377778, 189362, 377789, 345034, 418774, 386007, 418781, 386016, 123880, 418793, 222193, 435185, 271351, 435195, 328701, 328705, 386049, 418819, 410629, 377863, 189448, 320526, 361487, 435216, 386068, 254997, 336930, 410665, 345137, 361522, 386108, 410687, 377927, 361547, 205911, 156763, 361570, 214116, 214119, 402538, 173168, 377974, 66684, 402568, 140426, 337037, 386191, 410772, 222364, 418975, 124073, 402618, 402632, 148687, 402641, 419028, 222441, 386288, 66802, 271607, 369912, 369913, 419066, 386296, 386300, 386304, 320769, 369929, 419097, 320795, 115997, 222496, 369964, 353581, 116014, 66863, 312628, 345397, 345398, 386363, 337226, 345418, 337228, 353611, 353612, 378186, 353617, 378201, 312688, 337280, 263561, 304523, 9618, 370066, 411028, 370072, 148900, 361928, 337359, 329168, 329170, 353751, 329181, 320997, 361958, 271850, 271853, 329198, 411119, 116209, 386551, 312830, 271880, 198155, 329231, 370200, 157219, 157220, 394793, 353875, 99937, 345697, 271980, 206447, 403057, 42616, 337533, 370307, 419462, 149127, 149128, 419464, 214667, 411275, 345753, 255651, 337590, 370359, 403149, 345813, 370390, 272087, 345817, 337638, 181992, 345832, 345835, 141037, 173828, 395018, 395019, 395026, 124691, 411417, 345882, 435993, 321308, 255781, 362281, 378666, 403248, 378673, 182070, 182071, 345910, 436029, 337734, 272207, 272208, 337746, 395092, 345942, 362326, 370526, 345950, 362336, 255844, 214894, 362351, 214896, 124795, 182145, 337816, 124826, 329627, 354210, 436130, 436135, 10153, 362411, 370604, 362418, 411587, 362442, 346066, 354268, 436189, 403421, 329696, 354273, 403425, 190437, 354279, 436199, 174058, 247787, 329707, 354283, 337899, 247786, 313322, 436209, 124912, 346117, 182277, 354310, 354312, 43016, 354311, 403463, 436235, 419857, 436248, 346153, 124974, 272432, 403507, 378933, 378934, 436283, 403524, 436293, 436304, 329812, 411738, 272477, 395373, 346237, 436372, 362658, 436388, 125108, 133313, 395458, 338118, 436429, 346319, 321744, 379102, 387299, 18661, 379110, 125166, 149743, 379120, 125170, 411892, 395511, 436471, 436480, 125184, 272644, 125192, 338187, 338188, 125197, 395536, 125200, 338196, 272661, 379157, 125204, 125215, 125216, 338217, 125225, 125236, 362809, 379193, 395591, 272730, 436570, 215395, 362864, 354672, 272755, 354678, 248188, 313726, 436609, 240003, 395653, 436613, 395660, 264591, 272784, 420241, 436644, 272815, 436659, 338359, 436677, 256476, 420326, 166403, 322057, 420374, 322077, 330291, 191065, 436831, 420461, 313970, 346739, 346741, 420473, 166533, 346771, 363155, 264855, 436897, 355006, 363228, 436957, 436960, 264929, 338658, 346859, 330476, 35584, 133889, 346889, 264971, 322320, 207639, 363295, 355117, 191285, 355129, 273209, 273211, 355136, 355138, 420680, 355147, 355148, 355153, 363353, 363354, 322396, 420702, 363361, 363362, 412516, 355173, 355174, 207724, 355182, 207728, 420722, 330627, 265094, 387977, 355216, 224146, 224149, 256918, 256919, 256920, 256934, 273336, 273341, 330688, 379845, 363462, 273353, 207839, 347104, 134124, 412653, 248815, 257007, 347122, 437245, 257023, 125953, 396292, 330759, 347150, 330766, 330789, 248871, 412725, 257093, 404550, 314437, 339031, 257126, 265318, 404582, 265323, 396395, 404589, 273523, 363643, 248960, 150656, 363658, 404622, 224400, 347286, 265366, 339101, 429216, 339106, 380069, 265381, 421050, 339131, 265410, 183492, 273616, 339167, 421102, 52473, 363769, 52476, 412926, 437504, 380178, 429332, 126229, 412963, 257323, 273713, 208179, 159033, 347451, 216387, 257353, 257354, 109899, 437585, 331091, 150868, 372064, 429410, 437602, 265579, 314734, 314740, 314742, 421240, 314745, 388488, 314776, 396697, 396709, 380331, 380335, 355761, 421302, 134586, 380348, 216510, 216511, 380350, 200136, 273865, 339403, 372172, 413138, 437726, 429540, 3557, 3559, 191980, 191991, 265720, 216575, 372226, 437766, 208397, 323088, 413202, 413206, 388630, 175640, 372261, 347693, 323120, 396850, 200245, 323126, 134715, 421437, 396865, 413255, 265800, 273992, 421452, 265809, 396885, 265816, 396889, 388699, 396896, 323171, 388712, 388713, 339579, 396927, 224907, 396942, 405140, 274071, 208547, 208548, 405157, 388775, 364202, 421556, 224951, 224952, 323262, 323265, 241360, 241366, 224985, 159462, 372458, 397040, 12017, 274170, 175874, 249606, 323335, 372497, 397076, 421657, 339746, 257831, 167720, 241447, 421680, 274234, 241471, 339782, 315209, 241494, 339799, 274288, 372592, 274296, 339840, 315265, 372625, 118693, 438186, 151492, 380874, 372699, 380910, 380922, 380923, 274432, 372736, 241695, 315431, 315433, 430127, 405552, 249912, 225347, 421958, 176209, 381013, 53334, 200795, 356446, 438374, 176231, 438378, 217194, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 323730, 430231, 200856, 422044, 192670, 192671, 258213, 323761, 266427, 266447, 372943, 258263, 356575, 438512, 372979, 389364, 381173, 135416, 356603, 266504, 61720, 381210, 315674, 389406, 438575, 266547, 332084, 397620, 438583, 127292, 438592, 332100, 397650, 348499, 250196, 348501, 389465, 332128, 110955, 242027, 160111, 250227, 438653, 340356, 266628, 225684, 373141, 373144, 389534, 397732, 373196, 242138, 184799, 201195, 324098, 340489, 397841, 258584, 397855, 348709, 348710, 397872, 266812, 438850, 348741, 381515, 348748, 430681, 332379, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 356990, 373377, 422529, 152196, 201348, 356998, 348807, 356999, 316050, 275102, 340645, 176805, 422567, 176810, 160441, 422591, 135888, 242385, 373485, 373486, 21239, 348921, 275193, 430853, 430860, 62222, 430880, 152372, 430909, 160576, 348999, 275294, 381791, 127840, 357219, 439145, 242540, 242542, 381811, 201590, 398205, 340865, 349066, 316299, 349068, 381840, 390034, 373653, 430999, 209820, 381856, 185252, 398244, 422825, 381872, 398268, 349122, 398275, 127945, 373705, 340960, 398305, 340967, 398313, 127990, 349176, 201721, 349179, 357380, 398370, 357413, 357420, 21567, 250955, 218187, 250965, 439391, 250982, 398444, 62574, 357487, 119925, 349304, 349315, 349317, 373902, 177297, 324761, 373937, 373939, 324790, 259275, 259285, 357594, 414956, 251124, 439550, 439563, 242955, 414989, 349458, 259346, 259347, 382243, 382246, 382257, 382264, 333115, 193853, 251212, 406862, 259408, 316764, 374110, 382329, 259449, 357758, 243073, 357763, 112019, 398740, 374189, 251314, 259513, 54719, 259569, 251379, 398844, 210429, 366081, 153115, 431646, 349727, 431662, 374327, 210489, 235069, 349764, 128589, 333389, 333394, 349780, 415334, 54895, 366198, 210558, 210559, 415360, 333438, 210569, 415369, 431754, 267916, 415376, 259741, 153252, 399014, 210601, 202413, 317102, 415419, 259780, 333508, 267978, 333522, 325345, 333543, 431861, 161539, 366358, 169751, 431901, 341791, 325411, 333609, 399148, 202541, 431918, 153392, 431935, 325444, 325449, 341837, 415566, 431955, 325460, 317268, 341846, 259937, 415592, 325491, 341878, 333687, 350072, 276343, 317305, 112510, 325508, 333700, 243590, 350091, 350092, 350102, 350108, 333727, 219046, 128955, 219102, 6116, 432114, 415740, 268286, 415744, 333827, 243720, 399372, 358418, 153618, 178215, 325675, 243763, 358455, 325695, 399433, 333902, 104534, 260206, 432241, 374913, 374914, 415883, 333968, 104633, 260285, 268479, 374984, 334049, 325857, 268515, 383208, 317676, 260337, 260338, 432373, 375040, 432387, 260355, 375052, 194832, 325904, 391448, 334104, 268570, 178459, 186660, 268581, 334121, 358698, 325930, 260396, 358707, 432435, 358710, 14654, 268609, 383309, 383327, 391521, 366948, 416101, 383338, 432503, 432511, 252309, 39323, 317851, 375211, 334259, 342454, 358844, 317889, 326083, 416201, 129484, 154061, 416206, 432608, 195044, 391654, 432616, 334315, 375281, 334345, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 219694, 219695, 375345, 432694, 375369, 375373, 416334, 416340, 244311, 260705, 416353, 375396, 268901, 244326, 244345, 375438, 326288, 383668, 342714, 39616, 383708, 269036, 432883, 342775, 203511, 383740, 416509, 359166, 162559, 375552, 432894, 383755, 326413, 326428, 318247, 342827, 391980, 318251, 375610, 342846, 416577, 416591, 244569, 375644, 252766, 351078, 342888, 392057, 211835, 269179, 392065, 260995, 400262, 392071, 424842, 236427, 252812, 400271, 392080, 400282, 7070, 211871, 359332, 359333, 326571, 252848, 326580, 261045, 261046, 326586, 359365, 211913, 326602, 252878, 342990, 433104, 359380, 433112, 433116, 359391, 343020, 187372, 383980, 383994, 171009, 384004, 433166, 384015, 433173, 326684, 252959, 384031, 375848, 261191, 375902, 375903, 392288, 253028, 351343, 187505, 138354, 384120, 392317, 343166, 384127, 392320, 253074, 326803, 359574, 351389, 253098, 367791, 367792, 367798, 343230, 367809, 253124, 113863, 351445, 253168, 351475, 351489, 367897, 367898, 245018, 130347, 261426, 212282, 359747, 359748, 146763, 114022, 253288, 425327, 425331, 327030, 163190, 384379, 253316, 384391, 253339, 253340, 343457, 245160, 359860, 359861, 343480, 425417, 327122, 425434, 310747, 253431, 359931, 187900, 343552, 409095, 359949, 253456, 253462, 146976, 245290, 245291, 343606, 163385, 425534, 138817, 147011, 147020, 196184, 179800, 343646, 155238, 204394, 138862, 188021, 425624, 245413, 384693, 376502, 409277, 319176, 409289, 425682, 245471, 155360, 212721, 319232, 360194, 409355, 417556, 204600, 319289, 384826, 409404, 360253, 409416, 376661, 368471, 425820, 368486, 409446, 425832, 40809, 368489, 384871, 417648, 360315, 253828, 327556, 425875, 253851, 376733, 204702, 253868, 204722, 188349, 212947, 212953, 360416, 253930, 385011 ]
48d0f32d3e4344aaa70f565add9655c50a1f3348
c28d6d3adfdc7b9155b8d3289799ea4273fca05c
/Carthage/Checkouts/ioskit.ui/Source/add-ons/toasts/PopupToast.swift
bbe83cf37731ad09fa4f80c93c47711f72e1a3ac
[]
no_license
KevinTheGray/rippertests
8f91990090fd22b7b83078d45c1acd3640e6c151
c613542653153a724b6a310c13eed23dea56445c
refs/heads/master
2021-01-17T18:13:10.932495
2016-07-08T16:26:38
2016-07-08T16:26:38
62,902,090
0
0
null
null
null
null
UTF-8
Swift
false
false
4,653
swift
// // PopupToast.swift // PosseKit // // Created by Posse in NYC // http://goposse.com // // Copyright (c) 2016 Posse Productions LLC. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of the Posse Productions LLC, Posse nor the // names of its contributors may be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL POSSE PRODUCTIONS LLC (POSSE) BE LIABLE FOR ANY // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // import Foundation import UIKit public class PopupToast : BannerToast { // MARK: - Layout public override func layoutSubviews() { super.layoutSubviews() self.textLabel.userInteractionEnabled = false self.layer.cornerRadius = 2.0 } // MARK: - Toast configuration overrides public override func configureToastStyle(configuration configuration: ToastConfiguration) { super.configureToastStyle(configuration: configuration) self.layer.backgroundColor = configuration.backgroundColor.CGColor } public override class func defaultConfiguration() -> ToastConfiguration { var configuration: ToastConfiguration = ToastConfiguration() configuration.position = .Bottom configuration.maxLines = 3 configuration.animationParams.startAlpha = 0.0 configuration.animationParams.endAlpha = 1.0 configuration.mode = .Temporary configuration.animationParams.showDelay = 0 configuration.animationParams.hideDelay = 3.0 configuration.animationParams.duration = 0.5 configuration.imageSize = CGSize(width: 32.0, height: 30.0) configuration.font = UIFont.systemFontOfSize(11.0) configuration.adjustRectForStatusBar = false return configuration } // MARK: - Sizing override func optimalSize(parentFrame parentFrame: CGRect) -> CGSize { let maxWidth: Double = Double(parentFrame.width) - 40.0; return optimalSize(parentFrame: parentFrame, maxWidth: maxWidth, includeButton: false) } public override func preferredHiddenRect(parentFrame parentFrame: CGRect, position: ToastPosition) -> CGRect { let optimalSize: CGSize = self.optimalSize(parentFrame: parentFrame) let h: Double = Double(optimalSize.height) var y: Double = 0.0 if position == .Bottom { y = Double(parentFrame.height) - h } else if position == .Center { y = Double((parentFrame.height - optimalSize.height) / 2.0) + 40.0 } let x: Double = Double(parentFrame.width - optimalSize.width) / 2.0 return CGRect(x: ceil(x), y: ceil(y), width: ceil(Double(optimalSize.width)), height: ceil(h)) } public override func preferredVisibleRect(parentFrame parentFrame: CGRect, position: ToastPosition) -> CGRect { var visibleRect: CGRect = self.preferredHiddenRect(parentFrame: parentFrame, position: position) var y: CGFloat = CGFloat(fmax(20.0, Double(0.5 * visibleRect.height))) if position == .Bottom { y = parentFrame.height - visibleRect.height * 1.5 } else if position == .Center { y = (parentFrame.height - visibleRect.height) / 2.0 } visibleRect.origin.y = ceil(y) return visibleRect } // MARK: - Touch handling public override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) { let toastConfiguration: ToastConfiguration = self.toastManager.validConfiguration(forToast: self) if toastConfiguration.mode != .Sticky { self.toastManager.dismiss(self) } } }
[ -1 ]
45e79dc8a42f9efe43ea784c9f98abb0820e5b73
f76abdb9665e751f658a766be9925eec50427bc3
/Keyboard/DefaultKeyboard.swift
7728fa4f94ba685a423ca6a55eb62494fc1ba6a7
[ "BSD-3-Clause" ]
permissive
katzbenj/MeBoard
b863489c432b201ff0e86079dd6a06be648e12a3
2cc82db3a5c396abe11b986017274c118d7f6dd9
refs/heads/master
2021-01-12T14:16:10.446997
2016-12-11T23:36:51
2016-12-11T23:36:51
69,927,768
3
1
null
2016-11-20T17:06:57
2016-10-04T02:17:32
Swift
UTF-8
Swift
false
false
4,678
swift
// // DefaultKeyboard.swift // TransliteratingKeyboard // // Created by Alexei Baboulevitch on 7/10/14. // Copyright (c) 2014 Alexei Baboulevitch ("Archagon"). All rights reserved. // func defaultKeyboard() -> Keyboard { let defaultKeyboard = Keyboard() for key in ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"] { let keyModel = Key(.character) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 0, page: 0) } for key in ["A", "S", "D", "F", "G", "H", "J", "K", "L"] { let keyModel = Key(.character) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 1, page: 0) } let keyModel = Key(.shift) defaultKeyboard.addKey(keyModel, row: 2, page: 0) for key in ["Z", "X", "C", "V", "B", "N", "M"] { let keyModel = Key(.character) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 2, page: 0) } let backspace = Key(.backspace) defaultKeyboard.addKey(backspace, row: 2, page: 0) let keyModeChangeNumbers = Key(.modeChange) keyModeChangeNumbers.uppercaseKeyCap = "123" keyModeChangeNumbers.toMode = 1 defaultKeyboard.addKey(keyModeChangeNumbers, row: 3, page: 0) let keyboardChange = Key(.keyboardChange) defaultKeyboard.addKey(keyboardChange, row: 3, page: 0) let settings = Key(.settings) defaultKeyboard.addKey(settings, row: 3, page: 0) let space = Key(.space) space.uppercaseKeyCap = "space" space.uppercaseOutput = " " space.lowercaseOutput = " " defaultKeyboard.addKey(space, row: 3, page: 0) let returnKey = Key(.return) returnKey.uppercaseKeyCap = "return" returnKey.uppercaseOutput = "\n" returnKey.lowercaseOutput = "\n" defaultKeyboard.addKey(returnKey, row: 3, page: 0) defaultKeyboard.pages[0].setRelativeSizes(percentArray: [0.1, 0.1, 0.1, 0.5, 0.2], rowNum: 3) for key in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] { let keyModel = Key(.specialCharacter) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 0, page: 1) } for key in ["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""] { let keyModel = Key(.specialCharacter) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 1, page: 1) } let keyModeChangeSpecialCharacters = Key(.modeChange) keyModeChangeSpecialCharacters.uppercaseKeyCap = "#+=" keyModeChangeSpecialCharacters.toMode = 2 defaultKeyboard.addKey(keyModeChangeSpecialCharacters, row: 2, page: 1) for key in [".", ",", "?", "!", "'"] { let keyModel = Key(.specialCharacter) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 2, page: 1) } defaultKeyboard.addKey(Key(backspace), row: 2, page: 1) let keyModeChangeLetters = Key(.modeChange) keyModeChangeLetters.uppercaseKeyCap = "ABC" keyModeChangeLetters.toMode = 0 defaultKeyboard.addKey(keyModeChangeLetters, row: 3, page: 1) defaultKeyboard.addKey(Key(keyboardChange), row: 3, page: 1) defaultKeyboard.addKey(Key(settings), row: 3, page: 1) defaultKeyboard.addKey(Key(space), row: 3, page: 1) defaultKeyboard.addKey(Key(returnKey), row: 3, page: 1) defaultKeyboard.pages[1].setRelativeSizes(percentArray: [0.1, 0.1, 0.1, 0.5, 0.2], rowNum: 3) for key in ["[", "]", "{", "}", "#", "%", "^", "*", "+", "="] { let keyModel = Key(.specialCharacter) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 0, page: 2) } for key in ["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "•"] { let keyModel = Key(.specialCharacter) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 1, page: 2) } defaultKeyboard.addKey(Key(keyModeChangeNumbers), row: 2, page: 2) for key in [".", ",", "?", "!", "'"] { let keyModel = Key(.specialCharacter) keyModel.setLetter(key) defaultKeyboard.addKey(keyModel, row: 2, page: 2) } defaultKeyboard.addKey(Key(backspace), row: 2, page: 2) defaultKeyboard.addKey(Key(keyModeChangeLetters), row: 3, page: 2) defaultKeyboard.addKey(Key(keyboardChange), row: 3, page: 2) defaultKeyboard.addKey(Key(settings), row: 3, page: 2) defaultKeyboard.addKey(Key(space), row: 3, page: 2) defaultKeyboard.addKey(Key(returnKey), row: 3, page: 2) defaultKeyboard.pages[2].setRelativeSizes(percentArray: [0.1, 0.1, 0.1, 0.5, 0.2], rowNum: 3) return defaultKeyboard }
[ 322420, 285334 ]
f60ec0e86bea9f2268d859b09833018c4d676e68
54f11527363366bd97770b1f9da4ebc5b9389339
/LS_Demo/Response/PageableParameter.swift
c764a37875932238d6dbb2e973b107a9493aa247
[]
no_license
sandsn123/LSAPI
da57f7a8d892ce0beb17f26602d9542c8e42aac8
6e9b331937c8e1bd6d03ea5772fb2cb053afb479
refs/heads/master
2023-03-07T23:30:13.194737
2023-02-26T09:26:51
2023-02-26T09:26:51
278,040,479
4
0
null
null
null
null
UTF-8
Swift
false
false
2,239
swift
// // PageableParameter.swift // LS_Demo // // Created by sai on 2020/8/24. // Copyright © 2020 sai.api.framework. All rights reserved. // import Foundation /// 支持分页的参数类型 public protocol PageableParameterProtocol: QueryConvertible { /// 页码 var pagination: Pagination { get } } // MARK: - PageableParameter /// 支持分页的参数 public struct PageableParameter<Parameter: QueryConvertible> { /// 具体参数 public let parameter: Parameter /// 页码 public var pagination: Pagination /// 构造参数 /// /// - Parameters: /// - parameter: 具体参数 /// - pagination: 页码 public init(parameter: Parameter, pagination: Pagination = .first) { self.parameter = parameter self.pagination = pagination } } extension PageableParameter: PageableParameterProtocol { public func asQuery() -> String? { var queries = [String]() if let query = parameter.asQuery() { queries.append(query) } if let query = pagination.asQuery() { queries.append(query) } if queries.isEmpty { return nil } return queries.joined(separator: "&") } } // MARK: - OptionalPageableParameter /// 支持分页的参数,具体参数可为空 public struct OptionalPageableParameter<Parameter: QueryConvertible> { /// 具体参数,可为空 public let parameter: Parameter? /// 页码 public var pagination: Pagination /// 构造参数 /// /// - Parameters: /// - parameter: 具体参数 /// - pagination: 页码 public init(parameter: Parameter?, pagination: Pagination = .first) { self.parameter = parameter self.pagination = pagination } } extension OptionalPageableParameter: PageableParameterProtocol { public func asQuery() -> String? { var queries = [String]() if let query = parameter?.asQuery() { queries.append(query) } if let query = pagination.asQuery() { queries.append(query) } if queries.isEmpty { return nil } return queries.joined(separator: "&") } }
[ -1 ]
9e593bb2813eb8db77adfe3f660803152e1354f4
ba786ea4bd0096a4d1ba450078d0eb3faae836fc
/TangramUI/ExpandingCollectionView/InspirationCell.swift
f99d667e36c6f82612f66c477cb8dac2cb0bdfaa
[]
no_license
huangboju/TangramUI
f4dd1de807941d2ecd99b80d535d680365e94039
6ab8544e9db1bfc0b6f6f8d7c237ff1503980204
refs/heads/master
2022-04-29T23:55:38.092848
2022-03-22T11:25:55
2022-03-22T11:25:55
111,079,222
12
7
null
null
null
null
UTF-8
Swift
false
false
4,531
swift
// // InspirationCell.swift // TangramUI // // Created by 黄伯驹 on 2017/12/17. // Copyright © 2017年 黄伯驹. All rights reserved. // class InspirationCell: UICollectionViewCell { private lazy var imageView: UIImageView = { let imageView = UIImageView() imageView.contentMode = .scaleToFill imageView.translatesAutoresizingMaskIntoConstraints = false return imageView }() private lazy var titleLabel: UILabel = { let titleLabel = UILabel() titleLabel.translatesAutoresizingMaskIntoConstraints = false titleLabel.font = UIFont(name: "ArialRoundedMTBold", size: 38) titleLabel.textAlignment = .center titleLabel.textColor = .white return titleLabel }() private lazy var timeAndRoomLabel: UILabel = { let timeAndRoomLabel = UILabel() timeAndRoomLabel.translatesAutoresizingMaskIntoConstraints = false timeAndRoomLabel.textAlignment = .center timeAndRoomLabel.textColor = .white return timeAndRoomLabel }() private lazy var speakerLabel: UILabel = { let speakerLabel = UILabel() speakerLabel.translatesAutoresizingMaskIntoConstraints = false speakerLabel.textAlignment = .center speakerLabel.textColor = .white return speakerLabel }() private lazy var imageCoverView: UIView = { let imageCoverView = UIView() imageCoverView.translatesAutoresizingMaskIntoConstraints = false imageCoverView.backgroundColor = .black return imageCoverView }() var inspiration:Inspiration? { didSet{ if let inspiration = inspiration{ imageView.image = inspiration.backgroundImage titleLabel.text = inspiration.title timeAndRoomLabel.text = inspiration.roomAndTime speakerLabel.text = inspiration.speaker } } } override init(frame: CGRect) { super.init(frame: frame) addSubview(imageView) imageView.topAnchor.constraint(equalTo: topAnchor).isActive = true imageView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true imageView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true imageView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true addSubview(imageCoverView) imageCoverView.topAnchor.constraint(equalTo: topAnchor).isActive = true imageCoverView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true imageCoverView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true imageCoverView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true imageCoverView.addSubview(timeAndRoomLabel) imageCoverView.leadingAnchor.constraint(equalTo: timeAndRoomLabel.leadingAnchor).isActive = true imageCoverView.centerXAnchor.constraint(equalTo: timeAndRoomLabel.centerXAnchor).isActive = true imageCoverView.addSubview(speakerLabel) imageCoverView.trailingAnchor.constraint(equalTo: speakerLabel.trailingAnchor).isActive = true imageCoverView.leadingAnchor.constraint(equalTo: speakerLabel.leadingAnchor).isActive = true speakerLabel.topAnchor.constraint(equalTo: timeAndRoomLabel.bottomAnchor).isActive = true addSubview(titleLabel) titleLabel.centerXAnchor.constraint(equalTo: centerXAnchor).isActive = true titleLabel.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true titleLabel.bottomAnchor.constraint(equalTo: timeAndRoomLabel.topAnchor, constant: -11).isActive = true } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) { super.apply(layoutAttributes) // 1 let standardHeight = UltravisualLayoutConstants.Cell.standardHeight let featuredHeight = UltravisualLayoutConstants.Cell.featuredHeight // 2 let delta = 1 - ((featuredHeight - frame.height) / (featuredHeight - standardHeight)) // 3 let minAlpha: CGFloat = 0.3 let maxAlpha: CGFloat = 0.75 imageCoverView.alpha = maxAlpha - (delta * (maxAlpha - minAlpha)) timeAndRoomLabel.alpha = delta speakerLabel.alpha = delta } }
[ -1 ]
b39a323239adb366693c641273eb67540c0e6742
cce02797c0e9b0a524f4a1ebf9f0db5046bb9a0f
/Learn Swift Syntax/Lesson5 Functions/L5_Exercises.playground/Contents.swift
0b3e62106b4b2f9face01e7fd420d1714a2eea9c
[]
no_license
newinh/BoostCamp
8a25a589706b2ca742ccbe182963170ed308ad4a
ed34074b90438805500d28840314e7aa7533c259
refs/heads/master
2021-01-12T04:10:56.227723
2017-02-18T01:18:06
2017-02-18T01:18:06
77,529,320
0
1
null
null
null
null
UTF-8
Swift
false
false
4,758
swift
//: # Lesson 5 Exercises - Defining and Calling Functions import UIKit //: __Problem 1.__ //: //:Earlier we used the method, removeAtIndex() to remove the first letter of a string. This method belongs to the String class. See if you can use this same method to return the last letter of a string. //:Test out your discovery below by returning the last letter of the String, "bologna". var word = "bologna" word.endIndex word.distance(from: word.startIndex, to: word.endIndex) word.remove(at: word.index(before: word.endIndex)) word.startIndex word.endIndex //: __Problem 2__ //: //: Write a function called combineLastCharacters. It should take in an array of strings, collect the last character of each string and combine those characters to make a new string to return. Use the strategy you discovered in Problem 1 along with a for-in loop to write combineLastCharacters. Then try it on the nonsenseArray below. var nonsenseArray = ["bungalow", "buffalo", "indigo", "although", "Ontario", "albino", "%$&#!"] func combineLastCharacters(inputStringArray : [String]) -> String { var newString : String = "" for string in inputStringArray { var str = string newString = newString + "\(str.remove(at: str.index(before: str.endIndex)))" } return newString } print (combineLastCharacters(inputStringArray: nonsenseArray)) //: __Problem 3__ //: //: Imagine you are writing an app that keeps track of what you spend during the week. Prices of items purchased are entered into a "price" textfield. The "price" field should only allow numbers, no letters. //: NSCharacterSet.decimalDigitCharacterSet() is used below to define a set that is only digits. Using that set, write a function that takes in a String and returns true if that string is numeric and false if it contains any characters that are not numbers. //: __3a.__ Write a signature for a function that takes in a String and returns a Bool func isPrice (price : String) -> Bool { let digits = CharacterSet.decimalDigits let charSetPrice = CharacterSet(charactersIn: price) if digits.isSubset(of: charSetPrice){ print("subst") } if digits.isDisjoint(with: charSetPrice) { return false } return true } isPrice(price: "34") //: __3b.__ Write a for-in loop that checks each character of a string to see if it is a member of the "digits" set. Use the .unicodeScalars property to access all the characters in a string. Hint: the method longCharacterIsMember may come in handy. let digits = CharacterSet.decimalDigits // real solution func digitsOnly(_ word: String) -> Bool { for character in word.unicodeScalars { if !digits.contains(UnicodeScalar(character.value)!) { return false } } return true } digitsOnly("33") //: __Problem 4__ //: //: Write a function that takes in an array of dirtyWord strings, removes all of the four-letter words, and returns a clean array. let dirtyWordsArray = ["phooey", "darn", "drat", "blurgh", "jupiters", "argh", "fudge"] func removeFourLetterWord (wordArray : [String]) -> [String] { var newArray = wordArray var count = 0 for word in newArray { if word.distance(from: word.startIndex, to: word.endIndex) == 4 { newArray.remove(at: count) }else{ count += 1 } } return newArray } removeFourLetterWord(wordArray: dirtyWordsArray) //: __Problem 5__ //: //: Write a method, filterByDirector, that belongs to the MovieArchive class. This method should take in a dictionary of movie titles and a string representing the name of a director and return an array of movies created by that director. You can use the movie dictionary below. To test your method, instantiate an instance of the MovieArchive class and call filterByDirector from that instance. var movies:Dictionary<String,String> = [ "Boyhood":"Richard Linklater","Inception":"Christopher Nolan", "The Hurt Locker":"Kathryn Bigelow", "Selma":"Ava Du Vernay", "Interstellar":"Christopher Nolan"] class MovieArchive { func filterByDirector(movies : Dictionary<String, String>, thatDirector : String) -> [String] { var moviesByDirector = [String]() for (movie, director) in movies { if director == thatDirector { moviesByDirector.append(movie) } } return moviesByDirector } } var myMovieArchive = MovieArchive() myMovieArchive.filterByDirector(movies: movies, thatDirector: "Christopher Nolan")
[ -1 ]
78de06d1cfdfd2b44d27854e9ed01f2327f86ade
547d421fd2063af6d02a4960495fbdd173620df7
/Extract-Views/Code/ViewController.swift
73158aacacdde210b4e78c70413b5c10d4f04296
[ "MIT" ]
permissive
jrasmusson/swift-arcade
16900ddba6bb072358a2057340bdae40b5da74aa
99effd5395c4ac717afc3fd0044d24544c9d43ff
refs/heads/master
2023-08-07T23:18:00.371998
2023-07-30T15:27:26
2023-07-30T15:27:26
236,327,557
834
206
MIT
2023-07-30T15:27:27
2020-01-26T14:58:53
Swift
UTF-8
Swift
false
false
2,351
swift
// // ViewController.swift // SimpleAppExtractViewController // // Created by Jonathan Rasmusson (Contractor) on 2020-05-11. // Copyright © 2020 Jonathan Rasmusson. All rights reserved. // import UIKit import Foundation class ViewController: UIViewController { let cellId = "cellId" var tableView = UITableView() var gameView = GameView() var gameTableViewController = GameTableViewController() override func viewDidLoad() { super.viewDidLoad() setup() layout() } func setup() { gameTableViewController.delegate = self } func layout() { gameView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(gameView) // x3 things with nested childViewControllers view.addSubview(gameTableViewController.view) addChild(gameTableViewController) gameTableViewController.didMove(toParent: self) guard let gameTableView = gameTableViewController.view else { return } gameTableView.translatesAutoresizingMaskIntoConstraints = false gameView.topAnchor.constraint(equalToSystemSpacingBelow: view.safeAreaLayoutGuide.topAnchor, multiplier: 3).isActive = true gameView.leadingAnchor.constraint(equalToSystemSpacingAfter: view.leadingAnchor, multiplier: 3).isActive = true view.trailingAnchor.constraint(equalToSystemSpacingAfter: gameView.trailingAnchor, multiplier: 3).isActive = true gameTableView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.5).isActive = true gameTableView.leadingAnchor.constraint(equalToSystemSpacingAfter: view.leadingAnchor, multiplier: 1).isActive = true view.trailingAnchor.constraint(equalToSystemSpacingAfter: gameTableView.trailingAnchor, multiplier: 1).isActive = true view.bottomAnchor.constraint(equalToSystemSpacingBelow: gameTableView.bottomAnchor, multiplier: 1).isActive = true } } extension ViewController: GameTableViewControllerDelegate { func didSelectRowAt(indexPath: IndexPath) { let game = gameTableViewController.games[indexPath.row] gameView.alpha = 0 UIViewPropertyAnimator.runningPropertyAnimator(withDuration: 2, delay: 0, options: [], animations: { self.gameView.game = game self.gameView.alpha = 1 }) } }
[ -1 ]
f92fc4ab3bc81f2d7d5ad295803f56f925cf5e2d
b61e9fa1843e61ab6841bac776ecf9182b052fb9
/PushApp/dailyTableViewCell.swift
0ff0277e1f1601d714d565efbf06fc9336d05152
[]
no_license
pdave-sfsu/PushApp
5b43b5b0a858407b16a614c492326afc805278e6
948f23aa1c3853b383e4a28d49b2c9117026c31f
refs/heads/master
2021-01-11T16:55:57.492777
2017-01-22T19:10:37
2017-01-22T19:10:37
79,698,692
0
1
null
2017-01-22T17:49:49
2017-01-22T06:28:40
Swift
UTF-8
Swift
false
false
644
swift
// // dailyTableViewCell.swift // PushApp // // Created by Poojan Dave on 1/22/17. // Copyright © 2017 Poojan Dave. All rights reserved. // import UIKit class dailyTableViewCell: UITableViewCell { @IBOutlet weak var selfieImageView: UIImageView! @IBOutlet weak var dateLabel: UILabel! @IBOutlet weak var numOfPushUpsLabel: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 384002, 206343, 241159, 241160, 34318, 34319, 34320, 372750, 372753, 372754, 196119, 328221, 345634, 345635, 356391, 305202, 292919, 310839, 215125, 115311, 302195, 403072, 131721, 139419, 131745, 131748, 148647, 327344, 313522, 166583, 313528, 313529, 313530, 290007, 131808, 131814, 131817, 375532, 298255, 225040, 298258, 282900, 312598, 320790, 67356, 336156, 336159, 336160, 336161, 336164, 369452, 287022, 369455, 110387, 399679, 300356, 157512, 302922, 380242, 350050, 317283, 317296, 112499, 179571, 317302, 177015, 262518, 233853, 233857, 311211, 258998, 430546, 430547, 346078, 372717, 167415, 201727 ]
85bd3b57913875a4886c960f1b30935db9dbc1e1
f7d0b46cef6c2d1cc4117951b4384e77cbd186c9
/Frameworks/MungoHealer/ErrorTypes/MungoHealableError.swift
27ea8deb206c0ae58900d8e4738547709dc52541
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
JamitLabs/MungoHealer
f02f32f985df13e43bfcd6fee70a2c0f19b5e5b3
3c7be5cf38f5d718543f996955f05e5f6136e781
refs/heads/stable
2020-04-01T10:01:09.411530
2019-04-27T13:22:39
2019-04-27T13:22:39
153,099,147
6
4
MIT
2019-11-13T20:09:46
2018-10-15T11:07:21
Swift
UTF-8
Swift
false
false
564
swift
// // Created by Cihat Gündüz on 16.10.18. // Copyright © 2018 Jamit Labs GmbH. All rights reserved. // import Foundation public class MungoHealableError: MungoError, HealableError { public let healingOptions: [HealingOption] public init(source: ErrorSource, message: String, healingOption: HealingOption) { let cancelOption = HealingOption(style: .normal, title: LocalizedString("ERROR_TYPES.CANCEL_BUTTON.TITLE")) {} self.healingOptions = [cancelOption, healingOption] super.init(source: source, message: message) } }
[ -1 ]
08c11280120f8f78a8b95897725995084a63b925
616ae452076c79d024ececc258494d62c0875ba9
/AnimacaoSharing/AnimacaoSharing/Model/Animation.swift
caab5ad607351db5a49a0b9565e703216996910e
[]
no_license
VicFalcetta/ChallengeRemoto3Falcetes
913f8af567f142483921638e023fd983ef10125a
8d0d7591d7750dc42cfa0c529c7f7f4c8f982ccf
refs/heads/develop
2022-09-20T08:47:38.166377
2020-06-04T23:01:17
2020-06-04T23:01:17
265,015,359
0
1
null
2020-06-03T21:03:50
2020-05-18T17:42:57
Swift
UTF-8
Swift
false
false
1,825
swift
// // Animation.swift // AnimacaoSharing // // Created by Victor Falcetta do Nascimento on 25/05/20. // Copyright © 2020 Victor Falcetta do Nascimento. All rights reserved. // import Foundation import CloudKit struct Animation { let title, year, plot, rating, userRating, poster, type: String init(_ title: String, _ year: String, _ plot: String, _ rating: String, _ userRating: String, _ poster: String, _ type: String) { self.title = title self.year = year self.plot = plot self.rating = rating self.userRating = userRating self.poster = poster self.type = type } static var animations = [CKRecord]() static var database = CKContainer.default().privateCloudDatabase static func createAnimation(movie: MovieAPI, userRating: String) -> Animation { let newAnimation = Animation(movie.title, movie.year, movie.plot, movie.imdbRating, userRating, movie.poster, movie.type) var animation: CKRecord if newAnimation.type == "movie" { animation = CKRecord(recordType: "Animation") } else { animation = CKRecord(recordType: "Drawing") } animation.setValue(newAnimation.title, forKey: "Name") animation.setValue(newAnimation.userRating, forKey: "Note") animation.setValue(newAnimation.plot, forKey: "Plot") animation.setValue(newAnimation.year, forKey: "Year") animation.setValue(newAnimation.poster, forKey: "Poster") animation.setValue(newAnimation.type, forKey: "Type") database.save(animation) { (_, error) in if let erro = error { fatalError(erro.localizedDescription) } else { print("sucesso") } } return newAnimation } }
[ -1 ]
18f00dd116d4db4760364d0638fb816c077da6f8
afe1460365d86b4cd56d8cea72095a229d737022
/AuthenticationStructure/SettingsView.swift
16532033147a3dfc8d738c6b6a85f150901cff72
[]
no_license
spilger/AuthenticationStructure
62d91720a003bcde82417602f357c5d009cc01c4
e326aae66ce6cfea0f88887739a5392230097099
refs/heads/master
2022-12-17T23:21:10.642999
2020-09-23T07:28:29
2020-09-23T07:28:29
297,622,015
0
0
null
null
null
null
UTF-8
Swift
false
false
4,729
swift
// // SettingsView.swift // AuthenticationStructure // // Created by Cem Yilmaz on 22.09.20. // import SwiftUI struct SettingsView: View { @Binding public var userIsLoggedIn: Bool @Environment(\.presentationMode) private var presentationMode @State private var useBiometricsAuthenticationToggle: Bool = useBiometricsAuthentication @State private var alertForToSettings: Bool = false @State private var actionSheetForUserLogout: Bool = false @State private var sheetForAppPasswordChange: Bool = false @ViewBuilder var body: some View { let useBiometricsAuthenticationToggleWithOnChange = Binding<Bool>( get: { self.useBiometricsAuthenticationToggle }, set: { self.useBiometricsAuthenticationToggle = $0 if !changeUseBiometricsAuthentication(to: $0) { self.useBiometricsAuthenticationToggle = false } } ) List { Section { Button( action: { self.alertForToSettings = true }, label: { HStack { Text("Zu Systemeinstellungen").foregroundColor(.primary) Spacer() Image(systemName: "gear") } } ) } Section { Button( action: { self.sheetForAppPasswordChange = true }, label: { HStack { Text("App Passwort ändern").foregroundColor(.primary) Spacer() Image(systemName: "lock") } } ) } Section { Toggle(isOn: useBiometricsAuthenticationToggleWithOnChange) { Text(getBiometricsAuthenticationMethod()).foregroundColor(biometricsAuthenticationEnabledOrRequestable() ? .primary : .gray) }.disabled(!biometricsAuthenticationEnabledOrRequestable()) } Section { Button( action: { self.actionSheetForUserLogout = true }, label: { HStack { Spacer() Text("Abmelden").foregroundColor(.red) Spacer() } } ) } } .listStyle(GroupedListStyle()) .navigationBarTitle("Einstellungen", displayMode: .large) .navigationBarItems(leading: EmptyView(), trailing: EmptyView()) .alert(isPresented: self.$alertForToSettings) { Alert( title: Text("Sytemeinstellungen"), message: Text("Bei dem Wechsel zu den Systemeinstellungen verlassen Sie diese App"), primaryButton: Alert.Button.cancel(Text("Abbrechen")), secondaryButton: Alert.Button.default(Text("Einstellungen")) { UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!) } ) } .actionSheet(isPresented: self.$actionSheetForUserLogout) { ActionSheet( title: Text("Abmeldung von Ihrem Benutzerkonto"), message: Text("Dabei werden alle Benutzerkontobezogenen Daten gelöscht. Die App-spezifischen Daten wie App-Passwort, und ob die Verwendung von Face ID bevorzugt ist bleibt erhalten"), buttons: [ ActionSheet.Button.destructive(Text("Abmelden")) { self.userIsLoggedIn = false logUserOut() self.presentationMode.wrappedValue.dismiss() }, ActionSheet.Button.cancel(Text("Abbrechen")) ] ) } .sheet(isPresented: self.$sheetForAppPasswordChange) { UpdateAppPasswortView() } } } struct SettingsView_Previews: PreviewProvider { static var previews: some View { Group { NavigationView { SettingsView(userIsLoggedIn: .constant(true)) } NavigationView { SettingsView(userIsLoggedIn: .constant(true)).environment(\.colorScheme, .dark) } } } }
[ -1 ]
ea56c45049eec6c808bf5fda69c43efa0b6fcc7e
2b4112cfe0454c227400e54264e4d5d4054cefde
/iosApp/simpleLoginIOS/simpleLoginIOSApp.swift
d11a693bb9a1c331a0f90f801cc3a796bcdaf3ad
[]
no_license
filipradon/kmm-playground
40be62b58020973eebe7880bc9dfae2cb6bfc6ce
31ae7caab7772a2289c60175d7adaf05aac6aff3
refs/heads/master
2023-06-03T22:38:45.807759
2021-06-20T14:38:06
2021-06-20T14:38:06
378,666,458
0
0
null
null
null
null
UTF-8
Swift
false
false
451
swift
// // simpleLoginIOSApp.swift // simpleLoginIOS // // Created by Filip Radon on 20/06/2021. // import SwiftUI import shared import SwiftUI import shared @main struct SimpleLoginIOSApp: App { var body: some Scene { WindowGroup { ContentView(viewModel: .init(loginRepository: LoginRepository(dataSource: LoginDataSource()), loginValidator: LoginDataValidator())) } } }
[ -1 ]
bf50efe2c6834365dee1ddff961e5ea105592e16
9ee199b34d3421ad1aca70160fec0b6ed2cd2c24
/ToDo List/ViewController.swift
17eb0f125e890ca17d1f97c76386be5904738e6e
[]
no_license
shsushrut31/ToDo-List-300849151
fb14f0f55bd385124eebd9a4dce3d79f9c00d177
9e96b3d4b2b67148f402dbee6b485bce9b4b9dda
refs/heads/master
2021-01-21T05:28:51.817130
2017-02-26T08:12:36
2017-02-26T08:12:36
83,193,351
0
0
null
null
null
null
UTF-8
Swift
false
false
3,147
swift
// // ViewController.swift // ToDo List // // Created by Sushrut Shastri on 2017-02-25. // Copyright © 2017 Sushrut Shastri. All rights reserved. // Student ID: 300849151 // import UIKit class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var tableView: UITableView! //Array of Task entity var tasks : [Task] = [] override func viewDidLoad() { super.viewDidLoad() tableView.delegate = self tableView.dataSource = self } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func viewWillAppear(_ animated: Bool) { getData() tableView.reloadData() } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return tasks.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell")! as UITableViewCell let task = tasks[indexPath.row] cell.textLabel?.text = task.title return cell } //function to get data from coreData func getData(){ //Access coreData database let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext // Fill the array with the tasks in the coreData database do{ tasks = try context.fetch(Task.fetchRequest()) } catch{ print("Failed") } } //Function for Swipe to delete Functionality func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext if editingStyle == .delete{ let task = tasks[indexPath.row] context.delete(task) //To update coreData database after deletion (UIApplication.shared.delegate as! AppDelegate).saveContext() //Refill and reload the Talbeview with updated Data from coreData database do{ tasks = try context.fetch(Task.fetchRequest()) } catch{ print("Failed") } tableView.reloadData() } } //Open UpdateViewController to update task override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "updateSegue"{ if let indexPath = tableView.indexPathForSelectedRow{ let destVC = segue.destination as! UpdateTaskViewController destVC.titleText = tasks[indexPath.row].title destVC.descriptionText = tasks[indexPath.row].desc } } } }
[ -1 ]
341995ad02ca3be18e974fdeb5d12e0bb0fd2d93
64ee83d6efedb583e9ee7f158bd17dd7e9eda726
/LSCustomUISet/Extension/Swift/HYCallBlockList.swift
ba022ac1d5b109c54110dee56594c061317d84e2
[ "MIT" ]
permissive
liss1990/LSCustomUISet
2c4800d096831a515daf753d4f9570bc06810593
f9118cbe358281945c3d73756bb7add2dc7b4790
refs/heads/master
2020-04-02T21:22:26.372045
2019-12-03T06:47:52
2019-12-03T06:47:52
154,796,827
1
0
null
null
null
null
UTF-8
Swift
false
false
391
swift
// // HYCallBlockList.swift // Driver // // Created by 李丝思 on 2018/9/10. // Copyright © 2018年 李丝思. All rights reserved. // import UIKit /// 点击图片事件 typealias TapImgCallBlock = (Int) -> Void typealias ImgeBlock = (UIImage) -> Void ///返回数据 typealias BackData = (Any) ->Void ///textField typealias TextFieldBlock = ( _ str:String,_ row:Int) -> Void
[ -1 ]
219e0d79113d8cfca92a9ce36e409a15aac11f49
2c7d7c6a815b10a5d026a25b90053d17f235b348
/FirstRepo/AppDelegate.swift
0e026752aacadddca5963d8c22ae745127b377b2
[]
no_license
greezzly55/firstrepository
ccdd4c391136318c8852ce0b2b0a80c26e6b9b48
e0db034d785f78769aad6f73e64feac89ff05bcb
refs/heads/master
2021-06-30T01:06:02.611411
2017-09-19T08:58:44
2017-09-19T08:58:44
104,048,806
0
0
null
null
null
null
UTF-8
Swift
false
false
2,172
swift
// // AppDelegate.swift // FirstRepo // // Created by Gregory on 19/09/2017. // Copyright © 2017 GrizzlyApps. 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, 327695, 229391, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 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, 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, 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, 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, 311850, 279082, 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, 189040, 172660, 287349, 189044, 189039, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 287390, 303773, 172705, 287394, 172707, 303780, 164509, 287398, 205479, 287400, 279208, 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, 304009, 213895, 304011, 230284, 304013, 295822, 189325, 213902, 189329, 295825, 304019, 279438, 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, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 66690, 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, 148865, 312711, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 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, 148946, 370130, 222676, 288210, 288212, 288214, 280021, 329177, 288217, 288218, 280027, 288220, 239070, 239064, 288224, 370146, 280034, 288226, 288229, 280036, 280038, 288232, 288230, 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, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 288478, 313055, 419555, 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, 337732, 280388, 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, 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, 275606, 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, 280819, 157940, 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, 354656, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 240132, 223752, 150025, 338440, 281095, 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, 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, 224151, 240535, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 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, 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, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 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, 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, 299191, 307385, 176311, 258235, 307388, 176316, 307390, 307386, 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, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 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, 135707, 234010, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 299655, 373383, 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, 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, 226182, 234375, 201603, 226185, 308105, 234379, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324504, 291742, 324508, 234398, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 324522, 234410, 291756, 291754, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226239, 226245, 234437, 234439, 234443, 291788, 193486, 234446, 193488, 234449, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 234647, 234648, 226453, 234650, 308379, 275608, 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, 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, 349451, 177424, 275725, 283917, 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, 136562, 324978, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 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, 243268, 284231, 226886, 128584, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276052, 284247, 276053, 235097, 243290, 284249, 284251, 317015, 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, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 300828, 300830, 276255, 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, 317332, 358292, 399252, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 292839, 276455, 350186, 292843, 276460, 292845, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 350210, 276482, 178181, 317446, 276485, 350218, 276490, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 178224, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 350299, 194649, 350302, 194654, 350304, 178273, 309346, 227423, 194660, 350308, 309350, 309348, 292968, 309352, 350313, 309354, 350316, 227430, 276583, 301167, 276590, 350321, 284786, 276595, 301163, 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, 153765, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 227810, 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, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 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, 293696, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 277368, 15224, 416639, 416640, 113538, 310147, 416648, 277385, 39817, 187274, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 276579, 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, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 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, 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, 302614, 302617, 286233, 302621, 286240, 187936, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 245288, 310831, 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, 302764, 278188, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 229086, 278238, 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, 188252, 237409, 229233, 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, 311283, 278516, 278519, 237562 ]
0dbdf7a4651addf2fda27f935a2e1c5bda3b15af
f3351b3e4baaf0acc1165995beab0c3b0d7eb592
/CircularAnimator.swift
bbf2d3d8b61883787c6d29dd5a8c8738292d2488
[]
no_license
rhnsharma999/Aaruush-16
49111883b8ea5ffaf02d38e3b02354d4592f4789
a25cc8212c6f5644f80e6bbd1f33c281f635e76a
refs/heads/master
2021-01-20T12:09:32.896646
2017-06-26T12:28:47
2017-06-26T12:28:47
59,321,527
1
0
null
null
null
null
UTF-8
Swift
false
false
199
swift
// // CircularAnimator.swift // Aaruush // // Created by Rohan Lokesh Sharma on 02/06/16. // Copyright © 2016 rohan. All rights reserved. // import UIKit class CircularAnimator: NSObject { }
[ -1 ]
dc6fbb41370afe13cf265296837f0a4eed7a4988
379af685dc099666a3ee02a083cf1b25f9a824be
/BaseMVVM/UI/Screens/List/Cells/ItemCellViewModel.swift
4e0dc1e71cbc2d742632cd2f7465b2245db6409e
[]
no_license
newwavesolutions/ios-mvvm
3994b7fc4c99885a7a3c8cfa44d9d06a7e0d6af1
c809b1400de99ad711c6468f8514f5e0b56f781c
refs/heads/master
2023-05-25T12:06:28.930017
2021-05-31T03:57:41
2021-05-31T03:57:41
372,376,316
1
0
null
null
null
null
UTF-8
Swift
false
false
390
swift
// // ItemCellViewModel.swift // BaseMVVM // // Created by Lê Thọ Sơn on 4/29/20. // Copyright © 2020 thoson.it. All rights reserved. // import Foundation class ItemCellViewModel: CellViewModel { let item: Item init(item: Item) { self.item = item super.init() self.title.accept(item.name) self.imageUrl.accept(item.thumbnail) } }
[ -1 ]
9928aecb1209dcd52a35149558ef521519b2e307
8bdd77dec5d4de61c4e6480418407f898c5a7317
/TipCalculator copy/calculator/calculator/Views/Custom UI/Custom Labels/TipLabel.swift
899636d83b65de60f7d8be6efbcacc2e1e2c5776
[]
no_license
knsamuels/tipCalculatorProgrammatically
4bd62a86ea4f2d4a36380d50d68f528e6f1f560c
3eda6e48ca823f1de0571e09b8a4b8817d6f36e5
refs/heads/master
2022-11-19T04:59:59.385332
2020-07-08T00:47:18
2020-07-08T01:36:42
277,950,156
0
0
null
null
null
null
UTF-8
Swift
false
false
682
swift
// // TipLabel.swift // calculator // // Created by Kristin Samuels on 7/6/20. // Copyright © 2020 Kristin Samuels . All rights reserved. // import UIKit class TipLabel: UILabel { override func awakeFromNib() { super.awakeFromNib() updateFontTo(font: FontNames.latoRegular) self.textColor = .textColor } func updateFontTo(font: String) { let size = self.font.pointSize self.font = UIFont(name: font, size: size) } } class AppNameLabel: TipLabel { override func awakeFromNib() { super.awakeFromNib() updateFontTo(font: FontNames.latoBold) self.textColor = .titlePink } }
[ -1 ]
d7856dc2f433117f2889a7944c300a01a048babf
3a653aa159c5540dcdfc598b079a20ad8ae816d8
/SWIFT-笔记2018:11/RxSwift使用教程/6-RxSwift的UITableVIew使用/6-RxSwift的UITableVIew使用/AppDelegate.swift
2cc75bf9875067dcc2beb33867e010c6c5bdc296
[]
no_license
OneDuoKeng/swift----
90649317e97fa258b9ba40ed9cf5f62b1bad182f
1bea56428b4f24d4b004f24b4ac951654339e699
refs/heads/master
2021-06-26T01:23:58.529467
2020-12-02T10:10:48
2020-12-02T10:10:48
157,365,221
3
2
null
null
null
null
UTF-8
Swift
false
false
2,188
swift
// // AppDelegate.swift // 6-RxSwift的UITableVIew使用 // // Created by 韩俊强 on 2017/8/2. // Copyright © 2017年 HaRi. 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, 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, 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, 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, 213575, 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, 303981, 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, 197564, 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, 315524, 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, 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, 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, 350299, 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, 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, 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, 293706, 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 ]
3182c89d55ce08440e0ec44ff503211f4009fc66
bdacc94b990f407db28f061a1b19e0a3c779dabf
/Package.swift
bb3fe56fa283ca272f31b31215a0d7b13db8f416
[ "MIT" ]
permissive
e-sites/Aluminum
86f7f1a0c1e285215c3a6ce4f1f3c0ee19c49356
9d43e5d47857a4fb45ee5b08dd76452c4264517e
refs/heads/master
2021-07-19T13:54:31.098125
2020-05-28T10:21:48
2020-05-28T10:21:48
157,923,422
3
0
null
null
null
null
UTF-8
Swift
false
false
402
swift
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "Aluminum", platforms: [ .iOS(.v9), ], products: [ .library(name: "Aluminum", targets: ["Aluminum"]) ], dependencies: [ ], targets: [ .target( name: "Aluminum", dependencies: [ ], path: "Aluminum" ) ] )
[ -1 ]
51c7821d0710c8c4664dca6223cc5d2494344f6c
19c84e5b22ac82571da776a0f2b30216b7c33f3a
/devrconnector/viewcontroller/UsersViewController.swift
2fda84436360079ed5fab85a1096b2eb97c30337
[]
no_license
zawmoehtike/devconnector-ios-public
66f8fa8d3e47438bc6724fc75ca2e6ea8b111158
77401b935f63f8371908e02ae396f59d92931e2e
refs/heads/master
2023-02-13T12:29:44.023430
2021-01-06T06:03:11
2021-01-06T06:03:11
327,213,109
0
0
null
null
null
null
UTF-8
Swift
false
false
290
swift
// // UsersViewController.swift // devrconnector // // Created by Zaw Moe Htike on 1/1/21. // import UIKit class UsersViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } }
[ -1 ]
b0210a425df5663f816db7fc47e4a9790a31e4ff
ad217c48fe173def31ee02c1bb9a40d3d4541672
/FoodDraw/FoodDraw/Controllers/HomeViewController.swift
9585639941fd14eefc60fd1c96bfcb45c018ebaf
[ "MIT" ]
permissive
hqin0066/FoodDraw
bb6366f9ceb91806abe30f75c8f206cdc2b5f35d
14d0a15a07568fb1046bd0a33d4f0069af53de21
refs/heads/main
2023-08-05T07:09:09.916888
2021-09-16T06:07:11
2021-09-16T06:07:11
386,161,761
0
0
MIT
2021-09-16T06:07:12
2021-07-15T04:25:05
Swift
UTF-8
Swift
false
false
17,332
swift
// // HomeViewController.swift // FoodDraw // // Created by Hao Qin on 7/14/21. // import UIKit import CoreLocation import MapKit import CoreData class HomeViewController: UIViewController { private var context: NSManagedObjectContext? private let mapView = MapView() private let addButton: UIButton = { let button = UIButton() let image = UIImage(systemName: "plus", withConfiguration: UIImage.SymbolConfiguration(font: .systemFont(ofSize: 17, weight: .bold))) button.setImage(image, for: .normal) button.tintColor = .white button.backgroundColor = .systemGreen button.layer.cornerRadius = 18 return button }() private let drawButton: UIButton = { let button = UIButton() let image = UIImage(systemName: "arrow.clockwise", withConfiguration: UIImage.SymbolConfiguration(font: .systemFont(ofSize: 40, weight: .bold))) button.setImage(image, for: .normal) button.tintColor = .white button.backgroundColor = UIColor(named: "Gold") button.layer.cornerRadius = 35 return button }() private let locateButton: UIButton = { let button = UIButton() let image = UIImage(systemName: "location.fill", withConfiguration: UIImage.SymbolConfiguration(font: .systemFont(ofSize: 17))) button.setImage(image, for: .normal) button.tintColor = .white button.backgroundColor = UIColor(named: "Gold") button.layer.cornerRadius = 18 return button }() private let searchViewController = SearchViewController() private var addToListDetailView = AddToListDetailView() private var selectedSearchResult: MKPlacemark? = nil private var imageUrl: URL? = nil private var selectedResultAnnotaton = MKPointAnnotation() private var restaurants: [Restaurant] = [] private var restaurantDetailView = RestaurantDetailView() private var selectedSavedRestaurant: Restaurant? = nil private var drawResultView = DrawResultView() override func viewDidLoad() { super.viewDidLoad() title = "Home" context = Persistence.shared.container.viewContext fetchData() view.addSubview(mapView) view.addSubview(addButton) view.addSubview(drawButton) view.addSubview(locateButton) addButton.addTarget(self, action: #selector(didTapAdd), for: .touchUpInside) drawButton.addTarget(self, action: #selector(didTapDraw), for: .touchUpInside) locateButton.addTarget(self, action: #selector(didTapLocate), for: .touchUpInside) setupConstraints() mapView.delegate = self searchViewController.mapView = mapView.mapView searchViewController.delegate = self addToListDetailView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) view.addSubview(self.addToListDetailView) addToListDetailView.delegate = self restaurantDetailView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) view.addSubview(restaurantDetailView) restaurantDetailView.delegate = self drawResultView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) view.addSubview(drawResultView) drawResultView.delegate = self NotificationCenter.default.addObserver(self, selector: #selector(tableViewDidDeleteRows), name: .init("tableViewDidDeleteRows"), object: nil) } private func rotateButton() { UIView.animate( withDuration: 1.5, delay: 0, options: .curveEaseInOut) { [weak self] in guard let self = self else { return } self.drawButton.transform = CGAffineTransform(rotationAngle: -180) } UIView.animate( withDuration: 1.5, delay: 0, options: .curveEaseInOut) { [weak self] in guard let self = self else { return } self.drawButton.transform = CGAffineTransform(rotationAngle: -360) } UIView.animate( withDuration: 1.5, delay: 0, options: .curveEaseInOut) { [weak self] in guard let self = self else { return } self.drawButton.transform = CGAffineTransform.identity } UIView.animate( withDuration: 1.5, delay: 0, options: .curveEaseInOut) { [weak self] in guard let self = self else { return } self.drawButton.transform = CGAffineTransform(rotationAngle: -180) } UIView.animate( withDuration: 1.5, delay: 0, options: .curveEaseInOut) { [weak self] in guard let self = self else { return } self.drawButton.transform = CGAffineTransform(rotationAngle: -360) } } private func dismissViewsAndAnnotation() { self.mapView.mapView.removeAnnotation(selectedResultAnnotaton) UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { [weak self] in guard let self = self else { return } self.addToListDetailView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { [weak self] in guard let self = self else { return } self.drawResultView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } } // MARK: - objc func @objc private func didTapAdd() { dismissViewsAndAnnotation() mapView.mapView.deselectAnnotation(mapView.mapView.selectedAnnotations.first, animated: true) let nav = UINavigationController(rootViewController: searchViewController) navigationController?.present(nav, animated: true) } @objc private func didTapDraw() { rotateButton() UIView.animate( withDuration: 1.5, delay: 0, options: .curveEaseInOut) { [weak self] in guard let self = self else { return } self.drawButton.transform = CGAffineTransform.identity } completion: { _ in guard let restaurant = self.restaurants.randomElement() else { return } let coordinate = CLLocationCoordinate2D(latitude: restaurant.latitude, longitude: restaurant.longitude) let region = MKCoordinateRegion(center: coordinate, latitudinalMeters: 1000, longitudinalMeters: 1000) self.mapView.mapView.setRegion(region, animated: true) let location = CLLocation(latitude: restaurant.latitude, longitude: restaurant.longitude) let distance = self.mapView.mapView.userLocation.location?.distance(from: location) ?? 0 let distanceInMile = (((distance / 1609) * 100).rounded()) / 100 let distanceString = "\(distanceInMile)" + " miles" self.drawResultView.configure(with: SearchResultCellViewModel( name: restaurant.name ?? "Unknown", address: restaurant.address ?? "Unknown Address", distance: distanceString, imageURL: restaurant.imageUrl)) UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { self.drawResultView.frame = CGRect( x: 0, y: self.view.frame.height - (self.view.frame.height / 2.5), width: self.view.frame.width, height: self.view.frame.height / 2.5) } } } @objc private func didTapLocate() { let userCoordinate = mapView.mapView.userLocation.coordinate let region = MKCoordinateRegion(center: userCoordinate, latitudinalMeters: 10000, longitudinalMeters: 10000) mapView.mapView.setRegion(region, animated: true) } @objc private func tableViewDidDeleteRows() { fetchData() } // MARK: - Setting Constraints private func setupConstraints() { mapView.translatesAutoresizingMaskIntoConstraints = false addButton.translatesAutoresizingMaskIntoConstraints = false drawButton.translatesAutoresizingMaskIntoConstraints = false locateButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ mapView.topAnchor.constraint(equalTo: view.topAnchor), mapView.leadingAnchor.constraint(equalTo: view.leadingAnchor), mapView.trailingAnchor.constraint(equalTo: view.trailingAnchor), mapView.bottomAnchor.constraint(equalTo: view.bottomAnchor), addButton.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20), addButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20), addButton.widthAnchor.constraint(equalToConstant: 36), addButton.heightAnchor.constraint(equalToConstant: 36), drawButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), drawButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -30), drawButton.widthAnchor.constraint(equalToConstant: 70), drawButton.heightAnchor.constraint(equalToConstant: 70), locateButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20), locateButton.bottomAnchor.constraint(equalTo: drawButton.bottomAnchor), locateButton.widthAnchor.constraint(equalToConstant: 36), locateButton.heightAnchor.constraint(equalToConstant: 36) ]) } // MARK: - CoreData private func fetchData() { var annotations: [RestaurantAnnotation] = [] let request = NSFetchRequest<Restaurant>(entityName: "Restaurant") do { restaurants = try context!.fetch(request) } catch let error as NSError { print("Unsolved error when fetching data: \(error.userInfo)") } for restaurant in restaurants { let annotation = RestaurantAnnotation(restaurant: restaurant) annotations.append(annotation) } mapView.mapView.removeAnnotations(mapView.mapView.annotations) mapView.mapView.addAnnotations(annotations) } } // MARK: - Delegate extension HomeViewController: MapViewDelegate { func mapViewDidSelectAnnotation(_ annotation: MKAnnotation) { guard annotation.title != selectedResultAnnotaton.title else { return } dismissViewsAndAnnotation() if let seletedRestaurant = (restaurants.filter { $0.longitude == annotation.coordinate.longitude && $0.latitude == annotation.coordinate.latitude }.first) { self.selectedSavedRestaurant = seletedRestaurant let location = CLLocation(latitude: seletedRestaurant.latitude, longitude: seletedRestaurant.longitude) let distance = mapView.mapView.userLocation.location?.distance(from: location) ?? 0 let distanceInMile = (((distance / 1609) * 100).rounded()) / 100 let distanceString = "\(distanceInMile)" + " miles" self.restaurantDetailView.configure( with: SearchResultCellViewModel( name: seletedRestaurant.name ?? "Unknown", address: seletedRestaurant.address ?? "Unknown Address", distance: distanceString, imageURL: seletedRestaurant.imageUrl)) UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { [weak self] in guard let self = self else { return } self.restaurantDetailView.frame = CGRect( x: 0, y: self.view.frame.height - (self.view.frame.height / 2.5), width: self.view.frame.width, height: self.view.frame.height / 2.5) } } } func mapViewDidDeselectAnnotation(_ annotation: MKAnnotation) { UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { [weak self] in guard let self = self else { return } self.restaurantDetailView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } completion: { [weak self] _ in guard let self = self else { return } self.selectedSavedRestaurant = nil } } } extension HomeViewController: SearchViewControllerDelegate { func didTapSearchResult(_ result: MKPlacemark, url: URL?) { navigationController?.dismiss(animated: true, completion: { [weak self] in guard let self = self else { return } self.selectedSearchResult = result self.imageUrl = url let region = MKCoordinateRegion(center: result.coordinate, latitudinalMeters: 1000, longitudinalMeters: 1000) self.selectedResultAnnotaton.coordinate = result.coordinate self.selectedResultAnnotaton.title = result.name self.mapView.mapView.addAnnotation(self.selectedResultAnnotaton) self.mapView.mapView.setRegion(region, animated: true) self.addToListDetailView.configure( with: SearchResultCellViewModel( name: result.name ?? "Unknown", address: result.formatAddress(), distance: result.getDistanceFromUser(mapView: self.mapView.mapView), imageURL: url)) UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { self.addToListDetailView.frame = CGRect( x: 0, y: self.view.frame.height - (self.view.frame.height / 2.5), width: self.view.frame.width, height: self.view.frame.height / 2.5) } }) } } extension HomeViewController: AddToListDetailViewDelegate { func didTapCancelButton() { mapView.mapView.removeAnnotation(self.selectedResultAnnotaton) let userCoordinate = mapView.mapView.userLocation.coordinate let region = MKCoordinateRegion(center: userCoordinate, latitudinalMeters: 10000, longitudinalMeters: 10000) mapView.mapView.setRegion(region, animated: true) UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { [weak self] in guard let self = self else { return } self.addToListDetailView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } completion: { [weak self] _ in guard let self = self else { return } self.selectedSearchResult = nil self.imageUrl = nil } } func didTapSaveButton() { mapView.mapView.removeAnnotation(self.selectedResultAnnotaton) selectedResultAnnotaton.title = nil let savedLongitudes = restaurants.map { return $0.longitude } let savedlatitudes = restaurants.map { return $0.latitude } if !(savedLongitudes.contains(selectedSearchResult!.coordinate.longitude) && savedlatitudes.contains(selectedSearchResult!.coordinate.latitude)) { Persistence.shared.createRestaurantWith(placeMark: selectedSearchResult!, imageUrl: imageUrl, using: context!) fetchData() } UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { [weak self] in guard let self = self else { return } self.addToListDetailView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } completion: { [weak self] _ in guard let self = self else { return } self.selectedSearchResult = nil self.imageUrl = nil } } } extension HomeViewController: RestaurantDetailDetailViewDelegate { func didTapDeleteButton() { context?.delete(selectedSavedRestaurant!) do { try context?.save() print("Sucessfully saved to Core Data") } catch { fatalError("Unsolved error when saving data") } fetchData() UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { [weak self] in guard let self = self else { return } self.restaurantDetailView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } completion: { [weak self] _ in guard let self = self else { return } self.selectedSavedRestaurant = nil } } } extension HomeViewController: DrawResultViewDelegate { func didTapRedrawButton() { UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { self.drawResultView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } completion: { [weak self] _ in guard let self = self else { return } self.didTapDraw() } } func didTapDismissButton() { UIView.animate( withDuration: 0.2, delay: 0, options: .curveEaseOut) { self.drawResultView.frame = CGRect( x: 0, y: self.view.frame.height, width: self.view.frame.width, height: self.view.frame.height / 2.5) } } }
[ -1 ]
334d9c7ac09da81de401ed3536940192bb839cc2
2cbb7608f3c57c62a1f2de6d828ae46a0a558c43
/Playlist/AppDelegate.swift
b7771ba69f8dbee5b7a3d91395acd3b40879436f
[]
no_license
lee1903/Playlist
b65988b905dfc81f1c71971f211b2777eb18e0dc
07c198311e23f64727c313c1e7a48865b87c40b1
refs/heads/master
2020-05-22T10:03:04.539547
2017-09-16T02:07:03
2017-09-16T02:07:03
84,688,732
0
0
null
null
null
null
UTF-8
Swift
false
false
5,122
swift
// // AppDelegate.swift // Playlist // // Created by Brian Lee on 3/11/17. // Copyright © 2017 brianlee. All rights reserved. // import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var storyboard = UIStoryboard(name: "Main", bundle: nil) let clientID = "b9e60d3ffe6e4df8bbab4267ee07470f" let callbackURL = "playlist://returnafterlogin" let tokenSwapURL = "https://strawberry-pudding-60129.herokuapp.com/swap" let tokenRefreshServiceURL = "https://strawberry-pudding-60129.herokuapp.com/refresh" func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { FIRApp.configure() NotificationCenter.default.addObserver(self, selector: #selector(AppDelegate.displayPlayerView), name: NSNotification.Name(rawValue: "createPlaylistSessionSuccessful"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(AppDelegate.displayCreateJoinSessionView), name: NSNotification.Name(rawValue: "userEndedSession"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(AppDelegate.displayLoginView), name: NSNotification.Name(rawValue: "userLoggedOut"), object: nil) if !SpotifyClient.sharedInstance.authenticateSpotifySession() { print("user needs to login") let vc = storyboard.instantiateViewController(withIdentifier: "SpotifyLoginViewController") window?.rootViewController = vc } else if PlaylistSessionManager.sharedInstance.hasSession() { print("has playlist session") } else { let vc = storyboard.instantiateViewController(withIdentifier: "CreateJoinSessionNavController") window?.rootViewController = vc } return true } func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { if SPTAuth.defaultInstance().canHandle(url) { SPTAuth.defaultInstance().handleAuthCallback(withTriggeredAuthURL: url, callback: { (error, session) in if error != nil { print("authentication error") print(error!) return } let userDefaults = UserDefaults.standard let sessionData = NSKeyedArchiver.archivedData(withRootObject: session as Any) userDefaults.set(sessionData, forKey: "SpotifySession") userDefaults.synchronize() SpotifyClient.sharedInstance.authenticateSpotifySession() self.displayCreateJoinSessionView() }) } return false } func displayLoginView() { let vc = storyboard.instantiateViewController(withIdentifier: "SpotifyLoginViewController") window?.rootViewController = vc } func displayCreateJoinSessionView() { let vc = storyboard.instantiateViewController(withIdentifier: "CreateJoinSessionNavController") window?.rootViewController = vc } func displayPlayerView() { let vc = storyboard.instantiateInitialViewController() window?.rootViewController = vc } 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:. } }
[ -1 ]
82099a36d4cb64b0a0343985b3b184a995d458e2
e8736c7ed034ccb8da4847dcc1d2efdc09ce7ea3
/FIRBASEEMAILPASSWORDAUTHUITests/FIRBASEEMAILPASSWORDAUTHUITests.swift
548e1828060dc7ef25973a72f4f2ea9d9c8750cc
[]
no_license
NikhilBoriwaleKshatriya/FIRBASEEMAILPASSWORDAUTH
5ccf35e8fb06c4a0a3867bee0bc1a79d0ab060f1
11616243d004f9da32a609d3de70caff950c77bc
refs/heads/master
2020-03-26T10:51:55.112173
2018-08-15T06:55:06
2018-08-15T06:55:06
144,818,300
1
0
null
null
null
null
UTF-8
Swift
false
false
1,299
swift
// // FIRBASEEMAILPASSWORDAUTHUITests.swift // FIRBASEEMAILPASSWORDAUTHUITests // // Created by Nikhil Boriwale on 26/10/17. // Copyright © 2017 Webcubator. All rights reserved. // import XCTest class FIRBASEEMAILPASSWORDAUTHUITests: 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, 237599, 223269, 292901, 229414, 354342, 102441, 315433, 325675, 313388, 354346, 278571, 282671, 102446, 124974, 229425, 243763, 241717, 180279, 215095, 229431, 319543, 213051, 288829, 325695, 286787, 288835, 307269, 237638, 313415, 239689, 233548, 311373, 315468, 196687, 278607, 311377, 354386, 223317, 315477, 368732, 180317, 323678, 321632, 45154, 280676, 313446, 233578, 194667, 278637, 288878, 319599, 278642, 284789, 131190, 288890, 292987, 215165, 131199, 235661, 333968, 241809, 323730, 311447, 153752, 327834, 284827, 329884, 299166, 311459, 215204, 233635, 333990, 299176, 284840, 323761, 184498, 180409, 223418, 295099, 258233, 227517, 299197, 280767, 299202, 309443, 176325, 338118, 131270, 299208, 227525, 301255, 280779, 233678, 227536, 301270, 229591, 301271, 280792, 147679, 147680, 311520, 325857, 356575, 307431, 338151, 182503, 319719, 317676, 286957, 125166, 125170, 395511, 313595, 184574, 309504, 125184, 217352, 125192, 125197, 194832, 125200, 227601, 319764, 278805, 338196, 125204, 334104, 282908, 311582, 299294, 282912, 233761, 125215, 278817, 211239, 282920, 334121, 317738, 325930, 311596, 338217, 125225, 321839, 336177, 315698, 98611, 125236, 282938, 168251, 127292, 278843, 287040, 319812, 311622, 227655, 280903, 323914, 201037, 383309, 282959, 229716, 250196, 289109, 168280, 391521, 239973, 381286, 416103, 285031, 313703, 280938, 242027, 242028, 321901, 354671, 278895, 250227, 199030, 315768, 139641, 291193, 223611, 291194, 313726, 211327, 291200, 158087, 227721, 242059, 311692, 106893, 285074, 227730, 240020, 190870, 315798, 190872, 291225, 285083, 317851, 293275, 242079, 285089, 289185, 293281, 305572, 156069, 289195, 375211, 334259, 338359, 299449, 319931, 311739, 293309, 278974, 336319, 311744, 317889, 291266, 336323, 278979, 129484, 278988, 281038, 281039, 278992, 289229, 326093, 283088, 283089, 279000, 176602, 242138, 285152, 291297, 369121, 279009, 188899, 195044, 279014, 319976, 279017, 311787, 334315, 319986, 279030, 293368, 279033, 311800, 317949, 279042, 233987, 324098, 334345, 309770, 340489, 342537, 279053, 322057, 283154, 303635, 279060, 279061, 182802, 279066, 322077, 291359, 342560, 293420, 289328, 283185, 234037, 23093, 244279, 244280, 340539, 338491, 301635, 309831, 322119, 55880, 377419, 303693, 281165, 301647, 326229, 115287, 189016, 244311, 332379, 111197, 295518, 287327, 242274, 244326, 279143, 279150, 287345, 301688, 189054, 287359, 291455, 297600, 311944, 334473, 344714, 316044, 311950, 326288, 311953, 316048, 287379, 336531, 227991, 295575, 289435, 303772, 221853, 205469, 285348, 340645, 295591, 279207, 176810, 248494, 279215, 293552, 295598, 279218, 285362, 164532, 166581, 342705, 287412, 154295, 287418, 303802, 66243, 291529, 287434, 225996, 363212, 135888, 242385, 279249, 303826, 369365, 369366, 279253, 158424, 230105, 299737, 322269, 338658, 295653, 342757, 289511, 230120, 234216, 330473, 330476, 289517, 215790, 312046, 170735, 199415, 342775, 234233, 242428, 279293, 205566, 289534, 35584, 299777, 322302, 228099, 285443, 375552, 291584, 291591, 322312, 346889, 285450, 295688, 312076, 326413, 295698, 166677, 291605, 207639, 283418, 285467, 221980, 281378, 234276, 336678, 318247, 262952, 283431, 279337, 318251, 293673, 262957, 164655, 328495, 301872, 234290, 303921, 285493, 230198, 285496, 301883, 342846, 201534, 281407, 222017, 295745, 293702, 318279, 283466, 281426, 279379, 244569, 234330, 281434, 295769, 322396, 230238, 275294, 230239, 279393, 293729, 357219, 281444, 303973, 279398, 351078, 301919, 349025, 177002, 308075, 242540, 310132, 295797, 201590, 295799, 177018, 279418, 269179, 336765, 314240, 291713, 158594, 330627, 340865, 240517, 228232, 416649, 320394, 316299, 252812, 234382, 308111, 308113, 293780, 289691, 209820, 240543, 283551, 189349, 289704, 293801, 279465, 326571, 177074, 304050, 326580, 289720, 326586, 289723, 189373, 213956, 359365, 19398, 345030, 127945, 211913, 279499, 56270, 191445, 183254, 207839, 340960, 314343, 123880, 340967, 304104, 324587, 234476, 183276, 203758, 248815, 320495, 289773, 214009, 201721, 312313, 312317, 234499, 418819, 293894, 330759, 230411, 330766, 320526, 234513, 238611, 293911, 140311, 316441, 197658, 326684, 336930, 132140, 281647, 189487, 322609, 318515, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 336962, 160834, 314437, 349254, 238663, 300109, 207954, 234578, 250965, 205911, 339031, 296023, 314458, 156763, 281699, 230500, 285795, 250982, 322664, 228457, 279659, 318571, 234606, 300145, 230514, 238706, 187508, 279666, 300147, 312435, 302202, 285819, 314493, 285823, 234626, 279686, 222344, 285833, 285834, 234635, 228492, 318602, 337037, 177297, 162962, 187539, 347286, 324761, 285850, 296091, 119965, 234655, 302239, 300192, 339106, 306339, 234662, 300200, 3243, 208044, 302251, 322733, 324790, 300215, 64699, 294075, 228541, 339131, 343230, 283841, 148674, 283846, 148687, 290001, 189651, 316628, 279766, 189656, 339167, 310496, 298209, 304353, 279775, 279780, 304352, 228587, 279789, 290030, 316661, 234741, 208123, 279803, 292092, 228608, 234756, 322826, 242955, 177420, 312588, 318732, 126229, 318746, 320795, 320802, 130342, 304422, 130344, 130347, 292145, 298290, 208179, 312628, 345398, 300342, 159033, 222523, 286012, 181568, 279872, 193858, 294210, 300355, 372039, 304457, 230730, 345418, 337228, 296269, 222542, 234830, 238928, 296274, 331091, 150868, 314708, 283990, 357720, 300378, 300379, 316764, 230757, 281958, 134504, 306541, 284015, 234864, 296304, 312688, 230772, 327030, 314742, 290170, 224637, 337280, 243073, 290176, 314752, 179586, 306561, 294278, 296328, 296330, 298378, 318860, 304523, 9618, 112019, 279955, 306580, 234902, 314771, 282008, 224662, 318876, 282013, 290206, 343457, 148899, 298406, 282023, 245160, 241067, 279979, 314797, 286128, 279988, 286133, 284086, 259513, 310714, 284090, 228796, 302523, 54719, 302530, 292291, 228804, 280003, 306630, 310725, 300488, 300490, 306634, 310731, 339403, 234957, 337359, 329168, 312785, 222674, 329170, 302539, 310735, 280025, 310747, 239069, 144862, 286176, 187877, 310758, 320997, 280042, 280043, 191980, 300526, 329198, 337391, 282097, 296434, 308722, 191991, 40439, 286201, 300539, 288252, 210429, 359931, 290304, 245249, 228868, 292359, 218632, 230922, 323083, 294413, 359949, 304655, 323088, 329231, 282132, 302613, 316951, 175640, 374297, 282135, 222754, 306730, 312879, 230960, 288305, 290359, 239159, 323132, 235069, 157246, 288319, 288322, 280131, 349764, 282182, 194118, 288328, 292424, 292426, 124486, 333389, 224848, 349780, 290391, 128600, 196184, 235096, 306777, 230999, 212574, 345697, 204386, 300643, 300645, 312937, 204394, 224874, 243306, 312941, 138862, 206447, 310896, 294517, 314997, 290425, 339579, 337533, 325246, 333438, 235136, 280193, 282244, 239238, 288391, 282248, 323208, 286351, 188049, 239251, 323226, 229021, 302751, 198304, 282272, 245413, 282279, 298664, 212649, 317102, 286387, 286392, 302778, 306875, 280252, 280253, 282302, 323262, 286400, 321217, 296636, 323265, 280259, 239305, 296649, 212684, 241360, 313042, 286419, 333522, 241366, 282330, 294621, 282336, 325345, 294629, 337638, 333543, 181992, 153318, 12009, 288492, 323315, 34547, 67316, 286457, 284410, 313082, 200444, 288508, 282366, 286463, 319232, 288515, 249606, 282375, 323335, 284425, 116491, 216844, 282379, 284430, 300812, 161553, 124691, 118549, 116502, 278294, 321308, 321309, 341791, 282399, 241440, 339746, 282401, 186148, 186149, 216868, 241447, 315172, 333609, 294699, 284460, 280367, 282418, 319289, 280377, 321338, 413500, 280381, 345918, 241471, 280386, 325444, 280391, 153416, 315209, 325449, 159563, 280396, 307024, 325460, 237397, 341846, 317268, 241494, 284508, 300893, 307038, 370526, 276326, 282471, 296807, 292713, 282476, 292719, 313200, 296815, 325491, 313204, 317305, 317308, 339840, 315265, 280451, 325508, 327556, 333700, 188293, 67464, 305032, 325514, 350091, 350092, 282503, 243592, 311183, 315272, 315275, 282517, 294806, 350102, 294808, 337816, 214936, 239515, 333727, 298912, 319393, 214943, 294820, 118693, 219046, 333734, 284584, 313257, 292783, 126896, 300983, 343993, 288698, 98240, 214978, 280517, 280518, 214983, 153553, 24531, 231382, 323554, 292835, 190437, 292838, 294887, 317416, 174058, 298987, 278507, 311277, 296942, 124912, 327666, 278515, 325620, 239610 ]
b41cbd88278d73134bc5dd76ffb3936f4f4fdaae
afe03d0fd7e57d9f6bcb761e61eb4cb0b58f00c1
/WishList/PresentationLayer/WLSendRequestWithMemberMatchingObject.swift
830176e870a8a9ed6e50f44e5a4d202a1d6ecec9
[]
no_license
WhoAtLLC/NL-iOS
ac009c5e757a6ff38a826d93a554553681c63aca
4e50ce3bd3c42712ee930fadad9a0b4797c68428
refs/heads/master
2021-07-09T14:57:26.983133
2020-10-27T22:26:42
2020-10-27T22:26:42
206,556,519
0
0
null
null
null
null
UTF-8
Swift
false
false
1,270
swift
// // WLSendRequestWithMemberMatchingObject.swift // WishList // // Created by Dharmesh on 13/07/16. // Copyright © 2016 Harendra Singh. All rights reserved. // import Foundation class WLSendRequestWithMemberMatchingObject: WLModel { var howIntroReason = "" var whyIntroReason = "" var companiesofInterest = [Int]() var companiesOffered = [Int]() var excludedmutualcontacts = [Int]() var recipient = "" var category = "" func sendRequestWithMemberMatching(_ successCallback: @escaping SuccessCallback, errorCallback: @escaping ErrorCallback) { let task = WLServiceTask(action: ServiceAction.sendRequest) task.addArg("howIntroReason", value: howIntroReason as AnyObject) task.addArg("whyIntroReason", value: whyIntroReason as AnyObject) task.addArg("companiesofInterest", value: companiesofInterest as AnyObject) task.addArg("companiesOffered", value: companiesOffered as AnyObject) task.addArg("excludedmutualcontacts", value: excludedmutualcontacts as AnyObject) task.addArg("recipient", value: recipient as AnyObject) task.addArg("category", value: category as AnyObject) task.start(successCallback, errorCallback: errorCallback) } }
[ -1 ]
a8a7ffc3139aaf697b6a73878e6e2161f7303dd4
7c0bb4d0a979beb0acbc3a05438d5c502a62e0cf
/Park SpotTests/Park_SpotTests.swift
c4207caa730ea39fb841e2315a3495cfe31a9193
[]
no_license
bobbyrehm/ParkSpot
952ecbc1d4ec12e500271dd5d7f0268c758c776a
17aa1727293d58dbc050e38c7caaff86380def40
refs/heads/master
2016-08-11T20:26:26.974458
2015-11-25T19:37:13
2015-11-25T19:37:13
46,882,294
0
0
null
null
null
null
UTF-8
Swift
false
false
900
swift
// // Park_SpotTests.swift // Park SpotTests // // Created by Robert Rehm on 7/9/15. // Copyright (c) 2015 Rehmix. All rights reserved. // import UIKit import XCTest class Park_SpotTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. XCTAssert(true, "Pass") } func testPerformanceExample() { // This is an example of a performance test case. self.measureBlock() { // Put the code you want to measure the time of here. } } }
[ 276481, 276484, 278541, 278544, 278550, 276509, 278561, 159807, 280649, 278618, 194652, 194653, 278624, 276581, 276582, 276589, 227446, 276606, 141450, 276631, 276632, 227492, 176314, 276682, 276684, 278742, 278746, 155867, 276709, 276715, 233715, 211193, 227585, 276737, 227592, 276744, 276753, 157970, 276760, 278810, 276764, 276774, 276787, 164162, 6482, 276821, 276822, 276831, 280961, 276900, 278954, 278965, 276919, 276920, 278969, 276925, 278985, 279002, 227813, 279019, 279022, 223767, 277017, 277029, 277048, 277066, 277083, 166507, 277101, 277117, 277118, 184962, 225933, 133774, 277133, 225936, 277142, 225943, 225944, 164512, 209581, 154291, 277172, 277175, 277176, 277190, 199366, 164563, 226004, 203477, 203478, 277204, 277203, 201442, 277219, 226043, 234238, 226051, 234245, 226058, 234250, 234256, 285463, 234263, 234268, 105246, 228129, 234280, 277289, 234286, 277294, 162621, 234301, 234304, 234305, 234311, 234317, 234323, 234326, 277339, 234335, 234340, 174949, 277354, 234346, 234349, 277370, 226170, 234366, 234367, 213894, 226184, 234377, 226189, 234381, 226194, 234387, 234392, 234395, 279456, 234400, 234404, 226214, 234409, 275371, 234419, 234425, 277435, 287677, 226241, 234436, 226249, 234445, 234451, 234457, 275418, 234463, 277479, 277480, 234477, 234492, 234495, 277505, 234498, 277510, 277513, 277517, 234509, 197647, 295953, 234522, 234531, 275495, 310317, 275506, 234548, 277563, 156733, 277566, 7230, 234560, 207938, 234565, 277574, 234569, 277579, 207953, 277585, 296018, 234583, 275547, 277603, 156785, 275571, 234616, 234622, 275590, 234632, 277640, 277651, 226451, 226452, 277665, 234659, 275620, 275625, 275628, 226479, 277686, 277690, 277694, 203989, 275671, 285929, 204022, 120055, 277792, 259363, 277800, 113962, 113966, 226609, 277814, 277815, 277824, 277825, 15686, 277831, 226632, 277838, 277841, 277852, 224606, 277856, 302438, 281962, 277871, 279919, 277878, 275831, 275832, 275839, 277890, 277891, 226694, 281992, 230799, 296338, 277907, 206228, 226711, 226712, 277920, 277936, 277939, 277943, 296375, 277952, 296387, 277957, 163269, 296391, 277965, 284116, 277974, 277980, 226781, 277988, 277993, 277994, 296425, 277997, 278002, 226805, 278008, 175625, 65041, 204313, 278056, 278060, 228917, 226875, 128583, 226888, 276045, 276046, 276050, 226906, 226910, 276084, 276085, 276088, 276092, 188031, 276097, 192131, 276101, 312972, 278160, 278162, 276116, 276120, 278170, 280220, 276126, 276129, 276146, 276148, 278214, 276179, 276180, 216795, 276195, 276219, 171776, 278285, 276238, 227091, 184086, 278299, 276253, 278307, 278316, 165677, 276279, 276287, 276298, 296779, 276325, 227177, 173936, 276344, 227199, 227238, 276401, 276408, 276413, 276421, 276422, 276444, 276451, 276454, 276459, 276462, 276463, 276468, 276469, 278518, 276478 ]
f9d87b63108854fed0d2d277a4bf7ae5a2e4b652
662746b9144abfe4667fcd4f121d82a54f16d75d
/Sources/piction-ios-shareEx/Extension/UIImage+Extension.swift
4a06eb9db970706dcbc64db1f78f79365f21a3cd
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
piction-protocol/piction-ios
801108fb31e808dfb0e63de4c6de45e5bfaa2b56
29889ab82aef2511fe716bc90b613dfa54e1d8ed
refs/heads/master
2020-07-31T19:21:35.766615
2020-06-05T03:00:22
2020-06-05T03:00:22
210,724,265
2
1
Apache-2.0
2020-06-05T02:24:36
2019-09-25T00:49:48
Swift
UTF-8
Swift
false
false
565
swift
// // UIImage+Extension.swift // piction-ios-shareEx // // Created by jhseo on 2019/11/07. // Copyright © 2019 Piction Network. All rights reserved. // import UIKit extension UIImage { func imageWithColor(color: UIColor, size: CGSize=CGSize(width: 1, height: 1)) -> UIImage? { UIGraphicsBeginImageContextWithOptions(size, false, 0) color.setFill() UIRectFill(CGRect(origin: CGPoint.zero, size: size)) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return image } }
[ -1 ]
ea6ad522c587e6fe052ed5f93fc1cb1b9dac7826
9749446d94ad3f6be6f6471efd605932c05f15b6
/ClothingManagement/View Controllers/NavigationViewController.swift
669130ac04e0e86c61c114bce496cf965b110425
[]
no_license
juliarodriguezdev/ClothingManagement
33b262688164d036e9da625b613b1655dac0ef49
fb2e066425812542fa3efa68ffdbf3bf5a3271d7
refs/heads/master
2020-07-23T00:44:07.488945
2019-10-04T19:27:41
2019-10-04T19:27:41
207,387,022
0
0
null
2019-10-04T19:27:42
2019-09-09T19:20:54
Swift
UTF-8
Swift
false
false
1,147
swift
// // NavigationViewController.swift // ClothingManagement // // Created by Julia Rodriguez on 10/1/19. // Copyright © 2019 Julia Rodriguez. All rights reserved. // import UIKit class NavigationViewController: UINavigationController { var user = UserController.shared.currentUser override func viewDidLoad() { super.viewDidLoad() checkGenderForUIColor(user: user) // Do any additional setup after loading the view. } func checkGenderForUIColor(user: User?) { if user?.isMale == true { navigationController?.navigationBar.barTintColor = UIColor.malePrimary UINavigationBar.appearance().tintColor = UIColor.maleAccent } else if user?.isMale == false { navigationController?.navigationBar.barTintColor = UIColor.femalePrimary UINavigationBar.appearance().tintColor = UIColor.femaleAccent } else { navigationController?.navigationBar.barTintColor = UIColor.neutralPrimary UINavigationBar.appearance().tintColor = UIColor.neutralAccent } } }
[ -1 ]
c0a08e8ff3c9c4d719c7ad492e1224ee94a26c4b
944abc385994b5dafaf671236cc804658336cdcf
/Sources/BeaconKit/Extensions/Data Extensions.swift
4a7f9f90e14eb472bd874dfd264f3c5841b30058
[ "MIT" ]
permissive
magohamote/BeaconKit
520aed6243d45195be0946c0786b0ced3792ae05
c40f343a11e6ced4a44f8689bffa3ab4338c38d1
refs/heads/master
2020-04-29T03:32:53.418057
2018-12-31T09:27:21
2018-12-31T09:27:21
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,028
swift
// // Data Extensions.swift // // Created by Igor Makarov on 19/07/2017. // import Foundation // MARK: Integer readers extension Data { func toInteger<T>() throws -> T where T: FixedWidthInteger { guard T.bitWidth / 8 == self.count else { throw BeaconParsingError.parseError } return self.withUnsafeBytes { $0.pointee } } } // MARK: Data <-> String extension Data { static func from(hex: String) -> Data { var hex = hex var data = Data() while hex.count >= 2 { let next2CharsIndex = hex.index(hex.startIndex, offsetBy: 2) let c: String = String(hex[hex.startIndex..<next2CharsIndex]) hex = String(hex[next2CharsIndex..<hex.endIndex]) var ch: UInt32 = 0 Scanner(string: c).scanHexInt32(&ch) var char = UInt8(ch) data.append(&char, count: 1) } return data } func toString() -> String { return self.map { String(format: "%02hhX", $0) }.joined() } }
[ -1 ]
775bc4c0821d3915113cb8370d9bb68e2444bb91
ab178489c5d221cd5c361bcbb6f7c4c456f79c13
/chapter_5/code/MyPlayground.playground/Contents.swift
ed22f4504862012ffabbaa3b15e49b12bb161ecc
[ "MIT" ]
permissive
packtjaniceg/Mastering-Swift-5.3_Sixth-Edition
cf935acd41edd49e973a734bcb9a2672ce1e5521
0ae76f93ea8ee2bd03d66442edd68b8af9188904
refs/heads/master
2023-01-04T08:03:42.931383
2020-11-04T18:19:12
2020-11-04T18:19:12
271,001,545
0
4
null
null
null
null
UTF-8
Swift
false
false
1,002
swift
import Cocoa var str = "Hello, playground" var cities1 = ["London", "Paris", "Seattle", "Boston", "Moscow"] var cities2 = ["London", "Tulsa", "Paris", "Boston", "Tokyo"] let diff = cities2.difference(from: cities1) for change in diff { switch change { case .remove(let offset, let element, _ ): print("Remove: " + String(offset) + " " + element) cities2.remove(at: offset) case .insert(let offset, let element, _): print("inseert: " + String(offset) + " " + element) cities2.insert(element, at: offset) } } for change in diff { switch change { case .remove(let offset, let element, _ ): print("Remove: " + String(offset) + " " + element) cities2.remove(at: offset) default: break } } print(cities2) var scores1 = [100, 81, 95, 98, 99, 65, 87] var scores2 = [100, 98, 95, 91, 83, 88, 72] let diff2 = scores2.difference(from: scores1) var newArray = scores1.applying(diff2) ?? [] print(newArray)
[ -1 ]
0f4adcde84fc34b263f4c63d39c2b7bd9f8e70c9
a7b90dc69ada06512377275297185d224ff2397f
/Bip The Guy/ViewController.swift
7b5da2c1702a15ce54e44e3677ecf2bf0326ab58
[]
no_license
bc-swift-2020s/bip-the-guy-aidanshea1
c621f324d0b2be173f31d84bd0b93f58bce0af9d
a9b01a60cc0021c6e35a2c73ad723e88a526ae17
refs/heads/master
2020-12-27T21:21:03.162451
2020-02-10T17:05:22
2020-02-10T17:05:22
238,061,597
0
0
null
null
null
null
UTF-8
Swift
false
false
3,345
swift
// // ViewController.swift // Bip The Guy // // Created by Aidan Shea on 2/3/20. // Copyright © 2020 Aidan Shea. All rights reserved. // import UIKit import AVFoundation class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { // MARK: Properties @IBOutlet weak var imageToPunch: UIImageView! var audioPlayer = AVAudioPlayer() var imagePicker = UIImagePickerController() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } // MARK: Functions func animateImage() { let bounds = self.imageToPunch.bounds let shrinkValue: CGFloat = 60 // shrink our imageToPunch by 60 pixels self.imageToPunch.bounds = CGRect(x: self.imageToPunch.bounds.origin.x + shrinkValue, y: self.imageToPunch.bounds.origin.y + shrinkValue, width: self.imageToPunch.bounds.size.width - shrinkValue, height: self.imageToPunch.bounds.size.height - shrinkValue) UIView.animate(withDuration: 0.25, delay: 0.0, usingSpringWithDamping: 0.2, initialSpringVelocity: 10, options: [], animations: { self.imageToPunch.bounds = bounds }, completion: nil) } func playSound(name: String) { if let sound = NSDataAsset(name: name) { do { try audioPlayer = AVAudioPlayer(data: sound.data) audioPlayer.play() } catch { print("😡 ERROR: \(error.localizedDescription) Could not initialize AVAudioPlayer object") } } else { print("😡 ERROR: Could not read data from file sound0") } } func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { let selectedImage = info[UIImagePickerController.InfoKey.originalImage] as! UIImage imageToPunch.image = selectedImage dismiss(animated: true, completion: nil) } func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { dismiss(animated: true, completion: nil) } func showAlert(title: String, message: String) { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) let defaultAction = UIAlertAction(title: "OK", style: .default, handler: nil) alertController.addAction(defaultAction) present(alertController, animated: true, completion: nil) } // MARK: Actions @IBAction func libraryPressed(_ sender: UIButton) { imagePicker.sourceType = .photoLibrary imagePicker.delegate = self present(imagePicker, animated: true, completion: nil) } @IBAction func cameraPressed(_ sender: UIButton) { if UIImagePickerController.isSourceTypeAvailable(.camera) { imagePicker.sourceType = .camera imagePicker.delegate = self present(imagePicker, animated: true, completion: nil) } else { showAlert(title: "Camera Not Available", message: "There is no camera available on this device.") } } @IBAction func imageTapped(_ sender: UITapGestureRecognizer) { animateImage() playSound(name: "punchSound") } }
[ -1 ]
d467b99448ef9bed4cb398adf66f3e80373fa2c9
ef43387b3a695c255db4d907d8e6094aa6e8b322
/ClosedContour_BeizerPath/ClosedContour_BeizerPath/AppDelegate.swift
dd62ff3aa17ac373b707087e39464bd4e2456f48
[]
no_license
shrawan2015/Application-Demo-StackOverFlow
9da060dbd5f0192df10f114c44363365389d3e66
c2787f55bdfcd92de33f682257785d050ee14998
refs/heads/master
2020-01-23T21:54:20.291343
2017-03-08T06:00:15
2017-03-08T06:00:15
74,732,223
1
1
null
null
null
null
UTF-8
Swift
false
false
2,204
swift
// // AppDelegate.swift // ClosedContour_BeizerPath // // Created by ShrawanKumar Sharma on 08/12/16. // Copyright © 2016 com. ClosedContour. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 278564, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 278983, 319945, 278986, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 303696, 279124, 172634, 262752, 254563, 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, 295583, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312006, 107208, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 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, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 328563, 303987, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 304013, 295822, 279438, 213902, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 66690, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 279929, 181626, 181631, 312711, 312712, 296331, 288140, 288144, 230800, 337306, 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, 288212, 222676, 288214, 280021, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 312938, 280183, 280185, 280191, 116354, 280194, 280208, 280211, 288408, 280222, 419489, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 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, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 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, 280919, 248153, 354653, 313700, 280937, 313705, 190832, 280946, 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, 289227, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 289687, 240535, 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, 322642, 314456, 281691, 314461, 281702, 281704, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 216376, 380226, 298306, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 298377, 314763, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 306694, 192008, 323084, 282127, 290321, 282130, 290325, 282133, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 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, 298822, 148946, 315211, 307027, 315221, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 315253, 315255, 339838, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 241581, 241583, 323504, 241586, 282547, 241588, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 299225, 233701, 307432, 282881, 282893, 323854, 291089, 282906, 291104, 233766, 307508, 315701, 332086, 307510, 307512, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 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, 127431, 127434, 315856, 176592, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 127466, 176620, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 283142, 127497, 233994, 135689, 127500, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 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, 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, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 226200, 234396, 234398, 291742, 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, 234449, 316370, 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, 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, 234648, 308379, 300189, 324766, 119967, 234653, 283805, 234657, 324768, 242852, 300197, 234661, 283813, 234664, 177318, 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, 275725, 349451, 349464, 415009, 283939, 259367, 283951, 292143, 300344, 243003, 283963, 226628, 300357, 283973, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 316811, 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, 316959, 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, 276052, 284253, 235097, 284255, 300638, 284258, 292452, 292454, 284263, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 284290, 325250, 284292, 292485, 292479, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 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, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 292681, 153417, 358224, 276308, 178006, 317271, 284502, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 292729, 317306, 284540, 292734, 325512, 276365, 317332, 358292, 284564, 284566, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292784, 358326, 161718, 358330, 276410, 276411, 276418, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 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, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 309491, 227571, 309494, 243960, 276735, 227583, 227587, 276739, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 113167, 309779, 317971, 309781, 277011, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 23094, 277054, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170619, 309885, 309888, 277122, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 318132, 277173, 277177, 277181, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 228069, 277223, 342760, 285417, 56043, 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, 301884, 310080, 293696, 277317, 277322, 293706, 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, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 310336, 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, 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, 64768, 310531, 285958, 138505, 228617, 318742, 277798, 130345, 113964, 285997, 285999, 113969, 318773, 318776, 286010, 417086, 286016, 302403, 294211, 384328, 294221, 294223, 326991, 179547, 146784, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 351619, 294276, 310659, 327046, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 228776, 277932, 310703, 310710, 130486, 310712, 310715, 302526, 228799, 302534, 310727, 64966, 245191, 163272, 302541, 302543, 310737, 228825, 163290, 310749, 310755, 187880, 310764, 286188, 310772, 40440, 212472, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 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, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 294776, 360317, 294785, 327554, 360322, 40851, 294811, 237470, 319390, 40865, 319394, 294817, 311209, 180142, 343983, 294831, 188340, 40886, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
77168d0e4651700d78f15df28d44c0fc817ecc9d
c570e77616dc2f2e2b9f8351d236a04632ea4c78
/HistoryViewController.swift
83f212252e17112372a2c5b90d502569b4678847
[]
no_license
kawakam/Pomodoro
52b7b3d648bb6a14fc30215d7926fb59d2e5683f
cad98d3b7063756ec672825d282a9408f845f1fd
refs/heads/master
2021-01-10T08:48:29.115152
2016-02-08T06:23:34
2016-02-08T06:23:34
51,282,412
0
0
null
null
null
null
UTF-8
Swift
false
false
2,424
swift
// // HistoryViewController.swift // Pomodoro // // Created by 川上智樹 on 2016/02/02. // Copyright © 2016年 yatuhasiumai. All rights reserved. // import UIKit class HistoryViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { var history: [Int] = [1] var tableView = UITableView() let dateLabel = UILabel() var year: Int! var month: Int! var day: Int! var hour: Int! var minute: Int! var second: Int! override func viewDidLoad() { super.viewDidLoad() tableView.delegate = self tableView.dataSource = self tableView.registerNib(UINib(nibName: "TableViewCell", bundle: nil), forCellReuseIdentifier: "myCell") } override func viewWillAppear(animated: Bool) { date() super.viewWillAppear(true) tableView.frame.size.width = view.frame.size.width tableView.frame.size.height = view.frame.size.height + 50 tableView.center.x = view.center.x tableView.center.y = view.center.y + 50 view.addSubview(tableView) } func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return history.count } func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? { return "History" } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("myCell") as! TableViewCell let historyLabel = cell.viewWithTag(1) as! UILabel historyLabel.text = dateLabel.text return cell } func date() { let now = NSDate() let calendar = NSCalendar.currentCalendar() let components = calendar.components([.Year, .Month, .Day, .Hour, .Minute, .Second], fromDate: now) year = components.year month = components.month day = components.day hour = components.hour minute = components.minute second = components.second dateLabel.text = "\(year).\(month).\(day)" } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
0671cbd79a705ff2d676b9f8baab2ceaab943691
1cdbcb3818f02638829cfc7d0142c3132be758e5
/ios/App/App/IsolatedModules/JS/JSModule.swift
80962ddf29d598edbd320e3c85fcc9488022ba98
[ "MIT" ]
permissive
airgap-it/airgap-wallet
5c73d5c56e39db1ba6e4260edc4bb0de8e5920f6
7777b54ed3d2a435a1155c419d415ad0dc7dcdd2
refs/heads/master
2023-08-18T11:11:21.512153
2023-08-08T13:44:04
2023-08-08T13:44:04
140,543,555
416
113
MIT
2023-04-27T16:02:08
2018-07-11T08:15:03
TypeScript
UTF-8
Swift
false
false
8,862
swift
// // JSModule.swift // App // // Created by Julia Samol on 06.02.23. // import Foundation import Capacitor // MARK: JSModule enum JSModule { case asset(Asset) case installed(Installed) case preview(Preview) var identifier: String { switch self { case .asset(let asset): return asset.identifier case .installed(let installed): return installed.identifier case .preview(let preview): return preview.identifier } } var namespace: String? { switch self { case .asset(let asset): return asset.namespace case .installed(let installed): return installed.namespace case .preview(let preview): return preview.namespace } } var preferredEnvironment: JSEnvironmentKind { switch self { case .asset(let asset): return asset.preferredEnvironment case .installed(let installed): return installed.preferredEnvironment case .preview(let preview): return preview.preferredEnvironment } } var sources: [String] { switch self { case .asset(let asset): return asset.files case .installed(let installed): return installed.files case .preview(let preview): return preview.files } } struct Asset: JSModuleProtocol { let identifier: String let namespace: String? let preferredEnvironment: JSEnvironmentKind let files: [String] } struct Installed: JSModuleProtocol { let identifier: String let namespace: String? let preferredEnvironment: JSEnvironmentKind let files: [String] let symbols: [String] let installedAt: String } struct Preview: JSModuleProtocol { let identifier: String let namespace: String? let preferredEnvironment: JSEnvironmentKind let files: [String] let path: URL let signature: Data } } protocol JSModuleProtocol { var identifier: String { get } var namespace: String? { get } var preferredEnvironment: JSEnvironmentKind { get } var files: [String] { get } } // MARK: JSProtocolType enum JSProtocolType: String, JSONConvertible { case offline case online case full func toJSONString() throws -> String { return try rawValue.toJSONString() } } // MARK: JSCallMethodTarget enum JSCallMethodTarget: String, JSONConvertible { case offlineProtocol case onlineProtocol case blockExplorer case v3SerializerCompanion func toJSONString() throws -> String { return try rawValue.toJSONString() } } // MARK: JSModuleAction enum JSModuleAction: JSONConvertible { private static let loadType: String = "load" private static let callMethodType: String = "callMethod" case load(Load) case callMethod(CallMethod) func toJSONString() throws -> String { switch self { case .load(let load): return try load.toJSONString() case .callMethod(let callMethod): return try callMethod.toJSONString() } } struct Load: JSONConvertible { let protocolType: JSProtocolType? let ignoreProtocols: JSArray? func toJSONString() throws -> String { let ignoreProtocols = try ignoreProtocols?.toJSONString() ?? "[]" return """ { "type": "\(JSModuleAction.loadType)", "protocolType": \(try protocolType?.toJSONString() ?? (try JSUndefined.value.toJSONString())), "ignoreProtocols": \(ignoreProtocols) } """ } } enum CallMethod: JSONConvertible { case offlineProtocol(OfflineProtocol) case onlineProtocol(OnlineProtocol) case blockExplorer(BlockExplorer) case v3SerializerCompanion(V3SerializerCompanion) func toJSONString() throws -> String { switch self { case .offlineProtocol(let offlineProtocol): return try offlineProtocol.toJSONString() case .onlineProtocol(let onlineProtocol): return try onlineProtocol.toJSONString() case .blockExplorer(let blockExplorer): return try blockExplorer.toJSONString() case .v3SerializerCompanion(let v3SerializerCompanion): return try v3SerializerCompanion.toJSONString() } } private static func toJSONStringWithPartial( target: JSCallMethodTarget, name: String, args: JSArray?, partial partialJSON: String ) throws -> String { let args = try args?.toJSONString() ?? "[]" let objectJSON = """ { "type": "\(JSModuleAction.callMethodType)", "target": \(try target.toJSONString()), "method": "\(name)", "args": \(args) } """ guard let objectData = objectJSON.data(using: .utf8), let object = try JSONSerialization.jsonObject(with: objectData) as? [String: Any], let partialData = partialJSON.data(using: .utf8), let partial = try JSONSerialization.jsonObject(with: partialData) as? [String: Any] else { throw JSError.invalidJSON } let merged = object.merging(partial, uniquingKeysWith: { $1 }) guard JSONSerialization.isValidJSONObject(merged) else { throw JSError.invalidJSON } let data = try JSONSerialization.data(withJSONObject: merged, options: []) return .init(data: data, encoding: .utf8)! } struct OfflineProtocol: JSONConvertible { let target: JSCallMethodTarget = .offlineProtocol let name: String let args: JSArray? let protocolIdentifier: String func toJSONString() throws -> String { let partial: String = """ { "protocolIdentifier": "\(protocolIdentifier)" } """ return try CallMethod.toJSONStringWithPartial(target: target, name: name, args: args, partial: partial) } } struct OnlineProtocol: JSONConvertible { let target: JSCallMethodTarget = .onlineProtocol let name: String let args: JSArray? let protocolIdentifier: String let networkID: String? func toJSONString() throws -> String { let partial: String = """ { "protocolIdentifier": "\(protocolIdentifier)", "networkId": \(try networkID?.toJSONString() ?? (try JSUndefined.value.toJSONString())) } """ return try CallMethod.toJSONStringWithPartial(target: target, name: name, args: args, partial: partial) } } struct BlockExplorer: JSONConvertible { let target: JSCallMethodTarget = .blockExplorer let name: String let args: JSArray? let protocolIdentifier: String let networkID: String? func toJSONString() throws -> String { let partial: String = """ { "protocolIdentifier": "\(protocolIdentifier)", "networkId": \(try networkID?.toJSONString() ?? (try JSUndefined.value.toJSONString())) } """ return try CallMethod.toJSONStringWithPartial(target: target, name: name, args: args, partial: partial) } } struct V3SerializerCompanion: JSONConvertible { let target: JSCallMethodTarget = .v3SerializerCompanion let name: String let args: JSArray? func toJSONString() throws -> String { return try CallMethod.toJSONStringWithPartial(target: target, name: name, args: args, partial: "{}") } } } } private extension JSArray { func replaceNullWithUndefined() -> JSArray { map { if $0 is NSNull { return JSUndefined.value } else { return $0 } } } }
[ -1 ]
dd4754c9947df9d8fb2ef7b2882d8c3c357a359e
9d3b64ca02e67d2942891e1a0212018b1ba646c0
/Wild App/Controller/MenuViewController.swift
8a696850bdcddb0bf42903f413b8904dd35d37a4
[]
no_license
herman-creator/Wild-Coffee-iOs
044f201707c50daec8301b654047d1d5170ef20d
92a47d2b9d13d1439fc3bd591a0a923559a20c2a
refs/heads/master
2022-12-17T05:04:24.515970
2020-09-10T06:09:23
2020-09-10T06:09:23
null
0
0
null
null
null
null
UTF-8
Swift
false
false
8,598
swift
// // MenuViewController.swift // Wild App // // Created by Герман Иванилов on 01.05.2020. // Copyright © 2020 Герман Иванилов. All rights reserved. // import UIKit import Firebase import Nuke class MenuViewController: UIViewController, UpdateTabBar { @IBOutlet weak var collectionView: UICollectionView! @IBOutlet weak var tableView: UITableView! @IBOutlet weak var progressIndicator: UIActivityIndicatorView! @IBOutlet weak var imageViewTopConstraint: NSLayoutConstraint! var group = Group(name: "1", avalible: true) var storage: Storage? var groupStorageRef: StorageReference? var avalibleGroupList: [Group] = [] var avalibleProductList: [Product] = [] var productInGroup: [Product] = [] var numberSelected = 0 var oldContentOffset: CGFloat = 0 override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) progressIndicator.startAnimating() // WorkWithDatabase.addSyropToDatabase() let launchedBefore = UserDefaults.standard.bool(forKey: "launchedBefore") if launchedBefore {} else { performSegue(withIdentifier: "toRegistrationFromMenu", sender: self) UserDefaults.standard.set(true, forKey: "launchedBefore") } if !Reachability.isConnectedToNetwork(){ showErrod(error: "Для работы приложения необходимо подключение к интернету, пожалуйста подключитесь к сети") } } override func viewDidLoad() { super.viewDidLoad() storage = Storage.storage() self.tableView.rowHeight = 250 tableView.dataSource = self tableView.delegate = self collectionView.delegate = self collectionView.dataSource = self collectionView.register(UINib(nibName: "TableMenuCollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "TableMenuCollectionViewCell") tableView.register(UINib(nibName: "ProductCell", bundle: nil), forCellReuseIdentifier: "ProductReusableCell") WorkWithDatabase.getAllAvalibleGroup { group, error in if group != nil{ self.avalibleGroupList.append(contentsOf: group!) DispatchQueue.main.async { self.collectionView.reloadData() } } else { self.showErrod(error: error!.localizedDescription) } } WorkWithDatabase.getAllAvalibleProduct { (products) in self.avalibleProductList.append(contentsOf: products) self.productInGroup = self.avalibleProductList.filter{$0.group == self.avalibleGroupList[self.numberSelected].name} DispatchQueue.main.async { self.tableView.reloadData() self.progressIndicator.isHidden = true } } } func updateSecondItemBadge(count: String) { tabBarController?.tabBar.items?[1].badgeValue = count } func showErrod(error: String) { let alert = UIAlertController(title: nil, message: nil, preferredStyle: .alert) let titleFont = [NSAttributedString.Key.font: UIFont(name: "SFMono-Regular", size: 17.0)!] let titleAttrString = NSMutableAttributedString(string: error, attributes: titleFont) alert.setValue(titleAttrString, forKey: "attributedMessage") alert.view.tintColor = #colorLiteral(red: 0.4348584116, green: 0.920769155, blue: 0.9059947133, alpha: 1) alert.addAction(UIAlertAction(title: "Ок", style: .default, handler: nil)) self.present(alert, animated: true, completion: nil) } } //MARK: -TableViewExtension extension MenuViewController: UITableViewDataSource, UITableViewDelegate, UIScrollViewDelegate { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { productInGroup.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "ProductReusableCell", for: indexPath) as! ProductCell cell.label!.text = productInGroup[indexPath.row].name cell.subLabel!.text = productInGroup[indexPath.row].description Nuke.loadImage(with: URL(string: productInGroup[indexPath.row].imageUrl)!, into: cell.imageForProduct) return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { performSegue(withIdentifier: "ToCardFromMenu", sender: self) tableView.deselectRow(at: indexPath, animated: true) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "ToCardFromMenu" { let destinationVC = segue.destination as! CardViewController destinationVC.delegate = self if let indexPath = tableView.indexPathForSelectedRow { destinationVC.product = self.productInGroup[indexPath.row] } } } func scrollViewDidScroll(_ scrollView: UIScrollView) { if scrollView == tableView { let contentOffset = scrollView.contentOffset.y - oldContentOffset // Scrolls UP - we compress the top view if contentOffset > 0 && scrollView.contentOffset.y > 0 { if (imageViewTopConstraint.constant - contentOffset) > -123 { imageViewTopConstraint.constant -= contentOffset scrollView.contentOffset.y -= contentOffset } } // Scrolls Down - we expand the top view if contentOffset < 0 && scrollView.contentOffset.y < 0 { if (imageViewTopConstraint.constant < 10) { if imageViewTopConstraint.constant - contentOffset > 10 { imageViewTopConstraint.constant = 10 } else { imageViewTopConstraint.constant -= contentOffset } scrollView.contentOffset.y -= contentOffset } } oldContentOffset = scrollView.contentOffset.y } } } //MARK: -CollectionViewExtension extension MenuViewController: UICollectionViewDelegate, UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { avalibleGroupList.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "TableMenuCollectionViewCell", for: indexPath) as! TableMenuCollectionViewCell if numberSelected == indexPath.row { cell.groupName?.textColor = #colorLiteral(red: 0.1298420429, green: 0.1298461258, blue: 0.1298439503, alpha: 1) cell.backView.backgroundColor = #colorLiteral(red: 0.4348584116, green: 0.920769155, blue: 0.9059947133, alpha: 1) } else { cell.groupName?.textColor = #colorLiteral(red: 0.3333333433, green: 0.3333333433, blue: 0.3333333433, alpha: 1) cell.backView.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1) } cell.groupName?.text = avalibleGroupList[indexPath.row].name return cell } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { numberSelected = indexPath.row self.productInGroup = avalibleProductList.filter{$0.group == self.avalibleGroupList[numberSelected].name} self.collectionView.reloadDataWithoutScroll() self.tableView.reloadData() } } extension UICollectionView { func reloadDataWithoutScroll() { let offset = contentOffset reloadData() layoutIfNeeded() setContentOffset(offset, animated: false) } }
[ -1 ]
0e5ce518436543a9a6e89bf0dab89115f86073cd
77f5b8dc98c816bf98a6671fdc720a844ad7f3e6
/Example/Pods/jarvis-utility-ios/jarvis-utility-ios/Classes/JarvisUtility/JRUtilityManager.swift
795b47944338a493d94b82d7db8025cc37af377b
[ "MIT" ]
permissive
prateekprem/cashbacknew
94cd012dcb17aee3a4f67e08cdad09c30231e86f
8ff19275f8f0b86a231a178678e86f3843bba193
refs/heads/master
2023-03-02T09:31:13.911446
2021-02-10T19:13:50
2021-02-10T19:13:50
337,827,228
0
0
null
null
null
null
UTF-8
Swift
false
false
300
swift
// // JRUtilityManager.swift // jarvis-utility-ios // // Created by Abhinav Kumar Roy on 05/11/18. // Copyright © 2018 One97. All rights reserved. // import UIKit @objc public class JRUtilityManager: CoreManager { @objc public static var shared : JRUtilityManager = JRUtilityManager() }
[ -1 ]
62d27907ffa0d3903bd2a7bc425cb5cc2e089964
46483e2192ec3fb34449ff9f58b15c2a478061ae
/NYTimesMostPopularArticles/Views/NYTimesArticlesListViewController.swift
5ce1b8e62592fbb7cf9de62e6c9ed0fbad6da82f
[]
no_license
farhnakhan1992/ADIB-NYTimes-Articles
7dfa8f6cfc9652e6abf84838109cfc015d84e7f9
1fd4f30037283fc2707307c1303936d559c13ccb
refs/heads/main
2023-05-06T22:20:05.134962
2021-05-28T18:19:31
2021-05-28T18:19:31
371,779,404
0
0
null
null
null
null
UTF-8
Swift
false
false
6,179
swift
// // NYTimesArticlesListViewController.swift // NYTimesMostPopularArticles // // Created by Farhan Khan on 26/05/2021. // import UIKit // MARK: - Protocols protocol ArticlesListView: AnyObject { func fethingError(with msg:String) func showNetworkError(with msg:String) func reloadTableViewArticles(ArticlesArray: [PopularArticles]?) } class NYTimesArticlesListViewController: UIViewController { // MARK: - Properties var presenter: NYTimesArticlesListViewPresenter! var mostPopularArticlesArray = [PopularArticles]() var tempMostPopularArticlesArray = [PopularArticles]() private static let CellIdentifier = "ArticleCell" @IBOutlet weak var tableView: UITableView! @IBOutlet weak var searchBar: UISearchBar! @IBOutlet weak var lblPlaceHolder: UILabel! // MARK: - Lifecycle Methods override func viewDidLoad() { super.viewDidLoad() setupUI() self.presenter.viewDidLoad() } } // MARK: - TableView Delegates & DataSource extension NYTimesArticlesListViewController: UITableViewDelegate, UITableViewDataSource{ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // tableView.isHidden = self.mostPopularArticlesArray.isEmpty self.lblPlaceHolder.isHidden = !self.mostPopularArticlesArray.isEmpty return mostPopularArticlesArray.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { guard let cell = tableView.dequeueReusableCell(withIdentifier: NYTimesArticlesListViewController.CellIdentifier, for: indexPath) as? ArticleListingCustomTableViewCell else { return ArticleListingCustomTableViewCell() } if indexPath.row < mostPopularArticlesArray.count { cell.setupCell(with: mostPopularArticlesArray[indexPath.row]) } return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.row < mostPopularArticlesArray.count { self.navigateToArticleDetailVC(with: mostPopularArticlesArray[indexPath.row]) } } } // MARK: - View Protocol extension NYTimesArticlesListViewController : ArticlesListView{ func fethingError(with msg: String) { DispatchQueue.main.async { self.lblPlaceHolder.text = msg ShowAlertViewOnTop(msg: msg) } } func showNetworkError(with msg: String) { DispatchQueue.main.async { self.lblPlaceHolder.text = msg ShowAlertViewOnTop(msg: msg) } } func reloadTableViewArticles(ArticlesArray: [PopularArticles]?) { self.mostPopularArticlesArray = ArticlesArray ?? [PopularArticles]() self.mostPopularArticlesArray = self.mostPopularArticlesArray.sorted(by: { ($0.published_date ?? "") > ($1.published_date ?? "") }) self.tempMostPopularArticlesArray = self.mostPopularArticlesArray DispatchQueue.main.async { self.tableView.reloadData() UIView.animate(withDuration: 0.5) { self.tableView.alpha = 1 } } } } // MARK: - Private Functions extension NYTimesArticlesListViewController { private func setupUI(){ self.tableView.alpha = 0 self.view.backgroundColor = .black self.title = "NY Times Most Popular" self.tableView.tableFooterView = UIView() self.lblPlaceHolder.text = "Please waiting...\nNYTimes loading your articles..." } private func navigateToArticleDetailVC(with object: PopularArticles?){ guard let vc = UIStoryboard.Articles.get(NYTimesArticleDetailViewController.self) else {return} let presenter = ArticleDetailPresenter(view: vc) vc.presenter = presenter self.resetSearhBar() //i can stop user here also if object is nil or have some other issues, but just for validation for nill values i am taking to the next screen //if you pass nil in vc.currentArticleObject = nil the next screen will still work with proper error handling //that's why i kept as optional. vc.currentArticleObject = object self.navigationController?.pushViewController(vc, animated: true) } private func filterAsPerSearch(searchText: String){ mostPopularArticlesArray = tempMostPopularArticlesArray.filter { $0.title?.localizedCaseInsensitiveContains(searchText) == true || $0.section?.localizedCaseInsensitiveContains(searchText) == true || $0.byline?.localizedCaseInsensitiveContains(searchText) == true } DispatchQueue.main.async { self.tableView.reloadData() } } private func resetSearhBar() { self.searchBar.resignFirstResponder() self.searchBar.text = nil self.mostPopularArticlesArray = self.tempMostPopularArticlesArray DispatchQueue.main.async { self.tableView.reloadData() } } } // MARK: - Search bar delegates extension NYTimesArticlesListViewController : UISearchBarDelegate { func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { if (searchBar.text?.count ?? 0) > 1{ self.filterAsPerSearch(searchText: searchBar.text ?? "") }else{ self.resetSearhBar() } } func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { if searchText == "" { self.resetSearhBar() }else{ self.filterAsPerSearch(searchText: searchText) } } func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { self.resetSearhBar() } func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { DispatchQueue.main.async { searchBar.setShowsCancelButton(true, animated: true) } } func searchBarTextDidEndEditing(_ searchBar: UISearchBar) { self.resetSearhBar() DispatchQueue.main.async { searchBar.setShowsCancelButton(false, animated: true) } } }
[ -1 ]
1365d226c04e78651e7e3c934102fcd550806657
17422ec7917666de52a95f0b10562e10b172dfb5
/ISB/InternetSoundBoard/AppDelegate.swift
abf09435f4fc70db905b93baf41a4aa611d1680c
[]
no_license
srussell123/ISB
2a8882cec519b053b828cdabe5ff51804ca6cba9
f581cfc11b5fe4782828f3cd151eedb8064ed6e4
refs/heads/master
2020-12-25T11:52:11.097784
2014-11-12T11:26:00
2014-11-12T11:26:00
null
0
0
null
null
null
null
UTF-8
Swift
false
false
629
swift
// // AppDelegate.swift // InternetSoundBoard // // Created by Christopher Martin on 11/2/14. // // import Cocoa import Foundation @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet weak var window: NSWindow! var statusItemController: StatusItemController! func applicationDidFinishLaunching(aNotification: NSNotification) { statusItemController = StatusItemController() } func applicationShouldTerminate(sender: NSApplication) -> NSApplicationTerminateReply { statusItemController = nil return NSApplicationTerminateReply.TerminateNow } }
[ -1 ]
d03023e9a71f3e64e82d8598b20ce5e0aabe38cd
41625940cb40ab5af7fb7026643d2ea2daa36a94
/finalProj/Clubs.swift
f770abd73b831b17e2d692cd4a8a4fa7b746cc1e
[]
no_license
rnelson30/finalProj
b798d8663edd66583fca6156a1ba945987e6deed
d964b38f93453e1d1868cc33263ed501171419e6
refs/heads/master
2021-01-10T05:12:32.533729
2015-12-10T07:14:10
2015-12-10T07:14:10
47,744,181
0
0
null
null
null
null
UTF-8
Swift
false
false
288
swift
// // Clubs.swift // ClubApp // // Created by Student 1 on 11/23/15. // Copyright © 2015 Matthew Orgill. All rights reserved. // import Foundation import UIKit import Parse struct Clubs { var name: String? var obj: PFObject? init(name: String?) { self.name = name } }
[ -1 ]
40c24223e8d699f2d92ea9ac80744454107b60b5
340c1e5eb42a3ab3f67e702e422bab3400d6f7be
/build/Todoey.build/Debug-iphonesimulator/Todoey.build/DerivedSources/CoreDataGenerated/DataModel/DataModel+CoreDataModel.swift
3bd0cf89af27c36d6b919624a9fbd46779e880a1
[]
no_license
dmak20/Todoey
461e6803be432b283edaa6bced30ac4b2b9764c9
9429400b610dc69b43bbe3c6c5cee2ee2b7fc969
refs/heads/master
2020-07-12T09:25:48.863018
2019-08-31T13:19:23
2019-08-31T13:19:23
204,778,723
0
0
null
null
null
null
UTF-8
Swift
false
false
197
swift
// // DataModel+CoreDataModel.swift // // // Created by Dan Makfinsky on 8/30/19. // // This file was automatically generated and should not be edited. // import Foundation import CoreData
[ -1 ]
de2f7bec23b6992238cfd6e74098d001dc3ebb36
81b920e3bd864cf1dfdf24d7c7c96b3f744df6ab
/0175-parser-builders-pt3/swift-parsing/Sources/Parsing/Parsers/Take.swift
a15ef1b90dc3798d8f1f393931475ad858bf6ddc
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
pointfreeco/episode-code-samples
6156c8929449c741d375ec1624e78ff85514ee09
00e17446f499e283aa8997a19f8b4e1bb511716d
refs/heads/main
2023-08-31T15:18:01.775334
2023-08-29T20:16:05
2023-08-29T20:16:05
113,688,516
881
342
MIT
2023-08-14T11:54:32
2017-12-09T17:39:53
Swift
UTF-8
Swift
false
false
16,705
swift
extension Parser { /// Returns a parser that runs this parser and the given parser, returning both outputs in a /// tuple. /// /// This operator is used to gather up multiple values and can bundle them into a single data type /// when used alongside the ``map(_:)`` operator. /// /// In the following example, two `Double`s are parsed using ``take(_:)-1fw8y`` before they are /// combined into a `Point`. /// /// ```swift /// struct Point { var x, y: Double } /// /// var input = "-1.5,1"[...].utf8 /// let output = Double.parser() /// .skip(",") /// .take(Double.parser()) /// .map(Point.init) /// .parse(&input) // => Point(x: -1.5, y: 1) /// precondition(Substring(input) == "") /// ``` /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a tuple. @inlinable public func take<P>( _ parser: P ) -> Parsers.Take2<Self, P> where P: Parser, P.Input == Input { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, P>( _ parser: P ) -> Parsers.Take3<Self, A, B, P> where P: Parser, P.Input == Input, Output == (A, B) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, P>( _ parser: P ) -> Parsers.Take4<Self, A, B, C, P> where P: Parser, P.Input == Input, Output == (A, B, C) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, D, P>( _ parser: P ) -> Parsers.Take5<Self, A, B, C, D, P> where P: Parser, P.Input == Input, Output == (A, B, C, D) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, D, E, P>( _ parser: P ) -> Parsers.Take6<Self, A, B, C, D, E, P> where P: Parser, P.Input == Input, Output == (A, B, C, D, E) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, D, E, F, P>( _ parser: P ) -> Parsers.Take7<Self, A, B, C, D, E, F, P> where P: Parser, P.Input == Input, Output == (A, B, C, D, E, F) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, D, E, F, G, P>( _ parser: P ) -> Parsers.Take8<Self, A, B, C, D, E, F, G, P> where P: Parser, P.Input == Input, Output == (A, B, C, D, E, F, G) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, D, E, F, G, H, P>( _ parser: P ) -> Parsers.Take9<Self, A, B, C, D, E, F, G, H, P> where P: Parser, P.Input == Input, Output == (A, B, C, D, E, F, G, H) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, D, E, F, G, H, I, P>( _ parser: P ) -> Parsers.Take10<Self, A, B, C, D, E, F, G, H, I, P> where P: Parser, P.Input == Input, Output == (A, B, C, D, E, F, G, H, I) { .init(self, parser) } /// Returns a parser that runs this parser and the given parser, returning this parser's outputs /// and the given parser's output in a flattened tuple. /// /// - Parameter parser: A parser to run immediately after this parser. /// - Returns: A parser that runs two parsers, returning both outputs in a flattened tuple. @inlinable public func take<A, B, C, D, E, F, G, H, I, J, P>( _ parser: P ) -> Parsers.Take11<Self, A, B, C, D, E, F, G, H, I, J, P> where P: Parser, P.Input == Input, Output == (A, B, C, D, E, F, G, H, I, J) { .init(self, parser) } } extension Parsers { /// A parser that runs two parsers, one after the other, and returns both outputs in a tuple. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-6f1jr`` operation, which constructs this type. public struct Take2<A, B>: Parser where A: Parser, B: Parser, A.Input == B.Input { public let a: A public let b: B @inlinable public init(_ a: A, _ b: B) { self.a = a self.b = b } @inlinable public func parse(_ input: inout A.Input) -> (A.Output, B.Output)? { let original = input guard let a = self.a.parse(&input) else { return nil } guard let b = self.b.parse(&input) else { input = original return nil } return (a, b) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-3ezb3`` operation, which constructs this type. public struct Take3<AB, A, B, C>: Parser where AB: Parser, AB.Output == (A, B), C: Parser, AB.Input == C.Input { public let ab: AB public let c: C @inlinable public init( _ ab: AB, _ c: C ) { self.ab = ab self.c = c } @inlinable public func parse(_ input: inout AB.Input) -> (A, B, C.Output)? { let original = input guard let (a, b) = self.ab.parse(&input) else { return nil } guard let c = self.c.parse(&input) else { input = original return nil } return (a, b, c) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-3thpr`` operation, which constructs this type. public struct Take4<ABC, A, B, C, D>: Parser where ABC: Parser, ABC.Output == (A, B, C), D: Parser, ABC.Input == D.Input { public let abc: ABC public let d: D @inlinable public init( _ abc: ABC, _ d: D ) { self.abc = abc self.d = d } @inlinable public func parse(_ input: inout ABC.Input) -> (A, B, C, D.Output)? { let original = input guard let (a, b, c) = self.abc.parse(&input) else { return nil } guard let d = self.d.parse(&input) else { input = original return nil } return (a, b, c, d) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output.\ /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-5qnt6`` operation, which constructs this type. public struct Take5<ABCD, A, B, C, D, E>: Parser where ABCD: Parser, ABCD.Output == (A, B, C, D), E: Parser, ABCD.Input == E.Input { public let abcd: ABCD public let e: E @inlinable public init( _ abcd: ABCD, _ e: E ) { self.abcd = abcd self.e = e } @inlinable public func parse(_ input: inout ABCD.Input) -> (A, B, C, D, E.Output)? { let original = input guard let (a, b, c, d) = self.abcd.parse(&input) else { return nil } guard let e = self.e.parse(&input) else { input = original return nil } return (a, b, c, d, e) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-74wwn`` operation, which constructs this type. public struct Take6<ABCDE, A, B, C, D, E, F>: Parser where ABCDE: Parser, ABCDE.Output == (A, B, C, D, E), F: Parser, ABCDE.Input == F.Input { public let abcde: ABCDE public let f: F @inlinable public init( _ abcde: ABCDE, _ f: F ) { self.abcde = abcde self.f = f } @inlinable public func parse(_ input: inout ABCDE.Input) -> (A, B, C, D, E, F.Output)? { let original = input guard let (a, b, c, d, e) = self.abcde.parse(&input) else { return nil } guard let f = self.f.parse(&input) else { input = original return nil } return (a, b, c, d, e, f) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-5wm45`` operation, which constructs this type. public struct Take7<ABCDEF, A, B, C, D, E, F, G>: Parser where ABCDEF: Parser, ABCDEF.Output == (A, B, C, D, E, F), G: Parser, ABCDEF.Input == G.Input { public let abcdef: ABCDEF public let g: G @inlinable public init( _ abcdef: ABCDEF, _ g: G ) { self.abcdef = abcdef self.g = g } @inlinable public func parse(_ input: inout ABCDEF.Input) -> (A, B, C, D, E, F, G.Output)? { let original = input guard let (a, b, c, d, e, f) = self.abcdef.parse(&input) else { return nil } guard let g = self.g.parse(&input) else { input = original return nil } return (a, b, c, d, e, f, g) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-9ytif`` operation, which constructs this type. public struct Take8<ABCDEFG, A, B, C, D, E, F, G, H>: Parser where ABCDEFG: Parser, ABCDEFG.Output == (A, B, C, D, E, F, G), H: Parser, ABCDEFG.Input == H.Input { public let abcdefg: ABCDEFG public let h: H @inlinable public init( _ abcdefg: ABCDEFG, _ h: H ) { self.abcdefg = abcdefg self.h = h } @inlinable public func parse(_ input: inout ABCDEFG.Input) -> (A, B, C, D, E, F, G, H.Output)? { let original = input guard let (a, b, c, d, e, f, g) = self.abcdefg.parse(&input) else { return nil } guard let h = self.h.parse(&input) else { input = original return nil } return (a, b, c, d, e, f, g, h) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-226d4`` operation, which constructs this type. public struct Take9<ABCDEFGH, A, B, C, D, E, F, G, H, I>: Parser where ABCDEFGH: Parser, ABCDEFGH.Output == (A, B, C, D, E, F, G, H), I: Parser, ABCDEFGH.Input == I.Input { public let abcdefgh: ABCDEFGH public let i: I @inlinable public init( _ abcdefgh: ABCDEFGH, _ i: I ) { self.abcdefgh = abcdefgh self.i = i } @inlinable public func parse(_ input: inout ABCDEFGH.Input) -> (A, B, C, D, E, F, G, H, I.Output)? { let original = input guard let (a, b, c, d, e, f, g, h) = self.abcdefgh.parse(&input) else { return nil } guard let i = self.i.parse(&input) else { input = original return nil } return (a, b, c, d, e, f, g, h, i) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-fbhx`` operation, which constructs this type. public struct Take10<ABCDEFGHI, A, B, C, D, E, F, G, H, I, J>: Parser where ABCDEFGHI: Parser, ABCDEFGHI.Output == (A, B, C, D, E, F, G, H, I), J: Parser, ABCDEFGHI.Input == J.Input { public let abcdefghi: ABCDEFGHI public let j: J @inlinable public init( _ abcdefghi: ABCDEFGHI, _ j: J ) { self.abcdefghi = abcdefghi self.j = j } @inlinable public func parse(_ input: inout ABCDEFGHI.Input) -> (A, B, C, D, E, F, G, H, I, J.Output)? { let original = input guard let (a, b, c, d, e, f, g, h, i) = self.abcdefghi.parse(&input) else { return nil } guard let j = self.j.parse(&input) else { input = original return nil } return (a, b, c, d, e, f, g, h, i, j) } } /// A parser that runs a parser of a tuple of outputs and another parser, one after the other, /// and returns a flattened tuple of the first parser's outputs and the second parser's output. /// /// You will not typically need to interact with this type directly. Instead you will usually use /// the ``Parser/take(_:)-5a47k`` operation, which constructs this type. public struct Take11<ABCDEFGHIJ, A, B, C, D, E, F, G, H, I, J, K>: Parser where ABCDEFGHIJ: Parser, ABCDEFGHIJ.Output == (A, B, C, D, E, F, G, H, I, J), K: Parser, ABCDEFGHIJ.Input == K.Input { public let abcdefghij: ABCDEFGHIJ public let k: K @inlinable public init( _ abcdefghij: ABCDEFGHIJ, _ k: K ) { self.abcdefghij = abcdefghij self.k = k } @inlinable public func parse(_ input: inout ABCDEFGHIJ.Input) -> (A, B, C, D, E, F, G, H, I, J, K.Output)? { let original = input guard let (a, b, c, d, e, f, g, h, i, j) = self.abcdefghij.parse(&input) else { return nil } guard let k = self.k.parse(&input) else { input = original return nil } return (a, b, c, d, e, f, g, h, i, j, k) } } }
[ -1 ]
52b9672af017ba0fc8fed6cd3815bc616acffd78
b6376cff4ff45413d03f27a459e0e3f8141957fa
/Cardspark-app/Cardspark/Cardspark/MessagesViewController.swift
6ea70b5c1e424336447ce1e99292e00b7bc4193d
[]
no_license
gmrodgers/webapps_2016
761c0f52e04a640587e2c504244ece0dc82bb408
ad92c3fe57cd7207ac0aec34841f37e5bef7cbd4
refs/heads/master
2020-05-21T10:10:58.402790
2016-06-16T22:06:48
2016-06-16T22:06:48
59,119,434
0
0
null
null
null
null
UTF-8
Swift
false
false
6,591
swift
// // MessagesViewController.swift // Cardspark // // Created by Leanne Lyons on 30/05/2016. // Copyright © 2016 Mango Productions. All rights reserved. // import UIKit import JSQMessagesViewController import Firebase class MessagesViewController: JSQMessagesViewController { // MARK: Properties var messages = [JSQMessage]() var outgoingBubbleImageView: JSQMessagesBubbleImage! var incomingBubbleImageView: JSQMessagesBubbleImage! var rootRef = FIRDatabase.database().reference() var messageRef: FIRDatabaseReference! var userIsTypingRef: FIRDatabaseReference! var usersTypingQuery: FIRDatabaseQuery! var topicId = Int() override func viewDidLoad() { super.viewDidLoad() title = "Messenger" setupBubbles() inputToolbar.contentView.leftBarButtonItem = nil automaticallyScrollsToMostRecentMessage = true self.senderId = AppState.sharedInstance.userID self.senderDisplayName = AppState.sharedInstance.displayName collectionView!.collectionViewLayout.incomingAvatarViewSize = CGSizeZero collectionView!.collectionViewLayout.outgoingAvatarViewSize = CGSizeZero messageRef = rootRef.child("messages/\(topicId)") observeMessages() } override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) observeTyping() } override func collectionView(collectionView: JSQMessagesCollectionView!, messageDataForItemAtIndexPath indexPath: NSIndexPath!) -> JSQMessageData! { return messages[indexPath.item] } override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return messages.count } private func setupBubbles() { let factory = JSQMessagesBubbleImageFactory() outgoingBubbleImageView = factory.outgoingMessagesBubbleImageWithColor( UIColor.jsq_messageBubbleBlueColor()) incomingBubbleImageView = factory.incomingMessagesBubbleImageWithColor( UIColor.jsq_messageBubbleLightGrayColor()) } override func collectionView(collectionView: JSQMessagesCollectionView!, messageBubbleImageDataForItemAtIndexPath indexPath: NSIndexPath!) -> JSQMessageBubbleImageDataSource! { let message = messages[indexPath.item] if message.senderId == senderId { return outgoingBubbleImageView } else { return incomingBubbleImageView } } override func collectionView(collectionView: JSQMessagesCollectionView!, avatarImageDataForItemAtIndexPath indexPath: NSIndexPath!) -> JSQMessageAvatarImageDataSource! { return nil } func addMessage(id: String, displayName : String, text: String, topicId: Int) { messages.append(JSQMessage(senderId: id, displayName: displayName, text: text)) } override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { let cell = super.collectionView(collectionView, cellForItemAtIndexPath: indexPath) as! JSQMessagesCollectionViewCell let message = messages[indexPath.item] if message.senderId == senderId { cell.textView!.textColor = UIColor.whiteColor() } else { cell.textView!.textColor = UIColor.blackColor() } return cell } override func didPressSendButton(button: UIButton!, withMessageText text: String!, senderId: String!, senderDisplayName: String!, date: NSDate!) { let itemRef = messageRef.childByAutoId() let messageItem = [ "text": text, "senderId": senderId, "displayName": senderDisplayName, "topicId": topicId ] itemRef.setValue(messageItem) JSQSystemSoundPlayer.jsq_playMessageSentSound() finishSendingMessage() } private func observeMessages() { let messagesQuery = messageRef.queryLimitedToLast(25) messagesQuery.observeEventType(.ChildAdded, withBlock: { snapshot in let text = snapshot.value!["text"] as! String let id = snapshot.value!["senderId"] as! String let name = snapshot.value!["displayName"] as! String let topicId = snapshot.value!["topicId"] as! Int self.addMessage(id, displayName: name, text: text, topicId: topicId) self.finishReceivingMessage() }) } // View usernames above bubbles override func collectionView(collectionView: JSQMessagesCollectionView!, attributedTextForMessageBubbleTopLabelAtIndexPath indexPath: NSIndexPath!) -> NSAttributedString! { let message = messages[indexPath.item]; // Skip if I sent this messgage if message.senderId == senderId { return nil; } // Skip if message is from previous sender if indexPath.item > 0 { let previousMessage = messages[indexPath.item - 1]; if previousMessage.senderId == message.senderId { return nil; } } return NSAttributedString(string:message.senderDisplayName) } override func collectionView(collectionView: JSQMessagesCollectionView!, layout collectionViewLayout: JSQMessagesCollectionViewFlowLayout!, heightForMessageBubbleTopLabelAtIndexPath indexPath: NSIndexPath!) -> CGFloat { let message = messages[indexPath.item] // Skip if I sent this messgage if message.senderId == senderId { return CGFloat(0.0); } // Skip if message is from previous sender if indexPath.item > 0 { let previousMessage = messages[indexPath.item - 1]; if previousMessage.senderId == message.senderId { return CGFloat(0.0); } } return kJSQMessagesCollectionViewCellLabelHeightDefault } private var localTyping = false var isTyping: Bool { get { return localTyping } set { localTyping = newValue userIsTypingRef.setValue(newValue) } } private func observeTyping() { let typingIndicatorRef = rootRef.child("typingIndicator") userIsTypingRef = typingIndicatorRef.child(senderId) userIsTypingRef.onDisconnectRemoveValue() usersTypingQuery = typingIndicatorRef.queryOrderedByValue().queryEqualToValue(true) usersTypingQuery.observeEventType(.Value, withBlock: { snapshot in // If only you are typing don't show the indicator if snapshot.childrenCount == 1 && self.isTyping { return } // If others are typing self.showTypingIndicator = snapshot.childrenCount > 0 self.scrollToBottomAnimated(true) }) } }
[ -1 ]
824ebe4b7192517245c8d98a44b86138acacdc2d
f75c515009ca80553a7c934c116bc984fc9b7216
/Tap.swift
e9393f9efb9515efd6ef9ddb92670474d838285b
[]
no_license
Dhimanswadia/ResearchKitApp
11fc5293d1ebf358ce9b77abb4666a5476ccb337
920358dcd1d32bef67cccfd108c2079788696528
refs/heads/master
2021-01-10T17:06:56.758260
2016-02-20T08:25:36
2016-02-20T08:25:36
50,968,460
0
0
null
null
null
null
UTF-8
Swift
false
false
383
swift
// // Tap.swift // Chelsea // // Created by Dhiman on 11/15/15. // Copyright © 2015 Dhiman. All rights reserved. // import Foundation import ResearchKit public var MicrophoneTask1: ORKOrderedTask { return ORKOrderedTask.twoFingerTappingIntervalTaskWithIdentifier("Tap", intendedUseDescription: "Tapping", duration: 10, options: ORKPredefinedTaskOption.ExcludeConclusion) }
[ -1 ]
3f71632c299c5b9767bfca9083c830d799fa0e99
693a397f58b29851d7cd5dc8d27a68c33600bbdb
/FinanceApplication/FinanceApplication/orglibs/Alert/EZLoading/EZLoadingActivity.swift
17cc88eeb3e132f8412ee1acd46d40ac5c2a1c2b
[]
no_license
gaoyangclub/FinanceApplicationDevelop
a5c496abcca12a031f8dc125dce07bfeae66a445
1093d828a5b3bb8d350d9e9a5b843795efb0c1c6
refs/heads/master
2021-01-17T14:43:47.750084
2017-07-02T14:55:46
2017-07-02T14:55:46
48,877,588
3
1
null
null
null
null
UTF-8
Swift
false
false
10,646
swift
// // EZLoadingActivity.swift // EZLoadingActivity // // Created by Goktug Yilmaz on 02/06/15. // Copyright (c) 2015 Goktug Yilmaz. All rights reserved. // import UIKit public struct EZLoadingActivity { public static var BackgroundColor = UIColor(red: 227/255, green: 232/255, blue: 235/255, alpha: 1.0) public static var ActivityColor = UIColor(red: 0/255, green: 0/255, blue: 0/255, alpha: 1.0) public static var TextColor = UIColor(red: 80/255, green: 80/255, blue: 80/255, alpha: 1.0) public static var FontName = "HelveticaNeue-Light" // Other possible stuff: ✓ ✓ ✔︎ ✕ ✖︎ ✘ public static var SuccessIcon = "✔︎" public static var FailIcon = "✘" public static var SuccessText = "Success" public static var FailText = "Failure" public static var SuccessColor = UIColor(red: 68/255, green: 118/255, blue: 4/255, alpha: 1.0) public static var FailColor = UIColor(red: 255/255, green: 75/255, blue: 56/255, alpha: 1.0) public static var WidthDivision: CGFloat { get { if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad { return 3.5 } else { return 1.6 } } } //========================================================================================================== // Feel free to edit these variables //========================================================================================================== // public struct Settings { // // } private static var instance: LoadingActivity? private static var hidingInProgress = false /// Disable UI stops users touch actions until EZLoadingActivity is hidden. Return success status public static func show(text: String, disableUI: Bool) -> Bool { guard instance == nil else { print("EZLoadingActivity: You still have an active activity, please stop that before creating a new one") return false } guard topMostController != nil else { print("EZLoadingActivity Error: You don't have any views set. You may be calling them in viewDidLoad. Try viewDidAppear instead.") return false } // Separate creation from showing instance = LoadingActivity(text: text, disableUI: disableUI) dispatch_async(dispatch_get_main_queue()) { instance?.showLoadingActivity() } return true } public static func showWithDelay(text: String, disableUI: Bool, seconds: Double) -> Bool { let showValue = show(text, disableUI: disableUI) delay(seconds) { () -> () in hide(success: true, animated: false) } return showValue } /// Returns success status public static func hide(success success: Bool? = nil, animated: Bool = false) -> Bool { guard instance != nil else { print("EZLoadingActivity: You don't have an activity instance") return false } guard hidingInProgress == false else { print("EZLoadingActivity: Hiding already in progress") return false } if !NSThread.currentThread().isMainThread { dispatch_async(dispatch_get_main_queue()) { instance?.hideLoadingActivity(success: success, animated: animated) } } else { instance?.hideLoadingActivity(success: success, animated: animated) } return true } private static func delay(seconds: Double, after: ()->()) { let queue = dispatch_get_main_queue() let time = dispatch_time(DISPATCH_TIME_NOW, Int64(seconds * Double(NSEC_PER_SEC))) dispatch_after(time, queue, after) } private class LoadingActivity: UIView { var textLabel: UILabel! var activityView: UIActivityIndicatorView! var icon: UILabel! var UIDisabled = false convenience init(text: String, disableUI: Bool) { let width = UIScreen.ScreenWidth / EZLoadingActivity.WidthDivision let height = width / 3 self.init(frame: CGRect(x: 0, y: 0, width: width, height: height)) center = CGPoint(x: UIScreen.mainScreen().bounds.midX, y: UIScreen.mainScreen().bounds.midY) autoresizingMask = [.FlexibleTopMargin, .FlexibleLeftMargin, .FlexibleBottomMargin, .FlexibleRightMargin] backgroundColor = EZLoadingActivity.BackgroundColor alpha = 1 layer.cornerRadius = 8 createShadow() let yPosition = frame.height/2 - 20 activityView = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.WhiteLarge) activityView.frame = CGRect(x: 10, y: yPosition, width: 40, height: 40) activityView.color = EZLoadingActivity.ActivityColor activityView.startAnimating() textLabel = UILabel(frame: CGRect(x: 60, y: yPosition, width: width - 70, height: 40)) textLabel.textColor = EZLoadingActivity.TextColor textLabel.font = UIFont(name: EZLoadingActivity.FontName, size: 30) textLabel.adjustsFontSizeToFitWidth = true textLabel.minimumScaleFactor = 0.25 textLabel.textAlignment = NSTextAlignment.Center textLabel.text = text if disableUI { UIApplication.sharedApplication().beginIgnoringInteractionEvents() UIDisabled = true } } func showLoadingActivity() { addSubview(activityView) addSubview(textLabel) topMostController!.view.addSubview(self) } func createShadow() { layer.shadowPath = createShadowPath().CGPath layer.masksToBounds = false layer.shadowColor = UIColor.blackColor().CGColor layer.shadowOffset = CGSizeMake(0, 0) layer.shadowRadius = 5 layer.shadowOpacity = 0.5 } func createShadowPath() -> UIBezierPath { let myBezier = UIBezierPath() myBezier.moveToPoint(CGPoint(x: -3, y: -3)) myBezier.addLineToPoint(CGPoint(x: frame.width + 3, y: -3)) myBezier.addLineToPoint(CGPoint(x: frame.width + 3, y: frame.height + 3)) myBezier.addLineToPoint(CGPoint(x: -3, y: frame.height + 3)) myBezier.closePath() return myBezier } func hideLoadingActivity(success success: Bool?, animated: Bool) { hidingInProgress = true if UIDisabled { UIApplication.sharedApplication().endIgnoringInteractionEvents() } var animationDuration: Double = 0 if success != nil { if success! { animationDuration = 0.5 } else { animationDuration = 1 } } icon = UILabel(frame: CGRect(x: 10, y: frame.height/2 - 20, width: 40, height: 40)) icon.font = UIFont(name: EZLoadingActivity.FontName, size: 60) icon.textAlignment = NSTextAlignment.Center if animated { textLabel.fadeTransition(animationDuration) } if success != nil { if success! { icon.textColor = EZLoadingActivity.SuccessColor icon.text = EZLoadingActivity.SuccessIcon textLabel.text = EZLoadingActivity.SuccessText } else { icon.textColor = EZLoadingActivity.FailColor icon.text = EZLoadingActivity.FailIcon textLabel.text = EZLoadingActivity.FailText } } addSubview(icon) if animated { icon.alpha = 0 activityView.stopAnimating() UIView.animateWithDuration(animationDuration, animations: { self.icon.alpha = 1 }, completion: { (value: Bool) in self.callSelectorAsync("removeFromSuperview", delay: animationDuration) instance = nil hidingInProgress = false }) } else { activityView.stopAnimating() self.callSelectorAsync("removeFromSuperview", delay: animationDuration) instance = nil hidingInProgress = false } } } } private extension UIView { /// Extension: insert view.fadeTransition right before changing content func fadeTransition(duration: CFTimeInterval) { let animation: CATransition = CATransition() animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) animation.type = kCATransitionFade animation.duration = duration self.layer.addAnimation(animation, forKey: kCATransitionFade) } } private extension NSObject { func callSelectorAsync(selector: Selector, delay: NSTimeInterval) { let timer = NSTimer.scheduledTimerWithTimeInterval(delay, target: self, selector: selector, userInfo: nil, repeats: false) NSRunLoop.mainRunLoop().addTimer(timer, forMode: NSRunLoopCommonModes) } } private extension UIScreen { class var Orientation: UIInterfaceOrientation { get { return UIApplication.sharedApplication().statusBarOrientation } } class var ScreenWidth: CGFloat { get { if UIInterfaceOrientationIsPortrait(Orientation) { return UIScreen.mainScreen().bounds.size.width } else { return UIScreen.mainScreen().bounds.size.height } } } class var ScreenHeight: CGFloat { get { if UIInterfaceOrientationIsPortrait(Orientation) { return UIScreen.mainScreen().bounds.size.height } else { return UIScreen.mainScreen().bounds.size.width } } } } private var topMostController: UIViewController? { var presentedVC = UIApplication.sharedApplication().keyWindow?.rootViewController while let pVC = presentedVC?.presentedViewController { presentedVC = pVC } return presentedVC }
[ -1 ]
9c9f4257855a100c7471559724123015afba90c6
331fef50be4be56172e01efafb7f4a5160aa6d49
/MOTV-UI-Building/MOTV_UI_BuildingApp.swift
ca868b316b86ade17573f00babdf9dbb57f71c24
[]
no_license
andrewkrechmer/MOTV-UI-Building
9549da016fb7d1b8d2ba0e62eb2a99f1f1c787eb
9f6a2cd4e74a8a7848897f094d84b70c3a018449
refs/heads/main
2023-08-31T12:40:37.761619
2021-10-21T04:23:59
2021-10-21T04:23:59
403,187,782
0
0
null
null
null
null
UTF-8
Swift
false
false
1,172
swift
// // MOTV_UI_BuildingApp.swift // MOTV-UI-Building // // Created by Andrew Krechmer on 2021-08-20. // import SwiftUI import UIKit @main struct MOTV_UI_BuildingApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate static let themeColor: Color = /*ThemeColors.colorSet.randomElement() ??*/ ThemeColors.yellow var body: some Scene { WindowGroup { EventsView() } } } class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { // -- Navigation Bar Appearance let navigationBarAppearance = UINavigationBarAppearance() navigationBarAppearance.shadowColor = .none navigationBarAppearance.titleTextAttributes = [.foregroundColor: UIColor(.primary), .font: UIFont(name: "GTAmericaTrial-ExtBdIt", size: 36) ?? UIFont.systemFont(ofSize: 36, weight: .bold)] UINavigationBar.appearance().standardAppearance = navigationBarAppearance return true } }
[ -1 ]