blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
625
content_id
stringlengths
40
40
detected_licenses
sequencelengths
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
sequencelengths
1
9.02k
dc7edd0a26819cdcb9816f00a6ab895db743351f
e38167f8ec4cfe9b6d699438091f2323c22ab2ed
/iOS/MiniVibe/MiniVibe/MiniVibeEventCollector/Events/ScreenEvent.swift
7c95ac5d1b4598a845be5fc4d74b1759e098edc8
[]
no_license
boostcamp-2020/Project01-A-User-Event-Collector
91a64cc7f8d442e392739172268de1408e50bd2c
a5eb041a65696b776ef535e15ef890b07b148b6e
refs/heads/dev
2023-02-19T02:09:35.491463
2021-01-12T08:52:16
2021-01-12T08:52:16
313,338,477
11
4
null
2021-01-12T08:52:17
2020-11-16T15:04:02
TypeScript
UTF-8
Swift
false
false
1,192
swift
// // ScreenEvent.swift // MiniVibe // // Created by 강병민 on 2020/12/06. // import Foundation import DiveEventCollector struct ScreenEvent: Event { var name: String var createdAt: String? var metadata: [String: String]? enum ScreenType: String { case today, chart, search, library case playlist, magazine case thumbnailList case djStationList case searchBefore, searchAfter case error } private init(name: String, metadata: [String: String]? = nil) { self.name = name self.createdAt = Date().convertToStringForWeb() self.metadata = metadata } static func screenViewed(_ type: ScreenType) -> ScreenEvent { return ScreenEvent(name: "\(type)Viewed") } static func screenViewedWithSource(_ type: ScreenType, source: ScreenType) -> ScreenEvent { return ScreenEvent(name: "\(type)Viewed", metadata: ["from": "\(source)"]) } //재생 화면은 좀 더 신경 써야해서 따로 빼놨습니다. static let playerPushed = ScreenEvent(name: "playerPushed") static let playerPopped = ScreenEvent(name: "playerPopped") }
[ -1 ]
8fde8cc17711b19960940a0d5268ae83ed6602f6
e9c90650d7e49444988bcb68854e16407268bee5
/UBIBadgeView/UBIBadgeView.swift
620075285df141006020940e6ecdd60a81545baf
[ "MIT" ]
permissive
ubiregiinc/UBIBadgeView
9d9dabef6d9f678add9b1bdce97c3919c1467612
6b86f59fca612439a291535dd7ee0772b326733e
refs/heads/master
2023-07-20T22:55:11.144163
2023-07-14T04:18:08
2023-07-14T04:18:08
126,419,385
1
2
MIT
2023-07-14T04:18:10
2018-03-23T02:04:21
Swift
UTF-8
Swift
false
false
5,489
swift
// // UBIBadgeView.swift // // Created by Yuki Yasoshima on 2017/05/24. // Copyright © 2017 Ubiregi inc. All rights reserved. // import UIKit @objc(UBIBadgeView) @IBDesignable open class UBIBadgeView: UIView { private let frameView: UIView = UIView() private let label = UBIBadgeViewLabel() public enum Alignment { case center case left case right } override public init(frame: CGRect) { super.init(frame: frame) commonInit() } required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) commonInit() } private func commonInit() { self.addSubview(self.frameView) self.addSubview(self.label) self.label.textAlignment = .center self.label.font = self.font self.label.textColor = self.textColor self.label.layoutBlock = { [weak self] in self?.updateLayout() } self.updateText() self.frameView.layer.backgroundColor = self.frameBackgroundColor.cgColor self.frameView.layer.borderColor = self.frameBorderColor.cgColor self.frameView.layer.cornerRadius = self.cornerRadius self.frameView.layer.borderWidth = self.borderWidth } public var font: UIFont = UIFont(name: "Helvetica-Bold", size: 15.0)! { didSet { self.label.font = font self.label.sizeToFit() } } @IBInspectable public var textColor: UIColor = .white { didSet { self.label.textColor = textColor } } @IBInspectable public var value: Int = 0 { didSet { self.updateText() } } @IBInspectable public var stringValue: String? = nil { didSet { self.updateText() } } @IBInspectable public var frameBackgroundColor: UIColor = .orange { didSet { self.frameView.layer.backgroundColor = frameBackgroundColor.cgColor } } @IBInspectable public var frameBorderColor: UIColor = .white { didSet { self.frameView.layer.borderColor = frameBorderColor.cgColor } } @IBInspectable public var cornerRadius: CGFloat = 10.5 { didSet { self.frameView.layer.cornerRadius = cornerRadius } } @IBInspectable public var borderWidth: CGFloat = 1.0 { didSet { self.frameView.layer.borderWidth = borderWidth } } @IBInspectable public var minWidth: CGFloat = 23 { didSet { self.updateLayout() } } @IBInspectable public var isHiddenIfZero: Bool = false { didSet { self.updateHiddenSubviews() } } @IBInspectable public var paddingWidth: CGFloat = 14.0 { didSet { self.updateLayout() } } @IBInspectable public var paddingHeight: CGFloat = 4.0 { didSet { self.updateLayout() } } public var alignment: Alignment = .center { didSet { self.updateLayout(); } } private func updateText() { if let stringValue = self.stringValue { self.label.text = stringValue } else if self.value >= 1000 { self.label.text = "999+" } else { self.label.text = String(self.value) } self.label.sizeToFit() self.updateHiddenSubviews() } private func updateLayout() { let labelSize = self.label.frame.size; let frameSize = CGSize(width: max(labelSize.width + self.paddingWidth, self.minWidth), height: labelSize.height + self.paddingHeight) self.frameView.frame.size = frameSize let center = self.convert(self.center, from: self.superview) switch self.alignment { case .center: self.frameView.center = center self.label.center = center case .left: let position = CGPoint(x: center.x + frameSize.width * 0.5, y: center.y) self.frameView.center = position self.label.center = position case .right: let position = CGPoint(x: center.x - frameSize.width * 0.5, y: center.y) self.frameView.center = position self.label.center = position } self.frameView.frame = self.roundFrame(self.frameView.frame) self.label.frame = self.roundFrame(self.label.frame) } private func updateHiddenSubviews() { if self.isHiddenIfZero && self.value == 0 { self.frameView.isHidden = true self.label.isHidden = true } else { self.frameView.isHidden = false self.label.isHidden = false } } private func roundFrame(_ rect: CGRect) -> CGRect { return CGRect(x: self.roundPosition(rect.origin.x), y: self.roundPosition(rect.origin.y), width: rect.size.width, height: rect.size.height) } private func roundPosition(_ pos: CGFloat) -> CGFloat { let scale = UIScreen.main.scale return round(pos * scale) / scale } } class UBIBadgeViewLabel: UILabel { var layoutBlock: (() -> Void)? override func layoutSubviews() { super.layoutSubviews() if let block = self.layoutBlock { block() } } }
[ -1 ]
64a01175f331bb14d9962b90da17068641dd2bb8
5726a80d3987ddd6f1ff78f6c6877954b9873ba0
/Module/History/Presenter/HistoryPresenter.swift
6318cb7b47f033dfe0a6b0f1834adb1197de9c77
[]
no_license
Jerryshen170918/InterviewDemo
0dba5187b2d2502884e45939405ae15c5dcc4e96
69a1c328de0edbdc973f49a99b84c202256df11c
refs/heads/main
2023-01-15T13:03:13.483471
2020-10-29T11:02:56
2020-10-29T11:12:17
308,300,442
0
0
null
null
null
null
UTF-8
Swift
false
false
3,871
swift
// // HistoryPresenter.swift // JerryDemo // // Created by Jerryshen on 2020/10/29. // import UIKit class HistoryPresenter: NSObject { weak var vc : HistoryController? /// 数据源 var dataArr = [(addtime : String , responses: [DisplayModel])]() init(vc : HistoryController) { self.vc = vc super.init() tableViewConfig() loadAllInfo() } /// 表的配置 private func tableViewConfig(){ /// 注册cell self.vc?.tableView.register(DisplayCell.self, forCellReuseIdentifier: DisplayCell.description()) /// 注册头部信息 self.vc?.tableView.register(HistoryHeadView.self, forHeaderFooterViewReuseIdentifier: HistoryHeadView.description()) /// 设置代理 self.vc?.tableView.delegate = self self.vc?.tableView.dataSource = self } /// 刷新cell private func refresh(cell : DisplayCell , model : DisplayModel){ cell.nameLbl.text = "name:" + model.name cell.urlLbl.text = "url:" + model.url } /// 刷新头部 private func refresh(head : HistoryHeadView , addtime : String){ let date = Date(timeIntervalSince1970: TimeInterval(addtime) ?? 0) let dformatter = DateFormatter() dformatter.dateFormat = "YYYY/MM/dd HH:mm:ss" head.timeLbl.text = dformatter.string(from: date) } } //MARK:数据请求 extension HistoryPresenter{ /// 从数据库中获取所有的信息 private func loadAllInfo(){ DBMsgHandle.shared.asyAllSelect { (msgs) in DispatchQueue.global().async { for msg in msgs{ let addtime = msg.addtime guard let reponseData = msg.response.data(using: .utf8) else{return} guard let object: Any = try? JSONSerialization.jsonObject(with: reponseData, options: JSONSerialization.ReadingOptions.mutableLeaves) else{return} /// 解析数据 if let dic = object as? [String : String]{ var displayModels = [DisplayModel]() for (key , value) in dic { let model = DisplayModel(name: key, url: value) displayModels.append(model) } self.dataArr.append((addtime: addtime, responses: displayModels)) /// 回到主线程 DispatchQueue.main.async { self.vc?.tableView.reloadData() } } } } } } } //MARK:表的代理 extension HistoryPresenter : UITableViewDelegate , UITableViewDataSource{ func numberOfSections(in tableView: UITableView) -> Int { return dataArr.count } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { let responses = dataArr[section].responses return responses.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: DisplayCell.description()) as! DisplayCell let model = dataArr[indexPath.section].responses[indexPath.row] refresh(cell: cell, model: model) return cell } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let headView = tableView.dequeueReusableHeaderFooterView(withIdentifier: HistoryHeadView.description()) as! HistoryHeadView refresh(head: headView , addtime: self.dataArr[section].addtime) return headView } func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 30 * ConstUtil.winScale } }
[ -1 ]
2b3e63903c9825bfa2a8ba6f276ccb31a8c457a8
dbfc418f43609d251c23198e3c9d63578c89e7bc
/BillionWallet/ChooseFeeVM.swift
3bb538359cf418855a454f8ebc7081797912d188
[ "MIT" ]
permissive
saggit/billion-wallet-ios
5338c332d66b042b284e7af55bbbbb106325bce6
f9c96e78e10b4b191497f433bdb171021db226dc
refs/heads/master
2021-09-14T23:36:07.338442
2018-05-22T10:53:03
2018-05-22T10:53:03
null
0
0
null
null
null
null
UTF-8
Swift
false
false
6,565
swift
// // ChooseFeeVM.swift // BillionWallet // // Created by Evolution Group Ltd on 30.10.2017. // Copyright © 2017 Evolution Group Ltd. All rights reserved. // import Foundation protocol ChooseFeeVMDelegate: class { func transactionIsReady(amount: String, amountLocal: String, fee: String, feeLocal: String, total: String, totalLocal: String, contactName: String?) func transactionFailedToPublish(error: Error) func transactionPublished() func didCompleteVerification() func setInsufficientFunds(_ flag: Bool) } class ChooseFeeVM { typealias LocalizedStrings = Strings.ChooseFee weak var delegate: ChooseFeeVMDelegate? private let sendTransactionProvider: SendTransactionProvider private let noteProvider: TransactionNotesProvider let tapticService: TapticService private let btcFormatter: NumberFormatter private let currency: Currency private let fiatConverter: FiatConverter private let confirmTimeFormatter: MinutesFormatter private let contactsProvider: ContactsProvider var amount: UInt64 var chosenSatPerByte: Int var contact: ContactProtocol? var userNote: String? private var fees: [FeeEstimate] private var txs: [Transaction] let estimateTime: Dynamic<String> let totalFeeSat: Dynamic<String> let totalFeeLocal: Dynamic<String> let chosenFeeSat: Dynamic<String> init(sendTransactionProvider: SendTransactionProvider, defaultsProvider: Defaults, ratesProvider: RateProviderProtocol, noteProvider: TransactionNotesProvider, confirmTimeFormatter: MinutesFormatter, tapticService: TapticService, contactsProvider: ContactsProvider ) { self.contactsProvider = contactsProvider self.sendTransactionProvider = sendTransactionProvider self.tapticService = tapticService txs = [] fees = sendTransactionProvider.feeProvider.feeEstimates self.noteProvider = noteProvider self.amount = 0 self.chosenSatPerByte = fees.last!.maxFee self.currency = defaultsProvider.currencies.first! let rateSource = DefaultRateSource(rateProvider: ratesProvider) self.fiatConverter = FiatConverter(currency: currency, ratesSource: rateSource) self.btcFormatter = Satoshi.formatter self.confirmTimeFormatter = confirmTimeFormatter self.estimateTime = Dynamic("") self.totalFeeSat = Dynamic("") self.totalFeeLocal = Dynamic("") self.chosenFeeSat = Dynamic("") } var minFee: Int { return fees.first!.minFee } var maxFee: Int { return fees.last!.maxFee } private func checkFunds( with amount: UInt64) { let isInsufficient = amount == 0 ? true : false delegate?.setInsufficientFunds(isInsufficient) } func changeSatPerByte(to value: Int) { chosenSatPerByte = value if let fee = fees.first(where: { $0.minFee <= value && $0.maxFee >= value }) { estimateTime &= confirmTimeFormatter.stringForMinutes(fee.avgTime) } chosenFeeSat &= String(format: LocalizedStrings.feeSatPerByteFormat, btcFormatter.string(for: chosenSatPerByte) ?? "NaN") let totalFee = sendTransactionProvider.totalFeeForAmount(amount, feeRate: UInt64(value)) checkFunds(with: totalFee) totalFeeSat &= btcFormatter.string(for: totalFee) ?? "NaN" totalFeeLocal &= fiatConverter.fiatStringForBtcValue(totalFee) } func prepareTransaction() { do { let txInfo = try sendTransactionProvider.prepareTransactions(amount, feeRate: UInt64(chosenSatPerByte)) self.txs = txInfo.txs let totalAmount = txInfo.totalAmount let totalFee = txInfo.totalFee let amountTotalSat = btcFormatter.string(from: NSNumber(value: totalAmount))! let amountTotalLocal = fiatConverter.fiatStringForBtcValue(totalAmount) let feeTotalSat = btcFormatter.string(from: NSNumber(value: totalFee))! let feeTotalLocal = fiatConverter.fiatStringForBtcValue(totalFee) let amountFullSat = btcFormatter.string(from: NSNumber(value: totalAmount + totalFee))! let amountFullLocal = fiatConverter.fiatStringForBtcValue(totalAmount + totalFee) Logger.info("Transactions are ready for publish: \(txs)") delegate?.transactionIsReady(amount: amountTotalSat, amountLocal: amountTotalLocal, fee: feeTotalSat, feeLocal: feeTotalLocal, total: amountFullSat, totalLocal: amountFullLocal, contactName: contact?.givenName) } catch { Logger.error(error.localizedDescription) } } func publishTransactions() { guard let _ = txs.first else { let description = LocalizedStrings.transactionFailedFormat let error = NSError(domain: "Billion", code: -1, userInfo: [NSLocalizedDescriptionKey:description]) self.delegate?.transactionFailedToPublish(error: error) return } sendTransactionProvider.registerForPublish(txs, success: { self.sendTransactionProvider.runSuccessPostPublishTasks(for: self.txs) self.setUserNote(for: [self.txs.last!]) if var contact = self.contact { self.contactsProvider.updateLastUsed(contact: &contact) } self.delegate?.transactionPublished() }, failure: { (error) in // NOTE: Set failure for last only, without NTX if let tx = self.txs.last { self.sendTransactionProvider.runFailurePostPublishTasks(for: [tx]) } self.delegate?.transactionFailedToPublish(error: error) }) } fileprivate func setUserNote(for transactions: [Transaction]) { guard let userNote = self.userNote else { return } for transaction in transactions { self.noteProvider.setUserNote(with: userNote, for: transaction.txHash) } } } extension ChooseFeeVM: PasscodeOutputDelegate { func didCompleteVerification() { delegate?.didCompleteVerification() publishTransactions() } }
[ -1 ]
54cc04b450b96233ffcf0703c1096332101ac6c6
3636a86c58dd33c5fb9276be217917afe2c65f3d
/FacePass/DisplayInfoViewController.swift
d21f90f6cba356ffe4338f9f4fa99351c25c46d7
[]
no_license
tangtantivirun/FacePass
d213e25c0cc5ae3dd62fd5882ca53fa89452bcf0
d95738d2529af5cce68b2bd5e81ede68e6a11cd4
refs/heads/master
2021-01-01T17:46:25.046746
2017-11-22T20:26:16
2017-11-22T20:26:16
98,147,561
0
0
null
null
null
null
UTF-8
Swift
false
false
2,048
swift
// // DisplayInfoViewController.swift // FacePass // // Created by Jennifer Gao on 31/7/2017. // Copyright © 2017 JT. All rights reserved. // import Foundation import UIKit import Firebase import FirebaseDatabase class DisplayInfoViewController: UIViewController { @IBOutlet weak var profileImageView: UIImageView! @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var birthdayLabel: UILabel! @IBOutlet weak var genderLabel: UILabel! @IBOutlet weak var emailLabel: UILabel! @IBOutlet weak var phoneLabel: UILabel! @IBOutlet weak var membershipIDLabel: UILabel! @IBOutlet weak var button: UIButton! @IBOutlet weak var checkEnteringButtonTapped: UIButton! var member: Member? override func viewDidLoad() { super.viewDidLoad() let ref = Database.database().reference().child("members") ref.observe(DataEventType.value, with: { (snapshot) in self.nameLabel.text = (snapshot.value as? String?)! self.birthdayLabel.text = (snapshot.value as? String?)! self.genderLabel.text = (snapshot.value as? String?)! self.emailLabel.text = (snapshot.value as? String?)! self.phoneLabel.text = (snapshot.value as? String?)! self.membershipIDLabel.text = (snapshot.value as? String?)! }) } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) if let member = member { nameLabel.text = member.name birthdayLabel.text = member.birthday genderLabel.text = member.gender.rawValue emailLabel.text = member.email phoneLabel.text = member.phone membershipIDLabel.text = member.id } } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if let identifier = segue.identifier { if identifier == "cancel" { print("Cancel button tapped") } } } }
[ -1 ]
17a021dacc2599598bbfe2842a4135af6c7dc351
3598cac6b1156d2d7d5e08e2c54e70e0cb15febd
/PichiTests/UniqueData+CoreDataProperties.swift
03ca43e4451a5e49376bf44406aed9210c43324e
[]
no_license
baydet/Pichi
06bb003e8d70f4d6d90f832ba8db8cac09c5ef0a
08ad7abc7ce1a74a6dde75a2e6e5aabe6a62a935
refs/heads/master
2020-04-05T23:48:04.413229
2016-01-11T15:33:53
2016-01-11T15:33:53
48,283,504
1
0
null
null
null
null
UTF-8
Swift
false
false
437
swift
// // UniqueData+CoreDataProperties.swift // Cingulata // // Created by Alexander Evsyuchenya on 12/16/15. // Copyright © 2015 Alexander Evsyuchenya. All rights reserved. // // Choose "Create NSManagedObject Subclass…" from the Core Data editor menu // to delete and recreate this implementation file for your updated model. // import Foundation import CoreData extension UniqueData { @NSManaged var identifier: Int64 }
[ 227684 ]
14cecbf2e65bc4d40994ae892e5b09b4bf66aeba
d048902da078b647358f942f8dd90de495ff598a
/layout_lesson/top/TopMainViewCell.swift
c592159fff1591dc6d659da9cc84830e1f5cb157
[]
no_license
TakumiFuzawa/layout_lesson
dbeee80f65b485050c2918a5a13a55cfdf2f88ba
3c75463aadd5023c2c967aeb3cf19ee072726d41
refs/heads/master
2020-12-31T22:49:45.792205
2020-02-08T04:43:35
2020-02-08T04:43:35
239,061,482
0
0
null
2020-02-08T04:43:36
2020-02-08T03:10:43
Swift
UTF-8
Swift
false
false
952
swift
// // TopMainViewCell.swift // layout_lesson // // Created by Takumi Fuzawa on 2020/02/08. // Copyright © 2020 Takumi Fuzawa. All rights reserved. // import UIKit import PGFramework protocol TopMainViewCellDelegate: NSObjectProtocol{ } extension TopMainViewCellDelegate { } // MARK: - Property class TopMainViewCell: BaseTableViewCell { weak var delegate: TopMainViewCellDelegate? = nil @IBOutlet var labelLine: UILabel! @IBOutlet var iconImage: UIImageView! } // MARK: - Life cycle extension TopMainViewCell { override func awakeFromNib() { super.awakeFromNib() iconImage.layer.cornerRadius = iconImage.frame.width / 2 iconImage.layer.borderWidth = 10 iconImage.layer.borderColor = #colorLiteral(red: 0.5843137503, green: 0.8235294223, blue: 0.4196078479, alpha: 1) } } // MARK: - Protocol extension TopMainViewCell { } // MARK: - method extension TopMainViewCell { }
[ -1 ]
aaf18e223d51694474f5b2ab808cb26573cc9003
12c95384e45f0f7a8d36ca7b3a2ecfbb379ef181
/PropertyList/AppDelegate.swift
5e2028a23cf431d733c41eb99327c2f3e290c9ed
[]
no_license
nhhuy1804/Property-List
a25c9b24a5f3eb98e7077c4e69ed411456d56774
881895cd63989f24452d02ab603e037a2134c036
refs/heads/master
2020-12-30T16:27:14.094002
2017-05-11T14:10:10
2017-05-11T14:10:10
90,981,366
0
0
null
null
null
null
UTF-8
Swift
false
false
2,164
swift
// // AppDelegate.swift // PropertyList // // Created by MrDummy on 5/11/17. // Copyright © 2017 Huy. 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, 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, 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, 131278, 278743, 278747, 295133, 155872, 131299, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189040, 172660, 287349, 189044, 189039, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 303773, 164509, 172705, 287394, 172707, 303780, 287390, 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, 213895, 304009, 304011, 230284, 304013, 295822, 213902, 279438, 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, 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, 279661, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 66690, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 337067, 165035, 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, 230763, 410987, 230768, 296305, 312692, 230773, 304505, 304506, 279929, 181626, 181631, 148865, 312711, 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, 148946, 370130, 222676, 288210, 288212, 288214, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 370146, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 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, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 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, 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, 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, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 330244, 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, 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, 281401, 289593, 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, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 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, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 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, 282514, 298898, 241556, 298901, 44948, 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, 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, 176311, 307385, 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, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 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, 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, 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, 308105, 226185, 234379, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324508, 291742, 324504, 234398, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 324522, 291754, 291756, 234410, 226220, 324527, 291760, 234414, 201650, 324531, 234417, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 226239, 234434, 324546, 324548, 234431, 226245, 234437, 234439, 234443, 291788, 193486, 234446, 193488, 275406, 316370, 234449, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 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, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 234648, 275608, 234650, 308379, 324757, 300189, 324766, 119967, 324768, 234653, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 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, 275725, 177424, 283917, 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, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 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, 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, 292433, 284247, 317015, 276052, 276053, 235097, 243290, 284249, 300638, 284251, 284253, 284255, 284258, 243293, 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, 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, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 292845, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 194649, 194654, 227423, 350304, 178273, 309346, 350302, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 227426, 227430, 276583, 350313, 301167, 350316, 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, 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, 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, 129603, 301636, 318020, 301639, 301643, 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, 285368, 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, 277368, 15224, 416639, 416640, 113538, 310147, 416648, 277385, 39817, 187274, 301972, 424853, 277405, 310179, 277411, 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, 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, 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, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 196133, 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, 301163, 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, 280021, 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 ]
a0960c07a68911eadb7128da3c31826fded94473
5b6e1835a61d56f2a236d0b225bed7cffa72136d
/Header Example/AnimatedReloadAnimator.swift
48c8d45cac96ed2767c9aaf80c87e1a9b8154ccc
[]
no_license
Banck/PagingExample
1609bde715867913e9521615b0e50cb7ccb6cb0f
d4a3e0bff6d594011929bca386d48c7de711c192
refs/heads/master
2020-04-08T19:24:28.034731
2018-11-29T11:18:05
2018-11-29T11:18:05
159,653,973
0
0
null
null
null
null
UTF-8
Swift
false
false
3,428
swift
// // AnimatedReloadAnimator.swift // Olimp // // Created by Egor Sakhabaev on 26/09/2018. // Copyright © 2018 Egor Sakhabaev. All rights reserved. // import Foundation import CollectionKit open class AnimatedReloadAnimator: Animator { static let defaultEntryTransform: CATransform3D = CATransform3DTranslate(CATransform3DScale(CATransform3DIdentity, 0.8, 0.8, 1), 0, 0, -1) static let fancyEntryTransform: CATransform3D = { var trans = CATransform3DIdentity trans.m34 = -1 / 500 return CATransform3DScale(CATransform3DRotate(CATransform3DTranslate(trans, 0, -50, -100), 0.5, 1, 0, 0), 0.8, 0.8, 1) }() let entryTransform: CATransform3D init(entryTransform: CATransform3D = defaultEntryTransform) { self.entryTransform = entryTransform super.init() } override open func delete(collectionView: CollectionView, view: UIView) { if collectionView.isReloading, collectionView.bounds.intersects(view.frame) { UIView.animate(withDuration: 0.25, animations: { view.layer.transform = self.entryTransform view.alpha = 0 }, completion: { _ in if !collectionView.visibleCells.contains(view) { view.recycleForCollectionKitReuse() view.transform = CGAffineTransform.identity view.alpha = 1 } }) } else { view.recycleForCollectionKitReuse() } } override open func insert(collectionView: CollectionView, view: UIView, at: Int, frame: CGRect) { view.bounds = frame.bounds view.center = frame.center if collectionView.isReloading, collectionView.hasReloaded, collectionView.bounds.intersects(frame) { let offsetTime: TimeInterval = TimeInterval(frame.origin.distance(collectionView.contentOffset) / 3000) view.layer.transform = entryTransform view.alpha = 0 UIView.animate(withDuration: 0.5, delay: offsetTime, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { view.transform = .identity view.alpha = 1 }) } } override open func update(collectionView: CollectionView, view: UIView, at: Int, frame: CGRect) { guard view is SportView == false else { super.update(collectionView: collectionView, view: view, at: at, frame: frame) return } if view.center != frame.center { UIView.animate(withDuration: 0.6, delay: 0, usingSpringWithDamping: 0.9, initialSpringVelocity: 0, options: [.layoutSubviews], animations: { view.center = frame.center }, completion: nil) } if view.bounds.size != frame.bounds.size { UIView.animate(withDuration: 0.6, delay: 0, usingSpringWithDamping: 0.9, initialSpringVelocity: 0, options: [.layoutSubviews], animations: { view.bounds.size = frame.bounds.size }, completion: nil) } if view.alpha != 1 || view.transform != .identity { UIView.animate(withDuration: 0.6, delay: 0, usingSpringWithDamping: 0.9, initialSpringVelocity: 0, options: [], animations: { view.transform = .identity view.alpha = 1 }, completion: nil) } } }
[ -1 ]
392fb3bf2f71b13c4a6fabbbb0a1c5b5a22a967c
c88c0eb7aeaa24da5b6dc918401947716ddc336a
/WordScramble/WordScramble/AppDelegate.swift
0c494545f21bf9bd2c32a9a26dbbc74f0d7b3e65
[]
no_license
anaelChardan/Tuto-SwiftLearning
8890d06a78ed04b38179e45745abf284c04932bd
ad33cd6613db58ce57f1180b941ba8bd80c0f6e9
refs/heads/master
2021-05-29T23:29:30.616040
2015-11-26T21:07:59
2015-11-26T21:07:59
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,108
swift
// // AppDelegate.swift // WordScramble // // Created by Ananas-Mac on 26/11/2015. // Copyright © 2015 Ananas-Mac. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { return true; } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 278564, 294950, 229415, 229417, 237613, 229422, 229426, 237618, 229428, 286774, 204856, 229432, 286778, 286776, 319544, 286791, 237640, 278605, 237646, 311375, 163920, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 327814, 131209, 417930, 303241, 311436, 319633, 286873, 286876, 311460, 32944, 327862, 286906, 180413, 286910, 131264, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 131314, 286962, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 287003, 287006, 287009, 287012, 287014, 287019, 311598, 287032, 155966, 278849, 319809, 319810, 319814, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 65943, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 279003, 279006, 172512, 279010, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 320007, 172550, 172552, 303623, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 311911, 189034, 295533, 189039, 189040, 172655, 172656, 352880, 189044, 295538, 172660, 287349, 287355, 287360, 295553, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 287377, 311957, 221850, 287386, 303773, 164509, 295583, 287390, 172702, 230045, 172705, 303780, 287394, 172707, 287398, 279208, 287400, 172714, 295595, 279212, 189102, 287409, 172721, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 287427, 312006, 107212, 172748, 287436, 172751, 295633, 172755, 303827, 279255, 172760, 279258, 287450, 213724, 189149, 303835, 303838, 279267, 312035, 295654, 279272, 312048, 312050, 230131, 205564, 295685, 230154, 33548, 312077, 295695, 369433, 295707, 328476, 295710, 303914, 279340, 205613, 279353, 230202, 222018, 295755, 377676, 287569, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304009, 304007, 304011, 230284, 304013, 279438, 213902, 295822, 189329, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 197564, 304063, 295873, 189378, 213954, 304065, 213963, 279505, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 312321, 295945, 197645, 295949, 230413, 140312, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 230465, 238658, 296004, 336964, 205895, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 164973, 279661, 279669, 337018, 279683, 222340, 296084, 238745, 304285, 238756, 205991, 165035, 337067, 165038, 238766, 238770, 304311, 230592, 279750, 230600, 230607, 148690, 279769, 304348, 279777, 304354, 296163, 279781, 304360, 279788, 320748, 279790, 304370, 320771, 312585, 296202, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 173350, 312622, 296243, 312630, 222522, 222525, 230718, 296255, 378181, 230727, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 230773, 279929, 181626, 304505, 304506, 181631, 312711, 288140, 230800, 288144, 304533, 288154, 337306, 288160, 173472, 288162, 279975, 304555, 370092, 279983, 173488, 279985, 312755, 296373, 279991, 337335, 312759, 173507, 296389, 222665, 230860, 280014, 230865, 288210, 370130, 288212, 280021, 288214, 148946, 239064, 288217, 288218, 280027, 288220, 222676, 329177, 239070, 288224, 280034, 288226, 280036, 370146, 280038, 288230, 288232, 288229, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 296446, 206336, 321022, 296450, 402942, 230916, 214535, 230919, 230923, 304651, 222752, 108066, 296488, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 280158, 181854, 370272, 403039, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 321200, 296626, 296634, 280260, 280264, 280276, 313044, 321239, 280283, 288478, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 67330, 280324, 198405, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 345921, 280388, 304968, 280393, 280402, 173907, 313176, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 288764, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 313386, 354348, 124978, 215090, 124980, 288826, 313406, 288831, 67654, 280651, 354382, 288848, 280658, 354390, 288855, 280669, 313438, 223327, 280671, 321634, 149603, 329830, 280681, 313451, 223341, 280687, 215154, 280691, 313458, 313464, 321659, 280702, 288895, 141446, 215175, 321670, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 280783, 280786, 280788, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 321842, 223539, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 240017, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 305668, 281095, 223752, 338440, 150025, 223757, 281102, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 281190, 281196, 19053, 158317, 313973, 281210, 297594, 158347, 133776, 117398, 314007, 289436, 174754, 330404, 174764, 240309, 133817, 314045, 314047, 199364, 199367, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322318, 281361, 281372, 322341, 215850, 281388, 281401, 289593, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 240535, 289687, 289694, 289696, 289724, 52163, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 289991, 249045, 290008, 363745, 298216, 126190, 216303, 322801, 257302, 363802, 199976, 199978, 298292, 257334, 380226, 281923, 298306, 224584, 224587, 224594, 216404, 150870, 224603, 265568, 281960, 306539, 290161, 216436, 306549, 298358, 306552, 290171, 298365, 290174, 224641, 281987, 265604, 298372, 281990, 298377, 142733, 298381, 224657, 306581, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 339431, 282089, 191985, 282098, 290291, 282101, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 282337, 216801, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 282402, 315174, 282410, 241450, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 307009, 241475, 307012, 315211, 282446, 315221, 282454, 323414, 315223, 241496, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 44948, 241556, 298901, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 241640, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299006, 282623, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 192596, 176213, 307287, 315482, 315483, 192605, 233567, 200801, 217188, 299109, 307303, 45163, 307307, 315502, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 307352, 299164, 184479, 184481, 315557, 184486, 307370, 184492, 307372, 307374, 307376, 299191, 176311, 307385, 307386, 184503, 176316, 258235, 307388, 307390, 184512, 307394, 299204, 184518, 323784, 307409, 176343, 299225, 233701, 184572, 282881, 184579, 282893, 291089, 282906, 233766, 282931, 176435, 168245, 307510, 315701, 151864, 332086, 307515, 282942, 307518, 151874, 282947, 282957, 110926, 323917, 233808, 323921, 315733, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 299388, 291197, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 291226, 242075, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 283062, 291254, 127417, 291260, 283069, 127421, 127429, 283080, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 160221, 176605, 242143, 291299, 242152, 291305, 176620, 127474, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 234003, 234006, 234010, 135707, 242206, 135710, 291361, 242220, 291378, 152118, 234038, 70213, 111193, 242275, 299620, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 316051, 225941, 316054, 299672, 135834, 225948, 299677, 373404, 135839, 299680, 225954, 299684, 242343, 209576, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 381677, 226037, 283382, 234231, 234236, 226045, 234239, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 242450, 234258, 242452, 234261, 201496, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 234313, 316235, 283468, 234316, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 234393, 308123, 234396, 324508, 234398, 291742, 234401, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 291754, 226220, 291756, 234414, 291760, 234417, 201650, 226230, 234422, 275384, 234428, 291773, 226239, 234431, 242623, 234434, 324548, 226245, 234437, 234439, 234443, 291788, 275406, 234446, 193486, 234449, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 234481, 234484, 234485, 234487, 234490, 234493, 234496, 316416, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 234520, 316439, 234523, 234528, 300066, 234532, 234535, 234537, 234540, 144430, 234543, 275508, 234549, 300085, 300088, 234556, 234558, 316479, 234561, 160835, 234563, 316483, 234568, 234570, 316491, 234572, 300108, 300115, 234580, 234581, 234585, 242777, 275545, 234590, 234595, 234597, 300133, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 234614, 398455, 234618, 144506, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 275594, 234634, 234636, 234640, 275602, 234643, 226453, 324757, 275606, 275608, 234647, 234648, 234650, 308373, 283805, 234653, 308379, 119967, 234657, 300189, 324766, 242852, 283813, 234661, 300197, 234664, 275626, 316596, 234687, 300226, 226500, 283844, 234692, 300229, 308420, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 300284, 275710, 300287, 300289, 300292, 300294, 275719, 177419, 300299, 283917, 242957, 275725, 177424, 349464, 283939, 259367, 283951, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 316768, 292197, 243046, 316774, 218473, 284010, 136562, 275834, 333178, 275836, 275840, 316806, 226696, 226699, 316811, 226703, 300433, 234899, 226709, 357783, 316826, 144796, 300448, 144810, 284076, 144812, 144814, 284084, 144820, 284087, 292279, 144826, 144828, 144830, 144832, 144835, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 292329, 300523, 259565, 259567, 300527, 226802, 292338, 316917, 308727, 300537, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284206, 284209, 284211, 194101, 284213, 194103, 284215, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 284234, 276043, 366155, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 284245, 284247, 317015, 235097, 243290, 284251, 284249, 284253, 243293, 284255, 300638, 284258, 292452, 177766, 284263, 292454, 284265, 292458, 284267, 292461, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 292479, 284288, 276098, 284290, 284292, 292485, 325250, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 276187, 284379, 284381, 284384, 284386, 358116, 276197, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317191, 284428, 300816, 317207, 284440, 300828, 300830, 276255, 300832, 284449, 300834, 227109, 317221, 186151, 358183, 276268, 194351, 243504, 284469, 276280, 325436, 358206, 276291, 284484, 366406, 276295, 300872, 153417, 358224, 284499, 276308, 284502, 178006, 317271, 276315, 292700, 284511, 227175, 292715, 284529, 292721, 300915, 284533, 317306, 284540, 292734, 325512, 169868, 276365, 284566, 350106, 284572, 276386, 284579, 276388, 292776, 284585, 358312, 276395, 276402, 161718, 358326, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 301015, 358360, 301017, 292828, 276446, 153568, 276448, 276452, 276455, 292843, 276460, 276464, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 325692, 178238, 276544, 284739, 276553, 194649, 227418, 309337, 194654, 227423, 178273, 227426, 276579, 194660, 227430, 276583, 292968, 309352, 276586, 301163, 309354, 276590, 227440, 284786, 276595, 292985, 301178, 292989, 292993, 301185, 301199, 350354, 350359, 276638, 153765, 284837, 227520, 227522, 301252, 227529, 301258, 276685, 276689, 301272, 276699, 194780, 309468, 301283, 317672, 276713, 243948, 194801, 227571, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 276775, 211241, 325937, 276789, 325943, 260421, 276809, 285002, 276811, 276816, 235858, 276829, 276833, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 178575, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 285098, 276907, 235955, 276917, 293304, 293314, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 317951, 309764, 121352, 236043, 317963, 342541, 55822, 113167, 317971, 309781, 55837, 227877, 227879, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 285265, 277080, 309849, 285277, 285282, 326244, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 326430, 228128, 228135, 318248, 277291, 318253, 285489, 293685, 285494, 285499, 301884, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 277368, 15224, 236408, 416639, 416640, 113538, 310147, 416648, 277385, 39817, 187274, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293877, 285686, 56313, 285690, 302073, 121850, 293882, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 277526, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 277577, 310344, 277583, 203857, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 277608, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 285831, 302218, 285835, 294026, 162964, 384148, 187542, 302231, 302233, 285852, 302237, 285854, 285862, 277671, 302248, 64682, 277678, 228526, 294063, 294065, 302258, 277687, 294072, 318651, 277695, 318657, 302275, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 204023, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 277807, 285999, 113969, 277811, 318773, 277816, 318776, 286010, 277819, 294204, 277822, 417086, 286016, 294211, 302403, 277832, 277836, 277839, 326991, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 277864, 310632, 327017, 351594, 277869, 277872, 351607, 277880, 310648, 310651, 277884, 277888, 310657, 310659, 277892, 294276, 327046, 277894, 253320, 310665, 277898, 318858, 351619, 277903, 310672, 277905, 351633, 277908, 277917, 277921, 310689, 130468, 277928, 277932, 310703, 277937, 130486, 310710, 277944, 310712, 277947, 310715, 277950, 277953, 64966, 245191, 163272, 277959, 302534, 310727, 277963, 277966, 302543, 277971, 228825, 163290, 286169, 277978, 277981, 310749, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 278003, 278006, 40440, 212472, 278009, 40443, 310780, 286203, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 286248, 278057, 40488, 294439, 40491, 294440, 294443, 294445, 310831, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 228944, 400976, 40533, 147032, 40537, 278109, 40541, 40544, 40548, 40550, 40552, 286313, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 278150, 310925, 286354, 278163, 302740, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 319171, 302789, 294599, 278216, 294601, 212690, 278227, 229076, 319187, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 294682, 278306, 294701, 278320, 319280, 319290, 229192, 302925, 237409, 360317, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 294817, 40865, 319394, 294821, 180142, 188340, 40886, 319419, 294844, 294847, 24528, 393177, 294876, 294879, 294883, 294890, 278508, 311279, 278513, 237555, 278516, 278519, 237562 ]
3b630a7e0cd949d1d30c92ab4b86ce845414f26a
ca3f275a03dad4d070696ae2958763a5aa02cfb3
/RotatingStitchesUITests/RotatingStitchesUITests.swift
8ba8299513264dba202f340cae950b82b175c37d
[]
no_license
KevinTung/Rotating-Stitches
a12716eeaa414331db8ac5ed38f9e70be883446a
60f9e1e967d5ea54a679224956c6e9d95963b81b
refs/heads/master
2021-01-17T18:48:15.894458
2016-08-05T03:45:54
2016-08-05T03:45:54
64,986,035
0
0
null
null
null
null
UTF-8
Swift
false
false
1,273
swift
// // RotatingStitchesUITests.swift // RotatingStitchesUITests // // Created by Kevin Tung on 2016/8/4. // Copyright © 2016年 Kevin Tung. All rights reserved. // import XCTest class RotatingStitchesUITests: 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, 354342, 315431, 229414, 102441, 315433, 325675, 313388, 354346, 278571, 282671, 102446, 229425, 124974, 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, 315488, 45154, 280676, 313446, 233578, 194667, 307306, 278637, 288878, 319599, 278642, 284789, 131190, 288890, 215165, 131199, 235661, 278669, 333968, 241809, 323730, 311447, 153752, 327834, 284827, 329884, 278684, 299166, 278690, 311459, 215204, 333990, 299176, 184489, 278698, 284843, 284840, 323761, 184498, 278707, 180409, 223418, 295099, 258233, 227517, 278713, 280761, 280767, 299197, 299202, 139459, 309443, 176325, 338118, 131270, 299208, 227525, 301255, 280779, 227536, 282832, 301270, 229591, 301271, 280792, 147679, 147680, 311520, 325857, 356575, 280803, 307431, 338151, 182503, 319719, 295147, 317676, 286957, 125166, 125170, 395511, 313595, 184574, 309504, 125184, 217352, 125192, 125197, 194832, 227601, 125200, 319764, 278805, 338196, 125204, 334104, 282908, 299294, 125215, 282912, 233761, 278817, 311582, 211239, 282920, 334121, 317738, 325930, 311596, 338217, 125225, 321839, 336177, 315698, 98611, 125236, 282938, 278843, 127292, 168251, 287040, 319812, 311622, 227655, 280903, 323914, 201037, 383309, 282959, 229716, 250196, 289109, 379224, 168280, 323934, 391521, 239973, 381286, 416103, 313703, 285031, 280938, 242027, 242028, 321901, 354671, 278895, 287089, 250227, 199030, 227702, 315768, 139641, 291193, 223611, 291194, 313726, 211327, 291200, 311679, 240003, 158087, 313736, 227721, 242059, 311692, 106893, 285074, 227730, 240020, 190870, 315798, 190872, 291225, 285083, 317851, 293275, 227743, 242079, 285089, 289185, 283039, 305572, 156069, 293281, 301482, 289195, 375211, 311723, 377265, 334259, 338359, 299449, 319931, 311739, 293309, 278974, 336319, 311744, 317889, 291266, 336323, 278979, 129484, 278988, 281038, 281039, 278992, 289229, 326093, 283089, 283088, 279000, 176602, 242138, 285152, 291297, 369121, 160224, 279009, 188899, 279014, 195044, 319976, 279017, 279337, 311787, 334315, 281071, 319986, 236020, 279030, 293368, 279033, 311800, 317949, 322396, 279042, 233987, 324098, 287237, 283138, 334345, 309770, 340489, 342537, 279053, 322057, 283154, 303635, 279060, 279061, 182802, 303634, 279066, 322077, 291359, 342560, 370122, 293420, 289328, 283185, 236080, 279092, 234037, 23093, 244279, 244280, 340539, 338491, 301635, 309831, 322119, 55880, 377419, 303693, 281165, 301647, 281170, 326229, 115287, 189016, 244311, 309847, 332379, 111197, 295518, 287327, 242274, 244326, 279143, 279150, 281200, 287345, 313970, 301688, 189054, 287359, 291455, 297600, 303743, 301702, 164487, 311944, 334473, 344714, 279176, 316044, 311948, 311950, 326288, 311953, 316048, 287379, 336531, 295575, 227991, 289435, 303772, 221853, 205469, 323335, 285348, 340645, 314020, 295591, 279207, 176810, 248494, 279215, 293552, 295598, 279218, 285362, 164532, 166581, 342705, 285360, 299698, 154295, 287418, 303802, 314043, 287412, 66243, 291529, 287434, 225996, 363212, 287438, 135888, 242385, 279249, 303826, 369365, 369366, 279253, 158424, 230105, 299737, 322269, 338658, 295653, 342757, 289511, 230120, 234216, 330473, 285419, 330476, 289517, 215790, 312046, 279278, 170735, 125683, 230133, 199415, 342775, 234233, 242428, 279293, 205566, 289534, 35584, 299777, 322302, 228099, 285443, 375552, 291584, 291591, 322312, 346889, 285450, 295688, 312076, 326413, 285457, 295698, 166677, 291605, 207639, 283418, 285467, 221980, 281378, 234276, 336678, 318247, 262952, 293673, 262953, 318251, 289580, 262957, 283431, 164655, 328495, 301872, 234290, 303921, 285493, 230198, 285496, 301883, 342846, 289599, 201534, 222017, 295745, 281407, 293702, 318279, 283466, 281426, 279379, 244569, 234330, 281434, 295769, 201562, 230238, 275294, 301919, 279393, 293729, 357219, 281444, 303973, 279398, 351078, 349025, 243592, 177002, 308075, 242540, 310132, 295797, 201590, 295799, 228214, 207735, 177018, 279418, 269179, 336765, 308093, 314240, 291713, 158594, 330627, 340865, 240517, 228232, 299912, 320394, 316299, 252812, 279434, 234382, 308111, 189327, 308113, 416649, 293780, 310166, 289691, 209820, 240543, 283551, 310177, 289704, 293801, 279465, 326571, 177074, 304050, 326580, 289720, 326586, 289723, 189373, 213956, 359365, 19398, 345030, 281541, 127945, 211913, 279499, 213961, 56270, 191445, 183254, 304086, 207839, 340960, 234469, 314343, 123880, 340967, 304104, 324587, 234476, 183276, 203758, 248815, 320495, 320492, 287730, 289773, 240631, 214009, 201721, 312313, 312315, 312317, 234499, 418819, 293894, 330759, 320520, 230411, 322571, 330766, 320526, 234513, 238611, 293911, 140311, 316441, 197658, 326684, 336930, 132140, 113710, 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, 281698, 281699, 230500, 285795, 250982, 322664, 228457, 279659, 318571, 234606, 230514, 238706, 187508, 279666, 300147, 312435, 302202, 285819, 292901, 314493, 285823, 150656, 234626, 279686, 222344, 285833, 285834, 234635, 228492, 318602, 337037, 177297, 162962, 187539, 347286, 308375, 324761, 285850, 296091, 119965, 234655, 302239, 300192, 339106, 306339, 234662, 300200, 3243, 208044, 302251, 322733, 238764, 249003, 294069, 324790, 300215, 64699, 294075, 228541, 339131, 343230, 283841, 148674, 283846, 312519, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 339167, 310496, 298209, 304353, 279775, 279780, 304352, 228587, 279789, 290030, 302319, 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, 279874, 216387, 300354, 372039, 300355, 304457, 230730, 345418, 337228, 296269, 222542, 234830, 238928, 294220, 296274, 331091, 150868, 314708, 283990, 224591, 357720, 318804, 300378, 300379, 314711, 294236, 316764, 314721, 230757, 281958, 314727, 134504, 306541, 327023, 234864, 296304, 312688, 316786, 230772, 314740, 327030, 284015, 314742, 310650, 224637, 306558, 337280, 243073, 179586, 314752, 306561, 294278, 296328, 296330, 298378, 318860, 314765, 368012, 304523, 9618, 112019, 279955, 306580, 234902, 292242, 282008, 224662, 314776, 314771, 318876, 282013, 290206, 343457, 148899, 314788, 298406, 282023, 245160, 241067, 279979, 314797, 279980, 286128, 173492, 286133, 284086, 279988, 259513, 310714, 284090, 228796, 302523, 54719, 302530, 292291, 228804, 310725, 306630, 280003, 300488, 300490, 306634, 310731, 339403, 234957, 337359, 329168, 312785, 222674, 329170, 302539, 310735, 280020, 280025, 310747, 239069, 144862, 286176, 187877, 310758, 320997, 280042, 280043, 191980, 300526, 329198, 337391, 282097, 296434, 308722, 40439, 191991, 286201, 300539, 288252, 210429, 359931, 312830, 290304, 245249, 228868, 323079, 218632, 292359, 230922, 323083, 302602, 294413, 359949, 304655, 323088, 329231, 282132, 302613, 316951, 175640, 374297, 282135, 302620, 222754, 306730, 312879, 230960, 288305, 290359, 239159, 323132, 235069, 157246, 288319, 288322, 280131, 349764, 282182, 194118, 288328, 292424, 292426, 286281, 124486, 333389, 224848, 349780, 290391, 128600, 196184, 235096, 306777, 239192, 212574, 345697, 204386, 300643, 300645, 282214, 312937, 204394, 224874, 243306, 312941, 138862, 206447, 310896, 294517, 314997, 290425, 288377, 339579, 337533, 325246, 333438, 280193, 282244, 239238, 288391, 282248, 286344, 323208, 179853, 286351, 188049, 239251, 229011, 280217, 323226, 179868, 229021, 302751, 198304, 282272, 245413, 282279, 298664, 298666, 317102, 286387, 300725, 286392, 302778, 306875, 280252, 280253, 282302, 323262, 286400, 321217, 296636, 280259, 323265, 282309, 239305, 296649, 280266, 212684, 306891, 302798, 9935, 241360, 282321, 313042, 286419, 333522, 241366, 280279, 282330, 18139, 294621, 280285, 282336, 325345, 321250, 294629, 337638, 333543, 181992, 153318, 12009, 282347, 288492, 282349, 323315, 67316, 34547, 286457, 284410, 313082, 200444, 288508, 282366, 286463, 319232, 288515, 249606, 282375, 280326, 284425, 300810, 116491, 216844, 282379, 284430, 300812, 280333, 161553, 124691, 278292, 118549, 116502, 282390, 284436, 278294, 325403, 321308, 321309, 341791, 241440, 282401, 339746, 282399, 186148, 186149, 216868, 241447, 315172, 333609, 286507, 294699, 284460, 280367, 300849, 282418, 280373, 282424, 319289, 280377, 321338, 282428, 280381, 345918, 413500, 241471, 280386, 325444, 280391, 153416, 315209, 325449, 159563, 280396, 307024, 325460, 237397, 341846, 317268, 241494, 188250, 284508, 300893, 307038, 370526, 237411, 284515, 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, 315272, 311183, 315275, 184207, 282517, 294806, 350102, 294808, 337816, 214936, 239515, 333727, 298912, 319393, 214943, 294820, 118693, 219046, 333734, 284584, 313257, 294824, 292783, 126896, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 24531, 231382, 323554, 292835, 190437, 292838, 294887, 317416, 174058, 313322, 278507, 298987, 296942, 311277, 124912, 327666, 278515, 325620, 239610 ]
05d208271ce62c84353d99bbead7db13a5a4e8b2
aecf13577d40de15f3492343337f02892cfe8d94
/妙汇/MHFilterView.swift
98f844f943740e4077990c32546c293c32e445bd
[]
no_license
Lisifeng/miaohui--swift
6b35e28be1d856abd2a1aa45f8fe3bc304383803
4f6ac4ff367fcedd386435f517d51ddb4880d7ec
refs/heads/master
2020-03-14T02:41:18.453967
2016-11-21T02:44:57
2016-11-21T02:44:57
null
0
0
null
null
null
null
UTF-8
Swift
false
false
7,361
swift
// // MHFilterView.swift // 妙汇 // // Created by 韩威 on 2016/10/31. // Copyright © 2016年 韩威. All rights reserved. // import UIKit class MHFilterView: UIView { var filterTitleLabel: UILabel! var indicateArrow: UIImageView! var maskBgView: UIView! var tableView: UITableView! var isOpen: Bool = false var priceList: MHCategoryPriceList? { didSet { guard priceList != nil else { return } self.tableView.reloadData() } } // MARK: - Life cycle override init(frame: CGRect) { super.init(frame: frame) //print("init with frame. self = \(self)") self.setup() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) //print("init with coder. self = \(self)") self.setup() } override func awakeFromNib() { super.awakeFromNib() } private func setup() { //print("setup self is \(self), superview is \(superview)") self.backgroundColor = UIColor.hexColor(hex: 0xfafafa) //标题 filterTitleLabel = UILabel.init() filterTitleLabel.font = UIFont.systemFont(ofSize: 14.0) filterTitleLabel.text = "价格筛选" self.addSubview(filterTitleLabel) filterTitleLabel.translatesAutoresizingMaskIntoConstraints = false let centerY = NSLayoutConstraint.init(item: filterTitleLabel, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1, constant: 0) let leading = NSLayoutConstraint.init(item: filterTitleLabel, attribute: .leading, relatedBy: .equal, toItem: self, attribute: .leading, multiplier: 1, constant: 15) self.addConstraints([centerY, leading]); //箭头 indicateArrow = UIImageView.init(image: UIImage.init(named: "downTowardsArrow")) self.addSubview(indicateArrow) indicateArrow.translatesAutoresizingMaskIntoConstraints = false let centerY2 = NSLayoutConstraint.init(item: indicateArrow, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1, constant: 0) let trailing = NSLayoutConstraint.init(item: indicateArrow, attribute: .trailing, relatedBy: .equal, toItem: self, attribute: .trailing, multiplier: 1, constant: -15) self.addConstraints([centerY2, trailing]); //遮罩 maskBgView = UIView.init() maskBgView.alpha = 0 maskBgView.backgroundColor = UIColor.black.withAlphaComponent(0.3) tableView = UITableView.init() tableView.isScrollEnabled = false tableView.dataSource = self tableView.delegate = self tableView.register(UINib.init(nibName: "MHCustomFilterPriceTableViewCell", bundle: nil), forCellReuseIdentifier: "MHCustomFilterPriceTableViewCell") let tap2 = UITapGestureRecognizer.init(target: self, action: #selector(MHFilterView.tapGes)) tap2.delegate = self //maskBgView.removeGestureRecognizer(tap2) maskBgView.addGestureRecognizer(tap2) maskBgView.addSubview(tableView) } override func layoutSubviews() { super.layoutSubviews() maskBgView.removeFromSuperview() superview?.addSubview(maskBgView) //点击事件 let tap = UITapGestureRecognizer.init(target: self, action: #selector(MHFilterView.tapGes)) //FIXME: 在 `setup()` 方法里加tap手势就不起作用 self.removeGestureRecognizer(tap) self.addGestureRecognizer(tap) maskBgView.frame = CGRect.init(x: frame.minX, y: frame.maxY, width: frame.width, height: SCREEN_HEIGHT - frame.maxY) let tableViewH: CGFloat = 0.0 tableView.frame = CGRect.init(x: 0, y: 0, width: maskBgView.frame.width, height: tableViewH) } @objc fileprivate func tapGes() { if isOpen { //关闭 UIView.animate( withDuration: 0.3, animations: { self.tableView.frame.size.height = 0 self.indicateArrow.transform = CGAffineTransform.identity }, completion: { (_) in self.maskBgView.alpha = 0 self.isOpen = false self.tableView.endEditing(true) }) } else { if self.priceList == nil { return } self.maskBgView.alpha = 1 //展开 UIView.animate( withDuration: 0.3, animations: { self.tableView.frame.size.height = CGFloat(44.0 * CGFloat(self.priceList!.price!.count + 1)) self.indicateArrow.transform = CGAffineTransform(rotationAngle: CGFloat.pi) }, completion: { (_) in self.isOpen = true }) } } } // MARK: - UITableViewDelegate UITableViewDataSource extension MHFilterView: UITableViewDelegate, UITableViewDataSource { func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { guard priceList != nil else { return 0 } return priceList!.price!.count + 1 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let rows = tableView.numberOfRows(inSection: 0) if indexPath.row == rows - 1 { let cell = tableView.dequeueReusableCell(withIdentifier: "MHCustomFilterPriceTableViewCell", for: indexPath) as! MHCustomFilterPriceTableViewCell return cell } else { var cell = tableView.dequeueReusableCell(withIdentifier: "normalCell") if cell == nil { cell = UITableViewCell.init(style: .default, reuseIdentifier: "normalCell") cell?.backgroundColor = UIColor.hexColor(hex: 0xe6e6e6) cell?.textLabel?.font = UIFont.systemFont(ofSize: 14.0) } let priceModel = priceList!.price![indexPath.row] cell?.textLabel?.text = priceModel.title return cell! } } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let priceModel = priceList!.price![indexPath.row] print("点击筛选条件 minPrice = \(priceModel.minPrice), maxPrice = \(priceModel.maxPrice)") } } // MARK: - UIGestureRecognizerDelegate extension MHFilterView: UIGestureRecognizerDelegate { func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { //print(touch.view) if touch.view == nil { return true } if NSStringFromClass(touch.view!.classForCoder) == "UITableViewCellContentView" { return false } return true } }
[ -1 ]
f1c226dcda2bd0a4f1b342ab025cc08d98ed98c5
a0a2bdaa28aebf64f088007518362a1c9a35bec4
/StarWarsViewerTests/StarWarsViewerTests.swift
aa685b0d462d8589d8c7d55884c67415f2994767
[]
no_license
maxdgodfrey/star-wars-combine-example
9db2813473f93b8f9de4acdac72e7f890e428219
cb4dd817a8d9c070b06b2dbbb68aff7c151942f2
refs/heads/main
2023-01-08T16:46:12.668033
2020-10-15T20:02:54
2020-10-15T20:02:54
304,417,963
0
0
null
null
null
null
UTF-8
Swift
false
false
1,640
swift
// // StarWarsViewerTests.swift // StarWarsViewerTests // // Created by Max Godfrey on 15/10/20. // import XCTest import Combine @testable import StarWarsViewer class StarWarsViewerTests: XCTestCase { func testSingle() throws { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. let expect = XCTestExpectation() let cancel = StarWarsAPI.live.getPlanets().sink { (completion) in print(completion) switch completion { case .finished: break case .failure(let error): XCTFail("Failed") } } receiveValue: { planets in print(planets) expect.fulfill() } wait(for: [expect], timeout: 10.0) } func testZip() throws { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. let expect = XCTestExpectation() let cancel = StarWarsAPI.live.getPlanets().flatMap { planets in planets.first.flatMap(StarWarsAPI.live.getResidentsOnPlanet) ?? Just([Resident]()).mapError { $0 }.eraseToAnyPublisher() }.sink { (completion) in switch completion { case .failure(let error): print(error) XCTFail() case .finished: break } } receiveValue: { (residents) in print(residents) expect.fulfill() } wait(for: [expect], timeout: 10.0) } }
[ -1 ]
ce1f28f5dbb06dfc6e9332dd0a2a05ef7dcb9877
588062afff3d258dcbd7dfac88becae379dd1794
/HealthApp/Guide/guideCollectionViewCell.swift
d4872c4b330f82c9670c19f825fe27c7e44113a8
[]
no_license
jrimyak/ARBodyHackRidge
eb579f94b54fb265a63af84eb59ab103d54d2145
243e51cbdb75cd20d3b9f1343ffb881c883267d4
refs/heads/master
2021-04-27T00:24:30.070418
2018-03-04T16:30:45
2018-03-04T16:30:45
null
0
0
null
null
null
null
UTF-8
Swift
false
false
382
swift
// // guideCollectionViewCell.swift // HealthApp // // Created by Noah Cooper on 3/4/18. // Copyright © 2018 Ugo Corp. All rights reserved. // import UIKit class guideCollectionViewCell: UICollectionViewCell { @IBOutlet var foodImg: UIImageView! func roundCorners() { foodImg.layer.cornerRadius = 50 foodImg.clipsToBounds = true } }
[ -1 ]
b56aacdd5ab2dc608951acb4b59e1de45561eca3
98f7bcf30a64a28c54f1785e1b6d8378604b5ac5
/Quiz App/SceneDelegate.swift
5662d3436a5801cb9f49a291c41754c3c0663ca9
[]
no_license
sadiqqasmi3/Quiz-App
b3e6b07cfae1caafeb8af7ffa3597fa40fed4b7a
350350286afea23c4377c588eaa2828fa1430a88
refs/heads/main
2023-02-15T06:22:55.753134
2021-01-10T15:53:12
2021-01-10T15:53:12
326,336,118
0
0
null
null
null
null
UTF-8
Swift
false
false
2,292
swift
// // SceneDelegate.swift // Quiz App // // Created by sadiq qasmi on 03/01/2021. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 393277, 376906, 327757, 254032, 368728, 180314, 254045, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 377047, 418008, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 385281, 336129, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 393613, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 164362, 328207, 410129, 393748, 262679, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 385671, 148106, 213642, 377485, 352919, 98969, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 344777, 418508, 385743, 385749, 139998, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 361490, 386070, 271382, 336922, 345119, 377888, 214060, 345134, 345139, 361525, 386102, 361537, 377931, 345172, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 345247, 361645, 345268, 402615, 361657, 337093, 402636, 328925, 165086, 66783, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 419360, 370208, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 419518, 337601, 403139, 337607, 419528, 419531, 419536, 272083, 394967, 419543, 419545, 345819, 419548, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 362274, 378664, 354107, 345916, 354112, 370504, 329545, 345932, 370510, 354132, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 346059, 247760, 346064, 346069, 419810, 329699, 354275, 190440, 354314, 346140, 436290, 395340, 378956, 436307, 338005, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 346317, 411862, 256214, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 387314, 436474, 321787, 379135, 411905, 411917, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 321911, 420237, 379279, 272787, 354728, 338353, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 248332, 330254, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 346736, 191093, 346743, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 355029, 264919, 256735, 338661, 264942, 363252, 338680, 264965, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 355151, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 437219, 257009, 265208, 265215, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 248952, 420985, 330886, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 126279, 437576, 437584, 331089, 437588, 331094, 396634, 175451, 437596, 429408, 175458, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 175487, 249215, 175491, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 224885, 224888, 224891, 224895, 372354, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 339664, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 397089, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 257869, 257872, 225105, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 339818, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 438438, 225448, 438441, 356521, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 381212, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 250203, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 340380, 373149, 70048, 356783, 373169, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 258723, 332455, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 348983, 340792, 398141, 357202, 389971, 357208, 389979, 430940, 357212, 357215, 439138, 201580, 201583, 349041, 340850, 381815, 430967, 324473, 398202, 119675, 340859, 324476, 430973, 324479, 340863, 324482, 373635, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 357411, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 341072, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 210132, 333016, 210139, 210144, 218355, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 210261, 365912, 259423, 374113, 251236, 374118, 333164, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 349762, 333396, 374359, 333400, 366173, 423529, 423533, 210547, 415354, 333440, 267910, 267929, 333512, 259789, 366301, 333535, 153311, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 341877, 399222, 325494, 333690, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 350153, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 219144, 268299, 333838, 350225, 186388, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 342113, 252021, 342134, 374904, 268435, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 350449, 375027, 358645, 350459, 350462, 350465, 350469, 268553, 350477, 268560, 350481, 432406, 350487, 325915, 350491, 325918, 350494, 325920, 350500, 194854, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 268702, 342431, 375209, 375220, 334263, 326087, 358857, 195041, 334312, 104940, 375279, 416255, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 334425, 326240, 375401, 334466, 334469, 391813, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 326417, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326463, 326468, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 433001, 400238, 326511, 211826, 211832, 392061, 351102, 359296, 252801, 260993, 351105, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 252838, 359335, 211885, 252846, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 343132, 384099, 384102, 384108, 367724, 187503, 343155, 384115, 212095, 351366, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 367801, 384189, 384192, 351424, 343232, 367817, 244938, 384202, 253132, 326858, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 376111, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 359887, 359891, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 253445, 359948, 359951, 245295, 359984, 343610, 400977, 400982, 179803, 155241, 245358, 155255, 155274, 368289, 245410, 425639, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 384831, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
c26b1c587857a042f6ab1db76ce56da60c8097e7
553c9939ee06c2ed33f2b150e9850727faf5bc75
/VkNewsFeed/VkNewsFeed/Classes/UseCases/SignInIteractor/SignInIteractorProtocol.swift
0628a96fe98fae90b8360eb459c5b3020db0e01b
[]
no_license
vanmas2/VkNewsFeed
8af82fb2c8e1a2cf6ac27edec62844532802f49a
e1e947351ca55366e3a1c630761be6352bdd518e
refs/heads/master
2022-11-24T18:54:43.115576
2020-08-04T20:23:35
2020-08-04T20:23:35
283,561,468
0
0
null
null
null
null
UTF-8
Swift
false
false
397
swift
// // SignInIteractorProtocol.swift // VkNewsFeed // // Created by Иван Масальских on 02.08.2020. // Copyright © 2020 Masalskikh. All rights reserved. // import Foundation protocol SignInIteractorProtocol { func execute(completion: @escaping SignInCompletion) } typealias SignInCompletion = ResultClosure<Void, SignInError> enum SignInError: Error { case unknown }
[ -1 ]
9840caba2b4f9b908c6490b6f9fe446331e4ac9d
00eb53cc7311af642f0ab1ad328434377ac9c038
/coolergames/AppDelegate.swift
36bcfb16b7526ca0cf871e2007857f0f117fcac6
[]
no_license
VitorRodrigues/Coolest-Games
393d304410f5b7ffcf4dfa826bb36411488e6949
4f2ecb7c85af262147740d2ce1fa7b187ec077e7
refs/heads/master
2021-04-29T20:27:33.270559
2018-02-16T04:13:43
2018-02-16T04:13:43
121,597,709
0
0
null
null
null
null
UTF-8
Swift
false
false
6,261
swift
// // AppDelegate.swift // coolergames // // Created by Vitor Rodrigues on 2/14/18. // Copyright © 2018 Vitor Rodrigues. All rights reserved. // import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // // Override point for customization after application launch. // let splitViewController = self.window!.rootViewController as! UISplitViewController // let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController // navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem // splitViewController.delegate = self // // let masterNavigationController = splitViewController.viewControllers[0] as! UINavigationController // let controller = masterNavigationController.topViewController as! MasterViewController // controller.managedObjectContext = self.persistentContainer.viewContext return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. // Saves changes in the application's managed object context before the application terminates. // self.saveContext() } // MARK: - Split view func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool { guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false } guard let topAsDetailController = secondaryAsNavController.topViewController as? DetailViewController else { return false } if topAsDetailController.detailItem == nil { // Return true to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded. return true } return false } // // MARK: - Core Data stack // // lazy var persistentContainer: NSPersistentContainer = { // /* // The persistent container for the application. This implementation // creates and returns a container, having loaded the store for the // application to it. This property is optional since there are legitimate // error conditions that could cause the creation of the store to fail. // */ // let container = NSPersistentContainer(name: "coolergames") // container.loadPersistentStores(completionHandler: { (storeDescription, error) in // if let error = error as NSError? { // // Replace this implementation with code to handle the error appropriately. // // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. // // /* // Typical reasons for an error here include: // * The parent directory does not exist, cannot be created, or disallows writing. // * The persistent store is not accessible, due to permissions or data protection when the device is locked. // * The device is out of space. // * The store could not be migrated to the current model version. // Check the error message to determine what the actual problem was. // */ // fatalError("Unresolved error \(error), \(error.userInfo)") // } // }) // return container // }() // // // MARK: - Core Data Saving support // // func saveContext () { // let context = persistentContainer.viewContext // if context.hasChanges { // do { // try context.save() // } catch { // // Replace this implementation with code to handle the error appropriately. // // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. // let nserror = error as NSError // fatalError("Unresolved error \(nserror), \(nserror.userInfo)") // } // } // } } extension AppDelegate { static var current: AppDelegate { return UIApplication.shared.delegate as! AppDelegate } }
[ 300491 ]
4465383d70a9c0cdaebef3b079e24d5114680405
e5e6f1c20a89f182624b155feaf143f05f7d4804
/magicbyirineu/Utils/Array+Any.swift
73ffd677bed65d2fcfc6192575fc2daacf2edebe
[]
no_license
cs-daniel-lima/magicbyirineu
67187f158b200158af3a52d3390407c141478653
1c824f412b84ee03fa6e5e9d35be11b49673908a
refs/heads/develop
2020-04-23T04:01:26.474951
2019-03-15T19:27:33
2019-03-15T19:27:33
170,895,859
0
0
null
2019-03-15T19:27:34
2019-02-15T16:34:26
Swift
UTF-8
Swift
false
false
932
swift
import Foundation extension Array where Iterator.Element == Any { func contains(string: String) -> Bool { if let elements: [String] = self.filter({ $0 is String }) as? [String] { if elements.contains(string) { return true } else { return false } } else { return false } } func contains(card: Card) -> Bool { if let elements: [Card] = self.filter({ $0 is Card }) as? [Card] { let matchingCards = elements.filter { $0.id == card.id } if !matchingCards.isEmpty { return true } else { return false } } else { return false } } mutating func appendCards(_ cards: [Card]) { for c in cards { if !contains(card: c) { append(c) } } } }
[ -1 ]
4af5cfa15b9ad3cb345a8a3f57cf4708cc6c9225
58013b2245cebda9444d4021dea975295b775900
/JSONPlaceHolderTODO/ViewController.swift
446b3e5c12a66197e2030437da6185d74bae78e1
[]
no_license
Yagnik13/JsonTodo
199c4eae1616d13690322e7218d3e18c754ca044
5d3e49650eb9980118fbd3b2184de335d7d637cd
refs/heads/master
2021-01-09T06:49:06.778234
2017-02-06T12:03:49
2017-02-06T12:03:49
81,082,437
0
0
null
null
null
null
UTF-8
Swift
false
false
1,710
swift
// // ViewController.swift // JSONPlaceHolderTODO // // Created by Yagnik on 03/02/17. // Copyright © 2017 Yagnik. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var tableView: UITableView! var todos: [Todo] = [Todo]() override func viewDidLoad() { super.viewDidLoad() tableView.delegate = self tableView.dataSource = self tableView.rowHeight = UITableViewAutomaticDimension tableView.estimatedRowHeight = 10.0 let url = "https://jsonplaceholder.typicode.com/todos" WebserviceManager().callGetWebservice(urlString: url, completionHandler: { (todosArray) in self.todos = todosArray self.tableView.reloadData() }) self.tableView.reloadData() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } extension ViewController: UITableViewDelegate, UITableViewDataSource { func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return todos.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "todoCell") as! TodoCell cell.titleLabel.text = todos[indexPath.row].title cell.completionLabel.text = "\(todos[indexPath.row].completed)" return cell } }
[ -1 ]
44b311458a66f2ef3f86a71e6459d419f776e543
cd3800ece97389c27f306d9a4daf7bec76c3962a
/Oxygen/Oxygen/ImageHelper.swift
fb217145849743e7b89b032ce36618e3fad82564
[]
no_license
DamianSheldon/SwiftSampleCode
391b8e5db33fd721b590263562e5ac2ce15e3b23
ddbfb3c1705c00c6d0da990d2206cb71836f5d0b
refs/heads/master
2018-12-19T18:10:55.168372
2018-11-22T13:42:38
2018-11-22T13:42:38
41,146,704
0
0
null
null
null
null
UTF-8
Swift
false
false
1,143
swift
// // ImageHelper.swift // Oxygen // // Created by Meiliang Dong on 2018/11/17. // Copyright © 2018 Meiliang Dong. All rights reserved. // import UIKit open class ImageHelper { public static func scaledImage(_ image: UIImage, factor: CGFloat) -> UIImage { guard let cgImage = image.cgImage else { return UIImage() } var imageRect = CGRect(x: 0, y: 0, width: cgImage.width, height: cgImage.height) imageRect.size.width *= factor imageRect.size.height *= factor UIGraphicsBeginImageContext(imageRect.size) guard let context = UIGraphicsGetCurrentContext() else { UIGraphicsEndImageContext() return UIImage() } context.saveGState() context.draw(cgImage, in: imageRect) context.restoreGState() guard let resultImage = UIGraphicsGetImageFromCurrentImageContext() else { UIGraphicsEndImageContext() return UIImage() } UIGraphicsEndImageContext() return resultImage } }
[ -1 ]
8546bbad29271f8ef90cc3c330fa08c5169d3158
7defe897b918f48f07745afe571c9da9a66570db
/BitcoinCashKitTests/TransactionTests.swift
8e6332c97bcdf5d9c34c44691a46dd5c34d20296
[ "MIT" ]
permissive
TakahiroKobayashi/BitcoinCashKit
8fbe3dbe1044e6a46d42bc47846ae38f4a4ca10d
b53579e4b7dffcb2575265b093d8c078d347abae
refs/heads/master
2020-03-25T13:36:58.588747
2018-08-06T08:01:36
2018-08-06T08:01:36
null
0
0
null
null
null
null
UTF-8
Swift
false
false
7,078
swift
// // TransactionTests.swift // // Copyright © 2018 Kishikawa Katsumi // Copyright © 2018 BitcoinCashKit developers // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // import XCTest @testable import BitcoinCashKit class TransactionTests: XCTestCase { func testSignTransaction1() { // Transaction in testnet3 // https://api.blockcypher.com/v1/btc/test3/txs/0189910c263c4d416d5c5c2cf70744f9f6bcd5feaf0b149b02e5d88afbe78992 let prevTxID = "1524ca4eeb9066b4765effd472bc9e869240c4ecb5c1ee0edb40f8b666088231" // hash.reversed = txid let hash = Data(Data(hex: prevTxID)!.reversed()) let index: UInt32 = 1 let outpoint = TransactionOutPoint(hash: hash, index: index) let balance: Int64 = 169012961 let amount: Int64 = 50000000 let fee: Int64 = 10000000 let toAddress = "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB" // https://testnet.coinfaucet.eu/en/ let privateKey = try! PrivateKey(wif: "92pMamV6jNyEq9pDpY4f6nBy9KpV2cfJT4L5zDUYiGqyQHJfF1K") let fromPublicKey = privateKey.publicKey() let fromPubKeyHash = Crypto.sha256ripemd160(fromPublicKey.raw) let toPubKeyHash = Base58.decode(toAddress)!.dropFirst().dropLast(4) let lockingScript1 = Script.buildPublicKeyHashOut(pubKeyHash: toPubKeyHash) let lockingScript2 = Script.buildPublicKeyHashOut(pubKeyHash: fromPubKeyHash) XCTAssertEqual(lockingScript1.hex, "76a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac") XCTAssertEqual(lockingScript2.hex, "76a9142a539adfd7aefcc02e0196b4ccf76aea88a1f47088ac") let sending = TransactionOutput(value: amount, lockingScript: lockingScript1) let payback = TransactionOutput(value: balance - amount - fee, lockingScript: lockingScript2) // copy transaction (set script to empty) // if there are correspond output transactions, set script to copy let subScript = Data(hex: "76a9142a539adfd7aefcc02e0196b4ccf76aea88a1f47088ac")! let inputForSign = TransactionInput(previousOutput: outpoint, signatureScript: subScript, sequence: UInt32.max) let _tx = Transaction(version: 1, inputs: [inputForSign], outputs: [sending, payback], lockTime: 0) let hashType: SighashType = SighashType.BTC.ALL let _txHash = Crypto.sha256sha256(_tx.serialized() + UInt32(hashType).littleEndian) XCTAssertEqual(_txHash.hex, "fd2f20da1c28b008abcce8a8ac7e1a7687fc944e001a24fc3aacb6a7570a3d0f") guard let signature: Data = try? Crypto.sign(_txHash, privateKey: privateKey) else { XCTFail("failed to sign") return } XCTAssertEqual(signature.hex, "3044022074ddd327544e982d8dd53514406a77a96de47f40c186e58cafd650dd71ea522702204f67c558cc8e771581c5dda630d0dfff60d15e43bf13186669392936ec539d03") // scriptSig: <sig> <pubKey> var unlockingScript: Data = Data([UInt8(signature.count + 1)]) + signature + UInt8(hashType) unlockingScript += UInt8(fromPublicKey.raw.count) unlockingScript += fromPublicKey.raw let input = TransactionInput(previousOutput: outpoint, signatureScript: unlockingScript, sequence: UInt32.max) let transaction = Transaction(version: 1, inputs: [input], outputs: [sending, payback], lockTime: 0) let utxoToSign = TransactionOutput(value: 169012961, lockingScript: subScript) let sighash = transaction.signatureHash(for: utxoToSign, inputIndex: 0, hashType: hashType) XCTAssertEqual(sighash.hex, _txHash.hex) let expect = Data(hex: "010000000131820866b6f840db0eeec1b5ecc44092869ebc72d4ff5e76b46690eb4eca2415010000008a473044022074ddd327544e982d8dd53514406a77a96de47f40c186e58cafd650dd71ea522702204f67c558cc8e771581c5dda630d0dfff60d15e43bf13186669392936ec539d030141047e000cc16c9a4d38cb1572b9dc34c1452626aa170b46150d0e806be1b42517f0832c8a58f543128083ffb8632bae94dd5f3e1e89fad0a17f64ed8bbbb90b5753ffffffff0280f0fa02000000001976a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ace1677f06000000001976a9142a539adfd7aefcc02e0196b4ccf76aea88a1f47088ac00000000")! XCTAssertEqual(transaction.serialized().hex, expect.hex) XCTAssertEqual(transaction.txID, "0189910c263c4d416d5c5c2cf70744f9f6bcd5feaf0b149b02e5d88afbe78992") } func testSignTransaction2() { // Transaction on Bitcoin Cash Mainnet // TxID : 96ee20002b34e468f9d3c5ee54f6a8ddaa61c118889c4f35395c2cd93ba5bbb4 // https://explorer.bitcoin.com/bch/tx/96ee20002b34e468f9d3c5ee54f6a8ddaa61c118889c4f35395c2cd93ba5bbb4 let toAddress: Address = try! AddressFactory.create("1Bp9U1ogV3A14FMvKbRJms7ctyso4Z4Tcx") let changeAddress: Address = try! AddressFactory.create("1FQc5LdgGHMHEN9nwkjmz6tWkxhPpxBvBU") let unspentOutput = TransactionOutput(value: 5151, lockingScript: Data(hex: "76a914aff1e0789e5fe316b729577665aa0a04d5b0f8c788ac")!) let unspentOutpoint = TransactionOutPoint(hash: Data(hex: "e28c2b955293159898e34c6840d99bf4d390e2ee1c6f606939f18ee1e2000d05")!, index: 2) let utxo = UnspentTransaction(output: unspentOutput, outpoint: unspentOutpoint) let utxoKey = try! PrivateKey(wif: "L1WFAgk5LxC5NLfuTeADvJ5nm3ooV3cKei5Yi9LJ8ENDfGMBZjdW") let unsignedTx = createUnsignedTx(toAddress: toAddress, amount: 600, changeAddress: changeAddress, utxos: [utxo]) let signedTx = signTx(unsignedTx: unsignedTx, keys: [utxoKey]) XCTAssertEqual(signedTx.txID, "96ee20002b34e468f9d3c5ee54f6a8ddaa61c118889c4f35395c2cd93ba5bbb4") XCTAssertEqual(signedTx.serialized().hex, "0100000001e28c2b955293159898e34c6840d99bf4d390e2ee1c6f606939f18ee1e2000d05020000006b483045022100b70d158b43cbcded60e6977e93f9a84966bc0cec6f2dfd1463d1223a90563f0d02207548d081069de570a494d0967ba388ff02641d91cadb060587ead95a98d4e3534121038eab72ec78e639d02758e7860cdec018b49498c307791f785aa3019622f4ea5bffffffff0258020000000000001976a914769bdff96a02f9135a1d19b749db6a78fe07dc9088ace5100000000000001976a9149e089b6889e032d46e3b915a3392edfd616fb1c488ac00000000") } }
[ -1 ]
76d5e20efe3a856e244ab802122d2d7223b32d61
6a312e85665354a279c0f4231d8368c70e6076e0
/WeshApp/FlexibleNavBar.swift
8084d22350b42d2d6bd98308f16f371d0ee86397
[]
no_license
rabzu/WeshApp
69928e42fe1e84b13123777a630f035d439330bc
29af5b8ecd1228a15079ff41a63b6e2b8550be46
refs/heads/master
2020-12-14T18:42:31.360841
2015-05-17T06:04:55
2015-05-17T06:04:55
null
0
0
null
null
null
null
UTF-8
Swift
false
false
14,972
swift
// // FlexibleNavBar.swift // WeshApp // // Created by rabzu on 15/03/2015. // Copyright (c) 2015 WeshApp. All rights reserved. // import Foundation import Designables import BLKFlexibleHeightBar //Required, to make objc code work with swift extension BLKDelegateSplitter: UITableViewDelegate{ } enum NavBarItem{ case Burger case Cross case Plus } class FlexibleNavBar: BLKFlexibleHeightBar{ private let statusBarHeight: CGFloat = 20.0 private let leftItemXMargin: CGFloat = 0.05 private let navBarProportionExpanded: CGFloat = 1.57 private let navBarProportionCollapsed: CGFloat = 4.87 private let navabarItemWidthfactor: CGFloat = 19.1025 override init(frame: CGRect) { super.init(frame: frame) } convenience init(frame: CGRect, handle: UILabel, name: UILabel? = nil, totem: UIImageView, rightItem: NavBarItem){ self.init(frame: frame) let max = self.frame.size.width / navBarProportionExpanded let min = self.frame.size.width / navBarProportionCollapsed switch rightItem{ case .Cross: self.configureProfileBar(max, min: min, handle: handle, name: name, totem: totem, leftItem: setUpBurger(), rightItem: setUpCross() ) case .Plus: self.configureProfileBar(max, min: min, handle: handle, name: name, totem: totem, leftItem: setUpBurger(), rightItem: setUpPlus()) default: break } } convenience init(frame: CGRect, centreItem: UIView?, rightItem: NavBarItem ){ self.init(frame: frame) let max = self.frame.size.width / navBarProportionCollapsed switch rightItem{ case .Cross: self.configureBar(max, min: statusBarHeight, leftItem: setUpBurger(), centreItem: centreItem, rightItem: setUpCross() ) case .Plus: self.configureBar(max, min: statusBarHeight, leftItem: setUpBurger(), centreItem: centreItem, rightItem: setUpPlus()) default: break } } required init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setUpBurger() -> BurgerItem { //Menu Burger Item let burgerHeightToWidth: CGFloat = 21.91 let burgerframe = CGRectMake(20, 20, self.frame.size.width / navabarItemWidthfactor, self.frame.size.width / burgerHeightToWidth) let burgerItem = BurgerItem(frame: burgerframe) burgerItem.addTarget(self, action: "showMenu:", forControlEvents: .TouchUpInside) return burgerItem } private func setUpCross() -> CrossItem{ let crossFrame = CGRectMake(20, 20, self.frame.size.width / navabarItemWidthfactor, self.frame.size.width / navabarItemWidthfactor) let crossItem = CrossItem(frame: crossFrame) crossItem.addTarget(self, action: "dismissPressed:", forControlEvents: .TouchUpInside) return crossItem } private func setUpPlus() -> PlusItem{ let plusFrame = CGRectMake(20, 20, self.frame.size.width / navabarItemWidthfactor, self.frame.size.width / navabarItemWidthfactor) let plusItem = PlusItem(frame: plusFrame) plusItem.addTarget(self, action: "handlePopover:", forControlEvents: .TouchUpInside) return plusItem } private func configureBar(max: CGFloat, min: CGFloat, leftItem: UIView?, centreItem: UIView? = nil, rightItem: UIView? = nil){ self.maximumBarHeight = max self.minimumBarHeight = min self.clipsToBounds = true self.backgroundColor = UIColor(red: 0x51/255, green: 0xc1/255, blue: 0xd2/255, alpha: 1.0) if let segControl = centreItem{ //segControl starting position: when bar is open var initialNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() initialNameLabelLayoutAttributes.center = CGPointMake(self.bounds.width * 0.5, (max + statusBarHeight) * 0.5) initialNameLabelLayoutAttributes.size = segControl.sizeThatFits(CGSizeZero) segControl.addLayoutAttributes(initialNameLabelLayoutAttributes, forProgress: 0.0) //Final position: when bar is open var finalNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) finalNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, min * 0.25) finalNameLabelLayoutAttributes.alpha = 0.0 segControl.addLayoutAttributes(finalNameLabelLayoutAttributes, forProgress: 1.0) self.addSubview(segControl) } if let item = leftItem{ //STARTING var initialNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() initialNameLabelLayoutAttributes.center = CGPointMake(self.bounds.width * leftItemXMargin, (max + statusBarHeight) * 0.5) initialNameLabelLayoutAttributes.size = item.sizeThatFits(CGSizeZero) item.addLayoutAttributes(initialNameLabelLayoutAttributes, forProgress: 0.0) var finalNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) //FINAL finalNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * leftItemXMargin, min * 0.25) finalNameLabelLayoutAttributes.alpha = 0.0 item.addLayoutAttributes(finalNameLabelLayoutAttributes, forProgress: 1.0) self.addSubview(item) } if let item = rightItem{ //STARTING var initialNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() initialNameLabelLayoutAttributes.center = CGPointMake( self.bounds.width - (self.bounds.width * leftItemXMargin), ( max + statusBarHeight) * 0.5) initialNameLabelLayoutAttributes.size = item.sizeThatFits(CGSizeZero) item.addLayoutAttributes(initialNameLabelLayoutAttributes, forProgress: 0.0) //FINAL var finalNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) finalNameLabelLayoutAttributes.center = CGPointMake(self.bounds.width - (self.bounds.width * leftItemXMargin), self.minimumBarHeight * 0.25) finalNameLabelLayoutAttributes.alpha = 0.0 item.addLayoutAttributes(finalNameLabelLayoutAttributes, forProgress: 1.0) self.addSubview(item) } } private func configureProfileBar(max: CGFloat, min: CGFloat, handle: UILabel, name: UILabel? = nil, totem: UIImageView, leftItem: UIView?, rightItem: UIView? = nil ){ self.maximumBarHeight = max self.minimumBarHeight = min self.backgroundColor = UIColor(red: 0x51/255, green: 0xc1/255, blue: 0xd2/255, alpha: 1.0) //self.configureBar(min, min: min, leftItem: leftItem, centreItem: nil, rightItem: rightItem) if let item = leftItem{ //STARTING var initialNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() initialNameLabelLayoutAttributes.center = CGPointMake(self.bounds.width * leftItemXMargin, (min + statusBarHeight) * 0.5) initialNameLabelLayoutAttributes.size = item.sizeThatFits(CGSizeZero) item.addLayoutAttributes(initialNameLabelLayoutAttributes, forProgress: 0.0) // var finalNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) self.addSubview(item) } if let item = rightItem{ //STARTING var initialNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() initialNameLabelLayoutAttributes.center = CGPointMake( self.bounds.width - (self.bounds.width * leftItemXMargin), ( min + statusBarHeight) * 0.5) initialNameLabelLayoutAttributes.size = item.sizeThatFits(CGSizeZero) item.addLayoutAttributes(initialNameLabelLayoutAttributes, forProgress: 0.0) self.addSubview(item) } let imageProportion = CGFloat(5.07) totem.contentMode = UIViewContentMode.ScaleAspectFill //profileImageView.clipsToBounds = true //profileImageView.layer.cornerRadius = 35.0 // profileImageView.layer.borderWidth = 0.0 // profileImageView.layer.borderColor = UIColor.whiteColor().CGColor var initialProfileImageViewLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() // initialProfileImageViewLayoutAttributes.size = CGSizeMake(70.0, 70.0) initialProfileImageViewLayoutAttributes.size = CGSizeMake(self.frame.size.width / imageProportion, self.frame.size.width / imageProportion) initialProfileImageViewLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, self.maximumBarHeight * 0.5) totem.addLayoutAttributes(initialProfileImageViewLayoutAttributes, forProgress: 0.0) var midwayProfileImageViewLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialProfileImageViewLayoutAttributes) midwayProfileImageViewLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, (self.maximumBarHeight - self.minimumBarHeight) * 0.8 + self.minimumBarHeight - 110.0) totem.addLayoutAttributes(midwayProfileImageViewLayoutAttributes, forProgress: 0.2) var finalProfileImageViewLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: midwayProfileImageViewLayoutAttributes) finalProfileImageViewLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, (self.maximumBarHeight - self.minimumBarHeight) * 0.64 + self.minimumBarHeight - 110.0) finalProfileImageViewLayoutAttributes.transform = CGAffineTransformMakeScale(0.5, 0.5) finalProfileImageViewLayoutAttributes.alpha = 0.0 totem.addLayoutAttributes(finalProfileImageViewLayoutAttributes, forProgress: 0.5) self.addSubview(totem) let handleYFactor: CGFloat = 14.15 handle.font = UIFont.systemFontOfSize(22.0) handle.textColor = UIColor.whiteColor() handle.sizeToFit() // nameLabel.text = name //Initial Expanded state var initialNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() // initialNameLabelLayoutAttributes.size = nameLabel.frame.size initialNameLabelLayoutAttributes.size = handle.sizeThatFits(CGSizeZero) initialNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, max - (self.frame.size.width / handleYFactor)) // self.maximumBarHeight - 10.0 handle.addLayoutAttributes(initialNameLabelLayoutAttributes, forProgress: 0.0) //Midway State // var midwayNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) // midwayNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, // // (self.maximumBarHeight - self.minimumBarHeight) * 0.4 + self.minimumBarHeight - 50.0) // midwayNameLabelLayoutAttributes // nameLabel.addLayoutAttributes(midwayNameLabelLayoutAttributes, forProgress: 0.6) // var finalNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) finalNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, (min + statusBarHeight) * 0.5) //finalNameLabelLayoutAttributes.transform = CGAffineTransformMakeScale(0.5, 0.5) //finalNameLabelLayoutAttributes.alpha = 0.0 handle.addLayoutAttributes(finalNameLabelLayoutAttributes, forProgress: 1.0) self.addSubview(handle) if let n = name{ n.font = UIFont.systemFontOfSize(22.0) n.textColor = UIColor.whiteColor() n.sizeToFit() //Initial Expanded state var initialNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes() // initialNameLabelLayoutAttributes.size = nameLabel.frame.size initialNameLabelLayoutAttributes.size = n.sizeThatFits(CGSizeZero) initialNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, (min + statusBarHeight) * 0.5) // self.maximumBarHeight - 10.0 n.addLayoutAttributes(initialNameLabelLayoutAttributes, forProgress: 0.0) //Midway State var midwayNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) midwayNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, (min + statusBarHeight) * 0.5) midwayNameLabelLayoutAttributes.alpha = 0.6 n.addLayoutAttributes(midwayNameLabelLayoutAttributes, forProgress: 0.6) var finalNameLabelLayoutAttributes = BLKFlexibleHeightBarSubviewLayoutAttributes(existingLayoutAttributes: initialNameLabelLayoutAttributes) finalNameLabelLayoutAttributes.center = CGPointMake(self.frame.size.width * 0.5, (min + statusBarHeight) * 0.5) // finalNameLabelLayoutAttributes.transform = CGAffineTransformMakeScale(0.5, 0.5) finalNameLabelLayoutAttributes.alpha = 0.0 n.addLayoutAttributes(finalNameLabelLayoutAttributes, forProgress: 1.0) self.addSubview(n) } } //MARK: menu func showMenu(sender: UIView) { NSNotificationCenter.defaultCenter().postNotificationName("ShowMenu", object: self) } func dismissPressed(sender: UIView){ NSNotificationCenter.defaultCenter().postNotificationName("SegueBack", object: self) } func handlePopover(sender: UIView){ NSNotificationCenter.defaultCenter().postNotificationName("DoPopover", object: self) } }
[ -1 ]
254c28f300aa36a44f7250f90ac76789da76d03e
821d15c1050aff7bd8e02ddd060870d08a7fc98b
/I am RichUITests/I_am_RichUITests.swift
71d6c709fc8e260101f00813c80f5690ae2a6533
[]
no_license
iOS-Development-Projects/I-am-Rich
b9fa422efae803b50ffd03faff2da9ac0a659458
df743f9b42f4fdfcbdc32435a9a87b555d5a6c5d
refs/heads/main
2023-07-21T04:23:05.453760
2021-09-04T01:07:12
2021-09-04T01:07:12
403,147,106
0
0
null
null
null
null
UTF-8
Swift
false
false
1,433
swift
// // I_am_RichUITests.swift // I am RichUITests // // Created by Matthew Piedra on 9/3/21. // import XCTest class I_am_RichUITests: 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, watchOS 7.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } } }
[ 360463, 376853, 344106, 253996, 385078, 163894, 319543, 352314, 376892, 32829, 352324, 352327, 385095, 163916, 368717, 196687, 254039, 426074, 368732, 180317, 32871, 352359, 221292, 385135, 376945, 385147, 426124, 196758, 49308, 65698, 49317, 377008, 377010, 377025, 377033, 417996, 254157, 368849, 368850, 139478, 385240, 254171, 147679, 147680, 205034, 254189, 254193, 344312, 336121, 262403, 147716, 368908, 180494, 368915, 254228, 262419, 377116, 254250, 131374, 418095, 336177, 368949, 180534, 155968, 270663, 319816, 368969, 254285, 180559, 377168, 344402, 368982, 270703, 139641, 385407, 385409, 106893, 270733, 385423, 385433, 213402, 254373, 385448, 385449, 311723, 115116, 336319, 336323, 188870, 262619, 377309, 377310, 369121, 369124, 270823, 213486, 360945, 139766, 393719, 377337, 254459, 410108, 410109, 262657, 377346, 410126, 393745, 385554, 262673, 254487, 410138, 188957, 377374, 385569, 385578, 377388, 197166, 393775, 418352, 33339, 352831, 33344, 385603, 385612, 426575, 369236, 385620, 270938, 352885, 352886, 344697, 369285, 385669, 344714, 377487, 180886, 426646, 352921, 377499, 344737, 352938, 164532, 336565, 377531, 377534, 377536, 385745, 369365, 369366, 385751, 361178, 352989, 352990, 418529, 295649, 385763, 369383, 361194, 418550, 344829, 197377, 434956, 418579, 426772, 197398, 344864, 197412, 336678, 189229, 197424, 197428, 336693, 377656, 426809, 197433, 222017, 377669, 197451, 369488, 385878, 385880, 197467, 435038, 197479, 385895, 385901, 197489, 164730, 254851, 369541, 172936, 426894, 189327, 377754, 140203, 172971, 377778, 189362, 189365, 377789, 345034, 418774, 386007, 386009, 418781, 386016, 123880, 418793, 222193, 435185, 271351, 435195, 328701, 328705, 386049, 418819, 410629, 189448, 320526, 361487, 435216, 254997, 336928, 336930, 410665, 345137, 361522, 386108, 410687, 377927, 361547, 205911, 156763, 361570, 214116, 214119, 402538, 173168, 377974, 66684, 402568, 140426, 337037, 386191, 410772, 222364, 124073, 402618, 402632, 148687, 402641, 419028, 222441, 386288, 66802, 271607, 369912, 369913, 419066, 386296, 386304, 320769, 369929, 419097, 320795, 115997, 222496, 369964, 353581, 116014, 66863, 312628, 345397, 345398, 386363, 345418, 337226, 337228, 353611, 353612, 378186, 353617, 378201, 312688, 337280, 353672, 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, 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, 403248, 378673, 182070, 182071, 345910, 436029, 337734, 272207, 272208, 337746, 395092, 345942, 362326, 370526, 345950, 362336, 255844, 214894, 362351, 214896, 124795, 337816, 124826, 329627, 354210, 436130, 10153, 362411, 370604, 362418, 411587, 362442, 346066, 354268, 436189, 329696, 354273, 403425, 190437, 354279, 436199, 174058, 247787, 329707, 354283, 337899, 247786, 313322, 124912, 436209, 346117, 182277, 403463, 354312, 43016, 354310, 354311, 436235, 419857, 436248, 346153, 124974, 272432, 403507, 378933, 378934, 436283, 403524, 329812, 411738, 272477, 395373, 346237, 436372, 362658, 436388, 125108, 133313, 395458, 338118, 346319, 321744, 379102, 387299, 18661, 379110, 125166, 149743, 379120, 436466, 125170, 411892, 395511, 436471, 436480, 125184, 272644, 125192, 338187, 338188, 125197, 395536, 125200, 338196, 157973, 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, 436677, 256476, 166403, 322057, 420374, 322077, 330291, 191065, 436831, 117350, 420461, 313970, 346739, 346741, 420473, 166533, 346771, 363155, 264855, 363161, 436897, 355006, 363228, 436957, 436960, 264929, 338658, 346859, 35584, 133889, 346889, 264971, 322320, 207639, 363295, 355117, 191285, 355129, 273209, 273211, 355136, 355138, 420680, 355147, 355148, 355153, 387927, 363353, 363354, 322396, 420702, 363361, 363362, 412516, 355173, 355174, 207724, 355182, 207728, 420722, 265094, 387977, 396171, 355216, 224146, 224149, 256918, 256919, 256920, 256934, 273336, 273341, 330688, 379845, 363462, 273353, 207839, 347104, 134124, 412653, 248815, 257007, 347122, 183291, 437245, 257023, 125953, 396292, 330759, 347150, 412692, 330789, 248871, 412725, 257093, 404550, 314437, 339031, 257126, 265318, 404582, 265323, 396395, 404589, 273523, 363643, 248960, 150656, 363658, 404622, 224400, 347286, 265366, 429209, 339101, 429216, 339106, 380069, 421050, 339131, 265410, 183492, 273616, 421081, 339167, 421102, 52473, 363769, 52476, 412926, 437504, 388369, 380178, 429332, 126229, 412963, 257323, 437550, 208179, 159033, 347451, 216387, 257353, 257354, 109899, 437585, 331091, 150868, 372064, 429410, 437602, 388458, 265579, 314734, 314740, 314742, 421240, 314745, 388488, 314776, 396697, 396709, 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, 175640, 216610, 372261, 347693, 323120, 396850, 200245, 323126, 134715, 421437, 396865, 413255, 265800, 273992, 421452, 265809, 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, 421686, 274234, 241471, 339782, 315209, 241494, 339799, 274276, 274288, 372592, 339840, 315265, 372625, 118693, 438186, 151492, 380874, 372699, 380910, 380922, 380923, 372736, 274432, 241695, 315431, 430120, 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, 430263, 266427, 356550, 266447, 372943, 258263, 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, 266628, 340356, 225684, 373144, 389534, 397732, 242138, 184799, 201195, 324098, 340489, 397841, 258584, 397855, 348709, 348710, 397872, 340539, 266812, 438850, 348741, 381515, 348748, 430681, 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, 398039, 373485, 373486, 21239, 348921, 275193, 430853, 430860, 62222, 430880, 152372, 160569, 430909, 160576, 348999, 439118, 275294, 381791, 127840, 357219, 439145, 242540, 242542, 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, 398405, 250955, 218187, 250965, 439391, 250982, 398444, 62574, 357487, 119925, 349304, 349315, 349317, 373902, 177297, 324761, 373937, 373939, 324790, 218301, 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, 415555, 325444, 325449, 341837, 415566, 431955, 325460, 317268, 341846, 259937, 382820, 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, 333990, 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, 260396, 432435, 178485, 358710, 14654, 268609, 383309, 383327, 391521, 366948, 416101, 383338, 432503, 432511, 252309, 39323, 317851, 375211, 334259, 129461, 342454, 358844, 317889, 326083, 416201, 129484, 154061, 416206, 432608, 195044, 432616, 334315, 375281, 334345, 432650, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 219694, 219695, 432694, 375369, 375373, 416334, 416340, 260705, 416353, 375396, 268901, 244326, 244345, 375438, 326288, 383668, 342714, 39616, 383708, 432883, 203511, 383740, 416509, 359166, 162559, 375552, 432894, 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, 211871, 359332, 359333, 326571, 252848, 326580, 326586, 359365, 211913, 326602, 252878, 342990, 433104, 359380, 433112, 359391, 343020, 187372, 383980, 383994, 171009, 384004, 433166, 384015, 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, 195809, 253168, 351475, 351489, 367897, 367898, 245018, 130347, 261426, 212282, 359747, 359748, 146760, 146763, 114022, 253288, 425327, 425331, 327030, 163190, 384379, 253316, 253339, 253340, 343457, 359860, 359861, 343480, 425417, 327122, 425434, 310747, 253431, 187900, 343552, 409095, 359949, 253456, 253462, 146976, 245290, 343606, 163385, 425534, 138817, 147011, 147020, 196184, 179800, 343646, 155238, 138862, 188021, 425624, 245413, 384693, 376502, 409277, 319176, 409289, 425682, 245471, 155360, 212721, 163575, 319232, 360194, 409355, 155408, 417556, 204600, 319289, 409404, 360253, 409416, 376661, 368471, 425820, 368486, 409446, 425832, 40809, 368489, 384871, 417648, 417658, 360315, 253828, 327556, 425875, 253851, 376733, 204702, 253868, 204722, 188349, 212947, 212953, 360416, 253930 ]
04e369d7c9b72a10e78d8ae76115c2c4731d2ac3
e55fb6e87100c62aefece4e6b08e5ad9b5178c96
/ShopApp/TabBarControllerMarket/ProductList/CustomCell/InitialProductTableViewCell.swift
7b2c36ec489ac36e3eb5e3ade672ac2b5de45f07
[]
no_license
MikeZarazua/ShopApp
284a4550c95c979657d8cdc6dfde524105968331
72abb79d8cf0ba2f197812b0b264b86d592a00fb
refs/heads/master
2020-12-02T20:28:28.596531
2019-12-31T15:56:30
2019-12-31T15:56:30
231,111,817
0
0
null
null
null
null
UTF-8
Swift
false
false
2,417
swift
// // InitialProductTableViewCell.swift // ShopApp // // Created by Mike on 21/12/19. // Copyright © 2019 Mike. All rights reserved. // import UIKit class InitialProductTableViewCell: UITableViewCell { @IBOutlet weak var buttonOptions: UIButton! @IBOutlet weak var labelProductPrice: UILabel! @IBOutlet weak var labelProductSKU: UILabel! @IBOutlet weak var labelProductName: UILabel! @IBOutlet weak var imagePrincipal: UIImageView! var model: MarketProductsCellsProtocol? { didSet { if let model = model as? InitialProductCellModel{ setModelAttributes(model: model) }else if let model = model as? RegisterData { setRegisteredModelAttributes(model: model) } } } override func awakeFromNib() { super.awakeFromNib() // Initialization code //cusotm labels initUI() } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } } //MARK: - Private methods extension InitialProductTableViewCell { /** setcolors for labels **/ private func initUI() { self.labelProductPrice.textColor = UIColor.CustomColors.colorPriceCell self.labelProductSKU.textColor = UIColor.CustomColors.colorSKUCell self.labelProductName.textColor = UIColor.CustomColors.colorTitleCell } private func setModelAttributes(model: InitialProductCellModel) { self.labelProductPrice.text = model.productPrice self.labelProductSKU.text = "SKU: \(model.productSKU)" self.labelProductName.text = model.productName if let imagePath = Bundle.main.path(forResource: model.imageName, ofType: model.extensionFile)//pathForImageResource(model.imageName+".jpeg") { self.imagePrincipal.image = UIImage(contentsOfFile: imagePath) } } private func setRegisteredModelAttributes(model: RegisterData) { self.labelProductPrice.text = model.productPrice self.labelProductSKU.text = "SKU: \(model.productSKU)" self.labelProductName.text = model.productName self.imagePrincipal.image = model.principalImage } }
[ -1 ]
369144311f861f25d5849e43fa3c362eb4fb7820
cc2f85a3cee52fc40604054eda59ef86ea1cd2f8
/Sources/Payments/API/Receipts/Validation/ReceiptValidationResult.swift
a5ae01442211cc4759bf0330197509022b82e2e8
[]
no_license
neilsmithdesign/Payments
8169c3825aae852254b9f1a3e1b8931c2ee42c86
4720ec488ae49f1898982c62e24744a709cfaf7c
refs/heads/master
2020-07-11T03:43:12.173505
2019-12-11T10:19:47
2019-12-11T10:19:47
204,437,461
0
0
null
null
null
null
UTF-8
Swift
false
false
200
swift
// // ReceiptValidationResult.swift // // // Created by Neil Smith on 02/12/2019. // import Foundation public typealias ReceiptValidationResult = Result<AppStoreReceipt, ReceiptValidationError>
[ -1 ]
457af618cef16b632e1c36a3d42df800a37d1001
0c83a015d2675449f25a3ccd2d12ad0707d5a15f
/Sprint 6/Module 4 - View Controller Transitions/Friends/Friends/ViewControllers/DetailViewController.swift
45c446a58d43c537d47d7f0c82c9bd88160d7179
[]
no_license
lmsampson/ios-projects
fab09206a6b408c18a18e534148fa581805d008b
7d4a4b51ee7f723b94a6f278b54764efc8841674
refs/heads/master
2020-03-27T11:36:57.010330
2019-03-07T00:52:22
2019-03-07T00:52:22
146,497,875
0
0
null
2018-08-28T19:38:10
2018-08-28T19:38:09
null
UTF-8
Swift
false
false
710
swift
// // DetailViewController.swift // Friends // // Created by Lisa Sampson on 8/30/18. // Copyright © 2018 Lisa Sampson. All rights reserved. // import UIKit class DetailViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() updateViews() } func updateViews() { guard let friend = friend else { return } self.title = friend.name imageView.image = friend.image nameLabel.text = friend.name jobLabel.text = friend.job } var friend: Friend? @IBOutlet weak var imageView: UIImageView! @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var jobLabel: UILabel! }
[ -1 ]
eeb49ccb52551eaa97dda4d75511d7729afd5c40
b862f3f7666b30933e11d6da2f6cd7dda3429cd2
/ARKitCarGeolocationApp/LocationSearchTable.swift
441b2d2ebffa7eba59fa60d482a2793da48b6f8c
[]
no_license
martinstojchev/arkitCarGeolocationApp
5e86839b855e861fa7cf0b9cd5068b07b8eb9cff
ea28c95e41c42da4da37e8d2c08dc4f4d897d794
refs/heads/master
2020-03-30T12:07:07.999899
2018-10-19T11:09:52
2018-10-19T11:09:52
151,208,848
1
1
null
null
null
null
UTF-8
Swift
false
false
3,037
swift
// // LocationSearchTable.swift // ARKitCarGeolocationApp // // Created by Martin on 10/17/18. // Copyright © 2018 Martin. All rights reserved. // import UIKit import MapKit class LocationSearchTable: UITableViewController { var matchingItems: [MKMapItem] = [] var mapView: MKMapView? = nil var handleMapSearchDelegate: HandleMapSearch? = nil func parseAddress(selectedItem: MKPlacemark) -> String { // put a space between "4" and "Melrose Place" let firstSpace = (selectedItem.subThoroughfare != nil && selectedItem.thoroughfare != nil) ? " " : "" //put a comma between street and city/state let comma = (selectedItem.subThoroughfare != nil || selectedItem.thoroughfare != nil) && (selectedItem.subAdministrativeArea != nil || selectedItem.administrativeArea != nil) ? ", " : "" let addressLine = String ( format: "%@%@%@%@%@", // streen number selectedItem.subThoroughfare ?? "", firstSpace, //street name selectedItem.thoroughfare ?? "", comma, //city selectedItem.locality ?? "" ) return addressLine } } extension LocationSearchTable: UISearchResultsUpdating { func updateSearchResults(for searchController: UISearchController) { guard let mapView = mapView, let searchBarText = searchController.searchBar.text else { return } let request = MKLocalSearch.Request() request.naturalLanguageQuery = searchBarText request.region = mapView.region let search = MKLocalSearch(request: request) search.start { (response, _ ) in guard let response = response else { return } self.matchingItems = response.mapItems self.tableView.reloadData() } } } extension LocationSearchTable { override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return matchingItems.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell")! let selectedItem = matchingItems[indexPath.row].placemark cell.textLabel?.text = selectedItem.name cell.detailTextLabel?.text = parseAddress(selectedItem: selectedItem) return cell } } extension LocationSearchTable { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let selectedItem = matchingItems[indexPath.row].placemark handleMapSearchDelegate?.dropPinZoomIn(placemark: selectedItem) dismiss(animated: true, completion: nil) } }
[ 203575 ]
6f754074ee934d251e4c05f2c75ee53d942ca8d5
de9ccb2ba0c250eca49b09ab2bc7e4bc34ea2255
/App_iOS_Hymatik/Models/Core Data/Order+CoreDataClass.swift
73f8442aea42320eae620fe927a7eea4585a32f0
[]
no_license
Hymatik/App-iOS-Hymatik
151b5e9a560580e8324a6df027e51a12b8ba2fed
55202aa1189f4e1a9a4c0534ea747a786fed22c2
refs/heads/master
2022-06-21T05:31:21.987266
2020-05-14T07:05:58
2020-05-14T07:05:58
241,050,169
0
0
null
null
null
null
UTF-8
Swift
false
false
440
swift
// // Order+CoreDataClass.swift // App_iOS_Hymatik // // Created by Glenn Drescher on 29/04/2020. // Copyright © 2020 Hymatik. All rights reserved. // // import Foundation import CoreData @objc(Order) public class Order: NSManagedObject { public var wrappedName: String { name ?? "Error: No Name" } func getBarcodes() -> [Barcode] { return items?.array as? [Barcode] ?? [Barcode]() } }
[ -1 ]
6b452f45c5d4e9aaef51a5a7189aa09ec3c70db7
7225382b899fc33274d57d62fcaa87b61e753503
/Week 5/Tuesday/Timeline/Timeline/Model/Post.swift
7e1093ae475249edb1a94c102ea1a005e344ae08
[]
no_license
thomas-e-cowern/DevMountain
442ec353da039fc73a920a8028f5c7d9877f3802
a2bc6d7c420c27fed3c833100e0c50375a9d14e5
refs/heads/master
2020-04-05T16:29:48.558910
2019-03-29T21:19:21
2019-03-29T21:19:21
146,334,905
0
0
null
null
null
null
UTF-8
Swift
false
false
997
swift
// // Post.swift // Timeline // // Created by Thomas Cowern New on 1/1/19. // Copyright © 2019 Thomas Cowern New. All rights reserved. // import Foundation import UIKit class Post: SearchableRecord { func matches(searchTerm: String) -> Bool { if caption.lowercased().contains(searchTerm.lowercased()){ return true } else { return false } } var photoData: Data? var timestamp: Date var caption: String var comments: [Comment] var photo: UIImage? { get{ guard let photoData = photoData else {return nil} return UIImage(data: photoData) } set{ photoData = newValue?.jpegData(compressionQuality: 0.6) } } init(photo: UIImage, timestamp: Date = Date(), caption: String, comments: [Comment]) { self.timestamp = timestamp self.caption = caption self.comments = comments self.photo = photo } }
[ -1 ]
cda1154ac491ea19d05db8d9354bb8830c597114
8b921ff4764ec110f94579cbd3d857fd9c5f5053
/Viper-Sample/Scenes/Tracks/Protocols/TracksProtocols.swift
3d6e5375e8eaefe09fdfbab461a2be479bdea1a5
[]
no_license
Mahmoud3allam/ViperSampleScene
c2a18494cf453a11bd2dbbebc6c609b2eac5f4c4
93eb627faf59ed2192a25ae8c8c2a03938717347
refs/heads/master
2020-09-12T13:59:24.471586
2019-11-19T07:59:08
2019-11-19T07:59:08
222,446,878
1
0
null
null
null
null
UTF-8
Swift
false
false
1,256
swift
// // TracksProtocols.swift // Viper-Sample // // Created by Alchemist on 11/12/19. // Copyright © 2019 MAC. All rights reserved. // import Foundation protocol TracksViewProtocol: class { var presenter: TracksPresenterProtocol! {get set} func showLoadingIndicator() func hideLoadingIndicator() func reloadTracksData() func reloadAlbumsData() func showAlert(withTitle title: String) } protocol TracksPresenterProtocol: class { var view: TracksViewProtocol? {get set} func viewDidLoad() func numOfRows() -> Int func configure(tracksCell cell: TracksCellView, AtIndexpath indexPath: IndexPath) func albumsNumberOfRow() -> Int func configure(albumsCell cell: AlbumsCellView, AtIndexpath indexpath: IndexPath) } protocol TracksRouterProtocol { } protocol TracksInteractorInPutProtocol { var presenter: TracksInteractorOutPutProtocol? {get set} func getData() } protocol TracksInteractorOutPutProtocol: class { func tracksFetchedSucsessfully(tracks: [Track]) func failedToFetchData(stringError err: String) func albumsFetchedSucsessfully(albums: [Album]) } protocol TracksCellView { func configure(cellModel: Track) } protocol AlbumsCellView { func configure(cellModel: Album) }
[ -1 ]
7ab59920b88a24f5bfd9feea0e2f3e37adc686e4
1b0c39b9af718c0265a0794e99365b7836819f0a
/src/ios/PhotoLibraryService.swift
970e780f6d6ddfc422824161e04c049317db2907
[ "MIT" ]
permissive
dride/cordova-plugin-photo-library
0e442ecf0badf80047923c1be478f31e64b589d9
207bebd65c7065eef22acbc60bf1db65514699ea
refs/heads/master
2023-04-14T01:22:15.500508
2023-04-10T19:56:51
2023-04-10T19:56:51
170,301,228
0
1
MIT
2019-02-12T10:46:22
2019-02-12T10:46:19
Swift
UTF-8
Swift
false
false
31,902
swift
import Photos import Foundation import AssetsLibrary // TODO: needed for deprecated functionality import MobileCoreServices extension PHAsset { // Returns original file name, useful for photos synced with iTunes var originalFileName: String? { var result: String? // This technique is slow if #available(iOS 9.0, *) { let resources = PHAssetResource.assetResources(for: self) if let resource = resources.first { result = resource.originalFilename } } return result } var fileName: String? { return self.value(forKey: "filename") as? String } } final class PhotoLibraryService { let fetchOptions: PHFetchOptions! let thumbnailRequestOptions: PHImageRequestOptions! let imageRequestOptions: PHImageRequestOptions! let dateFormatter: DateFormatter! let cachingImageManager: PHCachingImageManager! let contentMode = PHImageContentMode.aspectFill // AspectFit: can be smaller, AspectFill - can be larger. TODO: resize to exact size var cacheActive = false let mimeTypes = [ "flv": "video/x-flv", "mp4": "video/mp4", "m3u8": "application/x-mpegURL", "ts": "video/MP2T", "3gp": "video/3gpp", "mov": "video/quicktime", "avi": "video/x-msvideo", "wmv": "video/x-ms-wmv", "gif": "image/gif", "jpg": "image/jpeg", "jpeg": "image/jpeg", "png": "image/png", "tiff": "image/tiff", "tif": "image/tiff" ] static let PERMISSION_ERROR = "Permission Denial: This application is not allowed to access Photo data." let dataURLPattern = try! NSRegularExpression(pattern: "^data:.+?;base64,", options: NSRegularExpression.Options(rawValue: 0)) let assetCollectionTypes = [PHAssetCollectionType.album, PHAssetCollectionType.smartAlbum/*, PHAssetCollectionType.moment*/] fileprivate init() { fetchOptions = PHFetchOptions() fetchOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)] //fetchOptions.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.image.rawValue) if #available(iOS 9.0, *) { fetchOptions.includeAssetSourceTypes = [.typeUserLibrary, .typeiTunesSynced, .typeCloudShared] } thumbnailRequestOptions = PHImageRequestOptions() thumbnailRequestOptions.isSynchronous = false thumbnailRequestOptions.resizeMode = .exact thumbnailRequestOptions.deliveryMode = .highQualityFormat thumbnailRequestOptions.version = .current thumbnailRequestOptions.isNetworkAccessAllowed = false imageRequestOptions = PHImageRequestOptions() imageRequestOptions.isSynchronous = false imageRequestOptions.resizeMode = .exact imageRequestOptions.deliveryMode = .highQualityFormat imageRequestOptions.version = .current imageRequestOptions.isNetworkAccessAllowed = false dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" cachingImageManager = PHCachingImageManager() } class var instance: PhotoLibraryService { struct SingletonWrapper { static let singleton = PhotoLibraryService() } return SingletonWrapper.singleton } static func hasPermission() -> Bool { return PHPhotoLibrary.authorizationStatus() == .authorized } func getLibrary(_ options: PhotoLibraryGetLibraryOptions, completion: @escaping (_ result: [NSDictionary], _ chunkNum: Int, _ isLastChunk: Bool) -> Void) { if(options.includeCloudData == false) { if #available(iOS 9.0, *) { // remove iCloud source type fetchOptions.includeAssetSourceTypes = [.typeUserLibrary, .typeiTunesSynced] } } // let fetchResult = PHAsset.fetchAssets(with: .image, options: self.fetchOptions) if(options.includeImages == true && options.includeVideos == true) { fetchOptions.predicate = NSPredicate(format: "mediaType == %d || mediaType == %d", PHAssetMediaType.image.rawValue, PHAssetMediaType.video.rawValue) } else { if(options.includeImages == true) { fetchOptions.predicate = NSPredicate(format: "mediaType == %d", PHAssetMediaType.image.rawValue) } else if(options.includeVideos == true) { fetchOptions.predicate = NSPredicate(format: "mediaType == %d", PHAssetMediaType.video.rawValue) } } let fetchResult = PHAsset.fetchAssets(with: fetchOptions) // TODO: do not restart caching on multiple calls // if fetchResult.count > 0 { // // var assets = [PHAsset]() // fetchResult.enumerateObjects({(asset, index, stop) in // assets.append(asset) // }) // // self.stopCaching() // self.cachingImageManager.startCachingImages(for: assets, targetSize: CGSize(width: options.thumbnailWidth, height: options.thumbnailHeight), contentMode: self.contentMode, options: self.imageRequestOptions) // self.cacheActive = true // } var chunk = [NSDictionary]() var chunkStartTime = NSDate() var chunkNum = 0 fetchResult.enumerateObjects({ (asset: PHAsset, index, stop) in if (options.maxItems > 0 && index + 1 > options.maxItems) { completion(chunk, chunkNum, true) return } let libraryItem = self.assetToLibraryItem(asset: asset, useOriginalFileNames: options.useOriginalFileNames, includeAlbumData: options.includeAlbumData) chunk.append(libraryItem) self.getCompleteInfo(libraryItem, completion: { (fullPath) in libraryItem["filePath"] = fullPath if index == fetchResult.count - 1 { // Last item completion(chunk, chunkNum, true) } else if (options.itemsInChunk > 0 && chunk.count == options.itemsInChunk) || (options.chunkTimeSec > 0 && abs(chunkStartTime.timeIntervalSinceNow) >= options.chunkTimeSec) { completion(chunk, chunkNum, false) chunkNum += 1 chunk = [NSDictionary]() chunkStartTime = NSDate() } }) }) } func mimeTypeForPath(path: String) -> String { let url = NSURL(fileURLWithPath: path) let pathExtension = url.pathExtension if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension! as NSString, nil)?.takeRetainedValue() { if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { return mimetype as String } } return "application/octet-stream" } func getCompleteInfo(_ libraryItem: NSDictionary, completion: @escaping (_ fullPath: String?) -> Void) { let ident = libraryItem.object(forKey: "id") as! String let fetchResult = PHAsset.fetchAssets(withLocalIdentifiers: [ident], options: self.fetchOptions) if fetchResult.count == 0 { completion(nil) return } let mime_type = libraryItem.object(forKey: "mimeType") as! String let mediaType = mime_type.components(separatedBy: "/").first fetchResult.enumerateObjects({ (obj: AnyObject, idx: Int, stop: UnsafeMutablePointer<ObjCBool>) -> Void in let asset = obj as! PHAsset if(mediaType == "image") { PHImageManager.default().requestImageData(for: asset, options: self.imageRequestOptions) { (imageData: Data?, dataUTI: String?, orientation: UIImageOrientation, info: [AnyHashable: Any]?) in if(imageData == nil) { completion(nil) } else { let file_url:URL = info!["PHImageFileURLKey"] as! URL // let mime_type = self.mimeTypes[file_url.pathExtension.lowercased()]! completion(file_url.relativePath) } } } else if(mediaType == "video") { PHImageManager.default().requestAVAsset(forVideo: asset, options: nil, resultHandler: { (avAsset: AVAsset?, avAudioMix: AVAudioMix?, info: [AnyHashable : Any]?) in if( avAsset is AVURLAsset ) { let video_asset = avAsset as! AVURLAsset let url = URL(fileURLWithPath: video_asset.url.relativePath) completion(url.relativePath) } else if(avAsset is AVComposition) { let token = info?["PHImageFileSandboxExtensionTokenKey"] as! String let path = token.components(separatedBy: ";").last completion(path) } }) } else if(mediaType == "audio") { // TODO: completion(nil) } else { completion(nil) // unknown } }) } private func assetToLibraryItem(asset: PHAsset, useOriginalFileNames: Bool, includeAlbumData: Bool) -> NSMutableDictionary { let libraryItem = NSMutableDictionary() libraryItem["id"] = asset.localIdentifier libraryItem["fileName"] = useOriginalFileNames ? asset.originalFileName : asset.fileName // originalFilename is much slower libraryItem["width"] = asset.pixelWidth libraryItem["height"] = asset.pixelHeight let fname = libraryItem["fileName"] as! String libraryItem["mimeType"] = self.mimeTypeForPath(path: fname) libraryItem["creationDate"] = self.dateFormatter.string(from: asset.creationDate!) if let location = asset.location { libraryItem["latitude"] = location.coordinate.latitude libraryItem["longitude"] = location.coordinate.longitude } if includeAlbumData { // This is pretty slow, use only when needed var assetCollectionIds = [String]() for assetCollectionType in self.assetCollectionTypes { let albumsOfAsset = PHAssetCollection.fetchAssetCollectionsContaining(asset, with: assetCollectionType, options: nil) albumsOfAsset.enumerateObjects({ (assetCollection: PHAssetCollection, index, stop) in assetCollectionIds.append(assetCollection.localIdentifier) }) } libraryItem["albumIds"] = assetCollectionIds } return libraryItem } func getAlbums() -> [NSDictionary] { var result = [NSDictionary]() for assetCollectionType in assetCollectionTypes { let fetchResult = PHAssetCollection.fetchAssetCollections(with: assetCollectionType, subtype: .any, options: nil) fetchResult.enumerateObjects({ (assetCollection: PHAssetCollection, index, stop) in let albumItem = NSMutableDictionary() albumItem["id"] = assetCollection.localIdentifier albumItem["title"] = assetCollection.localizedTitle result.append(albumItem) }); } return result; } func getThumbnail(_ photoId: String, thumbnailWidth: Int, thumbnailHeight: Int, quality: Float, completion: @escaping (_ result: PictureData?) -> Void) { let fetchResult = PHAsset.fetchAssets(withLocalIdentifiers: [photoId], options: self.fetchOptions) if fetchResult.count == 0 { completion(nil) return } fetchResult.enumerateObjects({ (obj: AnyObject, idx: Int, stop: UnsafeMutablePointer<ObjCBool>) -> Void in let asset = obj as! PHAsset self.cachingImageManager.requestImage(for: asset, targetSize: CGSize(width: thumbnailWidth, height: thumbnailHeight), contentMode: self.contentMode, options: self.thumbnailRequestOptions) { (image: UIImage?, imageInfo: [AnyHashable: Any]?) in guard let image = image else { completion(nil) return } let imageData = PhotoLibraryService.image2PictureData(image, quality: quality) completion(imageData) } }) } func getPhoto(_ photoId: String, completion: @escaping (_ result: PictureData?) -> Void) { let fetchResult = PHAsset.fetchAssets(withLocalIdentifiers: [photoId], options: self.fetchOptions) if fetchResult.count == 0 { completion(nil) return } fetchResult.enumerateObjects({ (obj: AnyObject, idx: Int, stop: UnsafeMutablePointer<ObjCBool>) -> Void in let asset = obj as! PHAsset PHImageManager.default().requestImageData(for: asset, options: self.imageRequestOptions) { (imageData: Data?, dataUTI: String?, orientation: UIImageOrientation, info: [AnyHashable: Any]?) in guard let image = imageData != nil ? UIImage(data: imageData!) : nil else { completion(nil) return } let imageData = PhotoLibraryService.image2PictureData(image, quality: 1.0) completion(imageData) } }) } func getLibraryItem(_ itemId: String, mimeType: String, completion: @escaping (_ base64: String?) -> Void) { let fetchResult = PHAsset.fetchAssets(withLocalIdentifiers: [itemId], options: self.fetchOptions) if fetchResult.count == 0 { completion(nil) return } // TODO: data should be returned as chunks, even for pics. // a massive data object might increase RAM usage too much, and iOS will then kill the app. fetchResult.enumerateObjects({ (obj: AnyObject, idx: Int, stop: UnsafeMutablePointer<ObjCBool>) -> Void in let asset = obj as! PHAsset let mediaType = mimeType.components(separatedBy: "/")[0] if(mediaType == "image") { PHImageManager.default().requestImageData(for: asset, options: self.imageRequestOptions) { (imageData: Data?, dataUTI: String?, orientation: UIImageOrientation, info: [AnyHashable: Any]?) in if(imageData == nil) { completion(nil) } else { // let file_url:URL = info!["PHImageFileURLKey"] as! URL // let mime_type = self.mimeTypes[file_url.pathExtension.lowercased()] completion(imageData!.base64EncodedString()) } } } else if(mediaType == "video") { PHImageManager.default().requestAVAsset(forVideo: asset, options: nil, resultHandler: { (avAsset: AVAsset?, avAudioMix: AVAudioMix?, info: [AnyHashable : Any]?) in let video_asset = avAsset as! AVURLAsset let url = URL(fileURLWithPath: video_asset.url.relativePath) do { let video_data = try Data(contentsOf: url) let video_base64 = video_data.base64EncodedString() // let mime_type = self.mimeTypes[url.pathExtension.lowercased()] completion(video_base64) } catch _ { completion(nil) } }) } else if(mediaType == "audio") { // TODO: completion(nil) } else { completion(nil) // unknown } }) } func getVideo(_ videoId: String, completion: @escaping (_ result: PictureData?) -> Void) { let fetchResult = PHAsset.fetchAssets(withLocalIdentifiers: [videoId], options: self.fetchOptions) if fetchResult.count == 0 { completion(nil) return } fetchResult.enumerateObjects({ (obj: AnyObject, idx: Int, stop: UnsafeMutablePointer<ObjCBool>) -> Void in let asset = obj as! PHAsset PHImageManager.default().requestAVAsset(forVideo: asset, options: nil, resultHandler: { (avAsset: AVAsset?, avAudioMix: AVAudioMix?, info: [AnyHashable : Any]?) in let video_asset = avAsset as! AVURLAsset let url = URL(fileURLWithPath: video_asset.url.relativePath) do { let video_data = try Data(contentsOf: url) let pic_data = PictureData(data: video_data, mimeType: "video/quicktime") // TODO: get mime from info dic ? completion(pic_data) } catch _ { completion(nil) } }) }) } func stopCaching() { if self.cacheActive { self.cachingImageManager.stopCachingImagesForAllAssets() self.cacheActive = false } } func requestAuthorization(_ success: @escaping () -> Void, failure: @escaping (_ err: String) -> Void ) { let status = PHPhotoLibrary.authorizationStatus() if status == .authorized { success() return } if status == .notDetermined { // Ask for permission PHPhotoLibrary.requestAuthorization() { (status) -> Void in switch status { case .authorized: success() default: failure("requestAuthorization denied by user") } } return } // Permission was manually denied by user, open settings screen let settingsUrl = URL(string: UIApplicationOpenSettingsURLString) if let url = settingsUrl { UIApplication.shared.openURL(url) // TODO: run callback only when return ? // Do not call success, as the app will be restarted when user changes permission } else { failure("could not open settings url") } } // TODO: implement with PHPhotoLibrary (UIImageWriteToSavedPhotosAlbum) instead of deprecated ALAssetsLibrary, // as described here: http://stackoverflow.com/questions/11972185/ios-save-photo-in-an-app-specific-album // but first find a way to save animated gif with it. // TODO: should return library item func saveImage(_ url: String, album: String, completion: @escaping (_ libraryItem: NSDictionary?, _ error: String?)->Void) { let sourceData: Data do { sourceData = try getDataFromURL(url) } catch { completion(nil, "\(error)") return } let assetsLibrary = ALAssetsLibrary() func saveImage(_ photoAlbum: PHAssetCollection) { assetsLibrary.writeImageData(toSavedPhotosAlbum: sourceData, metadata: nil) { (assetUrl: URL?, error: Error?) in if error != nil { completion(nil, "Could not write image to album: \(error)") return } guard let assetUrl = assetUrl else { completion(nil, "Writing image to album resulted empty asset") return } sleep(1) self.putMediaToAlbum(assetsLibrary, url: assetUrl, album: album, completion: { (error) in if error != nil { completion(nil, error) } else { let fetchResult = PHAsset.fetchAssets(withALAssetURLs: [assetUrl], options: nil) var libraryItem: NSDictionary? = nil if fetchResult.count == 1 { let asset = fetchResult.firstObject if let asset = asset { libraryItem = self.assetToLibraryItem(asset: asset, useOriginalFileNames: false, includeAlbumData: true) } } completion(libraryItem, nil) } }) } } if let photoAlbum = PhotoLibraryService.getPhotoAlbum(album) { saveImage(photoAlbum) return } PhotoLibraryService.createPhotoAlbum(album) { (photoAlbum: PHAssetCollection?, error: String?) in guard let photoAlbum = photoAlbum else { completion(nil, error) return } saveImage(photoAlbum) } } func saveVideo(_ url: String, album: String, completion: @escaping (_ url: URL?, _ error: String?)->Void) { // TODO: should return library item guard let videoURL = URL(string: url) else { completion(nil, "Could not parse DataURL") return } let assetsLibrary = ALAssetsLibrary() func saveVideo(_ photoAlbum: PHAssetCollection) { // TODO: new way, seems not supports dataURL // if !UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(videoURL.relativePath!) { // completion(url: nil, error: "Provided video is not compatible with Saved Photo album") // return // } // UISaveVideoAtPathToSavedPhotosAlbum(videoURL.relativePath!, nil, nil, nil) if #available(iOS 9.0, *) { PHPhotoLibrary.shared().performChanges({ let assetRequest = PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: videoURL)! let albumChangeRequest = PHAssetCollectionChangeRequest(for: photoAlbum) let placeHolder = assetRequest.placeholderForCreatedAsset albumChangeRequest?.addAssets([placeHolder!] as NSArray) }) { (isSuccess, error) in if isSuccess { completion(videoURL, nil) } else { completion(nil, "Could not write video to album: \(String(describing: error))") } } } else { if !assetsLibrary.videoAtPathIs(compatibleWithSavedPhotosAlbum: videoURL) { // TODO: try to convert to MP4 as described here?: http://stackoverflow.com/a/39329155/1691132 completion(nil, "Provided video is not compatible with Saved Photo album") return } assetsLibrary.writeVideoAtPath(toSavedPhotosAlbum: videoURL) { (assetUrl: URL?, error: Error?) in if error != nil { completion(nil, "Could not write video to album: \(String(describing: error))") return } guard let assetUrl = assetUrl else { completion(nil, "Writing video to album resulted empty asset") return } self.putMediaToAlbum(assetsLibrary, url: assetUrl, album: album, completion: { (error) in if error != nil { completion(nil, error) } else { completion(assetUrl, nil) } }) } } } if let photoAlbum = PhotoLibraryService.getPhotoAlbum(album) { saveVideo(photoAlbum) return } PhotoLibraryService.createPhotoAlbum(album) { (photoAlbum: PHAssetCollection?, error: String?) in guard let photoAlbum = photoAlbum else { completion(nil, error) return } saveVideo(photoAlbum) } } struct PictureData { var data: Data var mimeType: String } // TODO: currently seems useless enum PhotoLibraryError: Error, CustomStringConvertible { case error(description: String) var description: String { switch self { case .error(let description): return description } } } fileprivate func getDataFromURL(_ url: String) throws -> Data { if url.hasPrefix("data:") { guard let match = self.dataURLPattern.firstMatch(in: url, options: NSRegularExpression.MatchingOptions(rawValue: 0), range: NSMakeRange(0, url.characters.count)) else { // TODO: firstMatchInString seems to be slow for unknown reason throw PhotoLibraryError.error(description: "The dataURL could not be parsed") } let dataPos = match.range(at: 0).length let base64 = (url as NSString).substring(from: dataPos) guard let decoded = Data(base64Encoded: base64, options: NSData.Base64DecodingOptions(rawValue: 0)) else { throw PhotoLibraryError.error(description: "The dataURL could not be decoded") } return decoded } else { guard let nsURL = URL(string: url) else { throw PhotoLibraryError.error(description: "The url could not be decoded: \(url)") } guard let fileContent = try? Data(contentsOf: nsURL) else { throw PhotoLibraryError.error(description: "The url could not be read: \(url)") } return fileContent } } fileprivate func putMediaToAlbum(_ assetsLibrary: ALAssetsLibrary, url: URL, album: String, completion: @escaping (_ error: String?)->Void) { assetsLibrary.asset(for: url, resultBlock: { (asset: ALAsset?) in guard let asset = asset else { completion("Retrieved asset is nil") return } PhotoLibraryService.getAlPhotoAlbum(assetsLibrary, album: album, completion: { (alPhotoAlbum: ALAssetsGroup?, error: String?) in if error != nil { completion("getting photo album caused error: \(error)") return } alPhotoAlbum!.add(asset) completion(nil) }) }, failureBlock: { (error: Error?) in completion("Could not retrieve saved asset: \(error)") }) } fileprivate static func image2PictureData(_ image: UIImage, quality: Float) -> PictureData? { // This returns raw data, but mime type is unknown. Anyway, crodova performs base64 for messageAsArrayBuffer, so there's no performance gain visible // let provider: CGDataProvider = CGImageGetDataProvider(image.CGImage)! // let data = CGDataProviderCopyData(provider) // return data; var data: Data? var mimeType: String? if (imageHasAlpha(image)){ data = UIImagePNGRepresentation(image) mimeType = data != nil ? "image/png" : nil } else { data = UIImageJPEGRepresentation(image, CGFloat(quality)) mimeType = data != nil ? "image/jpeg" : nil } if data != nil && mimeType != nil { return PictureData(data: data!, mimeType: mimeType!) } return nil } fileprivate static func imageHasAlpha(_ image: UIImage) -> Bool { let alphaInfo = (image.cgImage)?.alphaInfo return alphaInfo == .first || alphaInfo == .last || alphaInfo == .premultipliedFirst || alphaInfo == .premultipliedLast } fileprivate static func getPhotoAlbum(_ album: String) -> PHAssetCollection? { let fetchOptions = PHFetchOptions() fetchOptions.predicate = NSPredicate(format: "title = %@", album) let fetchResult = PHAssetCollection.fetchAssetCollections(with: .album, subtype: .albumRegular, options: fetchOptions) guard let photoAlbum = fetchResult.firstObject else { return nil } return photoAlbum } fileprivate static func createPhotoAlbum(_ album: String, completion: @escaping (_ photoAlbum: PHAssetCollection?, _ error: String?)->()) { var albumPlaceholder: PHObjectPlaceholder? PHPhotoLibrary.shared().performChanges({ let createAlbumRequest = PHAssetCollectionChangeRequest.creationRequestForAssetCollection(withTitle: album) albumPlaceholder = createAlbumRequest.placeholderForCreatedAssetCollection }) { success, error in guard let placeholder = albumPlaceholder else { completion(nil, "Album placeholder is nil") return } let fetchResult = PHAssetCollection.fetchAssetCollections(withLocalIdentifiers: [placeholder.localIdentifier], options: nil) guard let photoAlbum = fetchResult.firstObject else { completion(nil, "FetchResult has no PHAssetCollection") return } if success { completion(photoAlbum, nil) } else { completion(nil, "\(error)") } } } fileprivate static func getAlPhotoAlbum(_ assetsLibrary: ALAssetsLibrary, album: String, completion: @escaping (_ alPhotoAlbum: ALAssetsGroup?, _ error: String?)->Void) { var groupPlaceHolder: ALAssetsGroup? assetsLibrary.enumerateGroupsWithTypes(ALAssetsGroupAlbum, usingBlock: { (group: ALAssetsGroup?, _ ) in guard let group = group else { // done enumerating guard let groupPlaceHolder = groupPlaceHolder else { completion(nil, "Could not find album") return } completion(groupPlaceHolder, nil) return } if group.value(forProperty: ALAssetsGroupPropertyName) as? String == album { groupPlaceHolder = group } }, failureBlock: { (error: Error?) in completion(nil, "Could not enumerate assets library") }) } }
[ -1 ]
e37d1962b7d56658f9e0e4c4b108e47aa358cf3a
93b6d383e353075bb5fc06b00df8f742311649fb
/TopSpin WatchKit Extension/Views/SignInWithAppleButton.swift
3acf7a5d21cfd7d3ffa6cd2950a9b219ef0fdd3f
[]
no_license
markthomas93/TopSpin
6dd9c6f071ac2ca0d96e68e71701488580413f7e
384ce29728ecbe3f12b8544154cdf86fdf57a2df
refs/heads/master
2022-03-01T09:11:48.220989
2019-09-26T15:59:39
2019-09-26T15:59:39
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,482
swift
// // SwiftUIView.swift // TopSpin WatchKit Extension // // Created by Will Brandin on 9/14/19. // import SwiftUI import AuthenticationServices struct SignInWithAppleButton: WKInterfaceObjectRepresentable { @Binding var user: UserSignUp? typealias WKInterfaceObjectRepresentable = WKInterfaceObjectRepresentableContext<SignInWithAppleButton> func updateWKInterfaceObject(_ wkInterfaceObject: WKInterfaceAuthorizationAppleIDButton, context: WKInterfaceObjectRepresentableContext<SignInWithAppleButton>) { // No code required } class Coordinator: NSObject, ASAuthorizationControllerDelegate { let parent: SignInWithAppleButton init(_ parent: SignInWithAppleButton) { self.parent = parent super.init() } @objc func buttonPressed() { #if DEBUG parent.user = UserSignUp(name: "Will", email: "[email protected]", userCredential: "00000001") #else let appleIDProvider = ASAuthorizationAppleIDProvider() let request = appleIDProvider.createRequest() request.requestedScopes = [.fullName, .email] let authorizationController = ASAuthorizationController(authorizationRequests: [request]) authorizationController.delegate = self authorizationController.performRequests() #endif } func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { guard let credential = authorization.credential as? ASAuthorizationAppleIDCredential else { return } let user = UserSignUp(name: credential.fullName?.givenName, email: credential.email, userCredential: credential.user) print(user) parent.user = user } func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) { print(error.localizedDescription) } } func makeCoordinator() -> Coordinator { return Coordinator(self) } func makeWKInterfaceObject(context: WKInterfaceObjectRepresentableContext<SignInWithAppleButton>) -> WKInterfaceAuthorizationAppleIDButton { return WKInterfaceAuthorizationAppleIDButton(target: context.coordinator, action: #selector(Coordinator.buttonPressed)) } }
[ -1 ]
2d134943f8325a79333c73f79f364bd2a2e80429
e91f2cc37ea2d52e0f8bddd53a34c6b5431f3135
/Sources/NIOHPACK/DynamicHeaderTable.swift
3281f6c5014cea4e8427a054bb3e6cf433f870fe
[]
no_license
AlanQuatermain/swift-nio-http2-first-stab
f07dac280250b6325ed7c2883c9f7580a892252d
968306f2118030d164802063b3a9da1769c1fd23
refs/heads/master
2020-03-23T01:17:03.328637
2018-07-14T02:16:15
2018-07-14T02:16:15
140,909,053
0
0
null
null
null
null
UTF-8
Swift
false
false
8,476
swift
// // DynamicHeaderTable.swift // H2Swift // // Created by Jim Dovey on 1/2/18. // import NIOConcurrencyHelpers class DynamicHeaderTable { public static let defaultSize = 4096 typealias HeaderTableStore = Array<HeaderTableEntry> /// The actual table, with items looked up by index. fileprivate var table: HeaderTableStore = [] fileprivate var lock = ReadWriteLock() var length: Int { return table.reduce(0) { $0 + $1.length } } var maximumLength: Int { didSet { if length > maximumLength { purge() } } } var count: Int { return table.count } enum Error : Swift.Error { case entryTooLarge(HeaderTableEntry) } init(maximumLength: Int = DynamicHeaderTable.defaultSize) { self.maximumLength = maximumLength } subscript(i: Int) -> HeaderTableEntry { return table[i] } func findExistingHeader(named name: String, value: String? = nil) -> (index: Int, containsValue: Bool)? { return lock.withReadLock { if let value = value { // looking for both name and value, but can settle for just name // thus we'll search manually var firstNameMatch: Int? = nil for (index, entry) in table.enumerated() where entry.name == name { if firstNameMatch == nil { // record the first (most recent) index with a matching header name, // in case there's no value match. firstNameMatch = index } if entry.value == value { return (index, true) } } // no value matches -- did we find a name match? if let index = firstNameMatch { return (index, false) } else { // no matches at all return nil } } else { // just looking for a name, so we can use the stdlib to find that guard let index = table.index(where: { $0.name == name }) else { return nil } return (index, false) } } } // Appends a header to the tables. Note that if this succeeds, the new item's index is always 0. func appendHeader(named name: String, value: String) throws { try lock.withWriteLockVoid { let entry = HeaderTableEntry(name: name, value: value) if length + entry.length > maximumLength { evict(atLeast: entry.length - (maximumLength - length)) // if there's still not enough room, then the entry is too large for the table // note that the HTTP2 spec states that we should make this check AFTER evicting // the table's contents: http://httpwg.org/specs/rfc7541.html#entry.addition // // "It is not an error to attempt to add an entry that is larger than the maximum size; an // attempt to add an entry larger than the maximum size causes the table to be emptied of // all existing entries and results in an empty table." guard length + entry.length <= maximumLength else { throw Error.entryTooLarge(entry) } } // insert the new item at the start of the array // trust to the implementation to handle this nicely table.insert(entry, at: 0) } } private func purge() { lock.withWriteLockVoid { if length <= maximumLength { return } evict(atLeast: length - maximumLength) } } fileprivate func evict(atLeast lengthToRelease: Int) { var lenReleased = 0 var numRemoved = 0 for entry in table.reversed() { lenReleased += entry.length numRemoved += 1 if (lenReleased >= lengthToRelease) { break } } table.removeLast(numRemoved) } } /// An alternative which maintains a pair of fast lookup tables in addition to the real header list. class DynamicHeaderTableWithFastLookup : DynamicHeaderTable { /// A pair of lookup tables, searching by name or name and value and retrieving a current index. private var nameLookup: [String : Int] = [:] private var nameValueLookup: [HeaderTableEntry : Int] = [:] override func findExistingHeader(named name: String, value: String? = nil) -> (index: Int, containsValue: Bool)? { return lock.withReadLock { guard let value = value else { // just look for the name if let found = nameLookup[name] { return (found, false) } else { return nil } } let entry = HeaderTableEntry(name: name, value: value) if let found = nameValueLookup[entry] { return (found, true) } else if let found = nameLookup[name] { return (found, false) } else { return nil } } } // Appends a header to the tables. Note that if this succeeds, the new item's index is always 0. override func appendHeader(named name: String, value: String) throws { try lock.withWriteLockVoid { let entry = HeaderTableEntry(name: name, value: value) if length + entry.length > maximumLength { evict(atLeast: entry.length - (maximumLength - length)) // if there's still not enough room, then the entry is too large for the table // note that the HTTP2 spec states that we should make this check AFTER evicting // the table's contents: http://httpwg.org/specs/rfc7541.html#entry.addition // // "It is not an error to attempt to add an entry that is larger than the maximum size; an // attempt to add an entry larger than the maximum size causes the table to be emptied of // all existing entries and results in an empty table." guard length + entry.length <= maximumLength else { throw Error.entryTooLarge(entry) } } // insert the new item at the start of the array // trust to the implementation to handle this nicely table.insert(entry, at: 0) // increment all the values in the lookup tables nameLookup = nameLookup.mapValues { $0 + 1 } nameValueLookup = nameValueLookup.mapValues { $0 + 1 } // insert the new item into the lookup tables nameLookup[entry.name] = 0 nameValueLookup[entry] = 0 } } override func evict(atLeast lengthToRelease: Int) { super.evict(atLeast: lengthToRelease) // now purge the lookup tables // I wish I knew a better way of handling this var nidx = nameLookup.startIndex repeat { if nameLookup[nidx].value >= table.endIndex { nameLookup.remove(at: nidx) } nidx = nameLookup.index(after: nidx) } while nidx < nameLookup.endIndex var vidx = nameValueLookup.startIndex repeat { if nameValueLookup[vidx].value >= table.endIndex { nameValueLookup.remove(at: vidx) } vidx = nameValueLookup.index(after: vidx) } while vidx < nameValueLookup.endIndex } } extension DynamicHeaderTable : CustomStringConvertible { var description: String { var result = "" for (index, entry) in table.enumerated() { result += "[\(index+1)] (s = \(entry.length)) \(entry.name): \(entry.value ?? "<none>")\n" } return result } }
[ -1 ]
55e57d137e2094afbac7afbdf2242606531a1614
a9188483f221aa7e35bc1b267d360d7b1e4c21ef
/Algorithm-Practice/2020-12-03-Algorithm-Practice-1/2020-12-03-Algorithm-Practice-1/main.swift
b240040a1614eaecf089dbc3cd0a032c3dc0c8ed
[]
no_license
VincentGeranium/Algorithm-Study
42753caea52daf36d5866e14b1f1c844ef2038e2
c1b80db9d587e3db30e4d850fa68624ae3c1d928
refs/heads/master
2021-06-22T15:18:46.310336
2021-01-30T09:54:31
2021-01-30T09:54:31
178,814,496
0
0
null
2020-12-03T05:53:35
2019-04-01T08:03:13
Swift
UTF-8
Swift
false
false
318
swift
// // main.swift // 2020-12-03-Algorithm-Practice-1 // // Created by 김광준 on 2020/12/03. // import Foundation while let lines = readLine() { let tempArr = lines.components(separatedBy: " ") let a = tempArr[0] let b = tempArr[1] if let a = Int(a), let b = Int(b) { print(a+b) } }
[ -1 ]
f29f94a728b23038af2e320b864782176bbe238e
339b18ccbe36edc2077d908b3d49e6e78e204aa9
/ToDoList/ToDoTask.swift
a7400750e455f078b36ef64f5c4e8d8e7eafa72f
[]
no_license
patrickjmcgoldrick/ToDoList
0ddbc12d12921909d7715c4fccd181cdc9ad3f6a
8426082b4bd53c256e65a7406178ee653cbb0680
refs/heads/master
2020-09-16T03:39:56.116086
2019-12-23T07:20:45
2019-12-23T07:20:45
223,639,840
0
0
null
null
null
null
UTF-8
Swift
false
false
2,373
swift
// // ToDoTask.swift // ToDoList // // Created by dirtbag on 11/23/19. // Copyright © 2019 dirtbag. All rights reserved. // import Foundation public class ToDoTask: NSObject, NSCoding { private static var idCount: Int32 = 0 public static func getNextId() -> Int32 { let count = idCount idCount += 1 return count } var id: Int32 var createdDate = Date() var dueDate: Date var title: String var desc: String var completed: Bool = false var completedDate: Date? // our encoder public func encode(with aCoder: NSCoder) { print("Calling Encode - todoId is: \(id)") aCoder.encodeCInt(id, forKey: "id") aCoder.encode(createdDate, forKey: "createdDate") aCoder.encode(dueDate, forKey: "dueDate") aCoder.encode(title, forKey: "title") aCoder.encode(desc, forKey: "desc") aCoder.encode(completed, forKey: "completed") aCoder.encode(completedDate, forKey: "completedDate") } // our decoder public required init?(coder aDecoder: NSCoder) { self.id = aDecoder.decodeCInt(forKey: "id") print("decoded id to: \(self.id)") self.createdDate = (aDecoder.decodeObject(forKey: "createdDate") as? Date)! self.dueDate = (aDecoder.decodeObject(forKey: "dueDate") as? Date)! self.title = (aDecoder.decodeObject(forKey: "title") as? String)! self.desc = (aDecoder.decodeObject(forKey: "desc") as? String)! self.completed = aDecoder.decodeBool(forKey: "completed") self.completedDate = aDecoder.decodeObject(forKey: "completedDate") as? Date } // constructor public init(dueDate: Date, title: String, desc: String) { print("Id: \(ToDoTask.idCount)") self.id = ToDoTask.getNextId() self.createdDate = Date() self.dueDate = dueDate self.title = title self.desc = desc self.completed = false self.completedDate = nil } // full constructor public init(createdDate: Date, dueDate: Date, title: String, desc: String, completed: Bool, completedDate: Date?) { self.id = 0 self.createdDate = createdDate self.dueDate = dueDate self.title = title self.desc = desc self.completed = completed self.completedDate = completedDate } }
[ -1 ]
a8f357fa6ebc286c762b9e4b83508cac9c8445ab
d27150b1fed428fef08e2eed73377f1cecc9bafa
/Swift/Bitwise Challenges.playground/Pages/1D - Count bits to flip and make binary sequences equal.xcplaygroundpage/Contents.swift
78c3ef36b310dc76df561914b7dabbc375a8d6ad
[ "MIT" ]
permissive
ptsurbeleu/coding-challenges
9c25d089179399d9be45a13d69858e78d2fc9779
71819e90a39571c0ece32b44dc8be9eb60ae7415
refs/heads/master
2020-03-18T10:12:14.926681
2019-05-25T19:40:15
2019-05-25T19:40:15
134,601,169
1
0
null
null
null
null
UTF-8
Swift
false
false
1,691
swift
//: [Previous](@previous) /* Write a function that given three binary string sequences `x` `y` and `z`, counts the minimal number of bits required to flip in `x` and `y`, so that `x ^ y` equals to `z`. EXAMPLE: Input: x = "1000", y = "0001", z = "0000" Output: 2 */ func flips(_ x: String, _ y: String, _ z: String) -> Int { // Prepare a few shorthands to keep it readable let xc = x.characters, yc = y.characters, zc = z.characters // Safe-guard from invalid input if xc.count != yc.count || xc.count != zc.count { // Signal to the user runtime error fatalError("All three sequences must have the same length") } // Prepare our counter var count = 0 // Loop thru indices of the first sequence for i in xc.indices { // Compare characters in sequences, much like XOR if xc[i] == yc[i] && zc[i] == "1" { // One more bit to flip count += 1 } else if xc[i] != yc[i] && zc[i] == "0" { // Yet another bit to flip count += 1 } } // Here is the answer return count } // Assert a few test cases flips("1010", "0010", "1001") == bits(0b1010 ^ 0b0010 ^ 0b1001) flips("1000", "0001", "0000") == bits(0b1000 ^ 0b0001 ^ 0b0000) flips("0000", "0000", "0000") == bits(0b0000 ^ 0b0000 ^ 0b0000) flips("0001", "0001", "0001") == bits(0b0001 ^ 0b0001 ^ 0b0001) flips("1001", "1001", "1001") == bits(0b1001 ^ 0b1001 ^ 0b1001) flips("1001", "1001", "0001") == bits(0b1001 ^ 0b1001 ^ 0b0001) flips("1111", "1011", "1101") == bits(0b1111 ^ 0b1011 ^ 0b1101) flips("1111", "1111", "1111") == bits(0b1111 ^ 0b1111 ^ 0b1111) //: [Next](@next)
[ -1 ]
8c78e107a58f1389cc64c4962607f783644ad9d8
3f98970d5ca09081de712623273bbca07745d392
/iBanksUAUITests/iBanksUAUITests.swift
d08038f4159d10c3a557ffe5cc8e37a7244fb146
[]
no_license
BloodyPixy/iBanksUA
871c91111acb6528b72d8ff7545005fc5daa3518
586769d9f3e5b17fdec21a60ff82599340fc5422
refs/heads/master
2022-01-26T08:13:57.768553
2016-05-31T13:20:57
2016-05-31T13:20:57
59,140,869
0
0
null
null
null
null
UTF-8
Swift
false
false
1,255
swift
// // iBanksUAUITests.swift // iBanksUAUITests // // Created by Taras Pasichnyk on 5/28/16. // Copyright © 2016 Taras Pasichnyk. All rights reserved. // import XCTest class iBanksUAUITests: 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. } }
[ 155665, 237599, 229414, 278571, 229425, 229431, 180279, 319543, 213051, 286787, 237638, 311373, 196687, 278607, 311377, 368732, 180317, 278637, 319599, 278642, 131190, 131199, 278669, 278676, 311447, 327834, 278684, 278690, 311459, 278698, 278703, 278707, 180409, 278713, 295099, 139459, 131270, 229591, 147679, 311520, 147680, 319719, 295147, 286957, 319764, 278805, 311582, 278817, 311596, 336177, 98611, 278843, 287040, 319812, 311622, 319816, 229716, 278895, 287089, 139641, 311679, 311692, 106893, 156069, 311723, 377265, 311739, 319931, 278974, 336319, 311744, 278979, 336323, 278988, 278992, 279000, 369121, 279009, 188899, 279014, 319976, 279017, 311787, 319986, 279030, 311800, 279033, 279042, 287237, 377352, 279053, 303634, 303635, 279060, 279061, 279066, 188954, 279092, 377419, 303693, 115287, 189016, 295518, 287327, 279143, 279150, 287345, 287348, 189054, 287359, 303743, 164487, 279176, 311944, 344714, 311948, 311950, 311953, 336531, 287379, 295575, 303772, 221853, 205469, 279207, 295591, 295598, 279215, 279218, 164532, 287412, 287418, 303802, 66243, 287434, 287438, 279249, 164561, 303826, 369365, 369366, 279253, 230105, 295653, 230120, 279278, 312046, 230133, 279293, 205566, 295688, 312076, 295698, 221980, 336678, 262952, 262953, 279337, 262957, 164655, 328495, 303921, 230198, 222017, 295745, 279379, 295769, 230238, 230239, 279393, 303973, 279398, 295797, 295799, 279418, 336765, 287623, 279434, 320394, 189327, 189349, 279465, 304050, 189373, 213956, 345030, 213961, 279499, 304086, 304104, 123880, 320492, 320495, 287730, 320504, 214009, 312313, 312315, 312317, 328701, 328705, 418819, 320520, 230411, 320526, 238611, 140311, 238617, 197658, 336930, 132140, 189487, 312372, 238646, 238650, 320571, 336962, 238663, 205911, 296023, 156763, 230500, 214116, 279659, 230514, 238706, 312435, 279666, 279686, 222344, 337037, 296091, 238764, 148674, 312519, 279752, 148687, 189651, 279766, 189656, 279775, 304352, 304353, 279780, 279789, 279803, 320769, 312588, 320795, 320802, 304422, 312628, 345398, 222523, 181568, 279872, 279874, 304457, 345418, 230730, 337228, 296269, 222542, 238928, 296274, 230757, 312688, 296304, 230772, 337280, 296328, 296330, 304523, 9618, 279955, 148899, 279979, 279980, 173492, 279988, 280003, 370122, 280011, 337359, 329168, 312785, 222674, 329170, 280020, 280025, 239069, 320997, 280042, 280043, 329198, 337391, 296434, 288248, 288252, 312830, 230922, 329231, 304655, 230933, 222754, 312879, 230960, 288305, 239159, 157246, 288319, 288322, 280131, 124486, 288328, 239192, 99937, 345697, 312937, 312941, 206447, 288377, 337533, 280193, 239238, 288391, 239251, 280217, 198304, 337590, 280252, 280253, 296636, 321217, 280259, 321220, 296649, 239305, 280266, 9935, 313042, 280279, 18139, 280285, 321250, 337638, 181992, 288492, 34547, 67316, 313082, 288508, 288515, 280326, 116491, 280333, 124691, 116502, 321308, 321309, 280367, 280373, 280377, 321338, 280381, 345918, 280386, 280391, 280396, 337746, 18263, 370526, 296807, 296815, 313200, 313204, 124795, 182145, 280451, 67464, 305032, 214936, 337816, 329627, 239515, 214943, 313257, 288698, 214978, 280517, 280518, 214983, 231382, 329696, 190437, 313322, 329707, 174058, 296942, 124912, 313338, 239610, 182277, 313356, 305173, 223269, 354342, 354346, 313388, 124974, 321589, 215095, 288829, 288835, 313415, 239689, 354386, 329812, 223317, 321632, 280676, 313446, 215144, 288878, 288890, 215165, 329884, 215204, 125108, 280761, 223418, 280767, 338118, 280779, 321744, 280792, 280803, 182503, 338151, 125166, 125170, 395511, 313595, 125184, 125192, 125197, 125200, 125204, 338196, 125215, 125225, 338217, 321839, 125236, 280903, 289109, 379224, 239973, 313703, 280938, 321901, 354671, 354672, 199030, 223611, 248188, 313726, 158087, 313736, 240020, 190870, 190872, 289185, 305572, 289195, 338359, 289229, 281038, 281039, 281071, 322057, 182802, 322077, 289328, 338491, 322119, 281165, 281170, 281200, 297600, 289435, 314020, 248494, 166581, 314043, 363212, 158424, 322269, 338658, 289511, 330473, 330476, 289517, 215790, 125683, 199415, 289534, 322302, 35584, 322312, 346889, 264971, 322320, 166677, 207639, 281378, 289580, 281407, 289599, 281426, 281434, 322396, 281444, 207735, 314240, 158594, 330627, 240517, 289691, 240543, 289699, 289704, 289720, 289723, 281541, 19398, 191445, 183254, 207839, 314343, 183276, 289773, 248815, 240631, 330759, 322571, 330766, 330789, 248871, 281647, 322609, 314437, 207954, 339031, 314458, 281698, 281699, 322664, 314493, 150656, 347286, 330912, 339106, 306339, 249003, 208044, 322733, 3243, 339131, 290001, 339167, 298209, 290030, 208123, 322826, 126229, 298290, 208179, 159033, 216387, 372039, 224591, 331091, 314708, 150868, 314711, 314721, 281958, 314727, 134504, 306541, 314734, 314740, 314742, 314745, 290170, 224637, 306558, 314752, 306561, 290176, 314759, 298378, 314765, 314771, 306580, 224662, 282008, 314776, 282013, 290206, 314788, 314790, 282023, 298406, 241067, 314797, 306630, 306634, 339403, 191980, 282097, 306678, 191991, 290304, 323079, 323083, 323088, 282132, 282135, 175640, 282147, 306730, 290359, 323132, 282182, 224848, 224852, 290391, 306777, 323171, 282214, 224874, 314997, 290425, 339579, 282244, 323208, 282248, 323226, 282272, 282279, 298664, 298666, 306875, 282302, 323262, 323265, 282309, 306891, 241360, 282321, 241366, 282330, 282336, 12009, 282347, 282349, 323315, 200444, 282366, 249606, 282375, 323335, 282379, 216844, 118549, 282390, 282399, 241440, 282401, 339746, 315172, 216868, 241447, 282418, 282424, 282428, 413500, 241471, 315209, 159563, 307024, 307030, 241494, 307038, 282471, 282476, 339840, 315265, 282503, 315272, 315275, 184207, 282517, 298912, 118693, 298921, 126896, 200628, 282572, 282573, 323554, 298987, 282634, 241695, 315431, 315433, 102441, 102446, 282671, 241717, 307269, 233548, 315468, 315477, 200795, 323678, 315488, 315489, 45154, 217194, 233578, 307306, 249976, 241809, 323730, 299166, 233635, 299176, 184489, 323761, 184498, 258233, 299197, 299202, 176325, 299208, 233678, 282832, 356575, 307431, 184574, 217352, 315674, 282908, 299294, 282912, 233761, 282920, 315698, 332084, 282938, 307514, 127292, 168251, 323914, 201037, 282959, 250196, 168280, 323934, 381286, 242027, 242028, 250227, 315768, 315769, 291193, 291194, 291200, 242059, 315798, 291225, 242079, 283039, 299449, 291266, 373196, 283088, 283089, 242138, 176602, 160224, 291297, 242150, 283138, 233987, 324098, 340489, 283154, 291359, 283185, 234037, 340539, 234044, 332379, 111197, 242274, 291455, 316044, 184974, 316048, 316050, 340645, 176810, 299698, 291529, 225996, 135888, 242385, 299737, 234216, 234233, 242428, 291584, 299777, 291591, 291605, 283418, 234276, 283431, 234290, 201534, 283466, 234330, 275294, 349025, 357219, 177002, 308075, 242540, 242542, 201590, 177018, 308093, 291713, 340865, 299912, 316299, 234382, 308111, 308113, 209820, 283551, 177074, 127945, 340960, 234469, 340967, 324587, 234476, 201721, 234499, 234513, 316441, 300087, 21567, 308288, 160834, 349254, 300109, 234578, 250965, 250982, 234606, 300145, 300147, 234626, 234635, 177297, 308375, 324761, 119965, 234655, 300192, 234662, 300200, 324790, 300215, 283841, 283846, 283849, 316628, 251124, 234741, 316661, 283894, 292092, 234756, 242955, 177420, 292145, 300342, 333114, 333115, 193858, 300355, 300354, 234830, 283990, 357720, 300378, 300379, 316764, 292194, 284015, 234864, 316786, 243073, 292242, 112019, 234902, 333224, 284086, 259513, 284090, 54719, 415170, 292291, 300488, 300490, 144862, 300526, 308722, 300539, 210429, 292359, 218632, 316951, 374297, 235069, 349764, 194118, 292424, 292426, 333389, 349780, 128600, 235096, 300643, 300645, 243306, 325246, 333438, 235136, 317102, 300725, 300729, 333508, 333522, 325345, 153318, 333543, 284410, 284425, 300810, 300812, 284430, 161553, 284436, 325403, 341791, 325411, 186148, 186149, 333609, 284460, 300849, 325444, 153416, 325449, 317268, 325460, 341846, 284508, 300893, 284515, 276326, 292713, 292719, 325491, 333687, 317305, 317308, 325508, 333700, 243590, 243592, 325514, 350091, 350092, 350102, 333727, 219046, 333734, 284584, 292783, 300983, 153553, 292835, 6116, 292838, 317416, 325620, 333827, 243720, 292901, 325675, 243763, 325695, 333902, 194667, 284789, 284790, 292987, 194692, 235661, 333968, 153752, 284827, 333990, 284840, 284843, 227517, 309443, 227525, 301255, 227536, 301270, 301271, 325857, 334049, 317676, 309504, 194832, 227601, 325904, 334104, 211239, 334121, 317738, 325930, 227655, 383309, 391521, 285031, 416103, 227702, 211327, 227721, 285074, 227730, 285083, 293275, 317851, 227743, 285089, 293281, 301482, 375211, 334259, 293309, 317889, 326083, 129484, 326093, 285152, 195044, 334315, 236020, 293368, 317949, 342537, 309770, 334345, 342560, 227881, 293420, 236080, 23093, 244279, 244280, 301635, 309831, 55880, 301647, 326229, 309847, 244311, 244326, 301688, 244345, 301702, 334473, 326288, 227991, 285348, 318127, 285360, 293552, 285362, 342705, 154295, 342757, 285419, 170735, 342775, 375552, 228099, 285443, 285450, 326413, 285457, 285467, 326428, 318247, 203560, 293673, 318251, 301872, 285493, 285496, 301883, 342846, 293702, 318279, 244569, 301919, 293729, 351078, 310132, 228214, 269179, 228232, 416649, 236427, 252812, 293780, 310166, 310177, 293801, 326571, 326580, 326586, 359365, 211913, 326602, 56270, 203758, 293894, 293911, 326684, 113710, 318515, 203829, 285795, 228457, 318571, 187508, 302202, 285819, 285823, 285833, 318602, 285834, 228492, 162962, 187539, 326803, 285850, 302239, 302251, 294069, 294075, 64699, 228541, 343230, 310496, 228587, 302319, 228608, 318732, 245018, 318746, 130342, 130344, 130347, 286012, 294210, 294220, 318804, 294236, 327023, 327030, 310650, 179586, 294278, 368012, 318860, 318876, 343457, 245160, 286128, 286133, 310714, 302523, 228796, 302530, 228804, 310725, 310731, 302539, 310735, 327122, 310747, 286176, 187877, 310758, 40439, 286201, 359931, 245249, 228868, 302602, 294413, 359949, 302613, 302620, 245291, 310853, 286281, 196184, 212574, 204386, 204394, 138862, 310896, 294517, 286344, 286351, 188049, 229011, 229021, 302751, 245413, 212649, 286387, 286392, 302778, 286400, 212684, 302798, 286419, 294621, 294629, 286457, 286463, 319232, 278292, 278294, 294699, 286507, 319289, 237397, 188250, 237411, 327556, 188293, 311183, 294806, 294808, 319393, 294820, 294824, 343993, 98240, 294849, 24531, 294887, 278507, 311277, 327666, 278515 ]
faae4d6ce28cdc8e8d3e1a846258b152b5bd0258
cb324fa49d4382ab1f9c780a0e7bee419ccd3c24
/z16.playground/Contents.swift
3d41e76c1368744e83fcd213898ec5f7c43ffdab
[]
no_license
artistbuddy/Stacja-IT---Wprowadzanie-do-Swift-3
2f179dcd5fcab4557b6e6e4ee6ad768f3b87208b
b133d58cca8055742e96ffe9f904d2e8b2327e46
refs/heads/master
2021-01-19T06:31:38.763035
2017-06-28T12:55:30
2017-06-28T12:55:30
95,669,242
0
0
null
null
null
null
UTF-8
Swift
false
false
548
swift
enum Sex { case male, female, gender } class Human { let age: Int let weight: Double let height: Double let name: String let sex: Sex var bmi: Double { return weight / (height * height) } init(name: String, age: Int, sex: Sex, weight: Double, height: Double) { self.name = name self.age = age self.sex = sex self.weight = weight self.height = height } } let karol = Human(name: "Karol", age: 23, sex: .male, weight: 80.0, height: 176.0) print(karol.bmi)
[ -1 ]
c5b421b4dfc6bba9d53c7fa3d593fc0fa009a132
302510f84d70853795ee31ea375a40b413bac53c
/Projet3-Game/FeatureOne.swift
e4e66942289126dfb9f941b64508164ea148e1b9
[]
no_license
SRihet/P3-OC--VideoGame
9223ee5b6c36801df8b208924496fc9ea2ec494b
20411f08042e5e44781890eb77950f300db83784
refs/heads/main
2023-02-07T19:39:18.929486
2020-12-28T14:16:00
2020-12-28T14:16:00
322,574,014
0
0
null
null
null
null
UTF-8
Swift
false
false
7,713
swift
// // FeatureOne.swift // Projet3-Game // // Created by Stéphane Rihet on 21/12/2020. // /* 1. Initialiser le jeu en demandant à chaque joueur de sélectionner les personnages de son équipe. Le joueur devra choisir pour chaque personnage un nom différent de tous les autres personnages déjà créés dans le jeu. */ import Foundation var currentTeam = Team(nameTeam: "currentTeam") //Knowing the team in play var nameCharacterList:[String] = [] //List of character names already in use var numberOfCharacter = 0 //Character number counter // Start the game with explanations func initGame() { print("----------------------------------------------------------------------------------------------------------------- \n✨✨Hello, Welcome to your new game directed by Stéphane Rihet ✨✨\n🧑🏻‍🏫 I am your assistant and I will guide you through the game. 🧑🏻‍🏫 \n⚔️⚔️ This game is a multiplayer game, 2 teams of 3 characters and a fight to the death ⚔️⚔️. \n-----------------------------------------------------------------------------------------------------------------") sleep(1) } //Choose the name of the teams func nameTeam (){ print("⏳ - Player 1, please enter the name of your team - ⌛️ ") var nameTeam: String nameTeam = limitString() // Returns a string read from standard input team1.nameTeam = nameTeam.capitalized //Assigns the return value to the variable with the first letter in upper case only sleep(1) print("✅ Player 1, your team name is \(team1.nameTeam) ✅\n---------------------------------------------------------------------------------------------------------------") sleep(1) print("⌛️ - Player 2, please enter the name of your team - ⌛️ ") nameTeam = limitString() // Returns a string read from standard input team2.nameTeam = nameTeam.capitalized //Assigns the return value to the variable with the first letter in upper case only sleep(1) print("✅ Player 2, your team name is \(team2.nameTeam) ✅\n-----------------------------------------------------------------------------------------------------------------") sleep(1) } //Choose the 3 characters that make up the team func chooseCharacter() { print("----------------------------------------------------------------------------------------------------------------- \n ▶︎▶︎ ✨ Team \(currentTeam.nameTeam): You can select your 3 heroes! ✨") sleep(2) while numberOfCharacter < 3 { // loop in relation to the character counter print("Choose the character \(numberOfCharacter + 1) : \n1️⃣ ▶︎▶︎ Knight, \(knightPv)PV & \(knightDammage) Dammage \n2️⃣ ▶︎▶︎ Goblin, \(goblinPv)PV & \(goblinDammage) Dammage \n3️⃣ ▶︎▶︎ Ogre, \(ogrePv)PV & \(ogreDammage) Dammage \n4️⃣ ▶︎▶︎ Centaur, \(CentaurPv)PV & \(CentaurDammage) Dammage \n5️⃣ ▶︎▶︎ Elf, \(elfPv)PV & \(elfDammage) Dammage \n6️⃣ ▶︎▶︎ Magus, \(magusPv)PV & \(magusRecovery) Recovery \n⏳------------------------------------Enter your choice-------------------------------------------⌛️") if let choiceCharacter = readLine() {// Returns a string read from standard input switch choiceCharacter { //Flow control case "1": editTeam(nbCharact: 1)//give a name to the character case "2": editTeam(nbCharact: 2)//give a name to the character case "3": editTeam(nbCharact: 3)//give a name to the character case "4": editTeam(nbCharact: 4)//give a name to the character case "5": editTeam(nbCharact: 5)//give a name to the character case "6": editTeam(nbCharact: 6)//give a name to the character default: print("‼️ I didn't understand, please type a number between 1️⃣ and 6️⃣ to select a character ‼️") sleep(2) } } } numberOfCharacter = 0 //reset counter } //Give a name to the character func editTeam(nbCharact:Int) { var choiceIsOK = false// Boolean to validate console return numberOfCharacter += 1 //Counter increment while choiceIsOK == false { //Loop in relation to the validation of the choice print("⌛️ - Please choose a name for it - ⌛️") let nameCharacter = limitString()// Returns a string read from standard input let checkName = checkNameDifferent(name: nameCharacter) //Check that the name is not used if checkName == true { switch nbCharact { case 1: addToTeam(numberCharacter: numberOfCharacter, character: Knight(playerName: nameCharacter.capitalized)) //Adding the character to the team case 2: addToTeam(numberCharacter: numberOfCharacter, character: Goblin(playerName: nameCharacter.capitalized)) //Adding the character to the team case 3: addToTeam(numberCharacter: numberOfCharacter, character: Ogre(playerName: nameCharacter.capitalized)) //Adding the character to the team case 4: addToTeam(numberCharacter: numberOfCharacter, character: Centaur(playerName: nameCharacter.capitalized)) //Adding the character to the team case 5: addToTeam(numberCharacter: numberOfCharacter, character: Elf(playerName: nameCharacter.capitalized)) //Adding the character to the team case 6: addToTeam(numberCharacter: numberOfCharacter, character: Magus(playerName: nameCharacter.capitalized)) //Adding the character to the team default: print("‼️ This number is not correct ‼️") } nameCharacterList.append(nameCharacter.uppercased()) //Adding the name to the list choiceIsOK = true //Changing the Boolean value if the name is not used }else{ print("⛔️ This name is already in use ⛔️") choiceIsOK = false //Changing the Boolean value if the name is used } } } //Function that checks whether the name entered is already in the list, it returns a boolean func checkNameDifferent (name:String) -> Bool { let name = name.uppercased() //Parameter received by the function var test:Bool = true //Initialization of the boolean //Loop to compare the parameter with all the data in the list. for names in nameCharacterList { if name == names { test = false // If the parameter is identical to one of the values in the list, then the boolean value is false. return test } test = true } return test } /* Function that receives an integer and a character as parameters, Use to add the character to the currentTeam depending on the counter, the character is associated with charact1, charact2 or charact3 */ func addToTeam(numberCharacter: Int, character: Character) { if numberCharacter == 1 { currentTeam.character1 = character } if numberCharacter == 2{ currentTeam.character2 = character } if numberCharacter == 3 { currentTeam.character3 = character } } /* Function which returns a string after checking its length */ func limitString() -> String { var string = readLine()! if string.count > 20 { //checking the length of the character string string = String(string.utf16.prefix(20))! print("‼️You have reached the maximum of 20 characters‼️") } return string }
[ -1 ]
c88e295a978f9f23cf3250c81fa8b236dfed94cf
701ab9f6cd714fa86c46e305968765f658d96ebd
/Project27/Project27/ViewController.swift
f617e36c9c5d82f3540e16f8deb2574607d16379
[]
no_license
MohammedHamdi/Hacking-With-Swift
4f37afd79f035daaaa174001a9671839a2be4d78
6ddb59f6794cd76de940f69adbdf75beb3a4f2d9
refs/heads/master
2021-02-04T00:36:22.151329
2020-02-27T18:34:44
2020-02-27T18:34:44
243,587,794
0
0
null
null
null
null
UTF-8
Swift
false
false
7,042
swift
// // ViewController.swift // Project27 // // Created by Mohammed Hamdi on 9/23/19. // Copyright © 2019 Mohammed Hamdi. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet var imageView: UIImageView! var currentDrawType = 0 override func viewDidLoad() { super.viewDidLoad() drawRectangle() } @IBAction func redrawTapped(_ sender: Any) { currentDrawType += 1 if currentDrawType > 6 { currentDrawType = 0 } switch currentDrawType { case 0: drawRectangle() case 1: drawCircle() case 2: drawCheckerboard() case 3: drawRotatedSquares() case 4: drawLines() case 5: drawImagesAndText() case 6: drawTwin() default: break } } func drawRectangle() { let renderer = UIGraphicsImageRenderer(size: CGSize(width: 512, height: 512)) let img = renderer.image { ctx in let rectangle = CGRect(x: 0, y: 0, width: 512, height: 512) ctx.cgContext.setFillColor(UIColor.red.cgColor) ctx.cgContext.setStrokeColor(UIColor.black.cgColor) ctx.cgContext.setLineWidth(10) ctx.cgContext.addRect(rectangle) ctx.cgContext.drawPath(using: .fillStroke) } imageView.image = img } func drawCircle() { let renderer = UIGraphicsImageRenderer(size: CGSize(width: 512, height: 512)) let img = renderer.image { ctx in let rectangle = CGRect(x: 0, y: 0, width: 512, height: 512).insetBy(dx: 5, dy: 5) ctx.cgContext.setFillColor(UIColor.red.cgColor) ctx.cgContext.setStrokeColor(UIColor.black.cgColor) ctx.cgContext.setLineWidth(10) ctx.cgContext.addEllipse(in: rectangle) ctx.cgContext.drawPath(using: .fillStroke) } imageView.image = img } func drawCheckerboard() { let renderer = UIGraphicsImageRenderer(size: CGSize(width: 512, height: 512)) let img = renderer.image { ctx in ctx.cgContext.setFillColor(UIColor.black.cgColor) for row in 0 ..< 8 { for col in 0 ..< 8 { if (row + col) % 2 == 0 { ctx.cgContext.fill(CGRect(x: col * 64, y: row * 64, width: 64, height: 64)) } } } } imageView.image = img } func drawRotatedSquares() { let renderer = UIGraphicsImageRenderer(size: CGSize(width: 512, height: 512)) let img = renderer.image { ctx in ctx.cgContext.translateBy(x: 256, y: 256) let rotations = 16 let amount = Double.pi / Double(rotations) for _ in 0 ..< rotations { ctx.cgContext.rotate(by: CGFloat(amount)) ctx.cgContext.addRect(CGRect(x: -128, y: -128, width: 256, height: 256)) } ctx.cgContext.setStrokeColor(UIColor.black.cgColor) ctx.cgContext.strokePath() } imageView.image = img } func drawLines() { let renderer = UIGraphicsImageRenderer(size: CGSize(width: 512, height: 512)) let img = renderer.image { ctx in ctx.cgContext.translateBy(x: 256, y: 256) var first = true var length: CGFloat = 256 for _ in 0 ..< 256 { ctx.cgContext.rotate(by: .pi / 2) if first { ctx.cgContext.move(to: CGPoint(x: length, y: 50)) first = false } else { ctx.cgContext.addLine(to: CGPoint(x: length, y: 50)) } length *= 0.99 } ctx.cgContext.setStrokeColor(UIColor.black.cgColor) ctx.cgContext.strokePath() } imageView.image = img } func drawImagesAndText() { let renderer = UIGraphicsImageRenderer(size: CGSize(width: 512, height: 512)) let img = renderer.image { ctx in let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = .center let attrs: [NSAttributedString.Key: Any] = [ .font: UIFont.systemFont(ofSize: 36), .paragraphStyle: paragraphStyle ] let string = "The best-laid schemes o'\nmice an' men gang aft agley" let attributedString = NSAttributedString(string: string, attributes: attrs) attributedString.draw(with: CGRect(x: 32, y: 32, width: 448, height: 448), options: .usesLineFragmentOrigin, context: nil) let mouse = UIImage(named: "mouse") mouse?.draw(at: CGPoint(x: 300, y: 150)) } imageView.image = img } func drawTwin() { let renderer = UIGraphicsImageRenderer(size: CGSize(width: 512, height: 512)) let img = renderer.image { ctx in //T ctx.cgContext.move(to: CGPoint(x: 16, y: 16)) ctx.cgContext.addLine(to: CGPoint(x: 80, y: 16)) ctx.cgContext.move(to: CGPoint(x: 40, y: 16)) ctx.cgContext.addLine(to: CGPoint(x: 40, y: 128)) //W ctx.cgContext.move(to: CGPoint(x: 96, y: 16)) ctx.cgContext.addLine(to: CGPoint(x: 128, y: 128)) ctx.cgContext.move(to: CGPoint(x: 128, y: 128)) ctx.cgContext.addLine(to: CGPoint(x: 160, y: 16)) ctx.cgContext.move(to: CGPoint(x: 160, y: 16)) ctx.cgContext.addLine(to: CGPoint(x: 192, y: 128)) ctx.cgContext.move(to: CGPoint(x: 192, y: 128)) ctx.cgContext.addLine(to: CGPoint(x: 224, y: 16)) //I ctx.cgContext.move(to: CGPoint(x: 240, y: 16)) ctx.cgContext.addLine(to: CGPoint(x: 240, y: 128)) //N ctx.cgContext.move(to: CGPoint(x: 256, y: 16)) ctx.cgContext.addLine(to: CGPoint(x: 256, y: 128)) ctx.cgContext.move(to: CGPoint(x: 256, y: 16)) ctx.cgContext.addLine(to: CGPoint(x: 304, y: 128)) ctx.cgContext.move(to: CGPoint(x: 304, y: 128)) ctx.cgContext.addLine(to: CGPoint(x: 304, y: 16)) ctx.cgContext.setStrokeColor(UIColor.black.cgColor) ctx.cgContext.strokePath() } imageView.image = img } }
[ 241653 ]
dd22353597c11af08e3ff5689a1bfac7a8e2a1c4
bc5050d3ebe840fa4945b8c0b11a720b36da8783
/MonsterTown/MonsterTown/Vampire.swift
bdfaf25e1a139f2bcbaa30a3a30a74f4d4f96831
[]
no_license
kernjackson/bignerdswift
6b0bbca394a9eeec3102752266b89f5525f3ee86
43821f77fbcf25097b38a97392c6cb01b39a80f5
refs/heads/master
2021-01-10T08:20:52.652018
2016-01-14T22:50:08
2016-01-14T22:50:08
49,172,782
0
0
null
null
null
null
UTF-8
Swift
false
false
507
swift
// // Vampire.swift // MonsterTown // // Created by admin on 1/2/16. // Copyright © 2016 Kern. All rights reserved. // import Foundation class Vampire: Monster { var thralls = [Vampire]() final override func terrorizeTown() { if town?.population < 1 { town?.population = 0 } else { town?.changePopulation(-1) thralls.append(Vampire()) } super.terrorizeTown() print(thralls.count) } }
[ -1 ]
d8a29c2ca128289b48ab469c67de9a38e8c8d80c
ff35ff9d06ed626339b141923816fc84bce5977b
/MyStudySpace/SettingTableVC.swift
b88c3ff2dfaeb2c3ef713155b259bd225aec3ca7
[]
no_license
yohaoquan/MyStudySpace
17a1db675d12d574e2b89b4b13e38c147a88eb18
613b5282e3287d9d70f470d005593a36ae6bd2ae
refs/heads/master
2022-04-18T18:35:10.623678
2020-04-22T06:36:46
2020-04-22T06:36:46
254,469,731
0
0
null
null
null
null
UTF-8
Swift
false
false
3,892
swift
// // TableViewController.swift // MyStudySpace // // Created by Xiaohu He on 2020-04-12. // Copyright © 2020 Haoquan you. All rights reserved. // import UIKit class SettingTableVC: 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 } @IBAction func unwindToSTVC(segue: UIStoryboardSegue) { } @IBAction func LogOutTapped(_ sender: Any) { EnrollmentsHelper.sharedInstance.enrollments = Enrollments(PagingInfo: PagingInfo(Bookmark: "", HasMoreItems: false), Items: []) let encoded = try? JSONEncoder().encode(EnrollmentsHelper.sharedInstance.enrollments) UserDefaults.standard.set(encoded, forKey: "enrollments") LoginHelper.sharedInstance.loginState = LoginState(userId: "", userKey: "") LoginHelper.sharedInstance.loginState?.isLoggedIn = false LoginHelper.sharedInstance.saveLoginState() let homeVC = self.storyboard?.instantiateViewController(identifier: "OnboardingScreen") self.view.window?.rootViewController = homeVC self.view.window?.makeKeyAndVisible() } // MARK: - Table view data source // override func numberOfSections(in tableView: UITableView) -> Int { // // #warning Incomplete implementation, return the number of sections // return 3 // } // // override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // // #warning Incomplete implementation, return the number of rows // return 2 // } /* 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. } */ }
[ -1 ]
14d0650da399aede6278662266399f1f45760b02
27142b2e368fbd879ab34b0652a32364e69b4002
/UsingObjCInSwiftTests/UsingObjCInSwiftTests.swift
ccfaa0046e68d7cfbed8af6da8663e89ce48a85b
[]
no_license
brightec/ObjCInSwift
ccf11a35909775974d8764578f051454f790b0f7
fe43427c271bea055f984ae5d978be7a0957a221
refs/heads/master
2021-03-12T23:39:52.852990
2014-10-30T19:36:41
2014-10-30T19:36:41
24,589,435
1
0
null
null
null
null
UTF-8
Swift
false
false
929
swift
// // UsingObjCInSwiftTests.swift // UsingObjCInSwiftTests // // Created by JOSE MARTINEZ on 29/09/2014. // Copyright (c) 2014 brightec. All rights reserved. // import UIKit import XCTest class UsingObjCInSwiftTests: 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. } } }
[ 291585, 276709, 209670, 354345, 278954, 276046, 276430, 225936, 295953, 276787, 228824, 211193, 161722 ]
da468d583225b8ad514f30cc98fda513d5c7df82
5bbf677d822d49f5ea1cc460a77c7e784915a932
/foodsy/Views/IngredientTableViewCell.swift
2e0d7d2f046bf7c9af7d6688fe189a0de29b4ac0
[ "Apache-2.0" ]
permissive
Foodly/foodsy
265e3b696d69f9c62700ad1b92c028e2600a8ae2
6656f4325358042181f04b3ec1b0e1e479072a42
refs/heads/master
2021-08-11T03:15:43.340086
2017-11-13T05:18:13
2017-11-13T05:18:13
106,328,578
0
2
null
2017-11-13T05:18:14
2017-10-09T19:52:49
Swift
UTF-8
Swift
false
false
2,683
swift
// // IngredientTableViewCell.swift // foodsy // // Created by drishi on 10/15/17. // Copyright © 2017 Foodly. All rights reserved. // import UIKit import SwipeCellKit @objc protocol IngredientTableViewCellDelegate { @objc optional func ingredientAdded(ingredient: Ingredient) } class IngredientTableViewCell: SwipeTableViewCell { @IBOutlet weak var cardView: UIView! @IBOutlet weak var ingredientImage: UIImageView! @IBOutlet weak var ingredientName: UILabel! @IBOutlet weak var addButton: UIImageView! @IBOutlet weak var quantityLabel: UILabel! @IBOutlet weak var quantity: UILabel! @IBOutlet weak var reminderLabel: UILabel! @IBOutlet weak var reminder: UILabel! var ingredientDelegate: IngredientTableViewCellDelegate! var ingredient: Ingredient! { didSet { ingredient.getImage(success: { (image) in if image != nil { self.ingredientImage.image = image } else if self.ingredient.image != nil { self.ingredientImage.setImageWith(self.ingredient.getImageUrl()!) } }) { (error) in print("Error: \(error.localizedDescription)") } ingredientName.text = ingredient.name if ingredient.quantity != nil { quantityLabel.text = ingredient.quantity?.description quantity.isHidden = false } else { quantity.isHidden = false quantityLabel.text = "0" } if ingredient.reminderDays != nil { reminderLabel.text = (ingredient.reminderDays?.description)! + " DAYS" reminder.isHidden = false } else { reminderLabel.text = "0" reminder.isHidden = false } } } override func awakeFromNib() { super.awakeFromNib() let addIngredientRecognizer = UITapGestureRecognizer(target: self, action: #selector(onAddIngredient(tapGestureRecognizer:))) addButton.isUserInteractionEnabled = true addButton.addGestureRecognizer(addIngredientRecognizer) cardView.addShadow() quantity.addTextSpacing(spacing: 1.5) reminder.addTextSpacing(spacing: 1.5) } @objc func onAddIngredient(tapGestureRecognizer: UITapGestureRecognizer) { ingredientDelegate.ingredientAdded!(ingredient: ingredient) } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ -1 ]
82b2bc36d744a7e3ee861381747fb84f244b2371
54125d026244ab5f4a93c97e0999f9d29df55d38
/Example/Robin/AppDelegate.swift
bf3182f8d3f307154e232ceeee6dcfd215e1ca86
[ "MIT" ]
permissive
alobanov/Robin
0adbc7e2937e047d669e075e6d7ac73351893b0d
2ea3cfbc4b27707152058cdc85f793d2ba7eb57e
refs/heads/master
2021-05-06T22:29:27.030998
2017-11-26T00:34:40
2017-11-26T00:34:40
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,171
swift
// // AppDelegate.swift // Robin // // Created by ahmedabadie on 08/26/2017. // Copyright (c) 2017 ahmedabadie. 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 throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 229432, 204856, 286776, 319544, 352318, 286791, 237640, 286797, 278605, 311375, 237646, 163920, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 327814, 131209, 303241, 417930, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 319694, 286926, 286928, 131281, 131278, 278743, 278747, 295133, 155872, 131299, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 287238, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 189040, 352880, 295538, 172656, 172660, 189044, 287349, 189039, 287355, 287360, 295553, 295557, 287365, 311942, 303751, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 287386, 221850, 230045, 172702, 287390, 164509, 172705, 287394, 172707, 303780, 303773, 287398, 205479, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 279231, 287427, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 279258, 287450, 303835, 189149, 303838, 213724, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 304007, 320391, 304009, 213895, 304011, 230284, 304013, 295822, 189325, 213902, 189329, 279438, 304019, 295825, 189331, 58262, 304023, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 295949, 230413, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 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, 296213, 230677, 296215, 230679, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 296264, 320840, 238919, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 279929, 181626, 304505, 304506, 181631, 312711, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 279985, 288176, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 148946, 222676, 288212, 288214, 370130, 280021, 329177, 288217, 288218, 280027, 288220, 239070, 239064, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 402942, 148990, 206336, 296450, 321022, 230916, 230919, 214535, 304651, 370187, 304653, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 337732, 280388, 304968, 280393, 280402, 173907, 313176, 42842, 280419, 321381, 280426, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 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, 288764, 313340, 239612, 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, 223327, 280671, 149599, 149601, 149603, 321634, 329830, 280681, 313451, 223341, 280687, 215154, 313458, 280691, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 275606, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 321740, 313548, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 182517, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 321817, 125209, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 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, 240132, 305668, 330244, 223749, 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, 281210, 297594, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 289687, 224151, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 314773, 306581, 314779, 314785, 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, 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, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 307009, 413506, 241475, 307012, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 315251, 110450, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 44948, 241556, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 299191, 176311, 307385, 307386, 258235, 307388, 176316, 307390, 184503, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 295583, 176435, 307508, 315701, 307510, 332086, 307512, 168245, 307515, 282942, 307518, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127431, 127440, 315856, 176592, 315860, 176597, 127447, 283095, 127449, 299481, 176605, 127455, 242143, 127457, 291299, 127460, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 291314, 291317, 127480, 135672, 291323, 233979, 127490, 291330, 127494, 283142, 127497, 135689, 233994, 127500, 291341, 233998, 234003, 127509, 234006, 152087, 127511, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 225948, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 381677, 185074, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 242436, 234246, 234248, 291593, 226056, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 348950, 234264, 201496, 234266, 291608, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 234313, 316233, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324504, 234398, 291742, 324508, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 234410, 324522, 291754, 226220, 234414, 324527, 291760, 234417, 201650, 324531, 291756, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 226239, 242623, 234434, 324544, 324546, 234437, 226245, 234439, 324548, 234443, 291788, 234446, 275406, 193486, 234449, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 234520, 316439, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 308291, 160835, 234563, 316483, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 300148, 234614, 398455, 234618, 144506, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 226453, 234648, 234647, 234650, 308379, 275608, 234653, 300189, 119967, 283805, 234657, 324766, 324768, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 316596, 308414, 234687, 300226, 308418, 234692, 283844, 300229, 308422, 308420, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 300301, 349451, 242957, 177424, 275725, 283917, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 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, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 284084, 144820, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 300507, 103899, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 259567, 308720, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 194103, 284215, 316983, 284218, 226877, 284223, 284226, 243268, 292421, 284228, 284231, 226886, 128584, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 300628, 276053, 284245, 276052, 284247, 235097, 243290, 284249, 284251, 284253, 300638, 284255, 317015, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 292470, 276086, 284278, 292473, 284283, 276093, 284286, 292479, 276095, 292481, 284290, 325250, 284292, 292485, 276098, 284288, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 317098, 284329, 284331, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 276175, 284368, 276177, 317138, 284370, 358098, 284372, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 276206, 358128, 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, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 358292, 399252, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 292776, 358312, 317353, 276395, 284585, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 358360, 301017, 292828, 276446, 153568, 276448, 292839, 276455, 350186, 292843, 276460, 292845, 178161, 227314, 276466, 350200, 276472, 325624, 317435, 276476, 276479, 350210, 276482, 178181, 276485, 350218, 276490, 292876, 350222, 317456, 276496, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 178224, 276528, 243762, 309298, 325685, 325689, 235579, 276539, 235581, 178238, 325692, 276544, 243779, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 194649, 350302, 194654, 227423, 178273, 227426, 276579, 194660, 350308, 309346, 309348, 292968, 350313, 309354, 227430, 350316, 276583, 309350, 301167, 309352, 350321, 276590, 276595, 284786, 350325, 227440, 350328, 292985, 301178, 292989, 292993, 301185, 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, 276689, 309462, 301272, 276699, 309468, 194780, 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, 342434, 317858, 285093, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 227810, 276964, 293352, 236013, 293364, 293370, 301562, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 309779, 277011, 309781, 317971, 55837, 227877, 227879, 293417, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 334476, 326285, 318094, 318092, 277136, 277139, 227992, 285340, 318108, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 342707, 293555, 154292, 277173, 318132, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 293677, 318253, 285489, 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, 277385, 187274, 39817, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 277486, 326638, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 302075, 244731, 293882, 285690, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 7232, 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, 285817, 367737, 302205, 285821, 392326, 285831, 253064, 302218, 285835, 294026, 162964, 384148, 187542, 302231, 302233, 285849, 285852, 302237, 285854, 285856, 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, 204023, 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, 294211, 302403, 384328, 277832, 277836, 146765, 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, 310659, 294276, 351619, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 245191, 310727, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 212472, 40440, 278009, 286203, 40443, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 187936, 146977, 286240, 294435, 40484, 187939, 40486, 294439, 294440, 286246, 245288, 294443, 40488, 294445, 286248, 40491, 310831, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 122517, 278168, 327333, 229030, 212648, 302764, 278188, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 301163, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 302872, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 237409, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 319390, 40865, 294817, 319394, 294821, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
840931c1a7c03608832ee29fd1f097cd8cf954d2
ade6828159cfad850e92d0399c3e78fdfac0ba35
/workspaces/telepath-ios/Pods/STRegex/Source/Regex/Memo.swift
59c8c6b32660a311d1bec4eeee88e9f4b14eec8f
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
philips-software/cogito
c983f219b0cb0374552e313bf0ac66f8005ddc7d
e84ddb4fb1e9ae95652595f3111c43eebb6e4982
refs/heads/master
2023-08-31T16:18:56.808691
2020-08-25T15:31:54
2020-08-26T07:44:55
136,214,087
17
7
MIT
2023-08-23T21:36:31
2018-06-05T17:47:45
Swift
UTF-8
Swift
false
false
1,657
swift
// Copyright (c) 2014 Rob Rix. All rights reserved. // // Source: https://github.com/robrix/Memo/blob/326153487940ab19c1d25761656269e25fbbf119/Memo/Memo.swift /// Deferred, memoized evaluation. internal struct Memo<T> { // MARK: Lifecycle /// Constructs a `Memo` which lazily evaluates the argument. init(_ unevaluated: @escaping () -> T) { self.init(state: .unevaluated(unevaluated)) } /// Constructs a `Memo` wrapping the already-evaluated argument. init(evaluated: T) { self.init(state: .evaluated(evaluated)) } // MARK: Properties /// Returns the value held by the receiver, computing & memoizing it first if necessary. var value: T { return state.value.value() } // MARK: Private /// Initialize with the passed `state`. private init(state: MemoState<T>) { self.state = MutableBox(state) } /// The underlying state. /// /// The `enum` implements the basic semantics (either evaluated or un), /// while the `MutableBox` provides us with reference semantics for the /// memoized result. private let state: MutableBox<MemoState<T>> } // MARK: Private /// Private state for memoization. private enum MemoState<T> { case evaluated(T) case unevaluated(() -> T) /// Return the value, computing and memoizing it first if necessary. mutating func value() -> T { switch self { case let .evaluated(x): return x case let .unevaluated(f): let value = f() self = .evaluated(value) return value } } } /// A mutable reference type boxing a value. private final class MutableBox<T> { init(_ value: T) { self.value = value } var value: T }
[ -1 ]
71c7dbf301c2987458a00ee32f9e709c8e99ca79
7c019e281d4fc24803236df7a759d574797e5d42
/LeetCode-Swift-master/LeetCode/Q35ViewController.swift
79c052f148ff4fe7b2a03e37a4ceed0f2ba2783b
[ "MIT" ]
permissive
lengain/LeetCode-Swift-master
5ac5107344ced119e4dfbd46266124c889c486d4
8806e1ea64ab756aaf7e5e4b95aeeb8bd3f71126
refs/heads/master
2020-04-16T13:55:41.420880
2020-03-18T15:11:16
2020-03-18T15:11:16
165,648,263
2
2
null
null
null
null
UTF-8
Swift
false
false
1,189
swift
// // Q35ViewController.swift // LeetCode-Swift-master // // Created by 童玉龙 on 2020/3/5. // Copyright © 2020 Lengain. All rights reserved. // import UIKit class Q35ViewController: LNBaseViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. print(self.searchInsert([1,3,5,6], 7)) print(self.searchInsert([1,3,5,6], 2)) } func searchInsert(_ nums: [Int], _ target: Int) -> Int { if nums.count == 0 { return 0 } if nums.last! < target { return nums.count } var index = 0 for i in 0 ..< nums.count { if nums[i] >= target { index = i break } } return index } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ -1 ]
c0b0bb703dcd3dd43659497aa8121b1d62e3fd98
ed8c3694d4d07b2db20aecc9b43cceafffa8589f
/WarehouseTests/WarehouseTests.swift
14bfb4f339bf467da6d00ef2d94eb5aab6f548ac
[ "MIT" ]
permissive
NSCSKirk/Warehouse
08a716abdef4db96838e6dbecb4bf01bcca7c841
ecdd87dd7dc908f15c2c6a3c5c839e0b556a63a5
refs/heads/master
2021-05-29T18:02:18.052908
2015-09-29T01:48:24
2015-09-29T01:48:24
null
0
0
null
null
null
null
UTF-8
Swift
false
false
987
swift
// // WarehouseTests.swift // WarehouseTests // // Created by Michael Kirk on 9/28/15. // Copyright © 2015 Winterlane, LLC. All rights reserved. // import XCTest @testable import Warehouse class WarehouseTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measureBlock { // Put the code you want to measure the time of here. } } }
[ 282633, 313357, 145435, 317467, 241692, 278558, 239650, 229413, 292902, 354343, 329765, 223274, 227370, 278570, 315434, 325674, 229424, 282672, 241716, 180280, 288828, 288833, 288834, 286788, 315465, 311372, 311374, 354385, 196691, 329814, 278615, 354393, 200794, 237663, 309345, 280675, 280677, 43110, 313447, 321637, 329829, 131178, 278634, 278638, 319598, 288879, 299121, 284788, 204916, 233590, 131191, 280694, 237689, 223350, 288889, 292988, 131198, 278655, 292992, 227460, 319629, 311438, 278670, 235662, 325776, 278677, 278685, 299174, 284841, 284842, 278704, 239793, 180408, 227513, 295098, 278714, 280762, 299198, 258239, 280768, 301251, 227524, 309444, 282831, 321745, 280795, 227548, 194782, 356576, 346346, 286958, 125169, 327929, 194820, 321800, 278797, 338197, 282909, 299293, 278816, 227616, 305440, 211235, 211238, 282919, 151847, 332083, 332085, 332089, 278842, 282939, 287041, 139589, 280902, 227654, 182597, 282960, 325968, 366929, 278869, 289110, 305495, 168281, 332123, 334171, 106847, 323935, 332127, 354655, 321894, 313713, 242033, 199029, 291192, 315773, 211326, 291198, 332167, 242058, 311691, 227725, 240016, 108944, 190871, 291224, 285084, 317852, 242078, 141728, 61857, 285090, 315810, 315811, 381347, 289189, 108972, 299441, 283064, 311738, 293310, 291265, 278978, 291267, 283075, 127427, 127428, 311745, 278989, 281037, 317901, 281040, 278993, 289232, 326100, 176601, 369116, 285150, 279008, 160225, 279013, 127465, 311786, 279018, 330218, 281072, 109042, 319987, 279029, 279032, 233978, 279039, 301571, 342536, 287241, 279050, 279057, 283153, 279062, 289304, 279065, 291358, 182817, 293419, 244269, 283182, 283184, 23092, 234036, 279094, 338490, 70209, 115270, 70215, 55881, 377418, 285271, 244327, 111208, 279144, 279146, 281199, 295536, 287346, 301689, 244347, 279164, 291454, 152203, 330379, 311949, 316049, 330387, 330388, 117397, 227990, 111253, 230040, 295576, 111258, 205471, 279206, 295599, 279217, 285361, 342706, 299699, 299700, 289462, 164533, 109241, 248517, 363211, 154316, 242386, 279252, 289502, 299746, 295652, 279269, 285415, 230125, 299759, 279280, 199414, 230134, 221948, 279294, 299776, 295682, 285444, 291592, 322313, 326414, 312079, 322319, 295697, 291604, 207640, 285466, 283419, 291612, 293664, 281377, 326433, 234277, 289576, 279336, 295724, 152365, 312108, 285487, 301871, 318252, 234294, 230199, 293693, 281408, 295744, 295746, 318278, 201549, 281427, 353109, 281433, 230234, 234331, 322395, 295776, 279392, 293730, 349026, 109409, 177001, 201577, 308076, 242541, 400239, 330609, 174963, 109428, 207732, 310131, 209783, 228215, 209785, 287622, 113542, 109447, 416646, 228234, 228233, 316298, 236428, 56208, 308112, 234386, 293781, 209817, 289690, 277403, 127902, 310182, 279464, 240552, 353195, 236461, 293806, 316333, 316343, 289722, 230332, 189374, 353215, 19399, 279498, 234472, 52200, 326635, 203757, 289774, 287731, 277492, 316405, 240630, 295927, 312314, 314362, 328700, 328706, 234500, 277509, 293893, 134150, 330763, 320527, 238610, 308243, 277524, 316437, 140310, 230423, 197657, 281626, 175132, 326685, 189474, 300068, 238639, 322612, 312373, 203830, 238651, 302139, 21569, 214086, 234577, 296019, 339030, 353367, 234587, 281697, 230499, 281700, 314467, 322663, 281706, 228458, 207979, 318572, 316526, 15471, 312434, 353397, 300150, 300151, 279672, 337017, 285820, 300158, 187521, 150657, 285828, 279685, 285830, 302213, 228491, 228493, 177296, 162961, 326804, 185493, 283802, 119962, 285851, 296092, 300188, 302240, 330913, 234663, 300202, 281771, 306346, 279728, 228540, 230588, 228542, 283840, 279747, 353479, 353481, 279760, 189652, 189653, 148696, 279774, 333022, 298208, 304351, 304356, 290022, 234733, 279792, 353523, 298228, 302325, 228600, 216315, 208124, 292091, 228609, 320770, 234755, 292107, 251153, 177428, 245019, 126237, 115998, 333090, 279854, 298291, 171317, 318775, 286013, 333117, 279875, 300359, 304456, 312648, 294218, 296270, 296273, 331090, 120148, 314709, 314710, 357719, 134491, 316765, 222559, 294243, 163175, 333160, 284014, 306542, 296303, 327025, 249204, 249205, 181625, 111993, 290169, 306560, 224640, 148867, 179587, 294275, 298374, 368011, 304524, 296335, 112017, 234898, 112018, 224661, 318875, 310692, 279974, 282024, 241066, 316842, 314798, 286129, 279989, 228795, 292283, 280004, 306631, 296392, 300487, 284107, 302540, 280013, 310732, 64975, 312782, 310736, 327121, 222675, 212442, 286172, 280032, 144867, 103909, 187878, 316902, 245223, 280041, 191981, 282096, 321009, 329200, 191990, 280055, 300536, 290301, 286205, 300542, 294400, 230913, 292356, 323087, 323089, 282136, 282141, 230943, 187938, 306723, 245292, 286254, 230959, 288309, 290358, 194110, 288318, 280130, 196164, 56902, 288327, 282183, 292423, 243274, 333388, 224847, 286288, 228943, 118353, 280147, 290390, 128599, 235095, 44635, 333408, 157281, 286306, 282213, 310889, 312940, 204397, 224883, 333430, 175741, 337535, 294529, 312965, 282246, 229001, 290443, 188048, 239250, 282259, 302739, 229020, 298654, 282271, 282273, 257699, 229029, 40613, 290471, 40614, 40615, 298661, 61101, 321199, 286391, 337591, 280251, 327358, 282303, 323264, 321219, 333509, 282312, 280267, 9936, 9937, 302802, 286423, 298720, 229088, 321249, 153319, 12010, 280300, 282348, 282355, 282358, 313081, 229113, 325371, 194303, 278272, 194304, 67332, 216839, 280327, 284431, 243472, 321295, 161554, 278291, 323346, 278293, 282391, 116505, 284442, 282400, 313120, 241441, 315171, 282409, 284459, 294700, 282417, 200498, 296755, 280372, 319292, 282434, 315202, 307011, 325445, 280390, 282438, 280392, 153415, 325457, 413521, 317269, 18262, 280410, 284507, 300894, 245599, 237408, 284512, 302946, 296806, 276327, 282474, 325484, 280430, 296814, 282480, 292720, 313203, 325492, 241528, 194429, 325503, 315264, 188292, 241540, 327557, 67463, 282504, 243591, 315273, 315274, 243597, 110480, 282518, 329622, 294807, 294809, 298909, 294814, 311199, 292771, 300963, 313254, 294823, 298920, 284587, 292782, 317360, 282549, 290746, 294843, 214977, 280514, 163781, 280519, 214984, 284619, 344013, 231375, 301008, 280541, 294886, 317415, 296941, 278512, 311281, 223218, 311282, 282612, 333817, 292858, 290811 ]
0619525a3212e9f7c744d397343e822e5d6fff65
0bd262ba297ee7c64ccaeda86f0bf4f54e0f878d
/Modules/RoxieMobile.NetworkingApi/Sources/Rest/Sources/API/Request/VoidBody.swift
03823effa4760777724c25eb2c56a190a897bf1e
[ "BSD-2-Clause" ]
permissive
NSemakov/networking-api.ios
1c9d9b2735c24cf7601cd4a0fcd1f8bd9c82fda6
b6aa477b1dcaee6b77f86da3c8198ed9e74744ab
refs/heads/develop
2020-06-11T14:35:31.790682
2018-03-26T11:29:59
2018-03-26T11:29:59
75,645,793
0
1
null
2016-12-05T16:43:01
2016-12-05T16:43:01
null
UTF-8
Swift
false
false
734
swift
// ---------------------------------------------------------------------------- // // VoidBody.swift // // @author Denis Kolyasev <[email protected]> // @copyright Copyright (c) 2016, eKassir Ltd. All rights reserved. // @link http://www.ekassir.com/ // // ---------------------------------------------------------------------------- import Foundation import NetworkingApiHttp // ---------------------------------------------------------------------------- open class VoidBody: HttpBody { // MARK: - Properties open var mediaType: MediaType? { return nil } open var body: Data? { return nil } } // ----------------------------------------------------------------------------
[ -1 ]
ad0c575ec545d90df13ec681e7de795247c3a7d0
8fd744eb50546080c133cf60bfcfec46f0e57811
/ManageTheKeyboard/ViewController.swift
735446fe87401d2d375adf474eb9f36383a72aa4
[]
no_license
wjshea/UDEMY---ManageTheKeyboard
a9038bd8d1010f1daa75fa41a5047ed4c2dee87c
00b6fa786cfa769d98db2057bfb291eb2ab0f383
refs/heads/master
2016-09-03T06:22:11.502181
2014-12-30T02:14:24
2014-12-30T02:14:24
29,020,281
0
0
null
null
null
null
UTF-8
Swift
false
false
512
swift
// // ViewController.swift // ManageTheKeyboard // // Created by Bill Shea on 12/29/14. // Copyright (c) 2014 Bill Shea. 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. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ 293888, 279046, 275466, 277527, 317473, 284197, 286249, 237616, 360501, 238653, 159812, 284240, 284242, 292435, 307288, 277602, 276580, 281701, 284261, 281703, 306791, 286314, 277612, 276597, 276087, 284289, 284298, 303242, 311437, 226447, 282262, 299165, 285855, 228000, 225955, 282275, 280231, 284328, 287399, 284336, 286390, 283839, 277696, 285377, 280770, 228548, 280772, 276167, 280775, 284361, 284373, 226009, 280797, 284391, 280808, 199402, 312049, 226038, 286456, 204027, 286462, 280832, 276736, 278786, 358147, 226055, 329499, 228127, 276256, 278304, 277796, 312107, 278845, 289600, 300358, 238920, 279380, 276309, 307029, 279386, 188253, 323933, 303977, 306540, 293742, 278897, 310649, 207738, 275842, 313222, 324491, 234380, 226705, 306578, 285087, 284586, 276396, 305582, 277935, 324528, 230323, 234423, 306633, 286158, 301012, 163289, 276959, 286175, 276965, 294889, 286189, 277487, 310773, 286204, 287231 ]
468c87b98baadca19fa6631abf95e889bcdd5be7
d26de17b2d42c904558a457bf06e80dab9a81ca0
/playgrounds/Week06.playground/Pages/Composition.xcplaygroundpage/Contents.swift
97d3bbc5f3a64fe29bab6d96d5be8d0db7ce9368
[ "MIT" ]
permissive
aijaz/icw1502
ab6800b50f78a8991372eafdac683b3abeb44130
2b84234fe97a848bb8b2e4db344c55b33bd66ad9
refs/heads/master
2021-01-02T08:21:57.727992
2016-01-23T17:04:41
2016-01-23T17:04:41
42,757,138
1
5
null
null
null
null
UTF-8
Swift
false
false
299
swift
//: [Previous](@previous) import Foundation var str = "Hello, playground" var point = Vertex(x: 3, y: 4) var rect = Rectangle(topLeftCorner: point, width: 6, height: 8) rect var rect2 = rect.moveByX(100) rect2 var rect3 = rect2 rect3 rect2 rect2.doubleArea() rect2 rect3 //: [Next](@next)
[ -1 ]
b8dc25ce9c76b924ac079a9339ca104ece82e3e6
036db414fa9c3b26650095b718a58618c02154a9
/MYJSONTests/MYJSONTests.swift
d171f9955829350e1af6954e185d8e5942bf81cd
[ "MIT" ]
permissive
damonthecricket/my-json
1c662c4fbd0c889d7d8d847343201538f2ca7bea
da8e1399560fb9725c5892ab18cf5d8e4a465f45
refs/heads/master
2021-01-20T09:46:37.418503
2018-03-20T14:28:44
2018-03-20T14:28:44
90,287,713
0
1
null
2017-05-19T13:50:22
2017-05-04T16:54:59
Swift
UTF-8
Swift
false
false
7,931
swift
// // MYJSONTests.swift // MYJSONTests // // Created by Optimus Prime on 04.05.17. // Copyright © 2017 Trenlab. All rights reserved. // import XCTest @testable import MYJSON class MYJSONTests: XCTestCase { fileprivate let testJSON = TestJSON fileprivate let testJSONData: Data = try! JSONSerialization.data(withJSONObject: TestJSON, options: [JSONSerialization.WritingOptions.prettyPrinted]) fileprivate var mutableContainersJSON: MYJSON? fileprivate var mutableLeavesJSON: MYJSON? fileprivate var allowFragmentsJSON: MYJSON? fileprivate var rawInstalledJSON: MYJSON! // MARK: - Setup / Teardown override func setUp() { super.setUp() mutableContainersJSON = try? JSONSerialization.mutableContainersJSON(with: testJSONData) mutableLeavesJSON = try? JSONSerialization.mutableLeavesJSON(with: testJSONData) allowFragmentsJSON = try? JSONSerialization.allowFragmentsJSON(with: testJSONData) rawInstalledJSON = MYJSON(rawValue: testJSON) } override func tearDown() { mutableContainersJSON = nil mutableLeavesJSON = nil allowFragmentsJSON = nil rawInstalledJSON = nil super.tearDown() } // MARK: - Instance func testInstance() { XCTAssertNotNil(mutableContainersJSON) XCTAssertNotNil(mutableLeavesJSON) XCTAssertNotNil(allowFragmentsJSON) } // MARK: - Types func testValue() { switch testJSON { case is MYJSONType: XCTAssertTrue(mutableContainersJSON!.isValue) XCTAssertTrue(mutableLeavesJSON!.isValue) XCTAssertTrue(allowFragmentsJSON!.isValue) XCTAssertTrue(rawInstalledJSON.isValue) XCTAssertFalse(mutableContainersJSON!.isArray) XCTAssertFalse(mutableLeavesJSON!.isArray) XCTAssertFalse(allowFragmentsJSON!.isArray) XCTAssertFalse(rawInstalledJSON.isArray) XCTAssertNotNil(mutableContainersJSON!.dictionary) XCTAssertNotNil(mutableLeavesJSON!.dictionary) XCTAssertNotNil(allowFragmentsJSON!.dictionary) XCTAssertNotNil(rawInstalledJSON.dictionary) XCTAssertNil(mutableContainersJSON!.array) XCTAssertNil(mutableLeavesJSON!.array) XCTAssertNil(allowFragmentsJSON!.array) XCTAssertNil(rawInstalledJSON.array) let convertedTestJSON: MYJSONType = testJSON as! MYJSONType XCTAssertTrue((mutableContainersJSON!.rawValue as! MYJSONType) == convertedTestJSON) XCTAssertTrue((mutableLeavesJSON!.rawValue as! MYJSONType) == convertedTestJSON) XCTAssertTrue((allowFragmentsJSON!.rawValue as! MYJSONType) == convertedTestJSON) XCTAssertTrue((rawInstalledJSON.rawValue as! MYJSONType) == convertedTestJSON) XCTAssertTrue(mutableContainersJSON!.dictionary! == convertedTestJSON) XCTAssertTrue(mutableLeavesJSON!.dictionary! == convertedTestJSON) XCTAssertTrue(allowFragmentsJSON!.dictionary! == convertedTestJSON) XCTAssertTrue(rawInstalledJSON!.dictionary! == convertedTestJSON) XCTAssertTrue(mutableContainersJSON!.dictionary! == (mutableContainersJSON!.rawValue as! MYJSONType)) XCTAssertTrue(mutableLeavesJSON!.dictionary! == (mutableLeavesJSON!.rawValue as! MYJSONType)) XCTAssertTrue(allowFragmentsJSON!.dictionary! == (allowFragmentsJSON!.rawValue as! MYJSONType)) XCTAssertTrue(rawInstalledJSON!.dictionary! == (rawInstalledJSON.rawValue as! MYJSONType)) default: break } } func testArray() { switch testJSON { case is MYJSONArrayType: XCTAssertTrue(mutableContainersJSON!.isArray) XCTAssertTrue(mutableLeavesJSON!.isArray) XCTAssertTrue(allowFragmentsJSON!.isArray) XCTAssertTrue(rawInstalledJSON.isArray) XCTAssertFalse(mutableContainersJSON!.isValue) XCTAssertFalse(mutableLeavesJSON!.isValue) XCTAssertFalse(allowFragmentsJSON!.isValue) XCTAssertFalse(rawInstalledJSON.isValue) XCTAssertNotNil(mutableContainersJSON!.array) XCTAssertNotNil(mutableLeavesJSON!.array) XCTAssertNotNil(allowFragmentsJSON!.array) XCTAssertNotNil(rawInstalledJSON.array) XCTAssertNil(mutableContainersJSON!.dictionary) XCTAssertNil(mutableLeavesJSON!.dictionary) XCTAssertNil(allowFragmentsJSON!.dictionary) XCTAssertNil(rawInstalledJSON.dictionary) let convertedTestJSON: MYJSONArrayType = testJSON as! MYJSONArrayType XCTAssertTrue((mutableContainersJSON!.rawValue as! MYJSONArrayType) == convertedTestJSON) XCTAssertTrue((mutableLeavesJSON!.rawValue as! MYJSONArrayType) == convertedTestJSON) XCTAssertTrue((allowFragmentsJSON!.rawValue as! MYJSONArrayType) == convertedTestJSON) XCTAssertTrue((rawInstalledJSON.rawValue as! MYJSONArrayType) == convertedTestJSON) XCTAssertTrue(mutableContainersJSON!.array! == convertedTestJSON) XCTAssertTrue(mutableLeavesJSON!.array! == convertedTestJSON) XCTAssertTrue(allowFragmentsJSON!.array! == convertedTestJSON) XCTAssertTrue(rawInstalledJSON!.array! == convertedTestJSON) XCTAssertTrue(mutableContainersJSON!.array! == (mutableContainersJSON!.rawValue as! MYJSONArrayType)) XCTAssertTrue(mutableLeavesJSON!.array! == (mutableLeavesJSON!.rawValue as! MYJSONArrayType)) XCTAssertTrue(allowFragmentsJSON!.array! == (allowFragmentsJSON!.rawValue as! MYJSONArrayType)) XCTAssertTrue(rawInstalledJSON!.array! == (rawInstalledJSON.rawValue as! MYJSONArrayType)) default: break } } func testEmpty() { let convertedTestJSON: MYJSONType? = testJSON as? MYJSONType if convertedTestJSON != nil && convertedTestJSON!.isEmpty { XCTAssertTrue(mutableContainersJSON!.isEmpty) XCTAssertTrue(mutableLeavesJSON!.isEmpty) XCTAssertTrue(allowFragmentsJSON!.isEmpty) XCTAssertTrue(rawInstalledJSON.isEmpty) } else { XCTAssertFalse(mutableContainersJSON!.isEmpty) XCTAssertFalse(mutableLeavesJSON!.isEmpty) XCTAssertFalse(allowFragmentsJSON!.isEmpty) XCTAssertFalse(rawInstalledJSON.isEmpty) } } // MARK: - Data func testData() { XCTAssertNotEqual(try? JSONSerialization.prettyPrintedData(withJSON: mutableContainersJSON!), testJSONData) XCTAssertNotEqual(try? JSONSerialization.prettyPrintedData(withJSON: mutableLeavesJSON!), testJSONData) XCTAssertNotEqual(try? JSONSerialization.prettyPrintedData(withJSON: allowFragmentsJSON!), testJSONData) XCTAssertEqual(try! JSONSerialization.prettyPrintedData(withJSON: rawInstalledJSON), testJSONData) } func testEquality() { XCTAssertEqual(mutableContainersJSON, mutableLeavesJSON) XCTAssertEqual(mutableLeavesJSON, allowFragmentsJSON) XCTAssertEqual(allowFragmentsJSON, rawInstalledJSON) XCTAssertEqual(rawInstalledJSON, mutableLeavesJSON) let json = MYJSON(rawValue: [" ":" "]) XCTAssertNotEqual(mutableContainersJSON, json) XCTAssertNotEqual(mutableLeavesJSON, json) XCTAssertNotEqual(allowFragmentsJSON, json) XCTAssertNotEqual(rawInstalledJSON, json) XCTAssertEqual(json, MYJSON(rawValue: [" ":" "])) } }
[ -1 ]
9f7d1daa28012422484bfd2b6534970c1a233226
553aa1584ede9405407cab966c600e5712d1da2a
/Slots_swiftUi/View/SlotView.swift
4dd718cd30ebeb0c2567b6252abbe92a2c99273a
[]
no_license
mrSergeyyu/slotsMachine_game_SwiftUi
f23ebec49f9293d6db1d41e1a46273127fc3d8d2
199a574525637865948cc5e3a125f6cb3cda2127
refs/heads/main
2023-03-22T22:02:33.600771
2021-03-13T16:11:05
2021-03-13T16:11:05
328,789,231
0
0
null
null
null
null
UTF-8
Swift
false
false
473
swift
// // SlotView.swift // Slots_swiftUi // // Created by Sergey on 26.12.2020. // import SwiftUI struct SlotView: View { var body: some View { Image("gfx-reel") .resizable() .scaledToFill() .modifier(ImageModifier()) .shadow(color: Color("ColorTransparentBlack"), radius: 4, x: 0.0, y: 6) } } struct SlotView_Previews: PreviewProvider { static var previews: some View { SlotView() } }
[ -1 ]
5655bcb886c2f15c83e440aab38463f4cd41b531
73a2aebe501dc8ea000f32910addcebc80d31436
/ExtendArray.swift
3b7d474b448c6a91840d16bbcef4f06416afac66
[]
no_license
leduy0909/Day08
e0020d9e56643c8cf8064cb3f2e9287ead894973
1cfecbb107db81ced269389a53a733955997d7b8
refs/heads/master
2020-04-24T08:11:29.287159
2014-09-16T06:20:26
2014-09-16T06:20:26
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,506
swift
// // ExtendArray.swift // DemoClass // // Created by techmaster on 9/12/14. // Copyright (c) 2014 Techmaster. All rights reserved. // import Foundation extension Array { //reverse() -> [T] //Đảo mảng trả về một mảng mới func daoMang() -> [T] { let n = self.count //http://www.programmingsimplified.com/c-program-reverse-array //var tempArr: [T] = [T](count: n, repeatedValue: self[0]) //Gán tempArr bằng self iOS sẽ copy luôn mảng self ra một mảng mới tempArr var tempArr = self for var c = n - 1, d = 0; c >= d; c--, d++ { tempArr[d] = self[c] tempArr[c] = self[d] } return tempArr } //Đảo mảng trên chính mảng đó mutating func daoMang2() { let n = self.count //http://www.programmingsimplified.com/c-program-reverse-array for var c = n - 1, d = 0; c >= d; c--, d++ { let temp = self[c] self[c] = self[d] self[d] = temp } } func giatritrungbinh() -> Double { let n = self.count var tong = 0 for var i = 0 ; i < n ; ++i { tong += (self[i] as Int) } return (Double(tong) / Double(n)) } mutating func randomPlayer() -> [T] { while(self.count > 11) { let index = Int(arc4random_uniform(UInt32(self.count))) self.removeAtIndex(index) } return self } }
[ -1 ]
20da28e308449e946bc86be4d342bc449d0914fb
413cffa0f8917bc7c518b934654be95c1bafbcd1
/YoungSt/Core/Sources/API/Protocols/Languages.swift
2eab34b8d34f7e29625fcc6a34e9723e604acd61
[]
no_license
Tishman/testyoungst
8f09e08d24cae0f5072d1eb5887c7c743abddbcb
176b5c53d823a09acc5dbc04bc946092c8353835
refs/heads/master
2023-08-28T17:35:42.859795
2021-07-29T13:41:41
2021-07-29T13:41:41
419,678,101
0
0
null
null
null
null
UTF-8
Swift
false
false
178
swift
// // Languages.swift // YoungSt // // Created by tichenko.r on 22.12.2020. // import Foundation public enum Languages: String { case english = "en" case russian = "ru" }
[ -1 ]
087289753a6905e72841a26e38176477d4a4ba39
97a7c22063f731b8ec2dacead8cf20bf6d5f913d
/MicroKernelDemo/Demo/ShoppingApplication/ShoppingShareService.swift
4f23639d8f4ea030507a9319e62244fa16e00cb6
[]
no_license
mrriddler/MicroKernelDemo
0fad31ed58c089f57cee317e19b2e32ae7cd082e
3551898ebe77c84d053f7a1dbde5e986472f3acb
refs/heads/master
2020-04-24T17:46:11.354748
2019-03-16T01:19:19
2019-03-16T01:19:19
172,158,241
11
1
null
null
null
null
UTF-8
Swift
false
false
724
swift
// __ ____ __ __ __ // / |/ (_)_____________ / //_/__ _________ ___ / / // / /|_/ / / ___/ ___/ __ \/ ,< / _ \/ ___/ __ \/ _ \/ / // / / / / / /__/ / / /_/ / /| / __/ / / / / / __/ / // /_/ /_/_/\___/_/ \____/_/ |_\___/_/ /_/ /_/\___/_/ // import Foundation final class ShoppingShareServiceImp: ShareService { static func isSingleton() -> Bool { return false } static func singleton() -> ShoppingShareServiceImp { return ShoppingShareServiceImp() } deinit { print("ShoppingShareService deinit!") } required init() {} func share() -> String { return "Alipay" } }
[ -1 ]
e5eddd6da15866e046d8a466a0167d77e33f4dec
fff9811b6786d834c6ed85699663508ac5f39c88
/Session2/Part2-Start/GardenApp/Navigation/ContentView.swift
908de75e553068c915d0077ec114be883494dcb8
[]
no_license
kinwong/BuildingAGreatMacAppWithSwiftUI
2b09118ea6aba6dd925188cb9daf40615014c991
5ce5712c9691fe87c6ceec443b669f2eb8b48ea7
refs/heads/main
2023-08-25T10:03:34.629010
2021-11-07T01:39:16
2021-11-07T01:39:16
425,259,768
0
0
null
null
null
null
UTF-8
Swift
false
false
783
swift
/* See LICENSE folder for this sample’s licensing information. Abstract: The main content view for this sample. */ import SwiftUI struct ContentView: View { @EnvironmentObject var store: Store @SceneStorage("selection") private var selectedGardenID: Garden.ID? @AppStorage("defaultGarden") private var defaultGardenID: Garden.ID? var body: some View { NavigationView { Sidebar(selection: selection) GardenDetail(garden: selectedGarden) } } private var selection: Binding<Garden.ID?> { Binding( get: { selectedGardenID ?? defaultGardenID }, set: { selectedGardenID = $0 }) } private var selectedGarden: Binding<Garden> { $store[selection.wrappedValue] } }
[ -1 ]
6642a8432bd2061f2e2ca49ac84e80ca8441ee2d
f7418b5e5bea79aed536c563c6d19763f8bdb026
/Example/GMD Swift/ViewController.swift
44beba2fed3fd5fcbc96b5eaf7f597bcb343987e
[ "MIT" ]
permissive
tgrf/Google-Material-Design-Icons-Swift
c55cb421f8ec130b6869eb17e90a7bbd84c64c4a
33012f6b227923b638a964cd7fee8c936c031da6
refs/heads/master
2021-01-09T05:24:35.012925
2017-02-02T20:31:12
2017-02-02T20:31:12
80,762,986
0
1
null
2017-02-02T19:56:19
2017-02-02T19:56:19
null
UTF-8
Swift
false
false
17,137
swift
// // ViewController.swift // GMD Swift // // Created by Patrik Vaberer on 8/29/15. // Copyright © 2015 Patrik Vaberer. All rights reserved. // // // ViewController.swift // Google Material Design Icons Swift // // Created by Patrik Vaberer on 7/13/15. // Copyright (c) 2015 Patrik Vaberer. All rights reserved. // import UIKit class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UISearchResultsUpdating, UISearchControllerDelegate { @IBOutlet weak var tableView: UITableView! @IBOutlet weak var bGithub: UIBarButtonItem! @IBOutlet weak var bTwitter: UIBarButtonItem! var filteredData = [String]() var resultSearchController = UISearchController() override func viewDidLoad() { super.viewDidLoad() self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.delegate = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() controller.searchBar.searchBarStyle = .minimal controller.searchBar.barTintColor = UIColor.blue controller.searchBar.placeholder = "Type Icon Name" self.tableView.tableHeaderView = controller.searchBar return controller })() bGithub.GMDIcon = GMDType.Public bTwitter.GMDIcon = GMDType.Person } //MARK: UITableView func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let c = tableView.dequeueReusableCell(withIdentifier: "IconCell") as! IconCell c.lFont.text = resultSearchController.isActive ? filteredData[indexPath.row] : helper[indexPath.row] let icon = resultSearchController.isActive ? GMDType(rawValue: helper.index(of: filteredData[indexPath.row])!) : GMDType(rawValue: indexPath.row) c.lSmall.GMDIcon = icon c.lMedium.GMDIcon = icon c.lBig.GMDIcon = icon return c } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return resultSearchController.isActive ? filteredData.count : GMDType.count } //MARK: Search func updateSearchResults(for searchController: UISearchController) { filteredData = [] filterContentForSearchText(searchController.searchBar.text!.lowercased()) self.tableView.reloadData() } @IBAction func bGithubPressed(_ sender: UIBarButtonItem) { if let requestUrl = URL(string: "https://github.com/Vaberer/Google-Material-Design-Icons-Swift") { UIApplication.shared.openURL(requestUrl) } } @IBAction func bTwitterPressed(_ sender: UIBarButtonItem) { if let twitterURL = URL(string: "twitter://user?id=2271666416") { if UIApplication.shared.canOpenURL(twitterURL) { UIApplication.shared.openURL(twitterURL) } } } //MARK: Helpers func filterContentForSearchText(_ searchText: String) { for f in helper { if f.lowercased().range(of: searchText.lowercased()) != nil { filteredData.append(f) } } } let helper = ["GMD3DRotation", "GMDAccessibility", "GMDAccountBalance", "GMDAccountBalanceWallet", "GMDAccountBox", "GMDAccountCircle", "GMDAddShoppingCart", "GMDAlarm", "GMDAlarmAdd", "GMDAlarmOff", "GMDAlarmOn", "GMDAndroid", "GMDAnnouncement", "GMDAspectRatio", "GMDAssessment", "GMDAssignment", "GMDAssignmentInd", "GMDAssignmentLate", "GMDAssignmentReturn", "GMDAssignmentReturned", "GMDAssignmentTurnedIn", "GMDAutorenew", "GMDBackup", "GMDBook", "GMDBookmark", "GMDBookmarkBorder", "GMDBugReport", "GMDBuild", "GMDCached", "GMDCameraEnhance", "GMDCardGiftcard", "GMDCardMembership", "GMDCardTravel", "GMDChangeHistory", "GMDCheckCircle", "GMDChromeReaderMode", "GMDClass", "GMDCode", "GMDCreditCard", "GMDDashboard", "GMDDelete", "GMDDescription", "GMDDns", "GMDDone", "GMDDoneAll", "GMDEject", "GMDEvent", "GMDEventSeat", "GMDExitToApp", "GMDExplore", "GMDExtension", "GMDFace", "GMDFavorite", "GMDFavoriteBorder", "GMDFeedback", "GMDFindInPage", "GMDFindReplace", "GMDFlightLand", "GMDFlightTakeoff", "GMDFlipToBack", "GMDFlipToFront", "GMDGetApp", "GMDGif", "GMDGrade", "GMDGroupWork", "GMDHelp", "GMDHelpOutline", "GMDHighlightOff", "GMDHistory", "GMDHome", "GMDHourglassEmpty", "GMDHourglassFull", "GMDHttp", "GMDHttps", "GMDInfo", "GMDInfoOutline", "GMDInput", "GMDInvertColors", "GMDLabel", "GMDLabelOutline", "GMDLanguage", "GMDLaunch", "GMDList", "GMDLock", "GMDLockOpen", "GMDLockOutline", "GMDLoyalty", "GMDMarkunreadMailbox", "GMDNoteAdd", "GMDOfflinePin", "GMDOpenInBrowser", "GMDOpenInNew", "GMDOpenWith", "GMDPageview", "GMDPayment", "GMDPermCameraMic", "GMDPermContactCalendar", "GMDPermDataSetting", "GMDPermDeviceInformation", "GMDPermIdentity", "GMDPermMedia", "GMDPermPhoneMsg", "GMDPermScanWifi", "GMDPictureInPicture", "GMDPlayForWork", "GMDPolymer", "GMDPowerSettingsNew", "GMDPrint", "GMDQueryBuilder", "GMDQuestionAnswer", "GMDReceipt", "GMDRedeem", "GMDReorder", "GMDReportProblem", "GMDRestore", "GMDRoom", "GMDSchedule", "GMDSearch", "GMDSettings", "GMDSettingsApplications", "GMDSettingsBackupRestore", "GMDSettingsBluetooth", "GMDSettingsBrightness", "GMDSettingsCell", "GMDSettingsEthernet", "GMDSettingsInputAntenna", "GMDSettingsInputComponent", "GMDSettingsInputComposite", "GMDSettingsInputHdmi", "GMDSettingsInputSvideo", "GMDSettingsOverscan", "GMDSettingsPhone", "GMDSettingsPower", "GMDSettingsRemote", "GMDSettingsVoice", "GMDShop", "GMDShopTwo", "GMDShoppingBasket", "GMDShoppingCart", "GMDSpeakerNotes", "GMDSpellcheck", "GMDStarRate", "GMDStars", "GMDStore", "GMDSubject", "GMDSupervisorAccount", "GMDSwapHoriz", "GMDSwapVert", "GMDSwapVerticalCircle", "GMDSystemUpdateAlt", "GMDTab", "GMDTabUnselected", "GMDTheaters", "GMDThumbDown", "GMDThumbUp", "GMDThumbsUpDown", "GMDToc", "GMDToday", "GMDToll", "GMDTrackChanges", "GMDTranslate", "GMDTrendingDown", "GMDTrendingFlat", "GMDTrendingUp", "GMDTurnedIn", "GMDTurnedInNot", "GMDVerifiedUser", "GMDViewAgenda", "GMDViewArray", "GMDViewCarousel", "GMDViewColumn", "GMDViewDay", "GMDViewHeadline", "GMDViewList", "GMDViewModule", "GMDViewQuilt", "GMDViewStream", "GMDViewWeek", "GMDVisibility", "GMDVisibilityOff", "GMDWork", "GMDYoutubeSearchedFor", "GMDZoomIn", "GMDZoomOut", "GMDAddAlert", "GMDError", "GMDErrorOutline", "GMDWarning", "GMDAirplay", "GMDAlbum", "GMDAvTimer", "GMDClosedCaption", "GMDEqualizer", "GMDExplicit", "GMDFastForward", "GMDFastRewind", "GMDForward10", "GMDForward30", "GMDForward5", "GMDGames", "GMDHd", "GMDHearing", "GMDHighQuality", "GMDLibraryAdd", "GMDLibraryBooks", "GMDLibraryMusic", "GMDLoop", "GMDMic", "GMDMicNone", "GMDMicOff", "GMDMovie", "GMDNewReleases", "GMDNotInterested", "GMDPause", "GMDPauseCircleFilled", "GMDPauseCircleOutline", "GMDPlayArrow", "GMDPlayCircleFilled", "GMDPlayCircleOutline", "GMDPlaylistAdd", "GMDQueue", "GMDQueueMusic", "GMDRadio", "GMDRecentActors", "GMDRepeat", "GMDRepeatOne", "GMDReplay", "GMDReplay10", "GMDReplay30", "GMDReplay5", "GMDShuffle", "GMDSkipNext", "GMDSkipPrevious", "GMDSnooze", "GMDSortByAlpha", "GMDStop", "GMDSubtitles", "GMDSurroundSound", "GMDVideoLibrary", "GMDVideocam", "GMDVideocamOff", "GMDVolumeDown", "GMDVolumeMute", "GMDVolumeOff", "GMDVolumeUp", "GMDWeb", "GMDBusiness", "GMDCall", "GMDCallEnd", "GMDCallMade", "GMDCallMerge", "GMDCallMissed", "GMDCallReceived", "GMDCallSplit", "GMDChat", "GMDChatBubble", "GMDChatBubbleOutline", "GMDClearAll", "GMDComment", "GMDContactPhone", "GMDContacts", "GMDDialerSip", "GMDDialpad", "GMDEmail", "GMDForum", "GMDImportExport", "GMDInvertColorsOff", "GMDLiveHelp", "GMDLocationOff", "GMDLocationOn", "GMDMessage", "GMDNoSim", "GMDPhone", "GMDPhonelinkErase", "GMDPhonelinkLock", "GMDPhonelinkRing", "GMDPhonelinkSetup", "GMDPortableWifiOff", "GMDPresentToAll", "GMDRingVolume", "GMDSpeakerPhone", "GMDStayCurrentLandscape", "GMDStayCurrentPortrait", "GMDStayPrimaryLandscape", "GMDStayPrimaryPortrait", "GMDSwapCalls", "GMDTextsms", "GMDVoicemail", "GMDVpnKey", "GMDAdd", "GMDAddBox", "GMDAddCircle", "GMDAddCircleOutline", "GMDArchive", "GMDBackspace", "GMDBlock", "GMDClear", "GMDContentCopy", "GMDContentCut", "GMDContentPaste", "GMDCreate", "GMDDrafts", "GMDFilterList", "GMDFlag", "GMDFontDownload", "GMDForward", "GMDGesture", "GMDInbox", "GMDLink", "GMDMail", "GMDMarkunread", "GMDRedo", "GMDRemove", "GMDRemoveCircle", "GMDRemoveCircleOutline", "GMDReply", "GMDReplyAll", "GMDReport", "GMDSave", "GMDSelectAll", "GMDSend", "GMDSort", "GMDTextFormat", "GMDUndo", "GMDAccessAlarm", "GMDAccessAlarms", "GMDAccessTime", "GMDAddAlarm", "GMDAirplanemodeActive", "GMDAirplanemodeInactive", "GMDBatteryAlert", "GMDBatteryChargingFull", "GMDBatteryFull", "GMDBatteryStd", "GMDBatteryUnknown", "GMDBluetooth", "GMDBluetoothConnected", "GMDBluetoothDisabled", "GMDBluetoothSearching", "GMDBrightnessAuto", "GMDBrightnessHigh", "GMDBrightnessLow", "GMDBrightnessMedium", "GMDDataUsage", "GMDDeveloperMode", "GMDDevices", "GMDDvr", "GMDGpsFixed", "GMDGpsNotFixed", "GMDGpsOff", "GMDGraphicEq", "GMDLocationDisabled", "GMDLocationSearching", "GMDNetworkCell", "GMDNetworkWifi", "GMDNfc", "GMDScreenLockLandscape", "GMDScreenLockPortrait", "GMDScreenLockRotation", "GMDScreenRotation", "GMDSdStorage", "GMDSettingsSystemDaydream", "GMDSignalCellular4Bar", "GMDSignalCellularConnectedNoInternet4Bar", "GMDSignalCellularNoSim", "GMDSignalCellularNull", "GMDSignalCellularOff", "GMDSignalWifi4Bar", "GMDSignalWifi4BarLock", "GMDSignalWifiOff", "GMDStorage", "GMDUsb", "GMDWallpaper", "GMDWidgets", "GMDWifiLock", "GMDWifiTethering", "GMDAttachFile", "GMDAttachMoney", "GMDBorderAll", "GMDBorderBottom", "GMDBorderClear", "GMDBorderColor", "GMDBorderHorizontal", "GMDBorderInner", "GMDBorderLeft", "GMDBorderOuter", "GMDBorderRight", "GMDBorderStyle", "GMDBorderTop", "GMDBorderVertical", "GMDFormatAlignCenter", "GMDFormatAlignJustify", "GMDFormatAlignLeft", "GMDFormatAlignRight", "GMDFormatBold", "GMDFormatClear", "GMDFormatColorFill", "GMDFormatColorReset", "GMDFormatColorText", "GMDFormatIndentDecrease", "GMDFormatIndentIncrease", "GMDFormatItalic", "GMDFormatLineSpacing", "GMDFormatListBulleted", "GMDFormatListNumbered", "GMDFormatPaint", "GMDFormatQuote", "GMDFormatSize", "GMDFormatStrikethrough", "GMDFormatTextdirectionLToR", "GMDFormatTextdirectionRToL", "GMDFormatUnderlined", "GMDFunctions", "GMDInsertChart", "GMDInsertComment", "GMDInsertDriveFile", "GMDInsertEmoticon", "GMDInsertInvitation", "GMDInsertLink", "GMDInsertPhoto", "GMDMergeType", "GMDModeComment", "GMDModeEdit", "GMDMoneyOff", "GMDPublish", "GMDSpaceBar", "GMDStrikethroughS", "GMDVerticalAlignBottom", "GMDVerticalAlignCenter", "GMDVerticalAlignTop", "GMDWrapText", "GMDAttachment", "GMDCloud", "GMDCloudCircle", "GMDCloudDone", "GMDCloudDownload", "GMDCloudOff", "GMDCloudQueue", "GMDCloudUpload", "GMDFileDownload", "GMDFileUpload", "GMDFolder", "GMDFolderOpen", "GMDFolderShared", "GMDCast", "GMDCastConnected", "GMDComputer", "GMDDesktopMac", "GMDDesktopWindows", "GMDDeveloperBoard", "GMDDeviceHub", "GMDDock", "GMDGamepad", "GMDHeadset", "GMDHeadsetMic", "GMDKeyboard", "GMDKeyboardArrowDown", "GMDKeyboardArrowLeft", "GMDKeyboardArrowRight", "GMDKeyboardArrowUp", "GMDKeyboardBackspace", "GMDKeyboardCapslock", "GMDKeyboardHide", "GMDKeyboardReturn", "GMDKeyboardTab", "GMDKeyboardVoice", "GMDLaptop", "GMDLaptopChromebook", "GMDLaptopMac", "GMDLaptopWindows", "GMDMemory", "GMDMouse", "GMDPhoneAndroid", "GMDPhoneIphone", "GMDPhonelink", "GMDPhonelinkOff", "GMDPowerInput", "GMDRouter", "GMDScanner", "GMDSecurity", "GMDSimCard", "GMDSmartphone", "GMDSpeaker", "GMDSpeakerGroup", "GMDTablet", "GMDTabletAndroid", "GMDTabletMac", "GMDToys", "GMDTv", "GMDWatch", "GMDAddToPhotos", "GMDAdjust", "GMDAssistant", "GMDAssistantPhoto", "GMDAudiotrack", "GMDBlurCircular", "GMDBlurLinear", "GMDBlurOff", "GMDBlurOn", "GMDBrightness1", "GMDBrightness2", "GMDBrightness3", "GMDBrightness4", "GMDBrightness5", "GMDBrightness6", "GMDBrightness7", "GMDBrokenImage", "GMDBrush", "GMDCamera", "GMDCameraAlt", "GMDCameraFront", "GMDCameraRear", "GMDCameraRoll", "GMDCenterFocusStrong", "GMDCenterFocusWeak", "GMDCollections", "GMDCollectionsBookmark", "GMDColorLens", "GMDColorize", "GMDCompare", "GMDControlPoint", "GMDControlPointDuplicate", "GMDCrop", "GMDCrop169", "GMDCrop32", "GMDCrop54", "GMDCrop75", "GMDCropDin", "GMDCropFree", "GMDCropLandscape", "GMDCropOriginal", "GMDCropPortrait", "GMDCropSquare", "GMDDehaze", "GMDDetails", "GMDEdit", "GMDExposure", "GMDExposureNeg1", "GMDExposureNeg2", "GMDExposurePlus1", "GMDExposurePlus2", "GMDExposureZero", "GMDFilter", "GMDFilter1", "GMDFilter2", "GMDFilter3", "GMDFilter4", "GMDFilter5", "GMDFilter6", "GMDFilter7", "GMDFilter8", "GMDFilter9", "GMDFilter9Plus", "GMDFilterBAndW", "GMDFilterCenterFocus", "GMDFilterDrama", "GMDFilterFrames", "GMDFilterHdr", "GMDFilterNone", "GMDFilterTiltShift", "GMDFilterVintage", "GMDFlare", "GMDFlashAuto", "GMDFlashOff", "GMDFlashOn", "GMDFlip", "GMDGradient", "GMDGrain", "GMDGridOff", "GMDGridOn", "GMDHdrOff", "GMDHdrOn", "GMDHdrStrong", "GMDHdrWeak", "GMDHealing", "GMDImage", "GMDImageAspectRatio", "GMDIso", "GMDLandscape", "GMDLeakAdd", "GMDLeakRemove", "GMDLens", "GMDLooks", "GMDLooks3", "GMDLooks4", "GMDLooks5", "GMDLooks6", "GMDLooksOne", "GMDLooksTwo", "GMDLoupe", "GMDMonochromePhotos", "GMDMovieCreation", "GMDMusicNote", "GMDNature", "GMDNaturePeople", "GMDNavigateBefore", "GMDNavigateNext", "GMDPalette", "GMDPanorama", "GMDPanoramaFishEye", "GMDPanoramaHorizontal", "GMDPanoramaVertical", "GMDPanoramaWideAngle", "GMDPhoto", "GMDPhotoAlbum", "GMDPhotoCamera", "GMDPhotoLibrary", "GMDPhotoSizeSelectActual", "GMDPhotoSizeSelectLarge", "GMDPhotoSizeSelectSmall", "GMDPictureAsPdf", "GMDPortrait", "GMDRemoveRedEye", "GMDRotate90DegreesCcw", "GMDRotateLeft", "GMDRotateRight", "GMDSlideshow", "GMDStraighten", "GMDStyle", "GMDSwitchCamera", "GMDSwitchVideo", "GMDTagFaces", "GMDTexture", "GMDTimelapse", "GMDTimer", "GMDTimer10", "GMDTimer3", "GMDTimerOff", "GMDTonality", "GMDTransform", "GMDTune", "GMDViewComfy", "GMDViewCompact", "GMDVignette", "GMDWbAuto", "GMDWbCloudy", "GMDWbIncandescent", "GMDWbIridescent", "GMDWbSunny", "GMDBeenhere", "GMDDirections", "GMDDirectionsBike", "GMDDirectionsBoat", "GMDDirectionsBus", "GMDDirectionsCar", "GMDDirectionsRailway", "GMDDirectionsRun", "GMDDirectionsSubway", "GMDDirectionsTransit", "GMDDirectionsWalk", "GMDFlight", "GMDHotel", "GMDLayers", "GMDLayersClear", "GMDLocalActivity", "GMDLocalAirport", "GMDLocalAtm", "GMDLocalBar", "GMDLocalCafe", "GMDLocalCarWash", "GMDLocalConvenienceStore", "GMDLocalDining", "GMDLocalDrink", "GMDLocalFlorist", "GMDLocalGasStation", "GMDLocalGroceryStore", "GMDLocalHospital", "GMDLocalHotel", "GMDLocalLaundryService", "GMDLocalLibrary", "GMDLocalMall", "GMDLocalMovies", "GMDLocalOffer", "GMDLocalParking", "GMDLocalPharmacy", "GMDLocalPhone", "GMDLocalPizza", "GMDLocalPlay", "GMDLocalPostOffice", "GMDLocalPrintshop", "GMDLocalSee", "GMDLocalShipping", "GMDLocalTaxi", "GMDMap", "GMDMyLocation", "GMDNavigation", "GMDPersonPin", "GMDPinDrop", "GMDPlace", "GMDRateReview", "GMDRestaurantMenu", "GMDSatellite", "GMDStoreMallDirectory", "GMDTerrain", "GMDTraffic", "GMDApps", "GMDArrowBack", "GMDArrowDropDown", "GMDArrowDropDownCircle", "GMDArrowDropUp", "GMDArrowForward", "GMDCancel", "GMDCheck", "GMDChevronLeft", "GMDChevronRight", "GMDClose", "GMDExpandLess", "GMDExpandMore", "GMDFullscreen", "GMDFullscreenExit", "GMDMenu", "GMDMoreHoriz", "GMDMoreVert", "GMDRefresh", "GMDAdb", "GMDAirlineSeatFlat", "GMDAirlineSeatFlatAngled", "GMDAirlineSeatIndividualSuite", "GMDAirlineSeatLegroomExtra", "GMDAirlineSeatLegroomNormal", "GMDAirlineSeatLegroomReduced", "GMDAirlineSeatReclineExtra", "GMDAirlineSeatReclineNormal", "GMDBluetoothAudio", "GMDConfirmationNumber", "GMDDiscFull", "GMDDoNotDisturb", "GMDDoNotDisturbAlt", "GMDDriveEta", "GMDEventAvailable", "GMDEventBusy", "GMDEventNote", "GMDFolderSpecial", "GMDLiveTv", "GMDMms", "GMDMore", "GMDNetworkLocked", "GMDOndemandVideo", "GMDPersonalVideo", "GMDPhoneBluetoothSpeaker", "GMDPhoneForwarded", "GMDPhoneInTalk", "GMDPhoneLocked", "GMDPhoneMissed", "GMDPhonePaused", "GMDPower", "GMDSdCard", "GMDSimCardAlert", "GMDSms", "GMDSmsFailed", "GMDSync", "GMDSyncDisabled", "GMDSyncProblem", "GMDSystemUpdate", "GMDTapAndPlay", "GMDTimeToLeave", "GMDVibration", "GMDVoiceChat", "GMDVpnLock", "GMDWc", "GMDWifi", "GMDCake", "GMDDomain", "GMDGroup", "GMDGroupAdd", "GMDLocationCity", "GMDMood", "GMDMoodBad", "GMDNotifications", "GMDNotificationsActive", "GMDNotificationsNone", "GMDNotificationsOff", "GMDNotificationsPaused", "GMDPages", "GMDPartyMode", "GMDPeople", "GMDPeopleOutline", "GMDPerson", "GMDPersonAdd", "GMDPersonOutline", "GMDPlusOne", "GMDPoll", "GMDPublic", "GMDSchool", "GMDShare", "GMDWhatshot", "GMDCheckBox", "GMDCheckBoxOutlineBlank", "GMDIndeterminateCheckBox", "GMDRadioButtonChecked", "GMDRadioButtonUnchecked", "GMDStar", "GMDStarBorder", "GMDStarHalf"] }
[ -1 ]
0d5402166b3dba95f03ef627f29aac1f7a6e6c7e
2be35eb584ae0d6c692bfb16dda84e102cb64e25
/TestNetWorkLayer/GitHubApiClient.swift
d0d779e3269e36294b28ef664694c3bad099a30a
[]
no_license
codedeman/TestNetWorkLayer
0fe65a532ee72a1a4cd349c43ce330254954ff91
fd959dc2788d474879aa70e048b9597c27df184d
refs/heads/master
2021-01-03T23:02:38.007065
2020-03-21T10:55:45
2020-03-21T10:55:45
240,272,541
0
0
null
null
null
null
UTF-8
Swift
false
false
471
swift
// // GitHubApiClient.swift // TestNetWorkLayer // // Created by Ominext on 2/13/20. // Copyright © 2020 Ominext. All rights reserved. // import Foundation let kGitHubApiBaseUrl = "https://api.github.com/" typealias GitHubGetUserCallback = (GitHubUserData) -> Void typealias ErrorCallback = (NSError) -> Void protocol GitHubApiClient { static func requestUserWithUsername(_ username: String, onSuccess: GitHubGetUserCallback?, onError: ErrorCallback?) }
[ -1 ]
10441be12d76a91d5f02b5264fb6df23c1b51e47
51bd9ed61a95949183fde2ecc4550162ebeddd42
/WhereRU/LoginViewController.swift
0b1fb02bc8ac33c6997342bfdbbe14d90ea7c74d
[]
no_license
thetopplayer/WhereRU
1e74f2c0cee068221a1bdd93d6d0c0e7a8591f44
c1d32453020a3bbed3f51ca4654870db95da1d58
refs/heads/master
2021-01-17T22:18:34.618522
2015-06-26T15:39:21
2015-06-26T15:39:21
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,620
swift
// // ViewController.swift // WhereRU // // Created by RInz on 14-9-11. // Copyright (c) 2014年 RInz. All rights reserved. // import UIKit class LoginViewController: UIViewController, LoginViewControllerDelegate { @IBOutlet weak var nicknameTextField: UITextField! @IBOutlet weak var passwordTextField: UITextField! required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } override func viewDidLoad() { super.viewDidLoad() } @IBAction func login(sender: AnyObject) { AVUser.logInWithUsernameInBackground(nicknameTextField.text, password: passwordTextField.text) { (user:AVUser?, error:NSError?) -> Void in if (user != nil) { println("login success") var currentInstallation:AVInstallation = AVInstallation.currentInstallation() currentInstallation.setObject(AVUser.currentUser(), forKey: "deviceOwner") self.performSegueWithIdentifier("login", sender: self) } else { println("failed:\(error!.description)") } } } override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "goSignin" { let signinViewController = segue.destinationViewController as! SigninViewController signinViewController.delegate = self } } //MARK: - LoginViewControllerDelegate func loginViewControllerBack() { dismissViewControllerAnimated(true, completion: nil) } }
[ -1 ]
14f022ecdd30ccabf00fd903ed167e77b9f3f9c5
ee2d790a154fae7e1ded2842fd6ddddb4746aea1
/Tests/Fixtures/Generated/Colors/swift3-context-defaults-publicAccess.swift
a295043ba3dd618d67ef616f73272b20f823dd26
[ "MIT" ]
permissive
tlacan/SwiftGen
d14e2e53ecbf5a9c84dc875cb780957ef7682d9c
4c82dd4a28be49d24bc273afb59f5dbbabc5ced3
refs/heads/master
2022-08-23T19:28:37.154679
2020-05-27T12:40:08
2020-05-27T12:40:08
267,314,006
0
0
MIT
2020-05-27T12:30:37
2020-05-27T12:30:36
null
UTF-8
Swift
false
false
2,080
swift
// swiftlint:disable all // Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen #if os(OSX) import AppKit.NSColor public typealias Color = NSColor #elseif os(iOS) || os(tvOS) || os(watchOS) import UIKit.UIColor public typealias Color = UIColor #endif // swiftlint:disable superfluous_disable_command // swiftlint:disable file_length // MARK: - Colors // swiftlint:disable identifier_name line_length type_body_length public struct ColorName { public let rgbaValue: UInt32 public var color: Color { return Color(named: self) } /// <span style="display:block;width:3em;height:2em;border:1px solid black;background:#339666"></span> /// Alpha: 100% <br/> (0x339666ff) public static let articleBody = ColorName(rgbaValue: 0x339666ff) /// <span style="display:block;width:3em;height:2em;border:1px solid black;background:#ff66cc"></span> /// Alpha: 100% <br/> (0xff66ccff) public static let articleFootnote = ColorName(rgbaValue: 0xff66ccff) /// <span style="display:block;width:3em;height:2em;border:1px solid black;background:#33fe66"></span> /// Alpha: 100% <br/> (0x33fe66ff) public static let articleTitle = ColorName(rgbaValue: 0x33fe66ff) /// <span style="display:block;width:3em;height:2em;border:1px solid black;background:#ffffff"></span> /// Alpha: 80% <br/> (0xffffffcc) public static let `private` = ColorName(rgbaValue: 0xffffffcc) } // swiftlint:enable identifier_name line_length type_body_length // MARK: - Implementation Details // swiftlint:disable operator_usage_whitespace internal extension Color { convenience init(rgbaValue: UInt32) { let red = CGFloat((rgbaValue >> 24) & 0xff) / 255.0 let green = CGFloat((rgbaValue >> 16) & 0xff) / 255.0 let blue = CGFloat((rgbaValue >> 8) & 0xff) / 255.0 let alpha = CGFloat((rgbaValue ) & 0xff) / 255.0 self.init(red: red, green: green, blue: blue, alpha: alpha) } } // swiftlint:enable operator_usage_whitespace public extension Color { convenience init(named color: ColorName) { self.init(rgbaValue: color.rgbaValue) } }
[ 198908, 163758 ]
c9a8937388ae65b1c6ff05551960d40b0b9a8882
06d240901fd9a8709e584f8f160e980b8d359a97
/Weather/ViewModels/CityOverviewModel.swift
7be66e7842ee6e67d0d221dac9e31e5c52dd14ca
[]
no_license
saurya1995/Weather
f3dd37ef30009bbb54ddb03b1b7ddcb77b04b99e
d95e0077a36945aab5231f3c2f775aa9ec7605cf
refs/heads/master
2023-08-30T21:28:42.393355
2021-10-07T01:08:53
2021-10-07T01:08:53
412,840,653
0
0
null
null
null
null
UTF-8
Swift
false
false
2,517
swift
// // CityOverviewModel.swift // Weather // // Created by Saurya on 03.10.21. // import SwiftUI import Combine final class CityOverviewModel: ObservableObject{ @Published var lat: Double @Published var long: Double @Published var name="" @Published var time="" @Published var date="" @Published var weatherData: WeatherData? @Published var iconURL: URL = URL(string : "https://openweathermap.org/img/wn/[email protected]")! @Published var temp:String = "" @Published var description:String = "" @Published var feelsLike:String = "" @Published var pressure:String = "" @Published var humidity:String = "" @Published var windSpeed:String = "" private var cancellables=Set<AnyCancellable>() let timeFormatter: DateFormatter={ let f=DateFormatter() f.dateFormat="HH:mm" return f }() let dateFormatter: DateFormatter={ let f=DateFormatter() f.dateFormat="EEEE, MMMM dd" return f }() init(city: City){ self.lat=city.lat self.long=city.lon self.name=city.name self.time=timeFormatter.string(from: Date()) self.date=dateFormatter.string(from: Date()) load() } func load(){ WeatherService.getWeatherData(lat: lat, long: long) .sink { (completion) in switch completion{ case .failure(let error): print(error.localizedDescription) print("inside sink subscriber") return case .finished: return } } receiveValue: { [weak self](weatherData) in DispatchQueue.main.async { self?.weatherData = weatherData let icon = weatherData.current.weather.first?.icon ?? "10d" self?.iconURL = URL(string : "https://openweathermap.org/img/wn/\(icon)@2x.png")! self?.temp = "\(weatherData.current.temp) °" self?.description = "\(weatherData.current.weather.first?.description ?? "") °" self?.feelsLike = "\(weatherData.current.feelsLike) °" self?.pressure = "\(weatherData.current.pressure)" self?.humidity = "\(weatherData.current.humidity)" self?.windSpeed = "\(weatherData.current.windSpeed)" } } .store(in: &cancellables) } }
[ -1 ]
7dbaa750152e7b6f4ed8edefd12b507e13d5736e
7cd661cbf59eee2de69a2d74739a24b7d0b1df03
/sysconf_helper/main.swift
c9b1fc3aca3eddd6786a4ab6c15b210676a6508c
[]
no_license
young40/DnsChanger
8d6590b28a88fa017a68fc97e071b05f077d0dee
1938842798e7db2212f6c091899e5af5bc123eab
refs/heads/master
2020-01-23T21:48:34.936014
2016-11-25T10:04:38
2016-11-25T10:04:38
74,742,549
3
2
null
null
null
null
UTF-8
Swift
false
false
895
swift
// // main.swift // sysconf_helper // // Created by Peter Young on 25/11/2016. // Copyright © 2016 Peter Young. All rights reserved. // import Foundation //print("Hello, World!") var argc = CommandLine.argc var argv = CommandLine.arguments //argv.append("Wi-Fi") // //argv.append("119.29.29.29") //argv.append("114.114.114.114") // //argc = Int32(argv.count) //print(argv) if argc < 3 { print("arguments not enough") exit(-1) } var params: [String] = ["-setdnsservers"] for index in 1 ... (argc - 1) { params.append(argv[Int(index)]) } let paramStr = params.joined(separator: " ") var error: NSDictionary? let script = "do shell script \"/usr/sbin/networksetup " + paramStr + "\" with administrator privileges" let appleScript = NSAppleScript.init(source: script) appleScript?.executeAndReturnError(&error) if error != nil { print("error: \(error)") }
[ -1 ]
3e3eca2da5239dbd88996a3eda10dc18690521cf
21a12e85eab7d59b26f15df6e42414cfc1a34ce0
/GiphyTests/FileManagerTests.swift
aa11d4bb705bc70b3198798f8616acfea87643b3
[]
no_license
VictorSemenchuk/Giphy
42b71c05e9bc0f6d396e2b3e864e1a55dfe2b2b9
90b8a499b916542b5f24603c54d696283011f0d4
refs/heads/master
2020-03-27T05:14:38.703552
2018-09-04T15:46:23
2018-09-04T15:46:23
145,557,919
0
1
null
null
null
null
UTF-8
Swift
false
false
2,614
swift
// // FileManagerTests.swift // GiphyTests // // Created by Victor Macintosh on 26/08/2018. // Copyright © 2018 Viktar Semianchuk. All rights reserved. // import XCTest @testable import Giphy class FileManagerTests: XCTestCase { func test_createAppDirectoryIfNeeded_success() { let fileManager = GiphyFileManager() let path = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0] let result = fileManager.createAppDirectoryIfNeeded(at: path) XCTAssert(result, "Can't create directory") } func test_removeAppDirectory_success() { let fileManager = GiphyFileManager() let path = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0] _ = fileManager.createAppDirectoryIfNeeded(at: path) let result = fileManager.removeAppDirectory(from: path) XCTAssert(result, "Can't remove directory") } func test_writeFileWithName_success() { let fileManager = GiphyFileManager() let inputData = Data() let inputFileName = "testFilename" let inputDirectory = DirectoryType.cache let inputFileType = FileType.gif fileManager.writeFileWithName(inputFileName, data: inputData, withType: inputFileType, to: inputDirectory) let writtenData = fileManager.dataFromFileWithName(inputFileName, withType: inputFileType, from: inputDirectory) XCTAssertNotEqual(writtenData, nil, "Data from valid file can't be nil") } func test_dataFromFileWithName_success() { let fileManager = GiphyFileManager() let inputData = Data() let inputFileName = "testFilename" let inputDirectory = DirectoryType.cache let inputFileType = FileType.gif fileManager.writeFileWithName(inputFileName, data: inputData, withType: inputFileType, to: inputDirectory) let writtenData = fileManager.dataFromFileWithName(inputFileName, withType: inputFileType, from: inputDirectory) XCTAssertNotEqual(writtenData, nil, "Data from invalid file should be nil") } func test_dataFromFileWithName_failure() { let fileManager = GiphyFileManager() let inputFileName = "testFilename1" let inputDirectory = DirectoryType.cache let inputFileType = FileType.gif let writtenData = fileManager.dataFromFileWithName(inputFileName, withType: inputFileType, from: inputDirectory) XCTAssertEqual(writtenData, nil, "Data from invalid file should be nil") } }
[ -1 ]
769a1b9da138dd8a687e220efd11302acce86a04
ecbf06190526ce89e82dccc9053b71a6d7593553
/WorkWithUI/FeedBack/Models/CellSource.swift
78efd63428fd038c811af32ebe512ddaeba3c50d
[]
no_license
VDevGushin/123
732f6f9a30ee43a0e8d1e027f50f47131cb683c9
eede29b66edb5da8f9985db7247e1b2bc169b76d
refs/heads/master
2020-03-22T21:18:59.944712
2019-10-10T06:04:07
2019-10-10T06:04:07
140,676,600
1
0
null
null
null
null
UTF-8
Swift
false
false
1,178
swift
// // CellSource.swift // WorkWithUI // // Created by Vladislav Gushin on 11/11/2018. // Copyright © 2018 Vladislav Gushin. All rights reserved. // import UIKit enum StaticCellType: Int { case name case lastName case middleName case organisation case phone case mail case theme case captcha case detail case attach case done } enum FeedBackCellIncomeData { case name(with: String?) case lastName(with: String?) case middleName(with: String?) case organisation(with: Organisation?) case phone(with: String?) case mail(with: String?) case theme(with: FeedbackTheme?) case captcha(id: String?, text: String?) case detail(with: String?) case attach(with: [FeedBackAttachModel]) case done } final class CellSource { let title: String let cellType: UITableViewCell.Type var initialData: String? var type: StaticCellType let cell: UITableViewCell init(title: String, cellType: UITableViewCell.Type, type: StaticCellType, cell: UITableViewCell) { self.title = title self.cellType = cellType self.type = type self.cell = cell } }
[ -1 ]
677a6ce37e4a9d8b360658111024b3fad9098a48
97e756bb7d5450b1e3390671a9485291d4bc12de
/Landmark/CircleImage.swift
f12b324d635ea538bd88bdf61215e8bf77621167
[]
no_license
jchandlerturner/Landmark
e13e7501f171730c0e577568a032e89e22af7f3f
f17d14e910299b87196ba097ef80adc66200c681
refs/heads/master
2022-07-16T04:05:07.169556
2020-05-14T21:44:16
2020-05-14T21:44:16
264,026,869
0
0
null
null
null
null
UTF-8
Swift
false
false
495
swift
// // CircleImage.swift // Landmark // // Created by Chandler Turner on 5/14/20. // Copyright © 2020 Chandler Turner. All rights reserved. // import SwiftUI struct CircleImage: View { var body: some View { Image("turtlerock") .clipShape(Circle()) .overlay( Circle().stroke(Color.white, lineWidth: 3)) .shadow(radius: 10) } } struct CircleImage_Previews: PreviewProvider { static var previews: some View { CircleImage() } }
[ 356579, 255780, 252837 ]
7a913fbacaa3b9a9fc74c5b890adf4e1c7df64c2
e5f70d67b80696ba4009def98f12fbd4658467be
/Rock Paper Scissors/Rock Paper Scissors/DifficultyViewController.swift
94cf57516da08cf82da5a905fb172db0b40c179c
[]
no_license
Ikeret/ios_apps
1009a01b35a0ae632bdc6547d525c421ef94defd
ff5b77b2d6dfa8bc1026ff5e383e8332f9b993c0
refs/heads/master
2022-03-07T04:56:52.878630
2019-11-18T20:07:11
2019-11-18T20:07:11
195,582,654
0
0
null
null
null
null
UTF-8
Swift
false
false
935
swift
// // DifficultyViewController.swift // Rock Paper Scissors // // Created by Сергей Коршунов on 15/07/2019. // Copyright © 2019 Sergey Korshunov. All rights reserved. // import UIKit class DifficultyViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBOutlet weak var difficult: UISlider! // 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. let destinationVC : ViewController = segue.destination as! ViewController destinationVC.difficult = Int(round(difficult.value)) } }
[ -1 ]
527f060ed36e0c0d1b9b5cedf8b535d9374e1e70
c27bc9e778723c5a42df6fefad54543100b5c1bf
/Sources/SwiftAST/Statement/ForStatement.swift
8947bf2ccbaf3a64e697aa07667045e36f47f292
[ "LicenseRef-scancode-warranty-disclaimer", "MIT", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
fhchina/SwiftRewriter
8ad69e2d73c112fd983ecccf36d31d1a38051ab8
312595adcd3bdfaa5c0504c85d26aeffa54bff47
refs/heads/master
2022-04-22T07:20:26.162281
2020-04-25T08:08:10
2020-04-25T08:08:10
null
0
0
null
null
null
null
UTF-8
Swift
false
false
3,019
swift
public class ForStatement: Statement { /// Cache of children nodes private var _childrenNodes: [SyntaxNode] = [] public var pattern: Pattern { didSet { oldValue.setParent(nil) pattern.setParent(self) reloadChildrenNodes() } } public var exp: Expression { didSet { oldValue.parent = nil exp.parent = self reloadChildrenNodes() } } public var body: CompoundStatement { didSet { oldValue.parent = nil body.parent = self reloadChildrenNodes() } } public override var children: [SyntaxNode] { _childrenNodes } public init(pattern: Pattern, exp: Expression, body: CompoundStatement) { self.pattern = pattern self.exp = exp self.body = body super.init() pattern.setParent(self) exp.parent = self body.parent = self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) pattern = try container.decode(Pattern.self, forKey: .pattern) exp = try container.decodeExpression(forKey: .exp) body = try container.decodeStatement(CompoundStatement.self, forKey: .body) try super.init(from: container.superDecoder()) pattern.setParent(self) exp.parent = self body.parent = self } @inlinable public override func copy() -> ForStatement { ForStatement(pattern: pattern.copy(), exp: exp.copy(), body: body.copy()) .copyMetadata(from: self) } private func reloadChildrenNodes() { _childrenNodes.removeAll() _childrenNodes.append(exp) pattern.collect(expressions: &_childrenNodes) _childrenNodes.append(body) } @inlinable public override func accept<V: StatementVisitor>(_ visitor: V) -> V.StmtResult { visitor.visitFor(self) } public override func isEqual(to other: Statement) -> Bool { switch other { case let rhs as ForStatement: return pattern == rhs.pattern && exp == rhs.exp && body == rhs.body default: return false } } public override func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(pattern, forKey: .pattern) try container.encodeExpression(exp, forKey: .exp) try container.encodeStatement(body, forKey: .body) try super.encode(to: container.superEncoder()) } private enum CodingKeys: String, CodingKey { case pattern case exp case body } } public extension Statement { @inlinable var asFor: ForStatement? { cast() } }
[ -1 ]
bd45b6df48e235f2d2af5e191da13fdd7adf01a8
4bcaa35eaa72a594ddf0104c2bd7b24953d6f4f9
/ScheduleApp/Settings.swift
55373d19ef1ff5e1630ea3699ac2538ae61526a4
[]
no_license
yabbou/ScheduleApp
8a85d6b270ac4f471940a0aed327d46e1032a4d8
507e1560dc002efacf97d8f875975acd71bf291d
refs/heads/master
2020-06-20T09:22:26.452484
2019-08-29T22:59:09
2019-08-29T22:59:09
197,075,973
0
0
null
null
null
null
UTF-8
Swift
false
false
2,127
swift
//import UIKit // ////understand this imported code // //class Settings: NSObject { // // let blackView = UIView() // // let collectionView: UICollectionView = { // let layout = UICollectionViewFlowLayout() // let cv = UICollectionView(frame: .zero, collectionViewLayout: layout) // cv.backgroundColor = UIColor.white // return cv // }() // // func showSettings() { // if let window = UIApplication.shared.keyWindow { // // blackView.backgroundColor = UIColor(white: 0, alpha: 0.5) // // blackView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleDismiss))) // // window.addSubview(blackView) // // window.addSubview(collectionView) // // let height: CGFloat = 200 // let y = window.frame.height - height // collectionView.frame = CGRect(x: 0, y: window.frame.height, width: window.frame.width, height: height) // // blackView.frame = window.frame // blackView.alpha = 0 // // UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: { // // self.blackView.alpha = 1 // // self.collectionView.frame = CGRect(x: 0, y: y, width: self.collectionView.frame.width, height: self.collectionView.frame.height) // // }, completion: nil) // } // } // // @objc func handleDismiss() { // UIView.animate(withDuration: 0.5) { // self.blackView.alpha = 0 // // if let window = UIApplication.shared.keyWindow { // self.collectionView.frame = CGRect(x: 0, y: window.frame.height, width: self.collectionView.frame.width, height: self.collectionView.frame.height) // } // } // } // // override init() { // super.init() // //start doing something here maybe.... // } // //}
[ -1 ]
7e6f7006f21f62d6c540c6013a2d6a23397ae039
7f15c8e6f9a875853e05d1eccddf511f93c1e150
/SwiftUIDesign/SwiftUIDesign/AppDelegate.swift
04f7d695897ba33cc9838e4f84efdce2bbb1d9a0
[]
no_license
tyih/SwiftUIDesign
f51d24d63519340c3930a5aa40f56835e9474de4
69b473a4a9d7403240243a068493a50cdb458f5f
refs/heads/master
2021-01-05T20:27:40.588216
2020-02-18T16:13:00
2020-02-18T16:13:00
241,128,980
0
0
null
null
null
null
UTF-8
Swift
false
false
1,407
swift
// // AppDelegate.swift // SwiftUIDesign // // Created by tiany on 2020/2/17. // Copyright © 2020 ty. 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, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 336123, 418043, 336128, 385280, 262404, 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, 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, 164538, 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, 336711, 328522, 336714, 426841, 197468, 254812, 361309, 361315, 361322, 328573, 377729, 369542, 336784, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 66782, 222437, 386285, 328941, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181649, 181654, 230809, 181670, 181673, 181678, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 419362, 394786, 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, 337592, 419512, 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, 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, 329867, 329885, 411805, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 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, 355028, 264918, 183005, 256734, 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, 330760, 330768, 248862, 396328, 158761, 396336, 199728, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 183383, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 347287, 339097, 248985, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265432, 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, 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, 249308, 339420, 249312, 339424, 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, 224909, 11918, 159374, 224913, 126610, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 372499, 167700, 225043, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 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, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 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, 332117, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 250238, 389502, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 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, 357069, 332493, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 357211, 430939, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 324472, 398201, 119674, 324475, 430972, 340861, 324478, 340858, 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, 210044, 349308, 160895, 152703, 349311, 210052, 210055, 349319, 210067, 210071, 210077, 210080, 210084, 251044, 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, 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, 333399, 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, 268143, 358255, 399215, 358259, 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, 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, 268701, 342430, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 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, 326451, 326454, 244540, 326460, 375612, 260924, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 342874, 326502, 375656, 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, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 384181, 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, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 154999, 253303, 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, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 425649, 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, 376671, 155487, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 425845, 262005, 147317, 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 ]
8743adef5959e0da48b49393a5045cea75e3fba1
c241b42425163479b0e6e0ab7e7123885a9128c8
/iOS/TableViews/TableViewsUITests/TableViewsUITests.swift
afe61496d8b3b51169b9261f8cf2c423c77fc8b6
[]
no_license
ja-mes/experiments
5dbc5ab27c781190933b6dc05da12a15d6b8a860
23fe91e5208fd35bed0be3a9f3158057027e4bb8
refs/heads/master
2021-03-24T10:24:43.605555
2016-09-08T01:02:41
2016-09-08T01:02:41
26,285,613
0
0
null
null
null
null
UTF-8
Swift
false
false
1,252
swift
// // TableViewsUITests.swift // TableViewsUITests // // Created by James Brown on 8/4/16. // Copyright © 2016 James Brown. All rights reserved. // import XCTest class TableViewsUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. XCUIApplication().launch() // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 333827, 182277, 243720, 282634, 313356, 155665, 305173, 241695, 223269, 292901, 315431, 354342, 102441, 315433, 325675, 313388, 354346, 102446, 282671, 278571, 229425, 243763, 241717, 321589, 180279, 215095, 229431, 213051, 288829, 325695, 286787, 288835, 307269, 237638, 313415, 239689, 233548, 311373, 315468, 196687, 278607, 311377, 354386, 223317, 315477, 368732, 180317, 323678, 315488, 321632, 45154, 315489, 280676, 313446, 215144, 217194, 194667, 233578, 278637, 288878, 319599, 307306, 278642, 284789, 131190, 288890, 292987, 215165, 131199, 194692, 235661, 278669, 333968, 241809, 323730, 278676, 311447, 153752, 284827, 329884, 278684, 299166, 233635, 311459, 215204, 333990, 299176, 184489, 278698, 284843, 278703, 323761, 184498, 278707, 258233, 280761, 295099, 180409, 227517, 223418, 278713, 299197, 280767, 299202, 139459, 309443, 176325, 338118, 131270, 299208, 227525, 301255, 280779, 233678, 227536, 282832, 301270, 229591, 301271, 280792, 147679, 147680, 325857, 311520, 356575, 280803, 307431, 338151, 182503, 319719, 295147, 317676, 286957, 395511, 313595, 184574, 309504, 217352, 194832, 227601, 319764, 278805, 338196, 315674, 282908, 299294, 311582, 282912, 233761, 278817, 211239, 282920, 334121, 317738, 325930, 311596, 338217, 321839, 336177, 315698, 98611, 282938, 278843, 127292, 168251, 307514, 287040, 319812, 311622, 280903, 227655, 319816, 323914, 201037, 383309, 282959, 229716, 250196, 289109, 379224, 323934, 391521, 239973, 381286, 285031, 416103, 313703, 280938, 242027, 242028, 321901, 354671, 278895, 287089, 250227, 199030, 227702, 315768, 139641, 291193, 223611, 313726, 211327, 291200, 311679, 240003, 158087, 313736, 227721, 242059, 106893, 285074, 227730, 240020, 190870, 190872, 291225, 293275, 285083, 317851, 227743, 242079, 285089, 289185, 283039, 293281, 156069, 305572, 301482, 289195, 375211, 311723, 377265, 334259, 338359, 299449, 319931, 311739, 293309, 278974, 336319, 311744, 317889, 291266, 336323, 278979, 129484, 278988, 281038, 281039, 278992, 283088, 289229, 326093, 283089, 279000, 242138, 176602, 285152, 279009, 291297, 369121, 160224, 195044, 242150, 279014, 302539, 279017, 311787, 334315, 281071, 279030, 293368, 279033, 311800, 317949, 322396, 279042, 233987, 324098, 287237, 283138, 334345, 309770, 340489, 342537, 279053, 283154, 303635, 279060, 279061, 182802, 303634, 279066, 188954, 322077, 291359, 342560, 370122, 227881, 293420, 236080, 283185, 289328, 279092, 234037, 23093, 244279, 244280, 338491, 234044, 340539, 301635, 322119, 309831, 55880, 377419, 303693, 281165, 301647, 281170, 326229, 115287, 189016, 309847, 244311, 332379, 287319, 111197, 295518, 287327, 242274, 279143, 279150, 281200, 287345, 313970, 287348, 301688, 189054, 303743, 297600, 287359, 291455, 301702, 311944, 334473, 344714, 279176, 316044, 311948, 311950, 184974, 316048, 326288, 316050, 311953, 287379, 336531, 295575, 227991, 289435, 303772, 221853, 205469, 285348, 314020, 340645, 295591, 279207, 176810, 248494, 279215, 293552, 295598, 279218, 285362, 164532, 166581, 342705, 285360, 299698, 287412, 287418, 314043, 303802, 154295, 66243, 291529, 287434, 363212, 225996, 135888, 242385, 164561, 303826, 279249, 369365, 369366, 279253, 158424, 230105, 299737, 322269, 338658, 342757, 295653, 289511, 230120, 234216, 330473, 285419, 330476, 289517, 215790, 312046, 279278, 170735, 125683, 230133, 199415, 342775, 234233, 242428, 279293, 289534, 205566, 35584, 299777, 322302, 228099, 285443, 375552, 291584, 291591, 322312, 346889, 285450, 295688, 312076, 326413, 285457, 295698, 166677, 207639, 283418, 285467, 221980, 234276, 336678, 318247, 262952, 293673, 283431, 318251, 289580, 262957, 279337, 164655, 328495, 301872, 234290, 285493, 230198, 285496, 301883, 342846, 281407, 289599, 222017, 295745, 293702, 318279, 283466, 281426, 279379, 244569, 234330, 281434, 295769, 201562, 275294, 301919, 230238, 279393, 293729, 357219, 281444, 303973, 279398, 351078, 349025, 177002, 308075, 242540, 242542, 310132, 295797, 201590, 207735, 295799, 228214, 177018, 279418, 269179, 336765, 308093, 314240, 291713, 158594, 330627, 340865, 240517, 287623, 228232, 416649, 279434, 316299, 320394, 252812, 234382, 308111, 189327, 308113, 293780, 310166, 289691, 209820, 240543, 283551, 310177, 289699, 189349, 289704, 293801, 279465, 326571, 177074, 304050, 326580, 289720, 326586, 289723, 189373, 213956, 359365, 19398, 345030, 281541, 213961, 127945, 279499, 211913, 56270, 191445, 304086, 183254, 207839, 340960, 234469, 314343, 123880, 340967, 304104, 324587, 320492, 234476, 203758, 320495, 248815, 183276, 287730, 240631, 320504, 214009, 201721, 312313, 312317, 234499, 418819, 293894, 330759, 320520, 230411, 322571, 330766, 234513, 238611, 293911, 140311, 316441, 238617, 197658, 326684, 336930, 113710, 281647, 189487, 318515, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 336962, 160834, 314437, 349254, 238663, 300109, 207954, 234578, 250965, 205911, 339031, 296023, 314458, 156763, 281698, 285795, 230500, 281699, 250982, 322664, 228457, 279659, 318571, 234606, 279666, 300147, 230514, 238706, 187508, 312435, 302202, 285819, 314493, 285823, 150656, 234626, 279686, 222344, 285833, 285834, 234635, 228492, 318602, 337037, 177297, 162962, 187539, 347286, 308375, 324761, 285850, 296091, 119965, 234655, 302239, 300192, 339106, 330912, 306339, 234662, 300200, 249003, 3243, 208044, 302251, 322733, 238764, 294069, 324790, 300215, 64699, 294075, 228541, 339131, 343230, 229414, 283841, 148674, 283846, 312519, 279752, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 279775, 304352, 339167, 310496, 298209, 304353, 279780, 228587, 279789, 290030, 302319, 234741, 316661, 230239, 283894, 208123, 292092, 279803, 228608, 320769, 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, 279874, 216387, 300354, 372039, 300355, 230730, 345418, 337228, 296269, 222542, 224591, 234830, 238928, 296274, 331091, 318804, 150868, 314708, 283990, 357720, 314711, 300378, 300379, 294236, 314721, 230757, 281958, 314727, 134504, 306541, 314734, 327023, 312688, 234864, 296304, 316786, 230772, 314740, 314742, 327030, 284015, 310650, 290170, 224637, 306558, 337280, 243073, 290176, 179586, 306561, 294278, 314759, 296328, 296330, 298378, 368012, 314765, 318860, 9618, 279955, 306580, 314771, 112019, 234902, 314776, 282008, 292242, 224662, 318876, 282013, 290206, 343457, 148899, 314788, 298406, 282023, 245160, 241067, 279979, 314797, 279980, 286128, 279988, 173492, 284086, 286133, 259513, 310714, 284090, 228796, 54719, 415170, 292291, 228804, 280003, 306630, 302530, 300488, 300490, 280011, 310731, 306634, 339403, 337359, 329168, 312785, 222674, 329170, 234957, 280020, 310735, 280025, 310747, 239069, 144862, 286176, 187877, 310758, 280042, 280043, 191980, 300526, 329198, 337391, 282097, 296434, 308722, 40439, 191991, 286201, 288248, 300539, 288252, 210429, 359931, 312830, 290304, 245249, 228868, 292359, 323079, 218632, 302602, 323083, 230922, 294413, 359949, 304655, 323088, 329231, 282132, 302613, 230933, 316951, 175640, 374297, 282135, 302620, 222754, 313338, 306730, 312879, 230960, 288305, 290359, 239159, 323132, 235069, 157246, 288319, 288322, 280131, 349764, 299912, 194118, 282182, 288328, 292424, 292426, 286281, 333389, 224848, 349780, 224852, 290391, 128600, 196184, 235096, 306777, 239192, 212574, 99937, 204386, 323171, 300643, 300645, 282214, 294220, 345697, 312937, 204394, 224874, 243306, 312941, 138862, 206447, 310896, 294517, 314997, 290425, 288377, 339579, 337533, 325246, 333438, 235136, 280193, 282244, 239238, 288391, 282248, 286344, 323208, 179853, 286351, 188049, 229011, 239251, 280217, 323226, 179868, 229021, 302751, 198304, 282272, 245413, 282279, 298664, 298666, 317102, 286387, 300725, 286392, 302778, 306875, 280252, 280253, 282302, 323262, 286400, 321217, 296636, 321220, 282309, 239305, 296649, 306891, 212684, 280266, 302798, 9935, 241360, 282321, 313042, 286419, 333522, 241366, 280279, 282330, 18139, 280285, 294621, 282336, 325345, 321250, 294629, 153318, 337638, 333543, 12009, 181992, 282347, 288492, 282349, 323315, 67316, 286457, 284410, 313082, 200444, 288508, 282366, 286463, 319232, 288515, 249606, 323335, 282375, 284425, 280326, 116491, 216844, 282379, 284430, 300812, 280333, 161553, 300810, 278292, 118549, 116502, 282390, 284436, 278294, 325403, 321308, 321309, 341791, 241440, 282401, 339746, 282399, 186148, 186149, 216868, 241447, 315172, 294699, 284460, 280367, 300849, 282418, 280373, 282424, 319289, 280377, 321338, 282428, 280381, 345918, 413500, 241471, 280386, 325444, 280391, 153416, 315209, 325449, 159563, 280396, 307024, 325460, 237397, 341846, 18263, 317268, 241494, 188250, 284508, 300893, 307038, 370526, 237411, 284515, 276326, 282471, 296807, 292713, 282476, 292719, 296815, 313200, 325491, 313204, 317305, 339840, 315265, 280451, 325508, 327556, 333700, 188293, 243592, 305032, 67464, 325514, 350091, 350092, 282503, 184207, 311183, 315272, 315275, 282517, 294806, 350102, 294808, 337816, 214936, 239515, 333727, 298912, 319393, 294820, 118693, 333734, 219046, 294824, 284584, 313257, 298921, 292783, 126896, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 24531, 231382, 323554, 292835, 292838, 294887, 317416, 262953, 174058, 313322, 278507, 311277, 296942, 298987, 327666, 278515, 325620, 239610 ]
7b9d16d32fb8f958500de23db79c844126b76efc
8088cf3d4042e3dedd24ce232634a573990659ad
/Random Names/Random_NamesApp.swift
b534823e3b90daa41e90d4c4ac59d9e9ad168324
[]
no_license
KornevSS/Random-Names-SwiftUI
02dc898a23a088a2126135b64a1204522630d4b0
d5fecf159230d2cac3fcb264861678dff7e72b90
refs/heads/main
2023-03-31T00:17:37.745195
2021-04-10T15:01:15
2021-04-10T15:01:15
356,522,615
0
0
null
null
null
null
UTF-8
Swift
false
false
254
swift
// // Random_NamesApp.swift // Random Names // // Created by Сергей Корнев on 08.04.2021. // import SwiftUI @main struct Random_NamesApp: App { var body: some Scene { WindowGroup { ContentView() } } }
[ -1 ]
f381aecf994c0aca154a36bffe456e3d71f33da8
5eca1aee0ee5377f9250e8c40b82bad179edd626
/TODO/TODO/AppDelegate.swift
8aab782adf1d515bcbd604e1324f57a15c62180a
[]
no_license
amyjiyr/ios-decal-proj1
ed5542d2a4accb442bed79d0c968b39d8080b232
7a6e05e19bd45a98f56336bc30b66dec27aadd33
refs/heads/master
2021-01-11T02:57:32.883890
2016-10-20T06:10:49
2016-10-20T06:10:49
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,574
swift
// // AppDelegate.swift // TODO // // Created by Amy Ji on 10/18/16. // Copyright © 2016 Amy Ji. All rights reserved. // import UIKit import CoreData @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:. // Saves changes in the application's managed object context before the application terminates. self.saveContext() } // MARK: - Core Data stack lazy var persistentContainer: NSPersistentContainer = { /* The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail. */ let container = NSPersistentContainer(name: "TODO") container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. /* Typical reasons for an error here include: * The parent directory does not exist, cannot be created, or disallows writing. * The persistent store is not accessible, due to permissions or data protection when the device is locked. * The device is out of space. * The store could not be migrated to the current model version. Check the error message to determine what the actual problem was. */ fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }() // MARK: - Core Data Saving support func saveContext () { let context = persistentContainer.viewContext if context.hasChanges { do { try context.save() } catch { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. let nserror = error as NSError fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } } }
[ 294405, 243717, 163848, 313353, 320008, 320014, 313360, 288275, 322580, 289300, 290326, 329747, 139803, 322080, 306721, 296483, 322083, 229411, 306726, 309287, 308266, 292907, 217132, 322092, 40495, 316465, 288306, 322102, 324663, 164408, 308281, 322109, 286783, 315457, 313409, 313413, 320582, 349765, 309832, 288329, 215117, 196177, 241746, 344661, 231000, 212571, 300124, 287323, 309342, 325220, 306790, 290409, 310378, 296043, 311914, 152685, 334446, 307310, 322666, 292466, 314995, 307315, 314487, 291450, 314491, 222846, 318599, 312970, 239252, 311444, 294038, 311449, 323739, 300194, 298662, 233638, 233644, 286896, 295600, 300208, 286389, 294070, 125111, 234677, 321212, 309439, 235200, 284352, 296641, 242371, 302787, 284360, 321228, 319181, 298709, 284374, 189654, 182486, 320730, 241371, 311516, 357083, 179420, 322272, 317665, 298210, 165091, 311525, 288489, 290025, 229098, 307436, 304365, 323310, 125167, 313073, 286455, 306424, 322299, 319228, 302332, 319231, 184576, 309505, 241410, 311043, 366339, 309509, 318728, 125194, 234763, 321806, 125201, 296218, 313116, 237858, 326434, 295716, 313125, 300836, 289577, 125226, 133421, 317233, 241971, 316726, 318264, 201530, 313660, 159549, 287038, 292159, 218943, 182079, 288578, 301893, 234828, 292172, 379218, 300882, 321364, 243032, 201051, 230748, 258397, 294238, 298844, 300380, 291169, 199020, 293741, 266606, 319342, 292212, 313205, 244598, 316788, 124796, 196988, 305022, 317821, 243072, 314241, 313215, 303999, 242050, 325509, 293767, 316300, 306576, 322448, 308114, 319900, 298910, 313250, 308132, 316327, 306605, 316334, 324015, 324017, 200625, 300979, 316339, 322998, 67000, 316345, 296888, 300987, 319932, 310718, 292288, 317888, 323520, 312772, 214980, 298950, 306632, 310733, 289744, 310740, 235994, 286174, 315359, 240098, 323555, 236008, 319465, 248299, 311789, 326640, 188913, 203761, 320498, 314357, 288246, 309243, 300540, 310782 ]
1b70e8207f567b5223b2f44eaeb1ee3b6cc5cefc
a9531d43b399e26f7b27bafe4c2bffc206dc030d
/TheMovieManager1.0/TheMovieManager/Model/TMDB Requests/MarkWatchlist.swift
b9ccc22fdb007768d93674cbab40bbc024fb1426
[]
no_license
BinyaminAlfassi/TheMovieManager
af72835831a6a5f5993f9127c37f1becceaa9105
e8337c89ccd83f6659a9d711ce0dd1bebd352906
refs/heads/master
2022-12-17T18:09:39.512653
2020-09-22T11:22:14
2020-09-22T11:22:14
295,533,108
0
0
null
null
null
null
UTF-8
Swift
false
false
425
swift
// // MarkWatchlist.swift // TheMovieManager // // Created by Owen LaRosa on 8/13/18. // Copyright © 2018 Udacity. All rights reserved. // import Foundation struct MarkWatchlist: Codable { let mediaType: String let mediaId: Int let watchlist: Bool enum CodingKeys: String, CodingKey { case mediaType = "media_type" case mediaId = "media_id" case watchlist = "watchlist" } }
[ 399099 ]
403cb5fab0fd8d60e3e8275da08e979a6273c7b1
71db1f4319a49c8f4a12475246c316fc035db8ab
/YoutubeGMBN/YoutubeGMBN/Sources/Scenes/Details/Networking/Response/TestDoubles/StubMovieCommentResponseBuilder.swift
23d54f4150d8b99bb2e152a90998fb205c5062f7
[ "MIT" ]
permissive
KrygTomasz/Youtube-GMBN
774083f0f8c760ebd95eb401908ebc848cbd352d
071724f4897a57a6b6c9e39499590111cf12ea52
refs/heads/main
2023-06-03T18:03:04.848817
2021-06-22T09:06:27
2021-06-22T09:06:27
378,959,922
0
0
null
null
null
null
UTF-8
Swift
false
false
414
swift
// // StubMovieCommentsContainerResponseBuilder.swift // YoutubeGMBN // // Created by Tomasz Kryg on 22/06/2021. // import Foundation struct StubMovieCommentResponseBuilder: Builder { var text: String? var author: String? func build() -> MovieCommentResponse { return .init(snippet: .init(topLevelComment: .init(snippet: .init(textDisplay: text, authorDisplayName: author)))) } }
[ -1 ]
352a52e35d5f16ea02cc77327d6c39b71e1c8915
e7d1e47953ef026379c64b3aead884d55697364d
/TerrainFun/InputDeviceSupport/MulitAxisDevice.swift
7b77b69d1ef7ccb3a969c35b6a943bb57bbfbb38
[]
no_license
JetForMe/TerrainFun
3ff9db097c3b120b883a7cd7f6d5d3575d03fefe
f8982b71f2d38f96394140745fb0e60806567d9d
refs/heads/master
2023-04-13T17:58:20.725579
2021-04-29T07:57:36
2021-04-29T07:57:36
355,197,211
0
0
null
null
null
null
UTF-8
Swift
false
false
7,780
swift
// // MulitAxisDevice.swift // TerrainFun // // Created by Rick Mann on 2021-04-26. // Copyright © 2021 Latency: Zero, LLC. All rights reserved. // import Foundation import IOKit import IOKit.hid /** Makes working with USB HID Multiaxis Devices easier (specifically geared toward using the 3DConnexion Space Mouse). Tested with 3Dconnexion Space Mouse. Possible alternative: https://p3america.com/spacemouse-module-usb/ TODO: This will probably affect all views that use it; it really should just affect the frontmost. */ class MultiAxisDevice : ObservableObject { static let shared = MultiAxisDevice() enum Mode { case camera // Spacemouse controls camera case model // Spacemouse controls scene } private init() { self.hidManager = HIDManager.shared self.hidManager.delegate = self } let hidManager : HIDManager var state = MultiAxisState() } extension MultiAxisDevice : HIDManagerDelegate { func deviceValueReceived(device inDevice: HIDDevice, usagePage inPage: UInt32, usage inUsage: UInt32, value inValue: IOHIDValue) { // debugLog("Value callback. element: [\(inElement)], usage: \(inUsage), value: \(inValue)") if inPage == HIDManager.UsagePage.genericDesktop.rawValue { let usage = HIDManager.GenericDesktopUsage(rawValue: inUsage) ?? .undefined let value = inValue.scaledValueCalibrated var state = self.state // The 3Dconnexion Space Mouse has axes X left-right, Y front-back, and Z up-down. switch (usage) { case .rX: state.pitch = Float(value) case .rY: state.roll = Float(value) case .rZ: state.yaw = Float(value) case .x: state.x = Float(value) case .y: state.z = Float(value) case .z: state.y = Float(value) default: break } self.state = state // debugLog("3D: \(state.pitch, specifier: "%7.1f"), \(state.yaw, specifier: "%7.1f"), \(state.roll, specifier: "%7.1f")") // TODO: Really change to float here? } else if inPage == HIDManager.UsagePage.button.rawValue { } } } struct MultiAxisState { var pitch : Float = 0 var yaw : Float = 0 var roll : Float = 0 var x : Float = 0 var y : Float = 0 var z : Float = 0 } /* 3Dconnexion SpaceMouse Compact dump from USB Prober.app: Device Descriptor Descriptor Version Number: 0x0200 Device Class: 0 (Composite) Device Subclass: 0 Device Protocol: 0 Device MaxPacketSize: 8 Device VendorID/ProductID: 0x256F/0xC635 (unknown vendor) Device Version Number: 0x0437 Number of Configurations: 1 Manufacturer String: 1 "3Dconnexion" Product String: 2 "SpaceMouse Compact" Serial Number String: 0 (none) Usage Page (Generic Desktop) Usage (8 (0x8)) Collection (Application) Collection (Physical) ReportID................ (1) Logical Minimum......... (65186) Logical Maximum......... (350) Physical Minimum........ (64136) Physical Maximum........ (1400) Unit Exponent........... (12) Unit.................... (17) Usage (X) Usage (Y) Usage (Z) Report Size............. (16) Report Count............ (3) Input................... (Data, Variable, Relative, No Wrap, Linear, Preferred State, No Null Position, Bitfield) End Collection Collection (Physical) ReportID................ (2) Usage (Rx) Usage (Ry) Usage (Rz) Report Size............. (16) Report Count............ (3) Input................... (Data, Variable, Relative, No Wrap, Linear, Preferred State, No Null Position, Bitfield) End Collection Collection (Logical) ReportID................ (3) Usage Page (Generic Desktop) Usage Page (Button) Usage Minimum........... (1) Usage Maximum........... (2) Logical Minimum......... (0) Logical Maximum......... (1) Physical Minimum........ (0) Physical Maximum........ (1) Report Size............. (1) Report Count............ (2) Input................... (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) Report Count............ (14) Input................... (Constant, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) End Collection Collection (Logical) ReportID................ (4) Usage Page (LED) Usage 75 (0x4b) Logical Minimum......... (0) Logical Maximum......... (1) Report Count............ (1) Report Size............. (1) Output.................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) Report Count............ (1) Report Size............. (7) Output.................. (Constant, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Usage Page (Vendor defined 0) Usage 1 (0x1) Collection (Logical) Logical Minimum......... (-128) Logical Maximum......... (127) Report Size............. (8) Usage 58 (0x3a) Collection (Logical) ReportID................ (5) Usage 32 (0x20) Report Count............ (1) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (6) Usage 33 (0x21) Report Count............ (1) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (7) Usage 34 (0x22) Report Count............ (1) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (8) Usage 35 (0x23) Report Count............ (7) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (9) Usage 36 (0x24) Report Count............ (7) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (10) Usage 37 (0x25) Report Count............ (7) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (11) Usage 38 (0x26) Report Count............ (1) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (19) Usage 46 (0x2e) Report Count............ (1) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (25) Usage 49 (0x31) Report Count............ (4) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection Collection (Logical) ReportID................ (26) Usage 50 (0x32) Report Count............ (7) Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) End Collection End Collection End Collection */
[ -1 ]
de94b82bb77de9505a92751ca349150b0a09bc48
934ebbb93095da28b322ed6e2772b0ce2cb1852d
/Wemotely/Controllers/JobsTableViewController+TableView.swift
9d17058ec68c4654d0e1e171b8cbd9164d1460b5
[ "Apache-2.0" ]
permissive
ChuckJHardy/Wemotely
75a9b396558767f2279ce3370471ea50fb7d491e
192c9c23cd538c9ff8bc7643ddac05f4d96d87fd
refs/heads/master
2021-05-04T12:40:50.847655
2018-04-23T06:44:25
2018-04-23T06:44:25
120,298,240
0
0
Apache-2.0
2018-04-22T18:00:34
2018-02-05T11:52:43
Swift
UTF-8
Swift
false
false
3,965
swift
import UIKit extension JobsTableViewController { override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if let jobs = jobs { return jobs.count } else { return 0 } } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { var identifier = JobsTableViewCell.identifier.withAccount if row?.accountUUID != nil { identifier = JobsTableViewCell.identifier.withoutAccount } let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath) if let jobCell = cell as? JobsTableViewCell { if let jobs = jobs { jobCell.setup(job: jobs[indexPath.row]) } return jobCell } return cell } override func tableView( _ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath ) { selectCellForVisibleJob(cell: cell, indexPath: indexPath) } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { deselectPreviouslySelectedCell() if let jobs = jobs { Job.markAsRead(provider: realmProvider, job: jobs[indexPath.row]) didEdit = true } } override func tableView( _ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath ) -> UISwipeActionsConfiguration? { var job: Job! var title: String = "Favourite" if let jobs = self.jobs { job = jobs[indexPath.row] title = job.favourite ? "Unfavourite" : title // swiftlint:disable:next line_length let action = UIContextualAction(style: .normal, title: title) { (_ context: UIContextualAction, _ view: UIView, success: (Bool) -> Void) in do { try realmProvider.write { job.favourite = !job.favourite job.trash = false self.didEdit = true } tableView.deleteRows(at: [indexPath], with: .fade) } catch let err { logger.error("Job failed to favourite", err) success(false) } success(true) } action.backgroundColor = UIColor.CustomColor.Apple.Blue return UISwipeActionsConfiguration(actions: [action]) } return UISwipeActionsConfiguration(actions: []) } override func tableView( _ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath ) -> UISwipeActionsConfiguration? { var job: Job! var title: String = "Delete" if let jobs = self.jobs { job = jobs[indexPath.row] title = job.trash ? "Undelete" : title // swiftlint:disable:next line_length let action = UIContextualAction(style: .destructive, title: title) { (_ context: UIContextualAction, _ view: UIView, success: (Bool) -> Void) in do { try realmProvider.write { job.trash = !job.trash job.favourite = false self.didEdit = true } tableView.deleteRows(at: [indexPath], with: .fade) } catch let err { logger.error("Job failed to delete", err) success(false) } success(true) } return UISwipeActionsConfiguration(actions: [action]) } return UISwipeActionsConfiguration(actions: []) } }
[ -1 ]
f2d1104612a946664dc50710f2ecdafdb40dd8bc
4185c18011a352a43822134c6e450c3cbdfd0551
/MUJ Buddy/Models/AttendanceModel.swift
13c63be75608625f67d200260485db8896a3e8dc
[]
no_license
black-dragon74/MUJ-Buddy
9f7ea087b616005efe015bce2882f48c76f8e46f
e86daf46c092a69c923fa7c8562fcbe6b1e9cba6
refs/heads/master
2021-09-24T05:08:22.053115
2021-03-14T21:16:49
2021-03-14T21:16:49
166,586,153
0
0
null
null
null
null
UTF-8
Swift
false
false
434
swift
// // AttendanceModel.swift // Test // // Created by Nick on 1/22/19. // Copyright © 2019 Nick. All rights reserved. // import UIKit // Instantiate as an array struct AttendanceModel: Codable { let section: String let present: String let absent: String let total: String let status: String let course: String let percentage: String let type: String let batch: String let index: String }
[ -1 ]
b49ffd461d44497626bc671b373be2b6bc90bd2e
33cd46e890362a9c396248edb59e0c519ca04c46
/Tests/TimeTests.swift
f5cdcf2716d31d89ceb9d00edfd1fb4456f6d4fa
[ "MIT" ]
permissive
supercomputra/adhan-swift
c28e4ced2b72bc6328a4456db58c5f8179c95747
4db4ffaaecb85887991981324b903c1dabb201b1
refs/heads/main
2023-04-02T02:42:10.003120
2021-04-13T02:44:40
2021-04-13T02:44:40
358,595,606
1
0
MIT
2021-04-16T12:42:06
2021-04-16T12:42:05
null
UTF-8
Swift
false
false
9,428
swift
// // TimeTests.swift // Adhan // // Created by Ameir Al-Zoubi on 4/2/16. // Copyright © 2016 Batoul Apps. All rights reserved. // import XCTest @testable import Adhan class TimeTests: XCTestCase { func parseParams(_ data: NSDictionary) -> CalculationParameters { var params: CalculationParameters! let method = data["method"] as! String if method == "MuslimWorldLeague" { params = CalculationMethod.muslimWorldLeague.params } else if method == "Egyptian" { params = CalculationMethod.egyptian.params } else if method == "Karachi" { params = CalculationMethod.karachi.params } else if method == "UmmAlQura" { params = CalculationMethod.ummAlQura.params } else if method == "Dubai" { params = CalculationMethod.dubai.params } else if method == "MoonsightingCommittee" { params = CalculationMethod.moonsightingCommittee.params } else if method == "NorthAmerica" { params = CalculationMethod.northAmerica.params } else if method == "Kuwait" { params = CalculationMethod.kuwait.params } else if method == "Qatar" { params = CalculationMethod.qatar.params } else if method == "Tehran" { params = CalculationMethod.tehran.params } else if method == "Singapore" { params = CalculationMethod.singapore.params } else if method == "Turkey" { params = CalculationMethod.turkey.params } else { params = CalculationMethod.other.params } let madhab = data["madhab"] as! String if madhab == "Shafi" { params.madhab = .shafi } else if madhab == "Hanafi" { params.madhab = .hanafi } let highLatRule = data["highLatitudeRule"] as! String if highLatRule == "SeventhOfTheNight" { params.highLatitudeRule = .seventhOfTheNight } else if highLatRule == "TwilightAngle" { params.highLatitudeRule = .twilightAngle } else { params.highLatitudeRule = .middleOfTheNight } return params } func testTimes() { #if os(Linux) let fileManager = FileManager.default let currentDir = URL(fileURLWithPath: fileManager.currentDirectoryPath) let fixtureDir = currentDir.appendingPathComponent("Shared/Times") let paths = try! fileManager.contentsOfDirectory(at: fixtureDir, includingPropertiesForKeys: nil) .filter { $0.pathExtension == "json" } #else let bundle = Bundle(for: type(of: self)) let paths = bundle.paths(forResourcesOfType: "json", inDirectory: "Times") .compactMap(URL.init(fileURLWithPath:)) #endif for path in paths { let filename = path.lastPathComponent var output = "################\nTime Test Output\n" let data = try? Data(contentsOf: path) let json = try! JSONSerialization.jsonObject(with: data!, options: .allowFragments) as! NSDictionary let params = json["params"] as! NSDictionary let lat = params["latitude"] as! NSNumber let lon = params["longitude"] as! NSNumber let zone = params["timezone"] as! String let timezone = TimeZone(identifier: zone)! let coordinates = Coordinates(latitude: lat.doubleValue, longitude: lon.doubleValue) let calculationParameters = parseParams(params) var cal = Calendar(identifier: Calendar.Identifier.gregorian) cal.timeZone = TimeZone(identifier: "UTC")! let dateFormatter = DateFormatter() dateFormatter.dateFormat = "YYYY-MM-dd" dateFormatter.timeZone = TimeZone(identifier: "UTC")! let timeFormatter = DateFormatter() timeFormatter.dateFormat = "h:mm a" timeFormatter.timeZone = timezone let dateTimeFormatter = DateFormatter() dateTimeFormatter.dateFormat = "YYYY-MM-dd h:mm a" dateTimeFormatter.timeZone = timezone let variance = json["variance"] as? Double ?? 0 let times = json["times"] as! [NSDictionary] output += "Times for \(filename) - \(params["method"]!)\n" print("\(params["method"]!) Testing \(path.lastPathComponent) (\(times.count) days)") var totalDiff = 0.0 var totalFajrVariance = 0.0 var totalSunriseVariance = 0.0 var totalDhuhrVariance = 0.0 var totalAsrVariance = 0.0 var totalMaghribVariance = 0.0 var totalIshaVariance = 0.0 var maxDiff = 0.0 for time in times { let date = dateFormatter.date(from: time["date"] as! String)! let components = (cal as NSCalendar).components([.year, .month, .day], from: date) let prayerTimes = PrayerTimes(coordinates: coordinates, date: components, calculationParameters: calculationParameters)! let fajrDiff = prayerTimes.fajr.timeIntervalSince(dateTimeFormatter.date(from: "\(time["date"]!) \(time["fajr"]!)")!)/60 let sunriseDiff = prayerTimes.sunrise.timeIntervalSince(dateTimeFormatter.date(from: "\(time["date"]!) \(time["sunrise"]!)")!)/60 let dhuhrDiff = prayerTimes.dhuhr.timeIntervalSince(dateTimeFormatter.date(from: "\(time["date"]!) \(time["dhuhr"]!)")!)/60 let asrDiff = prayerTimes.asr.timeIntervalSince(dateTimeFormatter.date(from: "\(time["date"]!) \(time["asr"]!)")!)/60 let maghribDiff = prayerTimes.maghrib.timeIntervalSince(dateTimeFormatter.date(from: "\(time["date"]!) \(time["maghrib"]!)")!)/60 let ishaDiff = prayerTimes.isha.timeIntervalSince(dateTimeFormatter.date(from: "\(time["date"]!) \(time["isha"]!)")!)/60 XCTAssertLessThanOrEqual(fabs(fajrDiff), variance, "Fajr variance larger than accepted value of \(variance)") XCTAssertLessThanOrEqual(fabs(sunriseDiff), variance, "Sunrise variance larger than accepted value of \(variance)") XCTAssertLessThanOrEqual(fabs(dhuhrDiff), variance, "Dhuhr variance larger than accepted value of \(variance)") XCTAssertLessThanOrEqual(fabs(asrDiff), variance, "Asr variance larger than accepted value of \(variance)") XCTAssertLessThanOrEqual(fabs(maghribDiff), variance, "Maghrib variance larger than accepted value of \(variance)") XCTAssertLessThanOrEqual(fabs(ishaDiff), variance, "Isha variance larger than accepted value of \(variance)") totalFajrVariance += fajrDiff totalSunriseVariance += sunriseDiff totalDhuhrVariance += dhuhrDiff totalAsrVariance += asrDiff totalMaghribVariance += maghribDiff totalIshaVariance += ishaDiff totalDiff += fabs(fajrDiff) totalDiff += fabs(sunriseDiff) totalDiff += fabs(dhuhrDiff) totalDiff += fabs(asrDiff) totalDiff += fabs(maghribDiff) totalDiff += fabs(ishaDiff) maxDiff = max(fabs(fajrDiff), fabs(sunriseDiff), fabs(dhuhrDiff), fabs(asrDiff), fabs(maghribDiff), fabs(ishaDiff), maxDiff) output += "\(params["method"]!) \(components.year ?? 0)-\(components.month ?? 0)-\(components.day ?? 0)\n" let outputValues: [(Date, String, Double)] = [ (prayerTimes.fajr, "fajr", fajrDiff), (prayerTimes.sunrise, "sunrise", sunriseDiff), (prayerTimes.dhuhr, "dhuhr", dhuhrDiff), (prayerTimes.asr, "asr", asrDiff), (prayerTimes.maghrib, "maghrib", maghribDiff), (prayerTimes.isha, "isha", ishaDiff) ] outputValues.forEach { let paddingLength = 10 let jsonTime = time[$0.1]! as! String output += "\(filename) \($0.1.prefix(1).capitalized): \(timeFormatter.string(from: $0.0).padding(toLength: paddingLength, withPad: " ", startingAt: 0)) JSON: \(jsonTime.padding(toLength: paddingLength, withPad: " ", startingAt: 0)) Diff: \(Int($0.2))\n" } } output += "\(filename) Average difference: \(totalDiff/Double(times.count * 6))\n" output += "\(filename) Max difference: \(maxDiff)\n" output += "\(filename) Fajr variance: \(totalFajrVariance/Double(times.count))\n" output += "\(filename) Sunrise variance: \(totalSunriseVariance/Double(times.count))\n" output += "\(filename) Dhuhr variance: \(totalDhuhrVariance/Double(times.count))\n" output += "\(filename) Asr variance: \(totalAsrVariance/Double(times.count))\n" output += "\(filename) Maghrib variance: \(totalMaghribVariance/Double(times.count))\n" output += "\(filename) Isha variance: \(totalIshaVariance/Double(times.count))\n" if maxDiff > 0 { print(output) } } } }
[ -1 ]
7766db0b54628f2b3c3584c5ffcf972a1a672150
6ae7f8486f8d3f8c039f753c2a76624bbb57bc66
/DocumentenScanner/Store/DTO/UserInfoDTO.swift
7a193c54c728b7fa37e425a9bc57b2c1648940c1
[]
no_license
SteinerHannes/DokumentenScanner
7f93c7dc3bac525ac5e0f56b5aec9d4f4edc0d78
b9e065d9c69915d3caceb83447039a6472a5b073
refs/heads/master
2023-01-24T08:14:27.008160
2020-12-10T09:23:24
2020-12-10T09:23:24
242,823,565
2
0
null
null
null
null
UTF-8
Swift
false
false
275
swift
// // UserInfoDTO.swift // DocumentenScanner // // Created by Hannes Steiner on 02.04.20. // Copyright © 2020 Hannes Steiner. All rights reserved. // import Foundation public struct UserInfoDTO: Codable { public let email: String public let username: String }
[ -1 ]
b7f633a0d8c06334168a651f8d01eed1f6160b3f
ea1c3794ee4debb55ef2ad7ab52af8123d095b9d
/Sources/Baraba.swift
a24057d3f91b224352a11cbdfb8c2bf6b4390264
[ "MIT" ]
permissive
MobilyteApps/AR_FaceDetection_Sample
7e673c16844ddcd4772cd4d71be279a1ce097a9d
a87dfee44479be7934b9f2d627ed7d7cf34b8e06
refs/heads/main
2023-02-27T19:17:19.602987
2021-02-04T20:10:55
2021-02-04T20:10:55
329,736,492
0
0
null
null
null
null
UTF-8
Swift
false
false
10,769
swift
// // Baraba.swift // // Copyright (c) 2020 Infostride // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // import UIKit import QuartzCore import os /** The main object that you use to add auto-scrolling to a scroll view. */ public class Baraba: NSObject { /** Returns a boolean value indicating whether a given configuration is supported by the device. */ public static func isConfigurationSupported(_ configuration: BarabaConfiguration) -> Bool { return type(of: configuration.tracker).isSupported } /** The scroll view that will be auto-scrolled when user is looking at the device. */ public weak var scrollView: UIScrollView? { didSet { if let scrollView = scrollView { addScrollViewObservers(scrollView) } else { removeScrollViewObservers() } } } /** The delegate for the Baraba object. */ public weak var delegate: BarabaDelegate? /** The duration of pause after user finishes dragging the scroll view. Default value is `2.0` seconds. After this amount of duration, auto-scrolling resumes. */ public var pauseDuration: TimeInterval { set { _pauseDuration = newValue suspendDebouncer = Debouncer(delay: _pauseDuration) } get { _pauseDuration } } /** The preferred speed for auto-scrolling the scroll view, represented in points per second. The actual speed chosen is the nearest multiple of `60`. For example, if you set this value to `140`, the actual speed will be `120` as it is closer to `120` than `180`. Check the `actualScrollSpeed` property. Default value is `180`. The minimum is `60`. */ public var preferredScrollSpeed: Int = 180 { didSet { _speed = preferredScrollSpeed } } /** The actual scroll speed, represented in points per second. If you want to change the scroll speed, set the value to `preferredScrollSpeed`. It will be rounded to the nearest multiple of 60, which is the actual scroll speed. Default value is `180`. */ public var actualScrollSpeed: Int { _speed } /** A Boolean value that indicates whether this Baraba object is active and tracking user's face. This is a read-only property. If you want to make Baraba active, call `resume()` on the receiver. */ public private(set) var isActive: Bool = false /** A Boolean value that indicates whether the scroll view is being auto-scrolled. Read-only. */ public var isScrolling: Bool { displayLink?.isPaused == false } /** Starts the tracking of user's face for auto-scrolling. If the object fails to resume, `func baraba(_ baraba: Baraba, didFailWithError error: Error)` will be called on the delegate. */ public func resume() { if isActive { Log.info("resume() called on an already running object, which has no effect.") return } if scrollView == nil { Log.error("Failed to resume. Its scrollView property is nil. Please designate a scrollView before calling resume()") return } if type(of: tracker).isSupported == false { Log.default("Failed to resume (BarabaError.unsupportedConfiguration). Implement BarabaDelegate's 'func baraba(_:, didFailWithError:)' to add fallback.") delegate?.baraba(self, didFailWithError: BarabaError.unsupportedConfiguration) return } if type(of: tracker).isHardwareDenied { Log.default("Failed to resume (BarabaError.cameraUnauthorized). Implement BarabaDelegate's 'func baraba(_:, didFailWithError:)' to add fallback.") delegate?.baraba(self, didFailWithError: BarabaError.cameraUnauthorized) return } Log.info("Resumed") setupDisplayLink() isActive = true tracker.resume() } /** Pauses the tracking of user's face. Call this method when you no longer need to track user's face. For example, inside `func viewWillDisappear(_ animated:)` of a view controller. */ public func pause() { if isActive { Log.info("Paused") isActive = false isSuspended = false isFacing = false invalidateDisplayLink() tracker.pause() } } /** Creates a new Baraba object with the specified configuration. Before initializing, you can check if the device supports the configuration by looking at `isSupported` property of a configuration object. Using an unsupported configuration will invoke `func baraba(_ baraba: Baraba, didFailWithError error: Error)` call to the delegate. - Parameters: - configuration: A configuration object that specifies which feature to use to track user's face. */ public init(configuration: BarabaConfiguration) { tracker = configuration.tracker workQueue = DispatchQueue(label: "\(Constant.bundleIdentifier).queue", qos: .userInitiated, autoreleaseFrequency: .workItem) suspendDebouncer = Debouncer(delay: 0) super.init() suspendDebouncer = Debouncer(delay: _pauseDuration) tracker.delegate = self } @objc internal func scroll(displayLink: CADisplayLink) { guard let scrollView = scrollView else { Log.error("Pausing because scrollView is nil. Please designate a scrollView before calling resume()") pause() return } guard shouldScroll == true else { return } let actualFramesPerSecond = 1 / (displayLink.targetTimestamp - displayLink.timestamp) let scrollOffset = round(max((Double(_speed) / actualFramesPerSecond), 1)) let target = CGPoint(x: 0, y: scrollView.contentOffset.y + CGFloat(scrollOffset)) if target.y + scrollView.bounds.height <= scrollView.contentSize.height + scrollView.adjustedContentInset.bottom { scrollView.contentOffset = target } } private func addScrollViewObservers(_ scrollView: UIScrollView) { contentOffsetObservation = scrollView.observe(\.contentOffset, options: [.new, .old], changeHandler: observeContentOffset(_:_:)) } private func removeScrollViewObservers() { contentOffsetObservation = nil } private func observeContentOffset(_ scrollView: UIScrollView, _ change: NSKeyValueObservedChange<CGPoint>) { if scrollView.isDragging, isActive { if isSuspended == false { isSuspended = true } suspendDebouncer.schedule { self.resumeScroll() } } } private func resumeScroll() { if scrollView?.isDragging == false { isSuspended = false } else { suspendDebouncer.schedule { self.resumeScroll() } } } private func setupDisplayLink() { let displayLink = CADisplayLink(target: self, selector: #selector(scroll)) displayLink.add(to: .main, forMode: .default) displayLink.isPaused = true self.displayLink = displayLink } private func invalidateDisplayLink() { displayLink?.invalidate() } private func evaluate() { guard let displayLink = displayLink, isActive else { return } if shouldScroll == true && displayLink.isPaused == true { displayLink.isPaused = false Log.debug("Did start scrolling") DispatchQueue.main.async { self.delegate?.barabaDidStartScrolling(self) } } else if shouldScroll == false && displayLink.isPaused == false { displayLink.isPaused = true Log.debug("Did stop scrolling") DispatchQueue.main.async { self.delegate?.barabaDidStopScrolling(self) } } } private var shouldScroll: Bool { return isFacing && isActive && isSuspended == false } private var isFacing: Bool = false { didSet { workQueue.async { self.evaluate() } } } private var isSuspended: Bool = false { didSet { workQueue.async { self.evaluate() } } } @Multiple(multiplier: 60) private var _speed: Int = 180 @Minimum(min: 0) private var _pauseDuration: Double = 2.0 private weak var displayLink: CADisplayLink? private var contentOffsetObservation: NSKeyValueObservation? private var suspendDebouncer: Debouncer private let tracker: FaceTracker private let workQueue: DispatchQueue } extension Baraba: FaceTrackerDelegate { internal func trackerDidStartTrackingFace(_ tracker: FaceTracker) { isFacing = true } internal func trackerDidEndTrackingFace(_ tracker: FaceTracker) { isFacing = false } internal func trackerWasInterrupted(_ tracker: FaceTracker) { Log.info("Interrupted") isSuspended = true } internal func trackerInterruptionEnded(_ tracker: FaceTracker) { Log.info("Interruption Ended") isSuspended = false } internal func tracker(_ tracker: FaceTracker, didFailWithError error: Error) { pause() delegate?.baraba(self, didFailWithError: BarabaError.cameraFailed(error)) } }
[ -1 ]
ce25e7daeb63394268a3b179a5ae521382f31f21
d439a95c18c503bc47b418d78094b97bcfd895cc
/validation-test/compiler_crashers_fixed/01302-resolvetypedecl.swift
100a5e112ae2e1447720dd9569262cb52d4e0270
[ "Apache-2.0", "Swift-exception" ]
permissive
DougGregor/swift
7e40d5a1b672e6fca9b28130ef8ac0ce601cf650
16b686989c12bb1acf9d1a490c1f301d71428f47
refs/heads/master
2023-08-05T05:11:53.545515
2016-07-06T18:23:34
2016-07-06T18:23:34
50,400,732
14
2
Apache-2.0
2023-08-23T05:19:32
2016-01-26T03:34:10
C++
UTF-8
Swift
false
false
617
swift
// This source file is part of the Swift.org open source project // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // RUN: not %target-swift-frontend %s -parse struct c { var d: b.Type func e() { } } class a<f : b, g : b where f.d == g> { } protocol b { } struct c<h : b> : b { } func ^(a: Boolean, Bool) -> Bool { } class a { } protocol a { } class b<h : c, i : c where h.g == i> : a
[ 75012, 75196, 75253, 91643, 91645, 91646, 91647, 91648, 91649, 91651, 75267, 91653, 91656, 91657, 91659, 91661, 91669, 91670, 91671, 91674, 91675, 91678, 91679, 91682, 91684, 75301, 91688, 91695, 91702, 91703, 91704, 91705, 91706, 91707, 91708, 91716, 75335, 91720, 91725, 91728, 91729, 91733, 91735, 91738, 91740, 91742, 91744, 91755, 91757, 91763, 75381, 91766, 91769, 91779, 91782, 91784, 91785, 91794, 91799, 91802, 91803, 75420, 91811, 91814, 91815, 91816, 91817, 91818, 91820, 91822, 91823, 91827, 91828, 91829, 91832, 91833, 91834, 91835, 91838, 91840, 91847, 91852, 91853, 91859, 91861, 91864, 91868, 91869, 91870, 91873, 91874, 91876, 91880, 91881, 91883, 91884, 91886, 91896, 91898, 91899, 91901, 91902, 91905, 91906, 91907, 91908, 91912, 91914, 91915, 91916, 91918, 91919, 91920, 91924, 91930, 91931, 91932, 91937, 91942, 91943, 91944, 75560, 91946, 91948, 91949, 91951, 91959, 91962, 91964, 91965, 91966, 91967, 91968, 91970, 91971, 91973, 91974, 91975, 91976, 91978, 91982, 91987, 91989, 91993, 91997, 91999, 92004, 92008, 92010, 92011, 92013, 92014, 92018, 92021, 92023, 92025, 92026, 92027, 92028, 92032, 92035, 92037, 92038, 92040, 92044, 92047, 92048, 92051, 92053, 92055, 92060, 92062, 92063, 92064, 92065, 75681, 92068, 92070, 92071, 92072, 92074, 92077, 92082, 92083, 92085, 92091, 92096, 92100, 92102, 92108, 92109, 92115, 92123, 92124, 92126, 92128, 92129, 92131, 92134, 92146, 92147, 92149, 92152, 92154, 92155, 92158, 92159, 92160, 92164, 92165, 92166, 92170, 75786, 92172, 92177, 92179, 92180, 92187, 92189, 92192, 92196, 92199, 92200, 92201, 92203, 92204, 75820, 92207, 92211, 92212, 92213, 75828, 92220, 92221, 92223, 92227, 92228, 92229, 75843, 92237, 92238, 92239, 92241, 92244, 92245, 92247, 92258, 92259, 92261, 75880, 92265, 92267, 92270, 75887, 92272, 92278, 92280, 92285, 92292, 92295, 92297, 92298, 92300, 92302, 92303, 92313, 92315, 92318, 92321, 92330, 92332, 92335, 92340, 92341, 92342, 92344, 92350, 92352, 92355, 92356, 92364, 92368, 92371, 92372, 92373, 92376, 92377, 92379, 75996, 92386, 92387, 92388, 92390, 92391, 92393, 76009, 92397, 76015, 76016, 92401, 92405, 76026, 92414, 92417, 92419, 92422, 92423, 92425, 92428, 92429, 92430, 92431, 92433, 76049, 92437, 92440, 92441, 92450, 92451, 92452, 92453, 92455, 92456, 92460, 92461, 92463, 92464, 92465, 92467, 92468, 92476, 92483, 92484, 92488, 92494, 76116, 92505, 92510, 92517, 92519, 92521, 92522, 92524, 92527, 92529, 92531, 92537, 92538, 92542, 92543, 92547, 92553, 92554, 92560, 92566, 92570, 92572, 92573, 92576, 92579, 92582, 92583, 92585, 92587, 92594, 92596, 92598, 92599, 92602, 92603, 76218, 92605, 76219, 92607, 92610, 92617, 92619, 92620, 92621, 92623, 92624, 92626, 92628, 92630, 92633, 92637, 92641, 92644, 92647, 92648, 92650, 92652, 92653, 92654, 92655, 92656, 92664, 92666, 92667, 92668, 92670, 92671, 92675, 92676, 92677, 92678, 92681, 92682, 92685, 92688, 92689, 92693, 92694, 92695, 92698, 92705, 92711, 92717, 92719, 76335, 92726, 92727, 92729, 92730, 92731, 92734, 92743, 92748, 92749, 92752, 92753, 92755, 92758, 92760, 92761, 92767, 92769, 92770, 92774, 92775, 92782, 92784, 92787, 92788, 92789, 92790, 76403, 92795, 92796, 92798, 92800, 92803, 92804, 92805, 92806, 92807, 92809, 92810, 92818, 92820, 92821, 92822, 92823, 92827, 92828, 76448, 92836, 92837, 92839, 92841, 92844, 92847, 92849, 92850, 92851, 92853, 92854, 92856, 92857, 92858, 92860, 92863, 92864, 92866, 92869, 92872, 92880, 92881, 92883, 92884, 92886, 76506, 92893, 92894, 92896, 92897, 92898, 92902, 92903, 92904, 92905, 92906, 92908, 76525, 76526, 76528, 92913, 92927, 92928, 92929, 92930, 92932, 92933, 92935, 92937, 92938, 92940, 92941, 76563, 92950, 92952, 92953, 92954, 76576, 92962, 92969, 92971, 92973, 92974, 76596, 92982, 92984, 92989, 92993, 92994, 92995, 92997, 92998, 93000, 93004, 93007, 93016, 93017, 93019, 93020, 76637, 93022, 93023, 93024, 93031, 93033, 93035, 93037, 93038, 93039, 76653, 93045, 93047, 93048, 93049, 93053, 93057, 93058, 93061, 93065, 93067, 93069, 93070, 93072, 93074, 93075, 76692, 93080, 93082, 93088, 93089, 93092, 93094, 93095, 93096, 93097, 93099, 93100, 93103, 76721, 93106, 93108, 93110, 93112, 93114, 93117, 93118, 93120, 93121, 93122, 93124, 76744, 93131, 93133, 93134, 93141, 93142, 93144, 93148, 93149, 93150, 93151, 93153, 93154, 93155, 93162, 93164, 93165, 93167, 93168, 93170, 93175, 93176, 93189, 93190, 93192, 93193, 93195, 93197, 93201, 93202, 93203, 93205, 93207, 93211, 93213, 93216, 93217, 93218, 93220, 93223, 93229, 93230, 93232, 93235, 93236, 93237, 93238, 93243, 93245, 93250, 93252, 93254, 93261, 93268, 93269, 93270, 93271, 76885, 93273, 93275, 93277, 93279, 93280, 93282, 93284, 93289, 93290, 93291, 93292, 93295, 93296, 93298, 93299, 93303, 93307, 93311, 93313, 93319, 93321, 93322, 93325, 93326, 93332, 93334, 93335, 93340, 93347, 93350, 93352, 93353, 93355, 93356, 93357, 93358, 93359, 93360, 93363, 93364, 93365, 93368, 93371, 93372, 93376, 93378, 93382, 93387, 93391, 93392, 77008, 93394, 93400, 93402, 93403, 93404, 93405, 93407, 93409, 93411, 93416, 93420, 93424, 93428, 93429, 93432, 93433, 93442, 93444, 93446, 93451, 93452, 77068, 93454, 93456, 93463, 93464, 93466, 93468, 93472, 93473, 93475, 93478, 93479, 93484, 93485, 93488, 93491, 93495, 93500, 93503, 93505, 93510, 93513, 93516, 93519, 93522, 93525, 93527, 93528, 93531, 93536, 93539, 93542, 93544, 93550, 93551, 93552, 93553, 93557, 93559, 93560, 93564, 93565, 93567, 93569, 93573, 93575, 93577, 93579, 93580, 93581, 93582, 93583, 93584, 93588, 77213, 93600, 93602, 93603, 93609, 93610, 93612, 93613, 93614, 93615, 93623, 93624, 93627, 93629, 93630, 93632, 93634, 93642, 93649, 93654, 93655, 93658, 93661, 93665, 93671, 93672, 93673, 93675, 93678, 93679, 93682, 93684, 93689, 93694, 93699, 93700, 93702, 93708, 93709, 93711, 93716, 93717, 93718, 93720, 93723, 93724, 93730, 93731, 93733, 93734, 93735, 93737, 93739, 93740, 93744, 93745, 93747, 93757, 93759, 93761, 93762, 93764, 93770, 93772, 93774, 93777, 93778, 93781, 93782, 93783, 93785, 93787, 93789, 93790, 93793, 93799, 77429, 93815, 93816, 93818, 93823, 93825, 93826, 93827, 93828, 93829, 77445, 93833, 93835, 93838, 93841, 77460, 93846, 93848, 93850, 93851, 93853, 93854, 93856, 93861, 93865, 93866, 93869, 93870, 93872, 93873, 93882, 93887, 93892, 93897, 93898, 93900, 93902, 93904, 93905, 93906, 93907, 93908, 77525, 93910, 77529, 93915, 93919, 93921, 93923, 93928, 93930, 93931, 93932, 93936, 93937, 93943, 93944, 93945, 93947, 93951, 93953, 93957, 93961, 93962, 93963, 93964, 93965, 93967, 93968, 93971, 93973, 93975, 93976, 93980, 93981, 93982, 93983, 77598, 93989, 93991, 93992, 93993, 93995, 93996, 94000, 94001, 94002, 94006, 94007, 94008, 94012, 94014, 94016, 94018, 94019, 94021, 94022, 94023, 94025, 94026, 94031, 94033, 94036, 94037, 94039, 94042, 94044, 94047, 94052, 94053, 94054, 94060, 94061, 94063, 94064, 94071, 94072, 94073, 94077, 94078, 94080, 94082, 94084, 94085, 94086, 94089, 94090, 77706, 94092, 94094, 94095, 94096, 94097, 94099, 94100, 94101, 94103, 94104, 94107, 94109, 94110, 94111, 94112, 94114, 94121, 94123, 94124, 94127, 94128, 94130, 94132, 94139, 94142, 94148, 94149, 94151, 94156, 94158, 94160, 94162, 94163, 94164, 94166, 94170, 94175, 94179, 94183, 94184, 94185, 94189, 94192, 94199, 94201, 94203, 94207, 94209, 94212, 94214, 94215, 94221, 94224, 94230, 94231, 94233, 94234, 94236, 94237, 94238, 94242, 94248, 94249, 77866, 94253, 94259, 94262, 94263, 94264, 94270, 94271, 94272, 77890, 94280, 94282, 94285, 94286, 94298, 94300, 94301, 94302, 94304, 94308, 94309, 94310, 94313, 94316, 77936, 94322, 94323, 94326, 94328, 94330, 94332, 94337, 94338, 94344, 94349, 94352, 94356, 94360, 94362, 94363, 94364, 94367, 94372, 94375, 94378, 94379, 77996, 94384, 94389, 94390, 94391, 94395, 94397, 94399, 94401, 94409, 94412, 94413, 94414, 94416, 94417, 94420, 94421, 94422, 94423, 94426, 94427, 94428, 94430, 94431, 94433, 94434, 94435, 94436, 94439, 94440, 94441, 78059, 94448, 94451, 94453, 94458, 94461, 94462, 78082, 94467, 78083, 94471, 94472, 94476, 94479, 78095, 94481, 94484, 94485, 94487, 94495, 94498, 94499, 94501, 94504, 94505, 94506, 94509, 94510, 94512, 94514, 94515, 94517, 94520, 94524, 78140, 78145, 78146, 94531, 94532, 94534, 94536, 94537, 78154, 94539, 94540, 94544, 94547, 94548, 94549, 94553, 94554, 94555, 94557, 94558, 94559, 94560, 94561, 94565, 94566, 94567, 94568, 94570, 94573, 94575, 94581, 94583, 94586, 94593, 94595, 94596, 94598, 94600, 94601, 94603, 94609, 94610, 94612, 94616, 94618, 94623, 94629, 94630, 94632, 94633, 94634, 94638, 94640, 94641, 94642, 94644, 94646, 94647, 94649, 94650, 94653, 94656, 94658, 94660, 94664, 94670, 94671, 94674, 94676, 94680, 94682, 94684, 94687, 94691, 94692, 94693, 94694, 94699, 94700, 94702, 94704, 94708, 94709, 78325, 94711, 94712, 94714, 94719, 94721, 94725, 94729, 94730, 78348, 94733, 94736, 94737, 94739, 94740, 78358, 94744, 94745, 94749, 94750, 94752, 94754, 94756, 94757, 94758, 94759, 94760, 94762, 94766, 94768, 94772, 94773, 94777, 94778, 94780, 94781, 94782, 94787, 94789, 94795, 94800, 94802, 94803, 94804, 94806, 94808, 94809, 94815, 94818, 94821, 94824, 94825, 94828, 94831, 94833, 78457, 94842, 94843, 94845, 94846, 78465, 94852, 94853, 94855, 94857, 94860, 94862, 94866, 94873, 94875, 94877, 94878, 94883, 94890, 94891, 94894, 94898, 94899, 94900, 94902, 94905, 94906, 94909, 94910, 94911, 94912, 94914, 94916, 94917, 94927, 94929, 94931, 94935, 94937, 94938, 94941, 94944, 94950, 94952, 78570, 94957, 94966, 94967, 94969, 94970, 94971, 94974, 94978, 94982, 94984, 94986, 94992, 94994, 94998, 94999, 95006, 95009, 95014, 95015, 95016, 95019, 95021, 95022, 95023, 95025, 95026, 95041, 95042, 95050, 95052, 95058, 95065, 95072, 95074, 95076, 95080, 95081, 95085, 95086, 95089, 95096, 95097, 95100, 95101, 95102, 95105, 78724, 95111, 95115, 95117, 95120, 95132, 95133, 95134, 95135, 78748, 95139, 95141, 95142, 95147, 95154, 95155, 95156, 95158, 95162, 95163, 95165, 95167, 95172, 95176, 95182, 95183, 95184, 95192, 95193, 95200, 95201, 95203, 95205, 95206, 95207, 95208, 95217, 95219, 95220, 95222, 95224, 95225, 95226, 95227, 95229, 95236, 95237, 95242, 95243, 95244, 95246, 78864, 95252, 95256, 95257, 95261, 95262, 95265, 95266, 95270, 95274, 95280, 95281, 95282, 95286, 95292, 95296, 95297, 95301, 95302, 95303, 95304, 95306, 95311, 95312, 95317, 95318, 78939, 95326, 95327, 95329, 95331, 95332, 95336, 95338, 78955, 95340, 95341, 95342, 95343, 78961, 95352, 95353, 95355, 95360, 95361, 95362, 95366, 95372, 95378, 95381, 95388, 95389, 95392, 95393, 95394, 95395, 95396, 79009, 95398, 95399, 95402, 95405, 95406, 95408, 95410, 95411, 95412, 95414, 95415, 95421, 95428, 95430, 95431, 95433, 95434, 95435, 79051, 95438, 95444, 95445, 95446, 95448, 95451, 95454, 95456, 95459, 95460, 95464, 95465, 95467, 95468, 95469, 95470, 95471, 95474, 95475, 95476, 95479, 95480, 79097, 95485, 95490, 95493, 95499, 95500, 95501, 95502, 95503, 95505, 95506, 95507, 95508, 95509, 95511, 95512, 95514, 95519, 95520, 95523, 95524, 95525, 95527, 95530, 95531, 95532, 95533, 95536, 95539, 95544, 95548, 95550, 95552, 95554, 95555, 79172, 95557, 95559, 95560, 95563, 79180, 95567, 95569, 95576, 95578, 95579, 95582, 95585, 95587, 95588, 95589, 95590, 95592, 95593, 79210, 95595, 79215, 95604, 95609, 95614, 95616, 95617, 95618, 95624, 79241, 95630, 95631, 95635, 95636, 95638, 95639, 95644, 95646, 95650, 95653, 95654, 95657, 95660, 95662, 95664, 95666, 95667, 95669, 95672, 95673, 95674, 95675, 95679, 95681, 95684, 95686, 95690, 95695, 95700, 95706, 95708, 95710, 95715, 95718, 95719, 79339, 95724, 95725, 95726, 95730, 95731, 95733, 95735, 95737, 95738, 95739, 79356, 95745, 95746, 95747, 95753, 95762, 95765, 95772, 95773, 95774, 95775, 95777, 95778, 95780, 95781, 95782, 95785, 95791, 95793, 95804, 95805, 95813, 95816, 95819, 95823, 95824, 95826, 95828, 95830, 95831, 95833, 95834, 95835, 95836, 95837, 95838, 95844, 95845, 95849, 95850, 95852, 95854, 95858, 95859, 95861, 95862, 95864, 95869, 95870, 95874, 95877, 95878, 95879, 95886, 95887, 95892, 95896, 95898, 95899, 79516, 95904, 79521, 95906, 95907, 95913, 95914, 95917, 95919, 95920, 95921, 95926, 95929, 95932, 95934, 95935, 95936, 95938, 95943, 95944, 95949, 95954, 95955, 95960, 95961, 95962, 95963, 95965, 79581, 95968, 95971, 95974, 95976, 95979, 95980, 95981, 95984, 79600, 95986, 95987, 95991, 79610, 95995, 95996, 96001, 96002, 96005, 96006, 79623, 96009, 96014, 96015, 96018, 96019, 96020, 96021, 96022, 96027, 96033, 96035, 96037, 96038, 96041, 96043, 96046, 96047, 96050, 96053, 96054, 96055, 96058, 96061, 96062, 79682, 96067, 96069, 96071, 96072, 96074, 96075, 96078, 96079, 96081, 96085, 96088, 96090, 96091, 96094, 96103, 96107, 96109, 96110, 96111, 96112, 96114, 96116, 96118, 96124, 96126, 96128, 96130, 96131, 96135, 79755, 96141, 96142, 96143, 96144, 96149, 96151, 96153, 96154, 96156, 96160, 96162, 96163, 96165, 96166, 96169, 96170, 79787, 96173, 96176, 96177, 96178, 96179, 96180, 96183, 96184, 96188, 96189, 96190, 96191, 96193, 96194, 96197, 96201, 96203, 79823, 96209, 96215, 96216, 96218, 96220, 96221, 96223, 96224, 96225, 96226, 96227, 96228, 96233, 96234, 96236, 96238, 96239, 96242, 96246, 96247, 96248, 96249, 96250, 96251, 96256, 96257, 79876, 96261, 96264, 96269, 96270, 96273, 96278, 96282, 96286, 96287, 96288, 96289, 96290, 96298, 96304, 96306, 96308, 96312, 96314, 96315, 96318, 96319, 96322, 96330, 96332, 96334, 96337, 96338, 96340, 96345, 96348, 96351, 96352, 79972, 96357, 96358, 96359, 79974, 96362, 96365, 96368, 96373, 96374, 96376, 96381, 96382, 96386, 96387, 96390, 96393, 96394, 96399, 96407, 96409, 96412, 96413, 96414, 96417, 96419, 96420, 96421, 96423, 96424, 96427, 96428, 96429, 96430, 96433, 96434, 96439, 96443, 96446, 96447, 96448, 96449, 96450, 96452, 96453, 96454, 96459, 96461, 96463, 80081, 96466, 96467, 96468, 96469, 96470, 96480, 96481, 96485, 96491, 96492, 96495, 96496, 80115, 96501, 96504, 80137, 96522, 96524, 96525, 96526, 80143, 96533, 96538, 96539, 96542, 96543, 80159, 96546, 96549, 96551, 96552, 80167, 96554, 96556, 96557, 96560, 96561, 96566, 96568, 96570, 96574, 96583, 96584, 96588, 96590, 96591, 96592, 96594, 96596, 96601, 96603, 96609, 96613, 96616, 96618, 96619, 96621, 96622, 96624, 96627, 96628, 80246, 96635, 96637, 96640, 96645, 96646, 96648, 96649, 96650, 96651, 96653, 96658, 96660, 96661, 96662, 96664, 96665, 96667, 96668, 96670, 96672, 96674, 96676, 96679, 80299, 96686, 96694, 96695, 96698, 80314, 96700, 96701, 96702, 96711, 96716, 96717, 96718, 96720, 96723, 96724, 96725, 80344, 96732, 96734, 96735, 96740, 96746, 96751, 96752, 96753, 96754, 96755, 96757, 96760, 96762, 80378, 96765, 96766, 96768, 96769, 96770, 96772, 96782, 96783, 96784, 96785, 96788, 96791, 96792, 80413, 96798, 96799, 96800, 96801, 96802, 96805, 96806, 96807, 96809, 96810, 80430, 96815, 96816, 96817, 96818, 96821, 96823, 96826, 96827, 96830, 80460, 80468, 80509, 80523, 80596 ]
241dc72abc0863db62e48f6c7bb64df0c4bbd9a8
f78c53f4e53b14e15f283e6c3972408be4949e53
/Chef/Chef/OrderController.swift
c96a39b60c54b92ed1ae8fa6e7b1435d9fde405d
[]
no_license
mohsinalimat/FoodDeliveryApp
0c934174cd67de6a5971817e406619292ac1f553
01c6dca0ba337bbfd6cb916243e2faf4d3fd1394
refs/heads/master
2020-06-03T21:38:14.367504
2017-09-13T05:00:38
2017-09-13T05:00:38
191,741,245
1
0
null
2019-06-13T10:22:40
2019-06-13T10:22:40
null
UTF-8
Swift
false
false
363
swift
// // OrderController.swift // Chef // // Created by Alex Sanchez on 2017-08-15. // Copyright © 2017 Alex Sanchez. All rights reserved. // import Foundation class OrderController { fileprivate let networkController: NetworkController init(networkController: NetworkController) { self.networkController = networkController } }
[ -1 ]
9e6d69055c485cab19a7b8d3ffbadd5a23214891
cfa0ed7d64b3bc3beeb4a4cfd351ed43af6c88c1
/Monitor/Operations/Monitor+rewireSwitch.swift
47a696b354e2a47352aed05ce4405120e86a4a6a
[ "0BSD" ]
permissive
bobermaniac/Monitor
0a43e9c82badb5975f545251f9eccd096de2aecc
b65ee7358c5714edd232e1d49bfd8d9b913a2166
refs/heads/master
2020-07-04T21:33:24.062170
2020-05-24T19:51:04
2020-05-24T19:51:04
202,425,243
1
2
NOASSERTION
2020-05-24T19:51:05
2019-08-14T21:00:18
Swift
UTF-8
Swift
false
false
5,703
swift
import Foundation public extension Monitor { func rewireSwitch<OutputEphemeral, OutputTerminal>( transform ephemeralTransform: @escaping Transform<Ephemeral, Monitor<OutputEphemeral, OutputTerminal>>, reduce: @escaping Reduce<OutputEphemeral, OutputEphemeral>, terminalReduce: @escaping Reduce<OutputTerminal, OutputEphemeral>, threadSafety: ThreadSafetyStrategy = CalleeSyncGuaranteed() ) -> Monitor<OutputTerminal, Terminal> { let factory = RewireSwitcherFactory(transform: ephemeralTransform, reduce: reduce, terminalReduce: terminalReduce, threadSafety: threadSafety, Terminal.self) return transform(factory: factory) } } struct RewireSwitcherFactory<InputEphemeral, InputTerminal, ReducedEphemeral, MappedTerminal>: MonitorTransformingFactory { init(transform: @escaping Transform<InputEphemeral, Monitor<ReducedEphemeral, MappedTerminal>>, reduce: @escaping Reduce<ReducedEphemeral, ReducedEphemeral>, terminalReduce: @escaping Reduce<MappedTerminal, ReducedEphemeral>, threadSafety: ThreadSafetyStrategy, _: InputTerminal.Type) { self.transform = transform self.reduce = reduce self.terminalReduce = terminalReduce self.threadSafety = threadSafety } func make(feed: Feed<MappedTerminal, InputTerminal>) -> RewireSwitch<InputEphemeral, InputTerminal, ReducedEphemeral, MappedTerminal> { return RewireSwitch(transform: transform, reduce: reduce, terminalReduce: terminalReduce, threadSafety: threadSafety, feed: feed) } private let transform: Transform<InputEphemeral, Monitor<ReducedEphemeral, MappedTerminal>> private let reduce: Reduce<ReducedEphemeral, ReducedEphemeral> private let terminalReduce: Reduce<MappedTerminal, ReducedEphemeral> private let threadSafety: ThreadSafetyStrategy } struct RewireSwitch<InputEphemeral, InputTerminal, ReducedEphemeral, MappedTerminal>: MonitorTransforming { init(transform: @escaping Transform<InputEphemeral, Monitor<ReducedEphemeral, MappedTerminal>>, reduce: @escaping Reduce<ReducedEphemeral, ReducedEphemeral>, terminalReduce: @escaping Reduce<MappedTerminal, ReducedEphemeral>, threadSafety: ThreadSafetyStrategy, feed: Feed<MappedTerminal, InputTerminal>) { self.transform = transform self.reduce = reduce self.terminalReduce = terminalReduce self.threadSafety = threadSafety self.feed = feed self.synchronizedContext = SynchronizedContext(content: MutableState()) } func eat(ephemeral: InputEphemeral) { // Context: synchronized [subscription] let sync = CalleeSyncGuaranteed() synchronizedContext.readWrite(using: sync) { $0.accumulator = nil } transform(ephemeral).observe(ephemeral: reduce(ephemeral:), terminal: reduce(terminal:)) .associate(with: \.activeSubscription, in: ContextAccessor(synchronizedContext, threadSafety: sync)) } func eat(terminal: InputTerminal) { // Context: synchronized [terminal] feed.push(terminal: terminal) } func cancel(sourceSubscription: Cancelable) { // Context: synchronized [cancelation] let sync = CalleeSyncGuaranteed() synchronizedContext.read(using: sync) { $0.activeSubscription?.cancel() } sourceSubscription.cancel() } private func reduce(ephemeral: ReducedEphemeral) { // Context: free let sync = threadSafety synchronizedContext.readWrite(using: sync) { state in if let accumuator = state.accumulator { state.accumulator = reduce(accumuator, ephemeral) } else { state.accumulator = ephemeral } } } private func reduce(terminal: MappedTerminal) { // Context: synchronized [terminal] let sync = CalleeSyncGuaranteed() let accumulator = synchronizedContext.readWrite(using: sync) { state in let result = state.accumulator state.accumulator = nil return result } as ReducedEphemeral? if let accumuator = accumulator { feed.push(ephemeral: terminalReduce(terminal, accumuator)) } else { feed.push(ephemeral: terminal) } } typealias OutputEphemeral = MappedTerminal typealias OutputTerminal = InputTerminal private let transform: Transform<InputEphemeral, Monitor<ReducedEphemeral, MappedTerminal>> private let reduce: Reduce<ReducedEphemeral, ReducedEphemeral> private let terminalReduce: Reduce<MappedTerminal, ReducedEphemeral> private let threadSafety: ThreadSafetyStrategy private let feed: Feed<MappedTerminal, InputTerminal> private let synchronizedContext: SynchronizedContext<MutableState> private struct MutableState { init() { } var accumulator: ReducedEphemeral? var activeSubscription: Vanishable? } } // Copyright (C) 2019 by Victor Bryksin <[email protected]> // Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee // is hereby granted. // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE // FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
[ -1 ]
a80c4cc66ed03604b962be4100617047a62a9103
4776def5d498254ee9bc6bbc6c4617aebc48be74
/QRCodeScan/QRCodeScan/AppDelegate.swift
2f964df94b37db1cc246a7ceec966a064572c71e
[ "MIT" ]
permissive
dirtmelon/QRCodeScan
fd04bfe53ae9ee9d89506221c1f597da5976aada
a3452bee18c34ef698724cd28d1d04c54fd08d2c
refs/heads/master
2021-01-11T19:08:29.941283
2017-01-18T10:46:57
2017-01-18T10:46:57
79,324,353
0
0
null
null
null
null
UTF-8
Swift
false
false
2,080
swift
// // AppDelegate.swift // QRCodeScan // // Created by dirtmelon on 17/1/18. // Copyright © 2017年 dirtmelon. 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, 294924, 229388, 278542, 327695, 229391, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 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, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 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, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189044, 189040, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 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, 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, 304009, 213895, 304011, 230284, 304013, 295822, 189325, 279438, 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, 197645, 295949, 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, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 230679, 320792, 230681, 296215, 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, 288154, 337306, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 148946, 370130, 222676, 288210, 288212, 288214, 239064, 329177, 288218, 280021, 288220, 288217, 239070, 280027, 288224, 370146, 288226, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 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, 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, 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, 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, 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, 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, 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, 289687, 240535, 224151, 297883, 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, 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, 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, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 282337, 216801, 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, 282481, 110450, 315251, 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, 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, 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, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 184503, 299191, 307385, 307386, 258235, 307388, 176311, 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, 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, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127494, 283142, 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, 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, 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, 316294, 201603, 234375, 308105, 324490, 226185, 234379, 226182, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 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, 234437, 226239, 226245, 234439, 234443, 291788, 234446, 193486, 193488, 234449, 316370, 275406, 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, 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, 226453, 275608, 234650, 308379, 275606, 300189, 324766, 119967, 234653, 324768, 234657, 283805, 242852, 300197, 234661, 283813, 234664, 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, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 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, 227430, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 243268, 292421, 284231, 226886, 128584, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 284249, 276053, 284253, 300638, 284251, 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, 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, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 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, 194649, 350299, 227418, 350302, 194654, 350304, 178273, 309346, 227423, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 301163, 350313, 350316, 276583, 301167, 276586, 350321, 276590, 227440, 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, 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, 309491, 227571, 309494, 243960, 227583, 276735, 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, 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, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 277173, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 293706, 277322, 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, 276579, 293817, 293820, 203715, 326603, 342994, 293849, 293861, 228327, 228328, 318442, 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, 285792, 277601, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 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, 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, 310780, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187936, 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, 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, 188252, 237409, 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 ]
38d455ba9040f04f507bbb823ddb276521ebe7ae
db160a2c79176038e3bd4f53fd1eec75f019b90b
/TattsChallenge/Pods/Bond/Sources/Bond/QueryableDataSource.swift
0a2ae81c45d26fc4dbd41f1ae2d369d9247bc8b6
[ "MIT" ]
permissive
Allan121/tatts-coding-challenge
a89823604449f51faaddb1bd72982ccc9e5a9d0d
a1699412eaa469076cf313b69f3fbcd96a0fad60
refs/heads/master
2021-04-15T16:24:28.059493
2018-03-21T09:05:33
2018-03-21T09:05:33
126,148,849
0
0
null
null
null
null
UTF-8
Swift
false
false
1,381
swift
// // The MIT License (MIT) // // Copyright (c) 2017 Tony Arnold (@tonyarnold) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // public protocol QueryableDataSourceProtocol: DataSourceProtocol { associatedtype Item associatedtype Index subscript(_ index: Index) -> Item { get } } extension Array: QueryableDataSourceProtocol {}
[ 194560, 395267, 196612, 395271, 395274, 395277, 395278, 395279, 395280, 395281, 395282, 395283, 395286, 395287, 395289, 395290, 196638, 395295, 395296, 196641, 98341, 61478, 98344, 98345, 98346, 98347, 98349, 329778, 174139, 124987, 354364, 229438, 229440, 229441, 395328, 174148, 229444, 395332, 229447, 327751, 174152, 395333, 395334, 229449, 174159, 229456, 112721, 174161, 106580, 106582, 106585, 106586, 106587, 112730, 174171, 284783, 125057, 125062, 235658, 319626, 229524, 303255, 303256, 125087, 215205, 129190, 215211, 215212, 208041, 241846, 241852, 241859, 241862, 241864, 317640, 241866, 241870, 241877, 241878, 97329, 106720, 224, 241894, 241897, 241901, 241903, 241904, 241907, 241908, 176373, 241910, 176375, 260342, 241916, 141565, 141569, 241923, 141572, 241928, 141577, 141578, 241930, 241934, 241936, 241937, 141586, 141588, 12565, 227604, 227607, 241944, 227608, 12569, 141595, 141593, 141594, 141598, 141596, 141600, 141597, 141599, 141603, 241952, 241957, 141606, 141607, 141608, 289062, 241962, 289067, 141612, 289068, 12592, 289074, 289078, 141622, 141627, 215356, 141629, 141632, 141634, 241989, 213319, 141640, 141641, 141642, 227610, 141643, 213320, 241998, 241999, 241992, 241996, 242002, 141651, 141652, 141646, 141654, 282967, 242006, 141655, 215384, 141660, 141661, 168285, 141663, 141664, 141670, 141674, 141677, 141681, 287090, 190836, 334196, 190840, 190841, 430456, 190843, 190844, 430458, 190842, 375168, 141696, 141700, 141701, 141702, 141705, 141707, 430476, 430475, 141708, 141711, 430483, 217492, 217494, 197018, 197019, 197021, 295330, 295331, 197029, 430502, 168359, 303550, 160205, 160208, 381398, 319972, 305637, 305638, 223741, 192234, 61971, 191006, 191007, 272931, 57893, 57896, 328232, 420394, 57899, 57900, 295469, 295467, 57903, 57904, 57905, 57906, 272944, 336445, 336446, 336450, 336451, 336454, 336455, 336457, 336460, 336464, 336465, 336466, 336467, 336469, 336470, 336471, 336472, 336473, 336474, 437297, 336478, 336479, 336480, 111202, 336482, 336483, 336488, 336489, 297620, 297636, 135854, 135861, 242361, 244419, 66247, 244427, 248524, 127693, 244430, 127695, 66261, 127702, 127703, 334562, 127716, 334564, 62183, 127727, 127729, 244469, 318199, 318200, 142073, 164601, 316155, 334590, 318207, 244480, 318209, 334591, 142078, 334596, 334600, 318218, 334603, 318220, 334602, 334606, 318223, 334607, 334604, 318228, 318231, 318233, 318234, 318236, 318237, 318241, 187173, 318246, 187174, 187175, 187177, 187176, 187179, 187180, 141601, 314167, 316216, 396088, 396089, 396091, 396092, 396094, 148287, 316224, 396098, 314179, 279366, 279367, 396104, 279369, 396110, 396112, 396114, 396115, 396117, 396118, 396119, 396120, 396121, 396122, 396123, 396125, 396126, 396127, 396128, 396129, 299880, 396137, 162668, 299884, 187248, 396147, 396151, 248696, 396153, 187258, 187259, 187260, 322430, 437356, 297858, 60304, 201619, 60308, 60319, 60324, 60327, 60328, 312481, 185258, 185259, 23469, 185262, 23470, 23472, 60337, 23473, 23474, 23475, 23476, 185267, 23479, 287674, 23483, 23487, 23490, 281539, 23492, 23494, 23499, 23502, 228306, 23508, 23515, 259036, 23517, 259039, 23523, 203755, 23531, 23533, 152560, 242675, 23552, 171008, 23559, 23560, 23561, 437258, 437262, 23572, 23574, 23575, 437273, 23580, 437277, 23581, 437279, 23585, 23590, 23591, 23594, 23596, 23599, 189488, 97327, 187442, 144435, 189490, 187444, 189492, 189493, 187447, 144441, 189491, 97339, 23607, 144437, 341054, 341055, 23612, 144442, 341058, 437314, 341060, 144444, 23616, 341057, 222278, 341062, 341066, 341063, 341068, 189508, 203862, 285782, 293976, 285785, 189502, 437340, 312412, 115805, 115806, 115807, 293982, 115809, 115810, 437345, 185446, 293990, 312423, 115817, 242794, 115819, 185452, 115820, 185454, 115823, 185455, 115825, 312427, 115827, 242803, 115829, 185457, 242807, 142450, 437369, 437364, 294015, 294016, 142463, 205959, 437384, 437392, 40083, 437396, 189590, 40088, 312473, 189594, 189595, 208026, 40092, 312478, 312479, 208027, 189598, 40095, 208029, 208033, 27810, 228512, 228513, 437416, 189607, 189609, 189610, 189612, 312489, 312493, 437423, 437424, 189617, 312497, 189619, 312498, 189621, 312501, 189622, 189623, 437428, 189626, 437431, 437433, 322751, 437445, 437446, 292041, 437450, 292042, 437455, 181455, 292049, 437458, 152789, 204000, 204003, 152821, 152825, 294138, 294137, 279818, 279820, 206094, 206097, 206098, 294162, 206102, 206104, 206108, 181533, 206109, 294181, 27943, 181544, 294183, 312474, 27944, 27948, 312476, 181553, 173368, 206138, 245058, 173379, 312480, 152906, 152907, 152908, 152909, 290126, 152910, 312482, 290123, 290130, 290131, 290125, 290127, 312483, 290135, 290136, 245081, 290137, 290139, 378208, 64865, 222562, 222563, 222566, 228717, 222573, 173425, 228721, 171377, 222577, 222579, 222587, 222590, 222591, 173441, 222594, 222596, 177543, 222600, 222601, 363913, 222603, 222599, 222605, 222604, 54669, 222606, 222607, 54673, 54678, 54692, 152998, 54698, 54700, 54701, 155377, 54703, 298431, 370118, 279944, 153049, 189496, 157151, 222689, 222692, 157157, 222693, 157158, 157159, 112111, 112115, 153076, 112120, 65016, 40450, 40451, 40454, 206344, 40458, 40460, 40466, 40471, 40474, 40479, 40482, 362020, 362022, 116267, 282156, 34359, 34362, 173634, 173635, 316995, 316997, 263751, 106085, 319081, 314987, 319085, 189608, 319088, 300660, 300661, 300662, 300663, 52882, 52884, 52887, 394905, 394908, 394910, 52896, 394912, 52897, 339622, 147115, 394925, 144438, 296679, 292544, 108230, 144443, 341052, 108240, 144445, 296660, 108245, 212694, 144447, 34531, 192230, 192231, 192232, 296681, 34538, 296688, 34540, 296685, 34541, 216812, 216814, 216815, 216816, 216818, 216819, 296684, 296694, 296687, 296696, 216822, 296691, 296692, 216826, 296698, 216828, 216829, 296699, 296700, 296706, 216832, 216833, 296709, 296710, 216834, 296703, 216836, 216837, 216838, 296707, 296708, 296712, 296713, 313101, 313104, 313099, 313108, 313111, 313112, 313114, 149274, 149275, 149280, 159523, 227116, 227119, 321342, 210755, 210756, 210757, 210758, 321353, 218957, 218959, 120655, 120656, 120657, 218963, 218964, 218960, 223064, 223065, 180058, 229209, 223069, 229213, 169824, 229217, 169826, 292708, 237413, 169830, 292709, 128873, 169835, 128876, 169837, 128878, 227183, 223086, 227185, 223087, 128881, 128882, 128883, 128884, 169843, 141181, 327550, 169856, 108419, 108421, 141198, 108431, 108432, 116622, 169881, 219033, 108448, 219040, 141219, 219043, 219044, 219045, 141223, 141225, 141228, 141229, 108460, 108462, 229294, 229295, 437402, 141235, 141246, 290767, 141264, 59348, 59349, 23601, 141272, 437404, 40931, 141284, 40932, 40934, 141290, 40940, 40941, 141293, 141295, 174063, 231406, 174066, 174067, 141292, 141297, 237559, 174074, 194558, 194559 ]
47b67bfad6081325af071e2ee617e8cf64fc412d
68805ae478c38cc437cf0566f4e4809f6957f12d
/lg1/AppDelegate.swift
4493ab60bd1e1b6f71715015a2464ce699f72c28
[]
no_license
andrejra/from-xcode
6e261fa4f82714404869239e5268fa5ef39f6a31
e47e418948eda5f51b8b30bee537ca4d2a8906ac
refs/heads/master
2021-03-30T22:14:53.220665
2018-04-19T10:17:41
2018-04-19T10:17:41
124,543,752
0
0
null
null
null
null
UTF-8
Swift
false
false
2,336
swift
// // AppDelegate.swift // lg1 // // Created by Andrej // Copyright © 2018 Andrej. All rights reserved. // import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var navigationController: UINavigationController! var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { navigationController = UINavigationController(rootViewController: LoginViewController()) navigationController.isNavigationBarHidden = false self.window = UIWindow(frame: UIScreen.main.bounds) self.window?.backgroundColor = UIColor.white self.window?.rootViewController = navigationController self.window?.makeKeyAndVisible() 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. } }
[ 229380, 229383, 229385, 294924, 229388, 229391, 327695, 229394, 229397, 229399, 229402, 229405, 229408, 294950, 229415, 229417, 237613, 229422, 229426, 237618, 229428, 286774, 229432, 286776, 319544, 286791, 237640, 237646, 311375, 163920, 311383, 319590, 311400, 303212, 131192, 237693, 327814, 303241, 311436, 319633, 286873, 286876, 311460, 32944, 327862, 286906, 180413, 286910, 131264, 286922, 286924, 286926, 319694, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 131314, 286962, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 287003, 287006, 287009, 287012, 287014, 287019, 311598, 287032, 155966, 278849, 319809, 319810, 319814, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 65938, 65943, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 98756, 278980, 319945, 278986, 319947, 278990, 278994, 172512, 279010, 279015, 172520, 319978, 172526, 279023, 311791, 279027, 319989, 180727, 164343, 311804, 287230, 279040, 303617, 287234, 172550, 287238, 172552, 303623, 320007, 279051, 172558, 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, 279124, 172634, 262752, 311911, 295533, 172655, 172656, 352880, 295538, 172660, 287349, 287355, 287360, 295553, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 287377, 311957, 221850, 287386, 164509, 172702, 230045, 287390, 172705, 287394, 172707, 303773, 303780, 287398, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 164546, 287427, 312006, 107212, 172748, 287436, 172751, 295633, 172755, 303827, 279255, 172760, 279258, 287450, 213724, 189149, 303835, 303838, 312035, 279267, 295654, 279272, 312048, 189169, 312050, 230131, 205564, 295685, 230154, 312077, 295695, 369433, 295707, 328476, 295710, 295720, 303914, 279340, 205613, 279353, 230202, 222018, 295755, 377676, 287569, 303959, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 213895, 304007, 304009, 320391, 304011, 230284, 304013, 279438, 295822, 189329, 189331, 58262, 304027, 279452, 410526, 279461, 304042, 213931, 189367, 230327, 304055, 304063, 295873, 189378, 213954, 304065, 213963, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 312321, 295945, 197645, 230413, 295949, 140312, 238620, 197663, 304164, 304170, 238641, 312374, 238652, 230465, 238658, 296004, 336964, 238666, 296021, 402518, 336987, 148575, 230497, 296036, 361576, 296040, 296044, 164973, 279669, 304249, 337018, 66690, 222340, 296084, 238745, 304285, 238756, 205991, 165035, 337067, 165038, 238766, 304311, 230592, 410820, 279750, 230600, 230607, 148690, 279769, 304348, 279777, 304354, 296163, 279781, 304360, 279788, 320748, 279790, 320771, 312585, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 173350, 312622, 296243, 312630, 222522, 230718, 296255, 378181, 230727, 222545, 230739, 312663, 222556, 337244, 312676, 230760, 173418, 230763, 230768, 296305, 230773, 304505, 304506, 181631, 312711, 288140, 230800, 288144, 304533, 288154, 337306, 173472, 288160, 288162, 279975, 304555, 370092, 279983, 173488, 312755, 296373, 279991, 312759, 337335, 173507, 296389, 222665, 230860, 230865, 370130, 148946, 288210, 222676, 280021, 288212, 288214, 239064, 288217, 288218, 329177, 288220, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 320998, 288234, 370146, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 296446, 206336, 321022, 296450, 402942, 230916, 214535, 230919, 304651, 222752, 108066, 296488, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 181854, 280158, 370272, 403039, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 321200, 296634, 370365, 419522, 280260, 280264, 263888, 313044, 280276, 321239, 280283, 288478, 419555, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 288510, 67330, 280324, 198405, 198416, 280337, 296723, 321304, 329498, 296731, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 321336, 296767, 345921, 304968, 280393, 280402, 313176, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 247688, 280464, 124817, 280473, 124827, 214940, 247709, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 190403, 280515, 296900, 337862, 165831, 280521, 354265, 296921, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 288764, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 313386, 354348, 124978, 215090, 124980, 288826, 313406, 288831, 67654, 280651, 354382, 288848, 354390, 280669, 223327, 280671, 321634, 149603, 329830, 280681, 313451, 280687, 215154, 280691, 313458, 313464, 321659, 280702, 288895, 141446, 215175, 321670, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 321717, 280764, 280769, 280771, 280774, 280783, 280786, 280793, 280796, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280825, 280827, 280830, 280831, 125187, 280835, 125191, 125207, 125209, 321817, 321842, 223539, 280888, 289087, 280897, 239944, 305480, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 313705, 280937, 280946, 223606, 313720, 280956, 215422, 280959, 313731, 199051, 240011, 240017, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289221, 289227, 436684, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 240132, 305668, 281095, 223752, 338440, 150025, 223757, 281102, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 281154, 322115, 281163, 281179, 338528, 281190, 281196, 19053, 158317, 313973, 281210, 297594, 158347, 133776, 240275, 117398, 314007, 289436, 174754, 330404, 174764, 240309, 133817, 314045, 314047, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322318, 281372, 322341, 215850, 281388, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 142226, 224151, 240535, 289687, 289694, 289696, 289724, 52163, 420829, 281567, 289762, 322534, 297961, 183277, 412659, 322550, 134142, 322563, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 248995, 306341, 306344, 306347, 306354, 142531, 289991, 249045, 290008, 363745, 298216, 126190, 216303, 322801, 175360, 257302, 363802, 199976, 199978, 298292, 257334, 298306, 224584, 224587, 224594, 216404, 150870, 224603, 265568, 281960, 306539, 290161, 216436, 306549, 298358, 306552, 290171, 298365, 290174, 224641, 281987, 265604, 298372, 281990, 298377, 298381, 142733, 224657, 306581, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 339431, 282089, 191985, 282098, 290291, 282101, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282144, 290344, 290349, 290351, 290356, 224849, 282195, 282199, 282201, 306778, 159330, 314979, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 282402, 315174, 241450, 282410, 306991, 315184, 323376, 315190, 241464, 282425, 307009, 241475, 307012, 315211, 282446, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 241509, 110438, 110445, 282478, 282481, 110450, 315249, 315251, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 241556, 298901, 241560, 241563, 241565, 241567, 241569, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 282547, 241588, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 241640, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 299006, 282623, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 192596, 176213, 307287, 315482, 315483, 192605, 233567, 200801, 217188, 299109, 307303, 45163, 307307, 315502, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 307352, 299164, 315552, 315557, 184486, 307370, 184492, 307372, 307374, 307376, 176311, 184503, 307386, 258235, 176316, 307388, 307390, 184512, 307394, 299204, 184518, 323784, 307409, 176343, 299225, 233701, 184572, 184579, 282893, 291089, 282906, 233766, 176435, 168245, 307510, 315701, 332086, 307515, 282942, 307518, 282957, 110926, 323917, 233808, 323921, 315733, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 299388, 299398, 242057, 291212, 299405, 291222, 283033, 242075, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 299440, 291247, 291254, 127417, 291260, 127421, 127429, 315856, 315860, 176597, 127447, 299481, 176605, 242143, 291299, 340454, 242152, 291305, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 234003, 234006, 234010, 135707, 242206, 135710, 291361, 242220, 291378, 152118, 234038, 70213, 111193, 242275, 299620, 168562, 184952, 135805, 135808, 291456, 299655, 373383, 316051, 225941, 316054, 299672, 135834, 225948, 373404, 135839, 299680, 225954, 299684, 242343, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 226002, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 234231, 234236, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 242445, 234254, 234258, 242450, 242452, 201496, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 160572, 283452, 234302, 234307, 242499, 234309, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 201557, 234329, 185180, 234333, 308063, 234336, 234338, 242530, 349027, 234344, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234384, 234388, 234390, 226200, 234393, 308123, 234396, 324508, 291742, 234401, 291748, 234405, 291750, 234407, 324518, 324520, 291754, 226220, 291756, 234414, 291760, 201650, 226230, 234422, 275384, 234428, 291773, 226239, 234431, 242623, 234434, 324548, 226245, 234437, 234439, 234443, 291788, 193486, 234446, 193488, 234449, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234478, 234481, 234484, 234485, 234487, 234493, 234496, 316416, 234501, 308231, 234504, 234507, 234515, 300054, 234519, 234520, 316439, 234523, 234528, 300066, 234532, 234535, 234537, 234540, 234543, 275508, 234549, 300085, 300088, 234558, 316479, 234561, 234563, 316483, 234568, 234570, 316491, 234572, 300108, 300115, 234580, 234581, 234585, 242777, 275545, 234595, 234597, 300133, 300139, 234605, 160879, 234607, 275569, 316530, 234610, 234614, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234634, 234636, 234640, 275602, 234643, 324757, 226453, 275606, 234647, 234648, 275608, 234650, 308373, 308379, 234653, 283805, 119967, 300189, 234657, 324766, 242852, 300197, 275626, 316596, 234687, 308418, 300226, 234692, 283844, 300229, 308420, 283850, 300234, 283854, 300238, 300241, 316625, 300243, 300245, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 300284, 275710, 300287, 300289, 161027, 300292, 300294, 275719, 349451, 177419, 300299, 242957, 275725, 283917, 177424, 349464, 415009, 283939, 259367, 283951, 300344, 226617, 243003, 226628, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 316768, 292197, 243046, 316774, 218473, 136562, 275834, 333178, 275836, 275840, 316806, 226696, 226699, 316811, 300433, 234899, 357783, 316826, 300448, 144810, 144812, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 144835, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 292329, 300523, 259565, 259567, 300527, 316917, 308727, 300537, 308757, 308762, 316959, 284194, 284196, 235045, 284199, 284206, 284209, 284211, 194101, 284213, 194103, 284215, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 284245, 276053, 284247, 317015, 284249, 243290, 284253, 243293, 284255, 300638, 284258, 292452, 177766, 292454, 292458, 284267, 292461, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 292479, 284288, 276098, 284290, 284292, 292485, 325250, 284297, 317066, 284299, 317068, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 358116, 276197, 325353, 358122, 276206, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317191, 284428, 300816, 317207, 300828, 300830, 276255, 300832, 227109, 317221, 186151, 358183, 276268, 243504, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 178006, 284502, 317271, 276315, 292700, 284511, 227175, 292715, 284529, 292721, 300915, 284533, 317306, 284540, 292734, 325512, 169868, 399252, 350106, 284572, 276386, 284579, 276388, 292776, 284585, 358312, 276395, 292784, 276402, 161718, 358326, 358330, 276411, 276425, 301009, 301011, 301013, 301015, 358360, 301017, 292828, 153568, 292843, 227314, 350200, 325624, 317435, 350210, 350218, 292876, 350222, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 276539, 325692, 178238, 243779, 309337, 227418, 227423, 178273, 227426, 276579, 194660, 227430, 292968, 309352, 276586, 301163, 309354, 227440, 284786, 276595, 292985, 301178, 292989, 292993, 301185, 333957, 301199, 350354, 350359, 276638, 153765, 284837, 227520, 227522, 301252, 227529, 301258, 276685, 276689, 301272, 276699, 194780, 309468, 301283, 317672, 243948, 194801, 309494, 243960, 227583, 276735, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 211241, 325937, 325943, 260421, 285002, 276811, 276816, 235858, 276829, 276833, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 366983, 317833, 178572, 285070, 293263, 178583, 227738, 317853, 317858, 342434, 285093, 285098, 276907, 293304, 293314, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 276964, 293352, 236013, 293364, 317951, 309764, 236043, 317963, 342541, 55822, 113167, 317971, 309781, 55837, 227879, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 301636, 285265, 277080, 309849, 285277, 285282, 326244, 277100, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 334488, 227992, 285340, 318108, 227998, 318110, 285357, 318128, 277170, 293555, 154292, 277173, 342707, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 56041, 285417, 277232, 228081, 56059, 310015, 310020, 310029, 228113, 285459, 277273, 326430, 228135, 318248, 277291, 318253, 285489, 293685, 285494, 285499, 301884, 310080, 277317, 277329, 162643, 310100, 301911, 277337, 301921, 400236, 236397, 162671, 326514, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 310179, 293798, 293802, 236460, 293811, 293817, 293820, 203715, 326603, 342994, 293849, 293861, 228327, 228328, 318442, 277486, 326638, 351217, 318450, 293877, 285686, 302073, 121850, 293882, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 7232, 310336, 293956, 277573, 228422, 293960, 277577, 310344, 277583, 203857, 293971, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 302205, 294026, 285835, 302218, 162964, 384148, 187542, 302231, 302233, 285852, 302237, 285854, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 294072, 318651, 277695, 318657, 302275, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277801, 277804, 285997, 384302, 277807, 285999, 113969, 277811, 318773, 277816, 318776, 286010, 277819, 294204, 277822, 417086, 294211, 302403, 277832, 277836, 277839, 326991, 277842, 277847, 277850, 179547, 277853, 277857, 277860, 302436, 294246, 327015, 277864, 310632, 327017, 351594, 277869, 277872, 351607, 277880, 310648, 310651, 277884, 277888, 310657, 310659, 277892, 294276, 277894, 327046, 253320, 310665, 277898, 318858, 351619, 277903, 310672, 277905, 351633, 277908, 277917, 277921, 310689, 130468, 277928, 277932, 310703, 277937, 130486, 310710, 277944, 310712, 277947, 310715, 277950, 277953, 64966, 245191, 277959, 302534, 310727, 277963, 277966, 302543, 277971, 228825, 277978, 277981, 310749, 277984, 310755, 277989, 277991, 277995, 286188, 310764, 278000, 228851, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 228864, 286214, 302603, 302614, 286233, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 40488, 286248, 294439, 40491, 294440, 294443, 294445, 310831, 212538, 40507, 40511, 40513, 40521, 286283, 40525, 40527, 212560, 228944, 400976, 40533, 40537, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 278168, 327333, 229030, 212648, 278188, 302764, 319153, 278196, 319171, 302789, 294599, 278216, 294601, 319187, 229076, 286425, 319194, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 302852, 302854, 294664, 311048, 319243, 311053, 294682, 278306, 294701, 278320, 319280, 319290, 229192, 302925, 237409, 360317, 360322, 327554, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 294817, 319394, 294821, 163755, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 237562 ]
289f9e2122da513b8318b6995b7657cddc5f7760
520dc477a6745ee40a1f055321e5faa44d1cd6a3
/Remind Me At/AppDelegate.swift
0f53cbdc5114938581758fa3c6a103b5253122a8
[]
no_license
rishabdadhich/Remind-Me-At-new
a812a3e0aa28fdd4dac8eefe6b37e595d95bc3e1
b548a27fd0caa49bd2e63631e38333a482537c9f
refs/heads/master
2021-07-05T05:38:07.880011
2017-09-26T02:36:48
2017-09-26T02:36:48
104,753,720
0
0
null
null
null
null
UTF-8
Swift
false
false
3,110
swift
// // AppDelegate.swift // Remind Me At // // Created by Rishabh on 27/06/1939 Saka. // Copyright © 1939 Saka rishi. All rights reserved. // import UIKit import CoreData import CoreLocation import UserNotifications @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? let coreDataManager = CoreDataManager.sharedInstance let locationManager = LocationManager() func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // facebook// FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions) //Request notification authorisation let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .sound]) { granted, error in } return true } func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { return FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: sourceApplication, annotation: annotation) } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. // Saves changes in the application's managed object context before the application terminates. coreDataManager.saveContext() } }
[ 354656, 381313, 309764, 294950, 288519, 321801, 157930, 278542, 277519, 133713, 148946, 316596, 178583, 285277, 283069 ]
af2fc45c8add656c27ca072347be544218e1590b
a3729fdef61d3325dad7f4e4ed0897edda6f5adb
/Circle/Circle/Services/DataService.swift
b1bcf37f2b55ff1a26018544f983c0cced188ffe
[]
no_license
ivannpe/circle
1c5e0f4be3304fbaa475acf844dd04c0ac4d2ad1
b913d2389067409830ffb80f7c09205eb72f84cc
refs/heads/master
2022-10-10T10:45:56.902388
2020-06-20T04:20:36
2020-06-20T04:20:36
255,773,506
1
1
null
null
null
null
UTF-8
Swift
false
false
14,318
swift
// // DataService.swift // Circle // // Created by Ivanna Peña on 5/3/20. // Copyright © 2020 Ivanna Peña and Leena Loo. All rights reserved. // import Foundation import Firebase let DB_BASE = Database.database().reference() class DataService { static let instance = DataService() private var _REF_BASE = DB_BASE private var _REF_USERS = DB_BASE.child("users") private var _REF_GROUPS = DB_BASE.child("groups") private var _REF_FEED = DB_BASE.child("feed") private var _REF_CHATS = DB_BASE.child("chats") var REF_BASE: DatabaseReference { return _REF_BASE } var REF_USERS: DatabaseReference { return _REF_USERS } var REF_GROUPS: DatabaseReference { return _REF_GROUPS } var REF_FEED: DatabaseReference { return _REF_FEED } var REF_CHATS: DatabaseReference { return _REF_CHATS } func createDBUser(uid: String, userData: Dictionary<String, Any>) { REF_USERS.child(uid).updateChildValues(userData) } func uploadPost(withMessage message: String, forUID uid: String, withGroupKey groupKey: String?, sendComplete: @escaping (_ status: Bool) -> ()) { if groupKey != nil { REF_GROUPS.child(groupKey!).child("messages").childByAutoId().updateChildValues(["content": message, "senderId": uid]) sendComplete(true) } else { REF_FEED.childByAutoId().updateChildValues(["content": message, "senderId": uid]) sendComplete(true) } } //gets username and profile for user func getUsernameAndProfilePictureURL(forUID uid: String, handler: @escaping (_ username: String, _ profileImageURL: String) -> ()) { REF_USERS.observeSingleEvent(of: .value) { (userSnapshot) in guard let userSnapshot = userSnapshot.children.allObjects as? [DataSnapshot] else { return } for user in userSnapshot { if user.key == uid { handler(user.childSnapshot(forPath: "email").value as! String, user.childSnapshot(forPath: "profileImageURL").value as! String) } } } } //retrieves messages for newsfeed func getAllFeedMessages(handler: @escaping (_ message: [Message]) -> ()) { var messageArray = [Message]() print("get all feed messages called") //REF_FEED.observeSingleEvent(of: .value) { (feedMessageSnapshot) in REF_GROUPS.observeSingleEvent(of: .value) { (feedMessageSnapshot) in guard let feedMessageSnapshot = feedMessageSnapshot.children.allObjects as? [DataSnapshot] else { return } for group in feedMessageSnapshot{ let members = group.childSnapshot(forPath: "members").value as! [String] if members.contains(String((Auth.auth().currentUser?.email)!)){ self.REF_GROUPS.child(group.key).child("messages").observeSingleEvent(of: .value) { (feedSnapshot) in guard let feedSnapshot = feedSnapshot.children.allObjects as? [DataSnapshot] else { return } for message in feedSnapshot { let content = message.childSnapshot(forPath: "content").value as! String let senderID = message.childSnapshot(forPath: "senderId").value as! String //print(content) //print(senderID) let message = Message(content: content, senderId: senderID) messageArray.append(message) //print(messageArray) handler(messageArray) print(messageArray) } } } } handler(messageArray) } } //retrieves messages for group feed func getAllMessages(group: Group, handler: @escaping (_ messages: [Message]) -> ()) { var messageArray = [Message]() REF_GROUPS.child(group.key).child("messages").observeSingleEvent(of: .value) { (feedSnapshot) in guard let feedSnapshot = feedSnapshot.children.allObjects as? [DataSnapshot] else { return } for message in feedSnapshot { let content = message.childSnapshot(forPath: "content").value as! String let senderID = message.childSnapshot(forPath: "senderId").value as! String let message = Message(content: content, senderId: senderID) messageArray.append(message) } handler(messageArray) } } //retrieves username for user func getUsername(forUID uid: String, handler: @escaping (_ username: String) -> ()) { REF_USERS.observeSingleEvent(of: .value) { (userSnapshot) in guard let userSnapshot = userSnapshot.children.allObjects as? [DataSnapshot] else { return } for user in userSnapshot { if(user.key == uid) { handler(user.childSnapshot(forPath: "email").value as! String) } } } } //retrieves user email func getEmail(forSearchQuery query: String, handler: @escaping (_ emailArray: [String]) -> ()) { var emailArray = [String]() REF_USERS.observe(.value) { (userSnapshot) in guard let userSnapshot = userSnapshot.children.allObjects as? [DataSnapshot] else { return } for user in userSnapshot { let email = user.childSnapshot(forPath: "email").value as! String if email.contains(query) == true && email != Auth.auth().currentUser?.email { emailArray.append(email) } } handler(emailArray) } } //retreives user profile picture func getCurrentUserProfilePicture(userUID: String, handler: @escaping (_ imageURL: String)-> ()) { REF_USERS.observe(.value) { (userSnapshot) in guard let userSnapshot = userSnapshot.children.allObjects as? [DataSnapshot] else { return } for user in userSnapshot { if user.key == userUID { guard let userProfileImageURL = user.childSnapshot(forPath: "profileImageURL").value as? String else { return } handler(userProfileImageURL) } } } } //retrieves user id for username func getIds(forUsername usernames: [String], handler: @escaping (_ uidArray: [String]) -> ()) { print("getIds function") REF_USERS.observeSingleEvent(of: .value) { (userSnapshot) in var idArray = [String]() guard let userSnapshot = userSnapshot.children.allObjects as? [DataSnapshot] else { return } for user in userSnapshot { let email = user.childSnapshot(forPath: "email").value as! String if usernames.contains(email) { idArray.append(user.key) } } print(idArray[0]) handler(idArray) } } //retrieves email of all group members func getEmails(group: Group, handler: @escaping (_ emailArray: [String]) -> ()) { var emailArray = [String]() print("getEmails called") REF_USERS.observeSingleEvent(of: .value) { (userSnapshot) in guard let userSnapshot = userSnapshot.children.allObjects as? [DataSnapshot] else { return } emailArray = group.members print(emailArray) handler(emailArray) } } //create group object func createGroups(withTitle title: String, andDescription description: String, forUserIds ids: [String], handler: @escaping (_ groupCreated: Bool) -> ()) { REF_GROUPS.childByAutoId().updateChildValues(["title" : title, "description": description, "members": ids]) handler(true) } //create chat object func createChats(forUserIds ids: [String], handler: @escaping (_ chatCreated: Bool) -> ()) { REF_CHATS.childByAutoId().updateChildValues(["members": ids]) handler(true) } //create chat message object func uploadChat(withMessage message: String, forUID uid: String, withChatKey chatKey: String?, sendComplete: @escaping (_ status: Bool) -> ()) { if chatKey != nil { REF_CHATS.child(chatKey!).child("messages").childByAutoId().updateChildValues(["content": message, "senderId": uid]) sendComplete(true) } else { REF_FEED.childByAutoId().updateChildValues(["content": message, "senderId": uid]) sendComplete(true) } } //retrieve lists of all chats a user is a part of func getAllChats(handler: @escaping (_ chatArray: [Chat]) -> ()) { var chatArray = [Chat]() REF_CHATS.observeSingleEvent(of: .value) { (Snapshot) in guard let Snapshot = Snapshot.children.allObjects as? [DataSnapshot] else { return } for chat in Snapshot { let key = chat.key let members = chat.childSnapshot(forPath: "members").value as! [String] //most recent message object contents let chatInstance = Chat(key: key, members: members) if(members.contains((Auth.auth().currentUser?.email)!)) { chatArray.append(chatInstance) } } handler(chatArray) } } //retreives all chat messages in a single chat object func getAllChatMessages(chatKey: String, handler: @escaping (_ chatMessageArray: [ChatMessage]) -> ()) { var chatMessageArray = [ChatMessage]() REF_CHATS.child(chatKey).child("messages").observeSingleEvent(of: .value) { (Snapshot) in guard let Snapshot = Snapshot.children.allObjects as? [DataSnapshot] else { return } for chatMessage in Snapshot { //let key = chatMessage.key let senderId = chatMessage.childSnapshot(forPath: "senderId").value as! String let content = chatMessage.childSnapshot(forPath: "content").value as! String //most recent message object contents let chatInstance = ChatMessage(content: content, senderId: senderId) //if(members.contains((Auth.auth().currentUser?.email)!)) { chatMessageArray.append(chatInstance) //} } handler(chatMessageArray) } } //retrieves all groups for group page func getAllGroups(handler: @escaping (_ groupsArray: [Group]) -> ()) { var groupsArray = [Group]() REF_GROUPS.observeSingleEvent(of: .value) { (groupSnapshot) in guard let groupSnapshot = groupSnapshot.children.allObjects as? [DataSnapshot] else { return } for group in groupSnapshot { let title = group.childSnapshot(forPath: "title").value as! String let description = group.childSnapshot(forPath: "description").value as! String let key = group.key let members = group.childSnapshot(forPath: "members").value as! [String] let memberCount = members.count let groupInstance = Group(title: title, description: description, memberCount: memberCount, key: key, members: members) //if(members.contains((Auth.auth().currentUser?.email)!)) { groupsArray.append(groupInstance) //} } handler(groupsArray) } } //new function for profile groups table view func getAllProfileGroups(handler: @escaping (_ groupsArray: [Group]) -> ()) { var groupsArray = [Group]() REF_GROUPS.observeSingleEvent(of: .value) { (groupSnapshot) in guard let groupSnapshot = groupSnapshot.children.allObjects as? [DataSnapshot] else { return } for group in groupSnapshot { let title = group.childSnapshot(forPath: "title").value as! String let description = group.childSnapshot(forPath: "description").value as! String let key = group.key let members = group.childSnapshot(forPath: "members").value as! [String] let memberCount = members.count let groupInstance = Group(title: title, description: description, memberCount: memberCount, key: key, members: members) if(members.contains((Auth.auth().currentUser?.email)!)) { groupsArray.append(groupInstance) } } handler(groupsArray) } } //new function for member profile view controller to retrieve groups with the current selected user's email func getAllMembersGroupNames(email: String, handler: @escaping (_ groupsArray: [Group]) -> ()) { var groupsArray = [Group]() REF_GROUPS.observeSingleEvent(of: .value) { (groupSnapshot) in guard let groupSnapshot = groupSnapshot.children.allObjects as? [DataSnapshot] else { return } for group in groupSnapshot { let title = group.childSnapshot(forPath: "title").value as! String let description = group.childSnapshot(forPath: "description").value as! String let key = group.key let members = group.childSnapshot(forPath: "members").value as! [String] let memberCount = members.count let groupInstance = Group(title: title, description: description, memberCount: memberCount, key: key, members: members) if(members.contains(email)) { groupsArray.append(groupInstance) } } handler(groupsArray) } } }
[ -1 ]
4eaa8ab0667d4b6c3ea13bc0b2c0bdd3c31b6355
a85b0a279dc8249610bba943ed24960134a1239e
/Parking/Welcome/model/TCUserInfo.swift
79cf970522691f505e1b4f8a305c95abc3f602aa
[]
no_license
skyFLSunny/parking_ios
bdca642cdd39d91bdaaba2a249545fbdd877a5d6
6bad05ce195e3ffd576a61882e3496af534e76d1
refs/heads/master
2021-01-14T09:59:35.738742
2016-10-14T08:01:47
2016-10-14T08:01:47
57,006,438
0
0
null
2016-04-25T02:39:01
2016-04-25T02:39:00
null
UTF-8
Swift
false
false
734
swift
// // TCUserInfo.swift // Parking // // Created by xiaocool on 16/5/11. // Copyright © 2016年 北京校酷网络科技有限公司. All rights reserved. // import UIKit class TCUserInfo { var avatar:String = "" var address:String = "" var phoneNumber:String = "" var userid:String = "" var userName:String = "" var sex:String = "" var currentCar:String = "" var cardid:String = "" var banktype:String = "" var bankBranch:String = "" var bankNo:String = "" var bankUserName:String = "" var cardNumber:String = "" var currentCarBrand = "" var payOrder = "" var payFree = "" static let currentInfo = TCUserInfo() private init() { } }
[ -1 ]
ef20f10204f0abd47c8373b6c9b388be69e47041
7beaa2117f1e43a050461b320fbecfd54741636f
/DLUber/DLUber/Controller/DLBaseController.swift
4fb51de9b4c87f3567d28e434adfb520258860cf
[ "MIT" ]
permissive
Liqiankun/DLUber
f5cd2ed99c59596627b980ea6d762efb1f7e65f9
2d0c8c882d3fbc7a5d368e3d8ffa10b2a1deabe7
refs/heads/master
2021-01-10T16:52:34.410546
2016-04-17T13:31:00
2016-04-17T13:31:00
55,897,033
0
0
null
null
null
null
UTF-8
Swift
false
false
1,211
swift
// // DLBaseController.swift // DLUber // // Created by FT_David on 16/4/10. // Copyright © 2016年 FT_David. All rights reserved. // import UIKit class DLBaseController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } /** 显示SVProgressHUD */ func showSVProgressHUD() { SVProgressHUD.show() } /** 消失SVProgressHUD */ func dimissSVProgressHUD() { SVProgressHUD.dismiss() } func showSVProgressWithStatus(status:String) { SVProgressHUD.showWithStatus(status) } func setNavigationItem(title:String,action:Selector,isRight:Bool) { var barItem:UIBarButtonItem! barItem = UIBarButtonItem(title: title, style: .Plain, target: self, action: action) if isRight { self.navigationItem.rightBarButtonItem = barItem }else{ self.navigationItem.leftBarButtonItem = barItem } } func doRight() { } func goBack(){ self.dismissViewControllerAnimated(true, completion: nil) } }
[ -1 ]
91a39b9dcabea2ea4ddd38a969664b4df21db037
706fe7ba85fbb9039d0924e113d0aad98851c00b
/NinetyNineSwiftProblemsTests/Tests/ArithmeticTests.swift
6105f8bedeafebf80082e6795279949830758e24
[ "MIT" ]
permissive
plantpurecode/NinetyNineSwiftProblems
39cbb0cb74d9a996ee7116e332c2b91e28562bc9
0ca08952f0f1d87eb71f5a5d8c796307f1e4663d
refs/heads/master
2021-07-07T00:14:30.929117
2020-08-15T17:08:01
2020-08-15T17:08:01
167,007,311
2
0
MIT
2019-10-07T11:28:24
2019-01-22T14:23:17
Swift
UTF-8
Swift
false
false
5,585
swift
// // ArithmeticTests.swift // NinetyNineSwiftProblemsTests // // Created by Jacob Relkin on 11/1/18. // Copyright © 2019 Jacob Relkin. All rights reserved. // import XCTest @testable import NinetyNineSwiftProblems private let primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47] class ArithmeticTests: XCTestCase { func testIsPrime() { primes.forEach { XCTAssertTrue($0.isPrime()) } XCTAssertFalse((-1).isPrime()) } func testAllPrime() { XCTAssertNoThrow(try primes.allPrime()) XCTAssertTrue(try primes.allPrime()) let unorderedPrimes1 = [2, 5, 3, 37, 29, 7] XCTAssertTrue(try unorderedPrimes1.allPrime(greatestIndex: 3)) var unorderedPrimes2 = primes.prefix(15) unorderedPrimes2.swapAt(3, 14) XCTAssertTrue(try unorderedPrimes2.allPrime(greatestIndex: 3)) // Negative numbers should throw an error. XCTAssertThrowsError(try [-1].allPrime()) { guard case Primes.Error.negativeNumber = $0 else { XCTFail("Invalid error type thrown") return } } // invalid indexes should throw an error. XCTAssertThrowsError(try primes.allPrime(greatestIndex: -2)) { guard case Primes.Error.negativeGreatestIndex = $0 else { XCTFail("Invalid error type thrown") return } } XCTAssertThrowsError(try unorderedPrimes1.allPrime(greatestIndex: 10)) { guard case Primes.Error.greatestIndexTooLarge = $0 else { XCTFail("Invalid error type thrown") return } } XCTAssertFalse(try [1, 2].allPrime()) XCTAssertFalse(try Array(1...10).allPrime()) } func testGCD() { XCTAssertEqual(Int.gcd(36, 63), 9) XCTAssertEqual(Int.gcd(63, 36), 9) } func testLCM() { XCTAssertEqual(Int.lcm(4, 6), 12) } func testCoprime() { XCTAssertTrue(35.isCoprimeTo(64)) XCTAssertFalse(35.isCoprimeTo(63)) } func testTotient() { let expectations = [1: 1, 10: 4, 486: 162, 1_292: 576, 38_856: 12_944] for (n, t) in expectations { XCTAssertEqual(n.totient, t) XCTAssertEqual(n.totientImproved(), t) } } func testTotientPerformance() { measure { _ = 10_090.totient } } func testTotientImprovedPerformance() { let dict = 10_090.primeFactorMultiplicityDict measure { _ = 10_090.totientImproved(dict) } } func testPrimeFactors() { XCTAssertEqual(315.primeFactors, [3, 3, 5, 7]) XCTAssertEqual(42.primeFactors, [2, 3, 7]) (-10...1).forEach { XCTAssertNil($0.primeFactors) } XCTAssertEqual(2.primeFactors, [2]) } func testPrimeFactorMultiplicity() { let expected = [3: 2, 5: 1, 7: 1] 315.primeFactorMultiplicity.forEach { tuple in XCTAssertNotNil(expected[tuple.0]) XCTAssertEqual(tuple.1, expected[tuple.0]) } XCTAssertEqual(315.primeFactorMultiplicityDict, expected) } func testListPrimesInRange() { XCTAssertEqual(Int.listPrimesInRange(range: 7...31), List(7, 11, 13, 17, 19, 23, 29, 31)) } func testPrimeGeneration() { let generatedPrimes = Primes.generate(upTo: 50) XCTAssertEqual(primes, generatedPrimes) } func testPrimeGenerationRuntime() { // This test will be disabled normally in order to keep overall test suite runtime to a minimum. let upperBound = 5_000_000 var primeCount = 0 measure { primeCount = Primes.generate(upTo: upperBound).count } XCTAssertEqual(primeCount, 348_513) } func testGoldbach() { let expectsNil = [0, 1, 4, 5, 7, 9, 29] expectsNil.forEach { XCTAssertNil(try? $0.goldbach()) } let result = try? 28.goldbach() XCTAssertNotNil(result) XCTAssertEqual(result?.0, 5) XCTAssertEqual(result?.1, 23) } func testGoldbachCompositions() { let expected = [ 10: [3, 7], 12: [5, 7], 14: [3, 11], 16: [3, 13], 18: [5, 13], 20: [3, 17] ] for (number, goldbach) in Int.goldbachCompositions(inRange: 9...20) { let expectedGoldbach = expected[number] XCTAssertEqual([goldbach.0, goldbach.1], expectedGoldbach) } let goldbachCompositions = Int.goldbachCompositionsLimited(inRange: 1...20) XCTAssertEqual(goldbachCompositions, "2 = 1 + 1, 3 = 1 + 2") } func testGoldbachCompositionsFull() { measure { XCTAssertEqual(Int.goldbachCompositions(inRange: 1...5_000, aboveMinimum: 50).count, 2_447) } } func testEnglishWordRepresentation() { XCTAssertEqual(0.englishWordRepresentation, "Zero") XCTAssertEqual(1.englishWordRepresentation, "One") XCTAssertEqual(106.englishWordRepresentation, "One Zero Six") XCTAssertEqual(175.englishWordRepresentation, "One Seven Five") XCTAssertEqual(209.englishWordRepresentation, "Two Zero Nine") XCTAssertEqual((-106).englishWordRepresentation, "Negative One Zero Six") XCTAssertEqual((-175).englishWordRepresentation, "Negative One Seven Five") XCTAssertEqual(1_000.englishWordRepresentation, "One Zero Zero Zero") } }
[ -1 ]
f5de43754ebc71e151523df6f09ba0f21e48e8ae
43be9414fd97dcf846c49c63c7567ffbd536f95d
/XYYHTools/XYYHTools/Code/Base/Tools/XYLog/XYLogBrowseViewController/XYLogBrowseContainerViewController.swift
b5428e0530cdd174a2f8dd3278fd8e68a3d7ccb8
[]
no_license
xiyuyanhen/XiyuyanhenTools
6bcd8b72820381c9337005aa3b490c1237600413
fe8a46b615d48b03aef4f98cc1b11da24aee5463
refs/heads/master
2021-07-08T22:06:52.640555
2021-05-08T08:32:50
2021-05-08T08:32:50
86,403,634
0
0
null
null
null
null
UTF-8
Swift
false
false
12,405
swift
// // XYLogBrowseContainerViewController.swift // EStudy // // Created by 细雨湮痕 on 2019/8/9. // Copyright © 2019 xiyuyanhen. All rights reserved. // import Foundation extension XYLogBrowseContainerViewController { @objc func clickMore(btn:BaseButton){ let alertView = UIAlertController(title: "更多操作", message: "", preferredStyle: .alert) let comfirmAction = UIAlertAction(title: "清除所有记录", style: .default) { [weak self] (action) in guard let weakSelf = self else { return } // WCDB_XYLogMsg.DeleteAll(completionBlock: nil) if let pageView = weakSelf.pageViewOrNil { pageView.removeFromSuperview() pageView.removeByDeinit() } weakSelf.pageViewOrNil = weakSelf.newPageView(logMsgArrFromDBOrNil: []) } alertView.addAction(comfirmAction) let filterAction = UIAlertAction(title: "筛选", style: .default) { [weak self] (action) in guard let weakSelf = self else { return } weakSelf.filter() } alertView.addAction(filterAction) let cancelAction = UIAlertAction(title: "取消", style: .cancel, handler:nil) alertView.addAction(cancelAction) self.present(alertView, animated: true, completion: nil) } func filter() { let alertView = UIAlertController(title: "筛选", message: nil, preferredStyle: .alert) alertView.addTextField {[weak self] (textfield:UITextField) in textfield.placeholder = "筛选内容" textfield.tag = 31 if let weakSelf = self { textfield.text = weakSelf.filterTextOrNil } } let comfirmAction = UIAlertAction(title: "筛选", style: .default) {[weak self] (alertAction) in guard let textField = alertView.textFields?.first else { return } self?.reloadBrowseDataByFilter(filterText: textField.text) } alertView.addAction(comfirmAction) let cancelAction = UIAlertAction(title: "取消", style: .cancel) { (alertAction) in } alertView.addAction(cancelAction) self.present(alertView, animated: true, completion: nil) } } class XYLogBrowseContainerViewController : BaseViewController { static let Title : String = "日志管理" override func initProperty() { super.initProperty() self.title = XYLogBrowseContainerViewController.Title self.automaticallyAdjustsScrollViewInsets = false } deinit { self.pageViewOrNil?.removeByDeinit() } override func changeCommondBackButtonItem() { let backButtonItem = BaseBarButtonItem(type: .Back, target: self, sel: #selector(self.popHandle(btn:))) self.navigationItem.backBarButtonItem = backButtonItem self.navigationItem.leftBarButtonItem = backButtonItem self.navigationItem.rightBarButtonItem = BaseBarButtonItem(public_Title: "更多", target: self, sel: #selector(self.clickMore(btn:))) self.navigationItem.hidesBackButton = false } override func viewDidLoad() { super.viewDidLoad() self.pageViewOrNil = self.newPageView(logMsgArrFromDBOrNil: self.logMsgArrFromDB) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) } override func viewDidDisappear(_ animated: Bool) { super.viewWillDisappear(animated) } override func layoutAddViews() { super.layoutAddViews() } override func layoutAllViews() { super.layoutAllViews() } private lazy var layout: LTLayout = { let layout = LTLayout() layout.titleViewBgColor = UIColor.FromXYColor(color: XYColor.CustomColor.white) layout.titleColor = UIColor.FromXYColor(color: XYColor.CustomColor.x333333) layout.titleSelectColor = XYColor(argb: XYColor.CustomColor.main.argb).uicolor layout.titleFont = XYFont.Font(size: 15) layout.titleMargin = UIW(15) layout.bottomLineColor = UIColor.FromXYColor(color: XYColor.CustomColor.clear) layout.isAverage = true layout.isNeedScale = false layout.showsHorizontalScrollIndicator = false return layout }() private var pageViewOrNil : LTPageView? lazy var logMsgsDataArr: [XYLogBrowseDataModel] = { return [XYLogBrowseDataModel]() }() var logMsgsDataTitles: [String] { var titleArr = [String]() for logMsgsData in self.logMsgsDataArr { titleArr.append(logMsgsData.dateText) } return titleArr } var filterTextOrNil: String? = nil } // MARK: - Data extension XYLogBrowseContainerViewController { private var logMsgArrFromDB : WCDB_XYLogMsg.ModelArray? { return nil } func reloadData(logMsgArrFromDBOrNil : WCDB_XYLogMsg.ModelArray?) { defer { //reload } guard var logMsgArr = logMsgArrFromDBOrNil else { return } self.logMsgsDataArr.removeAll() let cal = Calendar.current let nowDate = Date() var components = cal.dateComponents([.day, .hour, .minute, .second], from: nowDate) components.day = 0 if let hour = components.hour { components.hour = -hour } if let minute = components.minute { components.minute = -minute } if let second = components.second { components.second = -second } while logMsgArr.isNotEmpty { if let earlyDate = cal.date(byAdding: components, to: nowDate) { let earlyDateInterval = earlyDate.timeIntervalSince1970 let (filters, others) = logMsgArr.filter { (msg) -> Bool in return earlyDateInterval <= msg.dateSince1970 } if filters.isNotEmpty { let earlyText = earlyDate.dateString(cFormatter: .Custom_H) let earlyData = XYLogBrowseDataModel(dateText: earlyText, minDate: earlyDate, msgs: filters) self.logMsgsDataArr.insert(earlyData, at: 0) } logMsgArr = others } if let day = components.day { components.day = day - 1 }else { components.day = -1 } } } } extension XYLogBrowseContainerViewController { private func newPageView(logMsgArrFromDBOrNil : WCDB_XYLogMsg.ModelArray?) -> LTPageView? { self.reloadData(logMsgArrFromDBOrNil: logMsgArrFromDBOrNil) var browseArr = [BaseViewController]() for logMsgsData in self.logMsgsDataArr { let browseVC = XYLogBrowseViewController(sourceDataModel: logMsgsData) browseArr.append(browseVC) } guard browseArr.isNotEmpty else { return nil } let height = ScreenHeight() - (StatusBarHeight() + XYUIAdjustment.Share().navigationBarHeight + SafeAreaBottomHeight()) let pageView = LTPageView(frame: CGRect(x: 0, y: 0, width: ScreenWidth(), height: height), currentViewController: self, viewControllers: browseArr, titles: self.logMsgsDataTitles, layout: self.layout) pageView.didSelectIndexBlock = { (pView, index) in guard let viewController = pView.showedViewControllers.elementByIndex(index) as? XYLogBrowseViewController else { return } viewController.tableview.reloadData() } self.view.addSubview(pageView) return pageView } func reloadBrowseDataByFilter(filterText textOrNil: String?) { self.filterTextOrNil = textOrNil guard let pageView = self.pageViewOrNil else { return } for viewController in pageView.showedViewControllers { guard let browseVC = viewController as? XYLogBrowseViewController else { continue } browseVC.sourceDataModel.filterTextOrNil = textOrNil browseVC.reloadTableViewData(dataModelOrNil: browseVC.sourceDataModel) } } } // MARK: - XYLogBrowseDataModel class XYLogBrowseDataModel: XYObject { let dateText: String let minDate: Date var filterTextOrNil: String? = nil var logMsgs: WCDB_XYLogMsg.ModelArray = WCDB_XYLogMsg.ModelArray() required init(dateText: String, minDate: Date, msgs: WCDB_XYLogMsg.ModelArray = []) { self.dateText = dateText self.minDate = minDate if msgs.isNotEmpty { self.logMsgs.append(contentsOf: msgs) } super.init() } func sectionDataModels() -> XYLogBrowseDataSectionModel.ModelArray? { guard self.logMsgs.isNotEmpty else { return nil } var result: XYLogBrowseDataSectionModel.ModelArray = XYLogBrowseDataSectionModel.ModelArray() /// 时间间隔 let minuteSpacing: Int = 30 var components = DateComponents() components.minute = minuteSpacing var logMsgArr = self.logMsgs let (filters, _) = logMsgArr.filter {[weak self] (msg) -> Bool in if let filterText = self?.filterTextOrNil, filterText.isNotEmpty { let outMsg = msg.outMsg.trimmingCharacters(in: ["\n", " "]) // 若不包含筛选字符串,则过滤 if outMsg.contains(filterText) == false { return false } } return true } logMsgArr = filters while logMsgArr.isNotEmpty { if let nextMinutesDate = Calendar.current.date(byAdding: components, to: self.minDate) { let nextMinutesDateInterval = nextMinutesDate.timeIntervalSince1970 let (filters, others) = logMsgArr.filter { (msg) -> Bool in return msg.dateSince1970 <= nextMinutesDateInterval } if filters.isNotEmpty { let nextMinutesDateText = nextMinutesDate.dateString(cFormatter: .Time) let sectionModel = XYLogBrowseDataSectionModel(title: nextMinutesDateText, msgs: filters) result.append(sectionModel) } logMsgArr = others } // components.day = -1 if let minute = components.minute { components.minute = minute + minuteSpacing }else { components.minute = minuteSpacing } } guard result.isNotEmpty else { return nil } return result } }
[ -1 ]
2229d886167fefd44d961a10682ddaf088b22176
326ece43f9a59d4a3670c2a594beb8fe87b9b2ae
/SwiftUI/Version_2_0/Chapter04_Integrating_SwiftUI/challenge/BullsEye/BullsEye/AppDelegate.swift
77794eb344dc6e02fa01f2e5c71f0ec0ec7607c1
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
WooRaZil-Boy/Raywenderlich_iOS
4329124c0386660c20f3473e0149a892c5c5422c
132b488b7e7afef975cbe1d151f8232293952fdf
refs/heads/master
2023-02-03T03:15:45.909314
2021-11-25T04:23:31
2021-11-25T04:23:31
101,336,220
15
4
null
2023-01-25T03:25:52
2017-08-24T20:43:30
Jupyter Notebook
UTF-8
Swift
false
false
2,663
swift
/// Copyright (c) 2020 Razeware LLC /// /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentation files (the "Software"), to deal /// in the Software without restriction, including without limitation the rights /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell /// copies of the Software, and to permit persons to whom the Software is /// furnished to do so, subject to the following conditions: /// /// The above copyright notice and this permission notice shall be included in /// all copies or substantial portions of the Software. /// /// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish, /// distribute, sublicense, create a derivative work, and/or sell copies of the /// Software in any work that is designed, intended, or marketed for pedagogical or /// instructional purposes related to programming, coding, application development, /// or information technology. Permission for such use, copying, modification, /// merger, publication, distribution, sublicensing, creation of derivative works, /// or sale is expressly withheld. /// /// This project and source code may use libraries or frameworks that are /// released under various Open-Source licenses. Use of those libraries and /// frameworks are governed by their own individual licenses. /// /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// THE SOFTWARE. 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) } }
[ 379393, 379394, 379404, 379405, 379407, 379409, 379411, 379417, 379421, 379422, 379424, 379426, 379427, 379428, 379429, 379430, 379431, 379434, 379436, 379437, 379438, 379439, 379442, 379449, 379451, 379456, 379459, 379465, 379466, 379472, 379473, 379474, 379476, 379477, 379483, 379487, 379492, 379495, 379504, 379511, 379512, 379513, 379514, 379525, 379526, 379527, 379528, 379531, 379532, 379535, 379538, 379554, 379560, 379561, 225964, 225965, 225966, 225967, 379565, 379570, 225970, 379573, 225973, 379575, 379577, 225977, 379579, 225983, 225984, 379660, 379661, 379662, 379663, 379665, 379667, 379668, 379669, 379670, 379672, 270631, 270636, 379700, 270645, 379705, 379718, 329566, 379265, 379284, 379285, 379286, 379287, 379289, 379291, 379293, 379295, 379323, 379324, 379328, 379332, 379333, 379336, 353737, 353738, 379339, 353740, 353741, 353743, 353744, 353748, 353749, 379351, 379354, 379369, 379373, 379374, 379375, 379386, 379387, 379388 ]
a0cfbb7cde8f1c38397b80443117f9c394863fe7
4e0a5edd8d449fe2a4525f4ce1175a4a6630794c
/ContactList/UI/SaveUsersModels/Presenter/SaveUsersPresenter.swift
f26694c89ddfa068f1e2338e9c28dabebcf93670
[]
no_license
farxat60/Contact
4e77dacf5f23cd990c3dba0b94e99b3f2277f507
c08959cf9a35d050a02e4ac90b5ae58afcca755e
refs/heads/master
2020-04-16T11:16:20.548524
2019-01-13T17:01:03
2019-01-13T17:01:03
165,529,773
3
0
null
null
null
null
UTF-8
Swift
false
false
907
swift
// // SaveUsersPresenter.swift // ContactList // // Created by Joe Franc on 12/20/18. // Copyright © 2018 farxat60. All rights reserved. // import UIKit class SaveUserPresenter: SaveUsersPresenterProtocol { var interactor: SaveUsersInputInteractorProtocol? var view: SaveUsersViewProtocol? var wireframe: SaveUsersWireFrameProtocol? func viewDidLoad() { interactor?.getSaveUser() } func showDetailSelectionFromSaveUsers(with user: UsersEntity, from view: UIViewController) { wireframe?.pushToDetailList(with: user, from: view) } func deleteItemInRealmObject(with index: Int) { self.interactor?.deleteRealmObject(id: index) } } extension SaveUserPresenter: SaveUsersOutputInteractorProtocol { func saveUsersDidFetch(userList: Array<UsersEntity>) { view?.showSaveUsers(with: userList) } }
[ -1 ]
b69626eb0aab052b05fc0c3ccb6f741551434236
682e860736612856a1e300e2a90c85985a4f0e0a
/InstagramClone/Resources/SceneDelegate.swift
2720c4b9b535a44de420c94695b1970885783751
[]
no_license
guistrutzki/Swift-Instagram
3a96338d54a83539bec0962c3d07b7c02fa13729
9fcaaa58079b143daaa90d414a3b0cc1f4afc598
refs/heads/main
2023-05-02T05:23:28.370593
2021-05-25T05:52:38
2021-05-25T05:52:38
369,699,364
1
1
null
null
null
null
UTF-8
Swift
false
false
2,420
swift
// // SceneDelegate.swift // InstagramClone // // Created by Guilherme Strutzki on 21/05/21. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } let window = UIWindow(windowScene: windowScene) if AuthManager.shared.isSignedIn { // signed in UI window.rootViewController = TabBarViewController() } else { // sign in UI let vc = SignInViewController() let navVC = UINavigationController(rootViewController: vc) window.rootViewController = navVC } window.makeKeyAndVisible() self.window = window } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 423424, 379915, 391691, 361490, 405017, 386074, 358942, 381483, 411691, 430130, 386102, 16444, 358973, 266815, 254020, 415301, 217158, 347208, 396874, 370254, 343631, 180314, 322660, 369254, 173170, 386168, 361599, 333440, 343168, 372354, 415362, 330886, 206489, 340639, 354975, 332455, 185512, 425639, 271018, 258223, 387250, 345268, 334012, 373450, 322763, 346317, 386259, 355029, 330966, 419543, 372977, 375027, 418555, 372481, 207620, 397572, 210696, 194829, 366349, 362274, 263464, 257834, 248112, 264502, 384831, 244552, 357710, 418135, 383323, 439138, 399208, 274281, 257902, 355185, 381815, 243584, 264585, 361869, 383375, 272787, 40358, 380333, 5040, 337330, 370611, 361922, 347082, 264661, 399318, 248799, 423393, 257021 ]
bc01f1ebe393a59fd82d5f8d4e99c076782efe7c
f9c37ef65972fa39e91b7834d76fe11cbcee2eb1
/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Sources/VectorSourceIntegrationTests.swift
33d55589581a3f9385ab71d35f80d0ba5e0e07a3
[ "ISC", "BSL-1.0", "BSD-2-Clause", "MIT", "LicenseRef-scancode-object-form-exception-to-mit", "BSD-3-Clause", "Zlib" ]
permissive
Shiverware/mapbox-maps-ios
07c2353ebf8e76c8fe2e027761e86961983a8182
620b4ecabfcb7c67ffa75da31e64640bd280fc2d
refs/heads/main
2023-04-08T05:09:22.504385
2021-04-07T20:36:45
2021-04-07T20:36:45
356,376,343
0
0
NOASSERTION
2021-04-09T19:18:59
2021-04-09T19:18:59
null
UTF-8
Swift
false
false
2,566
swift
// This file is generated. import XCTest import Turf #if canImport(MapboxMaps) @testable import MapboxMaps #else @testable import MapboxMapsStyle #endif class VectorSourceIntegrationTests: MapViewIntegrationTestCase { func testAdditionAndRemovalOfSource() { guard let style = style else { XCTFail("There should be valid MapView and Style objects created by setUp.") return } let successfullyAddedSourceExpectation = XCTestExpectation(description: "Successfully added VectorSource to Map") successfullyAddedSourceExpectation.expectedFulfillmentCount = 1 let successfullyRetrievedSourceExpectation = XCTestExpectation(description: "Successfully retrieved VectorSource from Map") successfullyRetrievedSourceExpectation.expectedFulfillmentCount = 1 style.styleURI = .streets didFinishLoadingStyle = { _ in var source = VectorSource() source.url = String.testSourceValue() source.tiles = [String].testSourceValue() source.bounds = [Double].testSourceValue() source.scheme = Scheme.testSourceValue() source.minzoom = Double.testSourceValue() source.maxzoom = Double.testSourceValue() source.attribution = String.testSourceValue() source.volatile = Bool.testSourceValue() source.prefetchZoomDelta = Double.testSourceValue() source.minimumTileUpdateInterval = Double.testSourceValue() source.maxOverscaleFactorForParentTiles = Double.testSourceValue() // Add the source let addResult = style.addSource(source: source, identifier: "test-source") switch (addResult) { case .success(_): successfullyAddedSourceExpectation.fulfill() case .failure(let error): XCTFail("Failed to add VectorSource because of error: \(error)") } // Retrieve the source let retrieveResult = style.getSource(identifier: "test-source", type: VectorSource.self) switch (retrieveResult) { case .success(_): successfullyRetrievedSourceExpectation.fulfill() case .failure(let error): XCTFail("Failed to retrieve VectorSource because of error: \(error)") } } wait(for: [successfullyAddedSourceExpectation, successfullyRetrievedSourceExpectation], timeout: 5.0) } } // End of generated file
[ -1 ]
7c9392f5a4aea4ccc7f2d801d9198fd58d618d2f
3763f562d2c43f26c497e449572fead7f39c1e62
/LearnSwiftTests/LearnSwiftTests.swift
dc329b6ee616ba1eb2a60a275d574d23fae4e0f3
[ "Artistic-2.0" ]
permissive
huwenqiang/LearnSwift
8211e5e6ee32e9564d252d04e030b4bc1d16c37b
2813e53ec87a2ddb114ec2aee17a7a90ffb5cf8f
refs/heads/master
2020-04-18T04:14:05.499339
2015-07-27T10:00:49
2015-07-27T10:00:49
39,625,748
0
0
null
null
null
null
UTF-8
Swift
false
false
910
swift
// // LearnSwiftTests.swift // LearnSwiftTests // // Created by huwenqiang on 15/7/23. // Copyright (c) 2015年 huwenqiang. All rights reserved. // import UIKit import XCTest class LearnSwiftTests: 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. } } }
[ 276492, 278541, 305179, 278558, 307231, 313375, 102437, 227370, 360491, 276534, 241720, 276543, 159807, 286788, 280649, 223316, 315476, 223318, 288857, 227417, 278618, 194652, 194653, 194656, 276577, 309345, 227428, 43109, 276582, 276585, 223340, 276589, 278638, 227439, 276592, 131189, 223350, 276603, 276606, 292992, 276613, 141450, 311435, 215178, 311438, 276627, 276632, 184475, 227492, 196773, 129203, 299187, 131256, 176314, 280762, 223419, 299198, 309444, 227528, 276682, 276687, 278742, 278746, 196834, 280802, 276709, 276710, 276715, 233715, 227576, 157944, 211193, 168188, 276737, 276753, 276760, 309529, 278810, 276764, 299293, 282919, 262450, 315706, 278846, 164162, 311621, 280902, 227658, 276813, 278863, 6481, 6482, 276821, 276822, 6489, 276831, 323935, 276835, 321894, 416104, 276847, 285040, 278898, 280961, 178571, 227725, 178578, 190871, 293274, 61857, 61859, 276900, 278954, 278961, 278965, 293303, 276920, 278969, 33211, 276925, 278978, 278985, 281037, 278993, 276958, 287198, 227809, 358882, 227813, 279013, 279022, 281072, 279039, 276998, 287241, 279050, 186893, 303631, 223767, 223769, 277017, 291358, 277029, 293419, 277048, 301634, 369220, 277066, 295519, 66150, 277094, 166507, 189036, 277101, 189037, 295535, 189042, 189043, 287346, 277111, 279164, 277118, 291454, 184962, 303746, 152203, 225933, 277133, 133774, 225936, 277138, 277142, 230040, 164512, 225956, 285353, 225962, 209581, 205487, 285361, 303793, 154291, 299699, 293556, 154294, 342706, 285371, 285372, 285374, 199366, 225997, 226001, 164563, 277204, 203477, 226004, 226007, 279252, 119513, 203478, 201442, 226019, 279269, 285415, 342762, 277227, 226033, 230134, 234234, 209660, 279294, 234241, 226051, 209670, 277254, 226058, 234250, 234253, 234256, 285463, 234263, 369432, 234268, 105246, 228129, 234277, 234280, 279336, 289576, 234283, 277289, 234286, 277295, 234289, 234294, 230199, 162621, 234301, 289598, 234304, 281408, 162626, 293693, 277316, 234311, 234312, 299849, 234317, 277325, 277327, 293711, 234323, 234326, 277339, 234331, 301918, 234335, 279392, 349026, 234340, 174949, 234343, 277354, 234346, 234349, 277360, 234355, 213876, 277366, 234360, 234361, 279417, 209785, 177019, 277370, 234366, 234367, 158593, 234372, 226181, 113542, 213894, 226184, 234377, 277381, 228234, 226189, 234381, 295824, 226194, 234387, 234386, 234392, 324507, 279456, 234400, 277410, 234404, 289703, 234409, 275371, 234412, 236461, 234419, 234425, 234427, 277435, 287677, 234430, 234436, 275397, 234438, 226249, 52172, 234444, 234445, 183248, 275410, 234450, 234451, 234454, 234457, 275418, 234463, 234466, 277479, 179176, 234472, 234473, 234477, 234482, 287731, 277492, 314355, 234492, 277505, 234498, 234500, 277509, 277510, 234503, 234506, 230410, 277517, 234509, 197647, 277518, 295953, 275469, 277523, 234517, 230423, 281625, 197657, 281626, 175132, 234530, 234531, 234534, 275495, 234539, 275500, 310317, 277550, 234542, 275505, 234548, 277563, 234555, 7229, 7230, 7231, 156733, 234560, 277566, 238651, 230463, 234565, 277574, 207938, 234569, 300111, 207953, 277585, 296018, 234577, 296019, 234583, 234584, 275547, 277596, 234594, 230499, 281700, 277603, 300135, 234603, 281707, 275565, 156785, 312434, 275571, 234612, 300151, 234616, 398457, 234622, 300158, 285828, 302213, 275590, 234631, 253063, 277640, 302217, 234632, 275591, 234642, 226451, 308372, 275607, 119963, 234652, 234656, 277665, 330913, 306338, 234659, 275620, 234663, 275625, 300201, 208043, 275628, 226479, 238769, 226481, 277686, 208058, 277690, 230588, 283840, 279747, 279760, 290000, 189652, 363744, 195811, 298212, 304356, 285929, 279792, 298228, 204022, 120055, 234742, 228600, 120056, 208124, 204041, 292107, 277792, 339234, 199971, 304421, 277800, 277803, 113966, 277806, 226608, 226609, 300343, 277821, 277824, 277825, 226624, 15686, 277831, 226632, 294218, 177484, 222541, 277838, 142669, 277841, 296273, 222548, 277844, 277845, 314709, 283991, 357719, 224605, 218462, 224606, 179552, 142689, 230756, 277862, 163175, 281962, 173420, 277868, 284014, 279919, 277871, 226675, 275831, 181625, 277882, 277883, 142716, 275838, 275839, 277890, 277891, 275847, 277896, 277897, 281992, 230799, 318864, 112017, 296338, 277907, 206228, 306579, 226711, 226712, 310692, 277925, 279974, 277927, 282024, 370091, 277936, 277939, 279989, 296375, 277946, 277949, 296387, 415171, 163269, 296391, 300487, 277962, 282060, 277965, 280013, 312782, 284116, 277974, 228823, 228824, 277977, 277980, 226781, 277983, 277988, 310757, 316902, 277993, 277994, 296425, 277997, 278002, 306677, 300542, 306693, 153095, 192010, 149007, 65041, 282136, 204313, 278056, 278060, 286254, 228917, 194110, 128583, 276040, 366154, 276045, 276046, 286288, 276050, 280147, 300630, 243292, 147036, 282213, 317032, 222832, 276084, 276085, 276088, 278140, 188031, 276097, 192131, 276100, 276101, 229001, 310923, 278160, 282259, 276116, 276117, 276120, 278170, 280220, 276126, 282273, 282276, 278191, 278195, 276148, 296628, 198324, 286388, 278201, 276156, 278214, 276172, 323276, 276173, 302797, 212688, 302802, 276179, 276180, 286423, 216795, 216796, 276195, 153319, 313065, 280300, 419569, 276210, 276211, 276219, 194303, 288512, 311042, 288516, 278285, 276238, 227091, 184086, 294678, 284442, 278299, 276253, 276257, 278307, 288547, 165677, 159533, 276279, 276282, 276283, 276287, 345919, 276294, 282438, 276298, 216918, 276311, 307031, 237408, 282474, 288619, 276332, 110452, 276344, 194429, 227199, 40850, 40853, 44952, 247712, 294823, 276394, 276401, 276408, 161722, 290746, 276413, 276421, 276430, 231375, 153552, 153554, 276444, 280541, 276454, 276459, 296941, 278518 ]
190ff50c326617a5e25782427957a9a2c47e13d1
eff2a6e5afce25a5c46b50514145fa83052979a2
/DKImagePickerController/View/Cell/DKAssetGroupDetailImageCell.swift
b7865259d1bd523dec1a1001b1367677ebb91a07
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
kazuki-katayama/DKImagePickerController
1be6ed000e51df4afc66aece2b364534c02c6619
d3920c8ecb3149abdf4d30eddcf7f9a3613adfbb
refs/heads/master
2021-04-29T01:57:09.590308
2017-02-24T02:55:51
2017-02-24T02:55:51
78,064,066
0
0
null
2017-01-05T00:21:52
2017-01-05T00:21:52
null
UTF-8
Swift
false
false
5,014
swift
// // DKAssetGroupDetailImageCell.swift // DKImagePickerController // // Created by ZhangAo on 07/12/2016. // Copyright © 2016 ZhangAo. All rights reserved. // import UIKit class DKAssetGroupDetailImageCell: DKAssetGroupDetailBaseCell { class override func cellReuseIdentifier() -> String { return "DKImageAssetIdentifier" } override init(frame: CGRect) { super.init(frame: frame) self.thumbnailImageView.frame = self.bounds self.thumbnailImageView.autoresizingMask = [.flexibleWidth, .flexibleHeight] self.contentView.addSubview(self.thumbnailImageView) self.checkView.frame = self.bounds self.checkView.autoresizingMask = [.flexibleWidth, .flexibleHeight] self.checkView.checkImageView.tintColor = nil self.checkView.checkLabel.font = UIFont.boldSystemFont(ofSize: 14) self.checkView.checkLabel.textColor = UIColor.white self.errorView.frame = self.bounds self.errorView.autoresizingMask = [.flexibleWidth, .flexibleHeight] self.contentView.addSubview(self.checkView) self.contentView.addSubview(self.errorView) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } class DKImageErrorView: UIView{ internal lazy var checkErrorView:UIImageView = { let imageView = UIImageView(image: DKImageResource.checkedError().withRenderingMode(.alwaysOriginal)) imageView.isHidden = true return imageView }() internal lazy var errorWhiteView:UIView = { let errorWhiteView = UIView() errorWhiteView.backgroundColor = UIColor.white errorWhiteView.alpha = 0.8 errorWhiteView.isHidden = true return errorWhiteView }() override init(frame: CGRect) { super.init(frame: frame) self.addSubview(errorWhiteView) self.addSubview(checkErrorView) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func layoutSubviews() { super.layoutSubviews() let errorMarkOrigin : CGPoint = CGPoint(x:0,y:self.bounds.height - 30) let errorMarkSize : CGSize = CGSize(width: 30, height: 30) self.checkErrorView.frame = CGRect(origin:errorMarkOrigin,size:errorMarkSize) self.errorWhiteView.frame = self.bounds } } class DKImageCheckView: UIView { internal lazy var checkImageView: UIImageView = { let imageView = UIImageView(image: DKImageResource.checkedImage().withRenderingMode(.alwaysOriginal)) imageView.isHidden = true return imageView }() internal lazy var checkLabel: UILabel = { let label = UILabel() label.textAlignment = .center return label }() override init(frame: CGRect) { super.init(frame: frame) self.addSubview(checkImageView) self.addSubview(checkLabel) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func layoutSubviews() { super.layoutSubviews() let checkOrigin : CGPoint = CGPoint(x:self.bounds.width - 25,y:0) let checkSize : CGSize = CGSize(width: 25, height: 25) self.checkImageView.frame = CGRect(origin:checkOrigin,size:checkSize) self.checkLabel.frame = CGRect(origin: checkOrigin, size: checkSize) } } /* DKImageCheckView */ override var thumbnailImage: UIImage? { didSet { self.thumbnailImageView.image = self.thumbnailImage } } override var index: Int { didSet { self.checkView.checkLabel.text = "\(self.index + 1)" } } fileprivate lazy var thumbnailImageView: UIImageView = { let thumbnailImageView = UIImageView() thumbnailImageView.contentMode = .scaleAspectFill thumbnailImageView.clipsToBounds = true return thumbnailImageView }() public let checkView = DKImageCheckView() public let errorView = DKImageErrorView() override var isSelected: Bool { didSet { checkView.isHidden = !super.isSelected checkView.checkImageView.isHidden = !super.isSelected checkView.checkLabel.isHidden = !super.isSelected } } override var isSelectable: Bool { didSet { errorView.isHidden = super.isSelectable errorView.errorWhiteView.isHidden = super.isSelectable errorView.checkErrorView.isHidden = super.isSelectable } } } /* DKAssetGroupDetailCell */
[ -1 ]
9a3fe10834805bd6af229d4aca47fa4b919fc35f
bd22b0471abad511ca1658c56da8b65b32115582
/OnTheMap/OnTheMap.swift
4400b4b06829abae4d3d458ce6c42f0202dfc5a8
[]
no_license
sujaybhowmick/OnTheMap
bc2dff5864622020fc89f353834f5e2c2921aa43
29525aa7b196b6c46f6915cd08e4b2052406673b
refs/heads/master
2021-01-17T16:00:39.062693
2017-07-10T17:52:35
2017-07-10T17:52:35
95,454,021
0
0
null
null
null
null
UTF-8
Swift
false
false
502
swift
// // OnTheMap.swift // OnTheMap // // Created by Sujay Bhowmick on 6/25/17. // Copyright © 2017 Sujay Bhowmick. All rights reserved. // import Foundation struct OnTheMap { let account: [String: AnyObject] init(_ dictionary: [String: AnyObject]) { account = dictionary[OnTheMapClient.JSONResponseKeys.account] as! [String : AnyObject] } func getUserId() -> String { return (account[OnTheMapClient.JSONResponseKeys.userId] as? String)! } }
[ -1 ]