blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
625
content_id
stringlengths
40
40
detected_licenses
listlengths
0
47
license_type
stringclasses
2 values
repo_name
stringlengths
5
116
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
643 values
visit_date
timestamp[ns]
revision_date
timestamp[ns]
committer_date
timestamp[ns]
github_id
int64
80.4k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
16 values
gha_event_created_at
timestamp[ns]
gha_created_at
timestamp[ns]
gha_language
stringclasses
85 values
src_encoding
stringclasses
7 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
4
6.44M
extension
stringclasses
17 values
content
stringlengths
4
6.44M
duplicates
listlengths
1
9.02k
2665f4cfb3be27d43103d5084d3e65dbdefa8f8a
8bdd4fb971083b49793d63629c3241bb72017826
/ProyectoiOSAdriaB/Preferences.swift
8acae62c0181beb9663af7079e99ad3b8b4cbc70
[]
no_license
AdriaB-Enti/iOS_Project
02227fd7fbab3fbfba36cb441076fa4b189526fa
fa49656d5602d178c56a394c03268bc41f3eee2d
refs/heads/master
2020-04-27T12:59:48.603144
2019-06-06T17:56:28
2019-06-06T17:56:28
174,351,844
0
0
null
null
null
null
UTF-8
Swift
false
false
1,790
swift
// // Preferences.swift // ProyectoiOSAdriaB // // Created by Entipro on 2019/4/25. // Copyright © 2019 Adrià Biarnés Belso. All rights reserved. // import Foundation class Preferences { func getUserID()-> String { let defaults = UserDefaults.standard var userId = defaults.string(forKey: "userId") ?? "" print("userId") if(userId.isEmpty){ userId = UUID().uuidString defaults.set(userId,forKey: "userId" ) } print(userId) return userId //4CB1EA65-4DE9-4F56-AAB1-522B90A13A77 } //Music func getMusicEnabled()-> Bool{ let defaults = UserDefaults.standard let musicEnabled = defaults.bool(forKey: "musicEnabled") return musicEnabled } func toggleMusic(){ let defaults = UserDefaults.standard let musicEnabled = defaults.bool(forKey: "musicEnabled") defaults.set(!musicEnabled,forKey: "musicEnabled" ) } func setMusicEnabled(isEnabled:Bool){ let defaults = UserDefaults.standard defaults.set(isEnabled,forKey: "musicEnabled" ) } func setDefaultLevel(level:Level){ UserDefaults.standard.set(level.rawValue, forKey: "level") } func getDefaultLevel()->Level{ let defaults = UserDefaults.standard let level:Level = Level(rawValue:(defaults.integer(forKey: "level"))) ?? Level.easy return level } func saveUserName(name:String){ let defaults = UserDefaults.standard defaults.set(name, forKey: "username") } func getUsername()->String{ return UserDefaults.standard.string(forKey: "username") ?? "usernamNotSet" } }
[ -1 ]
60e4a4f840cc935697ba646d6d7d9519373f88eb
86e6477b3940a0aea47cc954927ecc776f2262b3
/DYZB/DYZB/Classes/Tools/Extension/UIColor-Extension.swift
d2392bddd532e9dd97a1f8e9852ead167e86b67a
[ "MIT" ]
permissive
wushixing/DouYuZB
999f3f284e99371c510d5aaf56a51efdcff1ea1c
7a09e0f48a762279c0b5df8241c9b0a5a0f182c8
refs/heads/master
2020-06-25T10:11:29.109800
2017-07-13T07:48:58
2017-07-13T07:48:58
96,972,700
0
0
null
null
null
null
UTF-8
Swift
false
false
337
swift
// // UIColor-Extension.swift // DYZB // // Created by 吴世兴 on 2017/7/13. // Copyright © 2017年 吴世兴. All rights reserved. // import UIKit extension UIColor { convenience init(red: CGFloat, green: CGFloat, blue: CGFloat) { self.init(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1.0) } }
[ -1 ]
7559c00fac64e153e4c30e86f3cdb08056a7a59b
c962a80103ba999ec9f6d242cee4543d1e5e14df
/QMUI.swift/QMUIKit/UIKitExtensions/UIViewController+QMUI.swift
2e1b6b3a6b018aa0d749de5510b31fb76e24e42f
[ "MIT" ]
permissive
huangboju/QMUI.swift
6716fc219455a49db74d180415a44220d1960d78
1003768f99c6543439bc002e9d791d5a3783bd37
refs/heads/master
2021-01-11T20:52:59.746414
2019-11-17T08:08:55
2019-11-17T08:08:55
79,201,165
106
17
MIT
2019-11-17T08:08:56
2017-01-17T07:32:07
Swift
UTF-8
Swift
false
false
18,481
swift
// // UIViewController+QMUI.swift // QMUI.swift // // Created by 伯驹 黄 on 2017/3/21. // Copyright © 2017年 伯驹 黄. All rights reserved. // extension Notification { class QMUI { /// 当主题发生变化时,会发送这个通知 static let TabBarStyleChanged = Notification.Name("Notification.QMUI.TabBarStyleChanged") } } extension UIViewController: SelfAware { private static let _onceToken = UUID().uuidString static func awake() { DispatchQueue.once(token: _onceToken) { let clazz = UIViewController.self // 为 description 增加更丰富的信息 ReplaceMethod(clazz, #selector(description), #selector(qmui_description)) // 兼容 iOS 9.0 以下的版本对 loadViewIfNeeded 方法的调用 // MARK: TODO // 修复 iOS 11 scrollView 无法自动适配不透明的 tabBar,导致底部 inset 错误的问题 // https://github.com/QMUI/QMUI_iOS/issues/218 ReplaceMethod(clazz, #selector(UIViewController.viewDidLoad), #selector(UIViewController.qmui_UIViewController_viewDidLoad)) // 实现 AutomaticallyRotateDeviceOrientation 开关的功能 ReplaceMethod(clazz, #selector(viewWillAppear(_:)), #selector(qmui_viewWillAppear(_:))) // MARK: QMUINavigationControllerTransition ReplaceMethod(clazz, #selector(viewWillAppear(_:)), #selector(qmuiNav_viewWillAppear(_:))) ReplaceMethod(clazz, #selector(viewDidAppear(_:)), #selector(qmuiNav_viewDidAppear(_:))) ReplaceMethod(clazz, #selector(viewDidDisappear(_:)), #selector(qmuiNav_viewDidDisappear(_:))) // MARK: NavigationBarTransition ReplaceMethod(clazz, #selector(viewWillLayoutSubviews), #selector(NavigationBarTransition_viewWillLayoutSubviews)) ReplaceMethod(clazz, #selector(viewWillAppear(_:)), #selector(NavigationBarTransition_viewWillAppear(_:))) ReplaceMethod(clazz, #selector(viewDidAppear(_:)), #selector(NavigationBarTransition_viewDidAppear(_:))) ReplaceMethod(clazz, #selector(viewDidDisappear(_:)), #selector(NavigationBarTransition_viewDidDisappear(_:))) ReplaceMethod(clazz, #selector(viewDidDisappear(_:)), #selector(navigationButton_viewDidAppear(_:))) } } @objc func qmui_description() -> String { var result = "\(qmui_description())\nsuperclass:\t\t\t\t\(String(describing: superclass))\ntitle:\t\t\t\t\t\(String(describing: title))\nview:\t\t\t\t\t\(isViewLoaded ? String(describing: view) : "")" if let navController = self as? UINavigationController { let navDescription = "\nviewControllers(\(navController.viewControllers.count):\t\t\(description(navController.viewControllers))\ntopViewController:\t\t\(navController.topViewController?.qmui_description() ?? "")\nvisibleViewController:\t\(navController.visibleViewController?.qmui_description() ?? "")" result = result + navDescription } else if let tabBarController = self as? UITabBarController, let viewControllers = tabBarController.viewControllers { let tabBarDescription = "\nviewControllers(\(viewControllers.count):\t\t\(description(viewControllers))\nselectedViewController(\(tabBarController.selectedIndex):\t\(tabBarController.selectedViewController?.qmui_description() ?? "")" result = result + tabBarDescription } return result } private func description(_ viewControllers:[UIViewController]) -> String { var string: String = "(\n" for (index, vc) in viewControllers.enumerated() { string += "\t\t\t\t\t\t\t[\(index)]\(vc.qmui_description())\(index < viewControllers.count - 1 ? "," : "")\n" } string += "\t\t\t\t\t\t)" return string } @objc func qmui_viewWillAppear(_ animated: Bool) { qmui_viewWillAppear(animated) if !AutomaticallyRotateDeviceOrientation { return } let statusBarOrientation = UIApplication.shared.statusBarOrientation let deviceOrientationBeforeChangingByHelper = QMUIHelper.shared.orientationBeforeChangingByHelper let shouldConsiderBeforeChanging = deviceOrientationBeforeChangingByHelper != .unknown let deviceOrientation = UIDevice.current.orientation // 虽然这两者的 unknow 值是相同的,但在启动 App 时可能只有其中一个是 unknown if statusBarOrientation == .unknown || deviceOrientation == .unknown { return } // 如果当前设备方向和界面支持的方向不一致,则主动进行旋转 var deviceOrientationToRotate: UIDeviceOrientation = interfaceOrientationMask(supportedInterfaceOrientations, contains: deviceOrientation) ? deviceOrientation : deviceOrientationWithInterfaceOrientationMask(supportedInterfaceOrientations) // 之前没用私有接口修改过,那就按最标准的方式去旋转 if !shouldConsiderBeforeChanging { if QMUIHelper.rotateToDeviceOrientation(deviceOrientationToRotate) { QMUIHelper.shared.orientationBeforeChangingByHelper = deviceOrientation } else { QMUIHelper.shared.orientationBeforeChangingByHelper = .unknown } return } // 用私有接口修改过方向,但下一个界面和当前界面方向不相同,则要把修改前记录下来的那个设备方向考虑进来 deviceOrientationToRotate = interfaceOrientationMask(supportedInterfaceOrientations, contains: deviceOrientationBeforeChangingByHelper) ? deviceOrientationBeforeChangingByHelper : deviceOrientationWithInterfaceOrientationMask(supportedInterfaceOrientations) QMUIHelper.rotateToDeviceOrientation(deviceOrientationToRotate) } private func deviceOrientationWithInterfaceOrientationMask(_ mask: UIInterfaceOrientationMask) -> UIDeviceOrientation { if mask.contains(.all) { return UIDevice.current.orientation } if mask.contains(.allButUpsideDown) { return UIDevice.current.orientation } if mask.contains(.portrait) { return .portrait } if mask.contains(.landscape) { return UIDevice.current.orientation == .landscapeLeft ? .landscapeLeft : .landscapeRight } if mask.contains(.landscapeLeft) { return .landscapeRight } if mask.contains(.landscapeRight) { return .landscapeLeft } if mask.contains(.portraitUpsideDown) { return .portraitUpsideDown } return UIDevice.current.orientation } private func interfaceOrientationMask(_ mask: UIInterfaceOrientationMask, contains deviceOrientation: UIDeviceOrientation) -> Bool { if deviceOrientation == .unknown { return true // true 表示不用额外处理 } if mask.contains(.all) { return true } if mask.contains(.allButUpsideDown) { return deviceOrientation != .portraitUpsideDown } if mask.contains(.portrait) { return deviceOrientation == .portrait } if mask.contains(.landscape) { return deviceOrientation == .landscapeLeft || deviceOrientation == .landscapeRight } if mask.contains(.landscapeLeft) { return deviceOrientation == .landscapeLeft } if mask.contains(.landscapeRight) { return deviceOrientation == .landscapeRight } if mask.contains(.portraitUpsideDown) { return deviceOrientation == .portraitUpsideDown } return true } @objc func qmui_UIViewController_viewDidLoad() { let isContainerViewController = self is UINavigationController || self is UITabBarController || self is UISplitViewController if !isContainerViewController { NotificationCenter.default.addObserver(self, selector: #selector(adjustsAdditionalSafeAreaInsetsForOpaqueTabBar(_:)), name: Notification.QMUI.TabBarStyleChanged, object: nil) } qmui_UIViewController_viewDidLoad() } @objc func adjustsAdditionalSafeAreaInsetsForOpaqueTabBar(_ notification: Notification) { if #available(iOS 11, *) { guard let object = notification.object as? UITabBar, let tabBarController = tabBarController, let navigationController = navigationController else { return } let isCurrentTabBar = navigationController.qmui_rootViewController == self && navigationController.parent == tabBarController && object == tabBarController.tabBar if !isCurrentTabBar { return } let tabBar = tabBarController.tabBar // 这串判断条件来源于这个 issue:https://github.com/QMUI/QMUI_iOS/issues/218 let isOpaqueBarAndCanExtendedLayout = !tabBar.isTranslucent && extendedLayoutIncludesOpaqueBars if !isOpaqueBarAndCanExtendedLayout { return } let tabBarHidden = tabBar.isHidden // 这里直接用 CGRectGetHeight(tabBar.frame) 来计算理论上不准确,但因为系统有这个 bug(https://github.com/QMUI/QMUI_iOS/issues/217),所以暂时用 CGRectGetHeight(tabBar.frame) 来代替 let correctSafeAreaInsetsBottom = tabBarHidden ? tabBar.safeAreaInsets.bottom : tabBar.frame.height let additionalSafeAreaInsetsBottom = correctSafeAreaInsetsBottom - tabBar.safeAreaInsets.bottom additionalSafeAreaInsets.bottom = additionalSafeAreaInsetsBottom } } } extension UIViewController { /** 获取和自身处于同一个UINavigationController里的上一个UIViewController */ weak var qmui_previousViewController: UIViewController? { if let controllers = navigationController?.viewControllers, controllers.count > 1, navigationController?.topViewController == self { let controllerCount = controllers.count return controllers[controllerCount - 2] } return nil } /** 获取上一个UIViewController的title,可用于设置自定义返回按钮的文字 */ var qmui_previousViewControllerTitle: String? { if let previousViewController = qmui_previousViewController { return previousViewController.title } return nil } /** * 获取当前controller里的最高层可见viewController(可见的意思是还会判断self.view.window是否存在) * * @see 如果要获取当前App里的可见viewController,请使用 [QMUIHelper visibleViewController] * * @return 当前controller里的最高层可见viewController */ var qmui_visibleViewControllerIfExist: UIViewController? { if let presentedViewController = presentedViewController { return presentedViewController.qmui_visibleViewControllerIfExist } if self is UINavigationController, let nav = self as? UINavigationController { return nav.visibleViewController?.qmui_visibleViewControllerIfExist } if self is UITabBarController, let tabbar = self as? UITabBarController { return tabbar.selectedViewController?.qmui_visibleViewControllerIfExist } if isViewLoaded && view.window != nil { return self } else { print("qmui_visibleViewControllerIfExist:,找不到可见的viewController。self = \(self), view.window = \(String(describing: view.window))") return nil } } /** * 当前 viewController 是否是被以 present 的方式显示的,是则返回 YES,否则返回 NO * @warning 对于被放在 UINavigationController 里显示的 UIViewController,如果 self 是 self.navigationController 的第一个 viewController,则如果 self.navigationController 是被 present 起来的,那么 self.qmui_isPresented = self.navigationController.qmui_isPresented = YES。利用这个特性,可以方便地给 navigationController 的第一个界面的左上角添加关闭按钮。 */ var qmui_isPresented: Bool { var viewController = self if let navigationController = self.navigationController { if navigationController.qmui_rootViewController != self { return false } viewController = navigationController } return viewController.presentingViewController?.presentedViewController == viewController } /** 是否响应 QMUINavigationControllerDelegate */ var qmui_respondQMUINavigationControllerDelegate: Bool { return self is QMUINavigationControllerDelegate } /** * 是否应该响应一些UI相关的通知,例如 UIKeyboardNotification、UIMenuControllerNotification等,因为有可能当前界面已经被切走了(push到其他界面),但仍可能收到通知,所以在响应通知之前都应该做一下这个判断 */ var qmui_isViewLoadedAndVisible: Bool { return isViewLoaded && (view.window != nil) } /** * UINavigationBar 在 self.view 坐标系里的 maxY,一般用于 self.view.subviews 布局时参考用 * @warning 注意由于使用了坐标系转换的计算,所以要求在 self.view.window 存在的情况下使用才可以,因此请勿在 viewDidLoad 内使用,建议在 viewDidLayoutSubviews、viewWillAppear: 里使用。 * @warning 如果不存在 UINavigationBar,则返回 0 */ var qmui_navigationBarMaxYInViewCoordinator: CGFloat { if !isViewLoaded { return 0 } // 这里为什么要把 transitionNavigationBar 考虑进去,请参考 https://github.com/QMUI/QMUI_iOS/issues/268 var navBar: UINavigationBar? = nil if let navigationController = navigationController, !navigationController.isNavigationBarHidden { navBar = navigationController.navigationBar } else if transitionNavigationBar != nil { navBar = transitionNavigationBar } guard let navigationBar = navBar else { return 0 } let navigationBarFrameInView = view.convert(navigationBar.frame, from: navigationBar.superview) let navigationBarFrame = view.bounds.intersection(navigationBarFrameInView) // 两个 rect 如果不存在交集,CGRectIntersection 计算结果可能为非法的 rect,所以这里做个保护 if !navigationBarFrame.isValidated { return 0 } let result = navigationBarFrame.maxY return result } /** * 底部 UIToolbar 在 self.view 坐标系里的占位高度,一般用于 self.view.subviews 布局时参考用 * @warning 注意由于使用了坐标系转换的计算,所以要求在 self.view.window 存在的情况下使用才可以,因此请勿在 viewDidLoad 内使用,建议在 viewDidLayoutSubviews、viewWillAppear: 里使用。 * @warning 如果不存在 UIToolbar,则返回 0 */ var qmui_toolbarSpacingInViewCoordinator: CGFloat { if !isViewLoaded { return 0 } guard let navigationController = navigationController, let toolbar = navigationController.toolbar, !navigationController.isToolbarHidden else { return 0 } let toolbarFrame = view.bounds.intersection(view.convert(toolbar.frame, from: toolbar.superview)) // 两个 rect 如果不存在交集,CGRectIntersection 计算结果可能为非法的 rect,所以这里做个保护 if !toolbarFrame.isValidated { return 0 } let result = view.bounds.height - toolbarFrame.minY return result } /** * 底部 UITabBar 在 self.view 坐标系里的占位高度,一般用于 self.view.subviews 布局时参考用 * @warning 注意由于使用了坐标系转换的计算,所以要求在 self.view.window 存在的情况下使用才可以,因此请勿在 viewDidLoad 内使用,建议在 viewDidLayoutSubviews、viewWillAppear: 里使用。 * @warning 如果不存在 UITabBar,则返回 0 */ var qmui_tabBarSpacingInViewCoordinator: CGFloat { if !isViewLoaded { return 0 } guard let tabBarController = tabBarController, !tabBarController.tabBar.isHidden else { return 0 } let tabBarFrame = view.bounds.intersection(view.convert(tabBarController.tabBar.frame, from: tabBarController.tabBar.superview)) // 两个 rect 如果不存在交集,CGRectIntersection 计算结果可能为非法的 rect,所以这里做个保护 if !tabBarFrame.isValidated { return 0 } let result = view.bounds.height - tabBarFrame.minY return result } } extension UIViewController { func qmui_hasOverrideUIKitMethod(_ selector: Selector) -> Bool { // 排序依照 Xcode Interface Builder 里的控件排序,但保证子类在父类前面 var viewControllerSuperclasses = [ UIImagePickerController.self, UINavigationController.self, UITableViewController.self, UICollectionViewController.self, UITabBarController.self, UISplitViewController.self, UIPageViewController.self, UIViewController.self, ] if NSClassFromString("UIAlertController") != nil { viewControllerSuperclasses.append(UIAlertController.self) } if NSClassFromString("UISearchController") != nil { viewControllerSuperclasses.append(UISearchController.self) } for superClass in viewControllerSuperclasses { if qmui_hasOverrideMethod(selector: selector, of: superClass) { return true } } return false } }
[ -1 ]
19dbc374107dbcabb6cc95150ddb2df28b474c16
6d858ceabbf0f478f9a4442d9c3adbf52154427a
/ClusterStocks/AWS/CSClusterStockAPIClient.swift
dd4163ed602712a30953a095e370d551b939a3d0
[]
no_license
cluster-stocks/cluster-stocks-iOS
eac7606062675be40d139ddcabc6f8d734cce799
b1da1e8061553873744e5f8ce0333d0cb4d06082
refs/heads/master
2020-06-25T13:52:57.272079
2019-07-27T22:55:43
2019-07-27T22:55:43
188,947,727
0
0
null
null
null
null
UTF-8
Swift
false
false
11,689
swift
/* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0 or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import AWSCore import AWSAPIGateway public class CSClusterStockAPIClient: AWSAPIGatewayClient { static let AWSInfoClientKey = "CSClusterStockAPIClient" private static let _serviceClients = AWSSynchronizedMutableDictionary() private static let _defaultClient:CSClusterStockAPIClient = { var serviceConfiguration: AWSServiceConfiguration? = nil let serviceInfo = AWSInfo.default().defaultServiceInfo(AWSInfoClientKey) if let serviceInfo = serviceInfo { serviceConfiguration = AWSServiceConfiguration(region: serviceInfo.region, credentialsProvider: serviceInfo.cognitoCredentialsProvider) } else if (AWSServiceManager.default().defaultServiceConfiguration != nil) { serviceConfiguration = AWSServiceManager.default().defaultServiceConfiguration } else { serviceConfiguration = AWSServiceConfiguration(region: .Unknown, credentialsProvider: nil) } return CSClusterStockAPIClient(configuration: serviceConfiguration!) }() /** Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `AWSServiceManager.defaultServiceManager()`. The reference to this object is maintained by the SDK, and you do not need to retain it manually. If you want to enable AWS Signature, set the default service configuration in `func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?)` func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider) AWSServiceManager.default().defaultServiceConfiguration = configuration return true } Then call the following to get the default service client: let serviceClient = CSClusterStockAPIClient.default() Alternatively, this configuration could also be set in the `info.plist` file of your app under `AWS` dictionary with a configuration dictionary by name `CSClusterStockAPIClient`. @return The default service client. */ public class func `default`() -> CSClusterStockAPIClient{ return _defaultClient } /** Creates a service client with the given service configuration and registers it for the key. If you want to enable AWS Signature, set the default service configuration in `func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?)` func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) CSClusterStockAPIClient.registerClient(withConfiguration: configuration, forKey: "USWest2CSClusterStockAPIClient") return true } Then call the following to get the service client: let serviceClient = CSClusterStockAPIClient.client(forKey: "USWest2CSClusterStockAPIClient") @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors. @param configuration A service configuration object. @param key A string to identify the service client. */ public class func registerClient(withConfiguration configuration: AWSServiceConfiguration, forKey key: String){ _serviceClients.setObject(CSClusterStockAPIClient(configuration: configuration), forKey: key as NSString); } /** Retrieves the service client associated with the key. You need to call `registerClient(withConfiguration:configuration, forKey:)` before invoking this method or alternatively, set the configuration in your application's `info.plist` file. If `registerClientWithConfiguration(configuration, forKey:)` has not been called in advance or if a configuration is not present in the `info.plist` file of the app, this method returns `nil`. For example, set the default service configuration in `func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) ` func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) CSClusterStockAPIClient.registerClient(withConfiguration: configuration, forKey: "USWest2CSClusterStockAPIClient") return true } Then call the following to get the service client: let serviceClient = CSClusterStockAPIClient.client(forKey: "USWest2CSClusterStockAPIClient") @param key A string to identify the service client. @return An instance of the service client. */ public class func client(forKey key: String) -> CSClusterStockAPIClient { objc_sync_enter(self) if let client: CSClusterStockAPIClient = _serviceClients.object(forKey: key) as? CSClusterStockAPIClient { objc_sync_exit(self) return client } let serviceInfo = AWSInfo.default().defaultServiceInfo(AWSInfoClientKey) if let serviceInfo = serviceInfo { let serviceConfiguration = AWSServiceConfiguration(region: serviceInfo.region, credentialsProvider: serviceInfo.cognitoCredentialsProvider) CSClusterStockAPIClient.registerClient(withConfiguration: serviceConfiguration!, forKey: key) } objc_sync_exit(self) return _serviceClients.object(forKey: key) as! CSClusterStockAPIClient; } /** Removes the service client associated with the key and release it. @warning Before calling this method, make sure no method is running on this client. @param key A string to identify the service client. */ public class func removeClient(forKey key: String) -> Void{ _serviceClients.remove(key) } init(configuration: AWSServiceConfiguration) { super.init() self.configuration = configuration.copy() as! AWSServiceConfiguration var URLString: String = "https://nye3pj4ot5.execute-api.us-east-1.amazonaws.com/production" if URLString.hasSuffix("/") { URLString = URLString.substring(to: URLString.index(before: URLString.endIndex)) } self.configuration.endpoint = AWSEndpoint(region: configuration.regionType, service: .APIGateway, url: URL(string: URLString)) let signer: AWSSignatureV4Signer = AWSSignatureV4Signer(credentialsProvider: configuration.credentialsProvider, endpoint: self.configuration.endpoint) if let endpoint = self.configuration.endpoint { self.configuration.baseURL = endpoint.url } self.configuration.requestInterceptors = [AWSNetworkingRequestInterceptor(), signer] } /* @param ticker return type: CSStockGetResponseMethodModel */ public func stockGet(ticker: String) -> AWSTask<CSStockGetResponseMethodModel> { let headerParameters = [ "Content-Type": "application/json", "Accept": "application/json", ] var queryParameters:[String:Any] = [:] queryParameters["Ticker"] = ticker let pathParameters:[String:Any] = [:] return self.invokeHTTPRequest("GET", urlString: "/stock", pathParameters: pathParameters, queryParameters: queryParameters, headerParameters: headerParameters, body: nil, responseClass: CSStockGetResponseMethodModel.self) as! AWSTask<CSStockGetResponseMethodModel> } /* @param body return type: CSStockPostResponseMethodModel */ public func stockPost(body: CSStockPostRequestMethodModel) -> AWSTask<CSStockPostResponseMethodModel> { let headerParameters = [ "Content-Type": "application/json", "Accept": "application/json", ] let queryParameters:[String:Any] = [:] let pathParameters:[String:Any] = [:] return self.invokeHTTPRequest("POST", urlString: "/stock", pathParameters: pathParameters, queryParameters: queryParameters, headerParameters: headerParameters, body: body, responseClass: CSStockPostResponseMethodModel.self) as! AWSTask<CSStockPostResponseMethodModel> } /* @param userName return type: CSUserGetResponseMethodModel */ public func userGet(userName: String) -> AWSTask<CSUserGetResponseMethodModel> { let headerParameters = [ "Content-Type": "application/json", "Accept": "application/json", ] var queryParameters:[String:Any] = [:] queryParameters["UserName"] = userName let pathParameters:[String:Any] = [:] return self.invokeHTTPRequest("GET", urlString: "/user", pathParameters: pathParameters, queryParameters: queryParameters, headerParameters: headerParameters, body: nil, responseClass: CSUserGetResponseMethodModel.self) as! AWSTask<CSUserGetResponseMethodModel> } /* @param body return type: CSUserPutResponseMethodModel */ public func userPut(body: CSUserPutRequestMethodModel) -> AWSTask<CSUserPutResponseMethodModel> { let headerParameters = [ "Content-Type": "application/json", "Accept": "application/json", ] let queryParameters:[String:Any] = [:] let pathParameters:[String:Any] = [:] return self.invokeHTTPRequest("PUT", urlString: "/user", pathParameters: pathParameters, queryParameters: queryParameters, headerParameters: headerParameters, body: body, responseClass: CSUserPutResponseMethodModel.self) as! AWSTask<CSUserPutResponseMethodModel> } /* @param body return type: CSUserPostResponseMethodModel */ public func userPost(body: CSUserPostRequestMethodModel) -> AWSTask<CSUserPostResponseMethodModel> { let headerParameters = [ "Content-Type": "application/json", "Accept": "application/json", ] let queryParameters:[String:Any] = [:] let pathParameters:[String:Any] = [:] return self.invokeHTTPRequest("POST", urlString: "/user", pathParameters: pathParameters, queryParameters: queryParameters, headerParameters: headerParameters, body: body, responseClass: CSUserPostResponseMethodModel.self) as! AWSTask<CSUserPostResponseMethodModel> } }
[ -1 ]
89127cc1d721b70f40760571f7394ea1a9345941
8be92b126c1748bcbb4cd8f189fc4250e3346839
/Sources/SugarUI/Extenions/Color.swift
ed42a0f666aa296d81117066fbad9e5c0c3a8a08
[ "MIT" ]
permissive
kerekesmarton/SugarUI
3fca2330fbda3c05186f7dc4ab15e1d8699dbc33
f3ed4b6be4d6d5848528619e6fbf2a4655960542
refs/heads/master
2023-05-05T12:56:43.010442
2021-05-28T06:18:54
2021-05-28T06:18:54
349,740,839
0
0
null
null
null
null
UTF-8
Swift
false
false
1,049
swift
import SwiftUI extension Color { public enum Theme: String, CaseIterable, Identifiable { case primary case secondary case disabled case background case success case error case warning public var id: String { rawValue } } public init(_ value: Theme) { self = Color(value.rawValue) } public enum Dim: Double { case d60 = 0.6 case d40 = 0.4 case d20 = 0.2 } public func dim(_ value: Dim) -> Color { self.opacity(value.rawValue) } } struct Color_Previews: PreviewProvider { static var previews: some View { VStack { ForEach(Color.Theme.allCases) { theme in ZStack(alignment: .center) { Color(theme) Text(theme.rawValue.capitalized) .font(Font(.title1)) .foregroundColor(Color.white) } } } } }
[ -1 ]
57eec4d290138fd06a32ec7b8c0a5ad716bf7314
145dcd6621c5e055cc1d89e47839d56ced59c402
/KerbalHUD/NavBall.swift
c53e9a35d25febe0c351cb7a5784d33e3dec52db
[ "MIT" ]
permissive
yzfx303/KerbalHUD
3d24a3cb5f3ce40241323154f8039726463b9fe0
e38953ecb00ad1c016de554cd5d43483d1ea7c81
refs/heads/master
2022-02-26T15:04:23.135193
2015-09-21T22:05:05
2015-09-21T22:06:44
null
0
0
null
null
null
null
UTF-8
Swift
false
false
5,371
swift
// // NavBall.swift // KerbalHUD // // Created by Nicholas Devenish on 07/09/2015. // Copyright © 2015 Nicholas Devenish. All rights reserved. // import UIKit class NavBall : LayeredInstrument { init(tools : DrawingTools) { glPushGroupMarkerEXT(0, "Creating Instrument: Navball") defer { glPopGroupMarkerEXT() } var config = InstrumentConfiguration() config.overlay = SVGOverlay(url: NSBundle.mainBundle().URLForResource("RPM_NavBall_Overlay", withExtension: "svg")!) // Fixed text labels config.text = [ t("Altitude", x: 83, y: 49, size: 15), t("SRF.SPEED", x: 640-83, y: 49, size: 15), t("ORB.VELOCITY", x: 83, y: 640-554, size: 15), t("ACCEL.", x: 640-83, y: 640-554, size: 15), t("MODE", x: 54, y: 640-489, size: 15), t("ROLL", x: 36, y: 640-434, size: 15), t("PITCH", x: 599, y: 640-434, size: 15), t("RADAR ALTITUDE", x: 104, y: 640-47 , size: 15), t("HOR.SPEED", x: 320, y: 640-47 , size: 15), t("VERT.SPEED", x: 534, y: 640-47 , size: 15), ] // Simple display text config.text.appendContentsOf([ t("%03.1f°", Vars.Flight.Roll, x: 67, y: 240), t("%03.1f°", Vars.Flight.Pitch, x: 573, y: 240), t("%03.1f°", Vars.Flight.Heading, x: 320, y: 80), t("{0:SIP_6.1}m", Vars.Vessel.Altitude, x: 83.5, y: 22), t("{0,4:SIP4}m/s", "v.surfaceSpeed", x: 556.5, y: 22), t("{0:SIP_6.1}m", "v.orbitalVelocity", x: 83.5, y: 115), t("{0:SIP4}m/s", "rpm.ACCEL", x: 556.5, y: 115), t("{0:ORB;TGT;SRF}", Vars.Vessel.SpeedDisplay, x: 55, y: 177), t("{0:SIP_6.3}m", "rpm.RADARALTOCEAN", x: 95, y: 623), t("{0:SIP_6.3}m", "rpm.HORZVELOCITY", x: 320, y: 623), t("{0:SIP_6.3}m", "v.verticalSpeed", x: 640-95, y: 623) ]) // Various control Status displays config.text.appendContentsOf([ t("SAS:", x: 10, y: 280, align: .Left, size: 20), t("RCS:", x: 10, y: 344, align: .Left, size: 20), t("Throttle:", x: 10, y: 408, align: .Left, size: 20), t("{0:P0}", Vars.Vessel.Throttle, x: 90, y: 440, align: .Right), t("Gear:", x: 635, y: 290, align: .Right, size: 20), t("Brakes:", x: 635, y: 344, align: .Right, size: 20), t("Lights:", x: 635, y: 408, align: .Right, size: 20), ]) // Conditional text entries collections for the status displays config.text.appendContentsOf([ tOnOff(Vars.Vessel.SAS, x: 43, y: 640-312), tOnOff(Vars.Vessel.RCS, x: 43, y: 640-376), tOnOff(Vars.Vessel.Brakes, x: 640-43, y: 640-(344+32)), tOnOff(Vars.Vessel.Lights, x: 640-43, y: 640-(408+32)), tOnOff(Vars.Vessel.Gear, x: 640-43, y: 640-312, onText: "Down", offText: "Up"), ].flatMap({$0})) // Time to node text config.text.appendContentsOf([ t("Burn T:", x: 10, y: 472, size: 20, align: .Left, color: nil, condition: Vars.RPM.Node.Exists), t("{0:METS.f}s", Vars.RPM.Node.BurnTime, x: 10, y: 408+64+32, align: .Left, color: nil, condition: Vars.RPM.Node.Exists), t("Node in T", x: 10, y: 408+64+64, align: .Left, size: 20, color: nil, condition: Vars.RPM.Node.Exists), t("{0,17:MET+yy:ddd:hh:mm:ss.f}", Vars.RPM.Node.TimeTo, x: 10, y: 408+64+64+32, align: .Left, color: nil, condition: Vars.RPM.Node.Exists), t("ΔV", x: 640-10, y: 408+64+64, align: .Right, size: 20, color: nil, condition: Vars.RPM.Node.Exists), t("{0:SIP_6.3}m/s", Vars.RPM.Node.DeltaV, x: 630, y: 408+64+64+32, align: .Right, color: nil, condition: Vars.RPM.Node.Exists) ]) super.init(tools: tools, config: config) // Add the navball widgets.append(NavBallWidget(tools: tools, bounds: FixedBounds(centerX: 320, centerY: 338, width: 430, height: 430))) // 167 - 473 x 50 let s = ScaledBarSettings(variable: Vars.Flight.Heading, scale: .LinearWrapped, ticks: .Up, range: 90) widgets.append(ScaledBarWidget(tools: tools, bounds: FixedBounds(left: 167, bottom: 590, right: 473, top: 640), config: s)) } } private func t(string : String, x: Float, y: Float, size: Float = 32, align: NSTextAlignment = .Center, color: Color4? = nil, condition: String? = nil) -> TextEntry { return TextEntry(string: string, size: size, position: Point2D(x,640-y), align: align, variables: [], font: "", condition : condition, color: color) } private func t(string : String, _ variable : String, x: Float, y: Float, size: Float = 32, align: NSTextAlignment = .Center, color: Color4? = nil, condition: String? = nil) -> TextEntry { return TextEntry(string: string, size: size, position: Point2D(x,640-y), align: align, variables: [variable], font: "", condition : condition, color: color) } private func tOnOff(condition: String, x: Float, y: Float, onText: String = "On", offText: String = "Off") -> [TextEntry] { return [ TextEntry(string: onText, size: 32, position: Point2D(x, y), align: .Center, variables: [], font: "", condition: condition, color: Color4.Green), TextEntry(string: offText, size: 32, position: Point2D(x, y), align: .Center, variables: [], font: "", condition: "!" + condition, color: nil) ] }
[ -1 ]
930230f35151aa083f73aed8540b33bc3fae55b3
3d389098de40c8be9af6927a9f5d0b209f6956d0
/KinSampleApp/KinSampleApp/AppDelegate.swift
866fab068658bf3840272e97d9e736f14115ead2
[ "MIT" ]
permissive
tangjingyuan/kin-sdk-ios
7de18c9f2c9097e0f5619436e469a30f7961e369
df851eb601e256f301a4fa18f829920d7d6839db
refs/heads/master
2020-05-02T03:51:33.508991
2019-03-26T08:51:16
2019-03-26T08:51:16
177,737,875
0
0
MIT
2019-03-26T07:40:11
2019-03-26T07:40:11
null
UTF-8
Swift
false
false
2,205
swift
// // AppDelegate.swift // KinSampleApp // // Created by Kin Foundation // Copyright © 2017 Kin Foundation. 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. window?.tintColor = .kin 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, 229391, 327695, 229394, 229397, 229399, 229402, 278556, 229405, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 279178, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 287390, 303773, 172705, 287394, 172707, 303780, 164509, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 230061, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 213895, 304009, 304011, 230284, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 234648, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 132165, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 148946, 280021, 239064, 329177, 288217, 280027, 288220, 288214, 239070, 288218, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 320998, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280458, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 354656, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 281095, 223752, 150025, 338440, 240132, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 142226, 289687, 240535, 224151, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 298365, 290174, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307386, 258235, 307388, 307385, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 291197, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 176592, 127440, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 160221, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 135717, 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, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 381677, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 316294, 201603, 226182, 308105, 234375, 324490, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 291754, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 234437, 226245, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 324757, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 226500, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 227426, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 276053, 284249, 284251, 300638, 284253, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 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, 178006, 317271, 284502, 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, 292776, 276395, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 276433, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 301163, 350313, 350316, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 252022, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 276617, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 227571, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 146052, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277314, 277317, 277322, 293706, 277329, 162643, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 56313, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 146765, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 286169, 163290, 228825, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 302617, 286233, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 24528, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 237562 ]
56b18c64e7f399c206cc0df7ac2e9c8b6ff697b7
b3aab352db76e6894502690dbe13c42b3ff7b693
/SimpleTipCalculatorV.1/UITextField+Conversion.swift
cb123364a5bb2aace5f4368b144e81fa89136686
[]
no_license
GuelorEmanuel/SimpleTipCalculatorV.1
43db0f3568fab70e660de51c9b43bc4df09e60b5
55afffd9b112fc5f53f0e388fd3f83319db1fd62
refs/heads/master
2020-12-24T15:31:48.526908
2015-03-01T20:09:33
2015-03-01T20:09:33
31,508,958
0
0
null
null
null
null
UTF-8
Swift
false
false
477
swift
// // An extension class used for conversion and formating // UITextField+Conversion.swift // SimpleTipCalculatorV.1 // // Created by Guelor Emanuel on 2015-02-12. // Copyright (c) 2015 Guelor Emanuel. All rights reserved. // import UIKit extension String { var floatValue: Float { return (self as NSString).floatValue } } extension Float { var answerFormat:NSString { return (NSString(format: "%0.2f",self as Float)) } }
[ -1 ]
bd2f58a5280475c3977ee15e15bc65308db1f4a6
96bd3ce9b97fca9a2996cea71dc0d9832d44aad5
/days-until-grad-apple-watch Extension/InterfaceController.swift
e8117da993cc49103a224f3ec6aa41109ee58111
[]
no_license
NathanJang/days-until-grad
68b83326e4eeb1326436edb48862f07e15f04c1a
ff970bf4e40a87036671938cfacdda11d5bffff4
refs/heads/master
2021-01-19T22:24:47.543185
2017-04-20T02:29:55
2017-04-20T02:29:55
88,812,050
0
0
null
null
null
null
UTF-8
Swift
false
false
1,262
swift
// // InterfaceController.swift // days-until-grad-apple-watch Extension // // Created by Jonathan Chan on 2016-02-17. // Copyright © 2016 Jonathan Chan. All rights reserved. // import WatchKit import Foundation class InterfaceController: WKInterfaceController { override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context) // Configure interface objects here. self.redoLabels() self.timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: "redoLabels", userInfo: nil, repeats: true) } override func willActivate() { // This method is called when watch view controller is about to be visible to user super.willActivate() } override func didDeactivate() { // This method is called when watch view controller is no longer visible super.didDeactivate() } @IBOutlet var numberLabel: WKInterfaceLabel! @IBOutlet var textLabel: WKInterfaceLabel! var timer: NSTimer? func redoLabels() { let timeLeft = GraduationDate.graduationDate.readableTimeLeft() self.numberLabel.setText("\(timeLeft.number)") self.textLabel.setText("\(timeLeft.text)") } }
[ -1 ]
f76b0b8325223f517e23b93a0f757709acbf1862
4a6da84c0ac9f93d67cbef2ee5fd1298090699d7
/Utilities/VIPER/Types.swift
47bd34a3d4ecb960657dec0efcb7306a8fbc78ac
[]
no_license
tolga87/Peynir
308a1249b30acfba92cae93c18e82b38c99c4cf2
6f86ec3cebca37a5fd42abc2fecb57f2a325aea4
refs/heads/master
2021-09-23T12:23:06.162109
2021-09-20T04:15:54
2021-09-20T04:15:54
225,237,448
1
0
null
null
null
null
UTF-8
Swift
false
false
247
swift
// // Types.swift // Peynir // // Created by Tolga AKIN on 9/19/21. // Copyright © 2021 Tolga AKIN. All rights reserved. // import Foundation public protocol InteractorEvent { } public protocol ViewState {} public protocol ViewAction { }
[ -1 ]
881b5f8ea4ffc517847bb7ba89004a4ead51707b
fbc257b12e96d5fb730d256e08adba500008a679
/Learn-and-Master-RxSwift/Learn-and-Master-RxSwift/AppDelegate.swift
71a1f2e8cd39abaf1cca10d6d7a3572a0bc23391
[]
no_license
MohamedJaberi123/Learn-and-Master-RxSwift
d295180d04e3bdbce76c7ddb4516af92ab02e032
2b6902c8c147caa67f6e8c196e5fb9fd246121e7
refs/heads/master
2020-09-14T13:56:30.423116
2017-03-05T15:42:37
2017-03-05T15:42:37
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,197
swift
// // AppDelegate.swift // Learn-and-Master-RxSwift // // Created by Sebastian Boldt on 22.02.17. // Copyright © 2017 Sebastian Boldt. 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, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 288214, 280021, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 320998, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 206336, 296450, 148990, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 313027, 280260, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 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, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 148946, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 176592, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 324490, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 234648, 308379, 300189, 324766, 119967, 234653, 324768, 234657, 283805, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 275725, 349464, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 276206, 358128, 284399, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 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, 137946, 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, 310080, 293696, 277317, 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, 293817, 293820, 203715, 326603, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 285835, 302218, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
0b030b4af7b5efe397809e7d9260000879c401cb
2d8914df4febf0b573bfb129633c27ad751011fd
/YTMaps/ResultsViewController.swift
4fe8649ba4dfffb78af3c635f29b4f675d235d18
[]
no_license
akshaypatil5634/maps-swift
6467195723e9b1323ad531d77f0e91e5903a3005
2497880a4a6a2832cdc0fafc1bfed7c0d1a7dc18
refs/heads/main
2023-04-18T15:15:14.112055
2021-04-29T04:29:11
2021-04-29T04:29:11
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,191
swift
// // ResultsViewController.swift // YTMaps // // Created by Pipe Carrasco on 28-04-21. // import UIKit import CoreLocation protocol ResultsViewControllerDelegate: AnyObject { func didTapPlace(with coordinates: CLLocationCoordinate2D) } class ResultsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { weak var delegate: ResultsViewControllerDelegate? private let tableView: UITableView = { let table = UITableView() table.register(UITableViewCell.self, forCellReuseIdentifier: "cell") return table }() private var places: [Place] = [] override func viewDidLoad() { super.viewDidLoad() view.addSubview(tableView) view.backgroundColor = .clear tableView.delegate = self tableView.dataSource = self } override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() tableView.frame = view.bounds } public func update(with places: [Place]){ self.tableView.isHidden = false self.places = places print(places.count) tableView.reloadData() } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return places.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) cell.textLabel?.text = places[indexPath.row].name return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) tableView.isHidden = true let place = places[indexPath.row] GooglePlacesManager.shared.resolveLocation(for: place){ result in switch result { case .success(let coordinate): DispatchQueue.main.async { self.delegate?.didTapPlace(with: coordinate) } case .failure(let error): print(error) } } } }
[ -1 ]
6677dfd554536c7d693a3cc6e8af811ca38ecd9b
d83bf1a5a671ed8c67135a9f2372d0a9769fe0bb
/Sources/XWAppKit-Swift/Filter/Filters/CIDotScreen.swift
87a770af1f6c7cb0f3d7091c72d1303af2302eaa
[ "MIT" ]
permissive
brianjohnson21/XWAppKit_Swift
cd876c0a90afd6a1813e979fb58d43413adf1620
a1eb18e472040930b8ac019c273d96fd4c71c795
refs/heads/master
2023-03-13T09:37:58.802152
2021-03-03T05:55:02
2021-03-03T05:55:02
null
0
0
null
null
null
null
UTF-8
Swift
false
false
923
swift
import Foundation import CoreImage public class CIDotScreen: ImageFilter { public init() { super.init(name: "CIDotScreen") } public func inputWidth(_ inputWidth: Double) -> CIDotScreen { filter.setValue(inputWidth, forKey:"inputWidth") return self } public func inputCenter(_ inputCenter: CIVector?) -> CIDotScreen { filter.setValue(inputCenter, forKey:"inputCenter") return self } public func inputSharpness(_ inputSharpness: Double) -> CIDotScreen { filter.setValue(inputSharpness, forKey:"inputSharpness") return self } override public func inputImage(_ inputImage: CIImage?) -> CIDotScreen { filter.setValue(inputImage, forKey:"inputImage") return self } public func inputAngle(_ inputAngle: Double) -> CIDotScreen { filter.setValue(inputAngle, forKey:"inputAngle") return self } }
[ -1 ]
38122fd21c124ff7ed9f61ed307f46f6a0779e9e
841f225a7f17d64404d8f4c33e053e2554d4d063
/Sandbox/Sandbox WatchKit Extension/DemoController/DataStorageController.swift
de1720874245bf8457f9dd226c160c029e9084a9
[]
no_license
agonzalezreyes/cs191
9823199f04a1018ae41769643d733c43f47c8630
1b951ac316252eba4345c391236284332e993587
refs/heads/master
2023-03-24T09:58:05.042176
2021-03-19T23:07:19
2021-03-19T23:07:19
349,229,129
0
0
null
null
null
null
UTF-8
Swift
false
false
1,982
swift
import WatchKit import UIKit class DataStorageController: WKInterfaceController { override func awake(withContext context: Any?) { super.awake(withContext: context) // Keychain Storage let saveKey = "Sandbox" let saveString = "Save Sandbox" saveToKeychain(key: saveKey, text: saveString) // Keychain Reading let text = readFromKeychain(key: saveKey) print(text ?? "Keychain: Found Nothing by \(saveKey)") // Accessing Settings at Runtime if let defaults = UserDefaults(suiteName: groupKeyTemp) { let numberString = defaults.object(forKey: "number") print(numberString ?? "UserDefaults: 'number' is Null") } // Use App Group URL let groupContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: groupKeyRecord) let textURL = groupContainer!.appendingPathComponent("record.text") print(textURL) do { let text = try String(contentsOf: textURL, encoding: String.Encoding.utf8) print(text) } catch { print("error") } // WatchKit Extension SandBox Path let paths = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.cachesDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) let cachePath = paths[0] print(cachePath) } func saveToKeychain(key: String, text: String) { let data = text.data(using: String.Encoding.unicode) as AnyObject KeychainHelper.saveKeychain(service: key, data: data) } func readFromKeychain(key: String) -> String? { var text: String? if let data = KeychainHelper.readKeychain(service: key) as? Data { text = String(data: data, encoding: String.Encoding.unicode) } return text } }
[ -1 ]
2eefcc73c8e8e68e314d003988c63449b53a49f7
8fbf478854699af52c3ee03ab3c96f4df5b503d9
/VIPERTodo/TODODetailModule/TodoDetailViewController.swift
1a7bf4478cf9d5f2adfde457da1c92ee0c5ebabf
[]
no_license
BerryMelon/VIPERTodo
a978167f89919586a7886a79126a3f5ac25d02b9
add934462d91bd4d7f1877c9290a3828e71e4819
refs/heads/master
2020-03-28T10:00:00.000427
2018-09-09T23:35:41
2018-09-09T23:43:48
148,074,818
0
0
null
null
null
null
UTF-8
Swift
false
false
1,282
swift
// // TodoDetailViewController.swift // VIPERTodo // // Created by Doheny Yoon on 9/9/18. // Copyright © 2018 Doheny Yoon. All rights reserved. // import UIKit class TodoDetailViewController: UIViewController { @IBOutlet weak var todoTitleLabel: UILabel! @IBOutlet weak var dueDateLabel: UILabel! var presenter:TodoDetailPresentation? override func viewDidLoad() { super.viewDidLoad() self.presenter?.onViewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ } extension TodoDetailViewController:TodoDetailView { func reload(withTodoData todoData: TodoRepresentType) { self.todoTitleLabel.text = todoData.todo self.dueDateLabel.text = todoData.dueDate } }
[ -1 ]
220749c4db4d30f49ba8cec324b977a557db92a6
e2d5d22cc2cf67c88404b66904f4a88e6e3b1799
/Pods/TSAVideoCallSDK/TSAVideoCallSDK/TSAVideoCallView.swift
cfe87906cbd32a53217248e5264c6f8af744e2cf
[]
no_license
smpb05/TSAVideoCallSDKHB
20c358751669c11f8099e1d6f0d9630e21add6d6
4e1392b7681a36ce6e9b99b1c2a2c7d751d047c9
refs/heads/main
2023-08-14T20:57:52.410131
2021-10-18T05:13:35
2021-10-18T05:13:35
383,715,899
0
0
null
null
null
null
UTF-8
Swift
false
false
2,542
swift
// // TSAVideoCallView.swift // TSAVideoCallSDK // // Created by smartex on 08.07.2021. // import Foundation import UIKit import WebRTC public class TSAVideoCallView: UIView{ var videoSize: CGSize = CGSize() var lowLevel: [UIImage]? = nil var mediumLevel: [UIImage]? = nil var loudLevel: [UIImage]? = nil lazy var micButton: UIImageView = { let micButton = UIImageView() return micButton }() lazy var textMessage: UILabel = { let textMessage = UILabel() return textMessage }() lazy var videoView: RTCEAGLVideoView = { let videoView = RTCEAGLVideoView(frame: .zero) videoView.transform = CGAffineTransform.init(scaleX: -1.0, y: 1.0) videoView.contentMode = UIView.ContentMode.scaleAspectFill return videoView }() override init(frame: CGRect) { super.init(frame: frame) videoSize.width = frame.width videoSize.height = frame.height setupView() } required init?(coder: NSCoder) { super.init(coder: coder) setupView() } public func setVideoSize(size: CGSize){ videoSize = size } public func getVideoSize() -> CGSize{ return videoSize } private func setupView(){ addSubview(videoView) addSubview(micButton) } public func getVideoView() -> RTCEAGLVideoView { return videoView } public func getMicView() -> UIImageView { return micButton } public func setAudioLevel(level: NSNumber){ let level = Int(truncating: level) if (level > 0 && level < 30){ if let loudLevel = loudLevel { micButton.animationImages = loudLevel } }else if(level >= 30 && level < 60){ if let mediumLevel = mediumLevel { micButton.animationImages = mediumLevel } }else{ if let lowLevel = lowLevel { micButton.animationImages = lowLevel } } if micButton.animationImages != nil { micButton.animationDuration = 1 micButton.startAnimating() } } public func stopAnimation(){ micButton.stopAnimating() } public func animationSet(lowLevel: [UIImage], mediumLevel: [UIImage], loudLevel: [UIImage]){ self.lowLevel = lowLevel self.mediumLevel = mediumLevel self.loudLevel = loudLevel } }
[ -1 ]
d3b8cb4b827f770c6bcc0ec1ca5ce74a7d8dd47b
b07ce15681e7468ae09f93cc057a3bd00faae410
/BloodMed/SceneDelegate.swift
d344e2d521f367c26c5390d1ae9178d68703de62
[]
no_license
kenny0412/BloodMed
39db3cf58b2273a090c3f62cf59007b21f3af53e
3bdee347e00c8ad150ad69e9843588c30f3386de
refs/heads/master
2023-01-30T13:34:48.177786
2020-12-09T16:52:11
2020-12-09T16:52:11
319,478,558
0
0
null
null
null
null
UTF-8
Swift
false
false
2,364
swift
// // SceneDelegate.swift // BloodMed // // Created by Kenny Cardenas Reyes on 9/14/20. // Copyright © 2020 Kenny Cardenas Reyes. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 393277, 376906, 327757, 254032, 368728, 254045, 180322, 376932, 286845, 286851, 417925, 262284, 360598, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 377047, 418008, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 385281, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 360917, 369119, 328180, 328183, 328190, 254463, 328193, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 385671, 148106, 377485, 352919, 98969, 344745, 361130, 336556, 385714, 434868, 164535, 164539, 328379, 328387, 352969, 418508, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 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, 361537, 377931, 189525, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 345247, 361645, 345268, 402615, 361657, 402636, 328925, 165086, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 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, 214594, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 403139, 337607, 419528, 419531, 272083, 394967, 419543, 419545, 345819, 419548, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 362274, 378664, 354107, 345916, 354112, 370504, 329545, 345932, 370510, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 247760, 346064, 346069, 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, 436474, 379135, 411905, 411917, 379154, 395539, 387350, 387353, 338201, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 321911, 420237, 379279, 272787, 354728, 338353, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 248309, 248332, 330254, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 338544, 191093, 346743, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 264942, 363252, 338680, 264965, 338701, 256787, 363294, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 199681, 338951, 330761, 330769, 330775, 248863, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 248915, 183384, 339037, 412765, 257121, 265321, 248952, 420985, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 437588, 396634, 175451, 437596, 429408, 175458, 175461, 175464, 265581, 331124, 175478, 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, 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, 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, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 257869, 257872, 225105, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 225128, 257897, 225138, 257909, 225142, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 438438, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 340276, 356662, 397623, 332091, 225599, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 250203, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 340628, 184983, 373399, 258723, 332455, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 340724, 332534, 373499, 348926, 389927, 348979, 398141, 357202, 389971, 357208, 389979, 430940, 357212, 357215, 439138, 349041, 340850, 381815, 430967, 324473, 398202, 119675, 340859, 324476, 430973, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 210132, 333016, 210139, 210144, 218355, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 349486, 349492, 415034, 210261, 365912, 259423, 374113, 251236, 374118, 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, 333396, 333400, 366173, 423529, 423533, 210547, 415354, 333440, 267910, 267929, 259789, 366301, 333535, 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, 341839, 341844, 415574, 358235, 350046, 399200, 399208, 268144, 358256, 358260, 399222, 325494, 333690, 325505, 399244, 333709, 333725, 333737, 382891, 382898, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333998, 334012, 260299, 211161, 375027, 358645, 268553, 268560, 432406, 325920, 358701, 391469, 358705, 358714, 358717, 383307, 358738, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 342431, 375209, 375220, 334263, 326087, 358857, 195041, 334312, 104940, 375279, 350724, 186898, 342546, 350740, 342551, 342555, 416294, 350762, 252463, 358962, 334397, 358973, 252483, 219719, 399957, 334425, 326240, 375401, 334466, 334469, 162446, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 375613, 244542, 260925, 375616, 342857, 416599, 342875, 244572, 433001, 400238, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 384099, 384102, 384108, 367724, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 384189, 384192, 351424, 343232, 367817, 244938, 384202, 253132, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 245042, 326970, 384324, 212296, 212304, 367966, 343394, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 245152, 245155, 155045, 245158, 114093, 327090, 343478, 359867, 384444, 327108, 327112, 384457, 359887, 359891, 368093, 155103, 343535, 343540, 368120, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 155241, 155255, 155274, 368289, 245410, 425639, 425652, 425663, 155328, 245463, 155352, 155356, 155364, 245477, 155372, 245487, 212723, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
b326d4a26e0ef8b03de7acdd1661c4c7393c3122
267ff0643c6d71eba2526633e63279ef7ea838ca
/Modelos/Modelos/DetallesRestaurantController.swift
f930b00e24eefe532f39b6657063156d25fff284
[]
no_license
AndresReysGR/ModelosParcial2Ulsa2021Pt3-
3a2feddcb7ea37e77ecdf0f73c1ec42832992785
f1d6919f6ddd84d353fc6a18dbf01a2cd4edd8e2
refs/heads/main
2023-08-24T15:23:39.815022
2021-10-21T00:11:14
2021-10-21T00:11:14
418,695,529
0
0
null
null
null
null
UTF-8
Swift
false
false
678
swift
// // DetallesRestaurantController.swift // Modelos // // Created by Alumno on 10/6/21. // Copyright © 2021 Alumno. All rights reserved. // import Foundation import UIKit class DetallesRestaurantController : UIViewController { var restaurante : Restaurante = Restaurante(nombre:"", direccion:"", horario:"", foto:"") @IBOutlet weak var lblDireccion: UILabel! @IBOutlet weak var lblHorario: UILabel! override func viewDidLoad() { self.title = restaurante.nombre lblDireccion.text = restaurante.direccion lblHorario.text = restaurante.horario imgFoto.img = restaurante.foto } }
[ -1 ]
2a229fb343971b2c190c5323403c7e3c5e3e8bc3
b998ffaa7130f2742f3c86ef6f2e37b665c310e1
/Sources/GitHubAPI/GitHubAPI/Sources/Schema/Objects/TeamDiscussionComment.graphql.swift
fe9fa467796790b01d532fcedf08d818497548b3
[ "LicenseRef-scancode-free-unknown", "MIT" ]
permissive
apollographql/apollo-ios
6678f0cb8b5b690651a4fd5ace414b179e71032a
e10dc84167b7edd4511d94ae7bbfafb65dca074b
refs/heads/main
2023-09-01T06:47:26.880635
2023-08-21T17:15:25
2023-08-21T17:15:25
64,176,717
3,705
830
MIT
2023-09-13T14:43:28
2016-07-26T00:24:04
Swift
UTF-8
Swift
false
false
534
swift
// @generated // This file was automatically generated and should not be edited. import ApolloAPI public extension Objects { /// A comment on a team discussion. static let TeamDiscussionComment = Object( typename: "TeamDiscussionComment", implementedInterfaces: [ Interfaces.Comment.self, Interfaces.Deletable.self, Interfaces.Node.self, Interfaces.Reactable.self, Interfaces.UniformResourceLocatable.self, Interfaces.Updatable.self, Interfaces.UpdatableComment.self ] ) }
[ -1 ]
34273fa8a2f49e2fe841a525dfa8d13ba39d5e0c
362f66a5c82ddbc66ab672c77e86b685f588ee58
/KonashiTest/LedSequencerViewController.swift
4ab590700be38e248679c4e5555dbe5b741884be
[]
no_license
itog/GrillerCtrliOS
4c8bcc3ff0f182aed4aa8bf5e244e0835220b099
b1b9b699ef69fc5f2b575af14c88b2d28beb199c
refs/heads/master
2021-01-19T04:11:53.276760
2015-11-12T23:46:42
2015-11-12T23:46:42
46,087,521
0
1
null
null
null
null
UTF-8
Swift
false
false
8,504
swift
// // LedSequencerViewController.swift // KonashiTest // // Created by itog on 7/25/15. // Copyright © 2015 pigmal. All rights reserved. // import UIKit import AVFoundation import AudioToolbox class LedSequencerViewController: UIViewController { let NUM_BUTTONS = 16 var buttons:[UIButton] = [] var selected = 0 var redSlider:UISlider! = nil var greenSlider:UISlider! = nil var blueSlider:UISlider! = nil var running = false override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor() let buttonWidth = Int(self.view.frame.width) / 4; for i in 0..<NUM_BUTTONS { let btn = UIButton() btn.tag = i btn.frame = CGRectMake(CGFloat(buttonWidth*(i%4) + 5), CGFloat(100+i/4*50), CGFloat(buttonWidth) - 10, 40) switch i % 4 { case 0: btn.backgroundColor = UIColor(colorLiteralRed: 0xff, green: 0, blue: 0, alpha: 1) case 1: btn.backgroundColor = UIColor(colorLiteralRed: 0, green: 0xff, blue: 0, alpha: 1) case 2: btn.backgroundColor = UIColor(colorLiteralRed: 0, green: 0, blue: 0xff, alpha: 1) default: btn.backgroundColor = UIColor(colorLiteralRed: 0xff, green: 0xff, blue: 0xff, alpha: 1) } btn.layer.cornerRadius = 10.0 btn.layer.borderWidth = 2; btn.setTitle("button", forState: UIControlState.Normal) btn.addTarget(self, action: "buttonClicked:", forControlEvents: .TouchUpInside) buttons.append(btn) self.view.addSubview(btn) prepareSound() } let SLIDER_Y:CGFloat = 320; redSlider = UISlider(frame:CGRectMake(20, SLIDER_Y, 280, 20)) redSlider.minimumValue = 0 redSlider.maximumValue = 255 redSlider.continuous = true redSlider.tintColor = UIColor.redColor() redSlider.value = 0 redSlider.addTarget(self, action: "redValueDidChange:", forControlEvents: .ValueChanged) self.view.addSubview(redSlider) greenSlider = UISlider(frame:CGRectMake(20, SLIDER_Y + 40, 280, 20)) greenSlider.minimumValue = 0 greenSlider.maximumValue = 255 greenSlider.continuous = true greenSlider.tintColor = UIColor.greenColor() greenSlider.value = 0 greenSlider.addTarget(self, action: "greenValueDidChange:", forControlEvents: .ValueChanged) self.view.addSubview(greenSlider) blueSlider = UISlider(frame:CGRectMake(20, SLIDER_Y + 80, 280, 20)) blueSlider.minimumValue = 0 blueSlider.maximumValue = 255 blueSlider.continuous = true blueSlider.tintColor = UIColor.blueColor() blueSlider.value = 0 blueSlider.addTarget(self, action: "blueValueDidChange:", forControlEvents: .ValueChanged) self.view.addSubview(blueSlider) let btn1 = UIButton() btn1.frame = CGRectMake(0, 0, 80, 40) btn1.backgroundColor = UIColor.redColor() btn1.layer.cornerRadius = 10.0 btn1.layer.borderWidth = 2; btn1.layer.position = CGPoint(x: self.view.frame.width - btn1.frame.width, y: SLIDER_Y + 130) btn1.setTitle("Check", forState: UIControlState.Normal) btn1.addTarget(self, action: "sendClicked:", forControlEvents: .TouchUpInside) self.view.addSubview(btn1) let btn = UIButton() btn.frame = CGRectMake(0, 0, 200, 40) btn.backgroundColor = UIColor.redColor() btn.layer.cornerRadius = 10.0 btn.layer.borderWidth = 2; btn.layer.position = CGPoint(x: self.view.frame.width/2 + 20, y:self.view.frame.height-50) btn.setTitle("Run", forState: UIControlState.Normal) btn.addTarget(self, action: "runClicked:", forControlEvents: .TouchUpInside) self.view.addSubview(btn) // Swicthを作成する. mySwicth.layer.position = CGPoint(x: 40, y: self.view.frame.height - 50) // mySwicth.tintColor = UIColor.blackColor() // mySwicth.addTarget(self, action: "switchChanged:", forControlEvents: UIControlEvents.ValueChanged) self.view.addSubview(mySwicth) } let mySwicth: UISwitch = UISwitch() override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } func buttonClicked(sender:UIButton) { print("buttonClickd \(sender.tag)") selected = sender.tag sender.backgroundColor = UIColor(red:CGFloat(redSlider.value/255), green:CGFloat(greenSlider.value/255), blue:CGFloat(blueSlider.value/255), alpha:CGFloat(1)) } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ func redValueDidChange(sender:UISlider!) { let c = CIColor(color: buttons[selected].backgroundColor!) buttons[selected].backgroundColor = UIColor(colorLiteralRed:sender.value/255, green:Float(c.green), blue:Float(c.blue), alpha:Float(1)) } func greenValueDidChange(sender:UISlider!) { let c = CIColor(color: buttons[selected].backgroundColor!) buttons[selected].backgroundColor = UIColor(colorLiteralRed:Float(c.red), green:Float(sender.value/255), blue:Float(c.blue), alpha:Float(1)) } func blueValueDidChange(sender:UISlider!) { let c = CIColor(color: buttons[selected].backgroundColor!) buttons[selected].backgroundColor = UIColor(colorLiteralRed:Float(c.red), green:Float(c.green), blue:Float(sender.value/255), alpha:Float(1)) } func runClicked(sender:UIButton) { if running { print("runnning") } else { running = true playSequenceAsync() } print("hoge") } func playSequenceAsync() { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { repeat { self.playSequence() } while self.mySwicth.on self.running = false }) } func playSequence() { for btn in buttons { let c = CIColor(color:btn.backgroundColor!) print("id: \(btn.tag), color: \(c.red) \(c.green) \(c.blue)") NSThread.sleepForTimeInterval(1.0) let data:[UInt8] = [0xff, 0x01, UInt8(c.red*255), UInt8(c.green*255), UInt8(c.blue*255)]; sendI2C(data, address: 0x04) AudioServicesPlaySystemSound(soundIdRing) } } func sendClicked(sender:UIButton) { // let data:[UInt8] = [0xff, 0x01, 0xff, 0x00, 0xff]; let r:UInt8 = UInt8(redSlider.value) let g:UInt8 = UInt8(greenSlider.value) let b:UInt8 = UInt8(blueSlider.value) let data:[UInt8] = [0xff, 0x01, r, g, b]; sendI2C(data, address: 0x04) } func sendI2C(data:[UInt8], address: UInt8) { let size = data.count let dataPointer = UnsafeMutablePointer<UInt8>.alloc(size) for i in 0..<size { dataPointer[i] = data[i] } Konashi.i2cMode(KonashiI2CMode.Enable400K) Konashi.i2cStartCondition() Konashi.i2cWrite(Int32(size), data: dataPointer, address: address) NSThread.sleepForTimeInterval(0.01) Konashi.i2cStopCondition() NSThread.sleepForTimeInterval(0.02) } var player : AVAudioPlayer! = nil var soundIdRing:SystemSoundID = 0 func prepareSound() { // let path = NSBundle.mainBundle().pathForResource("se_maoudamashii_system46", ofType:"mp3") // let fileURL = NSURL(fileURLWithPath: path!) // do { // try player = AVAudioPlayer(contentsOfURL: fileURL, fileTypeHint: nil) // } catch { // print("Error to create player") // } // player.prepareToPlay() // // player.delegate = self let path = NSBundle.mainBundle().pathForResource("se_maoudamashii_system46", ofType:"wav") let soundUrl = NSURL(fileURLWithPath: path!) //"/System/Library/Audio/UISounds/new-mail.caf") AudioServicesCreateSystemSoundID(soundUrl, &soundIdRing) } }
[ -1 ]
1b90b630a5e4b17eac3c5f05084afc5c3a7e9d1f
4670b37ce5ba7beb2af35aa1e1ba4f794c1d8a53
/SwiftPackage/Module/ModuleC/Sources/ModuleC/ModuleC.swift
69a461565e7e9b57f04a38e1d2e388fac065fb6d
[]
no_license
minsOne/DeepStaticLibraryLinkingExample
4346c2b057425537a12efc2ba8a5b527d1eb2078
224b2d934a1132373236bdfac65543c5a077fa8b
refs/heads/master
2023-03-13T22:32:05.603692
2021-03-02T02:45:43
2021-03-02T02:45:43
343,364,659
0
0
null
null
null
null
UTF-8
Swift
false
false
335
swift
import Foundation import ModuleD public final class ModuleCClass { public init() { print("=============== ModuleC Call Stack - Start ===============") print("ModuleC Class initialize") _ = ModuleDClass() print("=============== ModuleC Call Stack - End ===============\n") } }
[ -1 ]
7950c75b4246354dec0bd926e5af2b0bffd57576
8bb333c1b995d37994ea6944b0911cba0955f6a7
/TelegramCore/RequestUserPhotos.swift
74e1d53b2427d8cd4ba546a5b8d58eec37dab42d
[]
no_license
Shellbook/TelegramCore
4a2de4a399d5615f5b32171d2c3209655a78a54b
c192cd39e4ba4149dbe65818eaf679db04d12789
refs/heads/master
2020-03-27T01:22:08.931879
2018-06-29T17:17:03
2018-06-29T17:17:03
null
0
0
null
null
null
null
UTF-8
Swift
false
false
7,835
swift
import Foundation #if os(macOS) import PostboxMac import SwiftSignalKitMac import MtProtoKitMac #else import Postbox import SwiftSignalKit import MtProtoKitDynamic #endif public struct TelegramPeerPhoto { public let image: TelegramMediaImage public let reference: TelegramMediaImageReference? public let index:Int public let totalCount:Int } public func requestPeerPhotos(account:Account, peerId:PeerId) -> Signal<[TelegramPeerPhoto], Void> { return account.postbox.transaction{ transaction -> Peer? in return transaction.getPeer(peerId) } |> mapToSignal { peer -> Signal<[TelegramPeerPhoto], Void> in if let peer = peer as? TelegramUser, let inputUser = apiInputUser(peer) { return account.network.request(Api.functions.photos.getUserPhotos(userId: inputUser, offset: 0, maxId: 0, limit: 100)) |> map {Optional($0)} |> mapError {_ in} |> `catch` { return Signal<Api.photos.Photos?, Void>.single(nil) } |> map { result -> [TelegramPeerPhoto] in if let result = result { let totalCount:Int let photos:[Api.Photo] switch result { case let .photos(data): photos = data.photos totalCount = photos.count case let .photosSlice(data): photos = data.photos totalCount = Int(data.count) } var images:[TelegramPeerPhoto] = [] for i in 0 ..< photos.count { let photo = photos[i] let image:TelegramMediaImage let reference: TelegramMediaImageReference switch photo { case let .photo(data): reference = .cloud(imageId: data.id, accessHash: data.accessHash) image = TelegramMediaImage(imageId: MediaId(namespace: Namespaces.Media.CloudImage, id: data.id), representations: telegramMediaImageRepresentationsFromApiSizes(data.sizes), reference: reference) case let .photoEmpty(id: id): reference = .cloud(imageId: id, accessHash: 0) image = TelegramMediaImage(imageId: MediaId(namespace: Namespaces.Media.CloudImage, id: id), representations: [], reference: reference) } images.append(TelegramPeerPhoto(image: image, reference: reference, index: i, totalCount: totalCount)) } return images } else { return [] } } } else if let peer = peer, let inputPeer = apiInputPeer(peer) { return account.network.request(Api.functions.messages.search(flags: 0, peer: inputPeer, q: "", fromId: nil, filter: .inputMessagesFilterChatPhotos, minDate: 0, maxDate: 0, offsetId: 0, addOffset: 0, limit: 1000, maxId: 0, minId: 0, hash: 0)) |> map {Optional($0)} |> mapError {_ in} |> `catch` { return Signal<Api.messages.Messages?, Void>.single(nil) } |> mapToSignal { result -> Signal<[TelegramPeerPhoto], Void> in if let result = result { let messages: [Api.Message] let chats: [Api.Chat] let users: [Api.User] switch result { case let .channelMessages(_, _, _, apiMessages, apiChats, apiUsers): messages = apiMessages chats = apiChats users = apiUsers case let .messages(apiMessages, apiChats, apiUsers): messages = apiMessages chats = apiChats users = apiUsers case let.messagesSlice(_, apiMessages, apiChats, apiUsers): messages = apiMessages chats = apiChats users = apiUsers case .messagesNotModified: messages = [] chats = [] users = [] } return account.postbox.transaction { transaction -> [Message] in var peers: [PeerId: Peer] = [:] for user in users { if let user = TelegramUser.merge(transaction.getPeer(user.peerId) as? TelegramUser, rhs: user) { peers[user.id] = user } } for chat in chats { if let groupOrChannel = parseTelegramGroupOrChannel(chat: chat) { peers[groupOrChannel.id] = groupOrChannel } } var renderedMessages: [Message] = [] for message in messages { if let message = StoreMessage(apiMessage: message), let renderedMessage = locallyRenderedMessage(message: message, peers: peers) { renderedMessages.append(renderedMessage) } } return renderedMessages } |> map { messages -> [TelegramPeerPhoto] in var photos:[TelegramPeerPhoto] = [] var index:Int = 0 for message in messages { if let media = message.media.first as? TelegramMediaAction { switch media.action { case let .photoUpdated(image): if let image = image { photos.append(TelegramPeerPhoto(image: image, reference: nil, index: index, totalCount: messages.count)) } default: break } } index += 1 } return photos } } else { return .single([]) } } } else { return .single([]) } } }
[ -1 ]
974b69619a6667b203430d673710a689b3024977
f12001e67c5b686f4d66342a4a434a02be4f97b2
/Törst/View/GlobalColors.swift
cea1fa0ceacb0d28fe55dfc36bcd01224cd7b825
[]
no_license
marcusthuvesen/Torst
0f7d68d314f3b63b1cca1a43f948a86e93e56f9c
5dc114ad0e8023e9e6584eeee5c6bb448ddb9989
refs/heads/master
2023-03-31T21:15:00.758154
2021-04-01T21:31:34
2021-04-01T21:31:34
289,202,482
2
0
null
null
null
null
UTF-8
Swift
false
false
906
swift
// // GlobalColors.swift // Törst // // Created by Marcus Thuvesen on 2020-05-11. // Copyright © 2020 Marcus Thuvesen. All rights reserved. // import Foundation import UIKit extension UIColor { static var jagHarAldrigBlue = UIColor(red: 124/255, green: 138/255, blue: 188/255, alpha: 1.0) static var peklekenPurple = UIColor(red: 189/255, green: 108/255, blue: 226/255, alpha: 1.0) static var ryggMotRyggGreen = UIColor(red: 127/255, green: 192/255, blue: 163/255, alpha: 1.0) static var utmaningarOrange = UIColor(red: 244/255, green: 179/255, blue: 108/255, alpha: 1.0) static var mixRed = UIColor(red: 239/255, green: 147/255, blue: 128/255, alpha: 1.0) static var premiumBlue = UIColor(red: 132/255, green: 198/255, blue: 237/255, alpha: 1.0) static var premiumPurple = UIColor(red: 189/255, green: 108/255, blue: 226/255, alpha: 1.0) }
[ -1 ]
615c0c0b032c742279cb3dbaad43bd6791631171
b8d6a1b7286e03047d84bd441943ab5616db53b6
/iOS-W2-Assignment/YelpClient.swift
3ca0dce5ad31faf0074ad8d9f2b3748c3be9d5de
[ "Apache-2.0" ]
permissive
dhvan85/iOS-W2-Assignment
466f06dbb472fb123a014d2d9fee3342c02e22fb
4f743de8db0185698baad56663fc7251e858a0b3
refs/heads/master
2021-01-12T18:08:04.965437
2016-10-23T05:30:47
2016-10-23T05:30:47
71,334,485
0
0
null
null
null
null
UTF-8
Swift
false
false
3,552
swift
// // YelpClient.swift // iOS-W2-Assignment // // Created by Van Do on 10/18/16. // Copyright © 2016 Van Do. All rights reserved. // import AFNetworking import BDBOAuth1Manager /// You can register for Yelp API keys here: http://www.yelp.com/developers/manage_api_keys let yelpConsumerKey = "vxKwwcR_NMQ7WaEiQBK_CA" let yelpConsumerSecret = "33QCvh5bIF5jIHR5klQr7RtBDhQ" let yelpToken = "uRcRswHFYa1VkDrGV6LAW2F8clGh5JHV" let yelpTokenSecret = "mqtKIxMIR4iBtBPZCmCLEb-Dz3Y" enum YelpSortMode: Int { case bestMatched = 0, distance, highestRated } class YelpClient: BDBOAuth1RequestOperationManager { var accessToken: String! var accessSecret: String! static var _shared: YelpClient? static func shared() -> YelpClient! { if _shared == nil { _shared = YelpClient(consumerKey: yelpConsumerKey, consumerSecret: yelpConsumerSecret, accessToken: yelpToken, accessSecret: yelpTokenSecret) } return _shared } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } init(consumerKey key: String!, consumerSecret secret: String!, accessToken: String!, accessSecret: String!) { self.accessToken = accessToken self.accessSecret = accessSecret let baseUrl = URL(string: "https://api.yelp.com/v2/") super.init(baseURL: baseUrl, consumerKey: key, consumerSecret: secret); let token = BDBOAuth1Credential(token: accessToken, secret: accessSecret, expiration: nil) self.requestSerializer.saveAccessToken(token) } func search(with term: String, completion: @escaping ([Business]?, Error?) -> ()) -> AFHTTPRequestOperation { return search(with: term, sort: nil, distance: nil, categories: nil, deals: nil, completion: completion) } // For additional parameters, see http://www.yelp.com/developers/documentation/v2/search_api func search(with term: String, sort: YelpSortMode?, distance: Double?, categories: [String]?, deals: Bool?, completion: @escaping ([Business]?, Error?) -> ()) -> AFHTTPRequestOperation { // Default the location to San Francisco var parameters: [String : AnyObject] = [ "term": term as AnyObject, "ll": "37.785771,-122.406165" as AnyObject] if sort != nil { parameters["sort"] = sort!.rawValue as AnyObject? } if categories != nil && categories!.count > 0 { parameters["category_filter"] = (categories!).joined(separator: ",") as AnyObject? } if deals != nil { parameters["deals_filter"] = deals! as AnyObject? } if distance != nil { parameters["radius_filter"] = (distance! * 1609) as AnyObject? } print(parameters) return self.get("search", parameters: parameters, success: { (operation: AFHTTPRequestOperation, response: Any) in if let response = response as? NSDictionary { let dictionaries = response["businesses"] as? [NSDictionary] if dictionaries != nil { completion(Business.businesses(array: dictionaries!), nil) } }}, failure: { (operation: AFHTTPRequestOperation?, error: Error) in completion(nil, error) })! } }
[ 281189 ]
f80dc90ebf420d44a027fde1f9a52ddd7e601afe
c2f24972d9a155fa498eefb84b04de187cf3f333
/GoogleBookAPI/GoogleBookAPI/Assets.xcassets/BookTableViewController.swift
18b4ca470b228f59ac514ec6f1a018e1925b4624
[]
no_license
Eashir/AC3.2-GoogleBookAPI
bdb2cca6e89ec7d430cc2bfddebaa6dd368228b2
480d407398f733175b60b6d72a3cf3e017611877
refs/heads/master
2020-06-14T02:05:12.141897
2016-12-04T19:53:56
2016-12-04T19:53:56
75,525,384
0
0
null
2016-12-04T08:13:38
2016-12-04T08:13:38
null
UTF-8
Swift
false
false
2,756
swift
// // BookTableViewController.swift // GoogleBookAPI // // Created by Eashir Arafat on 12/4/16. // Copyright © 2016 Evan. All rights reserved. // import UIKit class BookTableViewController: UITableViewController { var books: [Book] = [] override func viewDidLoad() { super.viewDidLoad() self.title = "Books" let endPoint = "https://www.googleapis.com/books/v1/volumes?q=banana" APIRequestManager.manager.getData(endPoint: endPoint) { (data: Data?) in if let validData = data, let validBooks = Book.getBooks(from: validData) { self.books = validBooks DispatchQueue.main.async { self.tableView?.reloadData() } } } } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return books.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "bookCell", for: indexPath) as! BookTableViewCell let book = books[indexPath.row] cell.bookTitle.text = book.title APIRequestManager.manager.getData(endPoint: book.thumbnail) { (data: Data?) in if let validData = data, let validImage = UIImage(data: validData) { DispatchQueue.main.async { cell.bookThumbnail.image = validImage cell.setNeedsLayout() } } } // Configure the cell... return cell } // 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?) { if let dvc = segue.destination as? DetailViewController, let cell = sender as? BookTableViewCell, let indexPath = tableView.indexPath(for: cell) { dvc.book = books[indexPath.row] } // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } }
[ -1 ]
b37917e9aa5f6112b62cd62d948322917b92b255
ea87eadf455342e779655ded9a487855acb010c8
/WaterMyPlants/Plant/PlantListViewModel.swift
da035094319152f88e4ec0a185c552360dde20d9
[ "MIT" ]
permissive
laevandus/WaterMyPlants
12961db5cbed64ea40520e2aa42b1d1068be5a24
edc5f3ed2ecc08805cbbb3ab679cc6df369a1ca1
refs/heads/master
2021-01-01T12:33:25.151379
2020-06-28T11:16:15
2020-06-28T11:16:15
239,281,761
11
0
MIT
2020-05-22T09:27:06
2020-02-09T10:01:29
Swift
UTF-8
Swift
false
false
1,317
swift
// // PlantListViewModel.swift // WaterMyPlants // // Created by Toomas Vahter on 12.01.2020. // Copyright © 2020 Augmented Code. All rights reserved. // import Combine import CoreData import SwiftUI extension PlantListView { final class ViewModel: NSObject, ObservableObject, NSFetchedResultsControllerDelegate { private let plantsController: NSFetchedResultsController<Plant> init(managedObjectContext: NSManagedObjectContext) { let sortDescriptors = [NSSortDescriptor(keyPath: \Plant.name, ascending: true)] plantsController = Plant.allPlantsController(context: managedObjectContext, sortDescriptors: sortDescriptors) super.init() plantsController.delegate = self do { try plantsController.performFetch() } catch let nserror as NSError { fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } func controllerWillChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) { objectWillChange.send() } var plants: [Plant] { return plantsController.fetchedObjects ?? [] } @Published var isPresentingAddPlant = false } }
[ -1 ]
2d599ff542c1deb7a1b4ada1bffdfb0629292d1b
3ce245b023641d48b045c2f609e163eb54015dc7
/CXStarRatingView/Classes/StarIconView.swift
aad2ae36e8e9511b8fedb6e1bf28bfe9ea5cc543
[ "MIT" ]
permissive
chunxige/CXStarRatingView
fd6c9f5b83e6fc812f638ee462003b42c3af2fcf
8cfe02696273bcdf74dc70555fdd7482d8898846
refs/heads/master
2023-03-14T00:37:03.223147
2021-02-23T01:07:17
2021-02-23T01:07:17
337,261,185
0
1
null
null
null
null
UTF-8
Swift
false
false
2,185
swift
// // StarIconView.swift // StarRate // // Created by Chunxi on 2021/2/7. // Copyright © 2021 Jason. All rights reserved. // import UIKit class StarIconView: UIView { let foregroundImage: UIImage? let backgroundImage: UIImage? lazy var foregroundView: StarForegroundView = { let iv = StarForegroundView.init(image: foregroundImage) return iv }() let backgroundView: UIImageView = { let iv = UIImageView() return iv }() init(foregroundImage: UIImage?, backgroundImage: UIImage?) { self.foregroundImage = foregroundImage self.backgroundImage = backgroundImage super.init(frame: .zero) setup() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func setup() { translatesAutoresizingMaskIntoConstraints = false foregroundView.translatesAutoresizingMaskIntoConstraints = false backgroundView.translatesAutoresizingMaskIntoConstraints = false foregroundView.image = foregroundImage backgroundView.image = backgroundImage addSubview(backgroundView) addSubview(foregroundView) NSLayoutConstraint.activate([ backgroundView.leadingAnchor.constraint(equalTo: leadingAnchor), backgroundView.topAnchor.constraint(equalTo: topAnchor), backgroundView.trailingAnchor.constraint(equalTo: trailingAnchor), backgroundView.bottomAnchor.constraint(equalTo: bottomAnchor), foregroundView.leadingAnchor.constraint(equalTo: leadingAnchor), foregroundView.topAnchor.constraint(equalTo: topAnchor), foregroundView.trailingAnchor.constraint(equalTo: trailingAnchor), foregroundView.bottomAnchor.constraint(equalTo: bottomAnchor), ]) } // 0...1之间 var value: CGFloat = 0 { didSet { setNeedsLayout() } } override func layoutSubviews() { super.layoutSubviews() foregroundView.imageView.frame.size.width = frame.width foregroundView.frame.size.width = frame.width * min(max(value, 0), 1) } }
[ -1 ]
36a48eb69da981122aa5a120a21cb9d82d1c8888
0c41464cede69ec99753b23615cb17803050f935
/SalonX/Helper/UIExpandableTableView/UIExpandableTableView.swift
3254f214cb88e7990b21b6cd7ab9a941006db60d
[]
no_license
jdvirani/Salon
22f83a3273c15e62c1b35db3dc8074e7e7994054
25b302e3f2ce98d055e36d2463ddb661b6d1cffb
refs/heads/master
2021-01-23T00:05:58.353421
2017-03-21T11:21:35
2017-03-21T11:21:35
85,692,884
0
0
null
null
null
null
UTF-8
Swift
false
false
1,917
swift
// // UIExpandableTableView.swift // LabelTeste // // Created by Rondinelli Morais on 11/09/15. // Copyright (c) 2015 Rondinelli Morais. All rights reserved. // import UIKit // FIXME: comparison operators with optionals were removed from the Swift Standard Libary. // Consider refactoring the code to use the non-optional operators. fileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool { switch (lhs, rhs) { case let (l?, r?): return l < r case (nil, _?): return true default: return false } } class UIExpandableTableView : UITableView, HeaderViewDelegate { var sectionOpen:Int = NSNotFound // MARK: HeaderViewDelegate func headerViewOpen(_ section: Int) { if self.sectionOpen != NSNotFound { headerViewClose(self.sectionOpen) } self.sectionOpen = section let numberOfRows:Int = (self.dataSource?.tableView(self, numberOfRowsInSection: section))! var indexesPathToInsert:[IndexPath] = [] for i in 0..<numberOfRows { indexesPathToInsert.append(IndexPath(row: i, section: section)) } if indexesPathToInsert.count > 0 { self.beginUpdates() self.insertRows(at: indexesPathToInsert, with: .fade) self.endUpdates() } } func headerViewClose(_ section: Int) { let numberOfRows:Int = (self.dataSource?.tableView(self, numberOfRowsInSection: section))! var indexesPathToDelete:[IndexPath] = [] self.sectionOpen = NSNotFound for i in 0..<numberOfRows { indexesPathToDelete.append(IndexPath(row: i, section: section)) } if indexesPathToDelete.count > 0 { self.beginUpdates() self.deleteRows(at: indexesPathToDelete, with: .fade) self.endUpdates() } } }
[ -1 ]
37872d1de81431428c305b1a60744dd75e39bac2
264bc18f8dd9b4409e6f3b441fafb6ca7325b64d
/TodoLista/AppDelegate.swift
6d744b0b8ee63c3832ffcadfcb857131fc30e383
[]
no_license
asmodeo1/prueba3
6060b0aa8b401cb8721a391d6ce0115fe820bd96
e91f0d94344fea6c51a47b5f71d29fedd588e22e
refs/heads/master
2020-04-11T07:24:15.639038
2018-12-02T19:03:37
2018-12-02T19:03:37
161,609,125
0
0
null
null
null
null
UTF-8
Swift
false
false
2,177
swift
// // AppDelegate.swift // TodoLista // // Created by Juan Alonso on 02/12/2018. // Copyright © 2018 Juan Alonso. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 294924, 229388, 278542, 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, 254563, 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, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 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, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 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, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 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, 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, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 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, 323330, 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, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 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, 127447, 283095, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 135707, 234010, 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, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 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, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 349451, 177424, 275725, 283917, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 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, 316959, 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, 277173, 342707, 154292, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 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 ]
1e134495a2c0656529050cc444914d8dd506659a
e0104684ce091f6ecc0d8e1f96f850447c0b5a38
/2PlayerDice/2PlayerDice/Model/Dice.swift
6c57e7d043182180068b5a1c01e111aebad6e1b5
[]
no_license
nevaan9/2PlayerDiceGame
7b16388642971b7e7075fab61ae4733b66b45bd6
3804bd87c35833b1426a40c30b4961896895dd7e
refs/heads/master
2021-05-14T07:22:50.950646
2018-01-04T13:32:59
2018-01-04T13:32:59
116,262,739
0
0
null
null
null
null
UTF-8
Swift
false
false
474
swift
// // Dice.swift // 2PlayerDice // // Created by Nevaan Perera on 11/26/17. // Copyright © 2017 Nevaan Perera. All rights reserved. // import Foundation class Dice { var diceArray = [String]() var currentRoll = 0 init() { for suffix in 1...6{ diceArray.append("dice-\(suffix)") } } func roll() -> String { currentRoll = Int(arc4random_uniform(6)) + 1 return diceArray[currentRoll - 1] } }
[ -1 ]
de8a2d520c006d0e9aa631d38a4a1a232785cd82
a7e0220368d127646708bfc22775558dff7c6fc3
/todostream/ListViewModelable.swift
c245c8ff78dbd536ef43c7817615f461857143ea
[ "MIT" ]
permissive
cdoky/todostream
d7cbfb99470188187b113ba8a7a0444c7cedcd99
30299d9021a666820c359dacb810b008f5fbea08
refs/heads/master
2021-05-30T22:33:03.355780
2016-01-18T14:23:26
2016-01-18T14:23:26
null
0
0
null
null
null
null
UTF-8
Swift
false
false
746
swift
// // Created by Christopher Trott on 12/9/15. // Copyright © 2015 twocentstudios. All rights reserved. // import Foundation protocol ListViewModelable { typealias ViewModelType var viewModels: [ViewModelType] { get } } extension ListViewModelable { func numberOfRowsInSection(section: Int) -> Int { if (section > 0) { return 0 } return viewModels.count } func viewModelAtIndexPath(indexPath: NSIndexPath) -> ViewModelType { precondition(indexPath.section == 0) return viewModels[indexPath.row] } } enum GroupChange { case Reload case NoOp } enum SingleChange { case Insert(NSIndexPath) case Delete(NSIndexPath) case Reload(NSIndexPath) case NoOp }
[ -1 ]
733ffe5dd91e459c7e46a21f2b4aa70d50f1b8d1
d0aefbebb2c1078841e01316bf75297fff58b3ac
/Day 3/Day 3Tests/Day_3Tests.swift
0cf464ee130d92e5a4a39d0f311ed13d58f53b9a
[]
no_license
lanfeng0706/100-Days-of-Swift
23940494b0387ef5ddbecb461a8239218c6e2775
99e04c903c5138c535a410554d158c2c65d62856
refs/heads/master
2021-01-10T08:06:40.113996
2016-04-07T05:42:41
2016-04-07T05:42:41
55,658,975
1
0
null
null
null
null
UTF-8
Swift
false
false
964
swift
// // Day_3Tests.swift // Day 3Tests // // Created by 邓岚锋 on 16/4/7. // Copyright © 2016年 邓岚锋. All rights reserved. // import XCTest @testable import Day_3 class Day_3Tests: 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. } } }
[ 98333, 278558, 16419, 229413, 204840, 278570, 344107, 155694, 253999, 229424, 237620, 229430, 319542, 286788, 352326, 311372, 311374, 196691, 278615, 237663, 278634, 131178, 278638, 319598, 352368, 204916, 131191, 237689, 131198, 278655, 311438, 278670, 278677, 278685, 311458, 278691, 49316, 32941, 278704, 278708, 131256, 278714, 254170, 229597, 311519, 286958, 327929, 278797, 180493, 254226, 319763, 278816, 237857, 98610, 278842, 287041, 287043, 139589, 319813, 311621, 319821, 254286, 344401, 278869, 155990, 106847, 246127, 246136, 139640, 246137, 311681, 246178, 311727, 377264, 278970, 319930, 336317, 278978, 188871, 278989, 278993, 278999, 328152, 369116, 188894, 287198, 279008, 279013, 279018, 319981, 319987, 279029, 279032, 279039, 287241, 279050, 303631, 279057, 279062, 279065, 180771, 377386, 279094, 352829, 115270, 287318, 295519, 66150, 279144, 344680, 279146, 295536, 287346, 287352, 279164, 189057, 311941, 279177, 369289, 344715, 311949, 287374, 352917, 295576, 230040, 271000, 303771, 221852, 205471, 279206, 295590, 279210, 287404, 205487, 295599, 303793, 279217, 164533, 230072, 287417, 303803, 287422, 66242, 287433, 287439, 279252, 287452, 295652, 279269, 246503, 312047, 279280, 312052, 230134, 221948, 279294, 205568, 295682, 295697, 336671, 344865, 279336, 262954, 295724, 353069, 312108, 164656, 295729, 303920, 262962, 328499, 353078, 230199, 353079, 336702, 295746, 279362, 353094, 353095, 353109, 230234, 295776, 279392, 303972, 230248, 246641, 246648, 279417, 361337, 254850, 287622, 58253, 295824, 189348, 279464, 353195, 140204, 353197, 304051, 189374, 353216, 213960, 279498, 50143, 123881, 304110, 320494, 287731, 295927, 304122, 320507, 328700, 328706, 320516, 230410, 320527, 418837, 140310, 197657, 336929, 189474, 345132, 238639, 238651, 238664, 296019, 353367, 156764, 156765, 304222, 279660, 312434, 353397, 279672, 337017, 279685, 222343, 296086, 238743, 296092, 238765, 279728, 238769, 230588, 279747, 353479, 353481, 353482, 279760, 189652, 279765, 189653, 148696, 296153, 279774, 304351, 304356, 279785, 279792, 353523, 279814, 312587, 328971, 173334, 320796, 279854, 345396, 116026, 222524, 279875, 304456, 230729, 222541, 296270, 238927, 296273, 222559, 230756, 230765, 279920, 312689, 296307, 116084, 181625, 148867, 378244, 296335, 279974, 279984, 173491, 304564, 279989, 361927, 296392, 280010, 370123, 148940, 280013, 312782, 222675, 353750, 239068, 280032, 280041, 361963, 329197, 329200, 321009, 280055, 288249, 230913, 230921, 296461, 304656, 329232, 230943, 230959, 312880, 288309, 288318, 280130, 124485, 288326, 288327, 280147, 239198, 312940, 222832, 247416, 288378, 337535, 239237, 288392, 239250, 345752, 255649, 206504, 321199, 337591, 321207, 296632, 280251, 280257, 321219, 280267, 313041, 280278, 280280, 18138, 67292, 321247, 280300, 239341, 313081, 124669, 288512, 288516, 280327, 280329, 321295, 321302, 116505, 321310, 313120, 247590, 280366, 296755, 280372, 321337, 280380, 280390, 280392, 345929, 304977, 18262, 280410, 370522, 345951, 362337, 345955, 296806, 288619, 288620, 280430, 362352, 313203, 124798, 182144, 305026, 67463, 329622, 337815, 124824, 214937, 214938, 239514, 354212, 124852, 288697, 214977, 280514, 280519, 247757, 280541, 337895, 247785, 296941, 329712, 362480, 313339, 313357, 182296, 239650, 354343, 354345, 223274, 124975, 346162, 124984, 288833, 288834, 313416, 354385, 223316, 280661, 329814, 338007, 354393, 280675, 280677, 313447, 288879, 223350, 280694, 288889, 215164, 313469, 215166, 280712, 215178, 346271, 239793, 125109, 182456, 280762, 223419, 379071, 280768, 338119, 280778, 321745, 280795, 280802, 338150, 125169, 338164, 125183, 125188, 313608, 125193, 125198, 125203, 125208, 305440, 125217, 125235, 280887, 125240, 321860, 280902, 182598, 379225, 272729, 354655, 321894, 280939, 313713, 354676, 362881, 248194, 395659, 395661, 240016, 190871, 141728, 289189, 289194, 281040, 281072, 289304, 182817, 338490, 322120, 281166, 281171, 297560, 354911, 436832, 191082, 313966, 281199, 330379, 330387, 330388, 117397, 314009, 289434, 338613, 166582, 314040, 158394, 363211, 289502, 363230, 338662, 346858, 289518, 199414, 35583, 363263, 191235, 322313, 322316, 322319, 166676, 207640, 281377, 289576, 289598, 281408, 420677, 281427, 281433, 322395, 330609, 174963, 207732, 158593, 240518, 289698, 289703, 289727, 363458, 19399, 183248, 338899, 248797, 207838, 314342, 289774, 183279, 240630, 314362, 134150, 322570, 322582, 281626, 175132, 248872, 322612, 314448, 281697, 314467, 281700, 322663, 207979, 363644, 150657, 248961, 339102, 330913, 306338, 249002, 281771, 208058, 339130, 290000, 298208, 298212, 298213, 290022, 330984, 298228, 216315, 208124, 388349, 363771, 322824, 126237, 339234, 306494, 216386, 224586, 372043, 314710, 314720, 281957, 306542, 314739, 290173, 306559, 224640, 298374, 314758, 314760, 142729, 388487, 314766, 306579, 282007, 290207, 314783, 314789, 282022, 314791, 282024, 241066, 314798, 380357, 339398, 306631, 306639, 191981, 282096, 306673, 306677, 191990, 290300, 290301, 282114, 306692, 306693, 323080, 323087, 282129, 282136, 282141, 282146, 306723, 290358, 282183, 290390, 306776, 282213, 323178, 314998, 175741, 282245, 282246, 224901, 290443, 323217, 282259, 298654, 282271, 282273, 282276, 298661, 323236, 290471, 282280, 298667, 282303, 323263, 282312, 306890, 282318, 241361, 282327, 298712, 298720, 282339, 12010, 282348, 282355, 282358, 175873, 323331, 323332, 216839, 249626, 282400, 241441, 339745, 315171, 257830, 282417, 200498, 282427, 315202, 307011, 282434, 282438, 307025, 413521, 216918, 307031, 282474, 282480, 241528, 315264, 339841, 282504, 315273, 315274, 110480, 184208, 282518, 282519, 298909, 118685, 298920, 200627, 282549, 151497, 298980, 282612, 282633, 241692, 102437, 233517, 282672, 315476, 307289, 200794, 315487, 45153, 315497, 315498, 299121, 233589, 233590, 241808, 323729, 233636, 233642, 299187, 184505, 299198, 299203, 282831, 356576, 176362, 184570, 184575, 184584, 282909, 299293, 282913, 233762, 217380, 282919, 151847, 332085, 332089, 315706, 282939, 307517, 241986, 332101, 323916, 348492, 250192, 323920, 348500, 323935, 242029, 242033, 291192, 225670, 291224, 283038, 61857, 315810, 381347, 61859, 315811, 340398, 299441, 61873, 283064, 61880, 299456, 127427, 127428, 283075, 291267, 324039, 176601, 242139, 160225, 242148, 291311, 233978, 291333, 340490, 283153, 291358, 283182, 283184, 234036, 315960, 70209, 348742, 70215, 348749, 332378, 111208, 291454, 348806, 152203, 184973, 111253, 316053, 111259, 299699, 299700, 225995, 299759, 299770, 234234, 299776, 291585, 242433, 291592, 291604, 283419, 291612, 234277, 283430, 152365, 242485, 234294, 160575, 299849, 283467, 201551, 234331, 275303, 177001, 201577, 308076, 242541, 209783, 209785, 177019, 308092, 308107, 308112, 234386, 209817, 324506, 324507, 324517, 283558, 349121, 316364, 340955, 340961, 234472, 234473, 324586, 340974, 316405, 201720, 234500, 324625, 234514, 316437, 201755, 300068, 357414, 300084, 324666, 308287, 21569, 300111, 234577, 341073, 234587, 250981, 300135, 300136, 316520, 316526, 357486, 144496, 234609, 300151, 160891, 341115, 300158, 234625, 349316, 349318, 234638, 169104, 177296, 308372, 185493, 119962, 300187, 300188, 283802, 234663, 300201, 300202, 283840, 259268, 283847, 62665, 283852, 283853, 357595, 234733, 234742, 292091, 316669, 242954, 292107, 251153, 177428, 300343, 193859, 300359, 234827, 177484, 251213, 234831, 120148, 357719, 283991, 234850, 292195, 333160, 284014, 243056, 111993, 112017, 234898, 112018, 357786, 333220, 316842, 210358, 284089, 292283, 415171, 292292, 300487, 300489, 366037, 210390, 210391, 210393, 144867, 316902, 54765, 251378, 308723, 300535, 300536, 210433, 366083, 316946, 308756, 398869, 308764, 349726, 349741, 169518, 235070, 349763, 218696, 292425, 243274, 128587, 333388, 333393, 300630, 128599, 235095, 374372, 317032, 54893, 366203, 235135, 300714, 218819, 333517, 333520, 333521, 333523, 153319, 284401, 300794, 325371, 194303, 194304, 300811, 284429, 284431, 366360, 284442, 325404, 325410, 341796, 284459, 300848, 317232, 325439, 153415, 341836, 325457, 284507, 284512, 284514, 276327, 292712, 325484, 292720, 325492, 300918, 194429, 325503, 333701, 243591, 243597, 325518, 300963, 292771, 333735, 284587, 292782, 243637, 284619, 301008, 194515, 219101, 292836, 292837, 325619, 333817, 292858, 292902, 227370, 309295, 358456, 309345, 227428, 194666, 284788, 333940, 292988, 292992, 194691, 227460, 333955, 235662, 325776, 317587, 284825, 284826, 333991, 333992, 284841, 284842, 227513, 301251, 227524, 309444, 227548, 301279, 243962, 309503, 194820, 375051, 325905, 325912, 309529, 211235, 211238, 260418, 227654, 325968, 6481, 366929, 366930, 6489, 391520, 416104, 285040, 317820, 211326, 227725, 293274, 285084, 317852, 285090, 375207, 293303, 293310, 317901, 326100, 285150, 227809, 358882, 342498, 195045, 309744, 293367, 301571, 342536, 342553, 375333, 293419, 244269, 236081, 23092, 309830, 301638, 293448, 55881, 309846, 244310, 301689, 244347, 227990, 342682, 285361, 342706, 318130, 342713, 285371, 285373, 154316, 334547, 96984, 318173, 285415, 342762, 293612, 129773, 154359, 228088, 162561, 285444, 285466, 326429, 293664, 326433, 293672, 318250, 318252, 301871, 285487, 285497, 293693, 318278, 293711, 301918, 293730, 351077, 342887, 400239, 310131, 228215, 269178, 359298, 113542, 228233, 228234, 56208, 293781, 277403, 318364, 310176, 310178, 293800, 236461, 293806, 130016, 64485, 277492, 318461, 277509, 146448, 277524, 252980, 359478, 302139, 359495, 277597, 113760, 302177, 285798, 228458, 15471, 187506, 285814, 285820, 187521, 285828, 302213, 285830, 302216, 228491, 228493, 285838, 162961, 326804, 187544, 285851, 302240, 343203, 253099, 367799, 294074, 64700, 228540, 228542, 302274, 343234, 367810, 244940, 228563, 310497, 228588, 253167, 302325, 228600, 228609, 245019, 130338, 130343, 351537, 286013, 286018, 113987, 294218, 318805, 294243, 163175, 327025, 327031, 179587, 368011, 318875, 310692, 310701, 286129, 228795, 302529, 302531, 163268, 310732, 302540, 64975, 310736, 327121, 212442, 228827, 286172, 310757, 187878, 343542, 343543, 286202, 286205, 302590, 228861, 294400, 228867, 253452, 146964, 302623, 286244, 245287, 245292, 286254, 56902, 228943, 286288, 196187, 343647, 286306, 310889, 204397, 138863, 294529, 286343, 229001, 310923, 188048, 302739, 229020, 302754, 245412, 40613, 40614, 40615, 229029, 286388, 286391, 319162, 286399, 302797, 212685, 212688, 245457, 302802, 286423, 278233, 278234, 294622, 278240, 212716, 212717, 229113, 286459, 278272, 319233, 311042, 278291, 278293, 294678, 286494, 294700, 360252, 188251, 237408, 253829, 294807, 294809, 294814, 319392, 294823, 294843, 98239, 294850, 163781, 344013, 212946, 24532, 294886, 253929, 327661, 278512, 311282 ]
7d303832a784220938db392aae4bea03bb24dcec
08b18e2f9c8eb08ec7c4486dc6b780bd6a5ef61b
/Dale Mabry/GameOverScene.swift
638a1407369fc8ec7d438f89741e50e3a3d0332f
[ "MIT" ]
permissive
AccordionGuy/DaleMabry
485ef061908a0f595d7e4e95aba6704506308c09
caaf0c25e4048e0f7e274feea6d4094852acf140
refs/heads/master
2021-07-08T04:17:07.733911
2021-05-06T02:33:39
2021-05-06T02:33:39
60,666,460
2
0
null
null
null
null
UTF-8
Swift
false
false
3,013
swift
// // DaleMabry: GameOverScene.swift // ============================== // Displays the appropriate message when either the player: // - Wins by successfully crossing the highway, or // - Loses by losing all his/her lives. import Foundation import SpriteKit class GameOverScene: SKScene { let won: Bool // MARK: - // MARK: Methods // ============= // MARK: - // MARK: Initializers // ================== init(size: CGSize, won: Bool) { self.won = won super.init(size: size) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented.") } override func didMove(to view: SKView) { var background: SKSpriteNode if won { background = SKSpriteNode(imageNamed: "you_win_screen") run(SKAction.sequence([ SKAction.wait(forDuration: 0.1), SKAction.playSoundFileNamed("win.wav", waitForCompletion: false) ])) } else { background = SKSpriteNode(imageNamed: "you_lose_screen") run(SKAction.sequence([ SKAction.wait(forDuration: 0.1), SKAction.playSoundFileNamed("lose.wav", waitForCompletion: false) ])) } background.position = CGPoint(x: self.size.width / 2, y: self.size.height / 2) self.addChild(background) let wait = SKAction.wait(forDuration: 3.0) let block = SKAction.run { let myScene = GameScene(size: self.size) myScene.scaleMode = self.scaleMode let reveal = SKTransition.flipHorizontal(withDuration: 0.5) self.view?.presentScene(myScene, transition: reveal) } self.run(SKAction.sequence([wait, block])) } } /* Portions of this code were adapted from "Zombie Conga", an app whose code appears in "2D iOS and tvOS Games by Tutorials", copyright © 2015 Razeware LLC. See: http://www.raywenderlich.com/store/2d-ios-tvos-games-by-tutorials The remainder is copyright © 2020 Joey deVilla. 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. */
[ -1 ]
171009e2e9239a2ff63e1eebd8ad50fe708f5b41
652486e6ca74333e4883d230e464702808fb6491
/2015/swift/day18_2/day18_2_tests/day18_2_tests.swift
3e402ab6800c7913d33995127d0e84defac4304e
[ "MIT" ]
permissive
sgravrock/adventofcode
3e3138abe29e1e1ed34357791c2bce25e71c6b69
d44655f1e2ade3cecbc6b16fbda8e3bf62e5156f
refs/heads/master
2023-07-20T04:04:57.704026
2023-07-12T03:43:47
2023-07-12T03:43:47
47,810,570
0
0
MIT
2022-12-23T21:41:51
2015-12-11T06:56:52
Rust
UTF-8
Swift
false
false
2,915
swift
import XCTest class day18_2_tests: XCTestCase { func test_parseLayout() { let lines = ["#.", ".#"] let expected = [[true, false], [false, true]] let actual = parseLayout(lines) assertGridsMatch(expected: expected, actual: actual) } func test_iterate() { let initial = parseLayout([ "#.##.#", "####.#", "...##.", "......", "#...#.", "#.####" ]) let nextStates = [ parseLayout([ "#..#.#", "#....#", ".#.##.", "...##.", ".#..##", "##.###" ]), parseLayout([ "#...##", "####.#", "..##.#", "......", "##....", "####.#" ]), parseLayout([ "#.####", "#....#", "...#..", ".##...", "#.....", "#.#..#" ]) ] var state = initial for expected in nextStates { state = iterate(state) assertGridsMatch(expected: expected, actual: state) } } func test_nextState_fromOn() { let input1 = [ [false, false, false], [false, true, false], [false, true, false] ] XCTAssertFalse(nextState(input1, x: 1, y: 1)) let input2 = [ [false, false, false], [false, true, false], [false, true, true] ] XCTAssertTrue(nextState(input2, x: 1, y: 1)) let input3 = [ [false, false, false], [false, true, true], [false, true, true] ] XCTAssertTrue(nextState(input3, x: 1, y: 1)) let input4 = [ [false, false, false], [false, true, true], [true, true, true] ] XCTAssertFalse(nextState(input4, x: 1, y: 1)) } func test_nextState_cornersAlwaysOn() { let input = [ [true, false, false], [false, false, false], [false, true, false] ] XCTAssertTrue(nextState(input, x: 0, y: 0)) XCTAssertTrue(nextState(input, x: 0, y: 2)) } func test_nextState_fromOff() { let input2 = [ [false, false, false], [false, false, false], [false, true, true] ] XCTAssertFalse(nextState(input2, x: 1, y: 1)) let input3 = [ [false, false, false], [false, false, true], [false, true, true] ] XCTAssertTrue(nextState(input3, x: 1, y: 1)) let input4 = [ [false, false, false], [false, false, true], [true, true, true] ] XCTAssertFalse(nextState(input4, x: 1, y: 1)) } func test_numLightsOn() { let initial = parseLayout([ "#.##.#", "####.#", "...##.", "......", "#...#.", "#.####" ]) XCTAssertEqual(17, numLightsOn(grid: initial, steps: 4)) } func assertGridsMatch(expected: [[Bool]], actual: [[Bool]]) { XCTAssertEqual(expected.count, actual.count) for i in 0..<expected.count { XCTAssertEqual(expected[i].count, actual[i].count) for j in 0..<expected[i].count { if expected[i][j] != actual[i][j] { print("Expected:") printGrid(expected) print("Actual: ") printGrid(actual) XCTFail() } } } } func printGrid(_ grid: [[Bool]]) { for line in grid { print(line.map { $0 ? "#" : "."}.joined(separator: "") ) } } }
[ -1 ]
d2422c41a289f25638bff2da42940f31a77e2c66
dea616ccf8019bf5cc84465f0a6fee3a5d97ee46
/SwiftUI 1.0/SwiftUI16/SwiftUI16UITests/SwiftUI16UITests.swift
f1eca0b1d1fd9b4bd9880ef4fcdcf7bef1b3925f
[]
no_license
yungfan/SwiftUI-learning
3b7544aa38c2c04e7b7eea9e527240b786f74c03
a436080946f88dd81ff5c45411a55b6c6d9b6573
refs/heads/master
2023-07-03T12:43:17.799526
2023-06-19T10:43:14
2023-06-19T10:43:14
193,068,632
84
26
null
null
null
null
UTF-8
Swift
false
false
1,430
swift
// // SwiftUI16UITests.swift // SwiftUI16UITests // // Created by 杨帆 on 2019/10/19. // Copyright © 2019 杨帆. All rights reserved. // import XCTest class SwiftUI16UITests: XCTestCase { override func 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 // 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. } func testExample() { // 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() { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { XCUIApplication().launch() } } } }
[ 360463, 155665, 376853, 237599, 229414, 278571, 253996, 229425, 385078, 229431, 180279, 352314, 213051, 32829, 286787, 352324, 237638, 385095, 352327, 163916, 311373, 368717, 196687, 278607, 311377, 254039, 426074, 368732, 180317, 352359, 32871, 278637, 319599, 385135, 278642, 131190, 385147, 131199, 426124, 278676, 196758, 311447, 327834, 278684, 278690, 311459, 49317, 278698, 377010, 278707, 180409, 278713, 295099, 139459, 131270, 377033, 164043, 417996, 368849, 368850, 139478, 229591, 385240, 254171, 147679, 311520, 147680, 205034, 286957, 254189, 254193, 147716, 368908, 180494, 262419, 319764, 278805, 254228, 377116, 311582, 278817, 311596, 418095, 336177, 98611, 287040, 155968, 319812, 311622, 270663, 368969, 254285, 377168, 344402, 229716, 287089, 139641, 311679, 385407, 385409, 311692, 106893, 270733, 385423, 385437, 156069, 254373, 385449, 311723, 115116, 377265, 385463, 311739, 319931, 278974, 336319, 311744, 278979, 336323, 188870, 278988, 278992, 279000, 377309, 377310, 369121, 279009, 369124, 279014, 319976, 279017, 311787, 360945, 319986, 279030, 139766, 311800, 279033, 254459, 410108, 410109, 279042, 377346, 287237, 377352, 279053, 410126, 393745, 303634, 303635, 279060, 279061, 385554, 254487, 279066, 188957, 385578, 197166, 279092, 33344, 385603, 377419, 303693, 426575, 369236, 385620, 115287, 189016, 270938, 295518, 287327, 279143, 279150, 287345, 287348, 352885, 352886, 344697, 189054, 287359, 303743, 369285, 164487, 279176, 311944, 344714, 311950, 377487, 311953, 336531, 287379, 180886, 295575, 352921, 221853, 205469, 344737, 279207, 295591, 352938, 295598, 279215, 418479, 279218, 164532, 287418, 303802, 377531, 377534, 66243, 385737, 287434, 287438, 279249, 303826, 385745, 369365, 369366, 385751, 230105, 361178, 352989, 352990, 295649, 418529, 385763, 295653, 369383, 230120, 361194, 312046, 230133, 279293, 205566, 344829, 197377, 295688, 312076, 434956, 295698, 418579, 197398, 426777, 221980, 344864, 197412, 336678, 262952, 262953, 279337, 262957, 164655, 328495, 303921, 197424, 197428, 336693, 230198, 377656, 197433, 222017, 295745, 197451, 279379, 385878, 385880, 295769, 197467, 230238, 230239, 435038, 279393, 303973, 279398, 197479, 385895, 385901, 197489, 295797, 295799, 279418, 164730, 336765, 254851, 369541, 279434, 320394, 189327, 377754, 189349, 172971, 304050, 377778, 189373, 377789, 345030, 213961, 279499, 304086, 418774, 386007, 386016, 304104, 123880, 418793, 320495, 222193, 287730, 271351, 320504, 214009, 312313, 435195, 312317, 328701, 328705, 386049, 418819, 410629, 377863, 230411, 320526, 361487, 238611, 386068, 140311, 238617, 197658, 336930, 410665, 189487, 345137, 361522, 312372, 238646, 238650, 320571, 386108, 336962, 238663, 377927, 205911, 296023, 156763, 230500, 214116, 214119, 279659, 279666, 312435, 230514, 238706, 377974, 66684, 279686, 222344, 402568, 140426, 337037, 386191, 296091, 222364, 418975, 124073, 238764, 402618, 148674, 312519, 279752, 402632, 148687, 189651, 419028, 279766, 189656, 279775, 304352, 304353, 279780, 222441, 279789, 386288, 66802, 271607, 369912, 369913, 386296, 279803, 386304, 320769, 369929, 312588, 320795, 115997, 222496, 320802, 304422, 369964, 353581, 312628, 345397, 345398, 222523, 386363, 181568, 279872, 279874, 304457, 345418, 230730, 337228, 296269, 222542, 337226, 238928, 296274, 378201, 230757, 296304, 312688, 337280, 296328, 263561, 296330, 9618, 279955, 370066, 411028, 370072, 148899, 279980, 173492, 361928, 370122, 337359, 329168, 312785, 222674, 329170, 280020, 280025, 239069, 329181, 320997, 280042, 280043, 271850, 271853, 329198, 337391, 411119, 116209, 296434, 386551, 288248, 288252, 312830, 271880, 230922, 329231, 304655, 230933, 370200, 222754, 157219, 157220, 394793, 312879, 230960, 288305, 239159, 157246, 288319, 288322, 280131, 124486, 288328, 353875, 239192, 99937, 345697, 312937, 312941, 206447, 288377, 337533, 280193, 239238, 288391, 419462, 149127, 149128, 419464, 239251, 280217, 198304, 255651, 337590, 280252, 280253, 321217, 321220, 296649, 239305, 403149, 9935, 313042, 345813, 370390, 280279, 272087, 18139, 280285, 321250, 337638, 181992, 345832, 345835, 288492, 67316, 313082, 288508, 288515, 173828, 280326, 395018, 116491, 395019, 280333, 395026, 124691, 116502, 435993, 345882, 321309, 255781, 378666, 280367, 403248, 378673, 280373, 345910, 321338, 280381, 345918, 436029, 337734, 280396, 272207, 272208, 337746, 345942, 18263, 370526, 345950, 362336, 255844, 296807, 214894, 362351, 313200, 214896, 313204, 124795, 182145, 280451, 67464, 305032, 214936, 337816, 329627, 239515, 214943, 354210, 436130, 436135, 313257, 10153, 362411, 370604, 362418, 288698, 214978, 280517, 362442, 346066, 231382, 403421, 436189, 329696, 190437, 436199, 313322, 329707, 174058, 337899, 296942, 247786, 124912, 436209, 313338, 239610, 182277, 354310, 354311, 43016, 354312, 403463, 436235, 313356, 305173, 436248, 223269, 354342, 354346, 313388, 124974, 272432, 403507, 321589, 378933, 378934, 436283, 288829, 288835, 403524, 436293, 313415, 239689, 436304, 354386, 329812, 223317, 411738, 272477, 280676, 313446, 215144, 395373, 288878, 288890, 215165, 436372, 329884, 362658, 215204, 125108, 280761, 280767, 395458, 338118, 280779, 436429, 346319, 321744, 280792, 379102, 387299, 18661, 379110, 182503, 338151, 125166, 149743, 379120, 125170, 411892, 395511, 436471, 313595, 125184, 272644, 125192, 338187, 338188, 125200, 395536, 125204, 338196, 272661, 379157, 125215, 125225, 338217, 321839, 125236, 362809, 379193, 280903, 289109, 272730, 436570, 215395, 239973, 280938, 321901, 354671, 354672, 362864, 272755, 199030, 223611, 248188, 313726, 436609, 436613, 158087, 313736, 264591, 420241, 240020, 190870, 190872, 289185, 289195, 272815, 436659, 338359, 436677, 289229, 281038, 281039, 256476, 420326, 281071, 166403, 322057, 420374, 322077, 289328, 330291, 338491, 322119, 281165, 281170, 436831, 420461, 346739, 346741, 420473, 297600, 166533, 363155, 264855, 289435, 248494, 166581, 314043, 355006, 363212, 158424, 363228, 322269, 436957, 436960, 264929, 338658, 289511, 330473, 346859, 330476, 289517, 215790, 125683, 199415, 322302, 289534, 35584, 133889, 322312, 346889, 264971, 322320, 166677, 207639, 363295, 281378, 289580, 355117, 191285, 273209, 355129, 273211, 281407, 289599, 355136, 355138, 355147, 355148, 355153, 281426, 363353, 281434, 363354, 322396, 420702, 363361, 363362, 281444, 355173, 207728, 420722, 207735, 314240, 158594, 330627, 240517, 355216, 224149, 256918, 256919, 256920, 289691, 240543, 289699, 289720, 273336, 289723, 273341, 330688, 281541, 19398, 379845, 363462, 273353, 191445, 183254, 207839, 347104, 314343, 183276, 289773, 412653, 248815, 347122, 240631, 437245, 257023, 125953, 330759, 330766, 347150, 330789, 248871, 281647, 322609, 412725, 314437, 404550, 207954, 339031, 314458, 281698, 281699, 257126, 322664, 265323, 330867, 363643, 150656, 248960, 363658, 224400, 347286, 265366, 339101, 330912, 429216, 339106, 265381, 380069, 249003, 208044, 322733, 3243, 421050, 339131, 265410, 290001, 339167, 298209, 290030, 421102, 52473, 208123, 52476, 412926, 437504, 322826, 380178, 429332, 126229, 412963, 257323, 273713, 298290, 208179, 159033, 347451, 216387, 372039, 257353, 257354, 224591, 437585, 331091, 314708, 150868, 314711, 372064, 314721, 429410, 437602, 281958, 314727, 134504, 265579, 306541, 314734, 314740, 314742, 421240, 314745, 290170, 224637, 306558, 314759, 388488, 298378, 306580, 224662, 282008, 314776, 396697, 282013, 290206, 314788, 396709, 314790, 282023, 298406, 241067, 314797, 380335, 355761, 380348, 380350, 306630, 200136, 273865, 306634, 339403, 429540, 3557, 3559, 191980, 282097, 306678, 191991, 216575, 290304, 323083, 208397, 323088, 413202, 282132, 388630, 175640, 372261, 396850, 200245, 290359, 134715, 323132, 421437, 396865, 282182, 265800, 273992, 421452, 224848, 265809, 224852, 396885, 290391, 306777, 396889, 396896, 323171, 282214, 388712, 388713, 314997, 290425, 339579, 396927, 282244, 323208, 282248, 224907, 405140, 274071, 323226, 282272, 208547, 208548, 282279, 298664, 364202, 224951, 224952, 306875, 282302, 323262, 323265, 306891, 282321, 241366, 224985, 282330, 282336, 159462, 12009, 282349, 397040, 12017, 323315, 274170, 200444, 175874, 249606, 282375, 323335, 282379, 216844, 118549, 282390, 421657, 282399, 282401, 339746, 315172, 216868, 241447, 167720, 282418, 282424, 274234, 241471, 339782, 315209, 159563, 323405, 307024, 307030, 241494, 339799, 307038, 282471, 274288, 372592, 274296, 339840, 315265, 282503, 315272, 315275, 184207, 372625, 282517, 298912, 118693, 298921, 438186, 126896, 200628, 380874, 282573, 323554, 380910, 380922, 380923, 274432, 372736, 282634, 241695, 315431, 315433, 102441, 102446, 282671, 405552, 430127, 241717, 249912, 225347, 307269, 233548, 315468, 176209, 315477, 381013, 53334, 200795, 323678, 356446, 315488, 315489, 45154, 438374, 176231, 217194, 233578, 307306, 438378, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 241809, 323730, 430231, 422044, 299166, 192670, 192671, 233635, 258213, 299176, 323761, 184498, 258233, 299202, 176325, 299208, 233678, 266447, 282832, 372943, 356575, 307431, 438512, 372979, 381173, 184574, 217352, 266504, 61720, 315674, 381210, 282908, 282912, 233761, 282920, 438575, 315698, 332084, 438583, 282938, 127292, 438592, 323914, 201037, 282959, 348499, 250196, 348501, 168280, 389465, 323934, 332128, 381286, 242027, 242028, 160111, 250227, 315768, 315769, 291194, 291193, 291200, 266628, 340356, 242059, 225684, 373141, 315798, 291225, 389534, 242079, 397732, 291266, 373196, 283088, 283089, 242138, 176602, 184799, 291297, 283138, 324098, 233987, 340489, 397841, 283154, 258584, 291359, 397872, 283185, 234037, 340539, 266812, 348741, 381515, 348748, 430681, 332379, 111197, 242274, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 291455, 373377, 422529, 152196, 201348, 356998, 356999, 348807, 316044, 316048, 316050, 275102, 340645, 176805, 176810, 299698, 160441, 422591, 291529, 225996, 135888, 242385, 299737, 234216, 373485, 373486, 234233, 275193, 242428, 299777, 430853, 430860, 62222, 283418, 430880, 234276, 283431, 234290, 430909, 201534, 160576, 348999, 283466, 234330, 275294, 127840, 349025, 357219, 439145, 177002, 308075, 242542, 381811, 201590, 177018, 398205, 291713, 340865, 299912, 349066, 316299, 349068, 234382, 308111, 381840, 308113, 390034, 430999, 209820, 283551, 398244, 422825, 177074, 127945, 373705, 340960, 398305, 340967, 324587, 234476, 127990, 349176, 201721, 349179, 234499, 357380, 398370, 357413, 357420, 300087, 21567, 308288, 160834, 349254, 218187, 250955, 300109, 234578, 250965, 439391, 250982, 398444, 62574, 357487, 300145, 300147, 119925, 349304, 234626, 349315, 349317, 234635, 373902, 177297, 324761, 234655, 300192, 234662, 300200, 373937, 324790, 300215, 283841, 283846, 283849, 259275, 316628, 259285, 357594, 414956, 251124, 316661, 283894, 292092, 439550, 242955, 177420, 439563, 414989, 259346, 292145, 382257, 382264, 333114, 333115, 193853, 193858, 300354, 300355, 234830, 406862, 259408, 283990, 357720, 300378, 300379, 316764, 374110, 292194, 284015, 234864, 316786, 382329, 243073, 357763, 112019, 398740, 234902, 333224, 374189, 284086, 259513, 54719, 415170, 292291, 300488, 300490, 144862, 300526, 259569, 308722, 251379, 300539, 398844, 210429, 366081, 316951, 374297, 431646, 431662, 210489, 235069, 349764, 292424, 292426, 333389, 128589, 333394, 349780, 128600, 235096, 300643, 300645, 366198, 325246, 210558, 235136, 210559, 415360, 210569, 415369, 431754, 415376, 259741, 153252, 399014, 210601, 317102, 300729, 415419, 333508, 259780, 267978, 333522, 325345, 153318, 333543, 325357, 431861, 284410, 284425, 300810, 300812, 284430, 161553, 284436, 366358, 169751, 325403, 431901, 341791, 325411, 186148, 186149, 333609, 284460, 399148, 202541, 431918, 153392, 300849, 431935, 325444, 153416, 325449, 341837, 415566, 431955, 317268, 325460, 341846, 284508, 300893, 259937, 284515, 276326, 415592, 292713, 292719, 325491, 333687, 276343, 350072, 317308, 112510, 325508, 333700, 243590, 325514, 350091, 350092, 350102, 350108, 333727, 219046, 333734, 284584, 292783, 300983, 128955, 153553, 219102, 292835, 6116, 292838, 317416, 432114, 325620, 415740, 268286, 415744, 333827, 243720, 399372, 358418, 178215, 325675, 243763, 358455, 325695, 399433, 333902, 104534, 194667, 432241, 284789, 284790, 374913, 374914, 194692, 415883, 333968, 153752, 284827, 333990, 284840, 284843, 104633, 227517, 260285, 268479, 301255, 374984, 301270, 301271, 325857, 334049, 268515, 383208, 317676, 260337, 260338, 309504, 375040, 260355, 375052, 194832, 227601, 325904, 334104, 178459, 334121, 317738, 325930, 358698, 260396, 358707, 268609, 227655, 383309, 383327, 391521, 366948, 285031, 416103, 383338, 227702, 211327, 227721, 285074, 227730, 285083, 293275, 317851, 285089, 293281, 301482, 375211, 334259, 342454, 293309, 317889, 326083, 416201, 129484, 326093, 154061, 285152, 432608, 195044, 432616, 334315, 236020, 293368, 317949, 342537, 309770, 334345, 342549, 342560, 416288, 350758, 350759, 358951, 227881, 358952, 293420, 236080, 23093, 244279, 301635, 309831, 55880, 375373, 301647, 244311, 309847, 260705, 416353, 375396, 268901, 244326, 301688, 244345, 301702, 334473, 375438, 326288, 227991, 285348, 318127, 293552, 342705, 285362, 383668, 154295, 342714, 39616, 383708, 342757, 285419, 269036, 170735, 432883, 342775, 203511, 383740, 432894, 375552, 228099, 285443, 285450, 383755, 326413, 285457, 285467, 326428, 318247, 293673, 318251, 342827, 301872, 285493, 285496, 301883, 342846, 416577, 293702, 244569, 252766, 301919, 293729, 351078, 342888, 228214, 269179, 260995, 392071, 416649, 236427, 252812, 400271, 392080, 293780, 310166, 359332, 293801, 326571, 326580, 261045, 261046, 326586, 359365, 211913, 326602, 56270, 252878, 342990, 433104, 359380, 433112, 433116, 187372, 343020, 203758, 383980, 383994, 293894, 433166, 384015, 433173, 293911, 326684, 384031, 375848, 113710, 318515, 203829, 375902, 375903, 392288, 285795, 253028, 228457, 351343, 187505, 187508, 302202, 285819, 285823, 384127, 392320, 285833, 318602, 285834, 228492, 162962, 187539, 326803, 359574, 285850, 351389, 302239, 302251, 367791, 367792, 294069, 367798, 294075, 64699, 228541, 343230, 253124, 113863, 310496, 228587, 302319, 253168, 351475, 228608, 318732, 367897, 245018, 367898, 130342, 130344, 130347, 286012, 294210, 359747, 359748, 114022, 253288, 327030, 163190, 310650, 384379, 253316, 294278, 384391, 318860, 253339, 318876, 253340, 343457, 245160, 359860, 359861, 310714, 228796, 302530, 228804, 425417, 302539, 310731, 327122, 425434, 310747, 286176, 187877, 310758, 40439, 253431, 359931, 245249, 228868, 302602, 294413, 359949, 253456, 302613, 253462, 302620, 146976, 245290, 245291, 343606, 147011, 310853, 286281, 147020, 196184, 179800, 212574, 204386, 155238, 204394, 138862, 310896, 294517, 188021, 286344, 286351, 188049, 229011, 425624, 229021, 245413, 212649, 286387, 384693, 286392, 302778, 286400, 302798, 425682, 286419, 294621, 245471, 294629, 212721, 286457, 286463, 319232, 360194, 409355, 278292, 278294, 294699, 286507, 319289, 384826, 409404, 237397, 376661, 188250, 237411, 368486, 384871, 409446, 40809, 368489, 425832, 417648, 360315, 327556, 188293, 253828, 311183, 425875, 294806, 294808, 376733, 319393, 294820, 294824, 253868, 343993, 188349, 98240, 294849, 212953, 294887, 253930, 278507, 327666, 278515, 385011 ]
a38a79dcac09d6c2352ebdef1f96c43d3db35c1a
9940ab4e1ba727da4befbd094dbbc84d1d75035d
/Luna/LunarViewModel.swift
fc7ca1e92bb6b1d6b282d6d8d66b8edfea944efa
[]
no_license
ZainHaq/luna-ios
e00f5a5889dc202d808934c4ee56273de1936629
68386713399aa02c01d63655bb5dd67bbcf2f18e
refs/heads/master
2021-01-15T15:27:22.068860
2016-09-01T23:43:52
2016-09-01T23:43:52
63,510,931
1
0
null
null
null
null
UTF-8
Swift
false
false
1,295
swift
// // LunarViewModel.swift // Luna // // Created by Zain on 9/1/16. // Copyright © 2016 Zain-Ul Haq. All rights reserved. // import Foundation struct LunarViewModel { private let moon: Moon init(moon: Moon) { self.moon = moon } var icon: String { return moon.percent.symbolForMoon() } var phase: String { return moon.phase.capitalizedString } var rise: String { return self.formatter.stringFromDate(moon.rise) } var set: String { return self.formatter.stringFromDate(moon.set) } var age: String { let length = 27.3 let age = ((moon.percent * 0.01) * length) * 100.0 switch age { case 1: let day = String(format: "%.1f", age) return "\(day) day old" default: let days = String(format: "%.1f", age) return "\(days) days old" } } var illumination: String { let percent = String(format: "%.1f", moon.percent * 100) return "\(percent)% complete" } private var formatter: NSDateFormatter { let formatter = NSDateFormatter() formatter.dateFormat = "MMMM d yyyy 'at' h:mm a z" return formatter } }
[ -1 ]
afbaf0b530de5fea8f931ddf68dc0d6d35f2dcd4
c6ae04e575ce9acba03100b455d884880f9e4a64
/Sources/PexelsKit/PxSearchResponse.swift
db4b8b31094cbde8cdaa9e38909f89288a3300d8
[ "MIT" ]
permissive
ConfusedVorlon/PexelsKit
c0c6fde724c368fefd1383fa150c21db97693ffe
6ba086216f0a9c18b1365b8d36ac42fbcb08e001
refs/heads/master
2023-07-05T12:58:58.345095
2021-08-05T17:42:24
2021-08-05T17:42:24
392,347,217
0
0
null
null
null
null
UTF-8
Swift
false
false
388
swift
// // File.swift // // // Created by Rob Jonson on 03/08/2021. // import Foundation public struct PxSearchResponse:Codable { let page:Int let perPage:Int let totalResults:Int let nextPage:URL? let photos:[PxPhoto] enum CodingKeys: String, CodingKey { case page,perPage="per_page",totalResults="total_results",nextPage="next_page",photos } }
[ -1 ]
17714016e819464307abb8efd57d119ea1cae39b
103a1d768a59bed53860e8ab24409be29733a1b7
/Sources/SDGPrecisionMathematics/WholeNumberBinaryView.swift
b37c08b116678e6d30e2ff88ac716a582230a716
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SDGGiesbrecht/SDGCornerstone
22d6a12e91e94303a236addf1274e0e256dd4141
1ea9cd2d2380131f58ff10076b50465a624acdd0
refs/heads/master
2023-08-08T22:38:38.359913
2023-07-26T21:36:53
2023-07-26T21:36:53
89,294,864
34
5
NOASSERTION
2023-07-26T21:36:55
2017-04-24T23:06:33
Swift
UTF-8
Swift
false
false
4,341
swift
/* WholeNumberBinaryView.swift This source file is part of the SDGCornerstone open source project. https://sdggiesbrecht.github.io/SDGCornerstone Copyright ©2017–2023 Jeremy David Giesbrecht and the SDGCornerstone project contributors. Soli Deo gloria. Licensed under the Apache Licence, Version 2.0. See http://www.apache.org/licenses/LICENSE-2.0 for licence information. */ import SDGLogic import SDGMathematics import SDGBinaryData import SDGText import SDGLocalization import SDGCornerstoneLocalizations extension WholeNumber { internal struct BinaryView { // Cannot conform to Collection, because no SignedInteger is large enough to serve as IndexDistance // MARK: - Initialization internal init(_ wholeNumber: WholeNumber) { self.wholeNumber = wholeNumber } // MARK: - Properties internal var wholeNumber: WholeNumber // MARK: - Operations internal mutating func shiftLeft(_ distance: IndexDistance) { // Bits let insertionMask: WholeNumber.Digit = (1 << WholeNumber.Digit(distance.bitDistance)) − 1 var extractionMask = insertionMask extractionMask.binary.reverse() let shiftDistance = WholeNumber.Digit(distance.bitDistance) let extractionStart: WholeNumber.Digit = shiftDistance == 0 ? 0 : WholeNumber.Digit(SDGBinaryData.BinaryView<WholeNumber.Digit>.count) − shiftDistance let endIndex = wholeNumber.digitIndices.endIndex var carried: WholeNumber.Digit = 0 for index in wholeNumber.digitIndices { var digit = wholeNumber[index] let insertion = carried carried = digit.bitwiseAnd(with: extractionMask) >> extractionStart digit = digit << shiftDistance digit = digit.bitwiseOr(with: insertion) wholeNumber[index] = digit } wholeNumber[endIndex] = carried // Digits for index in wholeNumber.digitIndices.reversed() { wholeNumber[index + distance.digitDistance] = wholeNumber[index] } for index in 0..<distance.digitDistance { wholeNumber[index] = 0 } } // MARK: - Sequences internal func indicesBackwards(from end: Index, to start: Index) -> UnfoldSequence<Index, Index> { return sequence(state: end) { (index: inout Index) -> Index? in guard index ≠ self.startIndex else { return nil } index −= 1 return index } } internal func bitsBackwards(from end: Index, to start: Index) -> LazyMapSequence< UnfoldSequence<Index, Index>, Bool > { return indicesBackwards(from: end, to: start).lazy.map { self[$0] } } internal func bitsBackwards() -> LazyMapSequence<UnfoldSequence<Index, Index>, Bool> { return bitsBackwards(from: endIndex, to: startIndex) } internal func lastBitsBackwards(maximum distance: IndexDistance) -> LazyMapSequence< UnfoldSequence<Index, Index>, Bool > { guard distance ≥ count else { return bitsBackwards() } let start = endIndex − distance return bitsBackwards(from: endIndex, to: start) } // MARK: - Collection internal typealias Element = Bool internal let startIndex = Index(digit: 0, bit: 0) internal var endIndex: Index { guard let lastDigitIndex = wholeNumber.digitIndices.last else { return Index(digit: 0, bit: 0) } let lastDigit = wholeNumber[lastDigitIndex] let binary = lastDigit.binary for bitIndex in binary.indices.lazy.reversed() where binary[bitIndex] == true { return Index(digit: lastDigitIndex, bit: bitIndex) + 1 } preconditionFailure( UserFacing<StrictString, APILocalization>( // @exempt(from: tests) { [wholeNumber = self.wholeNumber] localization in // @exempt(from: tests) switch localization { case .englishCanada: return "\(wholeNumber.inDigits()) is not in normalized form." } }) ) } internal var count: IndexDistance { return endIndex − startIndex } internal subscript(index: Index) -> Element { get { return wholeNumber[index.digit].binary[index.bit] } set { wholeNumber[index.digit].binary[index.bit] = newValue } } } }
[ -1 ]
c497c8fe244a5cb22b19efc80a6561c127b05b4d
3d4fbdfb8f285fd281c463a740e2e105e989de7d
/CardTableView/ViewController.swift
9a5ecdc27b65b75385bd59ca7bc8cd006128ddc8
[]
no_license
youngmeen/matchUPList
b59fab24321003766483c963ebc0d0b4550dd1f4
f0600fbe3ea308c140c6ddb5dd5b3efa35a8d55a
refs/heads/main
2023-06-18T13:14:39.328232
2021-07-06T09:16:16
2021-07-06T09:16:16
383,409,473
0
0
null
null
null
null
UTF-8
Swift
false
false
344
swift
// // ViewController.swift // CardTableView // // Created by developer on 2021/07/06. // import UIKit class ViewController: UIViewController { @IBOutlet weak var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } }
[ -1 ]
27a9d7efeb4519a7ea5e9fb8639dc7d1fe733dd7
8804990821b236dda9781e5a17c24e27087e0191
/ExoUserMind/Extensions/NSManagedObject+Extension.swift
7da9b6635e3af74e5a7f45add5cbb17ed16844eb
[]
no_license
SynaOner92/Tuessetr
a0623ae727bb0a939679429e7ba11206cbd51ed1
bd8d92084fd6ed0140b46b19e20efcf3435591d1
refs/heads/master
2022-12-08T21:48:55.238951
2020-09-03T08:10:25
2020-09-03T08:10:25
286,950,803
0
0
null
null
null
null
UTF-8
Swift
false
false
283
swift
// // NSManagedObject+Extension.swift // ExoUserMind // // Created by Nicolas Moranny on 19/08/2020. // Copyright © 2020 Nicolas Moranny. All rights reserved. // import CoreData extension NSManagedObject { static var entityName: String { String(describing: self) } }
[ -1 ]
f286913b03d990b046b3692caff732a2fc08a372
f155a6392de51f765bf546748636d8609b88d38b
/DoIT!/ToDoListViewController.swift
09b6d8c09a299a1f0d77e2b58068056e7232025c
[]
no_license
CiCeFy/DoIT-
8b610ce504e6142939054a609328dfdd5f9d12b2
b46069f3dfd80d8dea9e7c8ae543c27ac813c24d
refs/heads/master
2020-04-20T15:51:37.518980
2019-02-03T13:23:09
2019-02-03T13:23:09
168,943,421
0
0
null
null
null
null
UTF-8
Swift
false
false
2,457
swift
// // ViewController.swift // DoIT! // // Created by Chris on 03.02.19. // Copyright © 2019 CiCeFy. All rights reserved. // import UIKit class ToDoListViewController: UITableViewController { var itemArray = ["Finde Mike", "Find Eggs", "Destroy"] override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } //MARK - Tableview Datasource Methods override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return itemArray.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "ToDoItemCell", for: indexPath) cell.textLabel?.text = itemArray[indexPath.row] return cell } //MARK -TableView Delegate Methods override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // print(itemArray[indexPath.row]) if tableView.cellForRow(at: indexPath)?.accessoryType == .checkmark { tableView.cellForRow(at: indexPath)?.accessoryType = .none } else { tableView.cellForRow(at: indexPath)?.accessoryType = .checkmark } tableView.deselectRow(at: indexPath, animated: true) } //MARK - Add new Items @IBAction func addButtonPressed(_ sender: UIBarButtonItem) { var textField = UITextField() let alert = UIAlertController(title: "Füge neue To-Do's hinzu!", message: "", preferredStyle: .alert) let action = UIAlertAction(title: "Item hinzufügen", style: .default) { (action) in //what will happen once the user clicks the ADD Item Button on our UIAlert self.itemArray.append(textField.text!) self.tableView.reloadData() } alert.addTextField { (alertTextField) in alertTextField.placeholder = "Neues Item erstellen" textField = alertTextField } alert.addAction(action) present(alert, animated: true, completion: nil) } }
[ -1 ]
4755453885bc02981b597b36d676eb47bfc9998d
d379da8f997f1b08aa26d092d7b2c8ffb06eec83
/Notes-Swift/Notes-Swift/NoteDetailViewController.swift
0977aeb66f64e17bcfb1da12eb2b191fe826cb23
[]
no_license
aayushm9595/Notes-Application
a98554091d9a3e9278fea58f2296d71b02619ee4
c25c408419e05fdbd4db826426abd6c290e64b76
refs/heads/master
2020-05-17T11:45:32.427813
2019-04-26T21:07:48
2019-04-26T21:07:48
183,693,827
0
0
null
null
null
null
UTF-8
Swift
false
false
2,036
swift
// // NoteDetailViewController.swift // Notes-Swift // // Created by Aayush Maheshwari on 04/20/19. // Copyright (c) 2019 aayush. All rights reserved. // import UIKit import MapKit class NoteDetailViewController: UIViewController { let locationManager = CLLocationManager() @IBOutlet weak var contentTextField: UITextView! @IBOutlet weak var titleTextField: UITextField! var note: Note! override func viewDidLoad() { super.viewDidLoad() locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.requestWhenInUseAuthorization() locationManager.requestLocation() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) titleTextField.text = note.title contentTextField.text = note.content } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) note.title = titleTextField.text ?? "" note.content = contentTextField.text } } extension NoteDetailViewController : CLLocationManagerDelegate { private func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) { if status == .authorizedWhenInUse { locationManager.requestLocation() } } func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { if let location = locations.first { print("location:: \(location)") note.longitude = locations.first?.coordinate.longitude ?? 0 note.latitude = locations.first?.coordinate.latitude ?? 0 } } // private func locationManager(manager: CLLocationManager, didFailWithError error: NSError) { // print("error:: \(error)") // } func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { print("error:: \(error)") } }
[ -1 ]
f5b77af6a0711c36695b8db643beb5fbd0a77e65
a2363e36b38dad63a20c0f8e07fc313ac45449db
/ManyFiles/U/U50.swift
7cf6bb1a8514c3962ef311ec4a11bd5ecf30d7d7
[]
no_license
chkpnt/ManyFiles
5099224d1354e82212392364dba3963ba2898b1a
0d2f93408099b0078d055e90e26347432ae228e9
refs/heads/master
2021-05-11T01:18:22.123331
2018-01-21T18:55:34
2018-01-21T18:55:34
118,326,560
0
1
null
null
null
null
UTF-8
Swift
false
false
116
swift
import Foundation class U50 { func someMethod() -> Int { return Int(arc4random_uniform(100)) } }
[ -1 ]
041a83cb563d5c83de6e22a0f9e52eade8da612b
794fba3ea8a8c1c3be2027b6668f53c63efb6d52
/MyMovieChart/MyMovieChart/TheaterViewController.swift
74aaaa51dca1e3bf913a0fd0fe9ccf54828e824d
[]
no_license
OKpurple/IOS_study
644611864f1db8a7b47869ad669bc1585f396359
e1fc3958b3fc313deacabac903149b9039e2c38e
refs/heads/master
2021-01-20T04:43:24.883112
2017-04-28T16:18:22
2017-04-28T16:18:22
89,723,610
0
0
null
null
null
null
UTF-8
Swift
false
false
1,022
swift
// // TheaterViewController.swift // MyMovieChart // // Created by jwh on 2017. 1. 25.. // Copyright © 2017년 jwh. All rights reserved. // import UIKit import MapKit class TheaterViewController : UIViewController{ var param : NSDictionary! @IBOutlet var map: MKMapView! override func viewDidLoad() { self.navigationItem.title = self.param["상영관명"] as? String let lat = (param?["위도"] as! NSString).doubleValue let lng = (param?["경도"] as! NSString).doubleValue let location = CLLocationCoordinate2D(latitude: lat, longitude: lng) let regionRadius: CLLocationDistance = 100 let coordinateRegion = MKCoordinateRegionMakeWithDistance(location, regionRadius, regionRadius) self.map.setRegion(coordinateRegion,animated: true) //지도에표시 let point = MKPointAnnotation() point.coordinate = location self.map.addAnnotation(point) } }
[ -1 ]
cc5d5029bb98ad1261b821ba9e8cd81dd985533f
7c882154f1cc1a0cc73a75612cac43768ad188a4
/Milestone 5/UNTZ/UNTZ/Controllers/Event/EventDetailsViewController.swift
bda52fa71b9fdb157cd0452fc221c586ed9b4cab
[]
no_license
srajan101/UNTZ-V-1.0
c6b0a92077540563578c0e70321f757763b7e081
ac6e844f23af27d3a23f46ea14e3f84f4f0ae5cf
refs/heads/master
2021-01-21T17:29:57.410831
2018-07-27T04:52:01
2018-07-27T04:52:01
91,958,126
0
0
null
null
null
null
UTF-8
Swift
false
false
41,545
swift
// // EventDetailsViewController.swift // UNTZ // // Created by Mahesh on 14/06/17. // Copyright © 2017 Mahesh Sonaiya. All rights reserved. // import UIKit enum EventStates: Int { case MarkAsInterested = 1, DeleteEvent, JoinEvent, LeaveEvent, MakeItLive, CancelEvent, UndoCancelEvent } class EventDetailsViewController: UIViewController { var eventDetailsResponse : EventDetailsResponse? open var eventId : Int? open var eventImageURL : String? var contentSize : CGFloat? @IBOutlet weak var eventImageView: UIImageView! @IBOutlet weak var hostedByLabel: FRHyperLabel! @IBOutlet weak var placeLable: UNLabel! @IBOutlet weak var peopleCountLabel: UNLabel! @IBOutlet weak var timeLabel: UNLabel! @IBOutlet weak var dateDayLabel: UNLabel! @IBOutlet weak var eventNameLabel: UNLabel! @IBOutlet weak var dateMonthLabel: UNLabel! @IBOutlet weak var performingLbl: UILabel! @IBOutlet weak var performTimeLbl: UILabel! @IBOutlet weak var eventTypeLabel: UNLabel! @IBOutlet weak var eventTextLabel: UNLabel! @IBOutlet weak var profileImageview: UIImageView! @IBOutlet weak var scrollview: UIScrollView! @IBOutlet weak var interestedLabel: UILabel! @IBOutlet weak var detailview: UIView! @IBOutlet weak var shadowview: UIView! @IBOutlet weak var mainView: UIView! @IBOutlet weak var interestedButton: UNButton! @IBOutlet weak var artistsButton : UNButton! @IBOutlet weak var userdisplayView: UIView! @IBOutlet weak var DisplayTypeView: UIView! @IBOutlet weak var belowButtonView: UIView! @IBOutlet weak var songImageView : UIImageView! @IBOutlet weak var songTitle : UNLabel! @IBOutlet weak var artistName : UNLabel! @IBOutlet weak var mainViewHeightConstraint : NSLayoutConstraint! @IBOutlet weak var shadowViewHeightConstraint : NSLayoutConstraint! @IBOutlet weak var displayTypeHeightConstraint : NSLayoutConstraint! @IBOutlet weak var currentSongPlayingHeightConstraint : NSLayoutConstraint! @IBOutlet weak var currentSongPlayingTopSpaceConstraint : NSLayoutConstraint! @IBOutlet weak var buttonWidthConstraint : NSLayoutConstraint! @IBOutlet weak var buttonHeightConstraint : NSLayoutConstraint! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. let statusBarView = UIView(frame: UIApplication.shared.statusBarFrame) let statusBarColor = UIColor(red: 190, green: 20/255, blue: 17/255, alpha: 1) statusBarView.backgroundColor = statusBarColor view.addSubview(statusBarView) self.navigationController?.navigationBar.isHidden = true initSetUp() self.eventImageView.sd_setImage(with: URL.init(string: eventImageURL!), placeholderImage: UIImage.init(named: "default_image"), options: .refreshCached) { (image, error, imageCacheType, imageUrl) in if image != nil { let height = image?.size.height self.mainViewHeightConstraint.constant = 220 + height! self.shadowViewHeightConstraint.constant = 230 + height! self.contentSize = self.shadowViewHeightConstraint.constant } else { let image = UIImage.init(named: "default_image") //self.eventImageView.setIm let height = image?.size.height self.mainViewHeightConstraint.constant = 220 + height! self.shadowViewHeightConstraint.constant = 230 + height! self.contentSize = self.shadowViewHeightConstraint.constant } } /*self.eventImageView.sd_setImage(with: URL.init(string: eventImageURL!)) { (image, error, imageCacheType, imageUrl) in if image != nil { let height = image?.size.height self.mainViewHeightConstraint.constant = 220 + height! self.shadowViewHeightConstraint.constant = 230 + height! self.contentSize = self.shadowViewHeightConstraint.constant } else { let image = UIImage.init(named: "default_image") //self.eventImageView.setIm let height = image?.size.height self.mainViewHeightConstraint.constant = 220 + height! self.shadowViewHeightConstraint.constant = 230 + height! self.contentSize = self.shadowViewHeightConstraint.constant } } */ shadowview.setViewShadow() profileImageview.layer.cornerRadius = profileImageview.frame.size.height/2 profileImageview.clipsToBounds = true if (UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.Imageurl) != nil) { profileImageview.sd_setImage(with: URL(string: UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.Imageurl) as! String), placeholderImage: nil) } self.getEventDetails() } override func viewDidLayoutSubviews() { //self.scrollview.contentSize = CGSize.init(width: self.scrollview.frame.size.width, height: self.contentSize!) } func initSetUp() -> Void { mainView.layer.cornerRadius = 5.0 mainView.clipsToBounds = true self.contentSize = 0.0 scrollview.isHidden = true interestedButton.layer.borderColor = UIColor.red.cgColor interestedButton.layer.borderWidth = 0.5 interestedButton.layer.cornerRadius = 3.6 interestedButton.clipsToBounds = true artistsButton.layer.borderColor = UIColor.red.cgColor artistsButton.layer.borderWidth = 0.5 artistsButton.layer.cornerRadius = 3.6 artistsButton.clipsToBounds = true buttonWidthConstraint.constant = DYNAMICFONTSIZE.SCALE_FACT_FONT * 88; buttonHeightConstraint.constant = DYNAMICFONTSIZE.SCALE_FACT_FONT * 88; let eventDetailTapGesturer = UITapGestureRecognizer.init(target: self, action: #selector(openEventDetailsOnFacebook)) self.peopleCountLabel.addGestureRecognizer(eventDetailTapGesturer) } override func viewWillDisappear(_ animated: Bool) { self.navigationController?.navigationBar.isHidden = false } @IBAction func backClicked(_ sender: Any) { self.navigationController?.popViewController(animated: true) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override var preferredStatusBarStyle: UIStatusBarStyle { return .lightContent } //MARK :- Get Event Details func getEventDetails() { GLOBAL().showLoadingIndicatorWithMessage("") UNTZReqeustManager.sharedInstance.apiGetEventDetails(self.eventId!) { (feedResponse) -> Void in GLOBAL().hideLoadingIndicator() if let downloadError = feedResponse.error{ print(downloadError) GLOBAL().showAlert(APPLICATION.applicationName, message: downloadError.localizedDescription, actions: nil) } else { GLOBAL().hideLoadingIndicator() if let dictionary = feedResponse.responseDict as? Dictionary<String, AnyObject>{ self.eventDetailsResponse = EventDetailsResponse.init(jsonDict:dictionary["data"] as! Dictionary<String, AnyObject>) print("\(String(describing: self.eventDetailsResponse?.userEventDetails?.eventInfo?.category))") self.displayUI() } } } } func displayUI() { if(eventDetailsResponse?.userEventDetails?.eventInfo?.islive)! { self.getCurrentlyPlayingTrack() } self.eventNameLabel.text = self.eventDetailsResponse?.userEventDetails?.eventInfo?.eventName self.eventTypeLabel.text = self.eventDetailsResponse?.userEventDetails?.eventInfo?.category?.replacingOccurrences(of: "_", with: " ") self.timeLabel.text = self.eventDetailsResponse?.userEventDetails?.eventInfo?.dateTimeStart if let distance = self.eventDetailsResponse?.userEventDetails?.eventInfo?.distanceFromDeviceLocation { self.placeLable.text = String.init(format: "%@ (%0.01f miles)", (self.eventDetailsResponse?.userEventDetails?.eventInfo?.eventLocation?.locationName)!,distance) } else { self.placeLable.text = String.init(format: "%@ (0.0 miles)", (self.eventDetailsResponse?.userEventDetails?.eventInfo?.eventLocation?.locationName)!) } let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" //Your date format //yyyy-MM-dd'T'HH:mm:ss-mm:ss dateFormatter.timeZone = NSTimeZone(name: "PT") as TimeZone! let date = dateFormatter.date(from: (self.eventDetailsResponse?.userEventDetails?.eventInfo?.dateTimeStart)!) //according to date format your date string if self.eventDetailsResponse?.userEventDetails?.eventInfo?.dateTimeEnd != nil { let endDate = dateFormatter.date(from: (self.eventDetailsResponse?.userEventDetails?.eventInfo?.dateTimeEnd)!) //according to date if (endDate != nil && date != nil){ dateFormatter.dateFormat = "EEE h:mm a" let dateName = dateFormatter.string(from: date!) dateFormatter.dateFormat = "h:mm a" let endDateName = dateFormatter.string(from: endDate!) self.timeLabel.text = String.init(format: "%@ - %@", dateName,endDateName) } else{ self.timeLabel.text = "" } } else if (date != nil){ dateFormatter.dateFormat = "EEE h:mm a" let dateName = dateFormatter.string(from: date!) self.timeLabel.text = dateName } if (date != nil){ dateFormatter.dateFormat = "MMM" let monthName = dateFormatter.string(from: date!) self.dateMonthLabel.text = monthName dateFormatter.dateFormat = "dd" let datefmt = dateFormatter.string(from: date!) self.dateDayLabel.text = datefmt } else{ self.dateMonthLabel.text = "" self.dateDayLabel.text = "" } var eventAdminName : String = "" var charactersArray: [String] = [] for eventAdmin in (self.eventDetailsResponse?.userEventDetails?.eventInfo?.eventAdminsArray)! { eventAdminName.append(eventAdmin.adminName! + ",") charactersArray.append(eventAdmin.adminName!) } let truncatedEventAdminName = String(eventAdminName.characters.dropLast()) self.hostedByLabel.text = String.init(format: "Hosted By %@", truncatedEventAdminName) let attributes = [NSForegroundColorAttributeName: UIColor(red: 190, green: 20/255, blue: 17/255, alpha: 1), NSFontAttributeName: UIFont.preferredFont(forTextStyle: UIFontTextStyle.subheadline)] self.hostedByLabel.attributedText = NSAttributedString(string: self.hostedByLabel.text!, attributes: attributes) //Step 2: Define a selection handler block let handler = { (hyperLabel: FRHyperLabel?, substring: String?) -> Void in self.openEventDetailsOnFacebookNew(strName: substring!) } //Step 3: Add link substrings self.hostedByLabel.setLinksForSubstrings(charactersArray, withLinkHandler: handler) self.hostedByLabel.isUserInteractionEnabled = true self.peopleCountLabel.text = String.init(format: "%ld Attending | %ld Interested", (self.eventDetailsResponse?.userEventDetails?.eventInfo?.facebookAttendingCount)!,(self.eventDetailsResponse?.userEventDetails?.eventInfo?.facebookInterestedCount)!) performTimeLbl.text = timediffernce() if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { if (eventDetailsResponse?.userEventDetails?.isUserArtist)! || (eventDetailsResponse?.userEventDetails?.isUserInterested)! || (eventDetailsResponse?.userEventDetails?.isUserAdmin)! { userdisplayView.isHidden = false displayTypeHeightConstraint.constant = 70.0 self.contentSize = self.contentSize! + self.displayTypeHeightConstraint.constant if (eventDetailsResponse?.userEventDetails?.isUserAdmin)! { if (eventDetailsResponse?.userEventDetails?.eventInfo?.islive)! { if (eventDetailsResponse?.userEventDetails?.eventInfo?.isCancelled)! { interestedLabel.isHidden = false performingLbl.isHidden = false performTimeLbl.isHidden = true eventTextLabel.isHidden = true performingLbl.text = "You are Hosting" interestedLabel.text = "This Event Has Been Cancelled!" interestedButton.setTitle("UNDO CANCEL", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "undo_cancel"), for: UIControlState.normal) interestedButton.tag = EventStates.UndoCancelEvent.rawValue } else { interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false eventTextLabel.isHidden = true performingLbl.text = "You are Hosting" performTimeLbl.text = timediffernce() interestedButton.setTitle("CANCEL", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "cancel_event"), for: UIControlState.normal) interestedButton.tag = EventStates.CancelEvent.rawValue } } else { interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false eventTextLabel.isHidden = true performingLbl.text = "You are Hosting" interestedButton .setTitle("GO LIVE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "go_live"), for: UIControlState.normal) interestedButton.tag = EventStates.MakeItLive.rawValue } } else { if (eventDetailsResponse?.userEventDetails?.isUserInterested)! { if (eventDetailsResponse?.userEventDetails?.eventInfo?.islive)! { if (eventDetailsResponse?.userEventDetails?.isUserJoined)! { interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false eventTextLabel.isHidden = true performingLbl.text = "You have Joined" //performTimeLbl.text = "Went Live 6 hours ago!" performTimeLbl.text = timediffernce() interestedButton.setTitle("LEAVE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "leave_event"), for: UIControlState.normal) interestedButton.tag = EventStates.LeaveEvent.rawValue } else { interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false eventTextLabel.isHidden = true //performTimeLbl.text = "Went Live 6 hours ago!" performTimeLbl.text = timediffernce() performingLbl.text = "You are Interested" interestedButton .setTitle("JOIN", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "join_event"), for: UIControlState.normal) interestedButton.tag = EventStates.JoinEvent.rawValue } } else { interestedLabel.isHidden = false performingLbl.isHidden = true performTimeLbl.isHidden = true eventTextLabel.isHidden = true interestedButton.setTitle("DELETE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "delete"), for: UIControlState.normal) interestedButton.tag = EventStates.DeleteEvent.rawValue } } else { interestedLabel.isHidden = true eventTextLabel.isHidden = false interestedButton .setTitle("INTERESTED", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "interested_event"), for: UIControlState.normal) interestedButton.tag = EventStates.MarkAsInterested.rawValue } } if (eventDetailsResponse?.userEventDetails?.isUserArtist)! { //performingLbl.isHidden = false //performTimeLbl.text = "You are performming!" } eventTextLabel.isHidden = true } else { eventTextLabel.isHidden = false interestedLabel.isHidden = true interestedButton .setTitle("INTERESTED", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "interested_event"), for: UIControlState.normal) interestedButton.tag = EventStates.MarkAsInterested.rawValue } } else { eventTextLabel.isHidden = false } self.contentSize = self.contentSize! + 125 + 80 self.scrollview.contentSize = CGSize.init(width: self.scrollview.frame.size.width, height: self.contentSize!) UIView.animate(withDuration: 0.5, animations: { self.scrollview.isHidden = false self.view.layoutIfNeeded() }) } func getCurrentlyPlayingTrack() { //GLOBAL().showLoadingIndicatorWithMessage("") UNTZReqeustManager.sharedInstance.apiGetCurrentlyPlayingTrack(self.eventId!) { (feedResponse) -> Void in //GLOBAL().hideLoadingIndicator() if let downloadError = feedResponse.error { print(downloadError) GLOBAL().showAlert(APPLICATION.applicationName, message: downloadError.localizedDescription, actions: nil) } else { //GLOBAL().hideLoadingIndicator() if let dictionary = feedResponse.responseDict as? Dictionary<String, AnyObject> { print(dictionary) if let dataDict = dictionary["data"] as? Dictionary<String,AnyObject> { self.displayLiveSong(dataDict) } } } } } func displayLiveSong(_ data: Dictionary<String, AnyObject>) -> Void { let curretntlyEventPlayingTrack = data["EventPlaylistTrack"] as! Dictionary<String,AnyObject> let songName = curretntlyEventPlayingTrack["spotifyTrackName"] as! String let imagePath = curretntlyEventPlayingTrack["spotifyAlbumImageUri"] as! String let artistsArray = curretntlyEventPlayingTrack["eventTrackArtists"] as! Array<Dictionary<String,AnyObject>> let artistDict = artistsArray[0] let artistNameValue = artistDict["name"] as! String songTitle.text = songName artistName.text = artistNameValue songImageView.layer.cornerRadius = profileImageview.frame.size.height/2 songImageView.clipsToBounds = true songImageView.sd_setImage(with: URL.init(string: imagePath)) UIView.animate(withDuration: 0.5, animations: { self.userdisplayView.isHidden = false self.currentSongPlayingHeightConstraint.constant = 70 self.view.layoutIfNeeded() }) } //MARK :- Mark Event as Interested Or Not func markEventAsInterested(_ interested : Bool) { GLOBAL().showLoadingIndicatorWithMessage("") UNTZReqeustManager.sharedInstance.apiMarkEventAsInterestedOrNot(self.eventId!, isInterested: interested) { (feedResponse) -> Void in GLOBAL().hideLoadingIndicator() if let downloadError = feedResponse.error{ print(downloadError) GLOBAL().showAlert(APPLICATION.applicationName, message: downloadError.localizedDescription, actions: nil) } else { GLOBAL().hideLoadingIndicator() if let dictionary = feedResponse.responseDict as? Dictionary<String, AnyObject>{ //self.eventDetailsResponse = EventDetailsResponse.init(jsonDict:dictionary) print("\(dictionary)") let dataValue = dictionary["data"] as! Bool! if dataValue == true { self.eventDetailsResponse?.userEventDetails?.isUserInterested = interested self.changeViewToInterested() } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "Something is not working!", actions: nil) } } } } } //MARK :- Mark Event as Canceled Or Not func markEventAsCanceledOrNot(_ isCancelled : Bool) { GLOBAL().showLoadingIndicatorWithMessage("") UNTZReqeustManager.sharedInstance.apiMarkEventAsCanceledOrNot(self.eventId!, isCancelled: isCancelled) { (feedResponse) -> Void in GLOBAL().hideLoadingIndicator() if let downloadError = feedResponse.error{ print(downloadError) GLOBAL().showAlert(APPLICATION.applicationName, message: downloadError.localizedDescription, actions: nil) } else { GLOBAL().hideLoadingIndicator() if let dictionary = feedResponse.responseDict as? Dictionary<String, AnyObject>{ //self.eventDetailsResponse = EventDetailsResponse.init(jsonDict:dictionary) print("\(dictionary)") let dataValue = dictionary["data"] as! Bool! if dataValue == true { self.eventDetailsResponse?.userEventDetails?.eventInfo?.isCancelled = isCancelled self.changeViewToLiveOrCancel() } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "Something is not working!", actions: nil) } } } } } // MARK: Mark Event as Go Live func goLiveEvent() { GLOBAL().showLoadingIndicatorWithMessage("") UNTZReqeustManager.sharedInstance.apiGoLiveEvent(self.eventId!) { (feedResponse) -> Void in GLOBAL().hideLoadingIndicator() if let downloadError = feedResponse.error{ print(downloadError) GLOBAL().showAlert(APPLICATION.applicationName, message: downloadError.localizedDescription, actions: nil) } else { GLOBAL().hideLoadingIndicator() if let dictionary = feedResponse.responseDict as? Dictionary<String, AnyObject>{ let dataValue = dictionary["data"] as! Bool! if dataValue == true { self.eventDetailsResponse?.userEventDetails?.eventInfo?.islive = true self.changeViewToLiveOrCancel() } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "Something is not working!", actions: nil) } } } } } //MARK: Join Event or Leave Event func joinOrLeaveEvent(_ isLeaving : Bool) { GLOBAL().showLoadingIndicatorWithMessage("") UNTZReqeustManager.sharedInstance.apiJoinOrLeaveEvent(self.eventId!, isLeaving: isLeaving) { (feedResponse) -> Void in GLOBAL().hideLoadingIndicator() if let downloadError = feedResponse.error{ print(downloadError) GLOBAL().showAlert(APPLICATION.applicationName, message: downloadError.localizedDescription, actions: nil) } else { GLOBAL().hideLoadingIndicator() if let dictionary = feedResponse.responseDict as? Dictionary<String, AnyObject>{ print("\(dictionary)") let dataValue = dictionary["data"] as! Bool! if dataValue == true { self.eventDetailsResponse?.userEventDetails?.isUserJoined = !isLeaving self.changeViewToJoinOrLeave() } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "Something is not working!", actions: nil) } } } } } @IBAction func interestedButtonEvent(_ sender: UIButton) { let eventStateValue = sender.tag as Int! if (eventStateValue == EventStates.MarkAsInterested.rawValue || eventStateValue == EventStates.DeleteEvent.rawValue) { markAsInterestedEvent() } else if (eventStateValue == EventStates.JoinEvent.rawValue || eventStateValue == EventStates.LeaveEvent.rawValue) { joinEventPlatform() } else if (eventStateValue == EventStates.MakeItLive.rawValue || eventStateValue == EventStates.CancelEvent.rawValue || eventStateValue == EventStates.UndoCancelEvent.rawValue) { liveEventPlatform() } } func markAsInterestedEvent() { if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { if (eventDetailsResponse?.userEventDetails?.isUserInterested)! { markEventAsInterested(false) interestedLabel.isHidden = false performingLbl.isHidden = true performTimeLbl.isHidden = true eventTextLabel.isHidden = true interestedButton .setTitle("DELETE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "delete"), for: UIControlState.normal) } else { markEventAsInterested(true) interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false eventTextLabel.isHidden = false interestedButton .setTitle("INTERESTED", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "interested_event"), for: UIControlState.normal) } } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "Login to mark as Interested!", actions: nil) } } // MARK: LIVE Event Platform func liveEventPlatform() { if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { if (eventDetailsResponse?.userEventDetails?.eventInfo?.islive)! { if (eventDetailsResponse?.userEventDetails?.eventInfo?.isCancelled)! { markEventAsCanceledOrNot(false) } else { markEventAsCanceledOrNot(true) } // interestedButton.setTitle("LIVE", for: UIControlState.normal) // interestedButton .setImage(UIImage.init(named: "go_live"), for: UIControlState.normal) } else { goLiveEvent() // interestedButton.setTitle("CANCEL", for: UIControlState.normal) // interestedButton .setImage(UIImage.init(named: "cancel_event"), for: UIControlState.normal) } } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "You are not admin!", actions: nil) } } // MARK: JOIN Event Platform func joinEventPlatform() { if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { if (eventDetailsResponse?.userEventDetails?.isUserJoined)! { joinOrLeaveEvent(true) interestedButton.setTitle("LEAVE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "leave_event"), for: UIControlState.normal) } else { joinOrLeaveEvent(false) interestedButton.setTitle("JOIN", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "join_event"), for: UIControlState.normal) } } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "Login to Join Event!", actions: nil) } } // MARK: Change View To Interested func changeViewToInterested () { if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { if (eventDetailsResponse?.userEventDetails?.isUserInterested)! { interestedLabel.isHidden = false eventTextLabel.isHidden = true performingLbl.isHidden = true performTimeLbl.isHidden = true interestedButton.setTitle("DELETE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "delete"), for: UIControlState.normal) UIView.animate(withDuration: 1.0, animations: { self.userdisplayView.isHidden = false self.view.layoutIfNeeded() }) } else { interestedLabel.isHidden = true eventTextLabel.isHidden = false performingLbl.isHidden = true performTimeLbl.isHidden = true interestedButton .setTitle("INTERESTED", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "interested_event"), for: UIControlState.normal) UIView.animate(withDuration: 1.0, animations: { self.userdisplayView.isHidden = true self.view.layoutIfNeeded() }) } } else { userdisplayView.isHidden = true } } // MARK: Change View To Join Or Leave func changeViewToJoinOrLeave () { if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { if (eventDetailsResponse?.userEventDetails?.eventInfo?.islive)! { if (eventDetailsResponse?.userEventDetails?.isUserJoined)! { interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false eventTextLabel.isHidden = true performingLbl.text = "You have Joined" performTimeLbl.text = "Went Live 6 hours ago!" eventTextLabel.isHidden = true interestedButton.setTitle("LEAVE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "leave_event"), for: UIControlState.normal) interestedButton.tag = EventStates.LeaveEvent.rawValue UIView.animate(withDuration: 1.0, animations: { self.userdisplayView.isHidden = false self.view.layoutIfNeeded() }) } } else { interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false eventTextLabel.isHidden = true performTimeLbl.text = "Went Live 6 hours ago!" interestedLabel.text = "You are Interested" interestedButton .setTitle("JOIN", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "join_event"), for: UIControlState.normal) interestedButton.tag = EventStates.JoinEvent.rawValue UIView.animate(withDuration: 1.0, animations: { self.userdisplayView.isHidden = true self.view.layoutIfNeeded() }) } } else { userdisplayView.isHidden = true } } // MARK: Change View To Live And Cancel func changeViewToLiveOrCancel () { if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { if (eventDetailsResponse?.userEventDetails?.isUserAdmin)! { if (eventDetailsResponse?.userEventDetails?.eventInfo?.islive)! { if (eventDetailsResponse?.userEventDetails?.eventInfo?.isCancelled)! { interestedLabel.isHidden = false performingLbl.isHidden = false performTimeLbl.isHidden = true performingLbl.text = "You are Hosting" interestedLabel.text = "This Event Has Been Cancelled!" eventTextLabel.isHidden = true interestedButton.setTitle("UNDO CANCEL", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "undo_cancel"), for: UIControlState.normal) interestedButton.tag = EventStates.UndoCancelEvent.rawValue } else { interestedLabel.isHidden = true performingLbl.isHidden = false performTimeLbl.isHidden = false performingLbl.text = "You are Hosting" performTimeLbl.text = timediffernce() eventTextLabel.isHidden = true interestedButton.setTitle("CANCEL", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "cancel_event"), for: UIControlState.normal) interestedButton.tag = EventStates.CancelEvent.rawValue } } else { interestedLabel.isHidden = false eventTextLabel.isHidden = true performingLbl.isHidden = true interestedLabel.text = "You are Hosting" interestedButton .setTitle("GO LIVE", for: UIControlState.normal) interestedButton .setImage(UIImage.init(named: "go_live"), for: UIControlState.normal) interestedButton.tag = EventStates.MakeItLive.rawValue } } } else { userdisplayView.isHidden = true } } func openEventDetailsOnFacebook() { let facebookEventURL = String.init(format: "https://www.facebook.com/%@", (eventDetailsResponse?.userEventDetails?.eventInfo?.facebookid)!) if UIApplication.shared.canOpenURL(URL.init(string: facebookEventURL)!) { if #available(iOS 10.0, *) { UIApplication.shared.open((URL.init(string: facebookEventURL)!), options: [:], completionHandler: nil) } else { // Fallback on earlier versions UIApplication.shared.openURL(URL.init(string: facebookEventURL)!) } } } func openEventDetailsOnFacebookNew(strName :String) { var eventadminid : String eventadminid = strName for eventAdmin in (self.eventDetailsResponse?.userEventDetails?.eventInfo?.eventAdminsArray)! { if eventAdmin.adminName == strName{ eventadminid = eventAdmin.facebookUserId! } } let facebookEventURL = String.init(format: "https://www.facebook.com/%@", eventadminid) //(eventDetailsResponse?.userEventDetails?.eventInfo?.facebookid)! if UIApplication.shared.canOpenURL(URL.init(string: facebookEventURL)!) { if #available(iOS 10.0, *) { UIApplication.shared.open((URL.init(string: facebookEventURL)!), options: [:], completionHandler: nil) } else { // Fallback on earlier versions UIApplication.shared.openURL(URL.init(string: facebookEventURL)!) } } } @IBAction func whatsHappeningButtonEvent(_ sender: Any) { if UserInfo.sharedInstance.getUserDefault(key: UNUserInfoKeys.accessToken) != nil { let detailObj = makeStoryObj(storyboard: storyboard_R1, Identifier: "IDFeedPostVC") as! FeedPostViewController detailObj.eventId = eventId pushStoryObj(obj: detailObj, on: self) } else { GLOBAL().showAlert(APPLICATION.applicationName, message: "Login to join the conversation!", actions: nil) } } @IBAction func requestsButtonEvent(_ sender: Any) { GLOBAL().showAlert(APPLICATION.applicationName, message: "Under Progress!", actions: nil) } @IBAction func aboutUsButtonEvent(_ sender: Any) { let detailObj = makeStoryObj(storyboard: storyboard_R1, Identifier: "IDEventAboutVC") as! AboutDetailViewController detailObj.detailTxt = self.eventDetailsResponse?.userEventDetails?.eventInfo?.eventDescription detailObj.LocationTxt = (self.eventDetailsResponse?.userEventDetails?.eventInfo?.eventLocation?.locationName) pushStoryObj(obj: detailObj, on: self) } @IBAction func artistButtonEvent(_ sender: Any) { GLOBAL().showAlert(APPLICATION.applicationName, message: "Under Progress!", actions: nil) } func timediffernce() -> String? { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" //Your date format //yyyy-MM-dd'T'HH:mm:ss-mm:ss //dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) dateFormatter.locale = Locale(identifier: "en_US_POSIX") dateFormatter.timeZone = NSTimeZone(name: "PT") as TimeZone! if self.eventDetailsResponse?.userEventDetails?.eventInfo?.islivedatetime != nil { let date = dateFormatter.date(from: (self.eventDetailsResponse?.userEventDetails?.eventInfo?.islivedatetime)!) //according to date format your date string let now = Date() let timeOffset = now.offset(from:date! ) // return ("Went live \(timeOffset) ago") } else { return ("Went live few mins ago") } } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
4499b2c10dc4b962dae9e746723c3554cbeb04bc
def8cb29eb00256ae349198a9c64c0857734a32f
/NetworkLayer/Networking/Helper/NetworkHelper.swift
902652f80b50a449149d1ce3cf96c239b29a01dd
[]
no_license
SupranJowti/Network-Layer-iOS
440ee8496b726049390804ec558ca135b3e5a771
20a8a2c8e99de9d3a2f6c7cbd77ddf83f33fdafb
refs/heads/master
2023-06-01T14:49:00.306789
2021-06-26T05:59:20
2021-06-26T05:59:20
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,062
swift
// // NetworkHelper.swift // NetworkLayer // // Created by Malcolm Kumwenda on 2018/03/11. // Copyright © 2018 Malcolm Kumwenda. All rights reserved. // import Foundation typealias ResultWithError<T> = Result<T, Error> struct NetworkHelper { static let shared = NetworkHelper() private init() {} func handle<T: Decodable>(_ data: Data?, _ response: URLResponse?, _ error: Error?) -> ResultWithError<T> { var result: ResultWithError<T> = .failure(NetworkResponseError.failed) if let error = error { result = .failure(error) return result } guard let response = response as? HTTPURLResponse else { result = .failure(NetworkResponseError.httpURLResponseCastFailed) return result } switch handleNetworkResponse(response) { case .success: guard let responseData = data else { result = .failure(NetworkResponseError.noData) return result } do { let jsonData = try JSONSerialization.jsonObject(with: responseData, options: .mutableContainers) print(jsonData) let apiResponse = try JSONDecoder().decode(T.self, from: responseData) result = .success(apiResponse) } catch { print(error) result = .failure(NetworkResponseError.unableToDecode) } case .failure(let networkFailureError): result = .failure(networkFailureError) } return result } private func handleNetworkResponse(_ response: HTTPURLResponse) -> ResultWithError<Void> { switch response.statusCode { case 200...299: return .success(()) case 401...500: return .failure(NetworkResponseError.authenticationError) case 501...599: return .failure(NetworkResponseError.badRequest) case 600: return .failure(NetworkResponseError.outdated) default: return .failure(NetworkResponseError.failed) } } }
[ -1 ]
454f65a08ffe6b564e1e69cbeda145df64ea98ae
f0b9414645c832a7bdc9e2b92ef7fba97887291e
/Watch Extension/WatchSessionManager.swift
b6006c18d2ef9973d2b91f60b9e9799fc2c299f8
[]
no_license
vitalycher/Door
0d7a8b39a746ca8925d7f48ff16a24345eadaae8
bb11452530d7d202e8c32d7ce23f9e1ff32527f4
refs/heads/master
2020-03-21T13:04:50.451833
2018-06-25T11:16:02
2018-06-25T11:16:02
138,587,078
0
0
null
null
null
null
UTF-8
Swift
false
false
1,235
swift
// // WatchConnectivityService.swift // Watch Extension // // Created by Vitaly Chernysh on 9/4/17. // Copyright © 2017 Egor Bozko. All rights reserved. // import Foundation import WatchConnectivity import Foundation import WatchConnectivity class WatchSessionManager: NSObject { static let sharedManager = WatchSessionManager() private let session: WCSession? = WCSession.isSupported() ? WCSession.default : nil func startSession() { session?.delegate = self session?.activate() } } extension WatchSessionManager: WCSessionDelegate { func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) { } } extension WatchSessionManager { func session(_ session: WCSession, didReceiveApplicationContext applicationContext: [String : Any]) { DispatchQueue.main.async { if let token = applicationContext[UserDefaultsKeys.userToken.rawValue] as? String { UserDefaults.standard.set(token, forKey: UserDefaultsKeys.userToken.rawValue) } else { UserDefaults.standard.set(nil, forKey: UserDefaultsKeys.userToken.rawValue) } } } }
[ -1 ]
52ab064018f3fb2b84035bd146af23edf4943583
f5eebbb7fc674697c707514f5a9e040cac9216c8
/AppleWatchDemo/AppleWatchDemo WatchKit Extension/NotificationController.swift
b9fd363202fb414218f5d278cc5d0970c846ff64
[]
no_license
julesjagers/AppleWatchDemo
e2b976c64b69c87693dce021cf1a7a7212d60c2e
f2220faa77cdb49796a555f7bfafbd4e7149d2fe
refs/heads/master
2020-03-08T08:38:20.863221
2018-04-04T11:18:58
2018-04-04T11:18:58
128,026,722
0
0
null
2018-04-04T11:15:12
2018-04-04T07:46:40
Swift
UTF-8
Swift
false
false
1,309
swift
// // NotificationController.swift // AppleWatchDemo WatchKit Extension // // Created by Jules Jagers on 04-04-18. // Copyright © 2018 Jules Jagers. All rights reserved. // import WatchKit import Foundation import UserNotifications class NotificationController: WKUserNotificationInterfaceController { override init() { // Initialize variables here. super.init() // Configure interface objects here. } override func willActivate() { // This method is called when watch view controller is about to be visible to user super.willActivate() } override func didDeactivate() { // This method is called when watch view controller is no longer visible super.didDeactivate() } /* override func didReceive(_ notification: UNNotification, withCompletion completionHandler: @escaping (WKUserNotificationInterfaceType) -> Swift.Void) { // This method is called when a notification needs to be presented. // Implement it if you use a dynamic notification interface. // Populate your dynamic notification interface as quickly as possible. // // After populating your dynamic notification interface call the completion block. completionHandler(.custom) } */ }
[ 286339, 282371, 279688, 282381, 179597, 235663, 282385, 205970, 324762, 282395, 216859, 320538, 36767, 387488, 282405, 168101, 227239, 61868, 282413, 219696, 282420, 238647, 7226, 159034, 312892, 159808, 282305, 309446, 282314, 180044, 196688, 282323, 196054, 241500, 230109, 282332, 200798, 166370, 157283, 286178, 282341, 229221, 287726, 282351, 108910, 34674, 223346, 144501, 282360, 153082, 313597 ]
f0aa5c4717bc60d555101047ec360f437e84d2d4
c6fdc2d27839d5e95afcce2f21f4470de8091b16
/examples/swift/Point.swift
0721b8131f676c5e7b9d558017cf490c062d0841
[]
no_license
d-plaindoux/self-type
77bedfc787184c23ee620f1746950dbc815bb8b9
5de6a2a7e94c8b4f1db0274060fefb1d4f52c313
refs/heads/master
2022-12-11T07:41:17.065880
2020-09-10T16:02:25
2020-09-10T16:02:25
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,314
swift
protocol Point { var x : Int { get } var y : Int { get } init(x: Int, y:Int) func equal(p:Self) -> Bool func move(dx: Int, dy: Int) -> Self } protocol ColoredPoint where Self: Point { var c : Int { get } init(x: Int, y:Int, c : Int) } extension Point { func equal(p:Self) -> Bool { return x == p.x && y == p.y } func move(dx: Int, dy: Int) -> Self { return type(of: self).init(x: x + dx, y : y + dy) } } extension ColoredPoint { func equal(p:Self) -> Bool { return c == p.c && x == p.x && y == p.y } func move(dx: Int, dy: Int) -> Self { return type(of: self).init(x: x + dx, y : y + dy, c : c) } } class FPoint : Point { let x: Int let y: Int required init(x: Int, y:Int) { self.x = x self.y = y } } class FColoredPoint : FPoint, ColoredPoint { let c : Int required init(x: Int, y: Int) { self.c = 0 super.init(x:x, y: y) } required init(x: Int, y:Int, c: Int) { self.c = c super.init(x:x, y: y) } } func main() { let p = FPoint(x: 0, y: 0) let pc = FColoredPoint(x: 0, y: 0, c: 1) p.equal(p: pc) let np = p.move(dx: 1, dy: 2) np.equal(p: p) let npc = pc.move(dx: 1, dy: 2) pc.equal(p: npc) }
[ -1 ]
64d461415adc77e1382868f0e6d94237bf4e55ca
16e5e4b8ac1ee364de22b0c50d978a0af682d24c
/MVVM/Repositories/Rx/RxPosterImagesRepository.swift
672bc34b02bbc90e0be1b8e0f4306cb454eb74ee
[]
no_license
ken4R/MVVM-Architecture
6046fcc3949faf01f6536e55712bb6b34ad8292d
7b4daefbf84b641ec168881547d5a03dc4ed867a
refs/heads/master
2020-09-07T07:56:31.871518
2019-11-09T20:25:18
2019-11-09T20:25:18
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,654
swift
// // RxPosterImageRepository.swift // MVVM // // Created by Michal Ziobro on 30/10/2019. // Copyright © 2019 Michal Ziobro. All rights reserved. // import Foundation import RxSwift final class RxPosterImagesRepository { private let posterImagesService: IPosterImagesService_Rx private let posterImagesDao: IPosterImagesDao_Rx init(service: IPosterImagesService_Rx, dao: IPosterImagesDao_Rx) { self.posterImagesDao = dao self.posterImagesService = service } let disposeBag = DisposeBag() } extension RxPosterImagesRepository: IPosterImagesRepository { func image(with imagePath: String, width: Int) -> Observable<PosterImage?> { let sizes = [92, 185, 500, 780] let availableWidth = (sizes.sorted().first { width <= $0 } ) ?? sizes.last! // Cached Local Storage Sequence let posterImage : Observable<PosterImage?> = posterImagesDao.load(imagePath: imagePath, width: availableWidth) .debug("load poster image") // Remote API _ = posterImagesService.getPosterImage(path: imagePath, width: availableWidth) .flatMap { [weak self] image -> Observable<PosterImage> in guard let self = self else { return .empty() } return self.posterImagesDao.insertReplacing(image) }.subscribe(onNext: { image in print("Poster image inserted to local database.") }, onError: { error in print("Poser image insertion error: \(error)") }).disposed(by: disposeBag) return posterImage } }
[ -1 ]
f8555d69b90734b82df769d21afa50364af0cfa0
7646f4a854c5de5094f03c47477baca44fed9eec
/Design-Pattern-For-Swift/9.建造者模式/建造者/人物(抽象)/NERoleBuilder.swift
157d8f401e3e4ec55c1c8dda11a0875ee5c1049d
[]
no_license
lkyumao/Design-Pattern-For-Swift
8f498a90aa4f27949140be984683b266f3a53491
d918f98c70bbf867a9b24d6e351be8fe8ec525e6
refs/heads/master
2020-12-08T11:29:26.410219
2018-01-18T03:17:12
2018-01-18T03:17:12
null
0
0
null
null
null
null
UTF-8
Swift
false
false
358
swift
// // NERoleBuilder.swift // Design-Pattern-For-Swift // // Created by 阮沧晖 on 2018/1/15. // Copyright © 2018年 阮沧晖. All rights reserved. // import UIKit @objc protocol NERoleBuilder { func buildHeader() func buildBody() func buildArmLeft() func buildArmRight() func buildLegLeft() func buildLegRight() }
[ -1 ]
ec953d2851a45a33891ace0227d0c6335716da90
ddf60105e8392089fc0b7e1bee223a0eb8dc523e
/Advanced_segeues/Advanced_segeues/ViewController.swift
42b35d237590b1cecbac051f4bbf9176e6cd7111
[]
no_license
mk200789/swift-sandbox
f97f3dd362cfd25e687e7e8df0e803e6c12b5d75
c68ecfd023d03a2df6aa07e0b4552639e9fc8d29
refs/heads/master
2021-01-17T15:00:59.378951
2018-04-16T06:00:57
2018-04-16T06:00:57
43,275,065
1
0
null
2016-10-19T18:04:38
2015-09-28T02:12:57
Swift
UTF-8
Swift
false
false
562
swift
// // ViewController.swift // Advanced_segeues // // Created by Wan Kim Mok on 2/5/16. // Copyright (c) 2016 mk200789. All rights reserved. // import UIKit var rowCounter : Int = 0 class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. print(rowCounter) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
a4055d3f0b3e0cd67a2c725e74cbafb8e2181456
6860cbfb087b7ac0f51b41e76911e27ddaa0d579
/TheMartianTimes/Components/Extensions/UILabel/UILabel+LabelCreator.swift
cbf3288e09f889eee37d4c3fa6d7a91a33256bc5
[]
no_license
VikashHart/TheMartianTimes
1d9cbaccdc8739c1fb423e0d839a15bab99e87f9
a72b5b16bd79fd90d99f15060ea30fd051558254
refs/heads/master
2020-09-15T16:23:03.196430
2019-12-16T18:08:38
2019-12-16T18:08:38
223,502,304
0
0
null
2019-12-16T18:08:39
2019-11-22T23:22:57
Swift
UTF-8
Swift
false
false
1,295
swift
import UIKit extension UILabel { static func makeHeaderLabel() -> UILabel { let label = UILabel() label.text = StaticAppStrings.StaticText.headerText label.font = StyleGuide.Fonts.headerFont label.textAlignment = .center label.textColor = StyleGuide.AppColors.primaryColor label.backgroundColor = .clear label.numberOfLines = 1 label.adjustsFontSizeToFitWidth = true label.translatesAutoresizingMaskIntoConstraints = false return label } static func makeTitleLabel() -> UILabel { let label = UILabel() label.font = StyleGuide.Fonts.titleFont label.textAlignment = .left label.textColor = StyleGuide.AppColors.primaryColor label.backgroundColor = .clear label.numberOfLines = 0 label.translatesAutoresizingMaskIntoConstraints = false return label } static func makeBodyLabel() -> UILabel { let label = UILabel() label.font = StyleGuide.Fonts.bodyFont label.textAlignment = .left label.textColor = StyleGuide.AppColors.secondaryColor label.backgroundColor = .clear label.numberOfLines = 0 label.translatesAutoresizingMaskIntoConstraints = false return label } }
[ -1 ]
36c832985eae8bb982ed132ac5e283ecd150f2dc
4400daf230ff5bc771a9c8ea43a8ed3120304e88
/HuzzahPlay/Utils/Extensions.swift
48342ae9b6bc072a05308e9726bb1576ed483fdd
[]
no_license
apurva-deshmukh/huzzah-play
9ea391aacafa6c01e6ab4cd5cadcd9da8e574f4f
7f624ce78eefb43f5348b4c5c3cae5014648b1e2
refs/heads/master
2023-01-24T13:45:56.775827
2020-11-29T22:04:23
2020-11-29T22:04:23
300,701,000
0
0
null
null
null
null
UTF-8
Swift
false
false
8,050
swift
// // Extensions.swift // import UIKit import JGProgressHUD extension UIView { func anchor(top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, paddingTop: CGFloat = 0, paddingLeft: CGFloat = 0, paddingBottom: CGFloat = 0, paddingRight: CGFloat = 0, width: CGFloat? = nil, height: CGFloat? = nil) { translatesAutoresizingMaskIntoConstraints = false if let top = top { topAnchor.constraint(equalTo: top, constant: paddingTop).isActive = true } if let left = left { leftAnchor.constraint(equalTo: left, constant: paddingLeft).isActive = true } if let bottom = bottom { bottomAnchor.constraint(equalTo: bottom, constant: -paddingBottom).isActive = true } if let right = right { rightAnchor.constraint(equalTo: right, constant: -paddingRight).isActive = true } if let width = width { widthAnchor.constraint(equalToConstant: width).isActive = true } if let height = height { heightAnchor.constraint(equalToConstant: height).isActive = true } } func center(inView view: UIView, yConstant: CGFloat? = 0) { translatesAutoresizingMaskIntoConstraints = false centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: yConstant!).isActive = true } func centerX(inView view: UIView, topAnchor: NSLayoutYAxisAnchor? = nil, paddingTop: CGFloat? = 0) { translatesAutoresizingMaskIntoConstraints = false centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true if let topAnchor = topAnchor { self.topAnchor.constraint(equalTo: topAnchor, constant: paddingTop!).isActive = true } } func centerY(inView view: UIView, leftAnchor: NSLayoutXAxisAnchor? = nil, paddingLeft: CGFloat? = nil, constant: CGFloat? = 0) { translatesAutoresizingMaskIntoConstraints = false centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: constant!).isActive = true if let leftAnchor = leftAnchor, let padding = paddingLeft { self.leftAnchor.constraint(equalTo: leftAnchor, constant: padding).isActive = true } } func setDimensions(width: CGFloat, height: CGFloat) { translatesAutoresizingMaskIntoConstraints = false widthAnchor.constraint(equalToConstant: width).isActive = true heightAnchor.constraint(equalToConstant: height).isActive = true } func addConstraintsToFillView(_ view: UIView) { translatesAutoresizingMaskIntoConstraints = false anchor(top: view.topAnchor, left: view.leftAnchor, bottom: view.bottomAnchor, right: view.rightAnchor) } func setHeight(height: CGFloat) { translatesAutoresizingMaskIntoConstraints = false heightAnchor.constraint(equalToConstant: height).isActive = true } func setWidth(width: CGFloat) { translatesAutoresizingMaskIntoConstraints = false widthAnchor.constraint(equalToConstant: width).isActive = true } } // MARK: - UIColor extension UIColor { static func rgb(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor { return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1) } static let light = UIColor.rgb(red: 247, green: 255, blue: 247) static let primary = UIColor.rgb(red: 78, green: 205, blue: 196) static let dark = UIColor.rgb(red: 26, green: 83, blue: 92) static let secondary = UIColor.rgb(red: 244, green: 106, blue: 106) } // MARK: UIViewController extension UIViewController { static let hud = JGProgressHUD(style: .light) func configureNavigationBar(withTitle title: String, prefersLargeTitles: Bool) { let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white] appearance.backgroundColor = .systemRed navigationController?.navigationBar.standardAppearance = appearance navigationController?.navigationBar.compactAppearance = appearance navigationController?.navigationBar.scrollEdgeAppearance = appearance navigationController?.navigationBar.prefersLargeTitles = prefersLargeTitles navigationItem.title = title navigationController?.navigationBar.tintColor = .white navigationController?.navigationBar.isTranslucent = true navigationController?.navigationBar.isHidden = false navigationController?.tabBarController?.tabBar.isHidden = false navigationController?.navigationBar.barStyle = .black navigationController?.navigationBar.overrideUserInterfaceStyle = .dark } func showLoader(_ show: Bool, withText text: String? = "Loading") { view.endEditing(true) UIViewController.hud.textLabel.text = text if show { UIViewController.hud.show(in: view) } else { UIViewController.hud.dismiss() } } } // MARK: - UIIMage extension UIImage { func resizeImage(_ dimension: CGFloat, opaque: Bool, contentMode: UIView.ContentMode = .scaleAspectFit) -> UIImage { var width: CGFloat var height: CGFloat var newImage: UIImage let size = self.size let aspectRatio = size.width/size.height switch contentMode { case .scaleAspectFit: if aspectRatio > 1 { // Landscape image width = dimension height = dimension / aspectRatio } else { // Portrait image height = dimension width = dimension * aspectRatio } default: fatalError("UIImage.resizeToFit(): FATAL: Unimplemented ContentMode") } if #available(iOS 10.0, *) { let renderFormat = UIGraphicsImageRendererFormat.default() renderFormat.opaque = opaque let renderer = UIGraphicsImageRenderer(size: CGSize(width: width, height: height), format: renderFormat) newImage = renderer.image { (context) in self.draw(in: CGRect(x: 0, y: 0, width: width, height: height)) } } else { UIGraphicsBeginImageContextWithOptions(CGSize(width: width, height: height), opaque, 0) self.draw(in: CGRect(x: 0, y: 0, width: width, height: height)) newImage = UIGraphicsGetImageFromCurrentImageContext()! UIGraphicsEndImageContext() } return newImage } func textToImage(drawText text: String, atPoint point: CGPoint) -> UIImage { let textColor = UIColor.black let textFont = UIFont(name: "Helvetica Bold", size: 16)! let scale = UIScreen.main.scale UIGraphicsBeginImageContextWithOptions(self.size, false, scale) let textFontAttributes = [ NSAttributedString.Key.font: textFont, NSAttributedString.Key.foregroundColor: textColor, ] as [NSAttributedString.Key : Any] self.draw(in: CGRect(origin: CGPoint.zero, size: self.size)) let rect = CGRect(origin: point, size: self.size) text.draw(in: rect, withAttributes: textFontAttributes) let newImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return newImage! } }
[ -1 ]
2b573f8102d37fb30dcf803fc30081ab9815fd8c
394df7f613294fcc10028dae6702b2a390ecda51
/FideliCash-Comerciante/Controllers/ProdutosTVC.swift
6c84d354b5ed4f007f1d5f381e48ec892c02e32b
[]
no_license
fidelicash/omiti-comerciante
761f6e504c6802919f9578aa6bb2bfd186e51308
1b65a27c7118aaaa9cdb218caf6e7ad66530247a
refs/heads/master
2020-03-19T18:19:18.367622
2018-06-10T17:26:19
2018-06-10T17:26:19
136,804,338
0
0
null
null
null
null
UTF-8
Swift
false
false
540
swift
// // ProdutosTVC.swift // FideliCash-Comerciante // // Created by Carlos Doki on 10/06/18. // Copyright © 2018 Carlos Doki. All rights reserved. // import UIKit class ProdutosTVC: UITableViewCell { @IBOutlet weak var produtoLbl: UILabel! @IBOutlet weak var valorLbl: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } func configureCell(produto: String, value: Double) { produtoLbl.text = produto valorLbl.text = "\(value)" } }
[ -1 ]
639cfcd2cd2e128654d1b262c2213df69a6b05eb
c167c239ca1b3f41f5670e8bb512d7aa1798b46f
/DelegateDesViewController.swift
896e1c8aa50745a189c81e2785184731453f9548
[]
no_license
azuredark/014-Five-Ways-To-Pass-Data-In-iOS-And-UITabBarController
bb8045e196af6a34b73422d5683766a0498e32cc
c5cb870066dbc0a7944314f8be86d1c286edbbaf
refs/heads/master
2023-06-26T21:53:22.317747
2015-04-10T19:14:06
2015-04-10T19:14:06
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,573
swift
// // DelegateDesViewController.swift // 014-Passing-Data // // Created by Audrey Li on 4/9/15. // Copyright (c) 2015 shomigo.com. All rights reserved. // import UIKit class DelegateDesViewController: UIViewController { @IBOutlet weak var segControl: UISegmentedControl! weak var delegate: DelegateDesDelegate? let segControlData = [("blue", MDColors.blue.A700), ("green", MDColors.green.A400), ("orange", MDColors.orange.A400), ("red", MDColors.red.A400)] override func viewDidLoad() { super.viewDidLoad() segControl.removeAllSegments() let initialData = delegate?.initalData() var selectedIndex = UISegmentedControlNoSegment for (index,color) in enumerate(segControlData) { if color.1 == initialData { selectedIndex = index } segControl.insertSegmentWithTitle(color.0, atIndex: index, animated: false) } segControl.selectedSegmentIndex = selectedIndex } func dataFromSelection() -> Color? { let selectedIndex = segControl.selectedSegmentIndex if selectedIndex != UISegmentedControlNoSegment { return segControlData[selectedIndex].1 } return nil } @IBAction func doneBtnTapped(sender: UIButton) { delegate?.dataPicker(self, didPickData: dataFromSelection()) } @IBAction func segmentedControlValueChanged(){ delegate?.dataPicker(self, didPickData: dataFromSelection()) } }
[ -1 ]
b059f0ceb073e15768e7309176c0a11ce740c7f3
4789fcd815f42ba7dde2a24758fb565d5c00b8de
/NaturalDisaster/NaturalDisaster/AddOtherViewController.swift
a5e712f10e57778ffa834bae1ea8c9801ecbd623
[]
no_license
emilychin1130/NaturalDisaster
a97c80a8e67a12c8f52ebe62e4b81e3b758f014f
da4c387e695846472bcbd91daf8ccfac15adf00f
refs/heads/master
2021-04-26T07:20:47.852421
2017-12-03T01:09:31
2017-12-03T01:09:31
106,890,675
0
0
null
null
null
null
UTF-8
Swift
false
false
2,764
swift
// // AddOtherViewController.swift // NaturalDisaster // // Created by Emily Chin on 10/14/17. // Copyright © 2017 Emily Chin. All rights reserved. // import Foundation import UIKit import UserNotifications class AddOtherViewController: UIViewController { @IBOutlet weak var nameTextField: UITextField! @IBOutlet weak var datePicker: UIDatePicker! override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "save" { let items = CoreDataHelper.retrieveOthers() var listOfOther = [String]() for item in items { listOfOther.append(item.name!) } if (nameTextField.text?.isEmpty)! { let alert = UIAlertController(title: "", message: "You forgot to add a name!" , preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Add a name", style: UIAlertActionStyle.default, handler: {(action) in alert.dismiss(animated: true, completion: nil) } ) ) self.present(alert, animated: true, completion: nil) // } else // if isEdit == false { // if listOfOther.contains(nameTextField.text!) { // let alert = UIAlertController(title: "", message: "You already have an item called \(String(describing: nameTextField.text!))." , preferredStyle: UIAlertControllerStyle.alert) // alert.addAction(UIAlertAction(title: "Rename", style: UIAlertActionStyle.default, handler: {(action) in alert.dismiss(animated: true, completion: nil) } ) ) // self.present(alert, animated: true, completion: nil) // } else { // // let item = self.name ?? CoreDataHelper.newItem() // if item.name != nil { // UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: [habit.habit!]) // } // item.name = nameTextField.text ?? "" // item.expDate = datePicker ?? "" // CoreDataHelper.saveOther()() // } } else { let item = CoreDataHelper.newOthers() if item.name != nil { UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: [item.name!]) } item.name = nameTextField.text ?? "" // item.expDate = datePicker ?? "" //jk this thing doesnt work CoreDataHelper.saveOthers() } } } }
[ -1 ]
068a72a2d3fcbd4e479159861511d692e6af147a
1f2a295b456f4e31f0a57b95884a159d5c45e1d4
/RecipesProject/Services/URLs.swift
6817f5f05703240d3585d403f3d09a955acefda1
[]
no_license
asmaafathyAF/RecipesProject
2944ead9f2c0bbc480a57808ba902c6aca8f4bde
59dc1c69bf92a1067f94967e020818b7004f6ec2
refs/heads/master
2021-01-06T01:44:36.432913
2020-02-17T20:04:46
2020-02-17T20:04:46
241,193,188
0
0
null
null
null
null
UTF-8
Swift
false
false
2,439
swift
// // URLs.swift // CrystalRoseTask // // Created by Tech Labs on 12/11/19. // Copyright © 2019 Tech Labs. All rights reserved. import Foundation struct APIServiceUrl { static let main = "https://cpanels.shop/beauty/api/" static let mainProfessions = main + endPoint.GetMainProfessions.rawValue static let subProfessions = main + endPoint.GetSubProfessions.rawValue } enum APIServiceError : Error { case invalidURL case invalidResponse } enum endPoint: String { case GetMainProfessions case GetSubProfessions } enum HTTPStatusCodes: Int { // 100 Informational case Continue = 100 case SwitchingProtocols case Processing // 200 Success case OK = 200 case Created case Accepted case NonAuthoritativeInformation case NoContent case ResetContent case PartialContent case MultiStatus case AlreadyReported case IMUsed = 226 // 300 Redirection case MultipleChoices = 300 case MovedPermanently case Found case SeeOther case NotModified case UseProxy case SwitchProxy case TemporaryRedirect case PermanentRedirect // 400 Client Error case BadRequest = 400 case Unauthorized case PaymentRequired case Forbidden case NotFound case MethodNotAllowed case NotAcceptable case ProxyAuthenticationRequired case RequestTimeout case Conflict case Gone case LengthRequired case PreconditionFailed case PayloadTooLarge case URITooLong case UnsupportedMediaType case RangeNotSatisfiable case ExpectationFailed case ImATeapot case MisdirectedRequest = 421 case UnprocessableEntity case Locked case FailedDependency case UpgradeRequired = 426 case PreconditionRequired = 428 case TooManyRequests case RequestHeaderFieldsTooLarge = 431 case UnavailableForLegalReasons = 451 // 500 Server Error case InternalServerError = 500 case NotImplemented case BadGateway case ServiceUnavailable case GatewayTimeout case HTTPVersionNotSupported case VariantAlsoNegotiates case InsufficientStorage case LoopDetected case NotExtended = 510 case NetworkAuthenticationRequired }
[ 211754, 179235 ]
abc3761e6332c50d7a0314eeb9c137a72be3d446
6c6f0b993fcb27dd4b3cd940ea82941e2e344c31
/T-Dict/T-Dict/Model/CoreData/List/List+CoreDataClass.swift
649ff010f9d6bbf39138fc0a532b5f749a633762
[]
no_license
awesome-academy/T-Dict
a06724771a3f4017cdd79183003d574107f38721
7d445931fb2fe61d1af95564a7d83f823330b846
refs/heads/master
2023-06-12T10:19:43.820490
2021-04-13T07:50:21
2021-04-13T07:50:21
348,232,703
0
2
null
2021-07-06T10:08:31
2021-03-16T06:04:38
Swift
UTF-8
Swift
false
false
460
swift
// // List+CoreDataClass.swift // T-Dict // // Created by Tiến on 4/1/21. // Copyright © 2021 Tiến. All rights reserved. // // import Foundation import CoreData @objc(List) public class List: NSManagedObject { } extension List { @nonobjc public class func fetchRequest() -> NSFetchRequest<List> { return NSFetchRequest<List>(entityName: "List") } @NSManaged public var name: String? @NSManaged public var icon: String? }
[ -1 ]
69a55aecffded5b3a305d11f2fbf2618a7016ad4
23118b03e41011f9c96d2a7557e5120f901aafe6
/StackOverflowLite/Model/Answer.swift
fef23e581421b19460fd51ccc037a0a2f13dcf2f
[]
no_license
chulkov/StackOverflowLite
22553b0cca77337d9394c3a7ece718e87d938577
50121656f9635174e5b309871c8452ffee4437d9
refs/heads/master
2021-02-17T07:39:19.678195
2020-03-10T08:47:47
2020-03-10T08:47:47
245,081,492
0
0
null
null
null
null
UTF-8
Swift
false
false
1,741
swift
// // Answer.swift // StackOverflowLite // // Created by Max on 05/03/2020. // Copyright © 2020 chulkov. All rights reserved. // import Foundation // MARK: - Answer struct Answer: Codable { let payload: [Payload] enum CodingKeys: String, CodingKey { case payload = "items" } } // MARK: - Item struct Payload: Codable { let comments: [Comment]? let answers: [AnswerElement]? let commentCount, lastActivityDate, questionID: Int let link: String let title, body: String enum CodingKeys: String, CodingKey { case comments, answers case commentCount = "comment_count" case lastActivityDate = "last_activity_date" case questionID = "question_id" case link, title, body } } // MARK: - AnswerElement struct AnswerElement: Codable { let commentCount, answerID: Int let link: String let body: String let comments: [Comment]? enum CodingKeys: String, CodingKey { case commentCount = "comment_count" case answerID = "answer_id" case link, body, comments } init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.commentCount = (try? container.decode(Int.self, forKey: .commentCount)) ?? 0 self.answerID = (try? container.decode(Int.self, forKey: .answerID)) ?? 0 self.link = (try? container.decode(String.self, forKey: .link)) ?? "" self.body = (try? container.decode(String.self, forKey: .body)) ?? "" self.comments = (try? container.decode([Comment].self, forKey: .comments)) ?? [] } } // MARK: - Comment struct Comment: Codable { let link: String let body: String }
[ -1 ]
dd1a1a2438219bbf909610ce68fbbe0208f434a9
2b493f9a1b6b186e9999e64775e5284feb079850
/LinLangParadise/AppDelegate.swift
422aa80af64467e3a2fc711cc780fa6a28a2e248
[]
no_license
SunshineUncle/LinLangParadise_Swift
2eb46019bcbb91c9edfba172417bd0475df3a17f
4d3af8086b5f09502fc63b191137c91571c5bf8b
refs/heads/master
2020-03-20T00:04:51.044685
2018-06-11T01:51:01
2018-06-11T01:51:01
137,031,278
0
0
null
null
null
null
UTF-8
Swift
false
false
2,174
swift
// // AppDelegate.swift // LinLangParadise // // Created by Dashu on 2018/6/11. // Copyright © 2018年 linlang. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 327695, 229391, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 319544, 204856, 229432, 286776, 286778, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 327814, 131209, 303241, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 278849, 319810, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 320007, 287238, 172552, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189040, 172660, 287349, 189044, 189039, 287355, 287360, 295553, 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, 279231, 287427, 312005, 312006, 107208, 107212, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 312048, 230128, 312050, 230131, 205564, 303871, 230146, 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, 304005, 295813, 304007, 320391, 304009, 213895, 304011, 230284, 189325, 304013, 295822, 213902, 189329, 295825, 189331, 304019, 279438, 58262, 304023, 279452, 410526, 279461, 279462, 304042, 213931, 304055, 230327, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 132165, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 205931, 296044, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 230679, 320792, 230681, 296215, 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, 148843, 230763, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 280021, 239064, 329177, 288217, 288218, 280027, 288220, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 321022, 206336, 402942, 296446, 296450, 230916, 230919, 214535, 304651, 370187, 304653, 230923, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 18140, 313052, 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, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 313340, 288764, 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, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 215154, 313458, 280691, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 275606, 141459, 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, 125171, 280819, 157940, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 240011, 199051, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 240132, 223752, 338440, 150025, 281095, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 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, 142226, 240535, 224151, 289687, 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, 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, 306555, 314747, 298365, 290171, 290174, 224641, 281987, 314756, 298372, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 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, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 307009, 413506, 241475, 307012, 298822, 148946, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 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, 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, 315482, 217179, 315483, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 176311, 184503, 307385, 307386, 258235, 307388, 176316, 307390, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 299440, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127431, 315856, 176592, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 291314, 127474, 291317, 135672, 233979, 291323, 127485, 291330, 127494, 283142, 127497, 135689, 233994, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 135844, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 291714, 291716, 234373, 316294, 226182, 234375, 308105, 226185, 234379, 201603, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324508, 291742, 324504, 234398, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 234410, 291754, 291756, 324522, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 226239, 234437, 226245, 234439, 324548, 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, 324599, 234487, 234490, 234493, 234496, 316416, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 234520, 316439, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 308291, 316483, 234563, 160835, 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, 234648, 234650, 308379, 275608, 234653, 300189, 119967, 324766, 324768, 283805, 234657, 242852, 234661, 300197, 283813, 234664, 275626, 234667, 316596, 308414, 300223, 234687, 300226, 308418, 283844, 300229, 308420, 308422, 234692, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 316663, 275703, 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, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 324978, 136562, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 308790, 284215, 316983, 194103, 284218, 194101, 226877, 292414, 284223, 284226, 284228, 243268, 292421, 284231, 226886, 128584, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 292433, 284243, 300628, 284245, 194130, 284247, 317015, 235097, 243290, 284249, 276052, 276053, 300638, 284251, 284253, 284255, 284258, 243293, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 276086, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292479, 284290, 325250, 284292, 292485, 276098, 292481, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 358292, 284564, 317332, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 358360, 301017, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 178161, 227314, 276466, 350200, 276472, 325624, 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, 276539, 235581, 178238, 325692, 276544, 243779, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 194649, 350302, 194654, 227423, 178273, 309346, 227426, 309348, 350308, 309350, 194660, 309352, 350313, 309354, 301163, 350316, 292968, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 227810, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 277173, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 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, 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, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 276579, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 293960, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 302218, 294026, 285835, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 146765, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 310659, 351619, 294276, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 245191, 310727, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 187936, 146977, 286240, 187939, 40484, 294435, 40486, 286246, 40488, 245288, 294439, 40491, 294440, 294443, 294445, 286248, 310831, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 400976, 212560, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 302764, 278188, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 302793, 294601, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 311048, 294664, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
afc0bfbd471383cf34883d0943cc1488589c504d
f9338e34b45c4b3db2e8de5c37c4fea97b26e328
/JobCalendar/Options/GrobalVariables.swift
20a21082935c682d2977c440b5192dce48601ef2
[]
no_license
TurkeyLeg0403/JobCalendar
c99f8a3b81ab182b81c2c6da647e9be528cf7541
001f1316d0cdebe0b5e3531acdc36702dacb9c2f
refs/heads/master
2020-04-02T17:31:27.947358
2018-11-01T06:05:10
2018-11-01T06:05:10
null
0
0
null
null
null
null
UTF-8
Swift
false
false
231
swift
let weeks = [CalendarWeekName.sun.rawValue, CalendarWeekName.mon.rawValue, CalendarWeekName.tue.rawValue, CalendarWeekName.wed.rawValue, CalendarWeekName.thu.rawValue, CalendarWeekName.fri.rawValue, CalendarWeekName.sat.rawValue]
[ -1 ]
286975b7c5c9d55a146bc5bb5c95ce8d2e92d0f5
953332ab8423c0d68d59f3d39ed24e7963fd53f4
/iOS 6/mvgViewController.swift
80ce54e51a7f252193caf2111fddeab8da1bae87
[]
no_license
victorlobe/iOS-6-Simulator-written-in-Swift
bc35883cd7fb40069cc2f3023dc233cebe219cf8
bfe2637b98cc064fbb243c39cc8900f2c74b93e8
refs/heads/master
2023-04-01T20:59:21.171729
2023-03-24T04:13:58
2023-03-24T04:13:58
118,525,623
4
2
null
null
null
null
UTF-8
Swift
false
false
2,966
swift
// // mvgViewController.swift // iOS 6 // // Created by Victor Lobe on 04.04.20. // Copyright © 2020 Victor Lobe. All rights reserved. // import UIKit class mvgViewController: UIViewController, UIWebViewDelegate { @IBOutlet var webView: UIWebView! @IBOutlet var verbindungenBtnOut: UIButton! @IBOutlet var abfahrtenBtnOut: UIButton! @IBOutlet var meldungenBtnOut: UIButton! @IBOutlet var ticketsBtnOut: UIButton! @IBOutlet var bottomBarOut: UIImageView! @IBAction func verbindung(_ sender: Any) { verbindungenBtnOut.isUserInteractionEnabled = false abfahrtenBtnOut.isUserInteractionEnabled = true meldungenBtnOut.isUserInteractionEnabled = true ticketsBtnOut.isUserInteractionEnabled = true bottomBarOut.image = UIImage(named: "mvgBarVerbindung") let requestURL = URL(string: "https://www.mvg.de/dienste/verbindungen.html") let request = URLRequest(url: requestURL!) webView.loadRequest(request) } @IBAction func abfahrten(_ sender: Any) { verbindungenBtnOut.isUserInteractionEnabled = true abfahrtenBtnOut.isUserInteractionEnabled = false meldungenBtnOut.isUserInteractionEnabled = true ticketsBtnOut.isUserInteractionEnabled = true bottomBarOut.image = UIImage(named: "mvgBarAbfahrten") let requestURL = URL(string: "https://www.mvg.de/dienste/abfahrtszeiten.html") let request = URLRequest(url: requestURL!) webView.loadRequest(request) } @IBAction func meldungen(_ sender: Any) { verbindungenBtnOut.isUserInteractionEnabled = true abfahrtenBtnOut.isUserInteractionEnabled = true meldungenBtnOut.isUserInteractionEnabled = false ticketsBtnOut.isUserInteractionEnabled = true bottomBarOut.image = UIImage(named: "mvgBarMeldungen") let requestURL = URL(string: "https://www.mvg.de/dienste/betriebsaenderungen.html") let request = URLRequest(url: requestURL!) webView.loadRequest(request) } @IBAction func tickets(_ sender: Any) { verbindungenBtnOut.isUserInteractionEnabled = true abfahrtenBtnOut.isUserInteractionEnabled = true meldungenBtnOut.isUserInteractionEnabled = true ticketsBtnOut.isUserInteractionEnabled = false bottomBarOut.image = UIImage(named: "mvgBarTickets") let requestURL = URL(string: "https://www.mvg.de/tickets-tarife.html") let request = URLRequest(url: requestURL!) webView.loadRequest(request) } @IBAction func dismiss(_ sender: Any) { self.dismiss(animated: false, completion: nil) } override func viewDidLoad() { super.viewDidLoad() let requestURL = URL(string: "https://www.mvg.de/dienste/verbindungen.html") let request = URLRequest(url: requestURL!) webView.delegate = self webView.loadRequest(request) } }
[ -1 ]
7005ebd1bb5ac2b8519bfa3a0c309df395f4aa14
9fe68a6509969f3bce51a33895289acca456e80a
/Package.swift
9e4801565a6813eafde83cd5321fcf2605aa693c
[ "MIT", "CC-BY-3.0" ]
permissive
lamnd91/EasyTipView
0a3b49b573ba0388de37e763f2b61d281a417979
f6fc391d21f66569d256d84a4c7eef9fc239866d
refs/heads/master
2022-12-27T10:54:28.612094
2020-09-25T03:12:31
2020-09-25T03:12:31
285,775,903
0
0
MIT
2020-08-07T08:15:14
2020-08-07T08:15:13
null
UTF-8
Swift
false
false
904
swift
// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "EasyTipView", platforms: [ .iOS(.v9) ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "EasyTipView", targets: ["EasyTipView"]), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "EasyTipView", path: "Source"), .testTarget( name: "EasyTipViewTests", dependencies: ["EasyTipView"]), ] )
[ 431748, 120709, 66442, 136459, 249101, 415758, 145937, 354961, 136467, 372779, 240310, 373948, 294852, 363463, 159303, 214737, 173911, 2010, 431973, 385896, 256494, 431731, 386041, 388474 ]
ab2a1be9502ff41716920c66e41bda6dcc8f0d63
445c31aa26d6a06b02b6436e0d9ca1b7d1109fb0
/shopifyChallenge/tagTableCell.swift
8d18a07b5fcf5ce8577d632e9d004368f6ef475f
[]
no_license
JosukeCrazyDiamond/tagDisplayApp
7daff04eb297f15be6a56d08f2b8f54167e97481
f41649d30ab3cb1a2b9e2d59590e273187adda5c
refs/heads/master
2020-03-30T02:50:37.967028
2018-09-27T22:13:54
2018-09-27T22:13:54
150,653,754
0
0
null
null
null
null
UTF-8
Swift
false
false
369
swift
// // tagTableCell.swift // shopifyChallenge // // Created by Luna Cao on 2018/9/22. // Copyright © 2018年 Luna Cao. All rights reserved. // import UIKit class tagTableCell: UITableViewCell { @IBOutlet weak var tagLabel: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } }
[ -1 ]
9a089af63e15a1d530947a3ce98cad4ab0d46b85
ee835fdb9b42f5304d03e59f05d2882a2b1092e1
/Sources/GitInterface/WriteTree.swift
82dbd7e0ff7f04fdad151c427efdc482bbc3f47b
[ "MIT" ]
permissive
hectr/swift-git-interface
55e63845400103a17539ab972c573c703a5fc879
60993935960fdbe9cb6a0035439f226627fb7458
refs/heads/master
2021-03-24T10:13:02.904797
2018-02-16T19:39:02
2018-02-16T19:39:02
91,175,299
0
0
null
null
null
null
UTF-8
Swift
false
false
1,541
swift
import Foundation import ShellInterface public struct WriteTree: CustomStringConvertible { public typealias Func = (_ context: TaskContext?) throws -> Tree private let vcs: String private let params: [String] private let shell: ExecuteCommand.Func public var description: String { let components = [vcs] + params return components.joined(separator: " ") } public init(vcs: String = "git", params: [String] = ["write-tree"], shell: @escaping ExecuteCommand.Func = ExecuteCommand().execute) { self.vcs = vcs self.params = params self.shell = shell } // MARK: - public func execute(context: TaskContext? = TaskContext.current) throws -> Tree { let result = shell(vcs, params, context, true) guard let terminationStatus = result.terminationStatus else { throw TaskFailure.stillRunning(file: #file, line: #line) } guard terminationStatus == 0 else { throw TaskFailure.nonzeroTerminationStatus( file: #file, line: #line, terminationStatus: terminationStatus, uncaughtSignal: result.terminatedDueUncaughtSignal ) } guard !result.standardOutput.isEmpty else { throw TaskFailure.emptyOutput(file: #file, line: #line) } return Tree(sha1: result.standardOutput) } }
[ -1 ]
92eb482414ec834c134c208bbda9996419687c72
ee8d9249978a3498730cd09454e91b53dadec378
/NewRetroCalculator/AppDelegate.swift
3ecadc985706131a06edd8f62cb6edb6a2aa627f
[]
no_license
jeanLeconteii/NewRetroCalculator
d7f58513aec7d4041c8fcb2a7772872c39943b6e
50688dd491acb7f7ae95d45f5414f5bf4b22fe87
refs/heads/master
2019-12-01T11:56:26.291392
2017-08-20T21:59:39
2017-08-20T21:59:39
100,771,914
0
0
null
null
null
null
UTF-8
Swift
false
false
2,193
swift
// // AppDelegate.swift // NewRetroCalculator // // Created by Jean Leconte II on 8/18/17. // Copyright © 2017 LeconteEnterprises. 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, 229391, 327695, 229394, 229397, 229399, 229402, 278556, 229405, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 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, 131278, 131281, 286928, 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, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 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, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 148946, 280021, 239064, 288217, 329177, 280027, 288220, 288214, 239070, 288218, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 320998, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 206336, 296450, 148990, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 354656, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 224151, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 176311, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 283069, 127424, 299457, 127429, 127431, 127434, 315856, 127440, 176592, 315860, 176597, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 127460, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 324490, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 234648, 275606, 234650, 275608, 324757, 300189, 324766, 119967, 234653, 308379, 324768, 283805, 242852, 300197, 234661, 283813, 234664, 234657, 275626, 234667, 177318, 316596, 308414, 234687, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 276206, 358128, 284399, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 350293, 350295, 309337, 194649, 227418, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 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, 285792, 277601, 203872, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 146765, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 294803, 40851, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 237562 ]
0e7e1550a621beff9914c42800138c2cb86078e8
fd45730a34a53eae57ac6e1235426fa64018a79f
/PhotoShare/Views/Cells/PostCell.swift
e6d6d834febc4842824fdbc94f43fc1d3bd7f4d6
[]
no_license
KrygTomasz/PhotoShare
82283ba8911e99b43e1aae15da63fe2c1b460a06
25bce9f3d637fb38980c161f9f8c1030b4c68fee
refs/heads/master
2020-04-07T11:42:50.021751
2019-01-14T21:08:59
2019-01-14T21:09:37
158,337,734
0
0
null
null
null
null
UTF-8
Swift
false
false
251
swift
// // PostCell.swift // PhotoShare // // Created by Krygu on 06/01/2019. // Copyright © 2019 Krygu. All rights reserved. // import UIKit class PostCell: UICollectionViewCell { @IBOutlet weak var postImageView: UIImageView! }
[ 233550 ]
869d320d12ff4503f54ad21cb8a98238be17fe1e
47ba1e534cec5290fec97a48231e7b2a127ba7ff
/F1A-TV/Util/ConstantsUtil.swift
758f3f57dfb22d8ff13c6b86a5d864abf030e2e7
[ "MIT" ]
permissive
QasimAbbas/F1AppleTV
85a54fb63fa5f59260b0690476ca6a96ad49a0cf
cc4f7a31063394d317f6c23941a167f03c317317
refs/heads/master
2023-06-23T21:52:50.712974
2021-08-02T15:35:48
2021-08-02T15:35:48
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,434
swift
// // ConstantsUtil.swift // F1TV // // Created by Noah Fetz on 24.10.20. // import UIKit struct ConstantsUtil { static var darkStyle = false //Colors static let brandingBackgroundColor = UIColor(rgb: 0x15151e) static let brandingItemColor = UIColor(rgb: 0x1f1f27) static let brandingRed = UIColor(rgb: 0xE10600) //General static let authenticateUrl = "https://api.formula1.com/v2/account/subscriber/authenticate/by-password" static let apiKey = "fCUCjWrKPu9ylJwRAv8BpGLEgiAuThx7" static let identityProvider = "/api/identity-providers/iden_732298a17f9c458890a1877880d140f3/" static let tokenUrl = "https://f1tv-api.formula1.com/agl/1.0/unk/en/all_devices/global/authenticate" static let apiUrl = "https://f1tv.formula1.com" static let thumnailCardHeightMultiplier: CGFloat = 0.90 //KeyValueStoreKeys static let userInfoKeyValueStorageKey = "F1ATV_UserInfoKVSKey" static let passwordKeyValueStorageKey = "F1ATV_PasswordKVSKey" static let playerSettingsKeyValueStorageKey = "F1ATV_PlayerSettingsKVSKey" //Controller static let accountOverviewViewController = "AccountOverviewViewController" static let loginViewController = "LoginViewController" static let pageOverviewCollectionViewController = "PageOverviewCollectionViewController" static let sideBarInfoViewController = "SideBarInfoViewController" static let playerCollectionViewController = "PlayerCollectionViewController" static let playerInfoOverlayViewController = "PlayerInfoOverlayViewController" static let channelSelectorOverlayViewController = "ChannelSelectorOverlayViewController" static let controlStripOverlayViewController = "ControlStripOverlayViewController" //TableViewCells static let rightDetailTableViewCell = "RightDetailTableViewCell" static let noContentTableViewCell = "NoContentTableViewCell" static let templateTableViewCell = "TemplateTableViewCell" //CollectionViewCells static let basicCollectionViewCell = "BasicCollectionViewCell" static let customHeaderCollectionReusableView = "CustomHeaderCollectionReusableView" static let thumbnailTitleSubtitleCollectionViewCell = "ThumbnailTitleSubtitleCollectionViewCell" static let noContentCollectionViewCell = "NoContentCollectionViewCell" static let channelPlayerCollectionViewCell = "ChannelPlayerCollectionViewCell" }
[ -1 ]
9096342c723936d53b609a38835876ed52c0e68d
64a3d0cf550ed2f7eaab1cce7a04f38a6a085171
/K-Means/Tests/Vector.swift
a920de7de9800373bbcb5f515d7b68d2680235e2
[ "MIT" ]
permissive
heisenberg666/swift-algorithm-club
f62a50f8e19a1a28947cd40f6fd3f0a53468b437
619e604e0086cdc4a4752eb7bdac163c776f3b74
refs/heads/master
2021-01-24T21:07:34.103477
2016-03-09T13:32:20
2016-03-09T13:32:20
53,529,839
1
0
null
2016-03-09T20:36:29
2016-03-09T20:36:29
null
UTF-8
Swift
false
false
1,699
swift
// // Vector.swift // Tests // // Created by John Gill on 2/29/16. // // import Foundation // Container to easily hold N Dimensional Vectors class Vector: CustomStringConvertible, Equatable { private(set) var length = 0 private(set) var data = [Double]() init(d:[Double]) { data = d length = d.count } var description: String { return "Vector (\(data)" } func distTo(v2:Vector) -> Double { var result = 0.0 for idx in 0..<self.length { result += pow(self.data[idx] - v2.data[idx], 2.0) } return sqrt(result) } } // MARK: Vector Operators func ==(left: Vector, right: Vector) -> Bool { for idx in 0..<left.length { if left.data[idx] != right.data[idx] { return false } } return true } func +(left: Vector, right: Vector) -> Vector { var results = [Double]() for idx in 0..<left.length { results.append(left.data[idx] + right.data[idx]) } return Vector(d: results) } func +=(inout left: Vector, right: Vector) { left = left + right } func -(left: Vector, right: Vector) -> Vector { var results = [Double]() for idx in 0..<left.length { results.append(left.data[idx] - right.data[idx]) } return Vector(d: results) } func -=(inout left: Vector, right: Vector) { left = left - right } func /(left:Vector, right: Double) -> Vector { var results = [Double](count: left.length, repeatedValue: 0.0) for (idx, value) in left.data.enumerate() { results[idx] = value / right } return Vector(d: results) } func /=(inout left: Vector, right: Double) { left = left / right }
[ -1 ]
246cb348c8573b40d8cd2c208b00e8b301bdc369
7870e30c4b02b7720567bb64d5901890d9d8b6ae
/GitUseExample/SceneDelegate.swift
c39ef67b09d447fc436aec9cd90b82c272c0c291
[]
no_license
lcaudill0064/GitUseExample
07a97b60fe86e3395a8a48382139900fe0f4b42b
4fcac69e6e74544985354c4c592fe5acad2a96ac
refs/heads/master
2022-12-15T03:00:45.039074
2020-08-21T00:57:34
2020-08-21T00:59:39
289,135,834
0
0
null
null
null
null
UTF-8
Swift
false
false
2,352
swift
// // SceneDelegate.swift // GitUseExample // // Created by user179507 on 8/20/20. // Copyright © 2020 Logan Caudill. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 344103, 393260, 393269, 213049, 376890, 385082, 16444, 393277, 376906, 327757, 254032, 286804, 368728, 254045, 368736, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 180432, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 336124, 385281, 336129, 262405, 180491, 164107, 336140, 262417, 368913, 262423, 377118, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 98819, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 328379, 164539, 328387, 352969, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 222129, 345036, 386004, 345046, 386012, 386019, 328690, 435188, 328703, 328710, 418822, 328715, 377867, 361490, 386070, 336922, 345119, 377888, 328747, 345134, 345139, 361525, 361537, 377931, 197708, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 410746, 361594, 214150, 345224, 386187, 337048, 345247, 361645, 337072, 345268, 337076, 402615, 361657, 402636, 328925, 165086, 165092, 222438, 386286, 328942, 386292, 206084, 115973, 328967, 345377, 353572, 345380, 345383, 337207, 345400, 378170, 369979, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 370208, 419360, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 419404, 353868, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 419518, 403139, 337607, 419528, 419531, 419536, 272083, 394967, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 378664, 354107, 345916, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 337751, 247639, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 247692, 395148, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 346064, 247760, 346069, 329699, 354275, 190440, 247790, 354314, 346140, 337980, 436290, 378956, 395340, 436307, 338005, 329816, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 256214, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 354728, 338353, 338363, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 330612, 330643, 412600, 207809, 379849, 396246, 330711, 248794, 248799, 437219, 257009, 265208, 330750, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 331089, 437588, 396634, 175451, 437596, 429408, 175458, 208228, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 249215, 175487, 249219, 175491, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 380353, 339401, 380364, 339406, 372177, 339414, 413143, 249303, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 372354, 421509, 126597, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 225138, 339827, 257909, 225142, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 225442, 438434, 192674, 225445, 438438, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356631, 356638, 356641, 356644, 356647, 266537, 356650, 389417, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 381513, 348745, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 340639, 258723, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 155647, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 430940, 357212, 357215, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 119675, 324476, 430973, 340859, 340863, 324479, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 431100, 349181, 431107, 209944, 209948, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 209996, 431180, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 160896, 349313, 210053, 210056, 349320, 373905, 259217, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 267929, 333472, 333512, 259789, 358100, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 210707, 399129, 333593, 333595, 210720, 358192, 366384, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 358256, 268144, 358260, 399222, 325494, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 219094, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 334047, 350449, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 194942, 391564, 366991, 334224, 342431, 375209, 326059, 375220, 342453, 334263, 326087, 358857, 195041, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 244309, 334425, 326240, 375401, 334466, 334469, 391813, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 400279, 252823, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 359367, 326599, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 384099, 384102, 384108, 367724, 326764, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 384182, 384189, 351424, 384192, 343232, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 261391, 359695, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 343399, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 138865, 155255, 155274, 368289, 245410, 245415, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 376672, 155488, 155492, 327532, 261997, 376686, 262000, 262003, 327542, 147319, 262006, 262009, 425846, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 327655, 253927, 360432, 393204, 360439, 253944, 393209, 393215 ]
ab6940822cea2d49964df640552546996e56a0b1
e79cb6eac7b218c92df6cfb787b41233678e4f6c
/Classes/Watchdog.swift
c5b2c0bb53839004f34158253459de7d08043f51
[ "MIT" ]
permissive
nivanchikov/Watchdog
626b631c1fd1efb53efc1c80cdb7faca775781bd
1ded7a2edbd54e9880b7a4508d07ce8e38bc5a28
refs/heads/master
2021-01-16T22:47:10.131637
2015-09-22T13:57:33
2015-09-22T13:57:33
42,936,762
0
0
null
2015-09-22T13:52:40
2015-09-22T13:52:40
null
UTF-8
Swift
false
false
2,499
swift
import Foundation @objc public class Watchdog: NSObject { /* The number of seconds that must pass to consider the main thread blocked */ private var threshold: Double private var runLoop: CFRunLoopRef = CFRunLoopGetMain() private var observer: CFRunLoopObserverRef! private var startTime: UInt64 = 0 private var handler: ((Double) -> ())? = nil public init(threshold: Double = 0.2, handler: ((Double) -> ())? = nil) { self.threshold = threshold self.handler = handler super.init() var timebase: mach_timebase_info_data_t = mach_timebase_info(numer: 0, denom: 0) mach_timebase_info(&timebase) let secondsPerMachine: NSTimeInterval = NSTimeInterval(Double(timebase.numer) / Double(timebase.denom) / Double(1e9)) observer = CFRunLoopObserverCreateWithHandler(kCFAllocatorDefault, CFRunLoopActivity.AllActivities.rawValue, true, 0) { [weak self] (observer, activity) in guard let weakSelf = self else { return } switch(activity) { case CFRunLoopActivity.Entry, CFRunLoopActivity.BeforeTimers, CFRunLoopActivity.AfterWaiting, CFRunLoopActivity.BeforeSources: if weakSelf.startTime == 0 { weakSelf.startTime = mach_absolute_time() } case CFRunLoopActivity.BeforeWaiting, CFRunLoopActivity.Exit: let elapsed = mach_absolute_time() - weakSelf.startTime let duration: NSTimeInterval = NSTimeInterval(elapsed) * secondsPerMachine if duration > weakSelf.threshold { if let handler = weakSelf.handler { handler(duration) } else { print("👮 Main thread was blocked for " + String(format:"%.2f", duration) + "s 👮") } } weakSelf.startTime = 0 default: () } } CFRunLoopAddObserver(CFRunLoopGetMain(), observer!, kCFRunLoopCommonModes) } deinit { CFRunLoopObserverInvalidate(observer!) } }
[ -1 ]
74d16f657bd1f49578bb4c1e3728195163e81ee2
3c947a71d6b3d02fa3ebc281f1386f631a0ef64a
/CloudSchool/CloudSchool/Modules/My/Views/ProductCouponTableView.swift
ce7573214839764d43f9b47c359e3a3acc201ba4
[]
no_license
LoveEnergy/xieryunRepository
fccefd18306fe505b571e3c77c78d18b05119e0f
83306ab40268e54c65c94bb9ca0e8906610a3a2c
refs/heads/master
2022-11-18T05:15:04.204651
2020-07-20T01:13:39
2020-07-20T01:13:39
279,344,945
0
1
null
null
null
null
UTF-8
Swift
false
false
4,041
swift
// // ProductCouponTableView.swift // CloudSchool // // Created by 彭显鹤 on 2019/2/25. // Copyright © 2019 CEI. All rights reserved. // import UIKit import RxSwift import RxCocoa class ProductCouponTableView: UITableView, UITableViewDelegate, UITableViewDataSource { var type: CouponType = .unused var data: [GoodsCouponModel] = [] var selectedCoupon: Variable<(GoodsCouponModel, RuleModel)?> = Variable(nil) var page: Int = 0 var pageSize: Int = 10 var isProduct: Bool = false var totalPrice: CGFloat = 0.0 var productID: [String]? { didSet { self.loadData() } } let disposeBag: DisposeBag = DisposeBag() func baseConfigure() { self.register(R.nib.couponTableViewCell) self.delegate = self self.dataSource = self self.tableFooterView = UIView() loadData() } override func awakeFromNib() { super.awakeFromNib() baseConfigure() } func loadData() { if self.isProduct { guard let productID = self.productID else { return } RequestHelper.shared.getOrderCoupons(productIDs: productID) .subscribe(onNext: {[weak self] (model) in guard let `self` = self else { return } self.data = model.data self.reloadData() }, onError: { (error) in }) .disposed(by: disposeBag) } else { UserHelper.shared.getCouponList(pageNo: self.page, pageSize: self.pageSize, status: self.type.value) .subscribe(onNext: {[weak self] (model) in guard let `self` = self else { return } self.data = model.data?.rows ?? [] self.reloadData() }, onError: { (error) in }) .disposed(by: disposeBag) } } func numberOfSections(in tableView: UITableView) -> Int { return self.data.count } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.data[section].ruleList.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: R.nib.couponTableViewCell, for: indexPath)! let model = self.data[indexPath.section] cell.configure(model: model, index: indexPath.row) return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) let model = self.data[indexPath.section] let rule = model.ruleList[indexPath.row] if let activityType = ActivityType(rawValue: model.ruleType) { switch activityType { case .count: if self.productID!.count >= rule.count { if self.totalPrice < CGFloat(rule.price) { self.selectedCoupon.value = nil HUD.showError(error: "金额未满\(rule.price) 元") }else{ self.selectedCoupon.value = (model, model.ruleList[indexPath.row]) } } else { self.selectedCoupon.value = nil HUD.showText(text: "数量未满\(rule.count) 件") } case .price: if self.totalPrice >= rule.totalPrice.cgFloat { self.selectedCoupon.value = (model, model.ruleList[indexPath.row]) } else { self.selectedCoupon.value = nil HUD.showError(error: "金额未满\(rule.totalPrice) 元") } } } } }
[ -1 ]
44ee17fdc2856a5fc5f367c5335e324fab111d19
eb67d29462bba02792d64e0726d9352f73c99559
/ios/BLEManager/CentralManager.swift
5a2da6c0ed8d2134dc8c3d90e9c09d5e01ecbace
[ "MIT" ]
permissive
brycejacobs/react-native-ble
8a049f63f3e90fee7265d1c8504c673bc278838d
dc9e086f5aaacd9eef65aed5edefd5ffd94f5ab2
refs/heads/master
2021-01-19T20:40:13.439414
2017-05-01T22:14:09
2017-05-01T22:14:09
88,528,084
0
0
null
2017-04-17T16:36:39
2017-04-17T16:36:39
null
UTF-8
Swift
false
false
5,256
swift
// // BTDiscovery.swift // lxapp // // Created by Bryce Jacobs on 8/19/15. // Copyright (c) 2015 Computrols. All rights reserved. // import Foundation import CoreBluetooth class CentralManager: NSObject, CBCentralManagerDelegate { fileprivate var _peripherals: [Peripheral] = [] fileprivate var _manager: CBCentralManager! fileprivate var _dispatch: BLEManagerDelegate! public init(withQueue queue: DispatchQueue, dispatchDelegate: BLEManagerDelegate) { super.init() _dispatch = dispatchDelegate _manager = CBCentralManager(delegate: self, queue: queue) } // MARK: Discovery public func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber){ if _peripherals.contains(where: { $0.identifier == peripheral.identifier }) { return } // Store the peripheral for later. let periph = Peripheral(peripheral: peripheral, delegate: _dispatch) _peripherals.append(periph) dispatchEvent(BLEEvent.DISCOVER.description, value: periph.toJSON(advertisementData: advertisementData, rssi: RSSI)) } // MARK: Connections public func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral){ dispatchEvent(BLEEvent.CONNECT.description, value: [ "peripheralUuid": peripheral.identifier.uuidString as AnyObject]) } public func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?){ dispatchEvent(BLEEvent.DISCONNECT.description, value: [ "peripheralUuid": peripheral.identifier.uuidString as AnyObject]) } public func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?){ let payload = [ "peripheralUuid": peripheral.identifier.uuidString as AnyObject, "error": error?.localizedDescription as AnyObject ] dispatchEvent(BLEEvent.CONNECT.description, value: payload) } // MARK: State public func centralManagerDidUpdateState(_ central: CBCentralManager){ var payload = ["state": " "] if #available(iOS 10.0, *) { switch (central.state) { case CBManagerState.poweredOff: payload["state"] = "poweredOff" break case CBManagerState.unauthorized: payload["state"] = "unauthorized" break case CBManagerState.unknown: payload["state"] = "unknown" break case CBManagerState.poweredOn: payload["state"] = "poweredOn" break case CBManagerState.resetting: payload["state"] = "resetting" break case CBManagerState.unsupported: payload["state"] = "unsupported" break } } else{ let state = CBCentralManagerState(rawValue: central.state.rawValue) switch (state!){ case CBCentralManagerState.poweredOff: payload["state"] = "poweredOff" break case CBCentralManagerState.unauthorized: payload["state"] = "unauthorized" break case CBCentralManagerState.unknown: payload["state"] = "unknown" break case CBCentralManagerState.poweredOn: payload["state"] = "poweredOn" break case CBCentralManagerState.resetting: payload["state"] = "resetting" break case CBCentralManagerState.unsupported: payload["state"] = "unsupported" break } } print(payload) dispatchEvent(BLEEvent.STATE_CHANGE.description, value: payload) } public func centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]){ } // MARK: Private interface ----------------------------------------------------------------------------------------- fileprivate func dispatchEvent(_ event: String, value: Any) { _dispatch.dispatchEvent(event, value: value as AnyObject) } } extension CentralManager { func clearAll(){ } // MARK: Connection Helper methods func connectPeripheral(peripheralUUID: UUID){ guard let idx = _peripherals.index(where: { $0.identifier == peripheralUUID }) else { return } // Connect the central manager _manager.connect(_peripherals[idx]._peripheral) } func disconnectPeripheral(peripheralUUID: CBUUID){ // if let periph = peripheral { // self.centralManager.cancelPeripheralConnection(periph) // } } // MARK: Discovery Helper methods func scanForPeripherals(serviceUUIDs: [CBUUID]?, scanOptions: [String:AnyObject]) { _manager.scanForPeripherals(withServices: serviceUUIDs, options: scanOptions) } func stopScanForPeripherals(){ _manager.stopScan() } }
[ -1 ]
9900d93583566eef523667a80fc18ea98e462e6b
45adb491e75cb1a4c26e2bb6edab566097048990
/我的作业/EmojiDictionary2-section/EmojiDictionary/group.swift
4d727bfeb0e41b850dee3aabe71fcf6eeb66fe4c
[]
no_license
YHD97/AppDevelopmentWithSwift
fbdefe6a2b58b15a06acedfc18c1834048b5445d
89e99f456885c8b306d1d537513da21e748f2895
refs/heads/master
2021-07-23T01:31:18.133973
2017-10-31T05:17:08
2017-10-31T05:17:08
null
0
0
null
null
null
null
UTF-8
Swift
false
false
220
swift
// // group.swift // EmojiDictionary // // Created by Johnny_L on 2017/9/24. // Copyright © 2017年 Johnny_L. All rights reserved. // import Foundation struct Group { var name: String var emoji: [Emoji] }
[ -1 ]
8b288d8747590646fe2d24aa7c6b29c0adc21526
26d96b3146d8c0bfcaaa7f8ca18c8983c9182705
/MultiThreadsDemo/FiboViewController.swift
7dd483593889b9e4951e2c09ff5e1dc105d4327e
[]
no_license
avo1/MultiThreadDemo
64eb2953a84250e61ada3a60e00d116b026f1a70
2f216ff1728a099cf31c1a5f7aff3ed1e11d389c
refs/heads/master
2020-12-31T06:46:57.066213
2017-03-29T16:18:21
2017-03-29T16:18:21
86,604,128
0
0
null
null
null
null
UTF-8
Swift
false
false
1,186
swift
// // FiboViewController.swift // MultiThreadsDemo // // Created by Dave Vo on 3/25/17. // Copyright © 2017 DaveVo. All rights reserved. // import UIKit class FiboViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var tableView: UITableView! var nRow: Int = 80 override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. tableView.delegate = self tableView.dataSource = self } // override var preferredContentSize: CGSize { // get { // return CGSize(width: 300, height: 300) // } // set { // super.preferredContentSize = newValue // } // } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return nRow } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "fiboCell") as! FiboCell cell.fibonacciEntry = FibonacciEntry(number: indexPath.row) return cell } }
[ -1 ]
ba0e30b9f34ab203c489ca235897d5b94610c561
0a08d1b5a4f641ea4ea0cea016853eb4b81dc9f6
/Cat at App/Application/AppDelegate.swift
923bdfa993548e9b03ae533b200d9532d5ba93e0
[]
no_license
Prefect1109/Cat-At-App
718f724108e6bfebc97c22dccc8fcf15fd28ee85
880661754a6876fd9dfb5ba81ef9bba555604bd2
refs/heads/master
2023-06-09T06:02:43.353384
2021-05-21T08:53:52
2021-05-21T08:53:52
262,761,787
1
0
null
2021-06-21T18:46:44
2020-05-10T10:25:37
Swift
UTF-8
Swift
false
false
610
swift
import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } // MARK: - UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } }
[ 369281, 338690, 375047, 33290, 370442, 256015, 223257, 253852, 177953, 48680, 389290, 187060, 264501, 389436, 159039, 153409, 235074, 257090, 360388, 243277, 180309, 210136, 126552, 396251, 438757, 345959, 391656, 375017, 214633, 142188, 382828, 383724, 263923, 360564, 345463, 266747, 169597 ]
5bc75c04ead34ebc81448ef6565be967ab440dd1
6ab73de5b2bb5aaad66e8c06c5da8ed2b5e2a8b2
/SFKit/Classes/Extension/Foundation/StringExtension.swift
3d7450ea5e9f455479322a0c738361e72d6df732
[ "MIT" ]
permissive
HSFAqi/SFKit
a2c4e73cfc3476b821f5c964c838bdc2a6ab8e54
484e7d7c7aa642e406ef5c28946b71d89bf3b75e
refs/heads/master
2021-02-14T08:17:43.693706
2020-03-06T17:26:30
2020-03-06T17:26:30
244,788,108
0
0
null
null
null
null
UTF-8
Swift
false
false
7,583
swift
// // StringExtension.swift // SFKit_Example // // Created by 黄山锋 on 2020/3/6. // Copyright © 2020 CocoaPods. All rights reserved. // import Foundation // MARK: - 正则匹配 extension String { /** 1、匹配中文:[\u4e00-\u9fa5] 2、英文字母:[a-zA-Z] 3、数字:[0-9] 4、匹配中文,英文字母和数字及下划线:^[\u4e00-\u9fa5_a-zA-Z0-9]+$ 同时判断输入长度: [\u4e00-\u9fa5_a-zA-Z0-9_]{4,10} 5、 (?!_)  不能以_开头 (?!.*?_$)  不能以_结尾 [a-zA-Z0-9_\u4e00-\u9fa5]+  至少一个汉字、数字、字母、下划线 $  与字符串结束的地方匹配 6、只含有汉字、数字、字母、下划线,下划线位置不限: ^[a-zA-Z0-9_\u4e00-\u9fa5]+$ 7、由数字、26个英文字母或者下划线组成的字符串 ^\w+$ 8、2~4个汉字 ^[\u4E00-\u9FA5]{2,4}$ 9、最长不得超过7个汉字,或14个字节(数字,字母和下划线)正则表达式 ^[\u4e00-\u9fa5]{1,7}$|^[\dA-Za-z_]{1,14}$ 10、匹配双字节字符(包括汉字在内):[^x00-xff] 评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1) 11、匹配空白行的正则表达式:ns*r 评注:可以用来删除空白行 12、匹配HTML标记的正则表达式:<(S*?)[^>]*>.*?|<.*? /> 评注:网上流传的版本太糟糕,上面这个也仅仅能匹配部分,对于复杂的嵌套标记依旧无能为力 13、匹配首尾空白字符的正则表达式:^s*|s*$ 评注:可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式 14、匹配Email地址的正则表达式:^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$ 评注:表单验证时很实用 15、手机号:^((13[0-9])|(14[0-9])|(15[0-9])|(17[0-9])|(18[0-9]))\d{8}$ 16、身份证:(^\d{15}$)|(^\d{17}([0-9]|X|x)$) 17、匹配网址URL的正则表达式:[a-zA-z]+://[^s]* 评注:网上流传的版本功能很有限,上面这个基本可以满足需求 18、匹配帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$ 评注:表单验证时很实用 19、匹配国内电话号码:d{3}-d{8}|d{4}-d{7} 评注:匹配形式如 0511-4405222 或 021-87888822 20、匹配腾讯QQ号:[1-9][0-9]{4,} 评注:腾讯QQ号从10000开始 21、匹配中国邮政编码:[1-9]d{5}(?!d) 评注:中国邮政编码为6位数字 22、匹配身份证:d{15}|d{18} 评注:中国的身份证为15位或18位 23、匹配ip地址:d+.d+.d+.d+ 评注:提取ip地址时有用 24、匹配特定数字: ^[1-9]d*$    //匹配正整数 ^-[1-9]d*$   //匹配负整数 ^-?[1-9]d*$   //匹配整数 ^[1-9]d*|0$  //匹配非负整数(正整数 + 0) ^-[1-9]d*|0$   //匹配非正整数(负整数 + 0) ^[1-9]d*.d*|0.d*[1-9]d*$   //匹配正浮点数 ^-([1-9]d*.d*|0.d*[1-9]d*)$  //匹配负浮点数 ^-?([1-9]d*.d*|0.d*[1-9]d*|0?.0+|0)$  //匹配浮点数 ^[1-9]d*.d*|0.d*[1-9]d*|0?.0+|0$   //匹配非负浮点数(正浮点数 + 0) ^(-([1-9]d*.d*|0.d*[1-9]d*))|0?.0+|0$  //匹配非正浮点数(负浮点数 + 0) 评注:处理大量数据时有用,具体应用时注意修正 25、匹配特定字符串: ^[A-Za-z]+$  //匹配由26个英文字母组成的字符串 ^[A-Z]+$  //匹配由26个英文字母的大写组成的字符串 ^[a-z]+$  //匹配由26个英文字母的小写组成的字符串 ^[A-Za-z0-9]+$  //匹配由数字和26个英文字母组成的字符串 ^w+$  //匹配由数字、26个英文字母或者下划线组成的字符串 26、 在使用RegularExpressionValidator验证控件时的验证功能及其验证表达式介绍如下: 只能输入数字:“^[0-9]*$” 只能输入n位的数字:“^d{n}$” 只能输入至少n位数字:“^d{n,}$” 只能输入m-n位的数字:“^d{m,n}$” 只能输入零和非零开头的数字:“^(0|[1-9][0-9]*)$” 只能输入有两位小数的正实数:“^[0-9]+(.[0-9]{2})?$” 只能输入有1-3位小数的正实数:“^[0-9]+(.[0-9]{1,3})?$” 只能输入非零的正整数:“^+?[1-9][0-9]*$” 只能输入非零的负整数:“^-[1-9][0-9]*$” 只能输入长度为3的字符:“^.{3}$” 只能输入由26个英文字母组成的字符串:“^[A-Za-z]+$” 只能输入由26个大写英文字母组成的字符串:“^[A-Z]+$” 只能输入由26个小写英文字母组成的字符串:“^[a-z]+$” 只能输入由数字和26个英文字母组成的字符串:“^[A-Za-z0-9]+$” 只能输入由数字、26个英文字母或者下划线组成的字符串:“^w+$” 验证用户密码:“^[a-zA-Z]w{5,17}$”正确格式为:以字母开头,长度在6-18之间, 只能包含字符、数字和下划线。 验证是否含有^%&',;=?$"等字符:“[^%&',;=?$x22]+” 只能输入汉字:“^[u4e00-u9fa5],{0,}$” 验证Email地址:“^w+[-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*$” 验证InternetURL:“^http://([w-]+.)+[w-]+(/[w-./?%&=]*)?$” 验证身份证号(15位或18位数字):“^d{15}|d{}18$” 验证一年的12个月:“^(0?[1-9]|1[0-2])$”正确格式为:“01”-“09”和“1”“12” 验证一个月的31天:“^((0?[1-9])|((1|2)[0-9])|30|31)$” 正确格式为:“01”“09”和“1”“31”。 匹配中文字符的正则表达式: [u4e00-u9fa5] 匹配双字节字符(包括汉字在内):[^x00-xff] 匹配空行的正则表达式:n[s| ]*r 匹配HTML标记的正则表达式:/<(.*)>.*|<(.*) />/ 匹配首尾空格的正则表达式:(^s*)|(s*$) 匹配Email地址的正则表达式:w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)* 匹配网址URL的正则表达式:http://([w-]+.)+[w-]+(/[w- ./?%&=]*)? */ /// 评估正则表达式 /// - Parameter regex: 正则表达式 func evaluateWithRegex(_ regex: String) -> Bool{ let pre = NSPredicate(format: "SELF MATCHES %@", regex) return pre.evaluate(with: self) } /// 匹配中文 func isChinese() -> Bool { return self.evaluateWithRegex("^[\\u4e00-\\u9fa5]{0,}$") } /// 英文字母 func isEnglish() -> Bool { return self.evaluateWithRegex("^[a-zA-Z]*$") } /// 数字:[0-9] func isNumber() -> Bool { return self.evaluateWithRegex("^[0-9]*$") } /// 匹配Email地址 func isEmail() -> Bool { return self.evaluateWithRegex("^[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$") } /// 手机号 func isPhoneNumber() -> Bool { return self.evaluateWithRegex("^((13[0-9])|(14[0-9])|(15[0-9])|(17[0-9])|(18[0-9]))\\d{8}$") } /// 密码(匹配由数字、26个英文字母或者下划线组成的字符串) func isPassward() -> Bool { return self.evaluateWithRegex("^w+$") } /// 身份证 func isIdentityNumber() -> Bool { return self.evaluateWithRegex("(^\\d{15}$)|(^\\d{17}([0-9]|X|x)$)") } }
[ -1 ]
feaf0620a5b89374308eb29c992df77f894aefd2
1627365ff33b5446f7008c8a767b79d521e0c309
/YTKKeyValueStore/YTKKeyValueStore/YTKSetter.swift
7c27d86ce66eeb00754adf567612261dcdbb4929
[ "MIT" ]
permissive
victorteokw/YTKKeyValueStore_Swift
abb4bd497580b0b709a7e3f1b2d70e485edaf91d
6e6d57cd1a4e40f33cd1474ab7d9abc4a30996f6
refs/heads/master
2021-07-02T19:17:07.331470
2015-02-11T16:52:45
2015-02-11T16:52:45
null
0
0
null
null
null
null
UTF-8
Swift
false
false
541
swift
// // YTKSetter.swift // YTKKeyValueStore // // Created by ysq on 15/2/11. // Copyright (c) 2015年 sgxiang. All rights reserved. // import UIKit public struct YTKSetter { internal var objectId : String! internal var object : AnyObject! internal init(_ id : String!, _ object : AnyObject!){ self.objectId = id self.object = object } } infix operator <- { associativity left precedence 140 } public func <- (objectId: String!, object: AnyObject!) -> YTKSetter{ return YTKSetter(objectId , object) }
[ -1 ]
7c0c034cf624fee7da12bf0f3ca027dcddda58b5
009a2c5ab0c26984df9afc9f1835b84df440e311
/Fruits/Fruits/SettingsRowView.swift
b600afff9f7ddce4b3445767419987a2513719f9
[ "MIT" ]
permissive
Davirepository/Fruits-SwiftUI
f335546abab38584eaadd4295d232ac5dbbb1da9
84e2daad0b8a0f4f8670ac00ad961143c6b5457e
refs/heads/main
2023-04-10T22:47:44.893160
2021-05-03T09:41:39
2021-05-03T09:41:39
363,478,058
0
0
null
null
null
null
UTF-8
Swift
false
false
1,212
swift
// // SettingsRowView.swift // Fruits // // Created by Давид on 02.05.2021. // import SwiftUI struct SettingsRowView: View { // MARK: - PROPERTIES var name: String var content: String? var linkLabel: String? var linkDestination: String? // MARK: - BODY var body: some View { VStack { Divider().padding(.vertical, 4) HStack { Text(name).foregroundColor(.gray) Spacer() if let content = content { Text(content) } else if let linkLabel = linkLabel, let linkDestination = linkDestination { Link(linkLabel, destination: URL(string: "https://\(linkDestination)")!) Image(systemName: "arrow.up.right.square").foregroundColor(.pink) } else { EmptyView() } } } } } // MARK: - PREVIEW struct SettingsRowView_Previews: PreviewProvider { static var previews: some View { Group { SettingsRowView(name: "Developer", content: "David") .previewLayout(.fixed(width: 375, height: 60)) .padding() SettingsRowView(name:"Website", linkLabel: "SwiftUI Masterclass", linkDestination: "swiftuimasterclass.com") .preferredColorScheme(.dark) .previewLayout(.fixed(width: 375, height: 60)) .padding() } } }
[ 358697, 358676 ]
5ded4b5b662033ffdb1a8dbf7238568eca4723ec
8e5bfa85a13617c3ef08b18b6b6ae36d7a243b1c
/Tips Application/ViewController.swift
aa8444751a915e5c3bd9abcafe2f27b59e0c0410
[]
no_license
nkkol/Application-fo-tips-counting
908eb628a1ce6c19c21afa0bb8a09ddb7df7ff3b
6a0026f201becfca01cd667687cdbdd80c59f168
refs/heads/master
2021-04-09T19:27:08.576645
2020-03-20T23:15:57
2020-03-20T23:15:57
248,870,908
0
0
null
null
null
null
UTF-8
Swift
false
false
1,793
swift
// // ViewController.swift // Tips Application // // Created by Inna Litvinenko on 3/11/20. // Copyright © 2020 Inna Litvinenko. All rights reserved. // import UIKit var firstValue: Int = 18 var secondValue: Int = 20 var thirdValue: Int = 22 class ViewController: UIViewController { @IBOutlet weak var textField: UITextField! @IBOutlet weak var tipLabel: UILabel! @IBOutlet weak var totalLabel: UILabel! @IBOutlet weak var segment: UISegmentedControl! var percent: Int = 18 var total: Int = 0 var number: Int = 0 override func viewDidLoad() { super.viewDidLoad() } @IBAction func didEditingChanged(_ sender: Any) { totalLabel.text = textField.text update() } @IBAction func segmentValueChanged(_ sender: Any) { if segment.selectedSegmentIndex == 0 { percent = firstValue print(firstValue) } else if segment.selectedSegmentIndex == 1 { percent = secondValue print(secondValue) } else { percent = thirdValue print(thirdValue) } update() } func update () { if let bill = textField.text { number = Int(bill) ?? 0 } total = number + number * percent / 100 tipLabel.text = "$" + String(number * percent / 100) totalLabel.text = "$" + String(total) } @IBAction func updateSegmentButtonWasClicked(_ sender: Any) { segment.setTitle(String(firstValue) + "%", forSegmentAt: 0) segment.setTitle(String(secondValue) + "%", forSegmentAt: 1) segment.setTitle(String(thirdValue) + "%", forSegmentAt: 2) } }
[ -1 ]
399034b973ff180a5de95d60dfb2de575a508620
670c1a70f81f4edc3f0bab56b8d43804798986d8
/photogram/Postcard+CoreDataProperties.swift
8823ecf10497f1ee2b2a3ac92c05356e4e0dd774
[]
no_license
leishman/photogram
f1faaf5d17f5cdd066cb0850474e9b9ef7d22b6c
336f3df743bcf025aab9a2adcd4af4508b579fe4
refs/heads/master
2021-01-10T08:38:32.467729
2015-12-10T04:10:47
2015-12-10T04:10:47
47,244,268
0
1
null
null
null
null
UTF-8
Swift
false
false
537
swift
// // Postcard+CoreDataProperties.swift // photogram // // Created by Alexander Leishman on 12/1/15. // Copyright © 2015 Alexander Leishman. 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 Postcard { @NSManaged var message: String? @NSManaged var photo_url: String? @NSManaged var address: Address? @NSManaged var created_at: NSDate }
[ 279715, 228490, 280369, 279702, 228470, 280379, 279869, 279870 ]
a8a7cda96637dc06de6f3436802a495c9c6009e6
980bf34d444ad3fb23a99fc14fcb88867f1bdd43
/login_template/login_templateTests/login_templateTests.swift
a4910ec285fb2cbca74c5ab068a3595d4eec409e
[]
no_license
shelleycavaness/swift_apple_learning
dc14707b3375ed9e5d8e2d429d93f82a60e431c5
c2367338d111782f0a2987891a194e11447415b4
refs/heads/master
2020-07-31T08:15:11.814941
2019-10-01T15:47:46
2019-10-01T15:47:46
210,541,569
0
0
null
null
null
null
UTF-8
Swift
false
false
943
swift
// // login_templateTests.swift // login_templateTests // // Created by shelley cavaness on 24/09/2019. // Copyright © 2019 shelley cavaness. All rights reserved. // import XCTest @testable import login_template class login_templateTests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 145435, 241692, 317467, 239650, 329765, 292902, 354343, 315432, 325674, 223274, 315434, 243759, 282672, 241716, 319542, 288828, 288833, 288834, 313416, 315465, 311372, 311374, 354385, 196691, 329814, 354393, 200794, 309345, 280675, 280677, 321637, 319591, 329829, 43110, 131178, 319598, 288879, 333940, 204916, 223350, 131191, 233590, 288889, 280694, 131198, 333955, 319629, 235662, 311438, 241808, 323729, 325776, 239793, 241843, 182456, 180408, 227513, 295098, 258239, 280768, 301251, 227524, 309444, 321745, 280795, 194782, 356576, 346346, 321772, 125169, 327929, 194820, 313608, 321800, 278797, 338197, 334103, 325912, 315673, 227616, 278816, 305440, 211235, 151847, 282919, 332083, 332085, 332089, 282939, 287041, 241986, 139589, 182598, 182597, 280902, 323916, 325968, 282960, 366929, 289110, 168281, 332123, 334171, 106847, 391520, 323935, 332127, 354655, 321894, 242023, 242033, 313713, 291192, 315773, 211326, 313727, 291198, 240002, 332167, 242058, 311691, 227725, 108944, 291224, 285084, 317852, 242078, 141728, 315810, 381347, 315811, 289189, 108972, 311727, 299441, 283064, 311738, 293310, 291265, 278978, 291267, 127427, 127428, 283075, 324039, 311745, 278989, 281037, 317901, 281040, 278993, 289232, 242139, 369116, 285150, 279008, 160225, 242148, 242149, 279013, 127465, 330218, 279018, 311786, 109042, 319987, 279029, 233978, 301571, 342536, 279050, 279062, 289304, 279065, 291358, 293419, 244269, 234036, 244281, 338490, 242237, 115270, 55881, 377418, 244310, 242277, 244327, 295536, 287346, 313971, 301689, 244347, 279164, 291454, 311941, 330379, 311949, 326287, 316049, 311954, 330387, 330388, 316053, 111253, 295576, 111258, 111259, 318107, 279206, 352937, 295599, 318130, 342706, 299699, 299700, 164533, 289462, 109241, 248517, 363211, 154316, 242386, 279252, 318173, 289502, 299746, 295652, 330474, 299759, 322291, 312052, 199414, 221948, 279294, 299776, 295682, 291592, 322313, 322316, 117517, 326414, 312079, 322319, 295697, 291604, 207640, 291612, 326429, 293664, 281377, 326433, 279336, 295724, 353069, 152365, 312108, 285487, 301871, 318252, 230199, 293693, 295746, 318278, 353095, 201549, 281427, 353109, 244568, 244570, 230234, 322395, 109409, 201577, 326505, 177001, 242541, 400239, 330609, 174963, 109428, 207732, 310131, 209783, 240518, 109447, 113542, 416646, 228233, 316298, 236428, 56208, 308112, 209817, 289690, 318364, 127902, 240544, 310182, 240552, 353195, 236461, 293806, 316333, 316343, 289722, 230332, 353215, 353216, 279498, 52200, 203757, 289774, 287731, 277492, 316405, 240630, 312314, 320507, 314362, 328700, 328706, 320516, 293893, 134150, 330763, 320527, 324625, 238610, 308243, 316437, 320536, 197657, 281626, 175132, 326685, 300068, 345132, 322612, 324666, 238651, 302139, 21569, 214086, 296019, 339030, 353367, 281697, 230499, 314467, 316520, 228458, 207979, 318572, 281706, 316526, 15471, 312434, 353397, 300150, 300151, 337017, 285820, 300158, 150657, 302213, 228491, 228493, 177296, 326804, 119962, 283802, 285851, 296092, 339102, 300188, 300202, 306346, 318639, 339130, 228540, 230588, 228542, 353479, 353480, 353481, 244940, 283853, 189652, 189653, 148696, 333022, 304351, 304356, 290022, 328940, 234733, 279792, 353523, 353524, 298228, 216315, 208124, 316669, 292091, 228609, 320770, 242954, 292107, 318733, 251153, 177428, 245019, 126237, 115998, 333090, 208164, 279854, 298291, 171317, 318775, 345403, 286013, 333117, 216386, 193859, 345415, 312648, 300359, 294218, 296273, 331090, 120148, 314709, 314710, 357719, 134491, 316765, 222559, 163175, 333160, 134506, 306542, 296303, 327024, 327025, 316787, 116084, 314741, 249204, 249205, 181625, 111993, 290169, 318848, 224640, 306560, 294275, 298374, 368011, 304524, 296335, 112017, 112018, 234898, 224661, 318875, 333220, 310692, 245161, 316842, 241066, 314798, 286129, 150965, 279989, 228795, 292283, 280004, 300487, 306631, 284107, 302540, 310732, 312782, 64975, 310736, 327121, 286172, 333282, 144867, 103909, 316902, 245223, 191981, 329200, 282096, 321009, 191990, 280055, 300536, 290301, 286205, 300542, 230913, 292356, 323080, 329225, 323087, 329232, 323089, 316946, 175639, 282141, 187938, 245292, 230959, 288309, 290358, 235070, 194110, 288318, 56902, 282183, 288327, 292423, 243274, 333388, 224847, 228943, 118353, 280147, 290390, 128599, 235095, 44635, 333408, 157281, 286306, 345700, 243307, 312940, 204397, 224883, 333430, 323196, 325245, 175741, 337535, 294529, 312965, 282246, 229001, 290443, 188048, 282259, 302739, 229020, 257699, 40613, 40614, 40615, 298661, 61101, 321199, 337591, 280251, 327358, 282303, 323264, 321219, 333509, 319177, 9936, 9937, 302802, 241365, 321247, 229088, 298720, 321249, 153319, 12010, 280300, 325371, 194303, 194304, 323331, 216839, 284431, 243472, 321295, 323346, 161554, 116505, 325404, 313120, 241441, 241442, 325410, 315171, 284459, 294700, 317232, 200498, 319292, 325439, 315202, 307011, 325445, 282438, 153415, 280392, 325457, 413521, 317269, 18262, 284507, 300894, 245599, 237408, 302946, 276327, 325484, 296814, 313199, 282480, 292720, 325492, 317304, 333688, 241528, 194429, 325503, 315264, 188292, 327557, 241540, 243591, 67463, 315273, 315274, 325515, 243597, 325518, 329622, 337815, 294807, 118685, 311199, 319392, 292771, 300963, 313254, 333735, 294823, 292782, 317360, 243637, 294843, 214977, 280514, 214984, 284619, 344013, 231375, 294886, 317415, 327661, 296941, 278512, 311281, 223218, 311282, 333817, 292858 ]
70d60b9a370b15d6585527805d914141a9a276e2
fb5b1504eb5b24abca61bcce4e8556a912738809
/build/src/Models/ActionMapEstimateOutcomeCriteria.swift
093e30f1f4766337c5e77dd6562abef77f7ff948
[ "MIT" ]
permissive
MyPureCloud/platform-client-sdk-ios
135f1d124730ecc7e47e68df90a3215ba4ba6880
04ee2b0f5d3f8ad73078eb713427cb6f9e164dda
refs/heads/master
2023-08-17T05:03:39.340378
2023-08-15T06:49:56
2023-08-15T06:49:56
130,367,583
0
2
null
null
null
null
UTF-8
Swift
false
false
815
swift
// // ActionMapEstimateOutcomeCriteria.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen // import Foundation public class ActionMapEstimateOutcomeCriteria: Codable { /** ID of outcome. */ public var outcomeId: String? /** Probability value for the selected outcome at or above which the action map will trigger. */ public var maxProbability: Float? /** Additional probability condition, where if set, the action map will trigger if the current outcome probability is lower or equal to the value. */ public var probability: Float? public init(outcomeId: String?, maxProbability: Float?, probability: Float?) { self.outcomeId = outcomeId self.maxProbability = maxProbability self.probability = probability } }
[ -1 ]
0bd5e32aa027c96d04fa5aeb279b9508216614aa
893e363e50b34f8a4c36bd7e7dcb3ccea1f3ece5
/TipCalculatorUITests/TipCalculatorUITests.swift
bf522f2b22a20dca2bcfa07985877129bebd3b8a
[ "Apache-2.0" ]
permissive
jfgarci2000/TipCalculator
25bf5c12395b57ab875a48d63946627c847cb3ed
5eeb2ddd5288e9fc7292b6041e8787cbaf703c4f
refs/heads/main
2023-02-08T00:44:18.997093
2021-01-04T18:43:16
2021-01-04T18:43:16
326,749,425
0
0
null
null
null
null
UTF-8
Swift
false
false
1,436
swift
// // TipCalculatorUITests.swift // TipCalculatorUITests // // Created by Juan Felipe Garcia on 1/3/21. // import XCTest class TipCalculatorUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } } }
[ 360463, 155665, 376853, 344106, 253996, 385078, 163894, 180279, 352314, 213051, 376892, 32829, 286787, 352324, 237638, 352327, 385095, 393291, 163916, 368717, 311373, 196687, 278607, 311377, 254039, 426074, 368732, 180317, 32871, 352359, 221292, 278637, 385135, 319599, 376945, 131190, 385147, 131199, 426124, 196758, 49308, 65698, 311459, 49317, 377008, 377010, 180409, 295099, 377025, 377033, 164043, 417996, 254157, 368849, 368850, 139478, 229591, 385240, 254171, 147679, 147680, 311520, 205034, 254189, 286957, 254193, 344312, 336121, 262403, 147716, 385291, 368908, 180494, 262419, 368915, 254228, 319764, 278805, 377116, 254250, 311596, 131374, 418095, 336177, 368949, 180534, 155968, 287040, 311622, 270663, 368969, 254285, 180559, 377168, 344402, 229716, 368982, 270703, 139641, 385407, 385409, 270733, 106893, 385423, 385433, 213402, 385437, 254373, 156069, 385448, 385449, 115116, 385463, 319931, 278974, 336319, 336323, 188870, 278988, 278992, 262619, 377309, 377310, 369121, 369124, 279014, 270823, 319976, 279017, 311787, 213486, 360945, 139766, 393719, 279030, 377337, 279033, 254459, 410108, 410109, 262657, 377346, 279042, 279053, 410126, 262673, 385554, 393745, 303635, 279060, 279061, 254487, 410138, 279066, 188957, 377374, 385569, 385578, 377388, 197166, 393775, 418352, 33339, 352831, 33344, 385603, 377419, 385612, 303693, 426575, 385620, 369236, 115287, 189016, 270938, 287327, 279143, 279150, 287345, 352885, 352886, 344697, 189054, 287359, 385669, 369285, 311944, 344714, 311950, 377487, 311953, 287379, 336531, 180886, 426646, 352921, 377499, 221853, 344737, 295591, 352938, 295598, 418479, 279215, 279218, 164532, 336565, 287418, 377531, 303802, 377534, 377536, 66243, 385737, 287434, 385745, 279249, 303826, 369365, 369366, 385751, 230105, 361178, 352989, 352990, 418529, 385763, 295653, 369383, 230120, 361194, 312046, 418550, 344829, 279293, 205566, 197377, 434956, 312076, 295698, 418579, 426772, 197398, 221980, 344864, 197412, 336678, 262952, 189229, 262957, 164655, 197424, 328495, 197428, 336693, 230198, 377656, 426809, 197433, 222017, 295745, 377669, 197451, 369488, 279379, 385878, 385880, 295769, 197467, 435038, 230238, 279393, 303973, 279398, 385895, 385901, 197489, 295799, 164730, 336765, 254851, 369541, 172936, 320394, 426894, 377754, 172971, 140203, 377778, 304050, 189362, 189365, 377789, 189373, 345030, 345034, 279499, 418774, 386007, 386009, 418781, 386016, 123880, 418793, 320495, 222193, 435185, 271351, 214009, 312313, 435195, 328701, 312317, 386049, 328705, 418819, 410629, 377863, 189448, 230411, 361487, 435216, 386068, 254997, 336928, 336930, 410665, 345137, 361522, 312372, 238646, 238650, 320571, 410687, 336962, 238663, 377927, 361547, 205911, 156763, 361570, 214116, 230500, 214119, 402538, 279659, 173168, 230514, 238706, 279666, 312435, 377974, 66684, 377986, 279686, 402568, 222344, 140426, 337037, 386191, 410772, 222364, 124073, 402618, 148674, 402632, 148687, 402641, 189651, 419028, 279766, 189656, 304353, 279780, 222441, 279789, 386288, 66802, 271607, 369912, 386296, 369913, 419066, 386300, 279803, 386304, 369929, 419097, 320795, 115997, 222496, 320802, 304422, 369964, 353581, 116014, 66863, 312628, 345397, 345398, 386363, 222523, 345418, 353611, 337228, 337226, 353612, 230730, 296269, 353617, 222542, 238928, 296274, 378201, 230757, 296304, 312688, 337280, 353672, 263561, 296328, 296330, 370066, 9618, 411028, 279955, 370072, 148899, 148900, 361928, 337359, 329168, 312785, 329170, 222674, 353751, 280025, 239069, 361958, 271850, 280042, 280043, 271853, 329198, 411119, 337391, 116209, 296434, 386551, 288252, 271880, 198155, 329231, 304655, 370200, 222754, 157219, 157220, 312879, 288305, 288319, 288322, 280131, 288328, 353875, 312937, 271980, 206447, 403057, 42616, 337533, 280193, 370307, 419462, 149127, 149128, 419464, 288391, 411275, 214667, 239251, 345753, 198304, 255651, 337590, 370359, 280252, 280253, 321217, 239305, 296649, 403149, 313042, 345813, 370390, 272087, 345817, 337638, 181992, 345832, 345835, 288492, 141037, 313082, 288508, 288515, 173828, 395018, 395019, 116491, 395026, 116502, 435993, 345882, 411417, 255781, 362281, 378666, 403248, 378673, 345910, 182070, 182071, 345918, 337734, 280396, 272207, 272208, 337746, 395092, 362326, 345942, 370526, 345950, 362336, 255844, 296807, 214894, 362351, 313200, 214896, 313204, 182145, 280451, 67464, 305032, 337816, 329627, 239515, 354210, 10153, 313257, 362411, 370604, 362418, 411587, 280517, 362442, 346066, 231382, 354268, 436189, 403421, 329696, 354273, 403425, 354279, 436199, 174058, 337899, 354283, 247787, 329707, 247786, 296942, 436209, 239610, 182277, 346117, 403463, 43016, 354312, 354311, 354310, 313356, 419857, 305173, 436248, 223269, 346153, 354346, 313388, 272432, 403507, 378933, 378934, 436283, 288835, 403524, 436293, 313415, 239689, 436304, 329812, 223317, 411738, 272477, 280676, 313446, 395373, 288878, 346237, 215165, 329884, 378186, 362658, 436388, 215204, 133313, 338118, 346319, 379102, 387299, 18661, 379110, 338151, 149743, 379120, 436466, 411892, 436471, 395511, 313595, 436480, 272644, 338187, 338188, 395536, 338196, 272661, 379157, 338217, 321839, 362809, 379193, 395591, 289109, 272730, 436570, 215395, 239973, 280938, 321901, 354671, 362864, 272755, 354678, 199030, 223611, 436609, 436613, 395653, 395660, 264591, 272784, 240020, 190870, 43416, 190872, 289185, 436644, 289195, 272815, 436659, 338359, 436677, 289229, 281038, 281039, 256476, 420326, 166403, 420374, 322077, 289328, 330291, 322119, 191065, 436831, 420461, 346739, 346741, 420473, 297600, 166533, 363155, 346771, 264855, 363161, 289435, 436897, 248494, 166581, 355006, 363212, 363228, 436957, 322269, 436960, 264929, 338658, 289511, 330473, 346859, 330476, 289517, 215790, 199415, 289534, 322302, 35584, 133889, 322312, 346889, 166677, 207639, 363295, 355117, 191285, 273209, 355129, 273211, 355136, 355138, 420680, 355147, 355148, 355153, 281426, 387927, 363353, 363354, 281434, 420702, 363361, 363362, 412516, 355173, 355174, 281444, 207724, 355182, 207728, 420722, 314240, 158594, 330627, 240517, 265094, 387977, 396171, 355216, 224146, 224149, 256918, 256919, 256920, 240543, 256934, 273336, 289720, 289723, 273341, 330688, 379845, 363462, 19398, 273353, 191445, 207839, 347104, 314343, 134124, 412653, 248815, 257007, 347122, 437245, 257023, 125953, 396292, 330759, 347150, 330766, 412692, 330789, 248871, 281647, 412725, 257093, 404550, 207954, 339031, 404582, 257126, 265318, 322664, 265323, 396395, 404589, 273523, 363643, 248960, 363658, 404622, 224400, 265366, 347286, 429209, 339101, 429216, 380069, 265381, 3243, 208044, 322733, 339131, 265410, 183492, 273616, 421081, 339167, 298209, 421102, 363769, 52473, 208123, 52476, 412926, 437504, 322826, 388369, 380178, 429332, 126229, 412963, 257323, 437550, 273713, 298290, 208179, 159033, 347451, 372039, 257353, 257354, 109899, 437585, 331091, 150868, 314708, 372064, 429410, 437602, 281958, 388458, 306541, 421240, 224637, 388488, 298378, 314765, 306580, 282008, 396697, 282013, 290206, 396709, 298406, 241067, 380331, 314797, 380335, 355761, 421302, 134586, 380348, 216510, 380350, 216511, 306630, 200136, 273865, 306634, 339403, 372172, 413138, 421338, 437726, 429540, 3557, 3559, 191980, 282097, 265720, 216575, 290304, 372226, 437766, 323083, 208397, 323088, 413202, 413206, 388630, 175640, 216610, 372261, 347693, 323120, 396850, 200245, 323126, 290359, 134715, 323132, 421437, 396865, 282182, 413255, 273992, 265800, 421452, 265809, 396885, 290391, 265816, 396889, 306777, 388699, 396896, 388712, 388713, 314997, 290425, 339579, 396927, 282248, 224907, 396942, 405140, 274071, 323226, 208547, 208548, 405157, 388775, 282279, 364202, 421556, 224951, 224952, 306875, 282302, 323262, 241366, 224985, 282330, 159462, 372458, 397040, 12017, 323315, 274170, 200444, 249606, 282379, 216844, 372497, 397076, 421657, 339746, 216868, 257831, 167720, 241447, 421680, 282418, 274234, 339782, 315209, 159563, 339799, 307038, 274276, 282471, 274288, 372592, 274296, 339840, 372625, 282517, 298912, 118693, 438186, 126896, 151492, 380874, 372699, 323554, 380910, 380922, 380923, 274432, 372736, 241695, 430120, 102441, 315433, 102446, 430127, 405552, 282671, 241717, 249912, 225347, 307269, 421958, 233548, 176209, 381013, 53334, 315477, 200795, 356446, 323678, 438374, 176231, 438378, 233578, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 241809, 430231, 200856, 422044, 192670, 192671, 299166, 258213, 299176, 323761, 184498, 266427, 356550, 299208, 372943, 266447, 258263, 356575, 307431, 438512, 372979, 389364, 381173, 135416, 356603, 184574, 266504, 217352, 61720, 381210, 282908, 389406, 282912, 233761, 438575, 315698, 266547, 397620, 332084, 438583, 127292, 332100, 323914, 201037, 397650, 348499, 250196, 348501, 389465, 332128, 110955, 242027, 242028, 160111, 250227, 315768, 291193, 438653, 291200, 266628, 340356, 242059, 225684, 373141, 373144, 291225, 397732, 176602, 242138, 184799, 291297, 201195, 324098, 233987, 340489, 397841, 283154, 258584, 397855, 291359, 348709, 348710, 283185, 234037, 340539, 266812, 438850, 348741, 381515, 348748, 430681, 332379, 242274, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 356990, 291455, 373377, 422529, 201348, 152196, 356998, 348807, 356999, 316044, 275102, 176805, 340645, 422567, 176810, 160441, 422591, 291529, 225996, 135888, 242385, 234216, 373485, 373486, 21239, 275193, 348921, 234233, 242428, 299777, 430853, 430860, 430880, 234276, 234290, 152372, 160569, 430909, 160576, 348999, 283466, 234330, 275294, 381791, 127840, 357219, 439145, 177002, 308075, 381811, 201590, 177018, 398205, 340865, 291713, 349066, 316299, 349068, 234382, 308111, 381840, 308113, 390034, 373653, 430999, 209820, 381856, 398244, 185252, 422825, 381872, 177074, 398268, 349122, 398275, 373705, 127945, 340960, 398305, 340967, 398313, 234476, 127990, 349176, 201721, 349179, 234499, 357380, 398370, 357413, 357420, 300087, 21567, 308288, 398405, 349254, 218187, 250955, 300109, 234578, 250965, 439391, 250982, 398444, 62574, 357487, 300147, 119925, 349304, 234626, 349315, 349317, 234635, 373902, 234655, 234662, 373937, 373939, 324790, 300215, 218301, 283841, 283846, 259275, 316628, 259285, 357594, 414956, 251124, 316661, 292092, 439550, 439563, 242955, 414989, 259346, 349458, 259347, 382243, 382246, 382257, 292145, 382264, 193853, 193858, 251212, 406862, 234830, 259408, 283990, 357720, 300378, 300379, 374110, 234864, 259449, 382329, 357758, 243073, 357763, 112019, 398740, 234902, 374189, 251314, 284086, 259513, 54719, 292291, 300490, 300526, 259569, 251379, 300539, 398844, 210429, 366081, 316951, 374297, 153115, 431646, 349727, 431662, 374327, 210489, 235069, 349764, 292424, 292426, 128589, 333389, 349780, 128600, 235096, 300643, 300645, 415334, 54895, 366198, 210558, 210559, 415360, 325246, 415369, 431754, 210569, 267916, 415376, 259741, 153252, 399014, 210601, 202413, 415419, 259780, 333508, 267978, 333522, 325345, 333543, 325357, 431861, 284410, 161539, 284425, 300812, 284430, 366358, 169751, 431901, 341791, 186148, 186149, 284460, 202541, 431918, 399148, 153392, 431935, 415555, 325444, 153416, 325449, 341837, 415566, 431955, 325460, 341846, 300893, 259937, 382820, 276326, 415592, 292713, 292719, 325491, 341878, 276343, 350072, 333687, 112510, 325508, 333700, 243590, 325514, 350091, 350092, 350102, 350108, 333727, 219046, 284584, 292783, 300983, 128955, 219102, 292835, 6116, 317416, 432114, 325620, 415740, 268286, 415744, 243720, 399372, 153618, 358418, 178215, 325675, 243763, 358455, 399433, 333902, 104534, 194667, 260206, 284789, 374913, 374914, 415883, 333968, 153752, 333990, 104633, 260285, 227517, 268479, 374984, 301270, 301271, 334049, 325857, 268515, 383208, 317676, 260337, 260338, 432373, 375040, 309504, 432387, 260355, 375052, 194832, 325904, 391448, 268570, 178459, 186660, 268581, 334121, 358698, 317738, 260396, 325930, 432435, 358707, 178485, 358710, 14654, 268609, 227655, 383309, 383327, 391521, 366948, 416101, 416103, 383338, 432503, 432511, 211327, 227721, 285074, 252309, 39323, 285083, 317851, 285089, 375211, 334259, 129461, 342454, 358844, 293309, 317889, 326083, 416201, 129484, 154061, 416206, 326093, 432608, 285152, 391654, 334315, 375281, 293368, 317949, 334345, 309770, 342537, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 293420, 219694, 219695, 375345, 432694, 244279, 309831, 375369, 375373, 416334, 301647, 416340, 326229, 244311, 416353, 260705, 375396, 268901, 244345, 334473, 375438, 326288, 285348, 293552, 342705, 285362, 383668, 342714, 39616, 383708, 342757, 432883, 203511, 342775, 383740, 416509, 359166, 162559, 375552, 432894, 228099, 285443, 285450, 383755, 326413, 285467, 326428, 318247, 342827, 391980, 318251, 375610, 301883, 342846, 416577, 416591, 244569, 375644, 252766, 293729, 351078, 342888, 392057, 211835, 392065, 260995, 400262, 392071, 424842, 236427, 252812, 400271, 392080, 400282, 7070, 211871, 359332, 359333, 293801, 326571, 252848, 326580, 261046, 326586, 359365, 211913, 326602, 342990, 252878, 433104, 56270, 359380, 433112, 433116, 359391, 187372, 343020, 383980, 203758, 383994, 171009, 384004, 433166, 384015, 433173, 293911, 326684, 252959, 384031, 375848, 318515, 203829, 261191, 375902, 375903, 392288, 253028, 351343, 187505, 138354, 187508, 384120, 302202, 285819, 392317, 343166, 384127, 392320, 285823, 285833, 285834, 318602, 228492, 253074, 326803, 187539, 359574, 285850, 351389, 302239, 253098, 302251, 367791, 367792, 367798, 64699, 294075, 228541, 343230, 367809, 253124, 113863, 351445, 310496, 195809, 253168, 351475, 351489, 367897, 367898, 130342, 130344, 130347, 261426, 212282, 294210, 359747, 359748, 146760, 146763, 114022, 253288, 425327, 327023, 425331, 163190, 327030, 384379, 253316, 294278, 384391, 318860, 253339, 253340, 318876, 343457, 245160, 359860, 359861, 343480, 310714, 228796, 228804, 425417, 310731, 327122, 425434, 310747, 310758, 253431, 359931, 187900, 343552, 245249, 228868, 409095, 359949, 294413, 253456, 302613, 253462, 146976, 245290, 343606, 163385, 425534, 138817, 147011, 147020, 179800, 196184, 343646, 212574, 204386, 155238, 204394, 138862, 310896, 188021, 294517, 286351, 188049, 425624, 229021, 245413, 286387, 384693, 376502, 286392, 302778, 409277, 286400, 409289, 425682, 286419, 294621, 245471, 155360, 294629, 212721, 163575, 286457, 286463, 319232, 360194, 409355, 155408, 417556, 294699, 204600, 319289, 384826, 409404, 360253, 409416, 376661, 237397, 368471, 425820, 368486, 384871, 409446, 368489, 40809, 425832, 417648, 417658, 360315, 253828, 327556, 311183, 425875, 294806, 294808, 253851, 376733, 204702, 319393, 294820, 253868, 204722, 188349, 98240, 311238, 212947, 212953, 360416, 294887, 253930, 327666, 385011 ]
e659d1b48f0ed3a9eb6feff23a5b0e4add290c34
92d9004c3feea80ea3cb6b9e3cab0193d938fec4
/NemSwift/Sources/models/Account/Address.swift
f7ff4cfea691b970514566891b974c344eb4fa01
[ "MIT" ]
permissive
ryuta46/nem-swift
9b7ef5011e055b182cd8807b9ad8cc6994b95385
28b3e46864574f147db5e4f104588078dee92b8f
refs/heads/master
2021-04-26T23:25:38.357014
2019-10-15T20:32:58
2019-10-15T20:32:58
123,992,872
11
1
MIT
2019-10-15T20:32:59
2018-03-05T23:36:15
Swift
UTF-8
Swift
false
false
5,151
swift
// // Address.swift // NemSwift // // Created by Kazuya Okada on 2017/11/15. // Copyright © 2017年 OpenApostille. All rights reserved. // import Foundation import CryptoSwift public struct Address { public enum Network: UInt8 { case mijin = 0x60 case mainnet = 0x68 case testnet = 0x98 } public let value:String public let network:Network public init(publicKey: [UInt8], network: Network) { self.network = network let pubKeyByteArray = publicKey let pubKeySha3 = Data(bytes: pubKeyByteArray).sha3(.keccak256) let pubKeyRipemd = RIPEMD.hexStringDigest(pubKeySha3.toHexString(), bitlength: 160) as String let pubKeyRipemdByteArrary = ConvertUtil.toByteArray(pubKeyRipemd) var networkByteArray = Array<UInt8>() networkByteArray.append(network.rawValue) let networkPrefixByteArray = networkByteArray + pubKeyRipemdByteArrary let networkPrefixSha3 = Data(bytes: networkPrefixByteArray).sha3(.keccak256).toHexString() let checksum = String(networkPrefixSha3.prefix(8)) let addressByteStr = ConvertUtil.toHexString(networkPrefixByteArray) + checksum let addressByte = ConvertUtil.toByteArray(addressByteStr) self.value = base32StringFrom(data: addressByte) } } func base32StringFrom(data: [UInt8]) -> String { let encodingTable: [UInt8] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".bytes let paddingTable = [0,6,4,3,1] // Table 3: The Base 32 Alphabet // // Value Encoding Value Encoding Value Encoding Value Encoding // 0 A 9 J 18 S 27 3 // 1 B 10 K 19 T 28 4 // 2 C 11 L 20 U 29 5 // 3 D 12 M 21 V 30 6 // 4 E 13 N 22 W 31 7 // 5 F 14 O 23 X // 6 G 15 P 24 Y (pad) = // 7 H 16 Q 25 Z // 8 I 17 R 26 2 let dataLength = data.count var encodedBlocks = dataLength / 5 //if (encodedBlocks + 1) >= (UInt.max / 8) { return nil }// NSUInteger overflow check let padding = paddingTable[dataLength % 5] if padding > 0 { encodedBlocks += 1 } let encodedLength = encodedBlocks * 8 var encodingBytes = [UInt8](repeating: 0, count: encodedLength) var rawBytesToProcess = dataLength var rawBaseIndex = 0 var encodingBaseIndex = 0 while( rawBytesToProcess >= 5 ) { let rawByte1 = data[rawBaseIndex] let rawByte2 = data[rawBaseIndex+1] let rawByte3 = data[rawBaseIndex+2] let rawByte4 = data[rawBaseIndex+3] let rawByte5 = data[rawBaseIndex+4] encodingBytes[encodingBaseIndex] = encodingTable[Int((rawByte1 >> 3) & 0x1F)] encodingBytes[encodingBaseIndex+1] = encodingTable[Int(((rawByte1 << 2) & 0x1C) | ((rawByte2 >> 6) & 0x03)) ] encodingBytes[encodingBaseIndex+2] = encodingTable[Int((rawByte2 >> 1) & 0x1F)] encodingBytes[encodingBaseIndex+3] = encodingTable[Int(((rawByte2 << 4) & 0x10) | ((rawByte3 >> 4) & 0x0F))] encodingBytes[encodingBaseIndex+4] = encodingTable[Int(((rawByte3 << 1) & 0x1E) | ((rawByte4 >> 7) & 0x01))] encodingBytes[encodingBaseIndex+5] = encodingTable[Int((rawByte4 >> 2) & 0x1F)] encodingBytes[encodingBaseIndex+6] = encodingTable[Int(((rawByte4 << 3) & 0x18) | ((rawByte5 >> 5) & 0x07))] encodingBytes[encodingBaseIndex+7] = encodingTable[Int(rawByte5 & 0x1F)] rawBaseIndex += 5 encodingBaseIndex += 8 rawBytesToProcess -= 5 } let rest = dataLength-rawBaseIndex if rest < 5 && rest > 0 { let rawByte4 = rest >= 4 ? data[rawBaseIndex+3] : 0 let rawByte3 = rest >= 3 ? data[rawBaseIndex+2] : 0 let rawByte2 = rest >= 2 ? data[rawBaseIndex+1] : 0 let rawByte1 = data[rawBaseIndex] encodingBytes[encodingBaseIndex] = encodingTable[Int((rawByte1 >> 3) & 0x1F)] encodingBytes[encodingBaseIndex+1] = encodingTable[Int(((rawByte1 << 2) & 0x1C) | ((rawByte2 >> 6) & 0x03)) ] encodingBytes[encodingBaseIndex+2] = encodingTable[Int((rawByte2 >> 1) & 0x1F)] encodingBytes[encodingBaseIndex+3] = encodingTable[Int(((rawByte2 << 4) & 0x10) | ((rawByte3 >> 4) & 0x0F))] encodingBytes[encodingBaseIndex+4] = encodingTable[Int(((rawByte3 << 1) & 0x1E) | ((rawByte4 >> 7) & 0x01))] encodingBytes[encodingBaseIndex+5] = encodingTable[Int((rawByte4 >> 2) & 0x1F)] encodingBytes[encodingBaseIndex+6] = encodingTable[Int((rawByte4 << 3) & 0x18)] } // compute location from where to begin inserting padding, it may overwrite some bytes from the partial block encoding // if their value was 0 (cases 1-3). encodingBaseIndex = encodedLength - padding for i in 0..<padding { encodingBytes[encodingBaseIndex + i] = Array("=".utf8)[0] } return String(bytes: encodingBytes, encoding: .utf8)! }
[ -1 ]
4c485e4edce330b8da9828509d329abb5c1deec6
cef9a3564196219b14975fd77f772f98da93443f
/VKFriends/Helpers/BaseVKDelegate.swift
83f5b799f1aa6c174cb41379881c6ecf5da66ef4
[ "MIT" ]
permissive
asnelzin/VKFriends
f1333365aaa44d9f2ed9bc825028cacf10560d17
cbed28659e1f162de281ace727017a2a63341b0b
refs/heads/master
2021-01-09T23:37:14.397969
2016-11-16T22:50:47
2016-11-16T22:50:47
73,196,812
1
0
null
null
null
null
UTF-8
Swift
false
false
1,340
swift
// // BaseVKDelegate.swift // VKFriends // // Created by Alexander Nelzin on 11/14/16. // Copyright © 2016 Alexander Nelzin. All rights reserved. // import Foundation import SwiftyVK class BaseVKDelegate: VKDelegate { init() { VK.configure(appID: Constants.appID, delegate: self) } func vkWillAuthorize() -> [VK.Scope] { return [.offline, .friends] } func vkDidUnauthorize() { // Called when user is log out. } func vkAutorizationFailedWith(error: VK.Error) { // Called when SwiftyVK could not authorize. To let the application know that something went wrong. print(error) abort() } func vkShouldUseTokenPath() -> String? { // Called when SwiftyVK need know where a token is located. return nil // Path to save/read token or nil if should save token to UserDefaults } func vkWillPresentView() -> UIViewController { // Called when need to display a view from SwiftyVK. return UIApplication.shared.delegate!.window!!.rootViewController! } func vkDidAuthorizeWith(parameters: Dictionary<String, String>) { // Called when the user is log in. // Here you can start to send requests to the API. VKAPIWorker.sharedInstance.getFriendsList() } }
[ -1 ]
bcb68bcc44cdc7f854b4f3bd66c01f770f67b03a
892ef09aece7b5460032cc805023b600c4c6c4a7
/11_Drag_and_Drop,Table_View,and_Conllection_View/demo/EmojiArt/EmojiArt/EmojiArtDocumentTableViewController.swift
a3d9b87163c24f9ddda07b2e4669e125c3114cb2
[ "MIT" ]
permissive
candice-nie/Standford-CS193p-2017Fall-Swift
878ffcb2de871bf35512f9102fd72ceb9932bb36
74f1463c77e2e9d8a2c90cf65adf60cc1b14b2b3
refs/heads/master
2022-12-09T20:48:57.397611
2020-09-16T08:02:34
2020-09-16T08:02:34
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,514
swift
// // EmojiArtDocumentTableViewController.swift // EmojiArt // // Created by jamfly on 2018/1/7. // Copyright © 2018年 jamfly. All rights reserved. // import UIKit class EmojiArtDocumentTableViewController: UITableViewController { var emojiArtDocument = ["One", "Two", "Three"] // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return emojiArtDocument.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "DocumentCell", for: indexPath) cell.textLabel?.text = emojiArtDocument[indexPath.row] return cell } @IBAction func newEmojiArt(_ sender: UIBarButtonItem) { emojiArtDocument += ["Untitled".madeUnique(withRespectTo: emojiArtDocument)] tableView.reloadData() } /* // 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 func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { emojiArtDocument.remove(at: indexPath.row) tableView.deleteRows(at: [indexPath], with: .fade) } } /* // Override to support rearranging the table view. override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } */ /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
2de9a9e3927a7bbb19a28570d9f2664f955392f5
19a78d5f6aac29f9cf073b0b1652c33032bd4544
/Clock-in/CIGlobalSettingsViewController.swift
42cdba134944f2e5f0bd6936a490d629fa41a716
[]
no_license
nevillco/Clock-in
a5a3b0b1419ce777e599f972c7ed627227d3b817
280f089795a2bf62fcfb8d790ac092747842cd69
refs/heads/master
2020-12-25T14:39:14.056977
2016-07-12T19:49:00
2016-07-12T19:49:00
60,727,621
1
0
null
null
null
null
UTF-8
Swift
false
false
7,343
swift
// // CIGlobalSettingsViewController.swift // Clock in // // Created by Connor Neville on 6/11/16. // Copyright © 2016 Connor Neville. All rights reserved. // import UIKit import DZNEmptyDataSet import Foundation import RealmSwift import MessageUI class CIGlobalSettingsViewController: CIViewController { var notificationsOn:Bool = false var intervals:[Int] = [] override func viewDidLoad() { super.viewDidLoad() let view = CIGlobalSettingsView() addTargets(view) addDelegates(view) loadDefaults() self.view = view updateNotificationsButton() } func loadDefaults() { let defaults = NSUserDefaults.standardUserDefaults() self.intervals = defaults.objectForKey(String.CIDefaultNotificationIntervals) as! [Int] self.notificationsOn = defaults.boolForKey(String.CIDefaultNotificationsOn) } } private extension CIGlobalSettingsViewController { func addTargets(view: CIGlobalSettingsView) { view.backButton.addTarget(self, action: #selector(backButtonPressed(_:)), forControlEvents: .TouchUpInside) view.notificationsButton.addTarget(self, action: #selector(notificationsButtonPressed(_:)), forControlEvents: .TouchUpInside) view.contactButton.addTarget(self, action: #selector(contactButtonPressed(_:)), forControlEvents: .TouchUpInside) } func addDelegates(view: CIGlobalSettingsView) { view.table.delegate = self view.table.dataSource = self view.table.registerClass(CISettingsViewCell.self, forCellReuseIdentifier: .CISettingsCellReuseIdentifier) } func saveDefaults() { let defaults = NSUserDefaults.standardUserDefaults() defaults.setObject(intervals, forKey: String.CIDefaultNotificationIntervals) defaults.setBool(notificationsOn, forKey: String.CIDefaultNotificationsOn) } func updateNotificationsButton() { let view = self.view as! CIGlobalSettingsView if(notificationsOn) { view.notificationsButton.setTitle("notifications on".localized, forState: .Normal) } else { view.notificationsButton.setTitle("notifications off".localized, forState: .Normal) } view.notificationsButton.permanentHighlight = notificationsOn } } typealias CIGlobalSettingsViewControllerTargets = CIGlobalSettingsViewController extension CIGlobalSettingsViewControllerTargets { func backButtonPressed(sender: UIButton) { view.endEditing(true) dismissViewControllerAnimated(true, completion: nil) } func deleteButtonPressed(sender: UIButton) { let cell = sender.superview as! CISettingsViewCell intervals.removeAtIndex(cell.tag) let view = self.view as! CIGlobalSettingsView view.table.deleteRowsAtIndexPaths([NSIndexPath(forRow: cell.tag, inSection: 0)], withRowAnimation: .Middle) view.table.reloadEmptyDataSet() view.table.reloadData() saveDefaults() } func addButtonPressed(sender: UIButton) { presentViewController(CIAddNotificationViewController(), animated: true, completion: nil) } func notificationsButtonPressed(sender: UIButton) { let delegate = UIApplication.sharedApplication().delegate as! CIAppDelegate if(!delegate.notificationsEnabledInSettings()) { errorAlert("You have notifications disabled in your device's Settings. Please enable them to use this page.") return } notificationsOn = !notificationsOn saveDefaults() let view = self.view as! CIGlobalSettingsView view.table.reloadData() view.table.reloadEmptyDataSet() saveDefaults() updateNotificationsButton() } func contactButtonPressed(sender: UIButton) { sendEmail() } func sendEmail() { if MFMailComposeViewController.canSendMail() { let mail = MFMailComposeViewController() mail.mailComposeDelegate = self mail.setToRecipients(["[email protected]"]) mail.setSubject("Clock:in Feedback".localized) mail.setMessageBody("", isHTML: true) presentViewController(mail, animated: true, completion: nil) } else { errorAlert("Currently unable to open email.".localized) } } } extension CIGlobalSettingsViewController: MFMailComposeViewControllerDelegate { func mailComposeController(controller: MFMailComposeViewController, didFinishWithResult result: MFMailComposeResult, error: NSError?) { if result.rawValue == MFMailComposeResultFailed.rawValue { errorAlert("Mail composer failed.") } controller.dismissViewControllerAnimated(true, completion: nil) } } extension CIGlobalSettingsViewController: UITableViewDataSource, UITableViewDelegate { func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return notificationsOn ? intervals.count : 0 } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier(.CISettingsCellReuseIdentifier) as! CISettingsViewCell let item = intervals[indexPath.row] cell.label.text = NSDate.longStringForInterval(item) cell.tag = indexPath.row cell.deleteButton.addTarget(self, action: #selector(deleteButtonPressed(_:)), forControlEvents: .TouchUpInside) return cell } func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { return CIConstants.settingsCellRowHeight } func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return (!notificationsOn) ? 0 : CIConstants.settingsHeaderHeight } func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if(!notificationsOn) { return nil } let header = CISettingsViewHeader() let max = CIConstants.maxNotifications let current = intervals.count let text = String(format: "%d notifications allowed\n%d remaining", max, (max - current)) let attributedText = NSMutableAttributedString(string: text) let textRange = NSRange(location: 0, length: text.characters.count) attributedText.addAttribute(NSForegroundColorAttributeName, value: UIColor.whiteColor(), range: textRange) let defaultFontRange = (text as NSString).rangeOfString(String(format: "%d notifications allowed", max)) attributedText.addAttribute(NSFontAttributeName, value: UIFont.CIDefaultBodyFont(), range: defaultFontRange) let boldFontRange = (text as NSString).rangeOfString(String(format: "%d remaining", (max - current))) attributedText.addAttribute(NSFontAttributeName, value: UIFont.CIBoldBodyFont(), range: boldFontRange) header.label.attributedText = attributedText header.addButton.addTarget(self, action: #selector(addButtonPressed(_:)), forControlEvents: .TouchUpInside) return header } }
[ -1 ]
925ced74e65c940a6899332f11f544731f002e32
9a8d1ca9ee43236ad17b9000f5a7125586a1b797
/TestSber/Classes/Services/DataBase/RecentlyViewedDataProvider/RecentlyViewedDataProvider.swift
8a7db1b472b03f77e3513fce7a6c62e3a56a6983
[]
no_license
albeg/testSber
f170f749b0be649959ee56ba917d5de9120d5e13
8d3189d00151793cbb24b84da9938b2b4d087614
refs/heads/master
2022-07-07T07:53:54.328996
2020-05-08T22:09:08
2020-05-08T22:09:08
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,216
swift
// // RecentlyViewedDataProvider.swift // TestSber // // Created by Viacheslav Loie on 02.05.2020. // Copyright © 2020 SberTestViper. All rights reserved. // import RealmSwift import Realm class RecentlyViewedDataProviderImplemintation: RecentlyViewedRSSService { private let realmService: RealmService // MARK: RecentlyViewedRSSItem private(set) var rssItems: RSSViewsItem = RSSViewsItem() init(realmService: RealmService) { self.realmService = realmService } private func resave() { realmService.save(rssItems) } // MARK: add() func add(rss: RSSItem) { if self.rssItems.rssList.first(where: { (savedRSSItem) -> Bool in return savedRSSItem.title == rss.title }) == nil { realmService.save(rss) realmService.write { self.rssItems.rssList.append(rss) } while self.rssItems.rssList.count > 10 { realmService.write { self.rssItems.rssList.removeFirst() } } resave() } } // MARK: loadCachedList() func loadCachedList() { guard let rssItems = realmService.retrieveObjects(of: RSSViewsItem.self).first else { return } self.rssItems = rssItems } // MARK: clear() func clear() { rssItems.rssList = List() resave() } }
[ -1 ]
91dce69a996042216bd59531b5276448b131b284
783a568d664dc9725019a7bedfb5968394b15a44
/Tests/TrainerTests.swift
fe5d099fba8b9ee267828a041dea467d998c63cb
[ "MIT" ]
permissive
alexsosn/BrainCore
dd682573bfcb669f4675f77144e606a4f508aafc
9eba06c434a2748da7b357ce84e975bea822095d
refs/heads/master
2021-04-28T23:00:48.210948
2017-03-11T07:29:53
2017-03-11T07:29:53
77,741,769
1
0
null
2016-12-31T13:41:09
2016-12-31T13:41:09
null
UTF-8
Swift
false
false
1,937
swift
// Copyright © 2016 Venture Media Labs. All rights reserved. // // This file is part of BrainCore. The full BrainCore copyright notice, // including terms governing use, modification, and redistribution, is // contained in the file LICENSE at the root of the source code distribution // tree. import XCTest @testable import BrainCore import Upsurge class TrainerTests: MetalTestCase { func testTwoInputOneOutputActivationForwardBackward() { let source = Source(name: "source", data: [1, 1, 2, 2], batchSize: 2) let labels = Source(name: "labels", data: [1, 2], batchSize: 2) let weights = Matrix<Float>(rows: 2, columns: 1, elements: [2, 4]) let biases = ValueArray<Float>([1]) let ip = InnerProductLayer(weights: weights, biases: biases, name: "ip") let loss = L2LossLayer(size: 1, name: "loss") let sink = Sink(name: "sink", inputSize: 1, batchSize: 2) let net = Net.build({ source => ip [ip, labels] => loss => sink }) let expectation = self.expectation(description: "Net forward/backward pass") var ipInputDiff = [Float]() var ipWeightsDiff = [Float]() var ipBiasDiff = [Float]() let trainer = try! Trainer(net: net, device: device, batchSize: 2) trainer.run() { snapshot in ipInputDiff = [Float](snapshot.inputDeltasOfLayer(ip)!) ipWeightsDiff = arrayFromBuffer(ip.weightDeltasBuffer!.metalBuffer!) ipBiasDiff = arrayFromBuffer(ip.biasDeltasBuffer!.metalBuffer!) expectation.fulfill() } waitForExpectations(timeout: 5) { error in if let error = error { XCTFail("trainer.run() failed: \(error)") } XCTAssertEqual(ipInputDiff, [6, 11, 12, 22]) XCTAssertEqual(ipWeightsDiff, [14, 14]) XCTAssertEqual(ipBiasDiff, [8.5]) } } }
[ -1 ]
bebd50811170ff979a7af36340d8b570451e0919
6c6a2d11506c1c4f6acc5e569109042cff280b96
/05-WordScramble/WordScramble/AppDelegate.swift
41c566bfb6d62f7c94ce44bffdf7fb8fd2b041e9
[]
no_license
ck3g/100DaysOfSwift
7b5480cab90f01e66cfd33b7d61076d7fe54331d
fb244383471f2b92aa5bfa23ca25a2c1d125bff0
refs/heads/master
2021-01-31T13:56:16.935996
2020-07-09T07:44:44
2020-07-09T07:44:44
243,516,383
1
0
null
null
null
null
UTF-8
Swift
false
false
1,386
swift
// // AppDelegate.swift // WordScramble // // Created by Vitali Tatarintev on 09.03.20. // Copyright © 2020 Vitali Tatarintev. 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, 163891, 213048, 376889, 385081, 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, 385280, 336128, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 393538, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 246123, 262507, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 328206, 410128, 393747, 254490, 188958, 385570, 33316, 377383, 197159, 352821, 188987, 418363, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 336512, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 164538, 328378, 328386, 352968, 344776, 352971, 418507, 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, 361288, 328522, 336714, 426841, 197468, 361309, 254812, 361315, 361322, 328573, 377729, 369542, 222128, 345035, 386003, 345043, 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, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 66782, 222437, 328941, 386285, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181649, 181654, 230809, 181670, 181673, 337329, 181681, 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, 198280, 345736, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 337592, 419512, 419517, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 141051, 337659, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 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, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 321879, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 338409, 248308, 199164, 330252, 199186, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 436962, 338660, 338664, 264941, 363251, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 355175, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 158761, 199728, 330800, 396336, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 330958, 330965, 265432, 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, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 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, 372353, 224897, 216707, 339588, 126596, 421508, 224904, 224909, 159374, 11918, 339601, 126610, 224913, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 257704, 224936, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 167700, 372499, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 257916, 225148, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 266297, 217157, 421960, 356439, 430180, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 225493, 266453, 225496, 225499, 225502, 225505, 356578, 217318, 225510, 225514, 225518, 372976, 381176, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 250199, 250202, 332125, 250210, 348525, 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, 381545, 340627, 184982, 373398, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 324472, 398201, 119674, 324475, 430972, 340861, 324478, 340858, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 349180, 439294, 431106, 209943, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 341113, 210044, 349308, 152703, 160895, 349311, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 210084, 251044, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 251128, 218360, 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, 366061, 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, 333511, 210631, 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, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 333818, 350202, 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, 350410, 260298, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 375053, 268559, 350480, 432405, 350486, 350490, 325914, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 268701, 416157, 342430, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 358961, 383536, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 375535, 203506, 342776, 391937, 391948, 326416, 375568, 375571, 375574, 162591, 326441, 326451, 326454, 244540, 326460, 260924, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 342874, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 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, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 367800, 384188, 351423, 384191, 384198, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 384249, 343306, 261389, 359694, 253200, 261393, 384275, 384283, 245020, 384288, 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, 245460, 155351, 155354, 212699, 245475, 155363, 245483, 155371, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 425845, 262005, 147317, 262008, 262011, 155516, 155521, 155525, 360326, 262027, 155531, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 384977, 393169, 155611, 155619, 253923, 155621, 327654, 253926, 393203, 360438, 253943, 393206, 393212, 155646 ]
d4f6664007dcdc5048746b1ceb5ef73c31a82937
896fedc7b26052afd70f8eba74db2e16f69dd3c5
/Xcode/FastMDb/Model/Section+Episode.swift
ecac069e4be5ba3a128192b14e0ca618f4d22341
[ "MIT" ]
permissive
bretsko/fastmdb
18c7aa619b88483b6e1c09d995294e54868e90cb
a2ed1c77bd4d4fda30874e193e99b8148f2173ba
refs/heads/main
2023-02-16T00:27:26.976296
2020-06-17T16:15:08
2020-06-17T16:18:23
null
0
0
null
null
null
null
UTF-8
Swift
false
false
3,389
swift
// // Section+Episode.swift // // Created by Daniel on 5/12/20. // Copyright © 2020 dk. All rights reserved. // import Foundation extension Episode { var episodeSections: [Section] { var sections: [Section] = [] sections.append(mainSection) if let section = ratingSection { sections.append(section) } if let section = writingSection { sections.append(section) } if let section = directorSection { sections.append(section) } if let section = guestStarsSection { sections.append(section) } if let section = crewSection { sections.append(section) } return sections } } private extension Episode { var crewSection: Section? { guard let crew = crew else { return nil } var filtered = crew for job in CrewJob.allCases { filtered = filtered.filter { $0.job != job.rawValue } } let items = filtered.map { $0.listItemCrew } guard items.count > 0 else { return nil } return Section(header: "crew", items: items) } var directorSection: Section? { guard let crew = crew else { return nil } let directors = crew.filter { $0.job == CrewJob.Director.rawValue } guard directors.count > 0 else { return nil } let items = directors.map { $0.listItemCrew } return Section(header: "directed by", items: items) } var guestStarsSection: Section? { guard let guests = guest_stars else { return nil } let items = guests.map { $0.listItemCast } guard items.count > 0 else { return nil } let section = Section(header: "Guest Stars", items: items) return section } var mainSection: Section { var items: [Item] = [] if let name = name { var sub: String? if let e = episode_number, let s = season_number { sub = "Season \(s), Episode \(e)" } let item = Item(title: name, subtitle: sub) items.append(item) } if let item = dateItem { items.append(item) } if let o = overview, o != "" { let item = Item(title: o) items.append(item) } return Section(items: items) } var ratingSection: Section? { guard let rating = ratingDisplay else { return nil } let item = Item(title: rating, subtitle: voteDisplay, color: vote_average.color) let section = Section(header: "rating", items: [item]) return section } var writingSection: Section? { guard let crew = crew else { return nil } let writers = crew.filter { $0.job == CrewJob.Teleplay.rawValue || $0.job == CrewJob.Writer.rawValue } guard writers.count > 0 else { return nil } let items = writers.map { $0.listItemCrew } return Section(header: "written by", items: items) } } private extension Episode { var ratingDisplay: String? { guard vote_count > Tmdb.voteThreshold else { return nil } return "\(vote_average)/10" } var voteDisplay: String? { guard vote_count > Tmdb.voteThreshold else { return nil } return "\(vote_count) votes" } }
[ -1 ]
efd94d1629fae009538891d59dfb19b17bd96a88
c696657176841caa90627beb70c40a5645aa36f9
/Chapter04/starter/TeslaOrderForm/TeslaOrderForm/Views/Complete Order View/CompleteOrderView.swift
624f100a4245a3c70b660a049e7447256bafc203
[ "MIT" ]
permissive
PacktPublishing/SwiftUI-Projects
ca7b01d48819bad0634f2bc1c8b67d1e12bf6575
479f881fb0e7358dd89f8674a90efdf61d451d38
refs/heads/master
2023-02-05T00:35:33.831491
2023-01-30T10:07:58
2023-01-30T10:07:58
226,855,702
77
34
null
null
null
null
UTF-8
Swift
false
false
455
swift
// // CompleteOrderView.swift // TeslaOrderForm // // Created by Craig Clayton on 1/24/20. // Copyright © 2020 Cocoa Academy. All rights reserved. // import SwiftUI struct CompleteOrderView: View { @EnvironmentObject var order:OrderViewModel var body: some View { Text("Complete Order View") } } struct CompleteOrderView_Previews: PreviewProvider { static var previews: some View { CompleteOrderView() } }
[ -1 ]
98b245f880edf0fb570e39babae7cc064479cf8f
ff21fdd60e677debf1ab02c15f587d4c29b9c946
/分帳/ProjectVC.swift
5bd47209f6149d9616c1047653f3f693fbde8c52
[]
no_license
jackhooo/Pay_Project
e13db59b15598e39c25048c7f7d7ec90cbeaf8ce
a8ae09e38dff58bd83d5dbb9c850df528935c3e3
refs/heads/master
2020-06-11T00:25:43.248305
2017-05-02T10:48:07
2017-05-02T10:48:07
75,833,585
0
0
null
null
null
null
UTF-8
Swift
false
false
5,433
swift
// // ViewController.swift // UICollectionViewDemoSwift // // Created by Hardik Trivedi on 29/07/2016. // Copyright © 2016 iHart. All rights reserved. // import UIKit import TwicketSegmentedControl class ProjectViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource { @IBOutlet weak var projectCollectionView: UICollectionView! var projectsToShow:[Project] = [] override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let titles = ["進行中", "已完成"] let frame = CGRect(x: 0, y: 64, width: view.frame.width, height: 40) let segmentedControl = TwicketSegmentedControl(frame: frame) segmentedControl.setSegmentItems(titles) segmentedControl.defaultTextColor = UIColor.white segmentedControl.backgroundColor = UIColor.clear segmentedControl.sliderBackgroundColor = UIColor(red: 242.0/255.0, green: 116.0/255.0, blue: 119.0/255.0, alpha: 0.6) segmentedControl.delegate = self view.addSubview(segmentedControl) if(projectsToShow.count == 0){ SetProjectToShow(whichPage: 0) } } func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return projectsToShow.count } @IBAction func unwindToHomeScreen(_ segue:UIStoryboardSegue) { newMemberList = [] } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! ProjectCollectionViewCell if( (indexPath as NSIndexPath).row % 4 == 3){ cell.markColor.backgroundColor = UIColor(red: 142.0/255.0, green: 229.0/255.0, blue: 238.0/255.0, alpha: 1.0) } else if( (indexPath as NSIndexPath).row % 4 == 2){ cell.markColor.backgroundColor = UIColor(red: 219.0/255.0, green: 112.0/255.0, blue: 147.0/255.0, alpha: 1.0) } else if( (indexPath as NSIndexPath).row % 4 == 1){ cell.markColor.backgroundColor = UIColor(red: 255.0/255.0, green: 246.0/255.0, blue: 143.0/255.0, alpha: 1.0) } else{ cell.markColor.backgroundColor = UIColor(red: 255.0/255.0, green: 192.0/255.0, blue: 181.0/255.0, alpha: 1.0) } cell.projectNameLabel.text = projectsToShow[projectsToShow.count - 1 - (indexPath as NSIndexPath).row].projectName cell.monthLabel.text = projectsToShow[projectsToShow.count - 1 - (indexPath as NSIndexPath).row].getMonth() cell.dayLabel.text = projectsToShow[projectsToShow.count - 1 - (indexPath as NSIndexPath).row].date return cell } // MARK:- Selected Cell IndexPath func getIndexPathForSelectedCell() -> IndexPath? { var indexPath:IndexPath? if projectCollectionView.indexPathsForSelectedItems!.count > 0 { indexPath = projectCollectionView.indexPathsForSelectedItems![0] } return indexPath } //SaveData override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if(addProjectSaveButton == 1) { SetProjectToShow(whichPage: 0) projectCollectionView.reloadData() addProjectSaveButton = 0 } } func SetProjectToShow(whichPage:Int){ projectsToShow = [] if(whichPage == 0){ for project in projects{ if(project.check == false) { projectsToShow.append(project) } } } else{ for project in projects{ if(project.check == true) { projectsToShow.append(project) } } } } // MARK:- Should Perform Segue // override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool { // return !isEditing // } // MARK: - Navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if let indexPath = getIndexPathForSelectedCell() { if segue.identifier == "showProject" { let detailViewController = segue.destination as! MemberItemViewController detailViewController.project = projectsToShow[projectsToShow.count - 1 - (indexPath as NSIndexPath).row] print(projectsToShow[projectsToShow.count - 1 - (indexPath as NSIndexPath).row].projectName) } } } } extension ProjectViewController: TwicketSegmentedControlDelegate { func didSelect(_ segmentIndex: Int) { //print("Selected idex: \(segmentIndex)") SetProjectToShow(whichPage: segmentIndex) projectCollectionView.reloadData() } }
[ -1 ]
0f8311c3d8dd8ed6535bb5f6850885b562629193
2e61e41e27e5b1830d702cd65e122611cf7a85c3
/Aerial/Source/Views/PrefPanel/InfoWeatherView.swift
b66dece6f69a06e5e057cc9b83a890eccb91eb6b
[ "MIT" ]
permissive
lwrot/Aerial
3238f7c483d034480b39c74e19359f3a51206342
0fe3461a3d5aa519f8ecc65504bc3cad8ac73a96
refs/heads/master
2023-08-21T15:02:45.213475
2023-08-16T22:59:30
2023-08-16T22:59:30
224,972,407
0
0
MIT
2023-09-08T00:32:20
2019-11-30T06:53:32
Swift
UTF-8
Swift
false
false
8,355
swift
// // InfoWeatherView.swift // Aerial // // Created by Guillaume Louel on 25/03/2020. // Copyright © 2020 Guillaume Louel. All rights reserved. // import Cocoa class InfoWeatherView: NSView { @IBOutlet var withCity: NSButton! @IBOutlet var withWind: NSButton! @IBOutlet var withHumidity: NSButton! @IBOutlet var locationMode: NSPopUpButton! @IBOutlet var locationString: NSTextField! @IBOutlet var degreePopup: NSPopUpButton! @IBOutlet var iconsPopup: NSPopUpButton! @IBOutlet var locationLabel: NSTextField! @IBOutlet var weatherModePopup: NSPopUpButton! @IBOutlet var windModePopup: NSPopUpButton! @IBOutlet weak var testButtonLocation: NSButton! @IBOutlet weak var testButtonCity: NSButton! // Init(ish) func setStates() { locationMode.selectItem(at: PrefsInfo.weather.locationMode.rawValue) degreePopup.selectItem(at: PrefsInfo.weather.degree.rawValue) iconsPopup.selectItem(at: PrefsInfo.weather.icons.rawValue) weatherModePopup.selectItem(at: PrefsInfo.weather.mode.rawValue) windModePopup.selectItem(at: PrefsInfo.weatherWindMode.rawValue) if PrefsInfo.weather.degree == .fahrenheit { windModePopup.isHidden = true } withCity.state = PrefsInfo.weather.showCity ? .on : .off withWind.state = PrefsInfo.weather.showWind ? .on : .off withHumidity.state = PrefsInfo.weather.showHumidity ? .on : .off // Hide the flat color icons pre Big Sur as those are not available if #available(macOS 11.0, *) { } else { iconsPopup.item(at: 1)?.isHidden = true } locationString.stringValue = PrefsInfo.weather.locationString locationLabel.stringValue = "" locationString.delegate = self updateLocationMode() } @IBAction func windModePopupChange(_ sender: NSPopUpButton) { PrefsInfo.weatherWindMode = InfoWeatherWind(rawValue: sender.indexOfSelectedItem)! } @IBAction func weatherModePopupChange(_ sender: NSPopUpButton) { PrefsInfo.weather.mode = InfoWeatherMode(rawValue: sender.indexOfSelectedItem)! } @IBAction func locationModeChange(_ sender: NSPopUpButton) { PrefsInfo.weather.locationMode = InfoLocationMode(rawValue: sender.indexOfSelectedItem)! if PrefsInfo.weather.locationMode == .useCurrent { // Get the location let location = Locations.sharedInstance location.getCoordinates(failure: { (_) in // swiftlint:disable:next line_length Aerial.helper.showInfoAlert(title: "Could not get your location", text: "Make sure you enabled location services on your Mac (and Wi-Fi!), and that Aerial (or legacyScreenSaver on macOS 10.15 and later) is allowed to use your location. If you use Aerial Companion, you will also need also allow location services for it.", button1: "OK", caution: true) }, success: { (coordinates) in self.locationLabel.stringValue = "Location found (\(String(format: "%.2f", coordinates.latitude)), \(String(format: "%.2f", coordinates.longitude)))" }) } updateLocationMode() } @IBAction func withCityChange(_ sender: NSButton) { let onState = sender.state == .on PrefsInfo.weather.showCity = onState } @IBAction func withWindChange(_ sender: NSButton) { let onState = sender.state == .on PrefsInfo.weather.showWind = onState } @IBAction func withHumidityChange(_ sender: NSButton) { let onState = sender.state == .on PrefsInfo.weather.showHumidity = onState } func updateLocationMode() { if PrefsInfo.weather.locationMode == .manuallySpecify { locationString.isHidden = false testButtonLocation.isHidden = true testButtonCity.isHidden = false } else { locationString.isHidden = true testButtonLocation.isHidden = false testButtonCity.isHidden = true } } @IBAction func iconsChange(_ sender: NSPopUpButton) { PrefsInfo.weather.icons = InfoIconsWeather(rawValue: sender.indexOfSelectedItem)! } @IBAction func degreePopupChange(_ sender: NSPopUpButton) { PrefsInfo.weather.degree = InfoDegree(rawValue: sender.indexOfSelectedItem)! if PrefsInfo.weather.degree == .fahrenheit { windModePopup.isHidden = true } else { windModePopup.isHidden = false } } @IBAction func locationStringChange(_ sender: NSTextField) { PrefsInfo.weather.locationString = sender.stringValue } @IBAction func testLocationButtonClick(_ sender: NSButton) { // Clear out weather from existing location let cachedWeatherURL = URL(fileURLWithPath: Cache.supportPath, isDirectory: true).appendingPathComponent("Weather.json") let cachedWeatherForecastURL = URL(fileURLWithPath: Cache.supportPath, isDirectory: true).appendingPathComponent("Forecast.json") let fm = FileManager.default // Clear out current weather if fm.fileExists(atPath: cachedWeatherURL.path){ do { try fm.removeItem(atPath: cachedWeatherURL.path) } catch {} } // Clear out forecast if fm.fileExists(atPath: cachedWeatherForecastURL.path) { do { try fm.removeItem(atPath: cachedWeatherForecastURL.path) } catch {} } if PrefsInfo.weather.mode == .current { OpenWeather.fetch { result in switch result { case .success(let openWeather): let ovc = self.parentViewController as! OverlaysViewController ovc.openWeatherPreview(weather: openWeather) if let name = openWeather.name { self.locationLabel.stringValue = name } case .failure(let error): if error == .cityNotFound { self.locationLabel.stringValue = "City not found, make sure you don't use state abbreviations" } else { self.locationLabel.stringValue = error.localizedDescription } } } } else { Forecast.fetch { result in switch result { case .success(let openWeather): let ovc = self.parentViewController as! OverlaysViewController ovc.openWeatherPreview(weather: openWeather) if let lat = openWeather.city?.coord?.lat, let lon = openWeather.city?.coord?.lon, let name = openWeather.city?.name { self.locationLabel.stringValue = name + " lat: " + String(format: "%.2f", lat) + " lon: " + String(format: "%.2f", lon) } case .failure(let error): if error == .cityNotFound { self.locationLabel.stringValue = "City not found, make sure you don't use state abbreviations" } else { self.locationLabel.stringValue = error.localizedDescription } } } } } @IBAction func openWeatherLogoButton(_ sender: Any) { NSWorkspace.shared.open(URL(string: "https://openweathermap.org/")!) } } extension InfoWeatherView: NSTextFieldDelegate { // We need the delegate to intercept changes without the // enter key being pressed on the textfield func controlTextDidChange(_ obj: Notification) { let textField = obj.object as! NSTextField // Just in case... if textField == locationString { // print(textField.stringValue) PrefsInfo.weather.locationString = textField.stringValue } } } extension NSView { var parentViewController: NSViewController? { sequence(first: self) { $0.nextResponder } .first(where: { $0 is NSViewController }) .flatMap { $0 as? NSViewController } } }
[ -1 ]
49ca20ef0b7e01ba4fb10d1e6cea6f40977a955a
e086604cba10c4fdd634e7bcf3feb0f0eea5fb08
/RetroCalculator/AppDelegate.swift
dcf22b0a72466ac6c777f8aa132422ee60f6cfec
[]
no_license
isaacrdz/retrocalculator
5bc2bf7f20af6e646a12ea578a796df38864c8cd
3c2d56d326caf95abb4cddd4a5f1408610f357af
refs/heads/master
2021-01-15T16:41:34.660881
2017-08-20T04:38:12
2017-08-20T04:38:12
99,717,009
0
0
null
null
null
null
UTF-8
Swift
false
false
2,186
swift
// // AppDelegate.swift // RetroCalculator // // Created by Isaac Rodriguez on 8/7/17. // Copyright © 2017 Isaac Rodriguez. 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, 229391, 327695, 229394, 229397, 229399, 229402, 278556, 229405, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 286774, 286776, 319544, 286778, 229432, 204856, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 131278, 131281, 286928, 278743, 278747, 295133, 155872, 131299, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 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, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 148946, 280021, 239064, 288217, 329177, 280027, 288220, 288214, 239070, 288218, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 320998, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 206336, 296450, 148990, 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, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 313027, 280260, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 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, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 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, 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, 196133, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 176311, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 283069, 127424, 299457, 127429, 127431, 127434, 315856, 127440, 176592, 315860, 176597, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 127460, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 226230, 234422, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 234648, 275606, 234650, 275608, 324757, 300189, 324766, 119967, 234653, 324768, 308379, 283805, 242852, 300197, 234661, 283813, 234664, 234657, 275626, 234667, 316596, 308414, 234687, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 275725, 349464, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 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, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 350293, 350295, 309337, 194649, 227418, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 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, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 326638, 277486, 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, 285792, 277601, 203872, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 237409, 229233, 294776, 360317, 294785, 327554, 40840, 294803, 40851, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 237562 ]
71feebb936fe40ffa416c8bee9b21a529d7c7474
ed8b01cebcaefa477f9f80464b32a02997b3b00a
/Tests/LinuxMain.swift
4e8c84a2112fee1468f9b29c14af0928d2b4916c
[ "MIT" ]
permissive
bporter95/LinodeKit
857affddd9cc5253060fdc4baf947e0a8868b30b
d7ae7eff8833fb489768f17e707b9f3d85c17cd9
refs/heads/main
2023-06-18T18:58:12.344792
2021-07-09T20:12:40
2021-07-09T20:12:40
377,972,153
0
0
null
null
null
null
UTF-8
Swift
false
false
120
swift
import XCTest import LinodeKitTests var tests = [XCTestCaseEntry]() tests += LinodeKitTests.allTests() XCTMain(tests)
[ 248320, 45058, 254467, 411140, 222725, 340485, 145938, 35347, 238613, 35352, 192029, 323613, 217120, 159264, 342562, 438820, 224296, 30251, 343599, 199216, 168501, 321591, 162362, 162368, 175173, 339017, 187467, 352334, 332368, 421456, 184406, 327256, 248924, 343655, 345191, 343146, 312943, 126575, 333425, 337010, 338547, 192627, 253046, 346746, 245377, 160899, 317063, 245389, 258709, 330390, 314530, 334504, 181929, 248489, 351406, 315575, 191672, 153274, 240314, 225980, 350909, 222401, 225986, 315585, 223960, 354011, 352992, 317667, 344803, 323818, 329453, 378095, 315124, 194809, 353018, 126210, 319236, 162565, 315140, 208138, 202506, 148237, 136462, 343309, 338193, 365843, 198423, 353560, 347418, 311585, 348961, 342307, 325413, 341798, 254246, 52521, 347444, 354103, 30010, 56638, 345420, 325452, 251215, 339801, 253786, 341854, 253790, 253794, 246117, 211814, 244581, 251241, 316780, 253806, 151920, 240501, 151932, 349584, 327062, 212378, 253342, 178088, 219048, 305586, 235958, 344504, 150970, 225212, 326592, 344515, 324041, 340946, 355282, 338389, 363479, 343519, 319458, 315362, 319462, 351207, 340969, 313324, 350702, 347125, 219129, 342525 ]
61184230d739dad16b27baad5b11e74d811ada29
1afd63462ce37add4fed63a7f4b9f0f373bf3ced
/ios-client/Mosaico/engine/VirtualLabel.swift
6105bd663ec38692c53864f89873074854ca8ad9
[]
no_license
0x106/AstroAR
5e0fabbbcbe3e45c223a3264ea49bbf4a778d6ab
2051ba6f70caef6b62843413cba813cba3aa6274
refs/heads/master
2021-09-27T07:23:10.203332
2018-11-06T22:32:31
2018-11-06T22:32:31
null
0
0
null
null
null
null
UTF-8
Swift
false
false
12,693
swift
// // Card.swift // Nebula // // Created by Jordan Campbell on 15/02/18. // Copyright © 2018 Atlas Innovation. All rights reserved. // import Foundation import ARKit let top = 0 let left = 1 let right = 2 let bottom = 3 class VirtualLabel { var text: String = "" var onTapCallback: (() -> ())? // AR properties var rootNode = Node() var geometry: SCNPlane? var x: Float = 0.0 var y: Float = 0.0 var totalWidth: Float = 0.0 var totalHeight: Float = 0.0 let scale: Float = 0.001 var marginSize: [Float] = [0.0, 0.0, 0.0, 0.0] var paddingSize: [Float] = [0.0, 0.0, 0.0, 0.0] var borderSize: [Float] = [0.0, 0.0, 0.0, 0.0] var border: [CGRect] = [CGRect(), CGRect(), CGRect(), CGRect()] // display properties var cell: CGRect = CGRect() var nucleus: CGRect = CGRect() var image: UIImage? var font: UIFont = UIFont() var font_size: Float = 0.0 var font_weight: Float = 0.0 var color: UIColor = UIColor() var backgroundColor: UIColor = UIColor() var borderColor: [UIColor] = [UIColor(), UIColor(), UIColor(), UIColor()] var cornerRadius: Float = 0.0 var canRender: Bool = true var canDrawOverlay: Bool = true var textAlignment: String = "left" var allow_auto_resize: Bool = true var isButton: Bool = false init(theme: String = "", text: String = "Label") { for idx in 0...3 { self.border[idx] = CGRect(x: 0, y: 0, width: 0, height: 0) } for idx in 0...3 { self.borderColor[idx] = UIColor.white.withAlphaComponent(CGFloat(0.0)) } self.color = UIColor.black.withAlphaComponent(CGFloat(1.0)) self.theme(theme) self.text = text _ = self.render() self.setPivotLocation() self.rootNode.name = UUID().uuidString } func setBorder(_ _colour: UIColor, _ _size: Float, _ _border:Int = -1) { if _border == -1 { self.borderSize = [_size, _size, _size, _size] self.borderColor = [_colour, _colour, _colour, _colour] } else { self.borderSize[_border] = _size self.borderColor[_border] = _colour } } func render() -> Bool { // if the image is / will be drawn then we don't need to render anything if !self.canDrawOverlay {return true} let paragraphStyle = NSMutableParagraphStyle() if self.textAlignment == "left" { paragraphStyle.alignment = .left } if self.textAlignment == "center" { paragraphStyle.alignment = .center } let fontAttrs: [NSAttributedString.Key: Any] = [NSAttributedString.Key.font: self.font as UIFont, NSAttributedString.Key.paragraphStyle: paragraphStyle, NSAttributedString.Key.foregroundColor: self.color] if self.allow_auto_resize { self.resizeToText(fontAttrs) } self.border[top] = CGRect(x: CGFloat(self.marginSize[left]), y: CGFloat(self.marginSize[top]), width: CGFloat(self.cell.width), height: CGFloat(self.borderSize[top])) self.border[left] = CGRect(x: CGFloat(self.marginSize[left]), y: CGFloat(self.marginSize[top]), width: CGFloat(self.borderSize[left]), height: CGFloat(self.cell.height)) self.border[right] = CGRect(x: self.cell.width - CGFloat(self.borderSize[right]), y: CGFloat(self.marginSize[top]), width: CGFloat(self.borderSize[right]), height: CGFloat(self.cell.height)) self.border[bottom] = CGRect(x: CGFloat(self.marginSize[left]), y: self.cell.height - CGFloat(self.borderSize[bottom]), width: CGFloat(self.cell.width), height: CGFloat(self.borderSize[bottom])) let renderer = UIGraphicsImageRenderer(size: CGSize(width: CGFloat(self.totalWidth), height: CGFloat(self.totalHeight))) self.image = renderer.image { [unowned self] context in self.backgroundColor.setFill() context.fill(self.cell) self.borderColor[top].setFill() context.fill(self.border[top]) self.borderColor[left].setFill() context.fill(self.border[left]) self.borderColor[right].setFill() context.fill(self.border[right]) self.borderColor[bottom].setFill() context.fill(self.border[bottom]) if self.textAlignment == "center" { let stringSize = self.text.size(withAttributes: fontAttrs) let drawRect = CGRect(x: CGFloat((self.nucleus.width / 2.0) - (stringSize.width/2.0)), y: CGFloat((self.nucleus.height / 2.0) - (stringSize.height/2.0)), width: CGFloat(stringSize.width), height: CGFloat(stringSize.height)) self.text.draw(with: drawRect, options: .usesLineFragmentOrigin, attributes: fontAttrs, context: nil) } else { self.text.draw(with: self.nucleus, options: .usesLineFragmentOrigin, attributes: fontAttrs, context: nil) } } self.geometry = SCNPlane(width: CGFloat(self.totalWidth * self.scale), height: CGFloat(self.totalHeight * self.scale)) self.geometry?.firstMaterial?.diffuse.contents = self.image self.geometry?.cornerRadius = CGFloat(self.cornerRadius) self.rootNode.geometry = self.geometry self.rootNode.geometry?.firstMaterial?.isDoubleSided = true return true } func shift(camera: ARCamera) { var translation = matrix_identity_float4x4 translation.columns.3.z = -1.0 // Translate 10 cm in front of the camera self.rootNode.simdTransform = matrix_multiply(camera.transform, translation) self.rootNode.eulerAngles = SCNVector3Make(camera.eulerAngles.x, camera.eulerAngles.y, camera.eulerAngles.z + (.pi/2.0)) } private func resizeToText(_ _fontAttrs: [NSAttributedString.Key: Any]) { // get the size of the text let stringSize = self.text.size(withAttributes: _fontAttrs) self.cell = CGRect(x: CGFloat(self.marginSize[left]), y: CGFloat(self.marginSize[bottom]), width: CGFloat(stringSize.width) + CGFloat(self.paddingSize[left]) + CGFloat(self.paddingSize[right]), height: CGFloat(stringSize.height) + CGFloat(self.paddingSize[top]) + CGFloat(self.paddingSize[bottom])) self.nucleus = CGRect(x: CGFloat(self.paddingSize[left]), y: CGFloat(self.paddingSize[bottom]), width: CGFloat(stringSize.width), height: CGFloat(stringSize.height)) self.totalWidth = Float(stringSize.width) + Float(self.paddingSize[left]) + Float(self.paddingSize[right]) + Float(self.marginSize[left]) + Float(self.marginSize[right]) self.totalHeight = Float(stringSize.height) + Float(self.paddingSize[top]) + Float(self.paddingSize[bottom]) + Float(self.marginSize[top]) + Float(self.marginSize[bottom]) } func setFont(_ selectedFont: String, _ size: Float) { self.font = UIFont(name: selectedFont, size: CGFloat(size))! } func setText(text: String) { self.text = text let _ = self.render() } func setPivotLocation(location: PivotLocation = .center ) { let (minBound, maxBound) = self.rootNode.boundingBox var x: Float = 0 var y: Float = 0 switch location { case .center: x = minBound.x + (maxBound.x - minBound.x)/2 y = minBound.y + (maxBound.y - minBound.y)/2 case .topLeft: x = minBound.x y = maxBound.y case .topRight: x = maxBound.x y = maxBound.y case .bottomLeft: x = minBound.x y = minBound.y case .bottomRight: x = maxBound.x y = minBound.y case .leftMid: x = minBound.x y = minBound.y + (maxBound.y - minBound.y)/2 case .rightMid: x = maxBound.x y = minBound.y + (maxBound.y - minBound.y)/2 case .topMid: x = minBound.x + (maxBound.x - minBound.x)/2 y = maxBound.y case .bottomMid: x = minBound.x + (maxBound.x - minBound.x)/2 y = minBound.y } self.rootNode.pivot = SCNMatrix4MakeTranslation( x, -y, 0.0 ) } func click() { if let cb = self.onTapCallback { cb() } } func onTap(callback: @escaping () -> ()) { self.onTapCallback = callback } } extension VirtualLabel { func theme(_ _theme: String) { switch _theme { case "neuromancer": self.backgroundColor = zeroColor //randomColour() self.color = platinum self.setFont("Arial", 100.0) self.textAlignment = "left" case "wintermute": self.backgroundColor = zeroColor self.color = platinum self.setFont("Arial", 60.0) self.textAlignment = "left" self.paddingSize[left] = 100.0 self.paddingSize[right] = 100.0 self.paddingSize[top] = 50.0 self.paddingSize[bottom] = 50.0 case "leaderBoardName": self.backgroundColor = UIColor(rgb: 0x13293D) self.color = platinum self.setFont("Arial", 100.0) self.textAlignment = "left" self.paddingSize[top] = 20.0 self.paddingSize[left] = 20.0 self.paddingSize[right] = 20.0 self.paddingSize[bottom] = 20.0 case "towerLabel": self.backgroundColor = UIColor(rgb: 0x13293D) self.backgroundColor = UIColor(rgb: 0xEE4266) self.color = platinum self.setFont("Arial", 100.0) self.textAlignment = "left" self.paddingSize[top] = 20.0 self.paddingSize[left] = 20.0 self.paddingSize[right] = 20.0 self.paddingSize[bottom] = 20.0 self.cornerRadius = 0.05 case "leaderBoardTitle": self.backgroundColor = zeroColor self.color = platinum self.setFont("Arial", 140.0) self.textAlignment = "left" self.paddingSize[bottom] = 60.0 self.marginSize[bottom] = 40.0 self.borderSize[bottom] = 10.0 self.borderColor[bottom] = UIColor(rgb: 0xCC2936) case "leaderBoardScore": self.backgroundColor = UIColor(rgb: 0x13293D) self.color = platinum self.setFont("Arial", 100.0) self.textAlignment = "left" self.paddingSize[left] = 100.0 self.paddingSize[right] = 20.0 self.paddingSize[top] = 20.0 self.paddingSize[bottom] = 20.0 case Constants.VirtualLabel.button: self.backgroundColor = cgBlue self.color = platinum self.setFont("Arial", 200.0) self.textAlignment = "left" self.cornerRadius = 0.05 self.paddingSize[left] = 100.0 self.paddingSize[right] = 100.0 self.paddingSize[top] = 50.0 self.paddingSize[bottom] = 50.0 self.isButton = true self.rootNode.scale = SCNVector3Make(0.5, 0.5, 0.5) case Constants.VirtualLabel.button_02: self.backgroundColor = zeroColor self.color = platinum self.setFont("Arial", 200.0) self.textAlignment = "left" self.cornerRadius = 0.01 self.paddingSize[left] = 100.0 self.paddingSize[right] = 100.0 self.paddingSize[top] = 50.0 self.paddingSize[bottom] = 50.0 self.borderColor = [platinum, platinum, platinum, platinum] self.borderSize = [10.0, 10.0, 10.0, 10.0] self.isButton = true self.rootNode.scale = SCNVector3Make(0.5, 0.5, 0.5) case "editButton": self.backgroundColor = periwinkle self.color = platinum self.setFont("Arial", 80.0) self.textAlignment = "left" self.cornerRadius = 10.0 self.paddingSize[left] = 75.0 self.paddingSize[right] = 75.0 self.paddingSize[top] = 30.0 self.paddingSize[bottom] = 30.0 self.isButton = true case "playButton": self.backgroundColor = persianGreen self.color = platinum self.setFont("Arial", 80.0) self.textAlignment = "left" self.cornerRadius = 10.0 self.paddingSize[left] = 75.0 self.paddingSize[right] = 75.0 self.paddingSize[top] = 30.0 self.paddingSize[bottom] = 30.0 self.isButton = true default: self.backgroundColor = zeroColor self.color = platinum self.setFont("Arial", 200.0) self.textAlignment = "left" } } } enum PivotLocation { case center case topLeft case topRight case bottomLeft case bottomRight case leftMid case topMid case rightMid case bottomMid }
[ -1 ]
4e4802bff42c8fbf79e39efa377f8b26559974dc
084d04747e61d5175c7a93de326b0dd475a15da2
/PomodoloTimer/EggTimerFile.swift
9de4e6621fd3ee2d160fb0e87b603308713c23ef
[]
no_license
Kentaro-Miki/pomodolo
8c006a96020f493cf3a08bcc7abe99622aa3d49a
760abedc251430e0e5e033181ca165836e717d6c
refs/heads/master
2020-12-04T09:49:57.214769
2020-01-05T05:55:09
2020-01-05T05:55:09
231,717,668
0
0
null
null
null
null
UTF-8
Swift
false
false
2,275
swift
// // EggTimerFile.swift // TestTimer // // Created by 三木健太郎 on 2019/12/19. // Copyright © 2019 三木健太郎. All rights reserved. // import Foundation protocol EggTimerProtocol { func timerRemainingOnTimer(_ timer: EggTimer, timeRemaining: TimeInterval) func timerHasFinished(_ timer: EggTimer) } class EggTimer { var timer: Timer? = nil var startTime: Date? var duration: TimeInterval = 1500 var elapsedTime: TimeInterval = 0 var isStoped: Bool { //なぜこの式でreturnしているのかがわからない return timer == nil && elapsedTime == 0 } var isPaused: Bool { //なぜこの式でreturnしているのかがわからない return timer == nil && elapsedTime > 0 } var delegate: EggTimerProtocol? //タイマーアクションの意味がわからない @objc dynamic func timerAction() { guard let startTime = startTime else { return } elapsedTime = -startTime.timeIntervalSinceNow let secondsRemaining = (duration - elapsedTime).rounded() if secondsRemaining <= 0 { resetTimer() //これ2つ何? delegate?.timerHasFinished(self) } else { delegate?.timerRemainingOnTimer(self, timeRemaining: secondsRemaining) } } func startTimer() { startTime = Date() elapsedTime = 0 timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(timerAction), userInfo: nil, repeats: true) timerAction() } //startTimeの再設定 func resumeTimer() { startTime = Date(timeIntervalSinceNow: -elapsedTime) timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(timerAction), userInfo: nil, repeats: true) timerAction() } func stopTimer() { timer?.invalidate() timer = nil timerAction() } func resetTimer() { timer?.invalidate() timer = nil startTime = nil duration = 1500 elapsedTime = 0 timerAction() } }
[ -1 ]