blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
625
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
47
license_type
stringclasses
2 values
repo_name
stringlengths
5
116
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
643 values
visit_date
timestamp[ns]
revision_date
timestamp[ns]
committer_date
timestamp[ns]
github_id
int64
80.4k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
16 values
gha_event_created_at
timestamp[ns]
gha_created_at
timestamp[ns]
gha_language
stringclasses
85 values
src_encoding
stringclasses
7 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
4
6.44M
extension
stringclasses
17 values
content
stringlengths
4
6.44M
duplicates
sequencelengths
1
9.02k
ef095ad5e5c070309d76ed252017b6b13af9f04a
7b4fd8c6ac00557dd630e1aee75038b4971d94ad
/Example/Pods/SwiftyHelpKit/SwiftyHelpKit/Classes/SHKUtility/SHKUserDefaults.swift
194319d90045ab4db7480d5033b0ecef5050357b
[ "MIT" ]
permissive
anpkmr/SwiftyHelpKit
1f69b7a97e61f0f00063a5d3a34f57a9231366a7
abe9d88ef4027c002bcb0d9fb1dd1f1f7ebe5c33
refs/heads/master
2022-05-17T06:11:42.638055
2022-04-29T15:51:47
2022-04-29T15:51:47
149,101,700
2
2
null
null
null
null
UTF-8
Swift
false
false
2,698
swift
// // CSUserDefaults.swift // Caldersafe // // Created by anoop on 8/7/18. // Copyright © 2018 ios. All rights reserved. // import Foundation import ObjectMapper import CoreLocation class CSUserDefaults : NSObject{ static let sharedDefault = CSUserDefaults()//Singletion object let defaults = UserDefaults.standard//userDefault object /// save userInfo /// /// - Parameter info: userObject func saveUserInfo(info:User?) { guard info == nil else { let JSONString = Mapper().toJSONString(info!, prettyPrint: true) defaults.set(JSONString, forKey: kUDUserInfoKey) defaults.synchronize() return } } /// get UserInfo /// /// - Returns: userObject func getSaveUserInfo() -> User? { let userSecretObject = defaults.value(forKey: kUDUserInfoKey) as? String guard userSecretObject == nil else { var user = User() user = Mapper<User>().map(JSONString: userSecretObject!)! return user } return nil } /// save user pin to userDefaults /// /// - Parameters: /// - loginPin: pin /// - forType: supervisor/operator func savePin(loginPin:String,forType:String){ defaults.set(loginPin, forKey: forType) defaults.synchronize() } func getPin(forType:String)->String?{ return defaults.value(forKey:forType) as? String } func saveModule(name:String){ defaults.set(name, forKey: kUDModuleKey) defaults.synchronize() } func getModule()->String? { return defaults.value(forKey:kUDModuleKey) as? String } func removeModule() { defaults.removeObject(forKey: kUDModuleKey) defaults.synchronize() } func saveUserLocationDetails(location:CLLocation){ defaults.removeObject(forKey: kUDLocationKey) defaults.synchronize() } func getUserLocationDetails()->CLLocation? { return defaults.value(forKey: kUDLocationKey) as? CLLocation } /// remove user info from defaults func removeSavedUser(){ defaults.removeObject(forKey:kUDUserInfoKey) defaults.removeObject(forKey:kUDfirstTimeLoginKey) defaults.removeObject(forKey:"loginPin") defaults.removeObject(forKey:kUDModuleKey) defaults.synchronize() } func isloggedInFirstTime(isLoginFirst:Bool){ defaults.set(isLoginFirst, forKey: "firstTimeLogged") defaults.synchronize() } func getloggedInFirstTime() -> Bool?{ return defaults.value(forKey:"firstTimeLogged") as? Bool } }
[ -1 ]
22910ce95fe531aa7a4e666a240fd1696a7756f4
3e502cc531240a4d2380abaed1e47e0d73dd35d5
/jogabo_friend_picker/ViewController.swift
068968904f6af1ab34fb4ae16ca9cd7723a67702
[]
no_license
gonelf/jogabo-friend-picker-swift
d101defa6ec18ef7e85bef595a722ae43a421816
7d035b129272829edd47b67a9955ce7f8ea4fcd7
refs/heads/master
2020-12-24T17:54:16.008508
2015-01-03T15:50:00
2015-01-03T15:50:00
28,714,779
0
0
null
null
null
null
UTF-8
Swift
false
false
1,997
swift
// // ViewController.swift // jogabo_friend_picker // // Created by Gonçalo Henriques on 02/01/15. // Copyright (c) 2015 Mobigeek Studios. All rights reserved. // import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var findFriendsTableview: UITableView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. navigationController?.navigationBar.barTintColor = UIColor(rgba: COLOR_BAR_BACKGROUND) let titleDict: NSDictionary = [NSForegroundColorAttributeName: UIColor(rgba: COLOR_BAR_TITLE)] navigationController?.navigationBar.titleTextAttributes = titleDict } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } // MARK: - tableview methods func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 1 } func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 207.0 } func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { var sectionHeader = JBFindFriendsSectionHeader() sectionHeader.ButtonContacts.addTarget(self, action: "gotoContacts:", forControlEvents: UIControlEvents.TouchUpInside) return sectionHeader.view } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { var cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Cell") return cell } // MARK: - Segue functions func gotoContacts(sender:AnyObject) { self.navigationController?.performSegueWithIdentifier(JBSEGUE_CONTACTS, sender: nil) } }
[ -1 ]
4ab80a6b3dabeb1569344060401c3e72a3f7e4c7
9fa8e549d2ea19f094778f8fc6e6b296ea4256a3
/ModeAnalysisGUI/MetalRender/Render.swift
52da7e20be67ba1fccd4842271ac52da9333f6bd
[ "MIT" ]
permissive
lizaf999/ModeAnalysis
98171862d201e0c887771316711c5be56a4271b2
eb17d20dc61e90b4e54b971f9fd337a201e9bfe5
refs/heads/master
2020-03-07T08:52:59.363294
2018-06-26T14:02:46
2018-06-26T14:02:46
127,391,376
1
0
null
null
null
null
UTF-8
Swift
false
false
4,205
swift
import Foundation import MetalKit //MARK: - Protocol protocol RenderProtocol { func update() func render(renderEncoder :MTLRenderCommandEncoder) } public func defaultSetup(_ mtkView :MTKView) { if let curView = Render.current.setupView(view: mtkView) { curView.sampleCount = 1 curView.depthStencilPixelFormat = .depth32Float curView.colorPixelFormat = .bgra8Unorm curView.clearColor = MTLClearColorMake(0.5, 0.5, 0.5, 1) //curView.clearColor = MTLClearColorMake(1,1,1, 1) //Compute Shader 利用時はfalse curView.framebufferOnly = false Render.current.camera.setUpDir() } else { assert(false) } } //MARk: - //使い方 //defaultSetupを呼ぶ(Renderのインスタンス不要) //RenderProtocolに適合するオブジェクトを追加する。 //Render.current.cameraはよく使う class Render: NSObject,MTKViewDelegate { //Buffer count static let bufferCount = 3 //camera prop. let defaultCameraFovY: Float = 75.0 let defaultCameraNearZ: Float = 0.1 let defaultCameraFarZ: Float = 100 let camera = Camera(polar: float3(2,0,-Float.pi/2), center: float3(0), up: float3(0,1,0)) //Singleton static let current = Render() private(set) static var canUse = false //View weak var mtkView: MTKView! = nil private let semaphore = DispatchSemaphore(value: Render.bufferCount) private(set) var activeBufferNumber = 0 //Renderer private(set) var device: MTLDevice! private(set) var commandQueue: MTLCommandQueue! private(set) var library: MTLLibrary! //Uniforms var projevtionMatrix: float4x4 = matrix_identity_float4x4 var cameraMatrix: float4x4 = matrix_identity_float4x4 var viewportNear = 0.0 var viewportFar = 1.0 //Objects var renderTargets = [RenderProtocol]() override init() { Render.canUse = false //initialize Metal guard let new_dev = MTLCreateSystemDefaultDevice() else {NSLog("MTLDevice could not be created.");return} device = new_dev commandQueue = device.makeCommandQueue() guard let new_lib = device.makeDefaultLibrary() else {NSLog("MTLLibrary could not be made.");return} library = new_lib Render.canUse = true NSLog("Render initialization succeeded!") } //MARK: - public func setupView(view: MTKView?) -> MTKView? { guard Render.canUse else {return nil} guard view != nil else {return nil} mtkView = view! mtkView.delegate = self mtkView.device = device let aspect = Float(fabs(view!.bounds.size.width/view!.bounds.height)) projevtionMatrix = perspective_fov(fovyDeg: defaultCameraFovY, aspect: aspect, near: defaultCameraNearZ, far: defaultCameraFarZ) return view } //MARK: - MTKViewDelegate func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) { let aspect = Float(fabs(view.bounds.size.width/view.bounds.height)) projevtionMatrix = perspective_fov(fovyDeg: defaultCameraFovY, aspect: aspect, near: defaultCameraNearZ, far: defaultCameraFarZ) } func draw(in view: MTKView) { autoreleasepool{ _ = semaphore.wait(timeout: DispatchTime.distantFuture) let commandBuffer = Render.current.commandQueue.makeCommandBuffer() update() guard let renderDescriptor = mtkView.currentRenderPassDescriptor else{ return } let renderEncoder = (commandBuffer?.makeRenderCommandEncoder(descriptor: renderDescriptor))! renderEncoder.setViewport(MTLViewport( originX: 0, originY: 0, width: Double(mtkView.drawableSize.width), height: Double(mtkView.drawableSize.height), znear: viewportNear, zfar: viewportFar)) render(renderEncoder: renderEncoder) renderEncoder.endEncoding() let block_sema = semaphore commandBuffer?.addCompletedHandler({_ in block_sema.signal() }) commandBuffer?.present(mtkView.currentDrawable!) commandBuffer?.commit() } } //MARK: - private private func update() { renderTargets.forEach {$0.update()} } private func render(renderEncoder: MTLRenderCommandEncoder){ renderTargets.forEach{$0.render(renderEncoder: renderEncoder)} } }
[ -1 ]
fa469986dad891afd8771d9abc9c1460711964d1
0ec125c07f74bc9ad07025b4726152c7b12683c5
/Chapter9/9-3-StampCamera/StampCamera/StampCamera/AppDelegate.swift
5ffc68a036abc09b7ad13c89413922e3b4496293
[]
no_license
jollyjoester/sekai-ichi-uketai-iPhone-App-kaihatsu-no-jyugyou
0fa37521854728b4fb258224701412a1d0f89370
111dd28be4a5cc127ad6a58dcb55d42826d0efd1
refs/heads/master
2021-01-12T05:17:03.023543
2017-01-07T09:52:53
2017-01-07T09:52:53
77,896,529
3
0
null
2017-01-07T09:52:53
2017-01-03T08:05:15
Swift
UTF-8
Swift
false
false
2,390
swift
// // AppDelegate.swift // StampCamera // // Created by SaChico on 2015/12/16. // Copyright © 2015年 Haruyoshi Kuwamura. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? //Stampクラスのインスタンスを格納する配列 var stampArray:[Stamp] = [] //新しいスタンプが追加されたかどうかを判定するフラグ var isNewStampAdded = false func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 294950, 229415, 229417, 237613, 229422, 229426, 237618, 229428, 286774, 319544, 204856, 229432, 286776, 286791, 237640, 278605, 237646, 311375, 163920, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 327814, 131209, 303241, 311436, 303244, 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, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 98756, 278980, 278983, 319945, 278986, 319947, 278990, 278994, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 172550, 303623, 320007, 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, 311911, 189034, 295533, 189039, 189040, 172655, 172656, 352880, 189044, 172660, 295538, 287349, 287355, 287360, 295553, 287365, 295557, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 287381, 311957, 221850, 287386, 230045, 287390, 295583, 303773, 172705, 287394, 164509, 172702, 172707, 287398, 303780, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 279231, 328384, 287423, 287427, 312006, 107212, 172748, 287436, 172751, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 279267, 312035, 295654, 279272, 312048, 312050, 230131, 205564, 303871, 230146, 295685, 230154, 33548, 312077, 295695, 369433, 230169, 295707, 328476, 295710, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 287569, 303959, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 304007, 320391, 213895, 304009, 304011, 230284, 304013, 213902, 279438, 295822, 189329, 189331, 304019, 279445, 58262, 304023, 279452, 234648, 410526, 279461, 304042, 213931, 304055, 230327, 287675, 304063, 238528, 304065, 189378, 295873, 156612, 213954, 213963, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 320505, 312321, 295945, 197645, 230413, 295949, 320528, 140312, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 132165, 336964, 205895, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 205931, 164973, 205934, 312432, 279669, 337018, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 165035, 337067, 165038, 238766, 238770, 304311, 230592, 279750, 312518, 230600, 230607, 148690, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 279788, 320748, 279790, 320771, 312585, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 296264, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 279929, 181631, 312711, 312712, 296331, 288140, 230800, 288144, 304533, 288154, 337306, 288160, 288162, 279975, 304555, 370092, 279983, 173488, 288176, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 288208, 230865, 288210, 370130, 288212, 280021, 288214, 148946, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 321022, 206336, 402942, 296446, 296450, 230916, 214535, 230919, 370187, 304651, 222752, 108066, 296488, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 181854, 403039, 370272, 280158, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 321200, 337585, 296634, 296637, 280260, 280264, 206536, 206541, 206543, 280276, 313044, 321239, 280283, 18140, 288478, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 288510, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 321336, 296767, 288576, 345921, 304968, 280393, 194130, 280402, 313176, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 247688, 280464, 124817, 239510, 280473, 124827, 214940, 247709, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 313340, 288764, 239612, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 354390, 288855, 288859, 280669, 280671, 149599, 149601, 321634, 223327, 149603, 329830, 280681, 313451, 280687, 215154, 280691, 313458, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 321717, 280764, 280769, 280771, 280774, 321740, 280783, 280786, 280793, 280796, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280825, 280827, 280830, 280831, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 240011, 199051, 240017, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 223749, 305668, 281095, 223752, 338440, 150025, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 281163, 281179, 199262, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 297594, 281210, 158347, 133776, 117398, 314007, 289436, 174754, 330404, 133801, 174764, 314033, 240309, 133817, 314045, 314047, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322318, 281361, 281372, 322341, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 240535, 289687, 297883, 289694, 289696, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 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, 289991, 306377, 249045, 363742, 363745, 298216, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 298292, 257334, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 290161, 216436, 306549, 298358, 306552, 306555, 314747, 298365, 290171, 290174, 224641, 281987, 314756, 265604, 281990, 298372, 298377, 314763, 142733, 298381, 224657, 306581, 314779, 314785, 282025, 314793, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 52959, 282337, 216801, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 282402, 315174, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 307009, 413506, 241475, 307012, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 241556, 298901, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 241640, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299006, 282623, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 217188, 299109, 307303, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 184503, 307386, 258235, 307388, 176316, 307390, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 176435, 315701, 307510, 332086, 151864, 307512, 168245, 307515, 282942, 307518, 151874, 282947, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 299388, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 127413, 291254, 194660, 127417, 291260, 127421, 127424, 127429, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 242152, 291305, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 234010, 135707, 135710, 242206, 291361, 242220, 291378, 152118, 234038, 70213, 111193, 242275, 299620, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 225948, 373404, 135839, 299680, 225954, 135844, 299684, 242343, 209576, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 226002, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 209665, 234242, 299778, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 242450, 234258, 242452, 201496, 283421, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 283452, 160572, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 349027, 242530, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 234364, 291711, 234368, 234370, 291714, 291716, 234373, 316294, 226182, 234375, 308105, 226185, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324508, 291742, 234401, 291748, 234405, 291750, 234407, 324520, 324518, 234410, 291754, 226220, 291756, 324522, 324527, 234414, 234417, 201650, 324531, 291760, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 242623, 324544, 324546, 226239, 234434, 226245, 234437, 324548, 234439, 234443, 291788, 193486, 234446, 193488, 234449, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234478, 316400, 234481, 234484, 234485, 324599, 234487, 234493, 234496, 316416, 234501, 308231, 234504, 234507, 234515, 300054, 234519, 234520, 316439, 234523, 234528, 300066, 234532, 234535, 234537, 234540, 234543, 275508, 234549, 300085, 300088, 234558, 316479, 234561, 308291, 316483, 234563, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 242777, 275545, 234595, 234597, 300133, 300139, 234605, 160879, 234607, 275569, 234610, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 308373, 234647, 275608, 324757, 234650, 308379, 275606, 283805, 234653, 300189, 119967, 324766, 324768, 234657, 242852, 283813, 234661, 300197, 275626, 234667, 316596, 300223, 234687, 316610, 300226, 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, 300284, 275710, 300287, 300289, 300292, 300294, 275719, 177419, 300299, 283917, 242957, 275725, 177424, 349464, 283939, 259367, 283951, 300344, 226617, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 218464, 292197, 316774, 243046, 218473, 324978, 136562, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 259567, 308720, 300527, 226802, 316917, 308727, 292343, 300537, 316933, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 284215, 194103, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 292433, 284243, 276052, 284245, 300628, 284247, 317015, 235097, 243290, 284251, 276053, 284253, 300638, 284255, 284249, 243293, 284258, 292452, 177766, 284263, 292454, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292479, 284290, 325250, 276098, 292485, 284292, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 317098, 284331, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 358089, 284362, 276170, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 284386, 358114, 358116, 276197, 317158, 358119, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 186151, 358183, 276268, 194351, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 284564, 358292, 284566, 317332, 350106, 284572, 276386, 284579, 276388, 292776, 284585, 358312, 276395, 292784, 276402, 161718, 358326, 276410, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 301015, 358360, 301017, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 317456, 276496, 317458, 243733, 317468, 243740, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 276539, 235581, 178238, 325692, 284739, 222676, 350293, 350295, 309337, 227418, 194654, 227423, 350302, 178273, 227426, 309346, 309348, 350308, 227430, 276583, 309350, 350313, 309352, 301163, 350316, 309354, 276590, 292968, 227440, 350321, 284786, 276586, 276595, 350325, 350328, 292985, 301178, 292989, 301185, 292993, 350339, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 153765, 284837, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 276685, 309455, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 317674, 243948, 194801, 227571, 309494, 243960, 227583, 276735, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 276766, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 276917, 293304, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 121352, 236043, 317963, 342541, 55822, 113167, 317971, 309779, 309781, 55837, 227877, 227879, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 318020, 301636, 301639, 285265, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 285357, 318128, 277170, 293555, 154292, 277173, 318132, 342707, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 56041, 285417, 56043, 277232, 228081, 56059, 310015, 310020, 310029, 228113, 285459, 277273, 326430, 228128, 228135, 318248, 277291, 318253, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 277368, 15224, 236408, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 326638, 277486, 318450, 293877, 285686, 302073, 121850, 244731, 293882, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 293960, 277577, 277583, 203857, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 203872, 277601, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 302205, 392326, 285831, 302218, 285835, 294026, 384148, 162964, 187542, 302231, 302233, 285852, 302237, 285854, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 294072, 318651, 277695, 318657, 302275, 130244, 302277, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 228617, 138505, 318742, 204067, 130345, 277801, 113964, 277804, 285997, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 277832, 277836, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 277857, 277860, 302436, 294246, 327015, 277864, 327017, 351594, 310632, 277869, 277872, 351607, 277880, 310648, 310651, 277884, 277888, 310657, 310659, 351619, 277892, 327046, 294276, 253320, 277894, 310665, 277898, 318858, 277903, 310672, 277905, 351633, 277908, 277917, 310689, 277921, 130468, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 277947, 310715, 277950, 228799, 277953, 64966, 245191, 163272, 302534, 310727, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 286169, 228825, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 286248, 40488, 294439, 40491, 294440, 294443, 294445, 310831, 40499, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 400976, 212560, 228944, 40533, 40537, 40539, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40552, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 319171, 302789, 294599, 278216, 302793, 294601, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 302852, 278277, 302854, 311048, 294664, 319243, 311053, 302862, 294682, 278306, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 360317, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
45eb4ae9b8b6761bb0b1f20c4d856046215ec15c
6b8563318641108a2d00ff27449dc88c90c6a8d7
/LazyManCore/Models/Schedules/MLBScheduleResponse.swift
6fc5998add9160654d75c8950cc1feed6534f81e
[ "MIT" ]
permissive
inickt/LazyMan-iOS
a5bc7fd7a32f4bde11e53cd19c2194d77f1918f3
83a13a400ed486f7de9cd9f852bedad3857266da
refs/heads/master
2022-01-25T17:04:18.178938
2022-01-09T04:55:33
2022-01-09T04:55:42
103,872,449
81
19
MIT
2021-08-04T03:27:34
2017-09-18T00:22:50
Swift
UTF-8
Swift
false
false
1,964
swift
// // MLBScheduleResponse.swift // LazyManCore // // Created by Nick Thompson on 3/7/20. // import Foundation struct MLBScheduleResponse: Codable { let totalItems: Int let totalEvents: Int let totalGames: Int let totalGamesInProgress: Int let dates: [DateResponse] struct DateResponse: Codable { let date: String let totalItems: Int let totalEvents: Int let totalGames: Int let totalGamesInProgress: Int let games: [GameResponse] } struct GameResponse: Codable { let gamePk: Int let link: String let gameDate: Date let status: SharedScheduleResponse.GameStatusResponse let teams: SharedScheduleResponse.TeamsResponse let linescore: LinescoreResponse? let content: ContentResponse } struct ContentResponse: Codable { let link: String let media: MediaResponse? } struct MediaResponse: Codable { let epg: [EpgResponse]? let epgAlternate: [EpgAlternateResponse]? } struct EpgResponse: Codable { let title: String let items: [EpgItemResponse] } struct EpgAlternateResponse: Codable { let title: String let items: [EpgAlternateItemResponse] } struct EpgItemResponse: Codable { let mediaFeedType: String? let callLetters: String? let feedName: String? let id: Int let playbacks: [PlaybackResponse]? } struct EpgAlternateItemResponse: Codable { let playbacks: [PlaybackResponse]? } struct PlaybackResponse: Codable { let name: String let width: String? let height: String? let url: String } struct LinescoreResponse: Codable { let currentInning: Int? let currentInningOrdinal: String? let inningState: String? let inningHalf: String? let isTopInning: Bool? } }
[ -1 ]
c094ae6ff14426e333980e09b0d9ce3f14d1f312
34a2b3ff7d1c1a8ca5def850e94a96d227c9586e
/SearchMovies/SearchMovies/app-modules/filter/filterResult/Iteractor/FilterResultIteractor.swift
368c414566cbff37eaaa084451854c9dd197eda1
[]
no_license
lviana29/ios-recruiting-brazil
e4ee9d24dd74d6983252f1c8808e22acf67f2524
21988dd553bfd5c3e4fd6da14d694f7a01027277
refs/heads/master
2020-07-01T09:58:26.624894
2019-08-11T12:45:23
2019-08-11T12:45:23
201,136,832
0
0
null
2019-08-07T22:30:17
2019-08-07T22:30:17
null
UTF-8
Swift
false
false
319
swift
// // FilterResultIteractor.swift // SearchMovies // // Created by Leonardo Viana on 10/08/19. // Copyright © 2019 Leonardo. All rights reserved. // import Foundation class FilterResultIteractor: PresenterToFilterResultIteractorProtocol { var presenter: IteractorToFilterResultPresenterProtocol? }
[ -1 ]
d272908bcc13b6dd49bcf19262c5303eae212b3c
8959a23a2a5fd1fdb63f90bf0535f99a8a9b3da8
/BaseSwift/Sources/BaseSwift/Other.swift
830b42239bfeca06e3292aeaf894906f3aad8e2f
[]
no_license
hoanghung3249/BaseSwift
9c0b55f2437828d94adee237d97e3132e0fcc7fa
b99fcf08b762276400cf764cdb3f77c3421e629a
refs/heads/main
2023-06-25T16:27:24.352139
2021-08-01T10:29:27
2021-08-01T10:29:27
369,778,435
0
0
null
null
null
null
UTF-8
Swift
false
false
5,359
swift
// // File.swift // // // Created by HOANGHUNG on 5/22/21. // import Foundation #if canImport(UIKit) && os(iOS) import UIKit public protocol Reusable { static var reuseID: String {get} } extension Reusable { public static var reuseID: String { return String(describing: self) } } extension UITableViewCell: Reusable {} extension UICollectionViewCell: Reusable {} extension UIViewController: Reusable {} public extension UITableView { /// Register a UITableViewCell which using a nib file /// /// - Parameter cell: Type of UITableViewCell class func registerNib<T: UITableViewCell>(forCell cell: T.Type) { register(UINib(nibName: T.reuseID, bundle: nil), forCellReuseIdentifier: T.reuseID) } /// Register a UITableViewCell which only using a class file /// /// - Parameter cell: Type of UITableViewCell class func registerClass<T: UITableViewCell>(forCell cell: T.Type) { register(T.self, forCellReuseIdentifier: T.reuseID) } func dequeueReusableCell<T>(ofType cellType: T.Type = T.self, at indexPath: IndexPath) -> T where T: UITableViewCell { guard let cell = dequeueReusableCell(withIdentifier: cellType.reuseID, for: indexPath) as? T else { fatalError() } return cell } func dequeueReusableCell<T>(ofType cellType: T.Type = T.self) -> T where T: UITableViewCell { guard let cell = dequeueReusableCell(withIdentifier: cellType.reuseID) as? T else { fatalError() } return cell } } public extension UICollectionView { /// Register a UICollectionViewCell which using a nib file /// /// - Parameter cell: Type of UICollectionViewCell class func registerNib<T: UICollectionViewCell>(forCell cell: T.Type) { register(UINib(nibName: T.reuseID, bundle: nil), forCellWithReuseIdentifier: T.reuseID) } /// Register a UICollectionViewCell which only using a class file /// /// - Parameter cell: Type of UICollectionViewCell class func registerClass<T: UICollectionViewCell>(forCell cell: T.Type) { register(T.self, forCellWithReuseIdentifier: T.reuseID) } func dequeueReusableCell<T>(ofType cellType: T.Type = T.self, at indexPath: IndexPath) -> T where T: UICollectionViewCell { guard let cell = dequeueReusableCell(withReuseIdentifier: cellType.reuseID, for: indexPath) as? T else { fatalError() } return cell } } public extension NSObject { var className: String { return String(describing: type(of: self)) } class var className: String { return String(describing: self) } } public extension UINib { static func instantiate<T: UIView>(_ type: T.Type) -> UINib { return UINib.init(nibName: type.className, bundle: .main) } static func nibView<T: UIView>(_ type: T.Type) -> T { let nib = UINib.instantiate(type) return nib.instantiate(withOwner: type, options: nil).first as! T } } public extension UIApplication { static var appVersion: String? { return Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String } } public extension UILabel { func textWidth() -> CGFloat { return UILabel.textWidth(label: self) } class func textWidth(label: UILabel) -> CGFloat { return textWidth(label: label, text: label.text!) } class func textWidth(label: UILabel, text: String) -> CGFloat { return textWidth(font: label.font, text: text) } class func textWidth(font: UIFont, text: String) -> CGFloat { let myText = text as NSString let rect = CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude) let labelSize = myText.boundingRect(with: rect, options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: font], context: nil) return ceil(labelSize.width) } } public extension Array { /// Get or set an element at the specified index if it is within bounds, otherwise nil. subscript (safe index: Index?) -> Element? { get { guard let index = index else { return nil } var i = self.startIndex while i != self.endIndex { if i == index { return self[index] } i = self.index(after: i) } return nil } set(newValue) { guard let index = index, let newValue = newValue else { return } var i = self.startIndex while i != self.endIndex { if i == index { self[index] = newValue } i = self.index(after: i) } } } } public extension URL { func params() -> [String:Any] { var dict = [String:Any]() if let components = URLComponents(url: self, resolvingAgainstBaseURL: false) { if let queryItems = components.queryItems { for item in queryItems { dict[item.name] = item.value! } } return dict } else { return [:] } } } #endif
[ -1 ]
5c759b41e2e073e79afee3f03e9c15b6c5552aa7
3f9b7031a93ab9b7085e2aa0bee9d925c943312b
/animals-app/animals_appApp.swift
9159e38f8cd44de9ea1234f784f45ae4ae445765
[]
no_license
KyleJSh/animals-app
3f52efddcadf440d4ce7b98a63186d770eb65d38
00b0c68b82f739b96160d4c607c969622039e026
refs/heads/main
2023-03-04T20:24:13.304578
2021-02-19T07:32:19
2021-02-19T07:32:19
335,832,100
0
0
null
null
null
null
UTF-8
Swift
false
false
242
swift
// // animals_appApp.swift // animals-app // // Created by Kyle Sherrington on 2021-02-03. // import SwiftUI @main struct animals_appApp: App { var body: some Scene { WindowGroup { ContentView() } } }
[ 388164, 345189, 208350, 208329, 343134 ]
552a6d7e76e9e61128d7c4eadc5850fad55d99fd
dc8c3ccd1213bd6dc908bd7377aeb95085379f99
/Articles/ViewModel/ArticlesViewModel.swift
7e16b69c4ec34a649776a6c0bd6053ad9ec8543c
[]
no_license
rahulsri009/Articles
81f2ddfe6e764405928e7c72e2b0cb11f76d24d0
d546018d8577f26185c057fada0a79b7b704bdcb
refs/heads/master
2022-10-18T12:21:11.515961
2020-06-18T16:46:38
2020-06-18T16:46:38
272,658,004
0
0
null
null
null
null
UTF-8
Swift
false
false
4,325
swift
// // ArticlesViewModel.swift // Articles // // Created by Rahul on 17/06/20. // Copyright © 2020 Articles. All rights reserved. // import UIKit enum ArticleTableViewType { case loading case articleCell(model: ArticleTableViewModel) } protocol ReloadDelegate: class { func reload() } class ArticlesViewModel: NSObject { var articlesDataSource:[ArticleTableViewType] = [] var loadingDataSource:ArticleTableViewType = ArticleTableViewType.loading let networkManager:NetworkManager = NetworkManager() weak var reloadDelegate: ReloadDelegate? var nextPage: Int = 1 var limit: Int = 10 var articlesFetching: Bool = false var fetchNext: Bool = true private func getArticles() { articlesFetching = true networkManager.request(with: RequestEndPoint.getAtricles(page: nextPage, limit: limit), modelType: [Article].self) { (response, error) in if let articles:[Article] = response { self.nextPage += 1 if articles.count > 0 { self.fetchNext = true self.prepareArticlesDataSource(articles: articles) } else { self.fetchNext = false } self.reloadDelegate?.reload() self.articlesFetching = false } else { print(error ?? "Error while requesting getAtricles") } } } private func prepareArticlesDataSource(articles: [Article]) { for article in articles { let image = article.media.count > 0 ? article.media[0].image : "" let title = article.media.count > 0 ? article.media[0].title : "" let url = article.media.count > 0 ? article.media[0].url : "" let name = article.user.count > 0 ? article.user[0].name : "" let avatar = article.user.count > 0 ? article.user[0].avatar : "" let lastname = article.user.count > 0 ? article.user[0].lastname : "" let designation = article.user.count > 0 ? article.user[0].designation : "" let articleModel = ArticleTableModel(createdAt: article.createdAt, content: article.content, comments: article.comments, likes: article.likes, image: image, title: title, url: url, name: name, avatar: avatar, lastname: lastname, designation: designation) articlesDataSource.append(.articleCell(model: ArticleTableViewModel(dataModel: articleModel))) } } private func cellForArticle(tableView: UITableView, viewModel: ArticleTableViewModel) -> ArticleTableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: ArticleTableViewCell.reuseIdentifier) as! ArticleTableViewCell cell.prepareCell(with: viewModel) return cell } private func cellForLoader(tableView: UITableView) -> LoadingTableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: LoadingTableViewCell.reuseIdentifier) as! LoadingTableViewCell return cell } } extension ArticlesViewModel: UITableViewDataSource, UITableViewDelegate { func numberOfSections(in tableView: UITableView) -> Int { return fetchNext ? 2 : 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 0 { return articlesDataSource.count } else { return 1 } } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0, case let ArticleTableViewType.articleCell(model) = articlesDataSource[indexPath.row] { return cellForArticle(tableView: tableView, viewModel: model) } else { return cellForLoader(tableView: tableView) } } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { if indexPath.section == 0 { return UITableView.automaticDimension } else { return 200 } } func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { if indexPath.section == 1, !articlesFetching, fetchNext { getArticles() } } }
[ -1 ]
c897bc4dc78c9abae5f093dc68de1cfe7018ece2
25be739cd76b1e44d24720d4b7baa9951063938b
/Countdown/Extensions/URL+Extensions.swift
18f1721731d60dfd3b5ecd7c9e3263aeba31430c
[ "MIT" ]
permissive
Codezerker/Countdown
c7fa47deb3f270bd9d2b385eb7752bfc42dc06d5
5db3ba015ed6b09344f62574c2ba8f4789aaacfe
refs/heads/master
2021-05-06T01:37:57.770632
2018-11-14T06:53:58
2018-11-14T06:53:58
114,449,816
31
3
MIT
2018-01-14T07:37:27
2017-12-16T09:43:44
Swift
UTF-8
Swift
false
false
996
swift
// // URL+Extensions.swift // Countdown // // Created by Yan Li on 17/12/17. // Copyright © 2017 Codezerker. All rights reserved. // import Foundation extension URL { static var prefetchingPropertyKeys: [URLResourceKey] { return [ .isDirectoryKey, .fileSizeKey, .localizedNameKey, .parentDirectoryURLKey, ] } var isDirectory: Bool { guard let values = try? resourceValues(forKeys: [.isDirectoryKey]), let isDirectory = values.isDirectory else { return false } return isDirectory } var fileSize: Int? { return (try? resourceValues(forKeys: [.fileSizeKey]))?.fileSize } var localizedName: String? { return (try? resourceValues(forKeys: [.localizedNameKey]))?.localizedName } var parentDirectory: URL? { return (try? resourceValues(forKeys: [.parentDirectoryURLKey]))?.parentDirectory } }
[ -1 ]
99beeda38d302069aa30082869d45e1a59a75d35
9822fe1eb543c6ac29b12a972a2d7e0981dba4d2
/The IOS Code/Picky Micky/Controllers/ViewController.swift
02d51a6d5d3789bd5f5476e079d18619683c9c1b
[]
no_license
malhajar17/PickI
e95e10a68a8e66ac49a8c2433ada74d8b0df649f
8386961dbc73df1c1bdfb52c099b7e171beb8545
refs/heads/master
2020-04-14T20:21:16.867841
2019-10-11T14:28:00
2019-10-11T14:28:00
164,090,884
0
0
null
null
null
null
UTF-8
Swift
false
false
4,500
swift
// // ViewController.swift // Picky Micky // // Created by Mohamed Alhajar on 10/13/18. // Copyright © 2018 Mohamed Alhajar. All rights reserved. // import UIKit class ViewController: UIViewController,UsersDataSourceDelegate,UITextFieldDelegate { var UsersArray : [User] = [] let UsersViewdDataSource = UsersDataSource() //Variables to declare @IBOutlet weak var UsernameText: UITextField! @IBOutlet weak var PasswordText: UITextField! override func viewDidLoad() { self.UsersViewdDataSource.delegate = self super.viewDidLoad() self.UsernameText.delegate = self as! UITextFieldDelegate self.PasswordText.delegate = self as! UITextFieldDelegate } func textFieldShouldReturn(_ textField: UITextField) -> Bool { self.view.endEditing(true) return false } override func viewWillAppear(_ animated: Bool) { self.UsersViewdDataSource.loadUsersList() } func UsersListLoaded(UserList: [User]) { self.UsersArray = UserList print(UsersArray) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } //Login Function @IBAction func Login(_ sender: Any) { let storyBoard = UIStoryboard(name: "Main" , bundle: nil) print(UsersArray) // First Function Searches for the occurnece of the username and password and checks if its true if(SearchInUser(UserName: UsernameText?.text, Password: PasswordText?.text) == 2) { //Case : The user and the password are correct and its his first time /* Create the transition to the correct view controller */ let AfterLoginOne = storyBoard.instantiateViewController(withIdentifier:"AfterLoginOne")as! AfterLoginOneViewController // Setting the Variables of the new view controller AfterLoginOne.UsersArray = UsersArray AfterLoginOne.UserName = SearchInUserReturnUser(UserName: UsernameText?.text).Username self.present(AfterLoginOne, animated:true, completion:nil) /* End of First Transition to view controller */ } if(SearchInUser(UserName: UsernameText?.text, Password: PasswordText?.text) == 0) { let alert = UIAlertController(title: "Error", message:"Wrong Username or password" , preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in switch action.style{ case .default: print("default") case .cancel: print("cancel") case .destructive: print("destructive") }})) self.present(alert, animated: true, completion: nil) } else { let AfterLoginTwo = storyBoard.instantiateViewController(withIdentifier:"MainView")as! MainViewController AfterLoginTwo.UsersArray = UsersArray AfterLoginTwo.UserName = UsernameText.text self.present(AfterLoginTwo, animated:true, completion:nil) } } //Function to check if the username and password and Did login are existing func SearchInUser(UserName:String? , Password:String?)->Int { for user in UsersArray { print(user) if(user.Username == UserName) { if(user.Password == Password) { if(user.DidLogin == "1") { return 1 } else { return 2 } } } } return 0 } func SearchInUserReturnUser(UserName:String?)->User { let EmptyUser = User(Email: "-1", FirstName: "-1",ID: "-1", LastName: "-1",Username: "-1", Password: "-1",FollowingNumber: "-1", FollowersNumber: "-1",NumberOfPosts: "-1", Celebrity: "-1",DidLogin : "-1") for user in UsersArray { if(user.Username == UserName) { return user } } return EmptyUser } }
[ -1 ]
2bb1995733a3f2e695503880e6974d8522db97cc
82b7b9f0efa4772ac89c52b7be5237776779a237
/Services/WeatherService.swift
482141d329f0b0cd36951d7b9fb4c18e1432dbc2
[]
no_license
davidmoreland/MyWeather-MyWay
c1c7a36cd4b19d21adc2c6bf584130ee9fead132
974ff6b9711d0e3155cf9253b6e549210b5e0c8f
refs/heads/main
2023-03-13T14:35:42.211704
2021-03-02T01:48:09
2021-03-02T01:48:09
343,611,758
0
0
null
null
null
null
UTF-8
Swift
false
false
1,005
swift
// // WeatherService.swift // My Weather My Way // // Created by David Moreland on 3/1/21. // import Foundation class WeatherService { func getWeather(city: String, completion: @escaping (BasicWeather?) ->()) { guard let url = URL(string: "http://api.openweathermap.org/data/2.5/weather?q=\(city)&appid=5d0ddacf3fc0eaa1cff53c14d2dd1886&units=imperial") else { completion(nil) return } URLSession.shared.dataTask(with: url) {data, response, error in guard let data = data, error == nil else { completion(nil) return } let weatherResponse = try? JSONDecoder().decode(WeatherData.self, from: data) if let weatherResponse = weatherResponse { let weather = weatherResponse.main completion(weather) } else { completion(nil) } }.resume() } }
[ -1 ]
cece08b4d35d8f2d14aac863009480d981f38b67
aae04b110ff280600f53072dc2e3cec5c8c9a845
/Sources/CoreDataJsonParser/JsonDecoder/Private/PropertyJsonDecoder/NSRelationshipDescription+JsonDecoder.swift
12dff224fce9fc3f7d3ed56fe9b0395a5f5b5606
[]
no_license
belozierov/TestFramework
fbe4e8120eae7d583fd7d8b346a7dcd0c510e9fd
f7f642f28cae39dd48752e2898a75323042672ae
refs/heads/master
2020-07-31T01:38:15.360771
2019-09-26T10:04:53
2019-09-26T10:04:53
210,436,844
0
0
null
null
null
null
UTF-8
Swift
false
false
1,441
swift
// // NSRelationshipDescription+JsonDecoder.swift // CoreDataJsonParser // // Created by Alex Belozierov on 9/4/19. // Copyright © 2019 Alex Belozierov. All rights reserved. // import CoreData extension NSRelationshipDescription { var sharedPropertyModel: PropertyModel? { guard let relation = sharedPropertyModelRelation else { return nil } return PropertyModel(property: .relation(relation), jsonPath: jsonPath) } var sharedPropertyModelRelation: PropertyModel.Relation? { guard let model = relationModel else { return nil } return PropertyModel.Relation(entityDecoder: .storage, relationModel: model) } var relationModel: RelationModel? { guard let deleteRule = self.deleteRule.rule, let entity = destinationEntity else { return nil } return RelationModel(entity: entity, relationType: relationType, deleteRule: deleteRule, isOptional: isOptional) } private var relationType: RelationModel.RelationType { isToMany ? .toMany(isOrdered: isOrdered) : .toOne } } extension NSDeleteRule { fileprivate var rule: RelationModel.DeleteRule? { switch self { case .cascadeDeleteRule: return .cascade case .denyDeleteRule: return .deny case .noActionDeleteRule: return .noAction case .nullifyDeleteRule: return .nullify @unknown default: return nil } } }
[ -1 ]
37d3f24ab80d1c83d202dd592e87a1da8bcbafca
a9071ad8a7b0b9b1922178e257b7b87c8dee12f8
/ManagementCollection/ViewController.swift
e5eff70bb5a6e773f8c7a39c4709e9bdb83d1c77
[]
no_license
bacdk/StudentApp
5eb6cca3889a3710e647c6773560dc1a5c54b3e3
8a5c4d0bec99006e6026e44af709178696abaa07
refs/heads/master
2021-01-20T16:27:59.746729
2017-05-10T08:56:50
2017-05-10T08:56:50
90,842,845
0
0
null
null
null
null
UTF-8
Swift
false
false
517
swift
// // ViewController.swift // ManagementCollection // // Created by Cntt20 on 5/10/17. // Copyright © 2017 Dau Khac Bac. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ 293888, 279041, 279046, 277512, 215562, 294411, 275466, 278543, 281107, 279064, 281118, 284192, 197664, 317473, 284197, 289318, 296487, 286249, 296489, 304174, 309807, 300086, 286775, 279096, 234551, 300089, 234043, 288827, 238653, 226878, 40505, 288321, 286786, 129604, 301637, 226887, 293961, 284236, 286796, 278606, 284239, 284240, 158285, 284242, 292435, 226896, 212561, 300629, 276054, 307288, 237655, 282311, 212573, 40545, 200802, 309347, 309349, 284261, 306791, 309351, 309353, 286314, 311913, 281703, 296042, 164974, 307311, 281202, 284275, 314996, 277108, 300149, 276087, 234619, 284287, 284289, 276612, 280710, 284298, 303242, 278157, 311437, 226447, 234641, 349332, 117399, 280219, 299165, 284317, 282270, 285855, 228000, 295586, 282275, 284361, 278693, 287399, 284328, 100521, 313007, 284336, 277171, 307379, 284341, 286390, 300727, 282301, 283839, 277696, 285377, 280770, 227523, 302788, 228551, 294600, 279751, 280775, 279754, 230604, 298189, 302286, 313550, 230608, 229585, 282320, 276686, 307410, 189655, 302295, 226009, 282329, 363743, 282338, 298211, 301284, 284391, 228585, 282346, 358127, 312049, 286963, 282357, 280821, 120054, 226038, 234232, 280826, 286965, 358139, 282365, 286462, 282368, 280832, 230147, 358147, 226055, 282377, 299786, 312586, 300817, 282389, 282393, 329499, 228127, 315170, 282403, 281380, 304933, 233767, 283433, 130346, 282411, 293682, 159541, 285495, 282426, 307516, 283453, 289596, 279360, 289088, 293700, 238920, 234829, 287055, 296272, 307029, 241499, 308064, 227688, 313706, 290303, 306540, 293742, 299374, 162672, 199024, 276849, 280947, 292730, 207738, 333179, 303998, 290175, 275842, 224643, 183173, 304008, 324491, 304012, 304015, 300432, 226705, 310673, 277406, 285087, 234402, 289187, 284580, 288165, 284586, 144811, 276396, 286126, 277935, 324528, 230323, 282548, 282035, 292277, 296374, 230328, 130487, 234423, 277432, 278968, 293308, 278973, 295874, 299973, 165832, 306633, 288205, 286158, 280015, 310734, 301016, 163289, 294877, 280031, 286175, 234465, 279011, 168936, 294889, 298989, 183278, 277487, 231405, 282095, 227315, 302580, 310773, 296436, 281078, 290299, 233980, 287231 ]
c3f240af37950614a1e1f0f5a2b457dc3d126549
efd046d378e311a9af44854dd760c75551f14bc6
/Example/iShowcaseExample/ViewController.swift
78dd23022445ddeef39e6b934903595b030d606c
[ "MIT" ]
permissive
2inqui/iShowcase
e3e2152d12f5c88dd781d328eab92b39bb828ed2
db4a2c39c8354684d845175972af057a828d11b9
refs/heads/master
2021-01-17T07:24:44.923505
2016-09-13T23:54:51
2016-09-13T23:54:51
68,156,861
0
0
null
2016-09-13T23:50:39
2016-09-13T23:50:38
null
UTF-8
Swift
false
false
5,049
swift
// // ViewController.swift // iShowcaseExample // // Created by Rahul Iyer on 14/10/15. // Copyright © 2015 rahuliyer. All rights reserved. // import UIKit import iShowcase class ViewController: UIViewController, UITextFieldDelegate, UITableViewDelegate, UITableViewDataSource, iShowcaseDelegate { @IBOutlet weak var tableView: UITableView! @IBOutlet weak var backgroundColor: UITextField! @IBOutlet weak var titleColor: UITextField! @IBOutlet weak var detailsColor: UITextField! @IBOutlet weak var highlightColor: UITextField! let tableData = ["Item 1", "Item 2", "Item 3", "Item 4", "Item 5"] var showcase: iShowcase! var custom: Bool = false var multiple: Bool = false override func viewDidLoad() { super.viewDidLoad() setupShowcase() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } override func willAnimateRotationToInterfaceOrientation(toInterfaceOrientation: UIInterfaceOrientation, duration: NSTimeInterval) { UIView.animateWithDuration(duration) { if UIDevice.currentDevice().userInterfaceIdiom == .Pad { if let showcase = self.showcase { showcase.setNeedsLayout() // Explicit calling needed for iPad } } } } @IBAction func barButtonClick(sender: UIBarButtonItem) { showcase.titleLabel.text = "Bar Button Example" showcase.detailsLabel.text = "This example highlights the Bar Button Item" showcase.setupShowcaseForBarButtonItem(sender) showcase.show() } @IBAction func defaultShowcaseClick(sender: UIButton) { showcase.titleLabel.text = "Default" showcase.detailsLabel.text = "This is default iShowcase" showcase.setupShowcaseForView(sender) showcase.show() } @IBAction func multipleShowcaseClick(sender: UIButton) { multiple = true defaultShowcaseClick(sender) } @IBAction func tableViewShowcaseClick(sender: UIButton) { showcase.titleLabel.text = "UITableView" showcase.detailsLabel.text = "This is default position example" showcase.setupShowcaseForTableView(tableView) showcase.show() } @IBAction func customShowcaseClick(sender: UIButton) { if backgroundColor.text?.characters.count > 0 { showcase.coverColor = UIColor.colorFromHexString(backgroundColor.text!) } if titleColor.text?.characters.count > 0 { showcase.titleLabel.textColor = UIColor.colorFromHexString(titleColor.text!) } if detailsColor.text?.characters.count > 0 { showcase.detailsLabel.textColor = UIColor.colorFromHexString(detailsColor.text!) } if highlightColor.text?.characters.count > 0 { showcase.highlightColor = UIColor.colorFromHexString(highlightColor.text!) } custom = true showcase.type = .CIRCLE showcase.titleLabel.text = "Custom" showcase.detailsLabel.text = "This is custom iShowcase" showcase.setupShowcaseForView(sender) // Uncomment this to show the showcase only once after 1st run // showcase.singleShotId = 47 showcase.show() } override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { view.endEditing(true) super.touchesBegan(touches, withEvent: event) } func textFieldShouldReturn(textField: UITextField) -> Bool { textField.resignFirstResponder() return true } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return tableData.count } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { var cell = tableView.dequeueReusableCellWithIdentifier("Cell") if cell == nil { cell = UITableViewCell(style: .Default, reuseIdentifier: "Cell") } if let cell = cell { cell.textLabel!.text = tableData[indexPath.row] } return cell! } func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { showcase.titleLabel.text = "UITableView" showcase.detailsLabel.text = "This is custom position example" showcase.setupShowcaseForTableView(tableView, withIndexPath: indexPath) showcase.show() tableView.deselectRowAtIndexPath(indexPath, animated: true) } private func setupShowcase() { showcase = iShowcase() showcase.delegate = self } func iShowcaseDismissed(showcase: iShowcase) { if multiple { showcase.titleLabel.text = "Multiple" showcase.detailsLabel.text = "This is multiple iShowcase" showcase.setupShowcaseForView(titleColor) showcase.show() multiple = false } if custom { setupShowcase() custom = false } } }
[ -1 ]
de4919a6c6235c30fb1116842142f9c57d517d66
5eddb5ecc7d0c67a574ef9b08b4bee0313293abf
/adaLovelaceLevel/Twenty1stViewController.swift
eadc5b3101146faf573f80fa8d90cb8b0d7358cd
[]
no_license
nandhiniparthasarathy/adaLovelaceLevel
5942df2a70b5432094ed6df6585db360bff442e0
ca0f964db4ae062b984e4c624462b8baf7c64113
refs/heads/main
2023-06-30T17:48:47.836656
2021-07-24T19:14:49
2021-07-24T19:14:49
387,918,091
1
0
null
null
null
null
UTF-8
Swift
false
false
671
swift
// // Twenty1stViewController.swift // adaLovelaceLevel // // Created by Nandhini Parthasarathy on 7/22/21. // import UIKit class Twenty1stViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ -1 ]
66a7fcb794ebf74b7fb0fa09b5ccd59abc182884
97c0eece188a92a1dbeb405ac018da688039cf43
/iOSApp/Screens/Custom/CustomButton.swift
bbd944ef516aa4355363b6c3aadd824e80609070
[]
no_license
inasahmic/iOSApp
dd3620c38545cb9c873a6aeac689a5d810f92243
e262e323e687b187a438d5fbf77d6067ed4f67e8
refs/heads/main
2023-04-05T10:13:19.269671
2021-03-27T19:53:41
2021-03-27T19:53:41
348,482,826
0
0
null
2021-04-13T21:23:33
2021-03-16T20:28:36
Swift
UTF-8
Swift
false
false
600
swift
// // CustomButton.swift // iOSApp // // Created by Inas Ahmic on 17. 3. 2021.. // import Foundation import UIKit @IBDesignable class CustomButton: UIButton { @IBInspectable var cornerRadius: CGFloat = 0 { didSet{ self.layer.cornerRadius = cornerRadius } } @IBInspectable var borderWidth: CGFloat = 0 { didSet { self.layer.borderWidth = borderWidth } } @IBInspectable var borderColor: UIColor = UIColor.clear { didSet { self.layer.borderColor = borderColor.cgColor } } }
[ -1 ]
18ff1aaefe6fef41a7b213cadf269c07ffe6f35f
ab0b48617edd9244b97f2336fae24b2cfa5c8360
/Excercise1/AppDelegate.swift
b303b3dc90de892e970cc6e32b59d72b81345e5f
[]
no_license
kaurharpreet0003/Excercise1
43272fa248353c2ed6099a4d779a85b90dc94254
ff23c248d284cdf11bb8466f0c5cda74d911bd2e
refs/heads/master
2020-12-08T05:11:32.453068
2020-01-09T20:09:53
2020-01-09T20:09:53
232,895,000
0
0
null
null
null
null
UTF-8
Swift
false
false
1,418
swift
// // AppDelegate.swift // Excercise1 // // Created by MacStudent on 2020-01-09. // Copyright © 2020 MacStudent. 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, 385081, 376889, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 336123, 418043, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 393538, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 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, 197159, 377383, 352821, 188987, 418363, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 336512, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 434867, 164534, 336567, 328378, 164538, 328386, 352968, 344776, 418507, 352971, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 328522, 336714, 426841, 197468, 254812, 361309, 361315, 361322, 328573, 369542, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 66782, 222437, 386285, 328941, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181654, 230809, 181670, 181673, 181678, 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, 345736, 198280, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 337592, 419512, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 141051, 337659, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 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, 411916, 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, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 338660, 338664, 264941, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 330760, 330768, 248862, 396328, 158761, 396336, 199728, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 330958, 330965, 265432, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 249312, 339424, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 339588, 126596, 421508, 224904, 224909, 159374, 11918, 339601, 224913, 126610, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 372499, 167700, 225043, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 257871, 225103, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 257916, 225148, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 266297, 217157, 421960, 356439, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 266453, 225493, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 397571, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 250238, 389502, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 381512, 324170, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 184982, 373398, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 357211, 430939, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 324472, 398201, 119674, 324475, 430972, 340861, 324478, 340858, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 201711, 349180, 439294, 209943, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210039, 341113, 210044, 349308, 152703, 160895, 349311, 210052, 210055, 349319, 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, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 251271, 136590, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 415216, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 153227, 333498, 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, 358255, 399215, 268143, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 350202, 333818, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 350410, 260298, 350416, 350422, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 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, 416157, 268701, 342430, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 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, 375612, 260924, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 342874, 326502, 375656, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 359366, 326598, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 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, 343393, 343398, 425328, 343409, 154999, 253303, 343417, 327034, 245127, 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, 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, 262005, 147317, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 327654, 253926, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
4be6915b0a2714707a73128e82e56b969f8a042d
eebe4220a45a8963dbae3a029e7355823b1f0539
/DOIT/TodoDataClass.swift
10a1e1b064d6cce046e4f783143d91f49a2b67c5
[]
no_license
LucienLee/todoApp_SummerSchool
1fb118a4a66503f52bd2a09ef3de60b99b98b2c6
75ee9c6857c2a0e31806b79e0dbd1360c7b100dd
refs/heads/master
2021-01-18T19:35:04.632309
2015-08-09T18:43:11
2015-08-09T18:43:11
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,063
swift
// // TodoDataClass.swift // DOIT // // Created by 修敏傑 on 8/9/15. // Copyright (c) 2015 NTU. All rights reserved. // import Foundation import Parse enum typeOfTodo : String { case urgent = "Urgent" case normal = "Normal" case casual = "Casual" case done = "Done" static func rawToType(value: Int) -> typeOfTodo { switch value { case 0: return .urgent case 1: return .normal case 2: return .casual case 3: return .done default: return .done } } } class TodoDataClass: NSObject { var title : String var type : typeOfTodo var ready = false var parseObject : PFObject? init(title : String , type: typeOfTodo) { self.title = title self.type = type } init(parse: PFObject, ready: Bool) { self.parseObject = parse self.title = parse["title"] as! String self.type = typeOfTodo(rawValue: parse["type"] as! String)! self.ready = ready } }
[ -1 ]
66d488ab2ad447229964819cd6b405c761b44755
f8735339387ae02061e9d3076925f6174948c017
/sampleScrollView/ImageViewController.swift
83a04882bb0d4cb181b7bd5e87f724900202d49c
[]
no_license
y8011/sampleScrollView
4381c9ab0c6b2b47e50a45564253f56acc65995f
a031ee9c28de179bd650787b2e928150b36d0057
refs/heads/master
2020-03-19T08:06:04.821864
2018-06-05T12:52:42
2018-06-05T12:52:42
136,175,782
0
0
null
null
null
null
UTF-8
Swift
false
false
1,359
swift
// // ImageViewController.swift // sampleScrollView // // Created by yuka on 2018/06/05. // Copyright © 2018年 yuka. All rights reserved. // import UIKit class ImageViewController: UIViewController ,UIScrollViewDelegate { @IBOutlet weak var myScrollView: UIScrollView! @IBOutlet weak var myImageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() // 店長メソッド使うための宣言 myScrollView.delegate = self // Do any additional setup after loading the view. } override func viewDidAppear(_ animated: Bool) { print(myScrollView!) } // 何をズームするのかを決めるメソッド func viewForZooming(in scrollView: UIScrollView) -> UIView? { return myImageView } 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. } */ }
[ -1 ]
2605fb01af562e8fca289a706cf1026ab5f8f0b1
7122a68cdec9d906a152990d6cbcd988e81b5adf
/PopupDialog/Classes/PopupDialog.swift
9ff8a22b9ce6f5e344ce103b222e26c94e17f10b
[ "MIT" ]
permissive
kjaylee/PopupDialog
d48738d585b88b6e0e382be4b3fd40981d63f13f
9936b66e420e63d7d889d80434ad65b4a09fc5a5
refs/heads/master
2021-06-02T18:27:32.037884
2018-05-31T02:34:58
2018-05-31T02:34:58
135,516,003
0
0
NOASSERTION
2021-05-07T03:04:14
2018-05-31T01:34:53
Swift
UTF-8
Swift
false
false
11,696
swift
// // PopupDialog.swift // // Copyright (c) 2016 Orderella Ltd. (http://orderella.co.uk) // Author - Martin Wildfeuer (http://www.mwfire.de) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // import Foundation import UIKit /// Creates a Popup dialog similar to UIAlertController final public class PopupDialog: UIViewController { // MARK: Private / Internal /// First init flag fileprivate var initialized = false /// StatusBar display related fileprivate let hideStatusBar: Bool fileprivate var statusBarShouldBeHidden: Bool = false /// Width for iPad displays fileprivate let preferredWidth: CGFloat /// The completion handler fileprivate var completion: (() -> Void)? /// The custom transition presentation manager fileprivate var presentationManager: PresentationManager! /// Interactor class for pan gesture dismissal fileprivate lazy var interactor = InteractiveTransition() /// Returns the controllers view internal var popupContainerView: PopupDialogContainerView { return view as! PopupDialogContainerView // swiftlint:disable:this force_cast } /// The set of buttons fileprivate var buttons = [PopupDialogButton]() /// Whether keyboard has shifted view internal var keyboardShown = false /// Keyboard height internal var keyboardHeight: CGFloat? // MARK: Public /// The content view of the popup dialog public var viewController: UIViewController /// Whether or not to shift view for keyboard display public var keyboardShiftsView = true // MARK: - Initializers /*! Creates a standard popup dialog with title, message and image field - parameter title: The dialog title - parameter message: The dialog message - parameter image: The dialog image - parameter buttonAlignment: The dialog button alignment - parameter transitionStyle: The dialog transition style - parameter preferredWidth: The preferred width for iPad screens - parameter gestureDismissal: Indicates if dialog can be dismissed via pan gesture - parameter hideStatusBar: Whether to hide the status bar on PopupDialog presentation - parameter completion: Completion block invoked when dialog was dismissed - returns: Popup dialog default style */ @objc public convenience init( title: String?, message: String?, image: UIImage? = nil, buttonAlignment: UILayoutConstraintAxis = .vertical, transitionStyle: PopupDialogTransitionStyle = .bounceUp, preferredWidth: CGFloat = 270, gestureDismissal: Bool = true, hideStatusBar: Bool = false, completion: (() -> Void)? = nil) { // Create and configure the standard popup dialog view let viewController = PopupDialogDefaultViewController() viewController.titleText = title viewController.messageText = message viewController.image = image // Call designated initializer self.init(viewController: viewController, buttonAlignment: buttonAlignment, transitionStyle: transitionStyle, preferredWidth: preferredWidth, gestureDismissal: gestureDismissal, hideStatusBar: hideStatusBar, completion: completion) } /*! Creates a popup dialog containing a custom view - parameter viewController: A custom view controller to be displayed - parameter buttonAlignment: The dialog button alignment - parameter transitionStyle: The dialog transition style - parameter preferredWidth: The preferred width for iPad screens - parameter gestureDismissal: Indicates if dialog can be dismissed via pan gesture - parameter hideStatusBar: Whether to hide the status bar on PopupDialog presentation - parameter completion: Completion block invoked when dialog was dismissed - returns: Popup dialog with a custom view controller */ @objc public init( viewController: UIViewController, buttonAlignment: UILayoutConstraintAxis = .vertical, transitionStyle: PopupDialogTransitionStyle = .bounceUp, preferredWidth: CGFloat = 270, gestureDismissal: Bool = true, hideStatusBar: Bool = false, completion: (() -> Void)? = nil) { self.viewController = viewController self.preferredWidth = preferredWidth self.hideStatusBar = hideStatusBar self.completion = completion super.init(nibName: nil, bundle: nil) // Init the presentation manager presentationManager = PresentationManager(transitionStyle: transitionStyle, interactor: interactor) // Assign the interactor view controller interactor.viewController = self // Define presentation styles transitioningDelegate = presentationManager modalPresentationStyle = .custom // StatusBar setup modalPresentationCapturesStatusBarAppearance = true // Add our custom view to the container addChildViewController(viewController) popupContainerView.stackView.insertArrangedSubview(viewController.view, at: 0) popupContainerView.buttonStackView.axis = buttonAlignment viewController.didMove(toParentViewController: self) // Allow for dialog dismissal on background tap and dialog pan gesture if gestureDismissal { let panRecognizer = UIPanGestureRecognizer(target: interactor, action: #selector(InteractiveTransition.handlePan)) popupContainerView.stackView.addGestureRecognizer(panRecognizer) let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleTap)) tapRecognizer.cancelsTouchesInView = false panRecognizer.cancelsTouchesInView = false popupContainerView.addGestureRecognizer(tapRecognizer) } } // Init with coder not implemented required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } // MARK: - View life cycle /// Replaces controller view with popup view public override func loadView() { view = PopupDialogContainerView(frame: UIScreen.main.bounds, preferredWidth: preferredWidth) } public override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) addObservers() guard !initialized else { return } appendButtons() initialized = true } public override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) statusBarShouldBeHidden = hideStatusBar UIView.animate(withDuration: 0.15) { self.setNeedsStatusBarAppearanceUpdate() } } public override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) removeObservers() } deinit { completion?() completion = nil } // MARK: - Dismissal related @objc fileprivate func handleTap(_ sender: UITapGestureRecognizer) { // Make sure it's not a tap on the dialog but the background let point = sender.location(in: popupContainerView.stackView) guard !popupContainerView.stackView.point(inside: point, with: nil) else { return } dismiss() } /*! Dismisses the popup dialog */ @objc public func dismiss(_ completion: (() -> Void)? = nil) { self.dismiss(animated: true) { completion?() } } // MARK: - Button related /*! Appends the buttons added to the popup dialog to the placeholder stack view */ fileprivate func appendButtons() { // Add action to buttons let stackView = popupContainerView.stackView let buttonStackView = popupContainerView.buttonStackView if buttons.isEmpty { stackView.removeArrangedSubview(popupContainerView.buttonStackView) } for (index, button) in buttons.enumerated() { button.needsLeftSeparator = buttonStackView.axis == .horizontal && index > 0 buttonStackView.addArrangedSubview(button) button.addTarget(self, action: #selector(buttonTapped(_:)), for: .touchUpInside) } } /*! Adds a single PopupDialogButton to the Popup dialog - parameter button: A PopupDialogButton instance */ @objc public func addButton(_ button: PopupDialogButton) { buttons.append(button) } /*! Adds an array of PopupDialogButtons to the Popup dialog - parameter buttons: A list of PopupDialogButton instances */ @objc public func addButtons(_ buttons: [PopupDialogButton]) { self.buttons += buttons } /// Calls the action closure of the button instance tapped @objc fileprivate func buttonTapped(_ button: PopupDialogButton) { if button.dismissOnTap { dismiss({ button.buttonAction?() }) } else { button.buttonAction?() } } /*! Simulates a button tap for the given index Makes testing a breeze - parameter index: The index of the button to tap */ public func tapButtonWithIndex(_ index: Int) { let button = buttons[index] button.buttonAction?() } // MARK: - StatusBar display related public override var prefersStatusBarHidden: Bool { return statusBarShouldBeHidden } public override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation { return .slide } } // MARK: - View proxy values extension PopupDialog { /// The button alignment of the alert dialog @objc public var buttonAlignment: UILayoutConstraintAxis { get { return popupContainerView.buttonStackView.axis } set { popupContainerView.buttonStackView .axis = newValue popupContainerView.pv_layoutIfNeededAnimated() } } /// The transition style @objc public var transitionStyle: PopupDialogTransitionStyle { get { return presentationManager.transitionStyle } set { presentationManager.transitionStyle = newValue } } } // MARK: - Shake extension PopupDialog { /// Performs a shake animation on the dialog @objc public func shake() { popupContainerView.pv_shake() } }
[ 295336, 40939, 306854, 149279 ]
93ec2af1a12bd1dce88aba374e33f392f2bfc469
17b545ba746dd0e571377281bad44a435c1bccef
/Sources/Sword/Types/Guild.swift
5faa132ba6643127d082f40e25efa8549ce84dca
[ "MIT" ]
permissive
omochi/Sword
3fa3311b50f06267a4e9435b05ee6e34a16cc341
19d7815cf499bb2b32055ef4cd74b7d0314b8ef5
refs/heads/rewrite
2020-05-23T02:11:05.753882
2019-05-05T23:40:07
2019-05-05T23:40:07
186,598,526
0
0
MIT
2019-05-14T16:56:19
2019-05-14T10:19:16
Swift
UTF-8
Swift
false
false
11,132
swift
// // Guild.swift // Sword // // Created by Alejandro Alonso // Copyright © 2018 Alejandro Alonso. All rights reserved. // import Foundation public class Guild: Codable, _SwordChild { public internal(set) weak var sword: Sword? public let afkChannelId: Snowflake? public let afkTimeout: UInt64 public let applicationId: Snowflake? public var categoryChannels: [Channel.Category] { return channels.values.filter { $0 is Channel.Category } as! [Channel.Category] } public internal(set) var channels: [Snowflake: GuildChannel] public let defaultMessageNotificationLevel: DefaultMessageNotification public let embedChannelId: Snowflake? public let emojis: [Emoji] public let explicitContentFilterLevel: ExplicitContentFilter public let features: [Feature] public let icon: String? public let id: Snowflake public let isEmbedEnabled: Bool? public let isLarge: Bool? public let isOwner: Bool? public let isUnavailable: Bool? public let isWidgetEnabled: Bool? public let joinedAt: Date? public let memberCount: UInt64? public let members: [Member]? public let name: String public let ownerId: Snowflake public let permissions: UInt64? public let region: Voice.Region.ID public internal(set) var roles: [Role] public let splash: String? public let systemChannelId: Snowflake? public var textChannels: [Channel.Text] { return channels.values.filter { $0 is Channel.Text } as! [Channel.Text] } public let verificationLevel: Verification public var voiceChannels: [Channel.Voice] { return channels.values.filter { $0 is Channel.Voice } as! [Channel.Voice] } public let voiceStates: [Voice.State]? public let widgetChannelId: Snowflake? /// Used to map json keys to swift keys enum CodingKeys: String, CodingKey { case afkChannelId = "afk_channel_id" case afkTimeout = "afk_timeout" case applicationId = "application_id" case channels case defaultMessageNotificationLevel = "default_message_notifications" case embedChannelId = "embed_channel_id" case emojis case explicitContentFilterLevel = "explicit_content_filter" case features case icon case id case isEmbedEnabled = "embed_enabled" case isLarge = "large" case isOwner = "owner" case isUnavailable = "unavailable" case isWidgetEnabled = "widget_enabled" case joinedAt = "joined_at" case memberCount = "member_count" case members case name case ownerId = "owner_id" case permissions case region case roles case splash case systemChannelId = "system_channel_id" case verificationLevel = "verification_level" case voiceStates = "voice_states" case widgetChannelId = "widget_channel_id" } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.id = try container.decode(Snowflake.self, forKey: .id) self.afkChannelId = try container.decodeIfPresent( Snowflake.self, forKey: .afkChannelId ) self.afkTimeout = try container.decode(UInt64.self, forKey: .afkTimeout) self.applicationId = try container.decodeIfPresent( Snowflake.self, forKey: .applicationId ) let channelHolders = try container.decode( [ChannelHolder].self, forKey: .channels ) self.channels = [Snowflake: GuildChannel]() for holder in channelHolders { holder.setGuildId(id) self.channels[holder.channel.id] = holder.channel } self.defaultMessageNotificationLevel = try container.decode( DefaultMessageNotification.self, forKey: .defaultMessageNotificationLevel ) self.embedChannelId = try container.decodeIfPresent( Snowflake.self, forKey: .embedChannelId ) self.emojis = try container.decode([Emoji].self, forKey: .emojis) self.explicitContentFilterLevel = try container.decode( ExplicitContentFilter.self, forKey: .explicitContentFilterLevel ) self.features = try container.decode([Feature].self, forKey: .features) self.icon = try container.decodeIfPresent(String.self, forKey: .icon) self.isEmbedEnabled = try container.decodeIfPresent( Bool.self, forKey: .isEmbedEnabled ) self.isLarge = try container.decodeIfPresent(Bool.self, forKey: .isLarge) self.isOwner = try container.decodeIfPresent(Bool.self, forKey: .isOwner) self.isUnavailable = try container.decodeIfPresent( Bool.self, forKey: .isUnavailable ) self.isWidgetEnabled = try container.decodeIfPresent( Bool.self, forKey: .isWidgetEnabled ) self.joinedAt = try container.decodeIfPresent(Date.self, forKey: .joinedAt) self.memberCount = try container.decodeIfPresent( UInt64.self, forKey: .memberCount ) self.members = try container.decodeIfPresent( [Member].self, forKey: .members ) self.name = try container.decode(String.self, forKey: .name) self.ownerId = try container.decode(Snowflake.self, forKey: .ownerId) self.permissions = try container.decodeIfPresent( UInt64.self, forKey: .permissions ) self.region = try container.decode( Voice.Region.ID.self, forKey: .region ) self.roles = try container.decode([Role].self, forKey: .roles) // After we decode roles, insert guild id into each one for i in roles.indices { roles[i].guildId = id } self.splash = try container.decodeIfPresent(String.self, forKey: .splash) self.systemChannelId = try container.decodeIfPresent( Snowflake.self, forKey: .systemChannelId ) self.verificationLevel = try container.decode( Verification.self, forKey: .verificationLevel ) self.voiceStates = try container.decodeIfPresent( [Voice.State].self, forKey: .voiceStates ) self.widgetChannelId = try container.decodeIfPresent( Snowflake.self, forKey: .widgetChannelId ) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(afkChannelId, forKey: .afkChannelId) try container.encode(afkTimeout, forKey: .afkTimeout) try container.encode(applicationId, forKey: .applicationId) let channelHolders: [ChannelHolder] = try channels.values.map { switch $0 { case let category as Channel.Category: return .category(category) case let text as Channel.Text: return .text(text) case let voice as Channel.Voice: return .voice(voice) default: throw EncodingError.invalidValue( $0, EncodingError.Context( codingPath: container.codingPath, debugDescription: "Unknown guild channel type" ) ) } } try container.encode(channelHolders, forKey: .channels) try container.encode( defaultMessageNotificationLevel, forKey: .defaultMessageNotificationLevel ) try container.encode(embedChannelId, forKey: .embedChannelId) try container.encode(emojis, forKey: .emojis) try container.encode( explicitContentFilterLevel, forKey: .explicitContentFilterLevel ) try container.encode(features, forKey: .features) try container.encode(icon, forKey: .icon) try container.encode(id, forKey: .id) try container.encode(isEmbedEnabled, forKey: .isEmbedEnabled) try container.encode(isLarge, forKey: .isLarge) try container.encode(isOwner, forKey: .isOwner) try container.encode(isUnavailable, forKey: .isUnavailable) try container.encode(isWidgetEnabled, forKey: .isWidgetEnabled) try container.encode(joinedAt, forKey: .joinedAt) } } extension Guild { public enum DefaultMessageNotification: UInt8, Codable { case all case mentions } public enum ExplicitContentFilter: UInt8, Codable { case disabled case withoutRoles case all } public enum Feature: String, Codable { case vipVoice = "VIP_REGIONS" case vanityUrl = "VANITY_URL" case inviteSplash = "INVITE_SPLASH" case verified = "VERIFIED" case moreEmojis = "MORE_EMOJI" } public struct Member: Codable, _SwordChild { public internal(set) weak var sword: Sword? public weak var guild: Guild? { guard let guildId = guildId else { return nil } return sword?.guilds[guildId] } public internal(set) var guildId: Snowflake? public let isDeafened: Bool public let isMuted: Bool public let joinedAt: Date public let nick: String? public let roleIds: [Snowflake] public let user: User enum CodingKeys: String, CodingKey { case isDeafened = "deaf" case isMuted = "mute" case joinedAt = "joined_at" case nick case roleIds = "roles" case user } } public enum MFA: UInt8, Codable { case none case elevated } public enum SearchQualifier { case channel case role } public enum Verification: UInt8, Codable { case none case low case medium case high case veryHigh } } public struct UnavailableGuild: Codable { public let id: Snowflake public let isUnavailable: Bool enum CodingKeys: String, CodingKey { case id case isUnavailable = "unavailable" } } extension Guild { enum ChannelHolder: Codable { case category(Channel.Category) case text(Channel.Text) case voice(Channel.Voice) var channel: GuildChannel { switch self { case let .category(category): return category case let .text(text): return text case let .voice(voice): return voice } } init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() let channelDecoding = try container.decode(ChannelDecoding.self) switch channelDecoding.type { case .guildCategory: self = .category(try container.decode(Channel.Category.self)) case .guildText: self = .text(try container.decode(Channel.Text.self)) case .guildVoice: self = .voice(try container.decode(Channel.Voice.self)) default: throw DecodingError.dataCorruptedError( in: container, debugDescription: "Unknown guild channel type" ) } } func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() switch self { case let .category(category): try container.encode(category) case let .text(text): try container.encode(text) case let .voice(voice): try container.encode(voice) } } func setGuildId(_ guildId: Snowflake) { switch self { case let .category(category): category.guildId = guildId case let .text(text): text.guildId = guildId case let .voice(voice): voice.guildId = guildId } } } }
[ -1 ]
6ceb18b8ef8e57697cb6ab735a313e78ab684dc0
fba5619701617286bb357734682fa3e8a7c23de2
/PrimeMultTable/TableAlgorithmMultiply.swift
5ffba0e3fae8232a671de96abbf18ee4c574e1bf
[]
no_license
workdavidjelliott/PrimeMultTable
2ca42ff399d064fbcb736919c573eaac449343e3
dfbe7e92c249727a5dab4c61c308cb48ed553958
refs/heads/master
2021-01-10T02:21:08.827555
2015-11-04T06:57:17
2015-11-04T06:57:17
45,498,918
0
0
null
null
null
null
UTF-8
Swift
false
false
376
swift
// // TableAlgorithmMultiply.swift // PrimeMultTable // // Created by Dave Elliott on 03/11/2015. // Copyright © 2015 David Elliott. All rights reserved. // import Foundation class TableAlgorithmMultiply : TableAlgorithmInterface { func tableOperation(columnHeaderValue:Int, rowHeaderValue:Int) -> Int { return columnHeaderValue * rowHeaderValue } }
[ -1 ]
f48bc4322fa77007771dcbff59824b57e95f69fc
07fc7f2eeb4054c2205a3e8a5abd32bedd00142b
/Sources/iOSApp-Development-Semantics/Engineer/Do/Aspect/3_Practice_Tools/Crashreport.swift
7eb7f7c53822b001fe117f930730cf354adca75e
[]
no_license
dzAtZJU/iOS-App-Development-Semantics
4e77771eeaa8383e384e6b23404e1c972e8ff39c
487b88ff3097ff9e26abb19401c7b41d3898b7f8
refs/heads/main
2023-03-03T09:07:38.792304
2021-02-05T14:47:55
2021-02-05T14:47:55
298,595,290
0
0
null
null
null
null
UTF-8
Swift
false
false
57
swift
// https://developer.apple.com/videos/play/wwdc2015/718/
[ -1 ]
057e964eb77ac90e39d1a354fed6b0dba7fb6bcf
9113a998c462294bb93c18a64c3724a93541580f
/TranslateBar/Infrastructure/Extensions/Rx/NSResponder+Rx.swift
9bba120ce389acd4528c9345fcf2422905c65cb7
[ "MIT" ]
permissive
artbobrov/Translate-Bar
cb465556a6c0910bbc989d1c93f0c02fffb8f46b
562ee87e070126a1abcab9b39a87d311073349f2
refs/heads/master
2021-06-08T19:16:00.871028
2020-06-24T23:08:25
2020-06-24T23:08:25
136,938,829
3
1
MIT
2018-07-11T22:14:34
2018-06-11T14:35:46
Swift
UTF-8
Swift
false
false
382
swift
// // NSResponder+Rx.swift // TranslateBar // // Created by abobrov on 30/08/2018. // Copyright © 2018 Artem Bobrov. All rights reserved. // import Cocoa import RxCocoa import RxSwift public extension Reactive where Base: NSResponder { var mouseDown: Observable<Base> { return methodInvoked(#selector(NSResponder.mouseDown(with:))).map { _ in self.base } } }
[ -1 ]
7fdac1bc5ea0724e37386d380d07966aa6b0ffe2
b279578de6e554990781b6c7a83fdace920d7eb3
/SMXAMIOSTemplate/NotificationContentExtension/NotificationViewController.swift
bb0bb0abcc813fcb9ab958f04745aa8ae38c067e
[ "MIT" ]
permissive
SelligentMarketingCloud/MobileSDK-Xamarin.Native.IOS
818e25470789f41e30b5b1929c0e05d17d751862
e75c22a55a322be38a7d80bcf89985be237d03d3
refs/heads/master
2023-07-08T16:20:02.720282
2023-06-28T10:24:16
2023-06-28T10:24:16
236,702,917
0
0
null
null
null
null
UTF-8
Swift
false
false
1,114
swift
// // NotificationViewController.swift // NotificationContentExtension // // Created by Gilbert Schakal on 17/05/2018. // Copyright © 2018 Samy Ziat. All rights reserved. // import UIKit import UserNotifications import UserNotificationsUI class NotificationViewController: UIViewController, UNNotificationContentExtension { @IBOutlet var label: UILabel? override func viewDidLoad() { super.viewDidLoad() // Do any required interface initialization here. } func didReceive(_ notification: UNNotification) { self.label?.text = notification.request.content.body let url = "URL" let clientID = "ClientID" let privateKey = "privateKey" // Create the SMManagerSetting instance let setting: SMManagerSetting = SMManagerSetting(url: url, clientID: clientID, privateKey: privateKey) //Start sdk from extension SMManager.sharedInstance().startExtension(with: setting) //sdk api to add buttons from banner SMManager.sharedInstance().didReceive(notification) } }
[ -1 ]
8df10ac9d2529654971378f08fd20e582704e666
d71729ca8dc55fcfd86362e41e7d0cf06479db38
/Free_Fall_Fred/GameScene.swift
9a1ce8a8ad924c90bd56d0d096aee1e76cd10f5a
[]
no_license
LaxLuker2/Free_Fall_Fred
5f5c36631ec330ecf559aa2a3cbf97493a38cfe0
8e62984dbc0e962f8a90a703f079f9fb2fa10bcd
refs/heads/master
2021-01-20T02:37:02.464160
2017-04-26T02:02:51
2017-04-26T02:02:51
89,426,447
0
0
null
null
null
null
UTF-8
Swift
false
false
25,218
swift
// // MyUtils.swift // Free_Fall_Fred // // Created by igmstudent on 2/29/16. // Copyright © 2016 Schwarting_Schoolnick. All rights reserved. // import Foundation import SpriteKit struct GameLayer { static let Background: CGFloat = 0 static let HUD : CGFloat = 1 static let Sprite : CGFloat = 2 static let Message : CGFloat = 3 } struct PhysicsCategory { static let None : UInt32 = 0 static let All : UInt32 = UInt32.max static let Enemy : UInt32 = 0b1 static let Ground : UInt32 = 0b10 static let Player : UInt32 = 0b11 } struct GAME_STATE { static let GAME_PLAYING:Int32 = 0 static let ROUND_OVER:Int32 = 1 static let GAME_OVER:Int32 = 2 } class GameScene: SKScene, SKPhysicsContactDelegate { //Music let splat = SKAction.playSoundFileNamed("fall.wav", waitForCompletion: false) let bMusic = SKAction.playSoundFileNamed("enchanted tiki 86.mp3", waitForCompletion: false) let winMusic = SKAction.playSoundFileNamed("chipquest.wav", waitForCompletion: false) // MARK: ivars var gameState:Int32 = 0 var top:CGFloat = 0, bottom:CGFloat = 0, left:CGFloat = 0, right:CGFloat = 0 var playableRect:CGRect = CGRect.zero var lastUpdateTime: TimeInterval = 0 var dt: TimeInterval = 0 var player:Player! var cloudObjects:[Clouds] = [] var rockObjects:[Rocks] = [] var playerVelocity:CGFloat = 25 var viewController: GameViewController! var background:SKSpriteNode! var touchesMoved = false // MARK: Actions var playerAnimation: SKAction? //rock properties var rockBounds:CGRect = CGRect.zero var numRocks:Int = 0 var topOfRocks:CGFloat = 0 // camera var cameraPosition:CGPoint! var screenScroller:SKSpriteNode! let cameraNode = SKCameraNode() let cameraMovementPerSec:CGFloat = 25 //distance var distanceLabel:SKLabelNode! var distToBottom:CGFloat = 0 var roundOverLabel:SKLabelNode! var control:TWButton! //slow down player var decel:CGFloat = 350 var buttonPressed:Bool = false var decelerate = false var playerCanMove = true override init(size:CGSize) { super.init(size: size) self.buildPlayer() print(player.position) run(bMusic) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } // MARK: - Initialization - override func didMove(to view: SKView) { physicsWorld.gravity = CGVector(dx: 0, dy: 0) physicsWorld.contactDelegate = self cameraPosition = CGPoint(x: size.width/2, y: CGFloat(-1500 * level)) setupUI() makeSprites() addChild(cameraNode) camera = cameraNode setCameraPosition(cameraPosition) } // MARK: - Helpers - func setupUI() { // calculate playable rect for iPhone 4S top = is4SorOlder() ? size.height - 150 : size.height bottom = is4SorOlder() ? 150 : 0 left = 0 right = size.width playableRect = CGRect(x: 0, y: bottom, width: size.width, height: top) screenScroller = SKSpriteNode() screenScroller.position = CGPoint(x: 0, y: 0) backgroundColor = SKColor.black background = SKSpriteNode(imageNamed: "background_clouds_3") background.alpha = CGFloat(1/(CGFloat(level) * 0.2)) background.anchorPoint = CGPoint(x: 0, y: 0) background.position = CGPoint(x: 0, y: -background.size.height/2 - size.height) background.zPosition = GameLayer.Background screenScroller.addChild(background) rockBounds = CGRect(x: 150, y: -background.size.height + size.height / 2, width: size.width - 300, height: background.size.height + top) //drawDebugBorder(rockBounds) self.control?.removeFromParent() self.distanceLabel?.removeFromParent() self.roundOverLabel?.removeFromParent() //check game state and start playing if(gameState == GAME_STATE.GAME_PLAYING) { //button control = TWButton(size: CGSize(width: 455, height: 110), normalColor: SKColor(red: 225, green: 225, blue: 225, alpha: 0.5), selectedColor: SKColor.white, singleHighlightedColor: SKColor(red: 225, green: 225, blue: 225, alpha: 0.75), disabledColor: SKColor(red: 225, green: 225, blue: 225, alpha: 0.15)) control.name = "land" control.position = CGPoint(x: self.frame.midX - 540, y: self.frame.midY - 1150) control.setNormalStateLabelText("LAND") control.setNormalStateLabelFontColor(SKColor(red: 25, green: 25, blue: 25, alpha: 1.0)) control.setHighlightedStateSingleLabelText("LAND") control.setHighlightedStateSingleLabelFontColor(SKColor(red: 225, green: 225, blue: 225, alpha: 1.0)) control.setDisabledStateLabelText("LAND") control.setDisabledStateLabelFontColor(SKColor(red: 225, green: 225, blue: 225, alpha: 0.35)) control.setAllStatesLabelFontName("PassionOne-Regular") control.setAllStatesLabelFontSize(80) control.zPosition = 1100 control.addClosure(.touchUpInside, target: self, closure: { (scene, sender) -> () in self.player.releaseParachute(self.playableRect) self.player.texture = SKTexture(imageNamed: "PLAYERSTANDING") self.player.setScale(0.65) self.player.size.width = self.player.size.width / 1.35 //print("player z position b4 : \(self.player.zPosition)") self.control.removeFromParent() self.buttonPressed = true }) //self.player.zPosition = 5 print("player z position : \(player.zPosition)") control.enabled = false cameraNode.addChild(control) //distance shit self.distanceLabel = SKLabelNode(fontNamed: "PassionOne-Regular") self.distanceLabel.text = "Distance to Bottom: 0 yards" self.distanceLabel.fontSize = 40 self.distanceLabel.fontColor = SKColor.white self.distanceLabel.position = CGPoint(x: 0, y: -100) self.distanceLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentMode.center self.distanceLabel.zPosition = 1100 self.cameraNode.addChild(self.distanceLabel) } //round over state if(gameState == GAME_STATE.ROUND_OVER) { self.roundOverLabel = SKLabelNode(fontNamed: "PassionOne-Regular") self.roundOverLabel.text = "Round Over! Get ready for level \(level + 1). Tap for next level." self.roundOverLabel.fontSize = 40 self.roundOverLabel.fontColor = SKColor.white self.roundOverLabel.position = CGPoint(x: 0, y: -100) self.roundOverLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentMode.center self.roundOverLabel.zPosition = 1100 self.cameraNode.addChild(self.roundOverLabel) } else if(gameState == GAME_STATE.GAME_OVER) { self.roundOverLabel = SKLabelNode(fontNamed: "PassionOne-Regular") self.roundOverLabel.text = "Game over. Tap to return to menu" self.roundOverLabel.fontSize = 60 self.roundOverLabel.fontColor = SKColor.white self.roundOverLabel.position = CGPoint(x: 0, y: -100) self.roundOverLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentMode.center self.roundOverLabel.zPosition = 1100 self.cameraNode.addChild(self.roundOverLabel) } numRocks = level * 2 print("background.size=\(background.size)") print("playableRect=\(playableRect.size)") print("screen aspect ratio=\(getScreenAspectRatio())") print("is4SorOlder=\(is4SorOlder())") } // MARK: - Game Loop - override func update(_ currentTime: TimeInterval) { calculateDeltaTime(currentTime) if(cameraNode.position.y < player.position.y - size.height/6) { cameraNode.position.y += 10 distToBottom += 2 if(self.distanceLabel != nil) { self.distanceLabel.text = "Distance to Bottom: \(Int(distToBottom)) yards" } } else { if(playerCanMove) //if player can move is true { movePlayer(CGFloat(dt)) if(decelerate == false) //if player is not moving down accelerating { moveScene(CGFloat(dt)) } cameraNode.position.y = player.position.y - size.height/6 distToBottom -= CGFloat(playerVelocity * 0.2) if(distToBottom.truncatingRemainder(dividingBy: 100) == 0) { let actionPulse = SKAction.scale(by: 1.15, duration: 0.2) let actionReversePulse = SKAction.reversed(actionPulse) //let actionRemove = SKAction.removeFromParent() distanceLabel.run(SKAction.sequence([actionPulse, actionReversePulse()])) } if(distToBottom < 200) //if distance to bottom is less than 200 show the land button { control.enabled = true if(buttonPressed == false && distToBottom <= 10) { self.player.destroy() decelerate = true distToBottom = 0 gameState = GAME_STATE.GAME_OVER setupUI() } } if(distToBottom < 50) // if they havent hit the button before 50 yards they die { control.removeFromParent() } if(self.distanceLabel != nil) { self.distanceLabel.text = "Distance to Bottom: \(Int(distToBottom)) yards" } } } if(buttonPressed) //when button is pressed { decelerate = true if(decel > 0) { decel -= 1 } if(distToBottom < 2) { distToBottom = 0 run(winMusic) } slowMoveScene(CGFloat(dt), decel: CGFloat(decel)) //print(decel) } } // Mark: debug and collision func drawDebugBorder(_ rect:CGRect) { let bound = SKShapeNode(rect: rect) bound.strokeColor = SKColor.red bound.position = CGPoint(x: 0, y: 0) bound.zPosition = 1000 addChild(bound) } func playerCollidedElse(_ player:SKSpriteNode, other:SKSpriteNode) { print("COLLIDED") run(splat) playerCanMove = false self.player.destroy() gameState = GAME_STATE.GAME_OVER setupUI() } //MARK: -Create Sprites- func makeSprites() { addChild(screenScroller) buildGround() buildClouds() buildRocks() buildBirds() } func buildPlayer() { print(playableRect) player = Player(screen: CGSize(width: playableRect.width, height: playableRect.height), pos: CGPoint(x: playableRect.width/2 + 600, y: playableRect.height / 2 + 300), hp: 3) player.zPosition = 102 player.physicsBody = SKPhysicsBody(circleOfRadius: 20) player.physicsBody?.isDynamic = true player.physicsBody?.categoryBitMask = PhysicsCategory.Player player.physicsBody?.contactTestBitMask = PhysicsCategory.Enemy player.physicsBody?.collisionBitMask = PhysicsCategory.None player.physicsBody?.usesPreciseCollisionDetection = true //playerObj.createSprite("player", name: "player") addChild(player) } func buildClouds() { for _ in 0..<10 { cloudObjects.append(Clouds(bounds: CGRect(x: background.position.x, y: background.position.y, width: background.size.width, height: background.size.height))) } for cloud in cloudObjects { cloud.createCloud("cloud", name: "cloud") screenScroller.addChild(cloud.cloud) } } func buildRocks() { buildCliffSide() //var side = 1 var yPos:CGFloat = topOfRocks - 300 for _ in 1...numRocks { rockObjects.append(Rocks(sideOfScrn: Int(CGFloat.random() * 2), yPos: yPos, bounds: rockBounds)) yPos -= CGFloat(200 * (maxLevels - level + 1)) /*if(side / 1 == 0) { side = 1 } else { side = 0 }*/ //rockObjects.append(Rocks(sideOfScrn: Int(CGFloat.random() * 2), yPos: (CGFloat.random(min: rockBounds.height * -1, max: topOfRocks)), bounds: rockBounds)) } for rock in rockObjects { rock.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: 400, height: 200)) rock.physicsBody?.isDynamic = true rock.physicsBody?.categoryBitMask = PhysicsCategory.Enemy //rock.physicsBody?.contactTestBitMask = PhysicsCategory.Player rock.physicsBody?.collisionBitMask = PhysicsCategory.None rock.physicsBody?.usesPreciseCollisionDetection = true screenScroller.addChild(rock) } } func buildGround() { let ground:SKSpriteNode = SKSpriteNode(imageNamed: "grass") ground.name = "ground" ground.position = CGPoint(x: cameraPosition.x, y: cameraPosition.y - 300) ground.size.width *= 3 ground.size.height *= 20.0 ground.zPosition = 101 //ground.alpha = CGFloat(1/(CGFloat(level) * 0.5)) ground.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: ground.size.width, height: ground.size.height)) ground.physicsBody?.isDynamic = true ground.physicsBody?.categoryBitMask = PhysicsCategory.Ground ground.physicsBody?.collisionBitMask = PhysicsCategory.None ground.physicsBody?.usesPreciseCollisionDetection = true screenScroller.addChild(ground) } func buildCliffSide() { //let cliffSideLeft:SKSpriteNode = SKSpriteNode(imageNamed: "cliffSide_Tileable") for i in 1...level+1 { if(i < level+1) { let cliffSideLeft:SKSpriteNode = SKSpriteNode(imageNamed: "cliffSide_Tileable") cliffSideLeft.name = "cliff" cliffSideLeft.position = CGPoint(x: 200, y: (cameraPosition.y - 325) + CGFloat(i * 800)) cliffSideLeft.size.height *= 2 cliffSideLeft.size.width *= -1 cliffSideLeft.zPosition = 103 cliffSideLeft.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: 200, height: cliffSideLeft.size.height), center: CGPoint(x: -100, y: 0)) cliffSideLeft.physicsBody?.isDynamic = false cliffSideLeft.physicsBody?.categoryBitMask = PhysicsCategory.Enemy //cliffSideLeft.physicsBody?.contactTestBitMask = PhysicsCategory.Player cliffSideLeft.physicsBody?.collisionBitMask = PhysicsCategory.None cliffSideLeft.physicsBody?.usesPreciseCollisionDetection = true let cliffSideRight:SKSpriteNode = SKSpriteNode(imageNamed: "cliffSide_Tileable") cliffSideRight.name = "cliff" cliffSideRight.position = CGPoint(x: rockBounds.width + 100, y: (cameraPosition.y - 325) + CGFloat(i * 800)) cliffSideRight.size.height *= 2 cliffSideRight.zPosition = 103 cliffSideRight.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: 200, height: cliffSideRight.size.height), center: CGPoint(x: 100, y: 0)) cliffSideRight.physicsBody?.isDynamic = false cliffSideRight.physicsBody?.categoryBitMask = PhysicsCategory.Enemy //cliffSideRight.physicsBody?.contactTestBitMask = PhysicsCategory.Player cliffSideRight.physicsBody?.collisionBitMask = PhysicsCategory.None cliffSideRight.physicsBody?.usesPreciseCollisionDetection = true screenScroller.addChild(cliffSideLeft) screenScroller.addChild(cliffSideRight) } else { let cliffSideLeftTop:SKSpriteNode = SKSpriteNode(imageNamed: "cliffSide_Top") cliffSideLeftTop.name = "cliff" cliffSideLeftTop.position = CGPoint(x: 200, y: (cameraPosition.y - 358) + CGFloat(i * 800)) cliffSideLeftTop.size.height *= 1 cliffSideLeftTop.size.width *= -1 cliffSideLeftTop.zPosition = 103 cliffSideLeftTop.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: 200, height: 200), center: CGPoint(x: -100, y: -150)) cliffSideLeftTop.physicsBody?.isDynamic = false cliffSideLeftTop.physicsBody?.categoryBitMask = PhysicsCategory.Enemy //cliffSideLeftTop.physicsBody?.contactTestBitMask = PhysicsCategory.Player cliffSideLeftTop.physicsBody?.collisionBitMask = PhysicsCategory.None cliffSideLeftTop.physicsBody?.usesPreciseCollisionDetection = true let cliffSideRightTop:SKSpriteNode = SKSpriteNode(imageNamed: "cliffSide_Top") cliffSideRightTop.name = "cliff" cliffSideRightTop.position = CGPoint(x: rockBounds.width + 100, y: (cameraPosition.y - 358) + CGFloat(i * 800)) cliffSideRightTop.size.height *= 1 cliffSideRightTop.size.width *= 1 cliffSideRightTop.zPosition = 103 cliffSideRightTop.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: 200, height: 200), center: CGPoint(x: 100, y: -150)) cliffSideRightTop.physicsBody?.isDynamic = false cliffSideRightTop.physicsBody?.categoryBitMask = PhysicsCategory.Enemy //cliffSideRightTop.physicsBody?.contactTestBitMask = PhysicsCategory.Player cliffSideRightTop.physicsBody?.collisionBitMask = PhysicsCategory.None cliffSideRightTop.physicsBody?.usesPreciseCollisionDetection = true screenScroller.addChild(cliffSideLeftTop) screenScroller.addChild(cliffSideRightTop) topOfRocks = cliffSideLeftTop.position.y } } } func buildBirds() { for _ in 1...level+1 { let bird = SKSpriteNode(imageNamed: "bird01") bird.name = "bird" bird.position = CGPoint(x: CGFloat.random(min: 0, max: playableRect.width), y: CGFloat.random(min: CGFloat(-800 * level), max: 0)) bird.zPosition = 1000 bird.physicsBody = SKPhysicsBody(circleOfRadius: 50) bird.physicsBody?.isDynamic = false bird.physicsBody?.categoryBitMask = PhysicsCategory.Enemy bird.physicsBody?.collisionBitMask = PhysicsCategory.None bird.physicsBody?.usesPreciseCollisionDetection = true screenScroller.addChild(bird) var inverse = Int(CGFloat.random()) if(inverse == 0) { inverse = -1 } let actionMove = SKAction.moveBy(x: playableRect.width * CGFloat.random() * CGFloat(inverse), y: 0, duration: 1.5) let actionReverseMove = actionMove.reversed() bird.run(SKAction.repeatForever(SKAction.sequence([actionMove, actionReverseMove]))) } } func calculateDeltaTime(_ currentTime: TimeInterval) { if lastUpdateTime > 0 { dt = currentTime - lastUpdateTime } else { dt = 0 } lastUpdateTime = currentTime } func calculateDistToBottom() -> CGFloat { return 0 } //MARK: -Move Sprites - //move the player //accelerometer func movePlayer(_ dt:CGFloat) { //var xVelocity = gravityVector.x * 2 //xVelocity = xVelocity < -1 ? -1 : xVelocity // -1.0 = 45 degrees left rotation //xVelocity = xVelocity > 1 ? 1 : xVelocity // +1.0 = 45 degrees right rotation //bounds check // future postion //player.position V player.boundsCheckPlayer(playableRect) player.move(dt, bounds: playableRect) } func moveScene(_ dt:CGFloat) { playerVelocity = (playerVelocity + 350) * dt // 350 screenScroller.run(SKAction.move(by: CGVector(dx: 0, dy: playerVelocity), duration: 0.001)) } func slowMoveScene(_ dt:CGFloat, decel:CGFloat) { playerVelocity = (playerVelocity + decel) * dt // 350 screenScroller.run(SKAction.move(by: CGVector(dx: 0, dy: playerVelocity), duration: 0.001)) if(distToBottom <= 0) { playerCanMove = false gameState = GAME_STATE.ROUND_OVER setupUI() } } // MARK: touches override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { if(gameState == GAME_STATE.GAME_OVER) { level = 1 let scene = Menu(size:CGSize(width: 1080, height: 1920)) let skView = self.view as SKView! //skView.showsFPS = true //skView.showsNodeCount = true skView?.ignoresSiblingOrder = true scene.scaleMode = .aspectFill let transition = SKTransition.crossFade(withDuration: 1.0) skView?.presentScene(scene, transition: transition) } else if(gameState == GAME_STATE.ROUND_OVER) { level += 1 var scene:SKScene! if(level > maxLevels) { scene = Menu(size:CGSize(width: 1080, height: 1920)) } else { scene = GameScene(size:CGSize(width: 1080, height: 1920)) } let skView = self.view as SKView! //skView.showsFPS = true //skView.showsNodeCount = true skView?.ignoresSiblingOrder = true scene.scaleMode = .aspectFill let transition = SKTransition.crossFade(withDuration: 1.0) skView?.presentScene(scene, transition: transition) } } override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) { touchesMoved = true } override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { if(touchesMoved) { touchesMoved = false } else { } } override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { } func overlapAmount() -> CGFloat { guard let view = self.view else { return 0 } let scale = view.bounds.size.width / self.size.width let scaledHeight = self.size.height * scale let scaledOverlap = scaledHeight - view.bounds.size.height return scaledOverlap } //MARK: Camera func getCameraPosition() -> CGPoint { return CGPoint(x: cameraNode.position.x, y: cameraNode.position.y + overlapAmount()/2) } func setCameraPosition(_ position:CGPoint) { cameraNode.position = CGPoint(x: position.x, y: position.y - overlapAmount()/2) } func moveCamera(_ movement:CGPoint) { let bgVelocity = movement * CGFloat(dt) cameraNode.position = bgVelocity } //MARK: Collision physics func didBegin(_ contact: SKPhysicsContact) { var firstBody:SKPhysicsBody var secondBody:SKPhysicsBody if(contact.bodyA.categoryBitMask < contact.bodyB.categoryBitMask) { firstBody = contact.bodyA secondBody = contact.bodyB } else { firstBody = contact.bodyB secondBody = contact.bodyA } if((firstBody.categoryBitMask & PhysicsCategory.Enemy != 0) && (secondBody.categoryBitMask & PhysicsCategory.Player != 0)) { print(firstBody.categoryBitMask) print(secondBody.categoryBitMask) playerCollidedElse(firstBody.node as! SKSpriteNode, other: secondBody.node as! SKSpriteNode) } } }
[ -1 ]
4cc32e8dcac849ed9d37b4a9f1bd49365592d67a
26b7d6bf17c65f5c5bce59bb20dab667510ad986
/DesafioNoticias/Resourses/SceneDelegate.swift
31bbc5fecce6e9d44303a2e80cb62c465d3fc417
[]
no_license
RicardoSLopes/News-MVVM-C
aae94428ae8085f19291fc93bc5c04dcc1468d27
22fc983188ae1c61b2f1c1fc102c441b7edaddb8
refs/heads/main
2023-05-11T13:58:09.403210
2021-06-03T22:30:01
2021-06-03T22:30:01
373,252,611
0
0
null
null
null
null
UTF-8
Swift
false
false
2,623
swift
// // SceneDelegate.swift // DesafioNoticias // // Created by Ricardo Santana on 31/05/21. // 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). let navigation = UINavigationController() let coordinator = CategoryCoordinator(UINavigationController: navigation) coordinator.start() guard let wScene = (scene as? UIWindowScene) else { return } window = UIWindow(windowScene: wScene) window?.rootViewController = navigation window?.makeKeyAndVisible() } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 163849, 354314, 268299, 333838, 346140, 405534, 352294, 344103, 178221, 266295, 213049, 266298, 376890, 16444, 436290, 254020, 243782, 217158, 421961, 395340, 254032, 374865, 286804, 338005, 356440, 329816, 217180, 254045, 342113, 180322, 100454, 266351, 368753, 286833, 356467, 252021, 374904, 286845, 266365, 329853, 192640, 329857, 286851, 417925, 266375, 262284, 329868, 381069, 225425, 268435, 250003, 225430, 356507, 411806, 135328, 346273, 192674, 225442, 438434, 225445, 362661, 286880, 225448, 438441, 286889, 225451, 377003, 100525, 258223, 430257, 387250, 225459, 377013, 225462, 379067, 225468, 164029, 387261, 389309, 225472, 334012, 180418, 225476, 395467, 225485, 346317, 225488, 225491, 266454, 377047, 411862, 225497, 411865, 418008, 225500, 418012, 211161, 368854, 334047, 225506, 411874, 356580, 411877, 225511, 377063, 338154, 225515, 327915, 205037, 225519, 338161, 393457, 375027, 387314, 358645, 393461, 381177, 393466, 436474, 418044, 321787, 336124, 379135, 336129, 397572, 389381, 325895, 268553, 180491, 336140, 411917, 43279, 268560, 262417, 395539, 262423, 387353, 381212, 258333, 325918, 182559, 325920, 338212, 262437, 266537, 389417, 254253, 358701, 391469, 248112, 332081, 358705, 395567, 340276, 307507, 262455, 358714, 358717, 225599, 332098, 393539, 201030, 362823, 262473, 348489, 332107, 151884, 436556, 190797, 358738, 334162, 344404, 136024, 430422, 348503, 321880, 418135, 332118, 250201, 332126, 262497, 418145, 250211, 383331, 262501, 383334, 332130, 340328, 250217, 213354, 348523, 246124, 262508, 383342, 391531, 348528, 354674, 182642, 321911, 332153, 334204, 268669, 194942, 213374, 356734, 389503, 438657, 389507, 348548, 356741, 385420, 391564, 393613, 332175, 379279, 383375, 272787, 262551, 262553, 373146, 340380, 268702, 342431, 416159, 262567, 354728, 375209, 326059, 262574, 338353, 373169, 334263, 262587, 266688, 262593, 344512, 201158, 326087, 358857, 338382, 338387, 360917, 256474, 369119, 195041, 182755, 334312, 104940, 375279, 127473, 162289, 328180, 328183, 340473, 199165, 328190, 254463, 324095, 328193, 324100, 350724, 266757, 324103, 164362, 330254, 328207, 324112, 410129, 186898, 342546, 350740, 340501, 324118, 420377, 324122, 342555, 330268, 377372, 334364, 188959, 385571, 332325, 324134, 416294, 377384, 350762, 381483, 324141, 252463, 324143, 358962, 334386, 356917, 324150, 352822, 270905, 168509, 334397, 348734, 324161, 252483, 324165, 356935, 369224, 348745, 381513, 324171, 352844, 324174, 330320, 324177, 199250, 334425, 332381, 326240, 352865, 346722, 373344, 340580, 262761, 375401, 248427, 352875, 381546, 191085, 346736, 191093, 344694, 352888, 268922, 336513, 334466, 334469, 385671, 162446, 330384, 326291, 340628, 352919, 342680, 98969, 342685, 260767, 340639, 332455, 150184, 344745, 361130, 271018, 336556, 332460, 389806, 332464, 385714, 434868, 164535, 342711, 332473, 244410, 164539, 248505, 336568, 260798, 363198, 223936, 334530, 332484, 350918, 352969, 373450, 418508, 154318, 332494, 357070, 357074, 273109, 264919, 154329, 139998, 183006, 332512, 189154, 338661, 332521, 338665, 361196, 113389, 264942, 418540, 330479, 342769, 203508, 340724, 332534, 363252, 338680, 375541, 418555, 348926, 344832, 391938, 336644, 264965, 344837, 207620, 191240, 344843, 391949, 375569, 394002, 326417, 336660, 375572, 338712, 434971, 262943, 162592, 369439, 396067, 336676, 346917, 396070, 389927, 334633, 355123, 348979, 152371, 326452, 326455, 369464, 348983, 361274, 398141, 244542, 260925, 326463, 328516, 355141, 326468, 127815, 328520, 336712, 342857, 328523, 338764, 355144, 361289, 326474, 326479, 389971, 361300, 326486, 416599, 357208, 387929, 426842, 342875, 244572, 361307, 361310, 355167, 265056, 357215, 389979, 430940, 326494, 439138, 361318, 326503, 355176, 375657, 361323, 355180, 326508, 326511, 349041, 340850, 355185, 330612, 361335, 211832, 324473, 381815, 340859, 324476, 398202, 328574, 324479, 340863, 252801, 260993, 324482, 351102, 324485, 400260, 373635, 324488, 342921, 185226, 369544, 381834, 324493, 324496, 236432, 361361, 324499, 430996, 330643, 252823, 400286, 324511, 422817, 252838, 359335, 373672, 324525, 222129, 400307, 324534, 412600, 324539, 324542, 351169, 359362, 170950, 187335, 326599, 349129, 347082, 359367, 345036, 379849, 398280, 340940, 209874, 330711, 359389, 248799, 431073, 437219, 340964, 386023, 209896, 343018, 201712, 209904, 359411, 435188, 261109, 349173, 261112, 265208, 381947, 201724, 349181, 431100, 328703, 383999, 330750, 265215, 431107, 328710, 338951, 330761, 261130, 377867, 326669, 330769, 361490, 349203, 386070, 330775, 209944, 261148, 359452, 248863, 377888, 261155, 250915, 250917, 357411, 158759, 261160, 396329, 347178, 357419, 214060, 209966, 359471, 404526, 209969, 396337, 345139, 396340, 209973, 361525, 386102, 209976, 388155, 209980, 375868, 361537, 339010, 209988, 347208, 330827, 377931, 431180, 341072, 349268, 189525, 345172, 183384, 156762, 210011, 343132, 373853, 361568, 257121, 351105, 322660, 384102, 210026, 384108, 187503, 210032, 345200, 349296, 343155, 384115, 210037, 326767, 248952, 386168, 361594, 410746, 210045, 349309, 361599, 349313, 210053, 330886, 345224, 384136, 330890, 384140, 384144, 259217, 373905, 210068, 351382, 210072, 384152, 248986, 337048, 210078, 345247, 384161, 210085, 251045, 44199, 351399, 210089, 380071, 384169, 339118, 337072, 367795, 210100, 345268, 384182, 337076, 361657, 249018, 367801, 210108, 339133, 384189, 384192, 357571, 126148, 210116, 367817, 244938, 384202, 253132, 326858, 322763, 343246, 210128, 333010, 146644, 210132, 333016, 265433, 210139, 328925, 165086, 265438, 210144, 384225, 66783, 328933, 222438, 343272, 359660, 363757, 328942, 218355, 384247, 351480, 218361, 384250, 351483, 388348, 275709, 339199, 275713, 206084, 275717, 328967, 396552, 275723, 343307, 384270, 359695, 175376, 261395, 333075, 349460, 384276, 333079, 384284, 345377, 384290, 345380, 175397, 353572, 345383, 245032, 208167, 263464, 384299, 273709, 349486, 351535, 372016, 437553, 245042, 347442, 349492, 337207, 175416, 345400, 326970, 396601, 415034, 386366, 437567, 175425, 437571, 384324, 343366, 126279, 212296, 437576, 337224, 251211, 357710, 437584, 331089, 337235, 437588, 210261, 263509, 331094, 175451, 359296, 367966, 259423, 429408, 374113, 175458, 353634, 251236, 175461, 208228, 175464, 345449, 99692, 265581, 333164, 343410, 271731, 234867, 155000, 249210, 175484, 337278, 175487, 271746, 175491, 353674, 155021, 361869, 384398, 136591, 245137, 181650, 374161, 112021, 181655, 349591, 175514, 175517, 343453, 245152, 357793, 396706, 175523, 245155, 155045, 245158, 333222, 263585, 40358, 245163, 181682, 337330, 343478, 181687, 370105, 359867, 259516, 384444, 388543, 361922, 337350, 327112, 384457, 327116, 339406, 359887, 327118, 208338, 359891, 366035, 343509, 337366, 249303, 339414, 366039, 413143, 415192, 415194, 339421, 368093, 155103, 415197, 339425, 415200, 339429, 329192, 415208, 339435, 343535, 366064, 249329, 415217, 116211, 343540, 430967, 337399, 368120, 343545, 69114, 423424, 409092, 372229, 253445, 337416, 339464, 329227, 359948, 419341, 430973, 359951, 249355, 419345, 329234, 175637, 419351, 405017, 345626, 415258, 419357, 345631, 415264, 419360, 394787, 366118, 370214, 415271, 419369, 144940, 394796, 415279, 339504, 419377, 415282, 265779, 349748, 415286, 210488, 419386, 415291, 206397, 421442, 413251, 265796, 214594, 419401, 333387, 353868, 419404, 265806, 173648, 419408, 333396, 419412, 224854, 400982, 333400, 179803, 366173, 339553, 257636, 345702, 372328, 423529, 423533, 245358, 138865, 372338, 210547, 224885, 370298, 224891, 415354, 224895, 353920, 372354, 126597, 267910, 224905, 155274, 345737, 11919, 224911, 159375, 224914, 403092, 224917, 345750, 224920, 267929, 126618, 208539, 224923, 345758, 224927, 333472, 368289, 224930, 345763, 419492, 224933, 345766, 425639, 257705, 419498, 224939, 419502, 224943, 257713, 419507, 425652, 224949, 419510, 257721, 224954, 419513, 155323, 257725, 333499, 425663, 155328, 337601, 339827, 403139, 257733, 337607, 419528, 210632, 419531, 257740, 339664, 257745, 257748, 358100, 224982, 394967, 155352, 257752, 419543, 224987, 155356, 419545, 419548, 333535, 419551, 153311, 257762, 181982, 155364, 345829, 225000, 419560, 337643, 155372, 419564, 431852, 245487, 339696, 210673, 212723, 245495, 225021, 333566, 339711, 337661, 155394, 225027, 341877, 268042, 339722, 155404, 210700, 362252, 225039, 362256, 249617, 366349, 210707, 225044, 167701, 372500, 395022, 245528, 225049, 257820, 225054, 155423, 184096, 210720, 345888, 360224, 339748, 397089, 362274, 378664, 257834, 225068, 155439, 204592, 366384, 225074, 155444, 210740, 225077, 366388, 372533, 358201, 225083, 345916, 384831, 225088, 325441, 354112, 366403, 247618, 155463, 325447, 341831, 341835, 354124, 337743, 225105, 341844, 155477, 225109, 247639, 337751, 370520, 415574, 358235, 155484, 313181, 261982, 350046, 155488, 354143, 376672, 425823, 155492, 341852, 413539, 399208, 339818, 327532, 261997, 354157, 376686, 262000, 268144, 358256, 262003, 358260, 257902, 425846, 399222, 262006, 147319, 325494, 262009, 1914, 327542, 262012, 155517, 225150, 333690, 354173, 325505, 155523, 380803, 339845, 155526, 360327, 243584, 333699, 376715, 395148, 155532, 247692, 225166, 262028, 262031, 333709, 262034, 225171, 337809, 247701, 397201, 380823, 225176, 262040, 262043, 329625, 262049, 262052, 327590, 247720, 337834, 155563, 155566, 362414, 382898, 337845, 190393, 327613, 393152, 350153, 346059, 358348, 311244, 247760, 333777, 346064, 393170, 155604, 346069, 219094, 354132, 372704, 329699, 155620, 253924, 155622, 253927, 190440, 354275, 358372, 372707, 247790, 356336, 360432, 204785, 380919, 333819, 155647 ]
1af8b9353c6fab22ca01a41b73d13c2c02dcfa9a
45f12df25b21c623ee40c7c7e4d7ba8d0b93131c
/MagicalNewsPaper/StartPointViewController.swift
99b4fea9ab4278c272ebffc131d22b307bf72cf6
[]
no_license
rsshrivastava7/MagicalNewsPaper
ace09a91d5f0e53861208dde07af203b08453860
890443d70865979fa8655157c8e240c432674c75
refs/heads/master
2020-06-16T03:13:41.633911
2019-07-05T22:22:08
2019-07-05T22:22:08
195,463,349
0
0
null
null
null
null
UTF-8
Swift
false
false
374
swift
// // StartPointViewController.swift // MagicalNewsPaper // // Created by Megha Patel on 3/20/19. // Copyright © 2019 Rishi Shrivastava. All rights reserved. // import UIKit class StartPointViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } }
[ 318162, 316317, 336994, 337007 ]
b3f2f9b12d0caa1b38b4bccde1f27c97d03674a8
811026f69b6d16910ad06da411cb2348d3135d8b
/Apple Juice/BatteryImageCache.swift
35c6aa9fd0936457d965e3c7726d56661923783e
[ "MIT" ]
permissive
rsumner868/apple-juice
e9ad0e0735c40e4b4af0f6d684ed1ebc6516ef54
5149add3eb1346c045f5998159e5506627f834a8
refs/heads/master
2020-03-30T04:18:36.769223
2018-10-12T06:59:01
2018-10-12T06:59:01
150,736,145
0
0
null
null
null
null
UTF-8
Swift
false
false
2,275
swift
// // BatteryImageCache.swift // Apple Juice // https://github.com/raphaelhanneken/apple-juice // // The MIT License (MIT) // // Copyright (c) 2015 Raphael Hanneken // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. import Cocoa /// Caches a battery image. internal struct BatteryImageCache { /// Holds the cached battery image. let image: NSImage? /// Holds the corresponding BatteryStatusType for the cached image. let batteryStatus: BatteryStatusType /// Holds the percentage the image was drawn for. let percentage: Int? /// Initializes a new BatteryImageCache object. /// /// - status: The BatteryStatusType. /// - img: The corresponding battery image. /// - percentage: The percentage the battery image was drawn for. init(forStatus status: BatteryStatusType, withImage img: NSImage?, andPercentage percentage: Int?) { self.batteryStatus = status self.image = img self.percentage = percentage } /// Initialize a new BatteryImageCache object. /// /// - status: The BatteryStatusType. /// - img: The Battery image. init(forStatus status: BatteryStatusType, withImage img: NSImage?) { self.init(forStatus: status, withImage: img, andPercentage: nil) } }
[ -1 ]
2c46fe89518d7be197993d3e9aa066dc06cfa83b
598c0fd9f6f96e7385dbea396f1bcaf49163eef5
/ProtraitShop/Models/PSPoiService.swift
6ec6a6af7769c462bc4175477cd9f6f39eb531c3
[]
no_license
lihuichaoo/ProtraitShop
87fceaac0d18652ace668fb8ea989587a8a8a5b1
2f0082d7df7213116dc86e883bd06dbcf796d0d3
refs/heads/master
2021-05-28T12:04:29.514810
2015-05-09T04:28:04
2015-05-09T04:28:04
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,344
swift
// // PSPoiService.swift // ProtraitShop // // Created by aochuih on 15/5/1. // Copyright (c) 2015年 NightWind. All rights reserved. // import UIKit class PSPoiService: PSBaseService { func fetchPoiList(userName: String, completionHandler: ([PSPoi], NSError?) -> Void) { requestForJsonRespond(Method.POST, path: "api/v1/shopList/", parameters: [:]) { (resultDictionary, respondError) in if (respondError != nil) { completionHandler([], respondError) } let poiArray: [PSPoi] = (resultDictionary!["data"] as! [NSDictionary]).map { PSPoi(dictionary: ($0 as NSDictionary)) } completionHandler(poiArray,nil) } } func getPoiDetail(userID: String, poiID: String, completionHandler:(poiDetail: PSPoi?, NSError?) -> Void) { requestForJsonRespond(Method.POST, path: "api/v1/shopDetail/", parameters: [ "userId": userID, "id": poiID]) { (resultDictionary, respondError) in if (respondError != nil) { completionHandler(poiDetail: nil, respondError) } var poiDetail = PSPoi(dictionary: resultDictionary!) completionHandler(poiDetail: poiDetail, nil) } } }
[ -1 ]
8363415e54f4e93c0393902e7caaf51599b35787
49b998803fa30f10074870f870920abbb1602838
/client/Things In My Fridge/Things In My Fridge/ContentView.swift
61d06fb33854665b2bce041dcf37be4f3be47bd0
[ "MIT" ]
permissive
timwford/things_in_my_fridge
4bf88d5f7807b5281efec4a68616235cbf32d803
db44e8a44a16b568a9d0faaba8519674d138d15b
refs/heads/main
2023-03-10T00:46:47.203211
2021-02-15T05:09:18
2021-02-15T05:09:18
337,906,920
0
0
null
null
null
null
UTF-8
Swift
false
false
1,821
swift
// // ContentView.swift // Things In My Fridge // // Created by Tim Ford on 2/10/21. // import SwiftUI struct ContentView: View { @ObservedObject var foodModel = FoodModel.shared @State var isPuttingFoodInFridge = false var body: some View { NavigationView { ScrollView(showsIndicators: false) { Button(action: { isPuttingFoodInFridge = true }, label: { Text("~~🐲~~").font(.largeTitle).shadow(radius: 8).padding(8) }) Text("Fridge").bold().font(.largeTitle) VStack { NavigationLink(destination: CreateFoodView(isPresented: $isPuttingFoodInFridge), isActive: $isPuttingFoodInFridge, label: { EmptyView() }) ForEach(foodModel.in_the_fridge) { food in if !food.freezer { FoodSeparatorView(color: FoodView.getColorForSpoiled(food)) FoodView(food: food) } } } Text("Freezer").bold().font(.largeTitle).padding(.top) VStack { ForEach(foodModel.in_the_fridge) { food in if food.freezer { FoodView(food: food) } } } }.padding([.horizontal], 8).navigationBarTitle("Food Stuffs").navigationBarTitleDisplayMode(.large) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
[ -1 ]
d9b289862095f23270dc32e36bb20d81960af880
5d4da70ff81e032d72a3bd2273eb58efbb4087ad
/MoviesBook/View/AppDelegate.swift
4ae4341eec7dbee65e9c60bb6d3b878b7dd580dc
[]
no_license
BetulDemirci/MoviesBook
6c3d8438175e454c265a0099667b6a23db66b383
078cde75867ec1209027f01c2fce7837d2670abd
refs/heads/master
2022-12-20T11:58:58.589828
2020-10-04T22:13:35
2020-10-04T22:13:35
301,238,538
0
0
null
null
null
null
UTF-8
Swift
false
false
1,411
swift
// // AppDelegate.swift // MoviesBook // // Created by Semafor on 2.10.2020. // Copyright © 2020 Semafor. 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, 393230, 393250, 344102, 393261, 163891, 213048, 385081, 376905, 327756, 254030, 286800, 368727, 368735, 180320, 376931, 286831, 368752, 286844, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 262472, 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, 197159, 352821, 188987, 418363, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 336512, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 434867, 164534, 336567, 328378, 328386, 352968, 344776, 418507, 385742, 385748, 361179, 139997, 189153, 369381, 361195, 344831, 336643, 344835, 344841, 361230, 336659, 434970, 369435, 262942, 336675, 328484, 336696, 361273, 328515, 336708, 328519, 336711, 328522, 336714, 426841, 254812, 361309, 197468, 361315, 361322, 328573, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 386258, 328924, 66782, 222437, 328941, 386285, 386291, 345376, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 353673, 181643, 181654, 230809, 181670, 181673, 181678, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 206395, 214593, 419400, 419402, 353867, 419406, 214610, 419410, 345701, 394853, 222830, 370297, 403070, 403075, 345736, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 337599, 419527, 419530, 419535, 419542, 394966, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 337659, 141051, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 378954, 395339, 338004, 329832, 329855, 329867, 329885, 346272, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 248111, 362822, 436555, 190796, 321879, 354673, 321910, 248186, 420236, 379278, 354727, 338352, 330189, 338381, 338386, 338403, 338409, 248308, 199164, 330252, 420376, 330267, 354855, 10828, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 248504, 223934, 355024, 273108, 264918, 183005, 256734, 338660, 338664, 264941, 207619, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 330748, 330760, 330768, 248862, 396328, 158761, 199728, 396336, 330800, 396339, 339001, 388154, 388161, 248904, 330826, 248914, 183383, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330965, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339424, 249312, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 257633, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 339588, 224904, 11918, 159374, 224913, 126610, 339601, 224916, 224919, 126616, 224922, 208538, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 257724, 257732, 339662, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 225020, 339710, 225025, 339721, 225038, 225043, 372499, 167700, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 225066, 257836, 413484, 225070, 225073, 372532, 397112, 225082, 397115, 225087, 323402, 257868, 225103, 257871, 397139, 225108, 257886, 257896, 274280, 257912, 225148, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 217157, 421960, 356439, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 266453, 225493, 225496, 225502, 225505, 356578, 225510, 225514, 372976, 381176, 397571, 389380, 356637, 356640, 356643, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 389502, 250238, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 381512, 324170, 324173, 324176, 332380, 373343, 381545, 340627, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389892, 373510, 389926, 152370, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 119674, 340858, 324475, 430972, 340861, 324478, 324481, 373634, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 340963, 381946, 349180, 439294, 431106, 209943, 209946, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210039, 341113, 349308, 210044, 349311, 152703, 160895, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 251044, 210084, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 218360, 251128, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 251189, 415033, 251210, 357708, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 136590, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 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, 333498, 210631, 333511, 358099, 153302, 333534, 431851, 366318, 210672, 366321, 210695, 268041, 210698, 210706, 399128, 333594, 210719, 358191, 366387, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 399206, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 350202, 333818, 350206, 350213, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 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, 366990, 416157, 342430, 268701, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334420, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 391894, 154328, 416473, 64230, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 162591, 326441, 326451, 326454, 326460, 244540, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 244726, 383997, 359451, 211998, 359470, 359476, 343131, 384098, 384101, 384107, 367723, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 384151, 384160, 384168, 367794, 244916, 384181, 384188, 384191, 351423, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 343270, 351466, 384246, 351479, 343306, 261389, 359694, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 425276, 384323, 343365, 212303, 343393, 343398, 425328, 343409, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 359947, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 155322, 425662, 155327, 245460, 155351, 155354, 212699, 245475, 155363, 245483, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 262005, 147317, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 253926, 327654, 204784, 360438, 253943, 393212, 155646 ]
389d55031a57b2a7da008f7a5f66c6d3c9e4d7f9
6e0bcb26681051913efd6cca2bfc9bd4e4446e2d
/HappyDay/Items/Profile/Users/profileItemTableViewCell.swift
1c1a6b59366e99dfd8b5fd5d4cdffc8cf3e49e91
[]
no_license
ksmks0921/datingAPP_ios
80cd96dd5822664ce30b4ac580f4ce6ccfaa241b
af0da6694d15a24e8916a93d697958071b972b2a
refs/heads/master
2020-12-10T16:04:29.323627
2020-08-06T14:05:36
2020-08-06T14:05:36
233,639,122
1
0
null
null
null
null
UTF-8
Swift
false
false
630
swift
// // profileItemTableViewCell.swift // HappyDay // // Created by Panda Star on 1/17/20. // Copyright © 2020 Panda Star. All rights reserved. // import UIKit class profileItemTableViewCell: UITableViewCell { @IBOutlet weak var property: UILabel! @IBOutlet weak var value: UILabel! @IBOutlet weak var icon: UIImageView! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 237542, 237544, 179568, 179578, 179580 ]
25a82f1be061b6bad3d5010d1b9ecddf712cdefe
97c79f9cf4244e3b8bb011c280d96407b079ab89
/SOLID principles/Services/DataStore.swift
4dcfbea264fc7e891bbfd2a35807bc020e48a9f7
[]
no_license
vokhstag/SOLID-principles
33ce117bd629e1fa5913756cb34915d5dd389165
206d8171359deb45d8d5d6168a5bb5933167cd6f
refs/heads/master
2021-01-04T13:12:10.754168
2020-02-15T19:44:27
2020-02-15T19:44:27
240,566,102
0
0
null
null
null
null
UTF-8
Swift
false
false
366
swift
// // DataStore.swift // SOLID principles // // Created by Vokh Stag on 14/02/2020. // Copyright © 2020 Vokh Stag. All rights reserved. // import Foundation struct DataStore { func saveNameInCache(name: String) { print ("Your name: \(name) is saved") } func getNameFromCache() -> String { return "some name" } }
[ -1 ]
ced04d9fa5cd51d4160c40a1409119d69079f28e
87342b428a02a10fc406c8919174d9540f6cc509
/Memorize/AppDelegate.swift
4481757c2ae06bd49fe5fe9826f4eadc25ff6b56
[]
no_license
hisgarden/Memorize
b17c545d808fdcbab3da388e9ae7c16ff4fadb23
154eb5a95c0c9084420562ead752b7dc1155cb4c
refs/heads/master
2022-12-05T18:34:16.793707
2020-08-17T02:51:20
2020-08-17T02:51:20
288,034,745
0
0
null
null
null
null
UTF-8
Swift
false
false
1,409
swift
// // AppDelegate.swift // Memorize // // Created by Wen, Jin on 7/19/20. // Copyright © 2020 Wen, Jin. 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, 385081, 376889, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 393538, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 246123, 262507, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 328206, 393747, 254490, 188958, 385570, 33316, 197159, 377383, 352821, 188987, 418363, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 328378, 164538, 328386, 352968, 418507, 352971, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 361288, 328522, 336714, 426841, 254812, 361309, 197468, 361315, 361322, 328573, 377729, 369542, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 222437, 328941, 386285, 386291, 345376, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181654, 230809, 181670, 181673, 181678, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 214610, 419410, 345701, 394853, 222830, 370297, 353919, 403075, 345736, 198280, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 419517, 337599, 419527, 419530, 419535, 272081, 419542, 394966, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 141051, 337668, 362247, 395021, 362255, 321299, 395029, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 329544, 370509, 354130, 247637, 337750, 370519, 313180, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329867, 329885, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 248111, 362822, 436555, 190796, 321879, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 338409, 248308, 199164, 330252, 330267, 354855, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 436962, 338660, 338664, 264941, 207619, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 158761, 199728, 396336, 330800, 396339, 339001, 388154, 388161, 248904, 330826, 248914, 183383, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330965, 265436, 388319, 388347, 175375, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 437620, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 249312, 339428, 339434, 249328, 69113, 372228, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 339588, 224904, 11918, 159374, 224913, 126610, 339601, 224916, 224919, 126616, 224922, 208538, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 257724, 257732, 224969, 339662, 257747, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 372499, 167700, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 397112, 225082, 397115, 225087, 225092, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 225127, 257896, 274280, 257901, 225137, 257908, 225141, 257912, 257916, 225148, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 266297, 217157, 421960, 356439, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 192673, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 266453, 225493, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 397571, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 389502, 250238, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 340451, 160234, 127471, 340472, 324094, 266754, 324111, 340500, 324117, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 381512, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 184982, 373398, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389892, 373510, 389926, 152370, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 324472, 398201, 119674, 340858, 324475, 430972, 340861, 324478, 324481, 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, 209943, 209946, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 341113, 349308, 210044, 349311, 152703, 160895, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 251044, 210084, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 218360, 251128, 275706, 275712, 275715, 275721, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 210260, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 136590, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 415216, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 153227, 333498, 210631, 333511, 259788, 358099, 333534, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 210719, 358191, 366387, 210739, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 350202, 333818, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 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, 416157, 342430, 268701, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 391894, 154328, 416473, 64230, 342766, 342776, 391937, 391948, 375568, 326416, 375571, 162591, 326441, 326451, 326454, 326460, 244540, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 384107, 367723, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 384151, 384160, 384168, 367794, 244916, 384181, 367800, 384188, 384191, 351423, 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, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 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, 262005, 147317, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 253926, 327654, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
5d15fec5e72f0cf4a087ceecf7573e5819c86994
821895160576ff04abc6ab1b6b2392376b1f1435
/ShipTrackedTests/UPSServiceTests.swift
342f195b86d9a97a33a3edac65da317fb5bbd726
[]
no_license
tvluong1988/ShipTracked
ee86927f47f0d4219e93fe6482f497e2f44f234f
b10eb9e72ce34450d31fa54ab258f4a0c559db52
refs/heads/master
2021-01-17T16:41:02.005356
2016-07-30T14:28:32
2016-07-30T14:28:32
63,023,220
0
0
null
null
null
null
UTF-8
Swift
false
false
3,396
swift
// // UPSServiceManagerTests.swift // ShipTracked // // Created by Thinh Luong on 5/16/16. // Copyright © 2016 Thinh Luong. All rights reserved. // import Quick import Nimble @testable import ShipTracked class UPSServiceSpec: QuickSpec { override func spec() { // MARK: Properties var upsService: UPSService! let mockURLSession = MockURLSession() // JSON Production Endpoint let endpointURLProduction = "https://onlinetools.ups.com/json/Track" // JSON Testing Endpoint let endpointURLTesting = "https://wwwcie.ups.com/json/Track" let trackingNumber = "1Z202Y36A898759591" // MARK: Tests describe("given a UPSService") { beforeEach() { upsService = UPSService(session: mockURLSession) } afterEach() { upsService = nil } context("when requesting parcel info with a tracking number") { it("then it should send a HTTP Post request at the correct UPS endpoint") { upsService.requestParcelWithTrackingNumber(trackingNumber) { _,_,_ in return } expect(mockURLSession.lastRequest?.HTTPMethod).to(contain("POST")) expect(mockURLSession.lastRequest?.URL?.absoluteString).to(contain(endpointURLTesting)) expect(mockURLSession.nextDataTask.resumeWasCalled).to(beTrue()) } context("when response fails with mock error") { it("then it should receive mock error") { let expectedError = NSError(domain: "fake error", code: 1, userInfo: nil) mockURLSession.nextError = expectedError var actualError: NSError? upsService.requestParcelWithTrackingNumber(trackingNumber) { _,_,error in actualError = error } expect(actualError).toEventually(be(expectedError)) } } context("when response succeeds with mock received data") { it("then it should receive mock data") { let fakeJSON = ["fake_key": "fake_value"] let expectedData = try! NSJSONSerialization.dataWithJSONObject(fakeJSON, options: .PrettyPrinted) mockURLSession.nextData = expectedData var actualData: NSData? upsService.requestParcelWithTrackingNumber(trackingNumber) {data,_,_ in actualData = data } expect(actualData).toEventually(be(expectedData)) } } context("when response returns with mock response status") { it("then it should receive mock response status") { let expectedResponse = NSHTTPURLResponse(URL: NSURL(string: "fake_url")!, statusCode: 200, HTTPVersion: nil, headerFields: nil) mockURLSession.nextResponse = expectedResponse var actualResponse: NSHTTPURLResponse? upsService.requestParcelWithTrackingNumber(trackingNumber) { _,response,_ in actualResponse = response as? NSHTTPURLResponse } expect(actualResponse).to(be(expectedResponse)) } } } } } }
[ -1 ]
4b300c10288506183a94dca14f0b2f04999cedaf
ed9e9a050bebe613c98101be36060538c431be0c
/YandexTranslate/Utils/TranslateAPI.swift
f800afc44877809b767cf80aa42d3a3171007994
[]
no_license
XITRIX/Yandex.Translate
98b7bb5e3a5cb9a9426a0550905cbc0abe44465f
81dc1e7078135372ba8f03816a0013fe9671fe21
refs/heads/master
2020-04-07T06:34:58.481673
2018-11-26T20:44:47
2018-11-26T20:44:47
158,141,649
0
0
null
null
null
null
UTF-8
Swift
false
false
4,665
swift
// // TranslateAPI.swift // YandexTranslate // // Created by Daniil Vinogradov on 18/11/2018. // Copyright © 2018 NoNameDude. All rights reserved. // import UIKit class TranslateAPI { enum Language: String { case first = "ru" case second = "en" var opposit: Language { if self == .first { return .second } else { return .first } } var color: UIColor { if self == .first { return UIColor(red: 0.93, green: 0.3, blue: 0.36, alpha: 1) } else { return UIColor(red: 0, green: 0.49, blue: 0.91, alpha: 1) } } var title: String { if self == .first { return "Русский" } else { return "Английский" } } var locale: Locale { if self == .first { return Locale.init(identifier: "ru_RU") } else { return Locale.init(identifier: "en-US") } } } static func recogniseLanguage(text: String, completion: @escaping (Language?)->()) { let url = "https://translate.yandex.net/api/v1.5/tr.json/detect" var request = URLRequest(url: URL(string: url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)!) request.httpMethod = "POST" let postString = "key=\(ApiKeys.apiKey)&text=\(text.addingPercentEncoding(withAllowedCharacters: .alphanumerics)!)&hint=\(Language.first.rawValue),\(Language.second.rawValue)" request.httpBody = postString.data(using: .utf8) URLSession.shared.dataTask(with: request) { data, response, error in guard error == nil else { print(error.debugDescription) return } guard let data = data else { return } do { let jsonResponse = try JSONSerialization.jsonObject(with: data, options: []) guard let json = jsonResponse as? [String: Any], let code = json["code"] as? Int, let lang = json["lang"] as? String else { return } switch (code) { case 200: DispatchQueue.main.async { completion(Language(rawValue: lang)) } break default: break } } catch let error { print("Error", error) } }.resume() } static func translateText(_ text: String, from: Language, completion: @escaping (String?, Language?, Language?)->()) { recogniseLanguage(text: text) { (fromLang) in let fromLang = fromLang ?? from let toLang = fromLang.opposit let lang = "\(fromLang.rawValue)-\(toLang.rawValue)" let url = "https://translate.yandex.net/api/v1.5/tr.json/translate" var request = URLRequest(url: URL(string: url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)!) request.httpMethod = "POST" let postString = "key=\(ApiKeys.apiKey)&text=\(text.addingPercentEncoding(withAllowedCharacters: .alphanumerics)!)&lang=\(lang)" request.httpBody = postString.data(using: .utf8) URLSession.shared.dataTask(with: request) { data, response, error in guard error == nil else { print(error.debugDescription) return } guard let data = data else { return } do { let jsonResponse = try JSONSerialization.jsonObject(with: data, options: []) guard let json = jsonResponse as? [String: Any], let code = json["code"] as? Int, // let lang = json["lang"] as? String, let text = json["text"] as? [String] else { return } switch (code) { case 200: DispatchQueue.main.async { completion(text.first, fromLang, toLang) } break default: break } } catch let error { print("Error", error) } }.resume() } } }
[ -1 ]
30ca29514b5e8af52a669e35744b9bb4f98dd5c7
2d4cb673c9e1f1b5df60202d0a68fb002745cfdb
/tips/AppDelegate.swift
ffb50211dde1add300896c968c5979ce09e54910
[]
no_license
cshdllr/Codepath-pre-work-tips-app
ad40a4e4b787ced8d64adbb7966ddbb380f5bd83
3722a4b0124c46c5d41c4e3dba546ea9ecadf7c5
refs/heads/master
2016-08-11T14:48:54.572904
2015-10-11T23:00:16
2015-10-11T23:00:16
44,072,548
0
0
null
null
null
null
UTF-8
Swift
false
false
2,149
swift
// // AppDelegate.swift // tips // // Created by Jason Cashdollar on 10/6/15. // Copyright © 2015 Jason Cashdollar. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 352284, 278559, 229408, 278564, 294950, 229415, 229417, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 204856, 229432, 286776, 319544, 286791, 237640, 278605, 286797, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 327814, 131209, 417930, 303241, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 320007, 172550, 172552, 303623, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 189039, 189040, 352880, 295538, 172655, 189044, 287349, 172656, 172660, 287355, 287360, 295553, 287365, 311942, 303751, 295557, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 303773, 164509, 287390, 295583, 172702, 230045, 172705, 303780, 287394, 172707, 287398, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 328384, 287427, 312006, 107208, 279241, 107212, 172748, 287436, 172751, 287440, 295633, 303827, 172755, 279255, 172760, 279258, 287450, 213724, 303835, 189149, 303838, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 295685, 230154, 33548, 312077, 295695, 295701, 369433, 230169, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 303959, 279383, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 213902, 279438, 295822, 189329, 295825, 304019, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 304063, 238528, 304065, 189378, 213954, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 197645, 295949, 230413, 320528, 140312, 295961, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 304311, 230592, 279750, 312518, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 279788, 320748, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 296255, 312639, 230718, 296259, 378181, 238919, 296264, 320840, 230727, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 279929, 181626, 304505, 304506, 181631, 312711, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 279985, 173488, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 280014, 312783, 288208, 230865, 288210, 370130, 288212, 280021, 288214, 222676, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 296439, 288250, 148990, 296446, 402942, 206336, 296450, 321022, 230916, 230919, 214535, 370187, 304651, 304653, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 280260, 280264, 206536, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 321316, 304932, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 304968, 280393, 280402, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280458, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 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, 223303, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 223327, 149599, 149601, 149603, 321634, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 215154, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 182517, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 313705, 280940, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 223749, 305668, 281095, 223752, 150025, 338440, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 281210, 297594, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 199367, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 240535, 289687, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 281923, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 306555, 314747, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 224657, 306581, 314779, 314785, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 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, 282410, 241450, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 159545, 298811, 307009, 413506, 241475, 307012, 148946, 315211, 282446, 307027, 315221, 282454, 315223, 241496, 323414, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 298860, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 241556, 44948, 298901, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 178273, 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, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 184503, 307385, 307386, 258235, 176316, 307388, 307390, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 307510, 332086, 151864, 307512, 168245, 307515, 282942, 307518, 151874, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299440, 299444, 127413, 283062, 291254, 194660, 127417, 291260, 283069, 127421, 127424, 127429, 127431, 283080, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 127466, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 234003, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 299726, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 234264, 201496, 234266, 283421, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 292433, 234313, 316233, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 234393, 209818, 324504, 234396, 324508, 234398, 291742, 308123, 234401, 291747, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 291754, 226220, 324522, 234414, 324527, 291760, 234417, 201650, 324531, 291756, 226230, 234422, 275384, 324536, 234428, 291773, 226239, 234431, 242623, 234434, 324544, 324546, 226245, 234437, 234439, 324548, 234443, 291788, 193486, 275406, 193488, 234446, 234449, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 234563, 316483, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 275545, 234585, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 300148, 234614, 398455, 234618, 275579, 144506, 234620, 234623, 226433, 234627, 275588, 234629, 275594, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 308373, 275608, 234647, 234648, 234650, 308379, 283805, 324757, 234653, 300189, 234657, 324766, 324768, 119967, 283813, 234661, 300197, 234664, 242852, 275626, 234667, 316596, 308414, 234687, 316610, 300226, 226500, 234692, 283844, 300229, 308420, 308418, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 283904, 292097, 300289, 300292, 300294, 275719, 300299, 177419, 283917, 242957, 275725, 177424, 300301, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 316768, 292192, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 284076, 144812, 144814, 284084, 144820, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 259567, 300527, 308720, 226802, 316917, 308727, 292343, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 194103, 284218, 226877, 284223, 284226, 243268, 284228, 226886, 284231, 128584, 292421, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 284245, 284247, 300628, 235097, 243290, 284251, 284249, 284253, 317015, 284255, 300638, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 292470, 284278, 292473, 284283, 276093, 284286, 276095, 292479, 284288, 276098, 325250, 284290, 292485, 284292, 292481, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 317138, 358098, 284370, 284372, 284377, 276187, 284379, 284381, 284384, 284386, 358116, 276197, 317158, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358128, 358126, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 300832, 284449, 300834, 325408, 227109, 317221, 358183, 186151, 276268, 300845, 194351, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 178161, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 235581, 325692, 178238, 276544, 284739, 292934, 276553, 243785, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 194657, 227426, 276579, 309346, 309348, 227430, 276583, 350308, 309350, 276586, 309352, 350313, 350316, 276590, 301167, 227440, 350321, 284786, 276595, 301163, 350325, 350328, 292985, 301178, 292989, 301185, 317570, 350339, 292993, 317573, 350342, 227463, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 276713, 317674, 325867, 243948, 194801, 227571, 309491, 276725, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 317729, 276775, 211241, 325937, 276789, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 285051, 211324, 227709, 285061, 317833, 178572, 285070, 178575, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 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, 236043, 317963, 342541, 55822, 113167, 277011, 309779, 317971, 309781, 55837, 227877, 227879, 293417, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 334476, 326285, 318094, 318092, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 137889, 383658, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 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, 285453, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277314, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 277368, 236408, 15224, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 244731, 121850, 302075, 293882, 293887, 277504, 277507, 277511, 277519, 293908, 277526, 293917, 293939, 318516, 277561, 277564, 7232, 310336, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 277608, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 392326, 285831, 253064, 302218, 285835, 294026, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 285862, 277671, 302248, 64682, 277678, 228526, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 277807, 285999, 113969, 277811, 318773, 277816, 318776, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 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, 310659, 294276, 351619, 277892, 327046, 253320, 310665, 318858, 277898, 277894, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 277923, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 245191, 163272, 302534, 310727, 277959, 292968, 302541, 277966, 302543, 277963, 310737, 277971, 277975, 286169, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 278003, 310772, 228851, 278006, 40440, 278009, 212472, 286203, 40443, 228864, 40448, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 294435, 40484, 40486, 294439, 286248, 278057, 294440, 294443, 40488, 294445, 286246, 40491, 310831, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 228944, 400976, 212560, 40533, 147032, 40537, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40552, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 278150, 310925, 286354, 278163, 302740, 122517, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 278227, 229076, 286420, 319187, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 237409, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 294817, 40865, 319394, 294821, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 309354, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
e75aaae67facb919958de05af43e9eaa6019f4e5
b63fdef01507d6cf0da11edc113eac719dde1a59
/simple login/amrittableTableViewController.swift
bf58bfb10da79b1efbe4581684b38ef335c6c43d
[]
no_license
AMRITPAL4643/login-code-of-ios
33afbd6f139ba32d3c3ad84f4951a69ed17d09cc
6586ceb55997e4541ea596e276e03605946014a8
refs/heads/master
2020-04-30T05:02:00.592919
2019-03-20T20:40:29
2019-03-20T20:40:29
176,621,095
0
0
null
null
null
null
UTF-8
Swift
false
false
3,293
swift
// // amrittableTableViewController.swift // simple login // // Created by Amrit on 2019-03-19. // Copyright © 2019 admin. All rights reserved. // import UIKit class amrittableTableViewController: UITableViewController { let y = UserDefaults.standard override func viewDidLoad() { super.viewDidLoad() let user = y.string(forKey: "userId") // Uncomment the following line to preserve selection between presentations // self.clearsSelectionOnViewWillAppear = false // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 2 } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 0{ switch indexPath.row{ case 0: self.performSegue(withIdentifier: "studentcell", sender: nil) case 1: print("case 1") case 2: print("case 2") default: print("Invalid") } } } /* override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) // Configure the cell... return cell } */ /* // Override to support conditional editing of the table view. override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the specified item to be editable. return true } */ /* // Override to support editing the table view. override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { // Delete the row from the data source tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } */ /* // Override to support rearranging the table view. override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } */ /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ -1 ]
7d88d6b23945d2bc628bfd77ec0f127296639b8c
f26f87771e66637f148b5704a0f17c7bf27aa444
/HoyoServicer/ModelCenter/DataObject/User+CoreDataProperties.swift
acc16a8b17c46780dce74b6409c6d72763272c95
[]
no_license
jzxyouok/HoyoServer_V2
fa35ed46cef61a6bd9f90cb2e60262332197dafa
92f0a8a9275a68f05ccfd68561b2a06595baf431
refs/heads/master
2021-01-15T23:30:41.425156
2016-06-01T02:57:38
2016-06-01T02:57:38
60,144,628
1
0
null
2016-06-01T04:08:58
2016-06-01T04:08:58
null
UTF-8
Swift
false
false
1,025
swift
// // User+CoreDataProperties.swift // HoyoServicer // // Created by 赵兵 on 16/4/18. // Copyright © 2016年 com.ozner.net. 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 User { @NSManaged var bannerimgs: String? @NSManaged var bdimgs: String? @NSManaged var city: String? @NSManaged var country: String? @NSManaged var groupdetails: NSData? @NSManaged var headimageurl: NSData? @NSManaged var language: String? @NSManaged var mobile: String? @NSManaged var name: String? @NSManaged var openid: String? @NSManaged var orderabout: NSData? @NSManaged var province: String? @NSManaged var realname: NSData? @NSManaged var scope: String? @NSManaged var score: String? @NSManaged var sex: String? @NSManaged var id: String?//userid @NSManaged var usertoken: String? }
[ -1 ]
e91b75ef51930d03c8ba62775618c4607353fa16
4a95bcff3b9e9500689a2d3ea3f10bc36a5ed1bc
/MyPlayground.playground/Pages/main.xcplaygroundpage/Contents.swift
5269356cf850fb134af50fce97d847ba6a0e0319
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
mguigli/swift-mathBoolOp-lab-swift-intro-000
e2025dff172967299e8280d0dd6497bf21b2083f
31dd413d07126158337cebe67bee6a144ad6abae
refs/heads/master
2021-01-13T13:55:57.815974
2016-11-05T22:38:34
2016-11-05T22:38:34
72,954,277
0
0
null
2016-11-05T21:27:52
2016-11-05T21:27:51
null
UTF-8
Swift
false
false
2,368
swift
/* # Switch Statements ### Readings associated with this lab * [Switch Statements]https://github.com/learn-co-curriculum/swift-switchStatement-readme) * [Booleans and Operators](https://github.com/learn-co-curriculum/swift-booleans-readme) * [Conditionals](https://github.com/learn-co-curriculum/swift-conditionals-readme) */ /*: Question 1 ### 1. Add two Doubles */ 5.5 + 10.92 /*: Question 2 ### 2. Add an Int to a Double */ 6 + 10.92 /*: Question 3 ### 3. Compare two Ints for equality */ 5 == 8 /*: Question 4 ### 4. Compare two Doubles for equality */ 8.9 == 8.9 /*: Question 5 ### 5. Compare an Int and a Double equality */ 4 == 4.0 /*: Question 6 ### 6. Compare 3 and 3.5 for equality (NB what do you have to be mindful of in this case?) */ 3 == 3.5 /*: Question 7 ### 7. Compare 3 and 3.5 for equality and 6.1 and 7 for inequality */ (3 == 3.5) && (6.1 == 7) /*: Question 8 ### 8. Write code expressing "if a less than b or x is greater than or equal to y" */ let a = 9 let b = 7 let x = 10 let y = 14 (a < b) || (x > y) /*: Question 9 ### 9. Write a function which returns the sum of three Ints */ func trianglePerimeter (sideOne: Int, sideTwo: Int, sideThree: Int) -> Int { return sideOne + sideTwo + sideThree } trianglePerimeter(sideOne: 5, sideTwo: 5, sideThree: 5) /*: Question 10 ### 10. Write a function average_i which returns the average of three Ints as an Int */ func average_i(first: Int, second: Int, third: Int) -> Int { return (first + second + third) / 3 } average_i(first: 10, second: 20, third: 30) /*: Question 11 ### 11. Use the return value of the function written for Question 10 in a boolean expression */ average_i(first: 10, second: 20, third: 30) >= 21 /*: Question 12 ### 12. Write a function average_f which returns the average of three Ints as a Float */ func average_f(one: Int, two: Int, three: Int) -> Float { return (Float(one) + Float(two) + Float(three)) / Float(3) } average_f(one: 2, two: 8, three: 10) /*: Question 13 ### 13. Call average_f with values 1, 3, and 5 and test if the result equals 3.0 */ average_f(one: 1, two: 3, three: 5) /*: Question 14 ### 14. Call average_i with values 1, 3, and 5 and test if the result is both greater than 1 and less than 5. */ (average_i(first: 1, second: 3, third: 5) > 1) && (average_i(first: 1, second: 3, third: 5) < 5)
[ -1 ]
2ec94fc28fe5c8b533a14eb963ef91fc14b60b12
acf1f75efa8c7f4854610833d740c7844f739823
/KakaoTalk-Clone/KakaoTalk-Clone/KaKaoHomeTab/ViewController/EtcTabViewController.swift
acb0ee97e936d35518006aa39fcf187ea04ef424
[]
no_license
28th-BE-SOPT-iOS-Part/KimHyeSoo
15dc2015b05c290fc05576f9ce3e9998890de45b
9ce9848af2d33df98853b1707acdb06971f0db8d
refs/heads/main
2023-06-05T05:39:36.303090
2021-06-25T02:08:33
2021-06-25T02:08:33
354,383,793
6
2
null
null
null
null
UTF-8
Swift
false
false
4,555
swift
// // EtcTabViewController.swift // KakaoTalk-Clone // // Created by 김혜수 on 2021/05/06. // Copyright © 2021 kimhyesu. All rights reserved. // import UIKit class EtcTabViewController: UIViewController { @IBOutlet weak var etcCollectionView: UICollectionView! private var etcIconList : [EtcLabelData] = [] override func viewDidLoad() { super.viewDidLoad() setEtcIconList() etcCollectionView.delegate = self etcCollectionView.dataSource = self // Do any additional setup after loading the view. } func setEtcIconList () { etcIconList.append(contentsOf: [ EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "메일"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "캘린더"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "서랍"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "카카오콘"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "메이커스"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "선물하기"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "이모티콘"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "프렌즈"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "쇼핑하기"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "스타일"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "주문하기"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "멜론티켓"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "게임"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "멜론"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "헤어샵"), EtcLabelData(iconImageName: "messageTabIcon", iconLabelName: "전체서비스") ]) } } /* Cell 구성 -> delegate, dataSource*/ extension EtcTabViewController : UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return etcIconList.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { guard let etcCell = collectionView.dequeueReusableCell(withReuseIdentifier: EtcCollectionViewCell.identifier, for: indexPath) as? EtcCollectionViewCell else { return UICollectionViewCell() } etcCell.setData(imageName: etcIconList[indexPath.row].iconImageName, labelName: etcIconList[indexPath.row].iconLabelName) return etcCell } } extension EtcTabViewController : UICollectionViewDelegate { } /* cell들의 간격/크기 -> flowLayout */ extension EtcTabViewController : UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let width = UIScreen.main.bounds.width let cellWidth = width * (70/375) let cellHeight = cellWidth return CGSize(width: cellWidth, height: cellHeight) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { return UIEdgeInsets.zero } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { return 3 } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { // let width = UIScreen.main.bounds.width return 19 } }
[ -1 ]
7eff31b74429103b526a961528db1fadf30cff16
fb6ca83d9d7bc8dc0bfcd35bf3b14754b1442736
/Sky/Sky/Extensions/URLSessionDataTask.swift
b4ca59d49dd81adeeb951618c738f4fd9a59bb78
[]
no_license
fengyuxuan2008/RxSwiftMaster
456780ba44d27cc56ebee3997e0d09e20f76f080
920847be2915be7f1ffd18b457d4835d715b3192
refs/heads/master
2022-12-06T04:39:05.951555
2020-08-12T15:43:06
2020-08-12T15:43:06
285,619,781
0
0
null
null
null
null
UTF-8
Swift
false
false
208
swift
// // URLSessionDataTask.swift // Sky // // Created by apple on 2020/8/8. // Copyright © 2020 Mars. All rights reserved. // import Foundation extension URLSessionDataTask: URLSessionDataTaskProtocol{}
[ -1 ]
02d3f4573eb9d8e91d9f053b1cb0e7d5602d50a8
cfce2662a4ed2a9a0204db7c8c9e2fc5ca8f404a
/BankLocatorTests/ApiRouterTest.swift
2c8db519fd4aa30f820ea58d144ed5fbb4d97db8
[]
no_license
pritam-bs/BankLocator
b558c731f8e503bdebfdc797d7eb41b0fdd18016
96de8986bcf483bc853940dcce9b8e4f34969095
refs/heads/main
2023-01-06T07:16:11.098267
2020-11-02T16:48:41
2020-11-02T16:48:41
309,930,841
0
0
null
null
null
null
UTF-8
Swift
false
false
738
swift
// // ApiRouterTest.swift // BankLocatorTests // // Created by Pritam on 2/11/20. // import XCTest @testable import BankLocator class ApiRouterTest: XCTestCase { func testApiRouter() { let router = ApiRouter.estonia let urlEstonia = URL(string: "https://www.swedbank.ee/finder.json") XCTAssertEqual(router.url, urlEstonia) let routerLatvia = ApiRouter.latvia let urlLatvia = URL(string: "https://ib.swedbank.lv/finder.json") XCTAssertEqual(routerLatvia.url, urlLatvia) let routerLithuania = ApiRouter.lithuania let urlLithuania = URL(string: "https://ib.swedbank.lt/finder.json") XCTAssertEqual(routerLithuania.url, urlLithuania) } }
[ -1 ]
e171f3efc1ae3e4c2723cee564d97b510275c5be
01ac0f8d0685469b7dcd6f6ba5bd3acfe4f4551a
/MVPC/ViewController.swift
ef85c307347b8c35ff50edfdbd685c475350cc85
[]
no_license
linhnd99/MVPC_with_Swinject
ac4cc8f2d330bb7d90412ea3c669e47fa287b899
17a5b6261be6c4a2b60d8f68100cb62a36e529e9
refs/heads/master
2023-03-07T10:58:45.850335
2021-02-23T08:51:57
2021-02-23T08:51:57
341,488,006
0
0
null
null
null
null
UTF-8
Swift
false
false
269
swift
// // ViewController.swift // MVPC // // Created by linzsc on 22/02/2021. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } }
[ 262528, 254464, 385282, 398203, 275714, 361595, 395149, 158612, 393749, 319899, 155424, 262561, 324512, 345378, 396707, 436128, 333223, 354729, 242346, 125227, 273710, 380334, 372017, 381618, 262453, 354108, 397117, 351170, 384325, 262471, 323016, 326600, 349130, 340943, 330960, 324564, 257750, 377048, 354654, 362847, 354144, 383969, 425824, 165087, 398308, 332513, 253928, 350187, 352876, 56046, 124914, 349174, 351481, 381179 ]
5a6488333dd2d89d9cf4068d455f0a616abbca40
954aef802cd3709b0461a5de0f893b00113b7c00
/BanditInterview/Resources/FlowCoordinator.swift
810b46ffab4e70606f9082e119f3137e9b0eeab6
[]
no_license
gsapienza/BanditInterview
3d9cfbbaf584bd1c44239580e18f9a5368b1bbe6
73b21f0220a141cc0bf311452f9fe7cca4bebc7d
refs/heads/master
2020-11-26T02:44:19.958702
2019-12-19T23:42:36
2019-12-19T23:42:36
228,941,612
0
0
null
null
null
null
UTF-8
Swift
false
false
857
swift
// // FlowCoordinator.swift // BanditInterview // // Created by Gregory Sapienza on 12/17/19. // Copyright © 2019 Gregory Sapienza. All rights reserved. // import Foundation @objc protocol FlowCoordinator: class { weak var parentCoordinator: ParentFlowCoordinator? { get set } func endFlow() } @objc protocol ParentFlowCoordinator: FlowCoordinator { var childCoordinators: [FlowCoordinator] { get set } } extension ParentFlowCoordinator { func childFlowBegan(_ childCoordinator: FlowCoordinator) { childCoordinator.parentCoordinator = self childCoordinators.append(childCoordinator) } func childFlowEnded(_ childCoordinator: FlowCoordinator) { guard let index = childCoordinators.firstIndex(where: { $0 === childCoordinator }) else { return } childCoordinators.remove(at: index) } }
[ -1 ]
53e1499ca7a5fb7f4ae9a6e6dfe1da17cf2b606e
94c31393491940f99034067f5d8ac3ede6dcfe9d
/phpregistrion/SceneDelegate.swift
5ebdf80fc9d75b6f3bcb652914f100e80fd4dcf7
[]
no_license
topsneeraj/Phpwithios
63baae0f9d5ae79afb500c47d78ef4245cb93e8f
a6d18a2d452416d8d0c3620284e278d2c65fb795
refs/heads/master
2022-12-09T11:09:11.014862
2020-09-08T07:27:51
2020-09-08T07:27:51
290,702,833
0
0
null
2020-08-28T08:41:59
2020-08-27T07:07:06
Swift
UTF-8
Swift
false
false
2,336
swift
// // SceneDelegate.swift // phpregistrion // // Created by mac on 27/08/20. // Copyright © 2020 mac. 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, 434868, 164535, 164539, 328379, 328387, 352969, 418508, 385743, 385749, 189154, 369382, 361196, 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, 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, 361594, 410746, 214150, 345224, 386187, 345247, 361645, 337072, 345268, 402615, 361657, 402636, 328925, 165086, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 328967, 345377, 345380, 353572, 345383, 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, 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, 419518, 403139, 337607, 419528, 419531, 419536, 272083, 394967, 419543, 419545, 345819, 419548, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 378664, 354107, 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, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 379135, 411905, 411917, 379154, 395539, 387350, 387353, 338201, 338212, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 321911, 420237, 379279, 272787, 354728, 338353, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 330254, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 338544, 191093, 346743, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 338665, 264942, 363252, 338680, 264965, 338701, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 330612, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 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, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 330959, 330966, 265433, 265438, 388320, 363757, 339199, 396552, 175376, 175397, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 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, 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, 339696, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 397089, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 257869, 257872, 225105, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 225128, 257897, 225138, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 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, 250201, 250203, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 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, 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, 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, 160896, 349313, 152704, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 349486, 349492, 251190, 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, 333472, 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, 350046, 399200, 399208, 268144, 358256, 358260, 399222, 325494, 333690, 325505, 399244, 333709, 333725, 333737, 382891, 382898, 358348, 333777, 219094, 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, 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, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 342555, 416294, 350762, 252463, 358962, 334397, 252483, 219719, 399957, 334425, 326240, 375401, 334466, 334469, 391813, 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, 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 ]
7f3f2803c0f3918eac78da911ef9ad65c7683011
2480cdd1bcd7aa9b83d40cb4df651cf73b31bfc5
/Saving/SceneDelegate.swift
b7762ba6db190917827eaa08c36d8f5ebc1ef8f2
[]
no_license
AsmaRashed1/Saving
bb23a880994241707d94f40edb6474a873b61fe5
b7a1f291a6042763b0f103cbee8747fbd8511ea7
refs/heads/main
2023-09-02T21:11:29.480448
2021-11-01T07:25:03
2021-11-01T07:25:03
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,337
swift
// // SceneDelegate.swift // Saving // // Created by Mobark Alseif on 24/03/1443 AH. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { print("Scene Did Enter Background") // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 393277, 376906, 327757, 254032, 368728, 180314, 254045, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 377047, 418008, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 385281, 336129, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 270922, 385610, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 385671, 148106, 377485, 352919, 98969, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 418508, 385743, 385749, 139998, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 386070, 271382, 336922, 345119, 377888, 214060, 345134, 345139, 361525, 386102, 361537, 377931, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 345247, 361645, 345268, 402615, 361657, 337093, 402636, 328925, 165086, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 419360, 370208, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 419518, 337601, 403139, 337607, 419528, 419531, 419536, 272083, 394967, 419543, 419545, 345819, 419548, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 362274, 378664, 354107, 345916, 354112, 370504, 329545, 345932, 370510, 354132, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 346059, 247760, 346064, 346069, 419810, 329699, 354275, 190440, 354314, 346140, 436290, 395340, 378956, 436307, 338005, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 346317, 411862, 256214, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 321911, 420237, 379279, 272787, 354728, 338353, 338382, 272849, 248279, 256474, 182755, 338404, 330225, 248309, 248332, 330254, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 355029, 264919, 256735, 338661, 264942, 363252, 338680, 264965, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 355151, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 265215, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 248952, 420985, 330886, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 126279, 437576, 437584, 331089, 437588, 331094, 396634, 175451, 437596, 429408, 175458, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 175487, 249215, 175491, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 224885, 224888, 224891, 224895, 372354, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 339664, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 397089, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 257869, 257872, 225105, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 339818, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250203, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 340380, 373149, 70048, 356783, 373169, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 258723, 332455, 332460, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 340792, 398141, 357202, 389971, 357208, 389979, 430940, 357212, 357215, 439138, 201580, 201583, 349041, 340850, 381815, 430967, 324473, 398202, 340859, 324476, 430973, 119675, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 341072, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 160896, 349313, 152704, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 210132, 333016, 210139, 210144, 218355, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 210261, 365912, 259423, 374113, 251236, 374118, 333164, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333396, 333400, 366173, 423529, 423533, 210547, 415354, 333440, 267910, 267929, 333512, 259789, 366301, 333535, 153311, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 341877, 399222, 325494, 333690, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 350153, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 342113, 252021, 342134, 374904, 268435, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 350449, 375027, 358645, 350459, 350462, 350465, 350469, 268553, 350477, 268560, 350481, 432406, 350487, 325915, 350491, 325918, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 268702, 342431, 375209, 375220, 334263, 326087, 358857, 195041, 334312, 104940, 375279, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 334425, 326240, 375401, 334466, 334469, 391813, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 326417, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326463, 326468, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 433001, 400238, 326511, 211826, 211832, 392061, 351102, 359296, 252801, 260993, 351105, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 252838, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 343132, 384099, 384102, 384108, 367724, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 367801, 384189, 384192, 351424, 343232, 367817, 244938, 384202, 253132, 326858, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 376111, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 359887, 359891, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 155241, 245358, 155255, 155274, 368289, 245410, 425639, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 384831, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
0cdd44c909885ba31472ef419a059fd6ad10b154
140b66fc591a4ba3190aeae7d0400a7203629adb
/Package.swift
ab46561f0e6032ceeccbc25d304dc8bddf176bf3
[ "MIT" ]
permissive
amit-sw/SwiftyJSON
dc75ced660ccf3a389d7775f7e61fa54084e89e6
ed62cd3972e6cca61c0be900749379c2cf98ae80
refs/heads/master
2023-08-29T03:35:28.869487
2021-10-08T15:49:13
2021-10-08T15:49:13
415,043,039
0
0
null
null
null
null
UTF-8
Swift
false
false
372
swift
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "SwiftyJSON", products: [ .library(name: "SwiftyJSON", targets: ["SwiftyJSON"]) ], targets: [ .target(name: "SwiftyJSON", dependencies: []), .testTarget(name: "SwiftJSONTests", dependencies: ["SwiftyJSON"]) ], swiftLanguageVersions: [.v5] )
[ 19873, 141452 ]
ef9f8f3c2bff26cd95690c35dadc5d275c40e831
2f6f940d4a78fc210c0b27b069ec5f2bf3fb8156
/Route Direction in AR/Map/MapViewController.swift
7f63aa1cbf880257e9f13e4f4823f62bc6e7f277
[]
no_license
gemacjr/Route-Direction-in-AR
196b279e024f15562c07e5a146ef849b3bda5748
9e9465216d1224c645776c3ad820e87c20461ab3
refs/heads/master
2023-03-16T12:23:05.920496
2019-07-27T02:48:56
2019-07-27T02:48:56
null
0
0
null
null
null
null
UTF-8
Swift
false
false
15,475
swift
// // MapViewController.swift // ARDemo // // Created by Ashis Laha on 13/07/17. // Copyright © 2017 Ashis Laha. All rights reserved. // import UIKit import GoogleMaps import MapKit enum Flow { case createMarkerByLongPressAndShowDirection case createMarkerByServerProvidedLocations } class MapViewController: UIViewController , UIGestureRecognizerDelegate { @IBOutlet weak var appleMap: MKMapView! @IBOutlet weak var googleMapCleanOutlet: UIBarButtonItem! let defaultZoomLabel : Float = 19.0 let polylineStokeWidth : CGFloat = 5.0 private var mapView : GMSMapView! private var userLocationMarker : GMSMarker! private var polyline : GMSPolyline! private var dropLocationMarker : GMSMarker! private var flow : Flow = .createMarkerByLongPressAndShowDirection private var paths : [[(Double,Double)]] = [] private var destination : (Double,Double) = (Double(),Double()) //MARK:- View Controller Life Cycle override func viewDidLoad() { super.viewDidLoad() guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } appDelegate.locationManager.delegate = self registerNotification() } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } appDelegate.locationManager.stopUpdatingLocation() NotificationCenter.default.removeObserver(self) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } appDelegate.locationManager.startUpdatingLocation() reachabilityCheck() //handleAppleMap() handleGoogleMap() } private func reachabilityCheck() { if !ReachabilityHelper.isInternetAvailable() { let alert = UIAlertController(title: "No Internet", message: "Please connect to Internet", preferredStyle: .alert) let okButton = UIAlertAction(title: "Ok", style: .default, handler: { (button) in alert.dismiss(animated: true, completion: nil) }) alert.addAction(okButton) present(alert, animated: true, completion: nil) } } private func registerNotification() { NotificationCenter.default.addObserver(forName: .UIApplicationWillEnterForeground, object: nil, queue: OperationQueue.main) { [weak self] (notification) in self?.reachabilityCheck() } } //MARK:- Apple Map Set up private func handleAppleMap() { self.appleMap.delegate = self self.appleMap.showsUserLocation = true let myLocation = CLLocationCoordinate2D(latitude: GPXFile.cherryHillPath.first?.0 ?? 0, longitude: GPXFile.cherryHillPath.first?.1 ?? 0) let cabLocation = CLLocationCoordinate2D(latitude: GPXFile.cherryHillPath.last?.0 ?? 0, longitude: GPXFile.cherryHillPath.last?.1 ?? 0) createRegion(coordinate: myLocation) // add annotations createAnnotation(location: cabLocation, title: "Cab location") } private func createAnnotation(location : CLLocationCoordinate2D, title : String ) { let annotation = MKPointAnnotation() annotation.coordinate = location annotation.title = title self.appleMap.addAnnotation(annotation) } private func createRegion(coordinate : CLLocationCoordinate2D) { let span = MKCoordinateSpan(latitudeDelta: 0.001, longitudeDelta: 0.001) let region = MKCoordinateRegion(center: coordinate, span: span) self.appleMap.setRegion(region, animated: true) } // MARK:- Open AR View @IBAction func openARView(_ sender: UIBarButtonItem) { if let arVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ARViewController") as? UINavigationController { if let vc = arVC.visibleViewController as? ARViewController { vc.sectionCoordinates = paths vc.carLocation = destination } self.present(arVC, animated: true, completion: nil) } } //MARK:- Google Map Set up @IBAction func clearGoogleMap(_ sender: UIBarButtonItem) { polyline?.map = nil dropLocationMarker?.map = nil paths = [] destination = (Double(),Double()) } private func handleGoogleMap() { guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } if let userLocation = appDelegate.locationManager.location?.coordinate { googleMapSetUp(location: userLocation) } else { googleMapSetUp(location: CLLocationCoordinate2D(latitude: 12.9716, longitude: 77.5946)) // bangalore location } if flow == .createMarkerByLongPressAndShowDirection { if mapView != nil { mapView.delegate = self } title = "Tap On Map" } else if flow == .createMarkerByServerProvidedLocations { let fromLocation = CLLocationCoordinate2D(latitude: GPXFile.cherryHillPath.first?.0 ?? 0, longitude: GPXFile.cherryHillPath.first?.1 ?? 0) let cabLocation = CLLocationCoordinate2D(latitude: GPXFile.cherryHillPath.last?.0 ?? 0, longitude: GPXFile.cherryHillPath.last?.1 ?? 0) let _ = createMarker(location: fromLocation, mapView: mapView, markerTitle: "From Location", snippet: "") let _ = createMarker(location: cabLocation, mapView: mapView, markerTitle: "Cab Location", snippet: "Waiting...") drawPath(map: mapView, pathArray: GPXFile.cherryHillPath) } } private func googleMapSetUp(location : CLLocationCoordinate2D) { let camera = GMSCameraPosition.camera(withLatitude: location.latitude, longitude: location.longitude, zoom: defaultZoomLabel) mapView = GMSMapView.map(withFrame: self.view.bounds, camera: camera) mapView.isUserInteractionEnabled = true mapView.autoresizingMask = [.flexibleHeight, .flexibleWidth] view.addSubview(mapView) } private func createMarker(location : CLLocationCoordinate2D, mapView : GMSMapView, markerTitle : String, snippet : String, image : UIImage? = nil, markerName : String? = nil) -> GMSMarker { let marker = GMSMarker(position: location) marker.title = markerTitle marker.snippet = snippet if let image = image { marker.icon = image marker.groundAnchor = CGPoint(x: 0.5, y: 1.0) } if let markerName = markerName { marker.userData = markerName } marker.map = mapView return marker } private func removeMarker(marker : GMSMarker) { marker.map = nil } private func drawPath(map : GMSMapView, pathArray : [(Double, Double)]) { let path = GMSMutablePath() for each in pathArray { path.add(CLLocationCoordinate2D(latitude: each.0, longitude: each.1)) } let polyline = GMSPolyline(path: path) polyline.strokeColor = UIColor.blue polyline.strokeWidth = polylineStokeWidth polyline.geodesic = true polyline.map = map } } extension MapViewController : MKMapViewDelegate , CLLocationManagerDelegate { func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { var annotationView : MKAnnotationView? annotationView = MKPinAnnotationView(annotation: annotation, reuseIdentifier: "annotation") annotationView?.canShowCallout = true annotationView?.isEnabled = true return annotationView } private func sameLocation(location1 : CLLocationCoordinate2D, location2 : CLLocationCoordinate2D) -> Bool { return location1.latitude == location2.latitude && location1.longitude == location2.longitude } func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation) { } func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { if let location = locations.last { createRegion(coordinate: location.coordinate) if let userLocationMarker = self.userLocationMarker { removeMarker(marker: userLocationMarker) } userLocationMarker = GMSMarker(position: location.coordinate) userLocationMarker.title = "User Location" userLocationMarker.snippet = "" if let image = UIImage(named: "blue-dot") { userLocationMarker.icon = image userLocationMarker.groundAnchor = CGPoint(x: 0.5, y: 1.0) } userLocationMarker.map = mapView // one time execution if let appDelegate = UIApplication.shared.delegate as? AppDelegate, appDelegate.one_time_execution == false { appDelegate.one_time_execution = true let cameraPosition = GMSCameraPosition(target: location.coordinate, zoom: defaultZoomLabel, bearing: 0, viewingAngle: 0) mapView.animate(to: cameraPosition) } } } // Getting a new heading func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) { let rotation = newHeading.magneticHeading * Double.pi / 180 print("rotation : \(rotation)") } func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { switch status { case .notDetermined: // If status has not yet been determied, ask for authorization manager.requestWhenInUseAuthorization() break case .authorizedWhenInUse: // If authorized when in use manager.startUpdatingLocation() break case .authorizedAlways: // If always authorized manager.startUpdatingLocation() break case .restricted: // If restricted by e.g. parental controls. User can't enable Location Services break case .denied: // If user denied your app access to Location Services, but can grant access from Settings.app break } } } extension MapViewController : GMSMapViewDelegate { //MARK:- Create marker on long press func mapView(_ mapView: GMSMapView, didLongPressAt coordinate: CLLocationCoordinate2D) { self.dropLocationMarker?.map = nil self.dropLocationMarker = createMarker(location: coordinate, mapView: self.mapView, markerTitle: "Destination", snippet: "", image: UIImage(named: "drop-pin")) reachabilityCheck() guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } if let userLocation = appDelegate.locationManager.location?.coordinate { if ReachabilityHelper.isInternetAvailable() { fetchRoute(source: userLocation, destination: coordinate, completionHandler: { [weak self] (polyline) in if let polyline = polyline as? GMSPolyline { // Add user location let path = GMSMutablePath() if let userlocation = self?.userLocationMarker.position { path.add(userlocation) } // add rest of the co-ordinates if let polyLinePath = polyline.path, polyLinePath.count() > 0 { for i in 0..<polyLinePath.count() { path.add(polyLinePath.coordinate(at: i)) } } let updatedPolyline = GMSPolyline(path: path) updatedPolyline.strokeColor = UIColor.blue updatedPolyline.strokeWidth = self?.polylineStokeWidth ?? 5.0 self?.polyline?.map = nil self?.polyline = updatedPolyline self?.polyline?.map = self?.mapView // update path and destination self?.destination = (coordinate.latitude, coordinate.longitude) if let path = updatedPolyline.path { var polylinePath : [(Double,Double)] = [] for i in 0..<path.count() { let point = path.coordinate(at: i) polylinePath.append((point.latitude,point.longitude)) } self?.paths = [] self?.paths.append(polylinePath) } } }) } } } private func fetchRoute(source : CLLocationCoordinate2D, destination : CLLocationCoordinate2D , completionHandler : ((Any) -> ())? ) { let origin = String(format: "%f,%f", source.latitude,source.longitude) let destination = String(format: "%f,%f", destination.latitude,destination.longitude) let directionsAPI = "https://maps.googleapis.com/maps/api/directions/json?" let directionsUrlString = String(format: "%@&origin=%@&destination=%@&mode=driving",directionsAPI,origin,destination ) // walking , driving if let url = URL(string: directionsUrlString) { let fetchDirection = URLSession.shared.dataTask(with: url, completionHandler: { (data, response, error) in DispatchQueue.main.async { if error == nil && data != nil { var polyline : GMSPolyline? if let dictionary = try? JSONSerialization.jsonObject(with: data!, options: .allowFragments ) as? [String : Any] { if let routesArray = dictionary?["routes"] as? [Any], !routesArray.isEmpty { if let routeDict = routesArray.first as? [String : Any] , !routeDict.isEmpty { if let routeOverviewPolyline = routeDict["overview_polyline"] as? [String : Any] , !routeOverviewPolyline.isEmpty { if let points = routeOverviewPolyline["points"] as? String { if let path = GMSPath(fromEncodedPath: points) { polyline = GMSPolyline(path: path) } } } } } } if let polyline = polyline { completionHandler?(polyline) } } } }) fetchDirection.resume() } } }
[ -1 ]
7d138bd2a4223a306506c31b7cae9164c49e29ad
ea7e5e834a3a24f91d98977807a5283f77c3a501
/Riot/Modules/Common/Buttons/Close/CloseButton.swift
a46a0a9f2dd59bc8397ed9df7b4e8fbd966cbf18
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
fhirfactory/pegacorn-communicate-app-ios
c36d149d2d889c2d197ec2ea391e7f687b789454
6db1160d7643237d431369057eb86a9831d0a9eb
refs/heads/master
2023-08-06T19:10:34.592695
2020-07-17T14:56:33
2020-07-17T14:56:33
269,006,453
2
1
Apache-2.0
2021-03-04T22:52:21
2020-06-03T06:22:37
Objective-C
UTF-8
Swift
false
false
2,926
swift
/* Copyright 2020 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import Foundation final class CloseButton: UIButton, Themable { // MARK: - Constants private enum CircleBackgroundConstants { static let height: CGFloat = 30.0 static let highlightedAlha: CGFloat = 0.5 static let normalAlha: CGFloat = 1.0 } // MARK: - Properties // MARK: Private private var theme: Theme? private var circleBackgroundView: UIView! // MARK: Public override var isHighlighted: Bool { didSet { self.circleBackgroundView.alpha = self.isHighlighted ? CircleBackgroundConstants.highlightedAlha : CircleBackgroundConstants.normalAlha } } // MARK: - Life cycle override func awakeFromNib() { super.awakeFromNib() self.backgroundColor = UIColor.clear self.setImage(Asset.Images.closeButton.image, for: .normal) self.setupCircleView() self.update(theme: ThemeService.shared().theme) } override func layoutSubviews() { super.layoutSubviews() self.sendSubviewToBack(self.circleBackgroundView) self.circleBackgroundView.layer.cornerRadius = self.circleBackgroundView.bounds.height/2 } // MARK: - Private private func setupCircleView() { let rect = CGRect(x: 0, y: 0, width: CircleBackgroundConstants.height, height: CircleBackgroundConstants.height) let view = UIView(frame: rect) view.translatesAutoresizingMaskIntoConstraints = false view.isUserInteractionEnabled = false view.layer.masksToBounds = true self.addSubview(view) NSLayoutConstraint.activate([ view.heightAnchor.constraint(equalToConstant: CircleBackgroundConstants.height), view.widthAnchor.constraint(equalTo: view.heightAnchor, multiplier: 1.0), view.centerXAnchor.constraint(equalTo: self.centerXAnchor), view.centerYAnchor.constraint(equalTo: self.centerYAnchor) ]) self.sendSubviewToBack(view) self.circleBackgroundView = view } // MARK: - Themable func update(theme: Theme) { self.theme = theme self.circleBackgroundView.backgroundColor = theme.headerTextSecondaryColor } }
[ -1 ]
18f62c2dfb5693d5ab3996d5c9eee831b2abf44a
90c58cd64aff56709e99fcde6ee2ad83c36bb961
/Captioner/CaptionViewController.swift
6cd097f6080a8dec20c8618f1e12ffe636f5169b
[ "BSD-2-Clause" ]
permissive
daylen/captioner-ios
35d604c640efc822127b243f78c8f322e5a68039
33f272c8b5c98794ee08d9c843b369e313a352c8
refs/heads/master
2021-03-30T17:36:18.530058
2017-10-03T08:57:40
2017-10-03T08:57:40
53,762,519
0
0
null
null
null
null
UTF-8
Swift
false
false
6,084
swift
// // CaptionViewController.swift // Captioner // // Created by Daylen Yang on 3/2/16. // Copyright © 2016 Daylen Yang. All rights reserved. // import UIKit import Alamofire import JSQMessagesViewController let uploadEndpoint = "http://durian8.banatao.berkeley.edu:5000/upload" class CaptionViewController: JSQMessagesViewController { var image : UIImage? var messages = [JSQMessage]() var outgoingBubbleImageView: JSQMessagesBubbleImage! var incomingBubbleImageView: JSQMessagesBubbleImage! override func viewDidLoad() { super.viewDidLoad() self.navigationItem.title = "Chat" collectionView!.collectionViewLayout.incomingAvatarViewSize = CGSizeZero collectionView!.collectionViewLayout.outgoingAvatarViewSize = CGSizeZero setupBubbles() uploadImage() } private func setupBubbles() { let factory = JSQMessagesBubbleImageFactory() outgoingBubbleImageView = factory.outgoingMessagesBubbleImageWithColor( UIColor.jsq_messageBubbleBlueColor()) incomingBubbleImageView = factory.incomingMessagesBubbleImageWithColor( UIColor.jsq_messageBubbleGreenColor()) } override func collectionView(collectionView: JSQMessagesCollectionView!, messageDataForItemAtIndexPath indexPath: NSIndexPath!) -> JSQMessageData! { return messages[indexPath.item] } override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return messages.count } override func collectionView(collectionView: JSQMessagesCollectionView!, messageBubbleImageDataForItemAtIndexPath indexPath: NSIndexPath!) -> JSQMessageBubbleImageDataSource! { let message = messages[indexPath.item] if message.senderId == senderId { return outgoingBubbleImageView } else { return incomingBubbleImageView } } override func didPressSendButton(button: UIButton!, withMessageText text: String!, senderId: String!, senderDisplayName: String!, date: NSDate!) { self.messages.append(JSQMessage(senderId: senderId, displayName: senderDisplayName, text: text)) self.finishSendingMessage() } override func didPressAccessoryButton(sender: UIButton!) { let alert = UIAlertController(title: "Not supported", message: nil, preferredStyle: .Alert) alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil)) self.presentViewController(alert, animated: true, completion: nil) } override func collectionView(collectionView: JSQMessagesCollectionView!, avatarImageDataForItemAtIndexPath indexPath: NSIndexPath!) -> JSQMessageAvatarImageDataSource! { return nil } func correctlyOrientedImage(image: UIImage) -> UIImage { if image.imageOrientation == UIImageOrientation.Up { return image } UIGraphicsBeginImageContextWithOptions(image.size, false, image.scale) image.drawInRect(CGRectMake(0, 0, image.size.width, image.size.height)) let normalizedImage:UIImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return normalizedImage; } func uploadImage() { if let image = image { self.messages.append(JSQMessage(senderId: "0", displayName: "Me", media: JSQPhotoMediaItem(image: image))) self.messages.append(JSQMessage(senderId: "1", displayName: "Captioner", text: "Captioning...")) Alamofire.upload(.POST, uploadEndpoint, multipartFormData: { multipartFormData in multipartFormData.appendBodyPart(data: UIImageJPEGRepresentation(self.correctlyOrientedImage(image), 0.8)!, name: "file", fileName: "chess.jpg", mimeType: "image/jpeg") }, encodingCompletion: { encodingResult in switch encodingResult { case .Success(let upload, _, _): upload.progress { _, written, total in } upload.responseJSON { response in if let error = response.result.error { dispatch_async(dispatch_get_main_queue()) { let alert = UIAlertController(title: "Error", message: error.localizedDescription, preferredStyle: .Alert) alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil)) self.presentViewController(alert, animated: true, completion: nil) } } else if let JSON = response.result.value { if let error = JSON["error"] as? String { dispatch_async(dispatch_get_main_queue()) { let alert = UIAlertController(title: "Error", message: error, preferredStyle: .Alert) alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil)) self.presentViewController(alert, animated: true, completion: nil) } } else if let caption = JSON["caption"] as? String { dispatch_async(dispatch_get_main_queue()) { self.messages.append(JSQMessage(senderId: "1", displayName: "Captioner", text: caption)) self.finishReceivingMessageAnimated(true) } } } } case .Failure(let encodingError): print(encodingError) } }) } else { print("no image") } } }
[ -1 ]
8b5efb99a17a902dcabd76948292f5b8bfdd9302
30612cc5a5a8222cd93c49ba2c4eb6962de5a946
/Challenge2/View/textTableViewCell.swift
d05da919daf60620062153e70fb6210a85892199
[]
no_license
ajay6533/InstaTask
eead5673fc1ae51cac568cf4f2260a323f1612cb
1c6cab6481e66f94ad298aa5d502e39e10f3d23d
refs/heads/main
2023-07-14T21:34:09.526125
2021-09-08T10:32:04
2021-09-08T10:32:04
401,262,073
0
0
null
null
null
null
UTF-8
Swift
false
false
802
swift
// // textTableViewCell.swift // Challenge2 // // Created by ajaykumar on 29/08/21. // import UIKit class textTableViewCell: UITableViewCell { @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var textLable: UILabel! @IBOutlet weak var containerView: UIView! let colorArray = [UIColor.green, UIColor.red, UIColor.purple, UIColor.orange, UIColor.blue] override func awakeFromNib() { super.awakeFromNib() // Initialization code // let randomInt = Int(arc4random()) % colorArray.count // self.containerView.backgroundColor = colorArray[randomInt] } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ -1 ]
e1ed658c63ba44e290e8ce05d42f3ee10ceeb2dc
7065eb618323b2279fd197d05a7e75b2b506c99f
/GaTO/AppDelegate.swift
d3e34dac3fb511e5267af9f4b2f24976baa15d02
[]
no_license
franciscodiaz22/Game-IOS
b94e25c4d8e6ed8d1006c788cfb374eb0d232ade
e41abacb1f8ac4692b9eb7461d834e102cbb0c15
refs/heads/master
2020-04-19T08:50:16.837549
2019-09-05T19:20:13
2019-09-05T19:20:13
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,193
swift
// // AppDelegate.swift // GaTO // // Created by Jorge Maldonado Borbón on 05/11/17. // Copyright © 2017 Jorge Maldonado Borbón. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 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, 189325, 189329, 295825, 304019, 213902, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 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, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 148946, 288214, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 354656, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 289687, 224151, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 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, 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, 276052, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 176592, 127440, 315860, 176597, 127447, 283095, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 226185, 234379, 324490, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 234648, 324757, 300189, 324766, 119967, 234653, 308379, 324768, 283805, 242852, 300197, 234661, 283813, 234664, 234657, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 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, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 276464, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 146765, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 280021, 188252, 237409, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
69259143c253edf21d501a9fb0f61e6a3e104af3
936c1a619925803208862d9b9a0a124ac7475ded
/Collage/Help.swift
b8e071c9e402d24d7e04b4a641d089b1035aaa78
[]
no_license
chist/Collage
b449f99ca22fe041ecd638cc38f4baa2f835ef4a
6c9ffc24667fd3ac5b8134ec54d7e294f7851cb4
refs/heads/master
2021-01-25T07:00:58.927078
2017-06-07T13:38:23
2017-06-07T13:38:23
93,637,301
3
1
null
null
null
null
UTF-8
Swift
false
false
2,245
swift
// // HelpView.swift // Collage // // Created by Ivan Chistyakov on 03.10.16. // Copyright © 2016 Ivan Chistyakov. All rights reserved. // import Foundation import Cocoa class Help: NSView { var isActive: Bool = false let size = CGSize(width: 230, height: 350) let background = NSImage(named: "helpBackground") var hint: NSView? let hintText = "Click with right mouse button to open / close menu.\nIt allows you to add new partitions and change photos.\n\nDrag frame borders to resize collage and partitions!\n\nYou can also drag-and-drop pictures from Finder!\n\nPress help button to show that again.\n\n" init(superView: NSView) { super.init(frame: NSRect()) // create view with appropriate frame and background let center = Rectangle.init(fromNSRect: superView.frame).getCenter(); let origin = NSPoint(x: center.x - size.width / 2, y: center.y - size.height / 2) self.frame = NSRect(origin: origin, size: self.size) self.frame = self.frame let backgroundFrame = NSRect(origin: CGPoint(x: 0, y: 0), size: self.size); let imageView = NSImageView(frame: backgroundFrame) imageView.image = self.background imageView.imageScaling = NSImageScaling.scaleAxesIndependently self.addSubview(imageView) // add view with text hint = Hint(with: hintText, toFit: self.size).getView() self.addSubview(hint!) } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func contains(point: NSPoint) -> Bool { if Rectangle.init(fromNSRect: self.frame).checkIfContains(point) { return true } return false } func locateView(at point: CGPoint) { let correctedPoint = CGPoint(x: point.x - self.frame.width / 2, y: point.y - self.frame.height / 2) self.frame = NSRect(origin: correctedPoint, size: self.frame.size) // update hint to get smooth text on the screen hint?.removeFromSuperview() hint = Hint(with: hintText, toFit: self.size).getView() self.addSubview(hint!) } }
[ -1 ]
e732a89a3cefdb775e4bb0d18db69876409d0da3
519f17825633f6dc8dd0602784e7cb01cb500c19
/ASecret/AppDelegate.swift
3b585aa018dce49e728fc150434789d141307998
[]
no_license
trgoofi/ASecret
f7f0080c833f08b9ca5d4e0e4f3c984405550c18
5f56f29e1232651e5c3defb980e549ec6029dcb8
refs/heads/master
2020-12-31T04:41:50.372331
2016-02-18T05:05:44
2016-02-18T05:05:44
51,894,067
1
0
null
null
null
null
UTF-8
Swift
false
false
422
swift
// // Created by trgoofi. // Copyright © 2015 trgoofi. All rights reserved. // import UIKit import AuntieKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { Theme.applyTheme(Theme.sharedTheme) return true } }
[ -1 ]
99cb709fa4ca55335301f1d63928db60fc9bd71d
b1719ac0f6d74a8ba596dae4efbe80f83b4a4d8b
/star-wars/DefaultValuesifNil.swift
ca0bf580ec385f847d1cbb8b643e0d2b61526ebc
[]
no_license
liuvasconcelos/star-wars
81f8dd3b679128fb467d90642d31afdf17d1ce0a
9ff36563e327f0bfe0b283dc8d2d42ecb12a0002
refs/heads/master
2020-04-04T16:57:18.006522
2018-11-12T23:51:27
2018-11-12T23:51:27
156,100,372
1
0
null
null
null
null
UTF-8
Swift
false
false
1,343
swift
// // DefaultValuesifNil.swift // star-wars // // Created by Livia Vasconcelos on 04/11/18. // Copyright © 2018 Livia Vasconcelos. All rights reserved. // import Foundation class DefaultValuesifNil { static func defaultStringIfNil(_ value: String?, defaultValue: String = "") -> String { return defaultIfNil(value, defaultValue: defaultValue) } static func defaultIntIfNil(_ value: Int?, defaultValue: Int = 0) -> Int { return defaultIfNil(value, defaultValue: defaultValue) } static func defaultFloatIfNil(_ value: Float?, defaultValue: Float = 0.0) -> Float { return defaultIfNil(value, defaultValue: defaultValue) } static func defaultDateIfNil(_ value: Date?, defaultValue: Date = Date()) -> Date { return defaultIfNil(value, defaultValue: defaultValue) } static func defaultBoolIfNil(_ value: Bool?, defaultValue: Bool = false) -> Bool { return defaultIfNil(value, defaultValue: defaultValue) } static func defaultDataIfNil(_ value: Data?, defaultValue: Data = Data()) -> Data { return defaultIfNil(value, defaultValue: defaultValue) } static func defaultIfNil<T>(_ value: T?, defaultValue: T) -> T { if value == nil { return defaultValue } return value! } }
[ -1 ]
e14de42eeb19c6a377124c513ed34b8e55827592
be867dfdbb10429c0d5919a2edec714c6e6028c6
/contributed libraries/iLEDHelpers.swift
8fd8dad24caaa2e649b5c0cd1e411ff9a9506975
[ "MIT" ]
permissive
swiftforarduino/community
6c6f80009c0ef9904682459f3ac116767a025941
81567503a018744e3872dff369fccb5d58c9db5f
refs/heads/master
2023-08-16T16:23:44.215073
2023-05-12T14:40:04
2023-05-12T14:40:04
99,142,171
67
7
MIT
2023-08-08T22:29:54
2017-08-02T17:08:20
C++
UTF-8
Swift
false
false
3,841
swift
// Author: Carl Peto // Date: 07/29/2019 // IDE Version: 3.0 // Description: This library gives some extra functions to help you work with // intelligent LEDs, i.e. neopixels and similar devices. import AVR //---------------------- // Constants //---------------------- public let iLEDLatchDelayMicroseconds:UInt16 = 6 public var pixelCount: UInt16 = 0 //------------------------------------------------------------------------------- // iLED Buffered //------------------------------------------------------------------------------- public func iLED_Setup_Buffered(pin: UInt8, count: UInt8, hasWhiteChip: Bool, grbDataOrder: Bool = true) -> UnsafeMutablePointer<iLEDFastColor> { pinMode(pin: pin, mode: OUTPUT) if let buffer = iLEDFastSetupBuffered ( pin: pin, pixelCount: count, hasWhite: hasWhiteChip, grbOrdered: grbDataOrder) { pixelCount = UInt16(count) // Delay to let iLEDs stabilize then turn all off delay(milliseconds: 10) iLED_AllOff() // latch off delay(milliseconds: 10) return buffer } else { iLED_Setup( pin: pin, count: UInt16(count), hasWhiteChip: hasWhiteChip, grbDataOrder: grbDataOrder) indicateFail() } } public func indicateFail() -> Never { while true { iLEDFastWritePixel(color: iLEDRed) delay(ms: 1000) iLEDFastWritePixel(color: iLEDOff) delay(ms: 1000) } } // when version 2 of the compiler and AVR Lib are finished, will switch on this // kind of interface, but it needs more runtime than we currently have available // public func iLED_WritePixels(pixels: iLEDFastColor...) { // } //------------------------------------------------------------------------------- // iLED Control Functions //------------------------------------------------------------------------------- public func iLED_Setup(pin: UInt8, count: UInt16, hasWhiteChip: Bool, grbDataOrder: Bool = true) { pinMode(pin: pin, mode: OUTPUT) iLEDFastSetup( pin: pin, pixelCount: count, hasWhite: hasWhiteChip, grbOrdered: grbDataOrder) pixelCount = count // Delay to let iLEDs stabilize then turn all off delay(milliseconds: 10) iLED_AllOff() // latch off delay(milliseconds: 10) } public func iLED_AllOn(color: iLEDFastColor) { // Display a single color on all pixels for _ in 1...pixelCount { iLEDFastWritePixel(color: color) } // Latch so color is displayed delay(microseconds: iLEDLatchDelayMicroseconds) } //------------------------------------------------------------------------------- func iLED_AllOff() { // Turn off all pixels iLED_AllOn(color: iLEDOff) } /* Snippets: { "Neopixel Helpers":[ {"partName":"Setup Neopixel Buffer", "partCode":"let ledPin = D4\nlet pixels = 10\n\nvar buffer = iLED_Setup_Buffered(pin: ledPin, count: pixels, hasWhiteChip: true)\n" }, {"partName":"Rainbow", "partCode":"func rainbow() {\n let hueDeltaPerPixel = 255 / pixels\n\n for i in 0..<pixels {\n buffer[Int(i)] = iLEDFastMakeColor(hue: i &* hueDeltaPerPixel, saturation: 255, value: 255, white: 0)\n }\n\n iLEDFastWriteBuffer()\n}\n\nrainbow()" }, {"partName":"Roll Buffer", "partCode":"func rollBuffer() {\n let firstPixel = buffer[0]\n\n for i in 0..<pixels {\n buffer[Int(i)] = buffer[Int(i&+1)]\n }\n\n buffer[Int(pixels&-1)] = firstPixel\n iLEDFastWriteBuffer()\n}" } ] } */
[ -1 ]
253657a90979228c2d68e6255614cd69c7102622
c4ee718d26d386a35eef32322e82bdd3a7b5fa84
/seelog/Views/TextPresentationView.swift
e93a104fad7044b0454b97a1570707e0ece1c8ac
[]
no_license
matus-tomlein/seelog
824411b99d678a4bb00db3c03080aaa2dc9b2ed3
5b0aa9b6203cebccd79b7eb21d38531b5626bd05
refs/heads/master
2023-09-04T02:56:11.738021
2023-08-28T18:49:20
2023-08-28T18:49:20
148,052,009
0
0
null
null
null
null
UTF-8
Swift
false
false
2,701
swift
// // TextPresentationView.swift // seelog // // Created by Matus Tomlein on 26/07/2020. // Copyright © 2020 Matus Tomlein. All rights reserved. // import Foundation import SwiftUI import UIKit struct TextPresentationInnerView: UIViewRepresentable { @Binding var desiredHeight: CGFloat func makeUIView(context: Context) -> UITextView { let standardTextAttributes: [NSAttributedString.Key : Any] = [ NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20), NSAttributedString.Key.foregroundColor: UIColor.label ] let attributedText = NSMutableAttributedString(string: "You can go to ") attributedText.addAttributes( standardTextAttributes, range: NSRange(location: 0, length: attributedText.length) ) let hyperlinkTextAttributes: [NSAttributedString.Key : Any] = [ NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20), NSAttributedString.Key.foregroundColor: UIColor.blue, NSAttributedString.Key.link: "seelog://stackoverflow.com" ] let textWithHyperlink = NSMutableAttributedString(string: "stack overflow site") textWithHyperlink.addAttributes( hyperlinkTextAttributes, range: NSRange(location: 0, length: textWithHyperlink.length) ) attributedText.append(textWithHyperlink) let endOfAttrString = NSMutableAttributedString(string: " end enjoy it using old-school UITextView and UIViewRepresentable") endOfAttrString.addAttributes( standardTextAttributes, range: NSRange(location: 0, length: endOfAttrString.length) ) attributedText.append(endOfAttrString) let textView = UITextView() textView.attributedText = attributedText textView.isEditable = false textView.textAlignment = .center textView.isSelectable = true return textView } func updateUIView(_ uiView: UITextView, context: Context) { let fixedWidth = uiView.frame.size.width let newSize = uiView.sizeThatFits(CGSize(width: fixedWidth, height: CGFloat.greatestFiniteMagnitude)) DispatchQueue.main.async { self.desiredHeight = newSize.height } } } struct TextPresentationView: View { @State private var desiredHeight: CGFloat = 0 var body: some View { TextPresentationInnerView( desiredHeight: self.$desiredHeight ) .frame(height: max(self.desiredHeight, 100)) } } struct TextPresentationView_Previews: PreviewProvider { static var previews: some View { TextPresentationView() } }
[ -1 ]
58d6e94b1f0aaa32ccbbbdb7ced349a060aec971
b6c1c7af7104e7a9e3d9efc7c2c3b8e848e75292
/CoffeeMachine/SupportingFiles/AppDelegate.swift
bdc66b6522ea29b1f6116dd3dba2f74c408a816d
[]
no_license
sasharyabchun/CoffeeMachine
cb7b90b930e4534a588912bf213d4ca27848e800
fb8675fe5011995c6ea980e429f626361d08c5e5
refs/heads/master
2021-01-04T01:17:09.790444
2020-02-13T17:29:02
2020-02-13T17:29:02
240,319,848
0
0
null
null
null
null
UTF-8
Swift
false
false
1,417
swift
// // AppDelegate.swift // CoffeeMachine // // Created by Alexandr on 11.02.2020. // Copyright © 2020 Alexandr. 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, 385081, 376889, 393275, 376905, 327756, 254030, 286800, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 336123, 418043, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 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, 197159, 377383, 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, 418507, 352971, 385742, 385748, 361179, 139997, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 328522, 336714, 426841, 197468, 254812, 361309, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 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, 181678, 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, 214610, 419410, 345701, 394853, 222830, 370297, 403070, 403075, 345736, 198280, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 337592, 419512, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 141051, 337659, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 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, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 321879, 354673, 321910, 248186, 420236, 379278, 354727, 338352, 330189, 338381, 338386, 338403, 338409, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 338660, 338664, 264941, 363251, 207619, 264964, 338700, 256786, 199452, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 330760, 330768, 248862, 396328, 158761, 396336, 199728, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 330958, 330965, 265432, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 372015, 347441, 372018, 199988, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 249214, 175486, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 249312, 339424, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 339588, 126596, 421508, 224904, 224909, 159374, 11918, 339601, 126610, 224913, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 339721, 257801, 257804, 225038, 257807, 372499, 167700, 225043, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 257871, 225103, 397139, 225108, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 225148, 257916, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 217157, 421960, 430180, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 266453, 225493, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 397571, 389380, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 250238, 389502, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 381512, 324170, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 357211, 430939, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 119674, 324475, 340858, 340861, 324478, 430972, 324481, 373634, 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, 381946, 349180, 439294, 431106, 209943, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210039, 341113, 210044, 349308, 152703, 160895, 349311, 210052, 210055, 349319, 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, 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, 333498, 333511, 210631, 358099, 153302, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 210719, 358191, 366387, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 358255, 399215, 268143, 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, 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, 416157, 342430, 268701, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 350761, 252461, 334384, 383536, 358961, 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, 162591, 326441, 326451, 326454, 244540, 326460, 375612, 260924, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 342874, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 261147, 359451, 211998, 261153, 261159, 359470, 343131, 384098, 384101, 367723, 384107, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 351381, 384151, 384160, 367794, 244916, 384188, 351423, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 343306, 261389, 359694, 261393, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 425276, 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, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 262005, 147317, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 327654, 253926, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
ea4135641c11c10e91c735b38b0f20c4a108b04c
016cdc077f6bd7dfc98f63f595d78e5bacc04e9d
/Package.swift
ffeb6416e69344b1c8ef7c802b2686f97b91814a
[]
no_license
peterfriese/CodeSyntaxCSSGeneratorPlugin
e979196b2a5d22cf8051e348d61e67341f5013b2
77bb7fd4b3f8ce9067fdb42be2014f2ac14cd145
refs/heads/master
2023-03-16T01:53:10.180854
2020-04-13T02:13:37
2020-04-13T02:13:37
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,402
swift
// swift-tools-version:5.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "CodeSyntaxCSSGeneratorPlugin", products: [ // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "CodeSyntaxCSSGeneratorPlugin", targets: ["CodeSyntaxCSSGeneratorPlugin"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. .package(url: "https://github.com/johnsundell/publish.git", from: "0.4.0"), .package(url: "https://github.com/SpectralDragon/PublishColorUtils.git", from: "0.1.0"), .package(url: "https://github.com/JohnSundell/SplashPublishPlugin.git", from: "0.1.0") ], 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 which this package depends on. .target( name: "CodeSyntaxCSSGeneratorPlugin", dependencies: ["Publish", "PublishColorUtils", "SplashPublishPlugin"]), .testTarget( name: "CodeSyntaxCSSGeneratorTests", dependencies: ["CodeSyntaxCSSGeneratorPlugin"]), ] )
[ -1 ]
3358e51bd6aea50bdd92c72553a9323b88e65bd3
8312d6712b1cf8f85bee22578674819cb677e74d
/TextKitNotepad/NoteEditorViewController.swift
6935b6a26ca6c023d666cd4b154a0ea0e42d04bf
[]
no_license
iT-Boyer/TextKitNotepad
b658e7bcd4b0ac1a472668adeeda1737c866ec4f
418c30892032e9a6c0d57f3acf8fe157752c23ec
refs/heads/master
2020-06-19T04:25:13.376607
2020-06-08T09:58:10
2020-06-08T09:58:10
196,562,042
1
0
null
null
null
null
UTF-8
Swift
false
false
6,266
swift
// // ViewController.swift // TextKitNotepad // // Created by pengyucheng on 16/5/4. // Copyright © 2016年 recomend. All rights reserved. // //================================================================== //TextKit //四大控件: /** * @author shuguang, 16-05-08 17:05:47 * * 1. NSTextStorage: 以attributedString的方式存储所要处理的文本并且将文本内容的任何变化都通知给布局管理器。可以自定义NSTextStorage的子类,当文本发生变化时,动态地对文本属性做出相应改变。 2. NSLayoutManager: 获取存储的文本并经过修饰处理再显示在屏幕上;在App中扮演着布局“引擎”的角色。 3. NSTextContainer: 描述了所要处理的文本在屏幕上的位置信息。每一个文本容器都有一个关联的UITextView. 可以创建 NSTextContainer的子类来定义一个复杂的形状,然后在这个形状内处理文本。 */ import UIKit class NoteEditorViewController: UIViewController,UITextViewDelegate { // var timeIndicatorView:TimeIndicatorView! var textStorage:SyntaxHighlightTextStorage! = nil var textView:UITextView! = nil @IBOutlet weak var ibTextView: UITextView! var keyboardSize:CGSize! var note:NoteModel! override func viewDidLoad() { // //字体变化通知:调用preferredContentSizeChanged:方法 NotificationCenter.default.addObserver(self, selector: #selector(NoteEditorViewController.preferredContentSizeChanged(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil) //编辑长文本的时候键盘挡住了下半部分文本的问题 NotificationCenter.default.addObserver(self, selector: #selector(NoteEditorViewController.keyboardDidShow(_:)), name: UIResponder.keyboardDidShowNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(NoteEditorViewController.keyboardDidHide(_:)), name: UIResponder.keyboardDidHideNotification, object: nil) createTextView() //时间戳 timeIndicatorView = TimeIndicatorView.init(time: note.timetamp) view.addSubview(timeIndicatorView) } //创建文本区域 func createTextView() { // 1. Create the text storage that backs the editor let bodyFont = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.body) let attrs = [NSAttributedString.Key.font:bodyFont] let attrString = NSAttributedString(string: note.contents,attributes: attrs) textStorage = SyntaxHighlightTextStorage() textStorage.append(attrString) // --------使用Storyboard声明TextView时,只需一行---------- textStorage.addLayoutManager(ibTextView.layoutManager) /**--------使用代码声明TextView时,4步骤---------- let newTextViewRect = view.bounds // 2. Create the layout manager let layoutManager = NSLayoutManager() // 3. Create a text container //文本容器的宽度会自动匹配视图的宽度,但是它的高度是无限高的——或者说无限接近于CGFloat.max,它的值可以是无限大。 let containerSize = CGSize.init(width: newTextViewRect.size.width, height: CGFloat.greatestFiniteMagnitude) let container = NSTextContainer.init(size: containerSize) //A Boolean that controls whether the receiver adjusts the width of its bounding rectangle when its text view is resized. container.widthTracksTextView = true // layoutManager.addTextContainer(container) textStorage.addLayoutManager(layoutManager) // 4. Create a UITextView textView = UITextView()//.init(frame: newTextViewRect, textContainer: container) textView.isScrollEnabled = true textView.delegate = self view.addSubview(textView) */ } //字体变化通知时调用 @objc func preferredContentSizeChanged(_ notification:NSNotification) { //收到用于指定本类接收字体设定变化的通知后 textStorage.update() timeIndicatorView.updateSize() } //视图的控件调用viewDidLayoutSubviews对子视图进行布局时,TimeIndicatorView作为子控件也需要有相应的变化。 override func viewDidLayoutSubviews() { // updateTimeIndicatorFrame() } func updateTimeIndicatorFrame() { //第一调用updateSize来设定_timeView的尺寸。 timeIndicatorView.updateSize() //通过偏移frame参数,将timeIndicatorView放在右上角。 timeIndicatorView.frame = timeIndicatorView.frame.offsetBy(dx:ibTextView.frame.width - timeIndicatorView.frame.width, dy: 0.0) let exclusionPath = timeIndicatorView.curvePathWithOrigin(origin: timeIndicatorView.center) ibTextView.textContainer.exclusionPaths = [exclusionPath] } func textViewDidEndEditing(_ textView: UITextView) { note.contents = ibTextView.text } } //键盘遮挡问题 extension NoteEditorViewController { @objc func keyboardDidShow(_ notification:NSNotification) { // let userInfo = notification.userInfo keyboardSize = (userInfo![UIResponder.keyboardFrameBeginUserInfoKey] as AnyObject).cgRectValue.size updateTextViewSize() } @objc func keyboardDidHide(_ notification:NSNotification) { // keyboardSize = CGSize(width: 0,height: 0) updateTextViewSize() } //键盘显示或隐藏时,缩小文本视图的高度以适应键盘的显示状态 func updateTextViewSize() { //计算文本视图尺寸的时候你要考虑到屏幕的方向 let orientation = UIApplication.shared.statusBarOrientation //因为屏幕方向变化后,UIView的宽高属性会对换,但是键盘的宽高属性却不会 let keyboardHeight = orientation.isLandscape ? keyboardSize.width:keyboardSize.height ibTextView.frame = CGRect.init(x: 0, y: 0, width: view.frame.size.width, height: view.frame.size.height - keyboardHeight) } }
[ -1 ]
d2029b74042dfbd4340c53a9f43fce8ee724d165
28952ff044a8f44a16aab64a9bd41532ec02ac6a
/term project/term project/main.swift
ac14a2d97cffec77ff2cb840d038bf615aed2b09
[]
no_license
rajeshk8627/mad3004w18
2af016f97f6dff1b133def40203882915e7b54a5
833b6b4780fc7cfd55aa6de5a2cb1d200cc9bd09
refs/heads/master
2021-05-09T08:49:07.298556
2018-03-01T16:53:54
2018-03-01T16:53:54
119,409,293
0
0
null
null
null
null
UTF-8
Swift
false
false
544
swift
// // main.swift // term project // // Created by MacStudent on 2018-02-05. // Copyright © 2018 MacStudent. All rights reserved. // import Foundation print("Welcome to shopping mart") print("\n") print("Please select who you are") print("1 Admin") print("2 Customer") let Choice = Int(readLine()!) switch Choice { case 1? : print("You are admin") let adm = Administrator() adm.updateCatalog() case 2? : print("You are Customer") let cus = Customer() cus.Option() default: print("Invalid choice") }
[ -1 ]
120eed463dca693cb02d648c9e0f82dc72ac5944
8bda7de68ad3b6f8310cce68ec216833a1e7354b
/ZhizhuPractice/Sections/MineViewController.swift
579ddd289049ce6019d9c97f0e639366b88f8639
[]
no_license
LinlinFu/zhizhu
73dca1f834094f23de16a75644d37ad86dfb4c94
8b20ba978a709ffe2401180ab21d04897bdb70b0
refs/heads/master
2021-01-11T13:40:18.438937
2017-06-22T10:39:28
2017-06-22T10:39:28
95,060,125
0
0
null
null
null
null
UTF-8
Swift
false
false
5,487
swift
// // MineViewController.swift // ZhizhuPractice // // Created by wujianlin on 2017/5/17. // Copyright © 2017年 wujianlin. All rights reserved. // import UIKit class MineViewController: BaseViewController { // var tableView: UITableView! var cellTitleArray = ["实习计划", "考核汇总", "个人资料", "账户安全", "设置"] var albumManager: AlbumManager! override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if tableView != nil { tableView.reloadData() } } override func viewDidLoad() { super.viewDidLoad() albumManager = AlbumManager(context: self) buildTableView() } func buildTableView() { tableView = UITableView(frame: CGRect(x: 0, y: 0, width: ZZScreenWidth, height: ZZScreenHeight - 64), style: .grouped) tableView.delegate = self tableView.dataSource = self tableView.rowHeight = 50 tableView.backgroundColor = ZZWhiteBackground let header = MineTableViewHeader(frame: CGRect(x: 0, y: 0, width: ZZScreenWidth, height: 200)) tableView.tableHeaderView = header view.addSubview(tableView) // 修改头像 header.tapAvatarHandle = { [weak self] (imageView) in print(123) guard let sSelf = self else { return } sSelf.albumManager.startAlbumAction(isCamera: false) { (resultImage) in guard let image = resultImage else { return } let data: Data = UIImagePNGRepresentation(image)! let imageName = String(describing: NSDate()) + ".jpg" print(data) let param = ["name":imageName,"refRelationCategory":"USER_PHOTO_LOCATION_CUT"] ServerProvider<AccountServer>().upLoadImageRequest(urlString: "\(ZZHelper().uploadURL)/file/phoneUpload", params: param, data: data, fileName: imageName, success: { (response) in let photoUrl = JSON(response)["resultObject"]["filePath"].stringValue ServerProvider<AccountServer>().requestReturnDictionary(target: .getUserPhoto(photoUrl: JSON(response)["resultObject"]["filePath"].stringValue), completion: { (success, info) in guard let info = info else { let vc = RemindViewController(title: "网络异常", type: .failure) self?.present(vc, animated: true, completion: nil) return } if success && JSON(info)["status"].stringValue == "200" { imageView.image = resultImage UserDefaults.standard.set(photoUrl, forKey: AppKeys.UserphotoUrl) } else { let vc = RemindViewController(title: JSON(info)["errorMessage"].stringValue, type: .failure) self?.present(vc, animated: true, completion: nil) } }) }, failture: { (error) in print("\(error)---------") }) } } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } } extension MineViewController: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return cellTitleArray.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { var cell = tableView.dequeueReusableCell(withIdentifier: "mineCell") if cell == nil { cell = UITableViewCell(style: .default, reuseIdentifier: "mineCell") } cell?.textLabel?.text = cellTitleArray[indexPath.row] cell?.textLabel?.font = UIFont.systemFont(ofSize: 16) cell?.accessoryType = .disclosureIndicator return cell! } func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { return 0.1 } func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 0.1 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) switch cellTitleArray[indexPath.row] { case "实习计划": let vc = PracticePlanViewController() self.navigationController?.pushViewController(vc, animated: true) return case "考核汇总": let vc = CheckGradesViewController() self.navigationController?.pushViewController(vc, animated: true) return case "个人资料": let vc = RemindViewController(title: "该功能暂未开放", type: .failure) self.present(vc, animated: true, completion: nil) return case "账户安全": let vc = AccountSaftyViewController() self.navigationController?.pushViewController(vc, animated: true) return case "设置": let vc = SettingViewController() self.navigationController?.pushViewController(vc, animated: true) return default: return } } }
[ -1 ]
262de73e6cfd1f611729432a09923344112076b6
8bb68369c32694bbc6aa213194c91e6d408c69b2
/Instagram Clone/Controllers/ProfileNavigateViewController.swift
d849c1c0b01ad113e6c14323fbebff0157fd8161
[]
no_license
sahebsingh416/Instagram_Clone
1eb3dd44c316e88a8182951b48343aa55e2f6cbd
48ade1ac93c1dafdfb375b392993c6842766e722
refs/heads/master
2020-06-15T08:07:40.291952
2019-07-05T13:12:05
2019-07-05T13:12:05
195,241,732
0
0
null
null
null
null
UTF-8
Swift
false
false
747
swift
// // ProfileNavigateViewController.swift // Instagram Clone // // Created by Saheb Singh Tuteja on 03/07/19. // Copyright © 2019 Solution Analysts. All rights reserved. // import UIKit class ProfileNavigateViewController: UINavigationController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ -1 ]
a5776befaa9c489d2c635a763c75ed23bbc878c8
554d12ed3cf0aadf2dc2250e9863030e54164361
/tsaheel031019/tsaheel/Views/MenuCell.swift
8d32fd0866501b5677cabeb86ab39501761eab5f
[]
no_license
islamswira/IOS_Tsaheel_app
6f85f4dcd6ae9ccd37840abc9bd6ef405fdb5156
cfd4d5731b260ecb37afab6440c36878dbd0c9a3
refs/heads/master
2020-07-24T04:39:18.739884
2019-10-08T18:11:44
2019-10-08T18:11:44
207,803,474
0
0
null
null
null
null
UTF-8
Swift
false
false
522
swift
// // MenuCell.swift // tsaheel // // Created by Islam Swira on 8/30/19. // Copyright © 2019 com.Islam Swira. All rights reserved. // import UIKit class MenuCell: UITableViewCell { @IBOutlet weak var nameLbl: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 300672, 317952, 337412, 328709, 379140, 227852, 100495, 298255, 373908, 410749, 373910, 155289, 305183, 155555, 337317, 356391, 245035, 311211, 313522, 313525, 293302, 313527, 155576, 313529, 313530, 380220, 349123, 317381, 317382, 327241, 430412, 254029, 215122, 295127, 388317, 131814, 213095, 330602, 348778, 167413, 167670, 49916, 337917 ]
5f9cb3dfc0440fbfc3346ba8ef2d558675344d88
b771314080d98d5aa8b7c6655c36770dbba792bb
/PerfectSetup/PerfectProjectTests/PerfectProjectTests.swift
bce4aa6f77e225075785e167079c2a0013652929
[]
no_license
williamhardys/Perfect_Tutorials
8a12e74d832501cd8c9242c2a83ce6a7a6977c86
13f8363fcba5be76d8abe3b26f916eacf8a85ea6
refs/heads/master
2021-01-18T20:17:26.668958
2016-05-17T19:05:53
2016-05-17T19:05:53
null
0
0
null
null
null
null
UTF-8
Swift
false
false
999
swift
// // PerfectProjectTests.swift // PerfectProjectTests // // Created by nichrago on 2016-05-03. // Copyright © 2016 nichrago. All rights reserved. // import XCTest @testable import PerfectProject class PerfectProjectTests: 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, 360491, 344107, 253999, 229424, 229430, 319542, 180280, 213052, 286788, 352326, 311372, 196691, 278615, 131178, 278634, 278638, 319598, 352368, 131189, 237689, 131198, 278655, 311435, 278670, 311438, 278677, 278685, 311458, 278691, 49316, 196773, 278699, 32941, 278704, 278708, 131256, 278714, 295098, 254170, 286958, 327929, 278797, 180493, 254226, 319763, 278810, 278816, 98610, 262450, 278842, 287041, 319813, 311621, 319821, 254286, 344401, 278869, 155990, 106847, 246127, 246136, 139640, 246137, 311681, 311685, 246178, 311727, 377264, 278961, 278965, 319930, 33211, 278970, 336317, 278978, 188871, 278989, 278993, 278999, 328152, 369116, 287198, 188894, 279008, 279013, 279018, 311786, 319981, 279022, 319987, 279029, 279032, 279039, 287241, 279050, 303631, 279057, 279062, 279065, 180771, 377386, 279094, 352829, 115270, 295519, 66150, 279144, 344680, 279146, 287346, 279164, 189057, 303746, 311941, 279177, 369289, 344715, 311949, 287374, 311954, 352917, 295576, 230040, 271000, 221852, 205471, 279206, 295590, 287404, 295599, 205487, 279217, 303793, 164533, 230072, 287417, 66242, 279252, 295652, 279269, 246503, 279280, 312052, 230134, 279294, 205568, 336671, 344865, 279336, 295724, 312108, 353069, 164656, 328499, 353078, 230199, 353079, 336702, 279362, 353094, 353095, 353109, 230234, 279392, 303972, 246641, 246648, 279417, 361337, 254850, 213894, 287622, 58253, 295824, 279456, 189348, 279464, 353195, 140204, 353197, 287677, 189374, 353216, 213960, 279498, 50143, 123881, 304110, 320494, 287731, 295927, 304122, 320507, 328700, 328706, 320516, 230410, 320527, 418837, 140310, 230423, 197657, 336929, 189474, 345132, 238639, 238651, 230463, 238664, 296019, 353367, 156764, 156765, 304222, 230499, 279660, 156785, 312434, 353397, 279672, 337017, 279685, 222343, 296086, 296092, 238765, 279728, 238769, 230588, 279747, 353479, 353481, 353482, 279760, 189652, 189653, 148696, 296153, 279774, 304356, 328940, 279792, 353523, 279814, 312587, 328971, 320796, 304421, 279854, 345396, 116026, 222524, 279875, 304456, 230729, 222541, 238927, 296273, 222559, 230756, 230765, 296303, 279920, 312689, 296307, 116084, 181625, 378244, 296335, 230799, 279974, 279984, 173491, 279989, 296375, 296387, 296391, 296392, 361927, 280010, 370123, 148940, 280013, 312782, 222675, 353750, 239068, 280032, 280041, 296425, 361963, 329197, 329200, 321009, 280055, 288249, 230921, 149007, 304656, 329232, 230959, 312880, 288309, 312889, 288318, 280130, 124485, 288326, 288327, 280147, 239198, 312940, 222832, 247416, 288378, 337535, 288392, 239250, 345752, 255649, 206504, 321199, 198324, 296628, 337591, 321207, 296632, 280251, 280257, 321219, 280267, 9936, 313041, 9937, 280278, 280280, 18138, 321247, 313065, 280300, 239341, 419569, 313081, 124669, 288512, 288516, 280327, 280329, 321302, 116505, 321310, 247590, 280366, 280372, 280374, 321337, 280380, 345919, 280390, 280392, 345929, 18262, 280410, 370522, 345951, 362337, 345955, 296806, 288619, 288620, 280430, 313199, 362352, 313203, 124798, 182144, 305026, 67463, 329622, 337815, 124824, 214937, 214938, 247712, 354212, 124852, 288697, 214977, 280514, 280519, 247757, 231375, 280541, 337895, 247785, 296941, 329712, 362480, 313339, 313357, 182296, 305179, 313375, 239650, 354343, 354345, 223274, 124975, 346162, 124984, 288833, 288834, 313416, 280649, 354385, 223316, 280661, 223318, 329814, 338007, 354393, 288857, 280675, 280677, 313447, 288879, 280694, 223350, 288889, 215164, 313469, 215166, 280712, 141450, 215178, 346271, 239793, 125109, 182456, 280762, 223419, 379071, 280768, 338119, 321745, 280795, 280802, 338150, 125169, 338164, 157944, 125183, 125188, 313608, 125193, 125198, 125203, 125208, 305440, 125217, 125235, 280887, 125240, 321860, 280902, 182598, 289110, 272729, 379225, 354655, 321894, 280939, 354676, 313727, 280961, 248194, 362881, 395659, 395661, 240016, 190871, 141728, 289189, 281040, 281072, 223767, 289304, 223769, 182817, 338490, 322120, 281166, 354911, 436832, 191082, 313966, 281199, 330379, 133774, 330387, 330388, 289434, 338613, 166582, 314040, 158394, 199366, 363211, 289502, 363230, 338662, 346858, 330474, 289518, 199414, 35583, 363263, 191235, 322313, 322316, 322319, 166676, 207640, 281377, 289576, 289598, 281408, 420677, 281427, 281433, 322395, 330609, 158593, 240518, 289698, 289703, 289727, 363458, 19399, 52172, 183248, 338899, 248797, 207838, 314342, 289774, 183279, 314355, 240630, 314362, 330754, 134150, 322582, 281625, 281626, 175132, 330788, 248872, 322612, 207938, 314448, 314467, 281700, 322663, 207979, 363644, 150657, 248961, 330888, 339102, 330913, 306338, 249002, 281771, 3246, 208058, 339130, 290000, 298208, 363744, 298212, 290022, 330984, 298228, 216315, 208124, 388349, 363771, 322824, 126237, 339234, 199971, 306494, 216386, 224586, 372043, 314709, 314710, 224606, 314720, 142689, 281957, 281962, 314739, 306559, 224640, 314758, 298374, 314760, 142729, 281992, 388487, 314766, 306579, 282007, 290207, 314783, 314789, 282022, 314791, 282024, 241066, 314798, 380357, 339398, 306639, 191981, 282096, 306673, 306677, 191990, 290301, 282114, 306693, 323080, 192010, 323087, 282136, 282141, 282146, 306723, 290358, 282183, 290390, 306776, 282213, 323178, 224883, 314998, 175741, 192131, 282245, 282246, 224901, 290443, 323217, 282259, 282271, 282273, 282276, 298661, 323236, 290471, 282280, 298667, 323263, 282303, 282312, 306890, 241361, 298712, 216795, 298720, 12010, 282348, 282358, 175873, 323331, 323332, 216839, 249626, 282400, 241441, 339745, 241442, 257830, 159533, 282417, 282427, 315202, 282434, 307011, 282438, 216918, 307031, 282474, 282480, 241528, 315264, 339841, 282504, 315273, 315274, 110480, 282518, 282519, 44952, 298909, 118685, 200627, 323507, 282549, 290746, 151497, 298980, 282612, 290811, 282633, 241692, 307231, 102437, 233517, 159807, 315476, 307289, 200794, 315487, 307299, 315497, 315498, 299121, 233589, 241808, 323729, 233636, 299174, 299187, 184505, 299198, 299203, 282831, 356576, 176362, 233715, 184570, 168188, 184575, 299293, 233762, 217380, 282919, 151847, 332085, 332089, 315706, 282939, 241986, 332101, 323916, 348492, 250192, 323920, 348500, 323935, 242023, 242029, 291192, 225670, 242058, 291224, 283038, 61857, 315810, 315811, 381347, 61859, 340398, 61873, 283064, 61880, 283075, 127427, 127428, 324039, 176601, 242139, 242148, 291311, 233978, 291333, 340490, 283153, 291358, 283182, 283184, 234036, 315960, 242237, 70209, 348742, 70215, 348749, 332378, 242273, 111208, 291454, 184962, 348806, 152203, 184973, 111253, 316053, 111259, 299699, 299700, 225995, 225997, 226004, 226007, 299746, 226019, 299759, 234234, 299776, 234241, 209670, 226058, 234250, 234253, 234263, 283419, 234268, 234277, 283430, 234283, 152365, 234286, 234289, 242485, 234294, 234301, 234311, 234312, 299849, 283467, 234317, 234323, 234326, 234331, 349026, 234340, 234343, 275303, 201577, 234346, 308076, 242541, 234355, 234360, 209785, 234361, 177019, 234366, 234367, 234372, 226181, 226184, 308107, 308112, 234386, 234387, 234392, 209817, 324506, 324507, 234400, 234404, 324517, 283558, 234409, 275371, 234419, 234425, 234427, 234430, 349121, 234436, 234438, 234444, 234445, 316364, 234451, 234454, 234457, 340955, 234463, 340961, 234466, 234472, 234473, 324586, 234477, 340974, 234482, 316405, 201720, 234498, 234500, 234506, 324625, 234514, 316437, 201755, 234531, 300068, 234534, 357414, 234542, 234548, 300084, 324666, 234555, 308287, 234560, 21569, 234565, 234569, 300111, 234577, 341073, 234583, 234584, 234587, 250981, 300135, 300136, 316520, 275565, 316526, 357486, 300146, 275571, 300151, 234616, 398457, 291959, 160891, 341115, 234622, 300158, 349316, 349318, 275591, 234632, 234638, 169104, 177296, 234642, 308372, 185493, 119962, 119963, 300188, 300187, 234656, 234659, 234663, 300201, 300202, 275625, 226481, 283840, 259268, 283847, 62665, 283852, 283853, 333011, 357595, 234733, 234742, 316669, 234755, 242954, 292107, 251153, 177428, 226608, 300343, 226624, 193859, 226632, 177484, 251213, 234831, 120148, 283991, 357719, 218462, 292195, 333160, 284014, 243056, 111993, 112017, 112018, 234898, 357786, 333220, 316842, 210358, 284089, 292283, 415171, 292292, 300487, 300489, 284107, 284116, 366037, 210390, 210391, 210393, 226781, 144867, 316902, 54765, 251378, 308723, 300535, 300536, 300542, 210433, 366083, 316946, 308756, 398869, 308764, 349726, 349741, 169518, 194110, 235070, 349763, 276040, 292425, 366154, 243274, 333388, 276045, 128587, 218696, 333393, 300630, 128599, 235095, 243292, 374372, 317032, 54893, 325231, 276085, 366203, 235135, 276120, 276126, 300714, 218819, 276173, 333517, 333520, 333521, 333523, 276195, 153319, 284401, 276210, 276219, 325371, 194303, 284429, 276238, 284431, 366360, 284442, 325404, 276253, 325410, 341796, 284459, 300848, 317232, 276282, 276283, 276287, 325439, 276294, 153415, 276298, 341836, 325457, 284507, 300894, 284512, 284514, 292712, 325484, 292720, 325492, 276344, 194429, 325503, 333701, 243591, 243597, 325518, 292771, 333735, 284587, 292782, 243637, 276408, 276421, 284619, 276430, 301008, 153554, 276444, 219101, 292836, 292837, 276454, 276459, 325619, 333817, 292858, 145435, 292902, 227370, 309295, 276534, 358456, 325694, 227417, 194656, 309345, 227428, 276582, 194666, 276589, 227439, 333940, 284788, 292988, 292992, 194691, 227460, 333955, 235662, 325776, 276627, 317587, 276632, 284826, 333991, 333992, 284841, 284842, 129203, 227513, 301251, 227524, 309444, 276682, 227548, 301279, 211193, 243962, 227578, 309503, 194820, 375051, 325905, 325912, 309529, 211235, 260418, 227654, 227658, 276813, 325968, 6481, 6482, 366929, 366930, 6489, 391520, 276835, 416104, 276847, 285040, 317820, 211326, 227725, 227726, 178578, 293274, 285084, 317852, 285090, 375207, 293303, 276920, 276925, 293310, 317901, 326100, 285150, 227809, 358882, 342498, 227813, 195045, 301571, 276998, 342536, 186893, 342553, 375333, 293419, 236081, 23092, 277048, 309830, 301638, 55881, 309846, 244310, 285271, 277094, 277101, 277111, 301689, 244347, 277133, 227990, 342682, 285353, 285361, 318130, 342706, 293556, 342713, 285371, 285373, 334547, 203477, 318173, 285415, 342762, 277227, 129773, 154359, 228088, 162561, 285444, 285458, 310036, 285466, 326429, 326433, 318250, 318252, 285497, 293693, 162621, 342847, 162626, 277316, 277325, 293711, 301918, 293730, 351077, 342887, 277366, 228215, 277370, 269178, 359298, 277381, 113542, 228233, 228234, 56208, 277403, 318364, 236461, 130016, 64485, 277479, 277492, 318461, 277509, 277510, 146448, 277523, 277524, 310317, 252980, 359478, 302139, 277563, 359495, 277597, 113760, 285798, 228458, 15471, 187506, 285820, 187521, 285828, 302213, 285830, 253063, 228491, 228493, 285838, 162961, 326804, 187544, 302240, 343203, 253099, 367799, 277690, 64700, 343234, 367810, 244940, 228563, 310497, 195811, 228588, 253167, 204022, 228600, 228609, 245019, 277792, 130338, 130343, 277800, 113966, 351537, 286018, 113987, 15686, 294218, 318805, 294243, 163175, 327025, 327031, 179587, 368011, 318864, 318875, 310692, 286129, 228795, 302529, 302531, 163268, 163269, 302540, 310732, 64975, 327121, 212442, 228827, 286172, 310757, 187878, 343542, 343543, 286202, 228861, 286205, 228867, 253452, 65041, 146964, 204313, 245287, 278060, 245292, 286254, 56902, 286288, 196187, 147036, 343647, 286306, 310889, 204397, 138863, 188031, 294529, 229001, 310923, 188048, 229020, 302754, 245412, 229029, 40613, 40614, 40615, 278191, 286388, 319162, 286399, 302797, 212685, 212688, 245457, 302802, 286423, 278233, 278234, 294622, 278240, 229088, 212716, 212717, 229113, 286459, 278272, 319233, 311042, 278291, 278293, 294678, 278299, 286494, 294700, 319288, 360252, 188251, 245599, 237408, 302946, 253829, 40853, 294807, 294809, 294814, 319392, 294823, 294843, 294850, 163781, 344013, 212946, 294886, 253929, 327661, 278512, 311282 ]
350df98a922e0f022b9f4c8cb7f63a620588cfca
00de24bfc76dd9252e9fbc151e9fd2e161b2e999
/CallDemo/ViewController.swift
8a48edb8b69590f017bc5647b647c2dfb7f59a72
[]
no_license
z1joey/iOS_UI_Demos
3464a225501d568a5b1e5ee8e0fc94b0bd84f45b
c7d40de53aed3133ce9b6b33062180aa223cd4d5
refs/heads/master
2020-04-24T00:07:49.622256
2019-02-23T13:55:51
2019-02-23T13:55:51
171,556,433
0
0
null
null
null
null
UTF-8
Swift
false
false
349
swift
// // ViewController.swift // CallDemo // // Created by Yi Zhang on 2019/2/22. // Copyright © 2019 Yi Zhang. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } }
[ 190120 ]
5f28bff88cde62e715f92cf8a43375f24b325046
f4df767b208bd3d326a3dc67b3540d42b54db04a
/Asparagus/Extension/UINavigationController.swift
8f6e93ddbef9fcc4a8a834d85fefb8dbec9526c9
[]
no_license
torpedo87/Asparagus
6f9d19157664a5532a96c2a35b65f27ea43ca86b
dedcbd35bb8502910bf503cba598573bef770105
refs/heads/master
2018-09-27T18:36:20.628520
2018-06-28T08:08:25
2018-06-28T08:08:25
123,086,143
2
0
null
null
null
null
UTF-8
Swift
false
false
1,330
swift
// // UINavigationController.swift // Asparagus // // Created by junwoo on 2018. 4. 10.. // Copyright © 2018년 samchon. All rights reserved. // import UIKit import RxSwift import RxCocoa class RxNavigationControllerDelegateProxy: DelegateProxy<UINavigationController, UINavigationControllerDelegate>, DelegateProxyType, UINavigationControllerDelegate { init(navigationController: UINavigationController) { super.init(parentObject: navigationController, delegateProxy: RxNavigationControllerDelegateProxy.self) } static func registerKnownImplementations() { self.register { RxNavigationControllerDelegateProxy(navigationController: $0) } } static func currentDelegateFor(_ object: AnyObject) -> AnyObject? { guard let navigationController = object as? UINavigationController else { fatalError() } return navigationController.delegate } static func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { guard let navigationController = object as? UINavigationController else { fatalError() } if delegate == nil { navigationController.delegate = nil } else { guard let delegate = delegate as? UINavigationControllerDelegate else { fatalError() } navigationController.delegate = delegate } } }
[ -1 ]
ae1e2bb1408c3f470ab2e02602652534369e157d
24e88caa6313e28323f85eec7a187841077dcdf5
/UppSense/BLEController.swift
8fcd065fd917bfc084dd9de3032a8dc5270aed47
[]
no_license
jay27111995/UppSense-iOS-App-Deveopment
b6a4cee06c98ec7b8b7c9ba86068c7b68cf08946
b65c0a8117931848fe92eb4eba9734649c11e9b9
refs/heads/main
2023-08-18T08:10:40.561636
2021-09-11T13:14:10
2021-09-11T13:14:10
395,136,611
0
0
null
null
null
null
UTF-8
Swift
false
false
4,004
swift
// // BLEController.swift // UppSense // // Created by Jayendra Prashanth on 16/06/21. // import Foundation import CoreBluetooth struct resultMsg { var result: String var biosensorID: String var testID: String var date: String var time: String } class BLEController: NSObject, ObservableObject, CBPeripheralManagerDelegate { @Published var peripheralManager: CBPeripheralManager! @Published var BLEon = false @Published var Result = "" @Published var showAlert = false //State var to show alert When a result arises @Published var currentResultMsg: resultMsg! //@Published var peripheralUUID = CBUUID() @Published var peripheralUUID = CBUUID(string: "a5089693-697f-45a7-a229-55d37e1573ee") /* Use this UUID one the pairing device to connect to the app */ let characteristicUUID = "b548b211-0ed7-4042-aa1c-cab3126afce3" /* UUID for recieving H1N1 Result */ var service: CBMutableService? override init() { super.init() peripheralManager = CBPeripheralManager(delegate: self, queue: nil, options: nil) peripheralManager.delegate = self } func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) { if (peripheral.state == .poweredOn) { BLEon = true self.service = CBMutableService(type: peripheralUUID, primary: true) } else { print("Bluetooth not powered on!") return } let characteristic = CBMutableCharacteristic.init( type: CBUUID(string: "A5089693-697F-45A7-A229-55D37E1573EE"), properties: [.write], value: nil, permissions: [CBAttributePermissions.writeable]) self.service?.characteristics = [] self.service?.characteristics?.append(characteristic) self.peripheralManager.add(self.service!) } func peripheralManager(_ peripheral: CBPeripheralManager, didAdd service: CBService, error: Error?) { if let error = error { print("Add service failed: \(error.localizedDescription)") return } print("Add service succeeded") peripheralManager.startAdvertising([CBAdvertisementDataLocalNameKey: "UppSense Patient", CBAdvertisementDataServiceUUIDsKey : [self.service!.uuid]]) } func peripheralManagerDidStartAdvertising(_ peripheral: CBPeripheralManager, error: Error?) { if let error = error { print("Start advertising failed: \(error.localizedDescription)") return } print("Start advertising succeeded") } // Called when receiving writing from Central. func peripheralManager(_ peripheral: CBPeripheralManager, didReceiveWrite requests: [CBATTRequest]) { print("didReceiveWrite requests") //Recieve data let request = requests.last! self.Result = String.init(data: request.value!, encoding: String.Encoding.utf8) ?? "" print(self.Result) // String will be recieved in format Positive$BiosensorID$TestID$Date$Time let result_str_array = self.Result.components(separatedBy: "+") currentResultMsg = resultMsg(result: result_str_array[0], biosensorID: result_str_array[1], testID: result_str_array[2], date: result_str_array[3], time: result_str_array[4]) showAlert = true // Show alert message // Send response to central if this writing request asks for response [.withResponse] print("Sending response: Success") peripheral.respond(to: request, withResult: .success) } } func ble_in_test() { let str = "Positive$KA70$3763$8th September 2012$17:20 CET" let str_array = str.components(separatedBy: "$") print(str_array[0]) print(str_array[1]) print(str_array[2]) print(str_array[3]) print(str_array[4]) }
[ -1 ]
3c38c679d4defe9756d9864b9256bbc05ec0fd0e
0f4f7a5906779937821adb6bc3ce01061f52341e
/Cells/ItemCell.swift
5c658714fdd348c8e529d288362832971d960802
[]
no_license
Zhcyn/Accumulation
ee259408a22e8027c65e251bf51036c4a7ef949b
8b5a64b9a310518c18acd36e6c252785fb36a435
refs/heads/master
2020-09-12T12:32:21.046392
2019-11-18T11:28:11
2019-11-18T11:28:11
222,426,533
0
0
null
null
null
null
UTF-8
Swift
false
false
565
swift
import UIKit class ItemCell: UITableViewCell { @IBOutlet weak var itemTextLabel: UILabel! @IBOutlet weak var checkmarkImageView: UIImageView! @IBOutlet weak var emptyCheckmark: UIImageView! @IBOutlet weak var dueDate: UILabel! static var defaultReuseIdentifier: String { return "\(self)" } override func awakeFromNib() { super.awakeFromNib() checkmarkImageView.isHidden = true } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) } }
[ -1 ]
6a32e1ab885e8193904dfb8102e552d8e04641a5
f10290412cae09049f4901a3bf1d773eb52140c7
/TestTaskJatApp/Support/Colors.swift
9cff0543bc8ede537ed9f226f244615bfa39de85
[]
no_license
NechyporenkoN/JatAppTestTask
7ad7d598fceaf4e78504c611ee5beaeb4775b46a
4313c3260eef15715ec07daf56263340d53c3255
refs/heads/master
2021-03-18T21:27:43.978019
2020-03-13T15:23:38
2020-03-13T15:23:38
247,101,969
0
0
null
null
null
null
UTF-8
Swift
false
false
357
swift
// // Colors.swift // TestTaskJatApp // // Created by Nikita Nechyporenko on 13.03.2020. // Copyright © 2020 Nikita Nechyporenko. All rights reserved. // import UIKit class Colors { static let specialGreen = UIColor(red: 0.00, green: 0.56, blue: 0.00, alpha: 1.0) static let specilBlue = UIColor(red: 0.00, green: 0.33, blue: 0.58, alpha: 1.0) }
[ -1 ]
f57699a848264c81c43e232b38d8867ba0f75da7
9c07dbfdae32a545a265959062a93ba22f1a5d38
/pon/EditorController.swift
15304a9895a6d3389b20ee628dba8d30209c683c
[]
no_license
demirdazdarevic/PyramidOfNeed_Swift
4a5baed777399d1655ae1cc9f0ab09891d7341ec
e7e85c0005ad806152dfb1e982e50a5fbf530b6d
refs/heads/main
2023-03-05T12:05:17.873353
2021-02-17T12:04:53
2021-02-17T12:04:53
null
0
0
null
null
null
null
UTF-8
Swift
false
false
5,288
swift
// // EditorController.swift // pon // // Created by Demir Dazdarevic on 17.2.21.. // import Foundation import UIKit class EditorController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource { func numberOfComponents(in pickerView: UIPickerView) -> Int { return 1 } func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { return avatars.count } func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { avatars[row] } func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { selectedImg = avatars[row] print(row) // This method is triggered whenever the user makes a change to the picker selection. // The parameter named row and component represents what was selected. } @IBOutlet weak var name: UITextField! @IBOutlet weak var num: UITextField! @IBOutlet weak var address: UITextField! @IBOutlet weak var email: UITextField! @IBOutlet weak var img: UIPickerView! struct usr: Decodable { let email: String let fullname: String let number: String let address: String let img:String } let avatars:[String]=["boy-1.png","boy.png","girl-1.png","girl.png","man.png","man-1.png","man-2.png","man-3.png","man-4.png"] var selectedImg = "" override func viewDidLoad() { NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: UIResponder.keyboardWillHideNotification, object: nil) hideKeyboardWhenTappedAround() self.img.delegate = self self.img.dataSource = self var result = Data() var resultString = "null" let preferences = UserDefaults.standard let url = URL(string: "https://webapi20210118170049.azurewebsites.net/api/User/?email=\(preferences.string(forKey: "email") ?? "")")! //SEMAFOR DA CEKA DA SE GET URADI let sem = DispatchSemaphore(value: 0) let task = URLSession.shared.dataTask(with: url) {(data, response, error) in guard let data = data else { return } result = data resultString = String(data: data, encoding: .utf8) ?? "null" sem.signal() } task.resume() sem.wait() if (resultString != "null") { let json = try! JSONDecoder().decode(usr.self, from: result) name.text = json.fullname num.text = json.number address.text = json.address email.text = json.email selectedImg = json.img email.isUserInteractionEnabled = false } } @objc func keyboardWillShow(notification: NSNotification) { if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue { if self.view.frame.origin.y == 0 { self.view.frame.origin.y -= (keyboardSize.height - 50) } } } @objc func keyboardWillHide(notification: NSNotification) { if self.view.frame.origin.y != 0 { self.view.frame.origin.y = 0 } } @IBAction func potvrdi(_ sender: Any) { let preferences = UserDefaults.standard let url2 = URL(string: "https://webapi20210118170049.azurewebsites.net/api/User")! var request2 = URLRequest(url: url2) request2.httpMethod = "POST" let payload2 = "email=\(preferences.string(forKey: "email") ?? "")&fullname=\(name.text ?? "")&address=\(address.text ?? "")&number=\(num.text ?? "")&img=\(selectedImg)".data(using: .utf8)! //let payload2 = "email=\(preferences.string(forKey:"email" ) ?? "")&password=\(preferences.string(forKey:"password" ) ?? "")&points=3".data(using: .utf8)! let task2 = URLSession.shared.uploadTask(with: request2, from: payload2) { data, response, error in print(String(data: data!, encoding: .utf8) as Any) } task2.resume() let alert = UIAlertController(title: "Obaveštenje:", message: "Uspešna izmena!", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in switch action.style{ case .default: do{ self.dismiss(animated: true, completion: nil) } case .cancel: do{ self.dismiss(animated: true, completion: nil) } case .destructive: do{ } @unknown default: print("error") } })) self.present(alert, animated: true, completion: nil) } }
[ -1 ]
55edc006ae9cc746f30d0d280c949f46b9203596
7dfda947267909349401daa2676f8829298528bc
/Sources/Model/ElloLinkedStore.swift
1325dfa80a89b7f604b38afb26278ad644c55787
[ "MIT" ]
permissive
minhthuanit/ello-ios
a7e238023f6b56b757c79289b18382c4de011caa
5d99965b665c1511cb790d2337c2f7eeb71d61bb
refs/heads/master
2021-01-18T07:36:38.594146
2016-07-21T20:53:51
2016-07-21T20:53:51
64,071,923
1
0
null
2016-07-24T15:25:20
2016-07-24T15:25:19
null
UTF-8
Swift
false
false
4,245
swift
//// /// ElloLinkedStore.swift // import Foundation import YapDatabase private let _ElloLinkedStore = ElloLinkedStore() public struct ElloLinkedStore { public static var sharedInstance: ElloLinkedStore { return _ElloLinkedStore } public static var databaseName = "ello.sqlite" public var readConnection: YapDatabaseConnection { let connection = database.newConnection() connection.objectCacheLimit = 500 return connection } public var writeConnection: YapDatabaseConnection private var database: YapDatabase public init() { ElloLinkedStore.deleteNonSharedDB() database = YapDatabase(path: ElloLinkedStore.databasePath()) writeConnection = database.newConnection() } public func parseLinked(linked: [String:[[String: AnyObject]]], completion: ElloEmptyCompletion) { if AppSetup.sharedState.isTesting { parseLinkedSync(linked) completion() } else { inBackground { self.parseLinkedSync(linked) inForeground(completion) } } } // primarialy used for testing for now.. could be used for setting a model after it's fromJSON public func setObject(object: JSONAble, forKey key: String, inCollection collection: String ) { writeConnection.readWriteWithBlock { transaction in transaction.setObject(object, forKey: key, inCollection: collection) } } public func getObject(key: String, inCollection collection: String) -> JSONAble? { var object: JSONAble? readConnection.readWithBlock { transaction in if transaction.hasObjectForKey(key, inCollection: collection) { object = transaction.objectForKey(key, inCollection: collection) as? JSONAble } } return object } } // MARK: Private private extension ElloLinkedStore { static func deleteNonSharedDB(overrideDefaults overrideDefaults: NSUserDefaults? = nil) { let defaults: NSUserDefaults if let overrideDefaults = overrideDefaults { defaults = overrideDefaults } else { defaults = GroupDefaults } let didDeleteNonSharedDB = defaults["DidDeleteNonSharedDB"].bool ?? false if !didDeleteNonSharedDB { defaults["DidDeleteNonSharedDB"] = true ElloLinkedStore.removeNonSharedDB() } } static func removeNonSharedDB() { let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) let baseDir: String if let firstPath = paths.first { baseDir = firstPath } else { baseDir = NSTemporaryDirectory() } let path: String if let baseURL = NSURL(string: baseDir) { path = baseURL.URLByAppendingPathComponent(ElloLinkedStore.databaseName).path ?? "" } else { path = "" } if NSFileManager.defaultManager().fileExistsAtPath(path) { do { try NSFileManager.defaultManager().removeItemAtPath(path) } catch _ {} } } static func databasePath() -> String { var path = "" if let baseURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(ElloGroupName) { path = baseURL.URLByAppendingPathComponent(ElloLinkedStore.databaseName).path ?? "" } return path } func parseLinkedSync(linked: [String: [[String: AnyObject]]]) { for (type, typeObjects): (String, [[String: AnyObject]]) in linked { if let mappingType = MappingType(rawValue: type) { for object: [String: AnyObject] in typeObjects { if let id = object["id"] as? String { let jsonable = mappingType.fromJSON(data: object, fromLinked: true) self.writeConnection.readWriteWithBlock { transaction in transaction.setObject(jsonable, forKey: id, inCollection: type) } } } } } } }
[ -1 ]
7afa2f3b55db4a275bb583f31cd8044a2f1bcc12
a7d823b3c9b432d692d24f16f6546f1b1c1050df
/WeatherApp/AppDelegate.swift
e55567da3823c54d3043b0fc0391eef40e106947
[]
no_license
SRkrupa/Weather
0539b83d63223dc690ab2ea14d31b56f9e431dc3
10d397178700c7b3d8d0c99b101b3f42bbd1510f
refs/heads/master
2020-12-30T23:50:08.956403
2017-01-31T20:17:08
2017-01-31T20:17:08
80,555,211
0
0
null
null
null
null
UTF-8
Swift
false
false
2,166
swift
// // AppDelegate.swift // WeatherApp // // Created by Roopika on 1/31/17. // Copyright © 2017 Roopika. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 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, 213902, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 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, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 288214, 280021, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 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, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 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, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 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, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 276052, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 176592, 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, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 226185, 234379, 324490, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 234648, 324757, 300189, 324766, 119967, 234653, 308379, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 324768, 275626, 234667, 177318, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 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, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 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, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 146765, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 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, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
f82c5f7b1f08cc722fc9a49dbd5a1a8507369d1d
e8d02e9292d233dddd757568f9441f34ad596a44
/PettyCash/Transaction.swift
f618cdb60bfe1e4715e2d7f1d50713d8a929c803
[]
no_license
im-jersh/PettyCash-iOS
18f90e99ae1ad312f28cf0cddb382d2894366ab9
5aa7f4ca300a0d8d7071893b8a7d6366b22c6e56
refs/heads/master
2022-07-11T15:26:31.569549
2017-01-06T21:53:41
2017-01-06T21:53:41
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,966
swift
// // Transaction.swift // PettyCash // // Created by Joshua O'Steen on 9/29/16. // Copyright © 2016 Joshua O'Steen. All rights reserved. // import Foundation import CloudKit import UIKit // Represents various CKRecord keys corresponding to this class's properties enum TransactionKey : String { case id = "id" case description = "description" case date = "date" case amount = "amount" case goal = "goal" } typealias Transactions = [Transaction] class Transaction : Transportable { // MARK: Properties private(set) var id : String // The unique id to the corresponding CKRecord let amount : Double // The amount of this transaction (negative represents a deduction) let description : String // A description of this transaction let date : Date // The date of this transaction var formattedAmount : String { let amount = self.amount as NSNumber let formatter = NumberFormatter() formatter.numberStyle = .currency formatter.locale = NSLocale.current return formatter.string(from: amount)! } weak var goal : Goal? // MARK: Initializers // Initialization from a CKRecord init(for amount: Double, withDescription description: String, andDate date: Date = Date()) { // TODO: Make strategy to create unique id's let idString = String(NSDate().hashValue) + "_" + UIDevice.current.name + "_" + "transaction" self.id = idString.toBase64() self.amount = amount self.description = description self.date = date } required init(fromRecord record: CKRecord) { self.id = record.recordID.recordName self.amount = record.object(forKey: "amount") as! Double self.description = record.object(forKey: "description") as! String self.date = record.object(forKey: "date") as! Date } }
[ -1 ]
13bc6123fc539ab224f6a2cf7cdefa9a1183a0c1
f083ae50504f9c3dccd017ac12ae7ffc3b9fc44d
/ai_benchmark/Controller/benchViewController.swift
9dc30680eae74cebd3aa0bf63319f17c5f39dd76
[]
no_license
gouthamvgk/AiBench_source
086565f12c7706da2ad2fcc03d6361ddc844999e
67dc5e2544235f03385da6807e029dd56822bcae
refs/heads/master
2023-08-28T14:25:23.410555
2021-10-10T14:42:35
2021-10-10T14:42:35
null
0
0
null
null
null
null
UTF-8
Swift
false
false
20,545
swift
// // benchViewController.swift // ai_benchmark // // Created by Goutham Kumar on 24/05/20. // Copyright © 2020 Goutham Kumar. All rights reserved. // import UIKit import AVFoundation import Vision class benchViewController: UIViewController { @IBOutlet weak var previewView: UIView! var rootLayer: CALayer! var overlay: CALayer! var segLayer: CALayer! var posLayer: PoseLayer! var poseConfig: PoseBuilderConfiguration! weak var subLayer: AVCaptureVideoPreviewLayer? private let videoCapture = VideoCapture() var model: VModel? var modelURL: URL! var modelDevice: String! var task: String! var textLayer: CATextLayer? var currentImage: CVImageBuffer? = nil var startTime: CFAbsoluteTime! let maxBoundingBoxViews = 10 var boundingBoxViews = [BoundingBoxView]() var colors: [String: UIColor] = [:] override func viewDidLoad() { super.viewDidLoad() self.model = VModel(path: self.modelURL, device: self.modelDevice, task: self.task) self.model?.delegate = self self.videoCapture.delegate = self if self.task == inferType.detection.rawValue { self.createBboxViews() self.setupDetColors() } else if self.task == inferType.segmentation.rawValue { self.createSegView() self.setupSegColors() } else if self.task == inferType.poseEstimation.rawValue { self.poseConfig = PoseBuilderConfiguration() self.createPoseView() } self.createTextView() } override func viewDidLayoutSubviews() { self.setupAndBeginCapturingVideoFrames() } override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { setupAndBeginCapturingVideoFrames() } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) self.destroyModel() } func createAlert(title: String, message: String) { let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil)) self.navigationController?.present(alert, animated: true, completion: nil) } @IBAction func cameraTapped(_ sender: UIButton) { self.videoCapture.flipCamera { error in if let error = error { DispatchQueue.main.async { self.createAlert(title: "Flipping failed!", message: "Camera flipping failed with error \(error). Restart App and try again. If problem persists contact developer.Make sure your camera supports hd1280x720 resolution. Switching to back camera!") } self.setupAndBeginCapturingVideoFrames() } } } func destroyModel() { if self.videoCapture.captureSession.isRunning { self.videoCapture.captureSession.stopRunning() } self.model?.model = nil self.model?.request = nil self.model = nil } } //MARK: SetupFunctions extension benchViewController { private func setupAndBeginCapturingVideoFrames() { self.rootLayer = self.previewView.layer self.videoCapture.setUpAVCapture { error in if let error = error { self.createAlert(title: "Camera initialisation failed!", message: "Camera cannot be started due to interal error \(error). Restart the App. If the problem persists contack developer.") return } self.rootLayer.sublayers = nil self.subLayer = self.videoCapture.previewLayer if let layer = self.subLayer { self.rootLayer.addSublayer(layer) } self.setupLayers() self.videoCapture.startCapturing() } } private func setupLayers() { self.overlay = CALayer() self.overlay.name = "overlay" self.overlay.frame = self.rootLayer.bounds self.overlay.position = CGPoint(x: self.rootLayer.bounds.midX, y: self.rootLayer.bounds.midY) self.rootLayer.addSublayer(self.overlay) if self.task == inferType.detection.rawValue { self.setupBboxLayer() } else if self.task == inferType.segmentation.rawValue { self.setupSegLayer() } else if self.task == inferType.poseEstimation.rawValue { setupPoseLayer() } if self.textLayer != nil { self.setupTextLayer() } } func setupBboxLayer() { for box in self.boundingBoxViews { box.addToLayer(self.overlay) } } func setupSegLayer() { self.segLayer.frame = self.overlay.bounds self.segLayer.position = CGPoint(x: self.overlay.bounds.midX, y: self.overlay.bounds.midY) self.segLayer.isOpaque = false self.segLayer.opacity = 0.5 self.segLayer.setNeedsDisplay() self.segLayer.contentsGravity = .resize self.overlay.addSublayer(segLayer) } func setupPoseLayer() { self.posLayer.frame = self.overlay.bounds self.posLayer.position = CGPoint(x: self.overlay.bounds.midX, y: self.overlay.bounds.midY) self.posLayer.setNeedsDisplay() self.posLayer.contentsGravity = .resize self.overlay.addSublayer(self.posLayer) } func setupTextLayer() { let b_h = self.overlay.bounds.height * 0.9 let b_w = self.overlay.bounds.width*0.9 self.textLayer?.bounds = CGRect(x: 0.0, y: 0.0, width: b_w, height: b_h) self.textLayer?.position = CGPoint(x: self.overlay.bounds.minX + b_w/2.0, y: self.overlay.bounds.minY + b_h/2.0) self.textLayer?.isWrapped = true self.overlay.addSublayer(self.textLayer!) } func setupSegColors(number: Int = 50) { for i in 0..<number { self.colors[String(i)] = UIColor(red: CGFloat.random(in: 0...1), green: CGFloat.random(in: 0...1), blue: CGFloat.random(in: 0...1), alpha: 1) } } func setupDetColors() { if let allLabels = self.model?.classNames { let labels = allLabels.components(separatedBy: ",") for label in labels { self.colors[label] = UIColor(red: CGFloat.random(in: 0...1), green: CGFloat.random(in: 0...1), blue: CGFloat.random(in: 0...1), alpha: 1) } self.colors["default"] = UIColor(red: CGFloat.random(in: 0...1), green: CGFloat.random(in: 0...1), blue: CGFloat.random(in: 0...1), alpha: 1) } } } //MARK: ViewCreateDeletefunctions extension benchViewController { func removeDetection() { for box in self.boundingBoxViews { box.hide() } } func createPoseView() { let poseView = PoseLayer() poseView.name = "poselayer" self.posLayer = poseView } func createTextView() { let textLayer = CATextLayer()// container layer that has all the renderings of the observations textLayer.name = "TextOverlay" textLayer.alignmentMode = .left self.textLayer = textLayer } func createBboxViews() { for _ in 0..<self.maxBoundingBoxViews { self.boundingBoxViews.append(BoundingBoxView()) } } func createSegView() { let segView = CALayer() segView.name = "SegmentationView" self.segLayer = segView } func createSegMap(netOut: MLMultiArray) -> UIImage? { let ptr = UnsafeMutablePointer<Int32> (OpaquePointer(netOut.dataPointer)) let height = netOut.shape[0].intValue let width = netOut.shape[1].intValue let ystride = netOut.strides[0].intValue let xstride = netOut.strides[1].intValue let channels = 4 var comp = UIColor.white.rgba var pixels = [UInt8](repeating: 255, count: width*height*channels) for x in 0..<width { for y in 0..<height { let value = ptr[y*ystride + x*xstride] let color = self.colors[String(value)] ?? UIColor.red comp = color.rgba for c in 0..<channels { pixels[(y*width + x)*channels + c] = UInt8(getValue(ind: c, tuple: comp) * 255.0) } } } return UIImage.fromByteArrayRGBA(pixels, width: width, height: height) } } //MARK: Predictionfunctions extension benchViewController: VideoCaptureDelegate { func videoCapture(_ videoCapture: VideoCapture, didCaptureFrame image: CMSampleBuffer) { if self.currentImage == nil, let buffer = CMSampleBufferGetImageBuffer(image) { self.startTime = CFAbsoluteTimeGetCurrent() self.currentImage = buffer self.model?.doPrediction(image: buffer) } } } //MARK:Drawing Functions extension benchViewController { func writeDetResults(_ results: [Any]) { CATransaction.begin() CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) self.removeDetection() for (i,result) in results.enumerated() { guard let prediction = result as? VNRecognizedObjectObservation else { continue } let topLabelObservation = prediction.labels[0] let scale = CGAffineTransform.identity.scaledBy(x: self.rootLayer.bounds.width, y: self.rootLayer.bounds.height) let transform = CGAffineTransform(scaleX: 1, y: -1).translatedBy(x: 0, y: -self.rootLayer.bounds.height) let objectBounds = prediction.boundingBox.applying(scale).applying(transform) // The labels array is a list of VNClassificationObservation objects, // with the highest scoring class first in the list. let label = String(format: "%@ %.1f", topLabelObservation.identifier, topLabelObservation.confidence * 100) let color = self.colors[topLabelObservation.identifier] ?? UIColor.cyan self.boundingBoxViews[i].show(frame: objectBounds, label: label, color: color) } CATransaction.commit() } func writeClassRegResults(priString: String, time: Double) { CATransaction.begin() CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) let fps = String(format: " FPS: %.2f", 1.0/time) let combinedString = "\(priString)\n \(fps)" let largeFont = UIFont(name: "Chalkboard SE", size: 20.0)! let formattedString = NSMutableAttributedString(string: combinedString) formattedString.addAttributes([NSAttributedString.Key.font: largeFont, NSMutableAttributedString.Key.foregroundColor: #colorLiteral(red: 0.2196078449, green: 0.007843137719, blue: 0.8549019694, alpha: 1), NSMutableAttributedString.Key.backgroundColor: #colorLiteral(red: 0.8032323776, green: 0.8549019694, blue: 0.7520004853, alpha: 1)], range: NSRange(location: 0, length: combinedString.count)) self.textLayer?.string = formattedString CATransaction.commit() } func writeError(priString: String) { CATransaction.begin() CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) let largeFont = UIFont(name: "Chalkboard SE", size: 20.0)! let formattedString = NSMutableAttributedString(string: priString) formattedString.addAttributes([NSAttributedString.Key.font: largeFont, NSMutableAttributedString.Key.foregroundColor: #colorLiteral(red: 0.2196078449, green: 0.007843137719, blue: 0.8549019694, alpha: 1), NSMutableAttributedString.Key.backgroundColor: #colorLiteral(red: 0.8032323776, green: 0.8549019694, blue: 0.7520004853, alpha: 1)], range: NSRange(location: 0, length: priString.count)) self.textLayer?.string = formattedString CATransaction.commit() } func writeFPS(time: Double){ CATransaction.begin() CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) let fps = String(format: " FPS: %.2f", 1.0/time) let largeFont = UIFont(name: "Chalkboard SE", size: 20.0)! let formattedString = NSMutableAttributedString(string: fps) formattedString.addAttributes([NSAttributedString.Key.font: largeFont, NSMutableAttributedString.Key.foregroundColor: #colorLiteral(red: 0.2196078449, green: 0.007843137719, blue: 0.8549019694, alpha: 1), NSMutableAttributedString.Key.backgroundColor: #colorLiteral(red: 0.8032323776, green: 0.8549019694, blue: 0.7520004853, alpha: 1)], range: NSRange(location: 0, length: fps.count)) self.textLayer?.string = formattedString CATransaction.commit() } func writeSegMap(image: UIImage?) { CATransaction.begin() CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) DispatchQueue.main.async { self.segLayer.contents = image?.cgImage } CATransaction.commit() } func writePosResults(results: [VNCoreMLFeatureValueObservation]) { CATransaction.begin() CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) let poseOutput = PoseNetOutput(results: results, modelInputSize: CGSize(width: C.posWidth, height: C.posHeight), modelOutputStride: C.posStride) let poseBuilder = PoseBuilder(output: poseOutput, configuration: self.poseConfig, imageWidth: self.overlay.bounds.width, imageHeight: self.overlay.bounds.height) let poses = [poseBuilder.pose] self.posLayer.show(poses: poses) CATransaction.commit() } func detectType(feature: MLFeatureValue) -> String { switch feature.type { case .multiArray: return "MultiArray Shape:\(feature.multiArrayValue?.shape ?? [NSNumber(booleanLiteral: false)])" case .dictionary: return "Dictionary Num_elements:\(feature.dictionaryValue.count)" case .image: return "ImageType CVPixelBuffer" case .sequence: return "MLSequence" case .string: return "String \(feature.stringValue)" case .double: return "Double \(feature.doubleValue)" case .int64: return "Int64 \(feature.int64Value)" case .invalid: return "Invalid type" default: return "Cannot identify type" } } } //MARK: VisionPostprocessingfunctions extension benchViewController: ModelProcessDelegate { func processError(errorString: String) { self.currentImage = nil let resultString = "Following error occured: \(errorString) Check the Doc for passing correct model" DispatchQueue.main.async { self.writeError(priString: resultString) } } func processClassifications(for request: VNRequest, error: Error?) { let elapsedTime = CFAbsoluteTimeGetCurrent() - self.startTime var resultString = "" guard let results = request.results else { resultString = "Error occured during inference decoding! If it's a custom model check the Doc for correct format. If not contact developer" DispatchQueue.main.async { self.writeError(priString: resultString) } self.currentImage = nil return } guard let classifications = results as? [VNClassificationObservation] else { self.currentImage = nil return } if classifications.isEmpty { resultString = "Nothing recognized" } else { let topClassifications = classifications.prefix(2) let descriptions = topClassifications.map { classification in return String(format: " (%.2f) %@", classification.confidence, classification.identifier) } resultString = "Classification:\n" + descriptions.joined(separator: "\n") } self.currentImage = nil DispatchQueue.main.async { self.writeClassRegResults(priString: resultString, time: elapsedTime) } } func processRegression(for request: VNRequest, error: Error?) { let elapsedTime = CFAbsoluteTimeGetCurrent() - self.startTime var resultString = "" guard let results = request.results else { resultString = "Error occured during inference decoding! If it's a custom model check the Doc for correct format. If not contact developer" DispatchQueue.main.async { self.writeError(priString: resultString) } self.currentImage = nil return } guard let regression = results as? [VNCoreMLFeatureValueObservation] else { self.currentImage = nil return } for (i, res) in regression.enumerated() { if i == 0 { resultString += "Regression:" } resultString += "\n" resultString += " Output:\(i+1) Name: \(res.featureName) \(detectType(feature: res.featureValue))" } self.currentImage = nil DispatchQueue.main.async { self.writeClassRegResults(priString: resultString, time: elapsedTime) } } func processPoseEstimation(for request: VNRequest, error: Error?) { let elapsedTime = CFAbsoluteTimeGetCurrent() - self.startTime DispatchQueue.main.async { self.writeFPS(time: elapsedTime) } guard let results = request.results else { let resultString = "Error occured during inference decoding! If it's a custom model check the Doc for correct format. If not contact developer" DispatchQueue.main.async { self.writeError(priString: resultString) } self.currentImage = nil return } guard let posResults = results as? [VNCoreMLFeatureValueObservation] else { self.currentImage = nil return } self.currentImage = nil DispatchQueue.main.async { self.writePosResults(results: posResults) } } func processSegmentation(for request: VNRequest, error: Error?) { let elapsedTime = CFAbsoluteTimeGetCurrent() - self.startTime DispatchQueue.main.async { self.writeFPS(time: elapsedTime) } guard let results = request.results else { let resultString = "Error occured during inference decoding! If it's a custom model check the Doc for correct format. If not contact developer" DispatchQueue.main.async { self.writeError(priString: resultString) } self.currentImage = nil return } guard let segmentations = results as? [VNCoreMLFeatureValueObservation] else { self.currentImage = nil return } guard let segMap = segmentations[0].featureValue.multiArrayValue else { self.currentImage = nil return } let image = createSegMap(netOut: segMap) self.currentImage = nil self.writeSegMap(image: image) } func processDetections(for request: VNRequest, error: Error?) { let elapsedTime = CFAbsoluteTimeGetCurrent() - self.startTime DispatchQueue.main.async { self.writeFPS(time: elapsedTime) } guard let results = request.results else { let resultString = "Error occured during inference decoding! If it's a custom model check the Doc for correct format. If not contact developer" DispatchQueue.main.async { self.writeError(priString: resultString) } self.currentImage = nil return } self.currentImage = nil DispatchQueue.main.async { self.writeDetResults(results) } } }
[ -1 ]
86542286b704f66a7125728da1b812153d5a2ea5
ad1a9de17d0037d13ec0654276306fcfd4b207cc
/TosChat/Singletons/AppDelegate.swift
62c67a8a2081473578c8784b293e0160b8ffbe17
[]
no_license
iengphogit/TosChat
cb1ed12e6a5d2f9ab4555872ed41ec62126759f0
35a9ee1509a8b00ac9218d3191a21a8305862abc
refs/heads/master
2020-04-05T02:28:01.382812
2018-11-08T07:09:30
2018-11-08T07:09:30
156,477,794
0
0
null
null
null
null
UTF-8
Swift
false
false
2,212
swift
// // AppDelegate.swift // TosChat // // Created by Iengpho on 11/2/18. // Copyright © 2018 Iengpho. All rights reserved. // import UIKit import Firebase @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. FirebaseApp.configure() return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 294924, 229388, 327695, 229391, 229394, 229397, 229399, 229402, 278556, 229405, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 131278, 286928, 131281, 319694, 278747, 295133, 155872, 131299, 319716, 237807, 303345, 286962, 303347, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 319903, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 278983, 319945, 278986, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 279084, 172591, 172598, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 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, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 303976, 336744, 303981, 303985, 303987, 328563, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 304009, 213895, 304011, 304013, 295822, 189325, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 197580, 312272, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 230413, 197645, 320528, 140312, 295961, 238620, 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, 312432, 337018, 189562, 115836, 279679, 66690, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 304348, 304354, 296163, 320740, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 230679, 320792, 230681, 214294, 296215, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 173472, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 280021, 288212, 288214, 239064, 329177, 288217, 288218, 280027, 288220, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 239202, 370279, 312938, 280183, 116354, 288408, 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, 313073, 321266, 419570, 288499, 288502, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 280375, 321336, 296767, 288576, 345921, 337732, 280388, 304968, 280402, 173907, 313171, 313176, 321381, 296812, 313201, 1920, 255873, 305028, 247688, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 280681, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 288909, 141455, 280725, 313498, 275608, 100520, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 280811, 280817, 125171, 157940, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 280919, 248153, 215387, 354653, 313700, 313705, 280937, 190832, 280946, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289227, 436684, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 240132, 223752, 150025, 338440, 281095, 223757, 281102, 223763, 223765, 322074, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 338528, 338532, 199273, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 240275, 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, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 183184, 289687, 240535, 224151, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 183260, 420829, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281711, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 216376, 380226, 298306, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 298365, 290174, 224641, 281987, 298372, 314756, 281990, 224647, 298377, 314763, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 306694, 192008, 323084, 257550, 290321, 290325, 282133, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 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, 323260, 282300, 323266, 282310, 282319, 306897, 241362, 306904, 298714, 52959, 282337, 241380, 216806, 323304, 282345, 12011, 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, 148946, 315211, 307027, 315221, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 315253, 315255, 339838, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 241574, 298922, 241581, 241583, 323504, 241586, 282547, 241588, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 307374, 307376, 299185, 323763, 184503, 299191, 307385, 307386, 258235, 307388, 176311, 307390, 176316, 299200, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 299225, 233701, 307432, 282881, 282893, 323854, 291089, 282906, 291104, 233766, 295583, 307508, 315701, 332086, 307510, 307512, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127431, 127434, 315856, 176592, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127494, 283142, 127497, 233994, 135689, 127500, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 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, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 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, 226182, 234375, 308105, 226185, 234379, 234384, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 324522, 234410, 291756, 291754, 226220, 324527, 291760, 234417, 201650, 324531, 299952, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 234437, 226245, 234443, 291788, 234446, 193486, 193488, 234449, 316370, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 234647, 226453, 275606, 234650, 308379, 234648, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 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, 243003, 283963, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 218473, 136562, 324978, 333178, 275834, 275836, 275840, 316803, 316806, 316811, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 284076, 144814, 227426, 144820, 374196, 292279, 284087, 144826, 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, 300543, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 284223, 284226, 284228, 243268, 292421, 284231, 226886, 128584, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 284249, 284251, 284253, 300638, 284255, 284258, 292452, 292454, 284263, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 284286, 276095, 284288, 292479, 284290, 325250, 284292, 292485, 276098, 292481, 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, 284365, 284368, 284370, 358098, 284372, 317138, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 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, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 366406, 276295, 300872, 292681, 153417, 358224, 276308, 178006, 317271, 284502, 276315, 292700, 317279, 292715, 300912, 292721, 284529, 300915, 292729, 317306, 284540, 292734, 325512, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292784, 358326, 161718, 358330, 276411, 276418, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 292839, 276455, 350186, 292843, 276460, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 350210, 276482, 178181, 317446, 276485, 350218, 276490, 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, 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, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 194780, 309468, 309471, 317672, 317674, 325867, 243948, 309491, 227571, 309494, 243960, 227583, 276735, 276739, 227596, 325910, 309530, 342298, 211232, 317729, 211241, 325937, 325943, 211260, 276809, 285002, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 293227, 293232, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 227738, 317853, 276896, 317858, 342434, 317864, 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, 113167, 309779, 317971, 309781, 277011, 227877, 227879, 293417, 227882, 309804, 293421, 236082, 23094, 277054, 219714, 129603, 301636, 318020, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 326244, 318055, 277100, 309871, 121458, 170619, 309885, 309888, 277122, 277128, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 318110, 227998, 137889, 383658, 318128, 277170, 293555, 318132, 154292, 277173, 342707, 277177, 277181, 318144, 277187, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 277223, 342760, 285417, 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, 301884, 293696, 310080, 293706, 277322, 310100, 301911, 277337, 301913, 301921, 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, 318442, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277507, 277511, 293899, 293908, 293917, 293939, 318516, 310336, 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, 294132, 138485, 228601, 204026, 228606, 64768, 310531, 138505, 228617, 318742, 277798, 130345, 113964, 285997, 384302, 285999, 113969, 318773, 318776, 286010, 417086, 302403, 294211, 384328, 294221, 146765, 294223, 326991, 179547, 146784, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 351619, 294276, 310659, 327046, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 228776, 277932, 310703, 310710, 130486, 310712, 310715, 302526, 228799, 302534, 310727, 245191, 64966, 302541, 302543, 310737, 228825, 163290, 286169, 310749, 310755, 187880, 310764, 286188, 310772, 40440, 212472, 40443, 286203, 310780, 40448, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 245288, 310831, 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, 310892, 40557, 40560, 294521, 343679, 294537, 310925, 286354, 302740, 122517, 278168, 179870, 327333, 229030, 302764, 278188, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 229086, 278238, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 294776, 360317, 294785, 327554, 360322, 40851, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 294844, 294847, 237508, 393177, 294876, 294879, 393190, 294890, 311279, 278513, 237555, 311283, 237562 ]
4fe8f7ba4cbb64d10a540f29c0a33798994d7217
de94b9041de30208659c1fa10291aa8dc235affd
/savethekittens/ViewController.swift
cad43825963e01723dfb73919b252229c0bcca5b
[]
no_license
palashjain95/savethekittens
805a97e7cbd403d6474efa0827a8eb826b6ddcf3
75025a5026b6b5053d9f7b3326032e9b2f9b9582
refs/heads/master
2021-01-11T10:06:52.131350
2017-01-11T05:59:40
2017-01-11T05:59:40
78,607,432
0
0
null
null
null
null
UTF-8
Swift
false
false
512
swift
// // ViewController.swift // savethekittens // // Created by Palash Jain on 11/01/17. // Copyright © 2017 Palash Jain. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ 307212, 278543, 309264, 317473, 292915, 286775, 237624, 290875, 288827, 286786, 284740, 159812, 243786, 278606, 237655, 307288, 200802, 309347, 309349, 309351, 309353, 356460, 307311, 292990, 278657, 303242, 311437, 278675, 307353, 299165, 278686, 278693, 100521, 307379, 280760, 184504, 280772, 280775, 313550, 229585, 307410, 280797, 278752, 301284, 280808, 286963, 280821, 286965, 280832, 276736, 309506, 278791, 287005, 287007, 282917, 282922, 282926, 176436, 307516, 311624, 287055, 233817, 289120, 289121, 227688, 299374, 199024, 280947, 313733, 227740, 285087, 289187, 305582, 285103, 293308, 278973, 289224, 287231, 279041, 279046, 281107, 279064, 236057, 281118, 295460, 289318, 293418, 277057, 129604, 158285, 311913, 281202, 287350, 281218, 281221, 227984, 303760, 295586, 287399, 277180, 299709, 285377, 285378, 199365, 287437, 299727, 226009, 277224, 199402, 234223, 312049, 289524, 226038, 234232, 230147, 299786, 295696, 295699, 281373, 295711, 228127, 281380, 152356, 234279, 283433, 289578, 312107, 293682, 285495, 289596, 283453, 289600, 279360, 293700, 283461, 279380, 295766, 279386, 308064, 293742, 162672, 207738, 291709, 183173, 324491, 304012, 234380, 304015, 275358, 277406, 289697, 234402, 291755, 277420, 277422, 297903, 324528, 230323, 277429, 277430, 234423, 277432, 277433, 277434, 230328, 281530, 291774, 295874, 299973, 168936, 183278, 277487, 293874, 293875, 293888, 277508, 234511, 197664, 197677, 304174, 234551, 300089, 238653, 300107, 300116, 164974, 312433, 189557, 300149, 285837, 234641, 226454, 226455, 226456, 226458, 302235, 285855, 234665, 283839, 228551, 230604, 298189, 302286, 230608, 290004, 290006, 189655, 302295, 298202, 298204, 298207, 290016, 363743, 298211, 290020, 228585, 304368, 333048, 292102, 177417, 312586, 296216, 130346, 113972, 300358, 238920, 234829, 230737, 230745, 306540, 300400, 216433, 290166, 333179, 290175, 224643, 298375, 300432, 310673, 304531, 304536, 304540, 288165, 304550, 304551, 144811, 279982, 286126, 277935, 292277, 144822, 130487, 292280, 296374, 306633, 288205, 310734, 280015, 286162, 280029, 286175, 280031, 286189, 282095, 308721, 302580, 292341, 310773, 296436, 288251, 290299, 286204, 290303, 296451, 294411, 290322, 290323, 286234, 284192, 294433, 282145, 284197, 296487, 286249, 226878, 288321, 226887, 284235, 288332, 284236, 288331, 284239, 284240, 212561, 284242, 292435, 226896, 300629, 276054, 228945, 212573, 284261, 306791, 286314, 284275, 284276, 284277, 294518, 314996, 284287, 284289, 284293, 284298, 282262, 280219, 284315, 284317, 284323, 282275, 284328, 198315, 313007, 284336, 302767, 286390, 276150, 282301, 294600, 284361, 239310, 282320, 239314, 284373, 282329, 282338, 284391, 358127, 288501, 282357, 358139, 286462, 282368, 358147, 282377, 300817, 282393, 278298, 329499, 282403, 304933, 315177, 282411, 159541, 282426, 288579, 298830, 307029, 298843, 241499, 188253, 200549, 296811, 315250, 284534, 292730, 294812, 284576, 284580, 284586, 276396, 282548, 296901, 298951, 165832, 301012, 292824, 301016, 294877, 298989, 227315, 237556 ]
b9e262ac76f44c148ba4b8ab590b9f70e66174f9
126fa4e4e1052d19248b9dabdf8a28abb53fb1bb
/Neuron/Services/Ethereum/EthereumTxSender.swift
e44812ffa2bb5e0b414770e04586c8bc272d8f89
[ "MIT" ]
permissive
Crypochen/neuron-ios
5c330b1e834d3d4d63c82314c0249961185da0f9
7c526ac953c3b3b6acb61b58aa5ad52fcb4ddee9
refs/heads/master
2020-04-10T16:13:10.968269
2018-12-04T02:21:29
2018-12-04T02:21:29
161,137,722
0
0
null
2018-12-10T07:52:57
2018-12-10T07:52:57
null
UTF-8
Swift
false
false
3,271
swift
// // EthereumTxSender.swift // Neuron // // Created by James Chen on 2018/11/06. // Copyright © 2018 Cryptape. All rights reserved. // import Foundation import BigInt import EthereumAddress import Web3swift class EthereumTxSender { private let web3: web3 private let from: EthereumAddress init(web3: web3, from: String) throws { self.web3 = web3 guard let fromAddress = EthereumAddress(from) else { throw SendTransactionError.invalidSourceAddress } self.from = fromAddress } /// All parameters should be final, e.g., value should be 10**18 for 1.0 Ether, gasPrice should be 10**9 for 1Gwei. func sendETH( to: String, value: BigUInt, gasLimit: UInt64 = GasCalculator.defaultGasLimit, gasPrice: BigUInt, data: Data, password: String ) throws -> TxHash { guard let toAddress = EthereumAddress(to.addHexPrefix()) else { throw SendTransactionError.invalidDestinationAddress } var options = TransactionOptions() options.gasLimit = .manual(BigUInt(gasLimit)) options.gasPrice = .manual(gasPrice) options.from = from guard let transaction = web3.eth.sendETH( to: toAddress, amount: value, extraData: data, transactionOptions: options ) else { throw SendTransactionError.createTransactionIssue } transaction.transaction.value = value // Web3swift seems to be having bug setting value let txHash = try transaction.sendPromise(password: password).wait().hash let sentTransaction = SentTransaction(tokenType: .ether, from: from.address, to: to, value: value, txFee: gasPrice * BigUInt(gasLimit), txHash: txHash) TransactionStatusManager.manager.insertTransaction(transaction: sentTransaction) return txHash } func sendToken( to: String, value: BigUInt, gasLimit: UInt64 = GasCalculator.defaultGasLimit, gasPrice: BigUInt, contractAddress: String, password: String ) throws -> TxHash { guard let destinationAddress = EthereumAddress(to) else { throw SendTransactionError.invalidDestinationAddress } guard let tokenAddress = EthereumAddress(contractAddress) else { throw SendTransactionError.invalidContractAddress } guard let transaction = web3.eth.sendERC20tokensWithKnownDecimals( tokenAddress: tokenAddress, from: from, to: destinationAddress, amount: value ) else { throw SendTransactionError.createTransactionIssue } transaction.transactionOptions.gasLimit = .manual(BigUInt(gasLimit)) transaction.transactionOptions.gasPrice = .manual(gasPrice) let txHash = try transaction.sendPromise(password: password).wait().hash let sentTransaction = SentTransaction(contractAddress: contractAddress, tokenType: .erc20, from: from.address, to: to, value: value, txFee: gasPrice * BigUInt(gasLimit), txHash: txHash) TransactionStatusManager.manager.insertTransaction(transaction: sentTransaction) return txHash } }
[ -1 ]
c1975b052a95e176e968c0c2963dc855d79e47aa
2ac03851bfcda5738d55eb8ed3dfa3938facc0d3
/Robobo/Emotions/IEmotionModule.swift
2a0f03b5ae8587902ba0811059c29e846be8decf
[]
no_license
mintforpeople/robobo-app-ios
726527f2deb1faf579720f83ebb4c88f3b6a3cfb
acb177f1df61cbbc77255580f36404b5c6685584
refs/heads/master
2020-05-26T01:11:59.770692
2019-10-16T11:02:50
2019-10-16T11:02:50
188,058,492
4
1
null
null
null
null
UTF-8
Swift
false
false
453
swift
// // IEmotionModule.swift // Robobo // // Created by Luis on 08/10/2019. // Copyright © 2019 MANUFACTURA DE INGENIOS TECNOLOGICOS SL. All rights reserved. // import robobo_framework_ios_pod public protocol IEmotionModule: IModule { var delegateManager: EmotionModuleDelegateManager! {get} func setCurrentEmotion(_ emotion:Emotion) func setTemporalEmotion(_ emotion:Emotion, _ duration:Int, _ nextEmotion: Emotion) }
[ -1 ]
126faab916771af841832ec4141a5c42145ba365
f94eadc1f94cffa830e7e27008bee6270a5ca490
/src_code/BoundlessBrilliance/View/PresentationDetailView.swift
d9bb8c4a7d360cf9dd9128ba20c3837ee3e38520
[]
no_license
wisolee/Boundless_Brilliance
5b7d97cd647a605d3c6ee0409dd665ecce60989b
3bb01f6f09bc4046925a5ba9370dc4c4261516c6
refs/heads/master
2021-10-11T05:53:19.212108
2019-01-23T00:45:12
2019-01-23T00:45:12
152,356,878
2
0
null
2018-12-03T06:03:25
2018-10-10T03:20:08
Swift
UTF-8
Swift
false
false
1,281
swift
// // CellDetailController.swift // BoundlessBrilliance // // Created by Adam on 11/12/18. // Copyright © 2018 BoundlessBrilliance. All rights reserved. // import Foundation import UIKit class PresentationDetailView: UIView { // Enables the scrolling on this page let scroll_container: UIScrollView = { let view = UIScrollView() view.backgroundColor = UIColor.white view.translatesAutoresizingMaskIntoConstraints = false view.layer.masksToBounds = true return view }() // Makes the inputsView let inputs_view: UIView = { let view = UIView() view.backgroundColor = UIColor.white view.translatesAutoresizingMaskIntoConstraints = false view.layer.masksToBounds = true return view }() } // Instantiates the separators let separator_line: UIView = { let view = UIView() view.backgroundColor = UIColor(r: 220, g: 220, b: 220) view.translatesAutoresizingMaskIntoConstraints = false return view }() // Instantiates for Sticker and Shirt options for the spinner extension UITextField { func loadStickerShirtOptions(spinnerOptions: [String]) { self.inputView = SpinnerView(spinnerOptions: spinnerOptions, spinnerTextField: self) } }
[ -1 ]
0cc30172ac1ea46a1070fef73d1ef8f394d106cb
6aaa7d1345a35936ae5273a194e8f3f74a4c764f
/Tests/DatePickerTests/DatePickerTests.swift
64e377c8af437d03d899abb2a6a1dd50263f0c45
[]
no_license
TurboJenz/DateP
eae126c8c13af0e690250a33f91b7312c6523cb2
de079787f664ebe0e01311a834e76c5de0db3508
refs/heads/main
2023-07-03T06:59:10.626576
2021-08-14T18:31:27
2021-08-14T18:31:27
null
0
0
null
null
null
null
UTF-8
Swift
false
false
385
swift
import XCTest @testable import DatePicker final class DatePickerTests: XCTestCase { func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct // results. // XCTAssertEqual(DatePicker().text, "Hello, World!") } }
[ 371972, 390021, 153350, 106890, 106892, 201362, 400020, 355223, 162969, 162461, 437663, 425887, 385311, 204580, 259369, 178090, 260267, 261420, 325935, 391473, 328502, 264886, 321592, 363322, 415805, 373950, 224193, 326594, 384705, 356801, 187591, 389706, 399435, 187598, 392271, 265425, 188370, 134483, 253650, 266457, 264922, 160865, 431974, 177386, 176748, 431732, 273526, 200184, 373115, 425725 ]
97aaac00fa4800de85213eda520818f9c2217ab8
7ec2c22c86c41bc62a96be6a2a0c6c04a2842394
/TrailerStreamUITests/TrailerStreamUITests.swift
83dd47c5307c1a8f28de7fa9fd5c0870b3d4b043
[]
no_license
aonawale/TrailerStream
db3f18ec84734d9bcc65fc8b22941525afdd213b
c8d259d0097a08a0d52c72b23d3603061322b702
refs/heads/master
2021-01-15T10:45:52.618751
2015-11-22T09:26:59
2015-11-22T09:26:59
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,267
swift
// // TrailerStreamUITests.swift // TrailerStreamUITests // // Created by Ahmed Onawale on 11/17/15. // Copyright © 2015 Ahmed Onawale. All rights reserved. // import XCTest class TrailerStreamUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. XCUIApplication().launch() // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 155665, 237599, 229414, 278571, 229425, 180279, 229431, 319543, 213051, 286787, 237638, 311373, 278607, 196687, 311377, 368732, 180317, 278637, 319599, 278642, 131190, 131199, 278676, 311447, 327834, 278684, 278690, 311459, 278698, 278703, 278707, 278713, 180409, 295099, 139459, 131270, 229591, 147679, 311520, 147680, 319719, 295147, 286957, 319764, 278805, 311582, 278817, 311596, 336177, 98611, 278843, 287040, 319812, 311622, 229716, 278895, 287089, 139641, 311679, 311692, 106893, 156069, 311723, 377265, 311739, 319931, 278974, 336319, 311744, 278979, 336323, 278988, 278992, 279000, 279009, 369121, 188899, 279014, 319976, 279017, 311787, 319986, 279030, 311800, 279033, 279042, 287237, 377352, 279053, 303634, 303635, 279060, 279061, 188954, 279066, 279092, 377419, 303693, 115287, 189016, 287319, 295518, 287327, 279143, 279150, 287345, 287348, 189054, 287359, 303743, 164487, 311944, 279176, 344714, 311948, 311950, 311953, 287379, 336531, 295575, 303772, 205469, 221853, 279207, 295591, 295598, 279215, 279218, 287412, 164532, 303802, 287418, 66243, 287434, 287438, 279249, 303826, 279253, 369365, 369366, 230105, 295653, 230120, 279278, 312046, 230133, 279293, 205566, 295688, 312076, 295698, 221980, 336678, 262952, 262953, 279337, 262957, 164655, 328495, 303921, 230198, 295745, 222017, 279379, 295769, 230238, 230239, 279393, 303973, 279398, 295797, 295799, 279418, 336765, 287623, 279434, 320394, 189349, 279465, 304050, 189373, 213956, 345030, 213961, 279499, 304086, 304104, 123880, 320492, 320495, 287730, 214009, 312313, 312317, 328701, 328705, 418819, 320520, 230411, 320526, 238611, 140311, 238617, 197658, 336930, 132140, 189487, 312372, 238646, 238650, 320571, 336962, 238663, 296023, 205911, 156763, 214116, 230500, 279659, 238706, 279666, 312435, 230514, 279686, 222344, 337037, 296091, 238764, 148674, 312519, 279752, 148687, 189651, 279766, 189656, 279775, 304352, 304353, 279780, 279789, 279803, 320769, 312588, 320795, 320802, 304422, 312628, 345398, 222523, 279872, 181568, 279874, 304457, 230730, 345418, 337228, 296269, 222542, 238928, 296274, 230757, 296304, 312688, 230772, 337280, 296328, 296330, 304523, 9618, 279955, 148899, 279979, 279980, 279988, 173492, 280003, 370122, 280011, 337359, 329168, 312785, 222674, 329170, 280020, 280025, 239069, 320997, 280042, 280043, 329198, 337391, 296434, 288248, 288252, 312830, 230922, 304655, 329231, 230933, 222754, 312879, 230960, 288305, 239159, 157246, 288319, 288322, 280131, 124486, 288328, 239192, 345697, 312937, 312941, 206447, 288377, 337533, 280193, 239238, 288391, 239251, 280217, 198304, 337590, 280252, 280253, 296636, 321217, 280259, 321220, 239305, 280266, 296649, 9935, 313042, 280279, 18139, 280285, 321250, 337638, 181992, 288492, 34547, 67316, 313082, 288508, 288515, 280326, 116491, 280333, 124691, 116502, 321308, 321309, 280367, 280373, 280377, 321338, 280381, 345918, 280386, 280391, 280396, 18263, 370526, 296807, 296815, 313200, 313204, 124795, 280451, 67464, 305032, 124816, 214936, 337816, 124826, 239515, 214943, 313257, 288698, 214978, 280517, 280518, 214983, 231382, 329696, 190437, 313322, 329707, 174058, 296942, 124912, 239610, 313338, 182277, 313356, 305173, 223269, 354342, 354346, 313388, 124974, 215095, 288829, 288835, 313415, 239689, 354386, 329812, 223317, 321632, 280676, 313446, 215144, 288878, 288890, 215165, 329884, 215204, 125108, 280761, 223418, 280767, 338118, 280779, 321744, 280792, 280803, 338151, 182503, 125166, 125170, 395511, 313595, 125180, 125184, 125192, 125197, 125200, 338196, 125204, 125215, 338217, 125225, 321839, 125236, 280903, 289109, 379224, 239973, 313703, 280938, 321901, 354671, 199030, 223611, 248188, 313726, 240003, 158087, 313736, 240020, 190870, 190872, 289185, 305572, 289195, 338359, 289229, 281038, 281039, 281071, 322057, 182802, 322077, 289328, 338491, 322119, 281165, 281170, 281200, 313970, 297600, 289435, 314020, 248494, 166581, 314043, 363212, 158424, 322269, 338658, 289511, 330473, 330476, 289517, 215790, 125683, 199415, 322302, 289534, 35584, 322312, 346889, 264971, 322320, 166677, 207639, 281378, 289580, 281407, 289599, 281426, 281434, 322396, 281444, 207735, 314240, 158594, 330627, 240517, 289691, 240543, 289699, 289704, 289720, 289723, 281541, 19398, 191445, 183254, 207839, 314343, 183276, 289773, 248815, 240631, 330759, 322571, 330766, 281647, 322609, 314437, 207954, 339031, 314458, 281698, 281699, 322664, 314493, 150656, 347286, 330912, 339106, 306339, 249003, 208044, 322733, 3243, 339131, 290001, 339167, 298209, 290030, 208123, 322826, 126229, 298290, 208179, 159033, 216387, 372039, 224591, 331091, 314708, 150868, 314711, 314721, 281958, 134504, 306541, 314740, 314742, 224637, 306558, 290176, 314752, 306561, 314759, 298378, 314771, 306580, 224662, 282008, 314776, 282013, 290206, 314788, 298406, 282023, 314790, 241067, 314797, 306630, 306634, 339403, 191980, 282097, 306678, 191991, 290304, 323083, 323088, 282132, 282135, 175640, 306730, 290359, 323132, 282182, 224848, 224852, 290391, 306777, 282214, 224874, 314997, 290425, 339579, 282244, 282248, 323208, 323226, 282272, 282279, 298664, 298666, 306875, 282302, 323262, 323265, 282309, 306891, 241360, 282321, 241366, 282330, 282336, 12009, 282347, 282349, 323315, 200444, 282366, 249606, 282375, 323335, 282379, 216844, 118549, 282390, 282399, 241440, 282401, 339746, 315172, 216868, 241447, 282418, 282424, 282428, 413500, 241471, 315209, 159563, 307024, 307030, 241494, 307038, 282471, 282476, 339840, 315265, 282503, 315272, 315275, 184207, 282517, 298912, 118693, 298921, 126896, 200628, 282572, 282573, 323554, 298987, 282634, 241695, 315433, 102441, 102446, 282671, 241717, 307269, 233548, 315468, 315477, 200795, 323678, 315488, 315489, 45154, 307306, 233578, 241809, 323730, 299166, 233635, 299176, 184489, 323761, 184498, 258233, 299197, 299202, 176325, 299208, 282832, 356575, 307431, 184574, 217352, 282908, 299294, 282912, 233761, 282920, 315698, 332084, 307514, 282938, 127292, 168251, 323914, 201037, 282959, 250196, 168280, 323934, 381286, 242027, 242028, 250227, 315768, 315769, 291194, 291193, 291200, 242059, 315798, 291225, 242079, 283039, 299449, 291266, 283088, 283089, 176602, 242138, 160224, 291297, 242150, 283138, 233987, 324098, 340489, 283154, 291359, 283185, 234037, 340539, 332379, 111197, 242274, 291455, 316044, 184974, 316048, 316050, 340645, 176810, 299698, 291529, 225996, 135888, 242385, 299737, 234216, 234233, 242428, 291584, 299777, 291591, 291605, 283418, 234276, 283431, 242481, 234290, 201534, 283466, 201562, 234330, 275294, 349025, 357219, 177002, 308075, 242540, 201590, 177018, 308093, 291713, 340865, 299912, 316299, 234382, 308111, 308113, 209820, 283551, 177074, 127945, 340960, 234469, 340967, 324587, 234476, 201721, 234499, 234513, 316441, 300087, 21567, 308288, 160834, 349254, 300109, 234578, 250965, 250982, 234606, 300145, 300147, 234626, 234635, 177297, 308375, 324761, 119965, 234655, 300192, 234662, 300200, 324790, 300215, 283841, 283846, 283849, 316628, 251124, 316661, 283894, 234741, 292092, 234756, 242955, 177420, 292145, 300342, 333114, 333115, 193858, 300355, 300354, 234830, 283990, 357720, 300378, 300379, 316764, 292194, 284015, 234864, 243073, 112019, 234902, 333224, 284086, 259513, 284090, 54719, 415170, 292291, 300488, 300490, 234957, 144862, 300526, 308722, 300539, 210429, 292359, 218632, 316951, 374297, 235069, 349764, 194118, 292424, 292426, 333389, 349780, 235096, 128600, 300643, 300645, 243306, 325246, 333438, 235136, 317102, 300725, 300729, 333508, 333522, 325345, 153318, 333543, 284410, 284425, 300810, 300812, 284430, 161553, 284436, 325403, 341791, 325411, 186148, 186149, 333609, 284460, 300849, 325444, 153416, 325449, 317268, 325460, 341846, 284508, 300893, 284515, 276326, 292713, 292719, 325491, 333687, 317305, 317308, 333700, 325508, 243590, 243592, 325514, 350091, 350092, 350102, 333727, 219046, 333734, 284584, 292783, 300983, 153553, 292835, 6116, 292838, 317416, 325620, 333827, 243720, 292901, 325675, 243763, 325695, 333902, 194667, 284789, 284790, 194692, 235661, 333968, 153752, 284827, 333990, 284840, 284843, 227517, 309443, 227525, 301255, 227536, 301270, 301271, 325857, 334049, 317676, 309504, 194832, 227601, 325904, 334104, 211239, 334121, 317738, 325930, 227655, 383309, 391521, 285031, 416103, 227702, 211327, 227721, 227730, 285074, 293275, 285083, 317851, 227743, 293281, 285089, 301482, 375211, 334259, 293309, 317889, 326083, 129484, 326093, 285152, 195044, 334315, 236020, 293368, 317949, 342537, 309770, 334345, 342560, 227881, 293420, 236080, 23093, 244279, 244280, 301635, 309831, 55880, 301647, 326229, 244311, 309847, 244326, 301688, 244345, 301702, 334473, 326288, 227991, 285348, 318127, 285360, 342705, 285362, 293552, 154295, 342757, 285419, 170735, 342775, 375552, 228099, 285443, 285450, 326413, 285457, 285467, 326428, 318247, 293673, 318251, 301872, 285493, 285496, 301883, 342846, 293702, 318279, 244569, 301919, 293729, 351078, 310132, 228214, 269179, 228232, 416649, 252812, 293780, 310166, 310177, 293801, 326571, 326580, 326586, 359365, 211913, 56270, 203758, 293894, 293911, 326684, 113710, 318515, 203829, 285795, 228457, 318571, 187508, 302202, 285819, 285823, 285833, 285834, 318602, 228492, 162962, 187539, 326803, 285850, 302239, 302251, 294069, 64699, 294075, 228541, 343230, 310496, 228587, 302319, 228608, 318732, 245018, 318746, 130342, 130344, 130347, 286012, 294210, 318804, 294236, 327023, 327030, 310650, 179586, 294278, 368012, 318860, 318876, 343457, 245160, 286128, 286133, 310714, 302523, 228796, 302530, 228804, 310725, 310731, 302539, 310735, 327122, 310747, 286176, 187877, 310758, 40439, 286201, 359931, 245249, 228868, 302602, 294413, 359949, 302613, 302620, 245291, 310853, 286281, 196184, 212574, 204386, 204394, 138862, 310896, 294517, 286344, 179853, 286351, 188049, 229011, 179868, 229021, 302751, 245413, 212649, 286387, 286392, 302778, 286400, 212684, 302798, 286419, 294621, 294629, 286457, 286463, 319232, 278292, 278294, 286507, 294699, 319289, 237397, 188250, 237411, 327556, 188293, 311183, 294806, 294808, 319393, 294820, 294824, 343993, 98240, 294849, 24531, 294887, 278507, 311277, 327666, 278515 ]
ba99559bdcc1974ebd935985b0e74ef5e221b579
758e2c5750428541cab0048af57e0d850df2c7a6
/autoLayoutPractice/autoLayoutPractice/AppDelegate.swift
393c59cf698cf3cf1b86da961f769ff462c517b9
[]
no_license
nipa04/App-work
fab017ef388821113602ea72676f537b8036adba
90ef9a9814cf5976d8495740ebb97318ea1e0ce1
refs/heads/master
2021-05-26T04:44:15.261801
2018-09-17T16:53:25
2018-09-17T16:53:25
127,442,098
0
0
null
null
null
null
UTF-8
Swift
false
false
2,186
swift
// // AppDelegate.swift // autoLayoutPractice // // Created by iOS developer on 5/31/18. // Copyright © 2018 iOS developer. 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, 229388, 294924, 229391, 327695, 229394, 229397, 229399, 229402, 229405, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 319544, 204856, 229432, 286776, 286778, 352318, 286791, 237640, 278605, 286797, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 131209, 303241, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 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, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 320007, 287238, 172552, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 189039, 295538, 172660, 189040, 189044, 287349, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 279178, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 287390, 303773, 164509, 172705, 287394, 172702, 303780, 172707, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 279231, 287427, 312005, 312006, 107212, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 279267, 312035, 295654, 279272, 312048, 230128, 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, 304005, 295813, 304007, 320391, 213895, 304009, 304011, 230284, 304013, 279438, 189325, 295822, 189329, 295825, 189331, 304019, 58262, 304023, 279452, 234648, 410526, 279461, 279462, 304042, 213931, 304055, 230327, 287675, 197564, 230334, 304063, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 295949, 230413, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 132165, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 205931, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 296264, 238919, 320840, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 148843, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 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, 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, 181854, 370272, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 280276, 313044, 321239, 280283, 18140, 313052, 288478, 313055, 419555, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 321266, 288502, 280314, 288510, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 313340, 239612, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 215154, 313458, 280691, 149618, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 321740, 313548, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 354656, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 240011, 199051, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 281095, 223752, 338440, 150025, 240132, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 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, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 142226, 240535, 289687, 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, 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, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 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, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 176311, 299191, 307385, 307386, 258235, 307388, 176316, 307390, 184503, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 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, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 315856, 176592, 127440, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 135672, 127480, 233979, 291323, 127485, 291330, 127490, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 135844, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 201557, 185173, 234329, 234333, 308063, 234336, 234338, 349027, 242530, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 234364, 291711, 234368, 234370, 201603, 291714, 234373, 316294, 226182, 234375, 308105, 291716, 324490, 226185, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 234410, 291754, 291756, 324522, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 324548, 234437, 226245, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 308226, 234501, 308231, 234504, 234507, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 308291, 316483, 234563, 160835, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 275579, 234620, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 324757, 234653, 300189, 119967, 324766, 324768, 283805, 234657, 242852, 234661, 283813, 300197, 234664, 177318, 275626, 234667, 316596, 308414, 300223, 234687, 300226, 308418, 283844, 300229, 308420, 308422, 226500, 234692, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 300289, 292097, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 283917, 300301, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 324978, 136562, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 226802, 292338, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 308790, 284215, 316983, 194103, 284218, 194101, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 292433, 284243, 300628, 284245, 194130, 284247, 317015, 235097, 243290, 276053, 284249, 284251, 300638, 284253, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276098, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 276166, 284358, 358089, 284362, 276170, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 358126, 276206, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 284511, 317279, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 358292, 284564, 317332, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 292776, 276395, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276452, 292839, 276455, 350186, 292843, 292845, 276464, 227314, 350200, 325624, 317435, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 292934, 243785, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 178273, 309346, 194657, 309348, 350308, 309350, 227426, 309352, 350313, 309354, 301163, 350316, 194660, 227430, 276583, 276590, 350321, 284786, 276595, 301167, 350325, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 309455, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 285061, 366983, 317833, 178572, 285070, 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, 236043, 317963, 342541, 55822, 113167, 309779, 317971, 309781, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 301639, 301643, 277071, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 342707, 318132, 154292, 293555, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 56041, 285417, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 293706, 277329, 162643, 310100, 301911, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 285690, 121850, 293882, 302075, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 310355, 293971, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 302205, 285821, 392326, 285831, 302218, 294026, 285835, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 130345, 277801, 113964, 277804, 384302, 285999, 285997, 277807, 113969, 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, 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, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 245191, 310727, 64966, 163272, 277959, 292968, 302541, 277963, 302543, 277966, 310737, 277971, 228825, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 302603, 65038, 302614, 302617, 286233, 302621, 187936, 146977, 286240, 187939, 40484, 294435, 40486, 286246, 40488, 278057, 245288, 40491, 294439, 294440, 294443, 310831, 294445, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 400976, 212560, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 302793, 294601, 343757, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 311048, 294664, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 319390, 237470, 40865, 319394, 294817, 294821, 311209, 180142, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 237562 ]
478caf7fa67a4392a0f0fd85dbaf7a239c77e72b
4198fcc9d7d47d3b7acf8395063339ab319a615d
/diancaila/Order.swift
b6e64d7e130c5f9d626afc2e9eea689027e4bd89
[]
no_license
cnluocj/diancaila
7f62784772582ab151543eb75d3d7112692d0a4e
150e8de85380f90f61ed6defdb41b40d23c60aae
refs/heads/master
2021-05-29T20:19:56.663569
2015-01-05T09:10:05
2015-01-05T09:10:05
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,140
swift
// // Order.swift // diancailaUIdemo // // Created by 罗楚健 on 14/11/17. // Copyright (c) 2014年 diancaila. All rights reserved. // import Foundation // 单个菜品 class Order: NSObject { var indexPath: NSIndexPath! var menu: Menu = Menu() var count: Int = 0 var deskId: Int = 0 var state: Int = 0 var customerNum = 0 var id: String = "" // 唯一表示, 无意义 var isSelected = false // 是否在table中被选中了 init(indexPath: NSIndexPath, menu: Menu, count: Int) { self.indexPath = indexPath self.menu = menu self.count = count } convenience init(indexPath: NSIndexPath, menu: Menu, deskId: Int) { self.init(menu: menu, deskId: deskId) self.indexPath = indexPath } // 等待上的菜 init(id: String, deskId: Int, menu: Menu) { super.init() self.id = id self.deskId = deskId self.menu = menu } init(menu: Menu, deskId: Int) { self.menu = menu self.deskId = deskId } override init() { super.init() } }
[ -1 ]
b7ce576297c829164bf30ce651c8d5736979f79c
35be643529b22c894b51bbf94b9ad8c2063904c7
/Pods/ViewComposer/Source/Classes/Views/Makeable/UIButton+Makeable.swift
db8d04fc49c8ea4d0a4854668e0a2a5a99f1662f
[ "MIT" ]
permissive
Sajjon/CachingService
d9659f4583ff7abaf365f923b4e89844584e4d9a
0df83df0fc1bfd3692b06320e8d8958dac6b8a77
refs/heads/master
2018-12-05T18:04:40.556447
2018-10-24T11:52:26
2018-10-24T11:52:26
110,124,935
1
1
MIT
2018-09-10T09:48:36
2017-11-09T14:23:46
Swift
UTF-8
Swift
false
false
290
swift
// // UIButton+Makeable.swift // ViewComposer // // Created by Alexander Cyon on 2017-05-31. // // import Foundation extension UIButton: Makeable { public typealias Style = ViewStyle public static func createEmpty() -> UIButton { return UIButton(type: .custom) } }
[ -1 ]
176cd799cda3c75f7d59b4e5e1e7abdc011b6393
a487f15a181f870865f86b20f4f88c812f4cfd1a
/Sources/SassDSL/Components/Value.swift
bfdbb54a1533b3393174bb188d776a4efb4afb50
[]
no_license
kkla320/GlueCode
c42b11b4f69aa7ebcd38765e7ded9aa71c32c2ca
505cbc45860c91abe812257fe191ac1c0689fd2e
refs/heads/main
2023-06-10T08:08:16.565711
2021-06-28T13:43:44
2021-06-28T13:43:44
381,013,880
0
0
null
null
null
null
UTF-8
Swift
false
false
805
swift
public enum Value { case string(String) case bool(Bool) case null case number(Double, String?) case color(Color) case list([Value]) } extension Value: CustomStringConvertible { public var description: String { switch self { case .string(let string): return "\"\(string)\"" case .bool(let bool): return bool ? "true" : "false" case .null: return "null" case .number(let number, let unit): if let unit = unit { return "\(number)\(unit)" } return "\(number)" case .color(let color): return color.description case .list(let values): return values.map({ $0.description }).joined(separator: " ") } } }
[ -1 ]
16f2783e3ccfe5913d2b435f46e98f31cec2e7a5
e709ab72b4f2d91c519f5814588687cf3320f244
/AWSLogsWrapper/Classes/LoggerReachability.swift
9b580762bb3a866d177a4db9a10489046c77e2e0
[ "Apache-2.0" ]
permissive
dvasileuski/sportsme-awslogging-ios
76643eea2f2deb0ff72ba0497549bf7ed3f5ea92
096baddc99e843948537a6cb4a51f819afd3d759
refs/heads/main
2023-07-29T04:52:14.181156
2021-09-13T13:38:24
2021-09-13T13:38:24
405,987,047
0
0
Apache-2.0
2021-09-13T13:34:37
2021-09-13T13:34:36
null
UTF-8
Swift
false
false
15,676
swift
/* Copyright (c) 2014, Ashley Mills All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import SystemConfiguration import Foundation public enum ReachabilityError: Error { case failedToCreateWithAddress(sockaddr, Int32) case failedToCreateWithHostname(String, Int32) case unableToSetCallback(Int32) case unableToSetDispatchQueue(Int32) case unableToGetFlags(Int32) } @available(*, unavailable, renamed: "Notification.Name.reachabilityChanged") public let ReachabilityChangedNotification = NSNotification.Name("ReachabilityChangedNotification") public extension Notification.Name { static let reachabilityChanged = Notification.Name("reachabilityChanged") } public class LoggerReachability { public typealias NetworkReachable = (LoggerReachability) -> () public typealias NetworkUnreachable = (LoggerReachability) -> () @available(*, unavailable, renamed: "Connection") public enum NetworkStatus: CustomStringConvertible { case notReachable, reachableViaWiFi, reachableViaWWAN public var description: String { switch self { case .reachableViaWWAN: return "Cellular" case .reachableViaWiFi: return "WiFi" case .notReachable: return "No Connection" } } } public enum Connection: CustomStringConvertible { @available(*, deprecated, renamed: "unavailable") case none case unavailable, wifi, cellular public var description: String { switch self { case .cellular: return "Cellular" case .wifi: return "WiFi" case .unavailable: return "No Connection" case .none: return "unavailable" } } } public var whenReachable: NetworkReachable? public var whenUnreachable: NetworkUnreachable? @available(*, deprecated, renamed: "allowsCellularConnection") public let reachableOnWWAN: Bool = true /// Set to `false` to force Reachability.connection to .none when on cellular connection (default value `true`) public var allowsCellularConnection: Bool // The notification center on which "reachability changed" events are being posted public var notificationCenter: NotificationCenter = NotificationCenter.default @available(*, deprecated, renamed: "connection.description") public var currentReachabilityString: String { return "\(connection)" } @available(*, unavailable, renamed: "connection") public var currentReachabilityStatus: Connection { return connection } public var connection: Connection { if flags == nil { try? setReachabilityFlags() } switch flags?.connection { case .unavailable?, nil: return .unavailable case .none?: return .unavailable case .cellular?: return allowsCellularConnection ? .cellular : .unavailable case .wifi?: return .wifi } } fileprivate var isRunningOnDevice: Bool = { #if targetEnvironment(simulator) return false #else return true #endif }() fileprivate(set) var notifierRunning = false fileprivate let reachabilityRef: SCNetworkReachability fileprivate let reachabilitySerialQueue: DispatchQueue fileprivate let notificationQueue: DispatchQueue? fileprivate(set) var flags: SCNetworkReachabilityFlags? { didSet { guard flags != oldValue else { return } notifyReachabilityChanged() } } required public init(reachabilityRef: SCNetworkReachability, queueQoS: DispatchQoS = .default, targetQueue: DispatchQueue? = nil, notificationQueue: DispatchQueue? = .main) { self.allowsCellularConnection = true self.reachabilityRef = reachabilityRef self.reachabilitySerialQueue = DispatchQueue(label: "uk.co.ashleymills.reachability", qos: queueQoS, target: targetQueue) self.notificationQueue = notificationQueue } public convenience init(hostname: String, queueQoS: DispatchQoS = .default, targetQueue: DispatchQueue? = nil, notificationQueue: DispatchQueue? = .main) throws { guard let ref = SCNetworkReachabilityCreateWithName(nil, hostname) else { throw ReachabilityError.failedToCreateWithHostname(hostname, SCError()) } self.init(reachabilityRef: ref, queueQoS: queueQoS, targetQueue: targetQueue, notificationQueue: notificationQueue) } public convenience init(queueQoS: DispatchQoS = .default, targetQueue: DispatchQueue? = nil, notificationQueue: DispatchQueue? = .main) throws { var zeroAddress = sockaddr() zeroAddress.sa_len = UInt8(MemoryLayout<sockaddr>.size) zeroAddress.sa_family = sa_family_t(AF_INET) guard let ref = SCNetworkReachabilityCreateWithAddress(nil, &zeroAddress) else { throw ReachabilityError.failedToCreateWithAddress(zeroAddress, SCError()) } self.init(reachabilityRef: ref, queueQoS: queueQoS, targetQueue: targetQueue, notificationQueue: notificationQueue) } deinit { stopNotifier() } } public extension LoggerReachability { // MARK: - *** Notifier methods *** func startNotifier() throws { guard !notifierRunning else { return } let callback: SCNetworkReachabilityCallBack = { (reachability, flags, info) in guard let info = info else { return } // `weakifiedReachability` is guaranteed to exist by virtue of our // retain/release callbacks which we provided to the `SCNetworkReachabilityContext`. let weakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info).takeUnretainedValue() // The weak `reachability` _may_ no longer exist if the `Reachability` // object has since been deallocated but a callback was already in flight. weakifiedReachability.reachability?.flags = flags } let weakifiedReachability = ReachabilityWeakifier(reachability: self) let opaqueWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.passUnretained(weakifiedReachability).toOpaque() var context = SCNetworkReachabilityContext( version: 0, info: UnsafeMutableRawPointer(opaqueWeakifiedReachability), retain: { (info: UnsafeRawPointer) -> UnsafeRawPointer in let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info) _ = unmanagedWeakifiedReachability.retain() return UnsafeRawPointer(unmanagedWeakifiedReachability.toOpaque()) }, release: { (info: UnsafeRawPointer) -> Void in let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info) unmanagedWeakifiedReachability.release() }, copyDescription: { (info: UnsafeRawPointer) -> Unmanaged<CFString> in let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info) let weakifiedReachability = unmanagedWeakifiedReachability.takeUnretainedValue() let description = weakifiedReachability.reachability?.description ?? "nil" return Unmanaged.passRetained(description as CFString) } ) if !SCNetworkReachabilitySetCallback(reachabilityRef, callback, &context) { stopNotifier() throw ReachabilityError.unableToSetCallback(SCError()) } if !SCNetworkReachabilitySetDispatchQueue(reachabilityRef, reachabilitySerialQueue) { stopNotifier() throw ReachabilityError.unableToSetDispatchQueue(SCError()) } // Perform an initial check try setReachabilityFlags() notifierRunning = true } func stopNotifier() { defer { notifierRunning = false } SCNetworkReachabilitySetCallback(reachabilityRef, nil, nil) SCNetworkReachabilitySetDispatchQueue(reachabilityRef, nil) } // MARK: - *** Connection test methods *** @available(*, deprecated, message: "Please use `connection != .none`") var isReachable: Bool { return connection != .unavailable } @available(*, deprecated, message: "Please use `connection == .cellular`") var isReachableViaWWAN: Bool { // Check we're not on the simulator, we're REACHABLE and check we're on WWAN return connection == .cellular } @available(*, deprecated, message: "Please use `connection == .wifi`") var isReachableViaWiFi: Bool { return connection == .wifi } var description: String { return flags?.description ?? "unavailable flags" } } fileprivate extension LoggerReachability { func setReachabilityFlags() throws { try reachabilitySerialQueue.sync { [unowned self] in var flags = SCNetworkReachabilityFlags() if !SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags) { self.stopNotifier() throw ReachabilityError.unableToGetFlags(SCError()) } self.flags = flags } } func notifyReachabilityChanged() { let notify = { [weak self] in guard let self = self else { return } self.connection != .unavailable ? self.whenReachable?(self) : self.whenUnreachable?(self) self.notificationCenter.post(name: .reachabilityChanged, object: self) } // notify on the configured `notificationQueue`, or the caller's (i.e. `reachabilitySerialQueue`) notificationQueue?.async(execute: notify) ?? notify() } } extension SCNetworkReachabilityFlags { typealias Connection = LoggerReachability.Connection var connection: Connection { guard isReachableFlagSet else { return .unavailable } // If we're reachable, but not on an iOS device (i.e. simulator), we must be on WiFi #if targetEnvironment(simulator) return .wifi #else var connection = Connection.unavailable if !isConnectionRequiredFlagSet { connection = .wifi } if isConnectionOnTrafficOrDemandFlagSet { if !isInterventionRequiredFlagSet { connection = .wifi } } if isOnWWANFlagSet { connection = .cellular } return connection #endif } var isOnWWANFlagSet: Bool { #if os(iOS) return contains(.isWWAN) #else return false #endif } var isReachableFlagSet: Bool { return contains(.reachable) } var isConnectionRequiredFlagSet: Bool { return contains(.connectionRequired) } var isInterventionRequiredFlagSet: Bool { return contains(.interventionRequired) } var isConnectionOnTrafficFlagSet: Bool { return contains(.connectionOnTraffic) } var isConnectionOnDemandFlagSet: Bool { return contains(.connectionOnDemand) } var isConnectionOnTrafficOrDemandFlagSet: Bool { return !intersection([.connectionOnTraffic, .connectionOnDemand]).isEmpty } var isTransientConnectionFlagSet: Bool { return contains(.transientConnection) } var isLocalAddressFlagSet: Bool { return contains(.isLocalAddress) } var isDirectFlagSet: Bool { return contains(.isDirect) } var isConnectionRequiredAndTransientFlagSet: Bool { return intersection([.connectionRequired, .transientConnection]) == [.connectionRequired, .transientConnection] } var description: String { let W = isOnWWANFlagSet ? "W" : "-" let R = isReachableFlagSet ? "R" : "-" let c = isConnectionRequiredFlagSet ? "c" : "-" let t = isTransientConnectionFlagSet ? "t" : "-" let i = isInterventionRequiredFlagSet ? "i" : "-" let C = isConnectionOnTrafficFlagSet ? "C" : "-" let D = isConnectionOnDemandFlagSet ? "D" : "-" let l = isLocalAddressFlagSet ? "l" : "-" let d = isDirectFlagSet ? "d" : "-" return "\(W)\(R) \(c)\(t)\(i)\(C)\(D)\(l)\(d)" } } /** `ReachabilityWeakifier` weakly wraps the `Reachability` class in order to break retain cycles when interacting with CoreFoundation. CoreFoundation callbacks expect a pair of retain/release whenever an opaque `info` parameter is provided. These callbacks exist to guard against memory management race conditions when invoking the callbacks. #### Race Condition If we passed `SCNetworkReachabilitySetCallback` a direct reference to our `Reachability` class without also providing corresponding retain/release callbacks, then a race condition can lead to crashes when: - `Reachability` is deallocated on thread X - A `SCNetworkReachability` callback(s) is already in flight on thread Y #### Retain Cycle If we pass `Reachability` to CoreFoundtion while also providing retain/ release callbacks, we would create a retain cycle once CoreFoundation retains our `Reachability` class. This fixes the crashes and his how CoreFoundation expects the API to be used, but doesn't play nicely with Swift/ARC. This cycle would only be broken after manually calling `stopNotifier()` — `deinit` would never be called. #### ReachabilityWeakifier By providing both retain/release callbacks and wrapping `Reachability` in a weak wrapper, we: - interact correctly with CoreFoundation, thereby avoiding a crash. See "Memory Management Programming Guide for Core Foundation". - don't alter the public API of `Reachability.swift` in any way - still allow for automatic stopping of the notifier on `deinit`. */ private class ReachabilityWeakifier { weak var reachability: LoggerReachability? init(reachability: LoggerReachability) { self.reachability = reachability } }
[ 390530, 174854, 389459, 378355, 27926, 106040, 333914, 194013 ]
7ddb45d3a3e51f8c0fa4ca04a93e6592acad4518
fdae483a4b93f9da5cb54b46e91162c37a0e0270
/SideMenu/Controller/MenuController.swift
4c52a56f36bbcdd3052c850a085f9bf7dbc84eba
[]
no_license
Joule87/SideMenu
5c64598433736891fd4b8b7ab3f3489b21233111
b3309097fc774abc79e9f55b411a31a5f57644f4
refs/heads/master
2020-09-28T23:30:39.070733
2019-12-09T19:13:54
2019-12-09T19:13:54
226,891,993
0
0
null
null
null
null
UTF-8
Swift
false
false
2,220
swift
// // MenuController.swift // SideMenu // // Created by Julio Collado on 12/9/19. // Copyright © 2019 Julio Collado. All rights reserved. // import UIKit class MenuController: UIViewController { var tableView: UITableView! var delegate: MenuControllerDelegate? var isExpanded: Bool = false override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .black configureTableView() } func configureTableView() { tableView = UITableView() tableView.delegate = self tableView.dataSource = self tableView.register(MenuOptionTableViewCell.self, forCellReuseIdentifier: MenuOptionTableViewCell.identifier) tableView.backgroundColor = .darkGray tableView.separatorStyle = .none tableView.rowHeight = 80 view.addSubview(tableView) tableView.translatesAutoresizingMaskIntoConstraints = false [tableView.leftAnchor.constraint(equalTo: view.leftAnchor), tableView.rightAnchor.constraint(equalTo: view.rightAnchor), tableView.topAnchor.constraint(equalTo: view.topAnchor), tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor)].forEach{ $0.isActive = true} } } extension MenuController: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return MenuOption.allCases.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: MenuOptionTableViewCell.identifier) as! MenuOptionTableViewCell let menuOption = MenuOption(rawValue: indexPath.row) cell.iconImageView.image = menuOption?.image cell.descriptionLabel.text = menuOption?.description return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if let menuOption = MenuOption(rawValue: indexPath.row) { delegate?.handleMenuOption(option: menuOption) } tableView.deselectRow(at: indexPath, animated: true) } }
[ -1 ]
18a16a55bf6ad1430ce3314a8d3b636e07e98c9e
e27b58070180212836ec2fe4cb5a6f75384a189a
/Aqark/advertisement/view /extensionSegmentAndTxtPlaceholder.swift
8521cecfd1f9a1ca7030d815cc18a8da9d90daee
[]
no_license
mahmoudfouadbadwy/Aqark
ae8277ebf3957c103e69b1e28dfedceee3ec36ec
346c2a8bd638940e743f4fc889d6273faf42b048
refs/heads/master
2023-06-05T23:49:51.455390
2021-07-01T13:01:37
2021-07-01T13:01:37
262,683,232
1
3
null
null
null
null
UTF-8
Swift
false
false
2,130
swift
// // extensionSegment.swift // Aqark // // Created by AhmedSaeed on 5/27/20. // Copyright © 2020 ITI. All rights reserved. // import Foundation import UIKit extension AddAdvertisementViewController{ //MARK:- func to Config segment @IBAction func selectAdvertisementType(_ sender: UISegmentedControl) { switch sender.selectedSegmentIndex { case 0: advertisementType = "Rent".localize case 1: advertisementType = "Buy".localize default: print("error") } updatePlaceholderForPriceTextFeild() } func updatePlaceholderForPriceTextFeild(){ if advertisementType == "Rent".localize { switch propertyType { case "Apartment": priceTxtField.placeholder = "minimum price is".localize + Localization.convertNumbers(lang: "lang".localize, stringNumber: "500").1 + "EGP".localize case "Villa": priceTxtField.placeholder = "minimum price is".localize + Localization.convertNumbers(lang: "lang".localize, stringNumber: "5000").1 + "EGP".localize case "Room": priceTxtField.placeholder = "minimum price is".localize + Localization.convertNumbers(lang: "lang".localize, stringNumber: "200").1 + "EGP".localize default: print("noselection") } }else{ switch propertyType { case "Apartment": priceTxtField.placeholder = "minimum price is".localize + Localization.convertNumbers(lang: "lang".localize, stringNumber: "50000").1 + "EGP".localize case "Villa": priceTxtField.placeholder = "minimum price is".localize + Localization.convertNumbers(lang: "lang".localize, stringNumber: "500000").1 + "EGP".localize case "Room": priceTxtField.placeholder = "minimum price is".localize + Localization.convertNumbers(lang: "lang".localize, stringNumber: "10000").1 + "EGP".localize default: print("noselection") } } } }
[ -1 ]
124ca4564087184c2816a815eb41ac243ce7365a
a948b75bebf0bd89175fede02c57df88136de695
/TransitionUtil/UIStoryboard+MultiBoard.swift
af9072a2a54f42cfdfa4b54399ad393e41677972
[]
no_license
Yaruki00/TransitionUtil
827a3b299a23b60b4ac5148987e3dc5398caa8ed
824ba6645af08570cb86934656431efc0b955839
refs/heads/master
2021-01-11T19:09:02.326955
2017-07-27T03:17:48
2017-07-27T03:17:48
79,327,207
0
0
null
null
null
null
UTF-8
Swift
false
false
1,155
swift
// // UIStoryboard+MultiBoard.swift // TransitionUtil // // Created by Yuta Kawabe on 2017/01/18. // Copyright © 2017年 Yuta Kawabe. All rights reserved. // import Foundation import UIKit extension UIStoryboard { enum ViewController: String { case ViewController case Board1ViewController case Board2ViewController } static func instantiateInitialViewController() -> UIViewController? { return UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController() } static func instantiateViewController(target: ViewController) -> UIViewController { switch target { case .ViewController: return UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: target.rawValue) case .Board1ViewController: return UIStoryboard(name: "Board1", bundle: nil).instantiateViewController(withIdentifier: target.rawValue) case .Board2ViewController: return UIStoryboard(name: "Board2", bundle: nil).instantiateViewController(withIdentifier: target.rawValue) } } }
[ -1 ]
b8c70fd665242c961feb9dc9d4663a8a87f33d9b
fcb6b7f0de4ec11c6ae7cfdd93f0e46c87c71f48
/clubrecordarios/DetailCartagenaViewController.swift
f8c3106ec95cb2fa05e8b462971d20c2f4236512
[]
no_license
williamsnieves/clubrecordarios
edf21e4e59c309de9ebf9c4683386b1389a3d578
dde6b947a55e599bd65673fefb996c71904551cf
refs/heads/master
2020-06-19T10:21:25.186051
2017-06-25T15:04:06
2017-06-25T15:04:06
74,910,912
0
0
null
null
null
null
UTF-8
Swift
false
false
3,990
swift
// // DetailCartagenaViewController.swift // clubrecordarios // // Created by willians on 8/12/16. // Copyright © 2016 clubrecordar. All rights reserved. // import UIKit import MapKit class DetailCartagenaViewController: UIViewController { private var _cartagenaData : CartagenaModel! var cartagenaData:CartagenaModel{ get{ return _cartagenaData } set{ _cartagenaData = newValue } } @IBOutlet weak var imageDetalCartagena: UIImageView! @IBOutlet weak var descriptionDetailCartagena: UITextView! @IBOutlet weak var titleCartagenaMain: UILabel! @IBOutlet weak var locationBtn: UIImageView! @IBOutlet weak var mailBtn: UIImageView! @IBOutlet weak var phoneBtn: UIImageView! override func viewDidLoad() { super.viewDidLoad() initPhoneGesture() initMailGestures() initLocationGestures() titleCartagenaMain.text = cartagenaData.title descriptionDetailCartagena.text = cartagenaData.descriptionDetail imageDetalCartagena.image = cartagenaData.image } func initPhoneGesture(){ let singleTap = UITapGestureRecognizer(target: self, action: #selector(DetailCartagenaViewController.tapPhoneDetected)) singleTap.numberOfTapsRequired = 1 // you can change this value phoneBtn.isUserInteractionEnabled = true phoneBtn.addGestureRecognizer(singleTap) } func initMailGestures(){ let singleTap = UITapGestureRecognizer(target: self, action: #selector(DetailCartagenaViewController.tapMailDetected)) singleTap.numberOfTapsRequired = 1 // you can change this value mailBtn.isUserInteractionEnabled = true mailBtn.addGestureRecognizer(singleTap) } func initLocationGestures(){ let singleTap = UITapGestureRecognizer(target: self, action: #selector(DetailCartagenaViewController.tapLocationDetected)) singleTap.numberOfTapsRequired = 1 // you can change this value locationBtn.isUserInteractionEnabled = true locationBtn.addGestureRecognizer(singleTap) } //Action func tapPhoneDetected() { //print("PHONE CLICKED") /*if let url = URL(string: "tel://\(nationalData.phone)") { UIApplication.shared.open(url, options: [:], completionHandler: nil) }*/ guard let number = URL(string: "telprompt://" + cartagenaData.phone) else { return } if #available(iOS 10.0, *) { UIApplication.shared.open(number, options: [:], completionHandler: nil) } else { // Fallback on earlier versions } print(number) } func tapMailDetected() { /*guard let mail = URL(string: "mailto://" + nationalData.mail) else { return } UIApplication.shared.open(mail, options: [:], completionHandler: nil)*/ let url = NSURL(string: "mailto:\(cartagenaData.mail)") UIApplication.shared.openURL(url as! URL) print(url as! URL) } func tapLocationDetected() { print("Location CLICKED") let latitude:CLLocationDegrees = cartagenaData.latitude.doubleValue let longitude:CLLocationDegrees = cartagenaData.longitude.doubleValue let coordinate = CLLocationCoordinate2DMake(latitude, longitude) let region = MKCoordinateRegionMake(coordinate, MKCoordinateSpanMake(0.01, 0.02)) let placemark = MKPlacemark(coordinate: coordinate, addressDictionary: nil) let mapItem = MKMapItem(placemark: placemark) let options = [ MKLaunchOptionsMapCenterKey: NSValue(mkCoordinate: region.center), MKLaunchOptionsMapSpanKey: NSValue(mkCoordinateSpan: region.span)] mapItem.name = "target" mapItem.openInMaps(launchOptions: options) } }
[ -1 ]
9e607710b0642662c6dd8de24a29143bdc6343a8
dd324fd7f917872474bca4cc8b8880d32edb60cf
/Package.swift
45339e475cb2206d369aebb65d0f2c98df0335d0
[]
no_license
cs25-build-week-2/MUDCrawler
a1d7f02ccff3c4db364eb26feaf0d00fa5d1d27c
ce2dd1afb94a3463f8d516784c58c83f1d575099
refs/heads/master
2021-02-10T23:49:53.089810
2020-03-03T06:05:50
2020-03-03T06:05:50
244,430,372
0
0
null
2020-03-05T20:46:20
2020-03-02T17:19:12
Swift
UTF-8
Swift
false
false
1,225
swift
// swift-tools-version:5.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "MUDCrawler", platforms: [ .macOS(.v10_15), ], products: [ // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "MUDCrawlerCore", targets: ["MUDCrawlerCore"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), .package(url: "https://github.com/johnsundell/files.git", from: "4.0.0"), .package(url: "https://github.com/mredig/NetworkHandler.git", from: "0.9.7") ], 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 which this package depends on. .target(name: "MUDCrawlerCore", dependencies: [ "Files", "NetworkHandler" ]), .target( name: "MUDCrawler", dependencies: ["MUDCrawlerCore"]), .testTarget( name: "MUDCrawlerTests", dependencies: ["MUDCrawlerCore"]), ] )
[ 245376, 388865, 415748, 388870, 339081, 201865, 323211, 339084, 1929, 338192, 35346, 355222, 1945, 3099, 2203, 355228, 336670, 1952, 134433, 355233, 201764, 178087, 201767, 201769, 201771, 182320, 201777, 325304, 1976, 384704, 388929, 325451, 384848, 253649, 254035, 2006, 133337, 356442, 160864, 244580, 357222, 411879, 388861, 194154, 1907, 388858, 189309, 388863 ]
6e81d234ba72d524708af6ec141aa791c57d51c0
094eed614a3b079ddb018e81cb07a615cbbae336
/Tips/AppDelegate.swift
d6b10cc9e3366d9f0f50737fc3bf6309697601e1
[ "Apache-2.0" ]
permissive
BrandonArroyo/codepathprework
8ddaba50fe9b38e0c126800bb3d67edc1edc66af
60814d057365cae62f432a5348521628bd64c971
refs/heads/master
2021-01-13T00:59:52.939258
2016-01-01T03:02:36
2016-01-01T03:02:36
48,007,502
0
0
null
null
null
null
UTF-8
Swift
false
false
2,145
swift
// // AppDelegate.swift // Tips // // Created by Brandon Arroyo on 12/9/15. // Copyright © 2015 Brandon Arroyo. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 352284, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 286774, 229432, 286776, 286778, 319544, 204856, 286791, 237640, 278605, 286797, 311375, 237646, 163920, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 278648, 131192, 237693, 327814, 131209, 417930, 303241, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 172550, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 189039, 189040, 172655, 172656, 295538, 189044, 172660, 287349, 352880, 287355, 287360, 295553, 287365, 311942, 303751, 295557, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 164509, 287390, 295583, 303773, 172702, 287394, 230045, 303780, 172705, 287398, 172707, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 328384, 287427, 312006, 107208, 279241, 107212, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 279258, 303835, 213724, 189149, 303838, 287450, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 369433, 230169, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 279383, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 213902, 279438, 295822, 189329, 295825, 304019, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 304063, 238528, 304065, 189378, 213954, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 197645, 295949, 230413, 320528, 140312, 295961, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 350308, 230592, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 279788, 320748, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 312639, 296255, 230718, 296259, 378181, 230727, 238919, 320840, 296264, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 279929, 181626, 304506, 304505, 181631, 312711, 312712, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 279985, 173488, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 280014, 312783, 288208, 230865, 288210, 370130, 288212, 280021, 288214, 222676, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 291754, 288242, 296435, 288244, 288250, 402942, 148990, 296446, 206336, 296450, 321022, 230916, 230919, 214535, 370187, 304651, 304653, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 313027, 280260, 280264, 206536, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 321266, 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, 304968, 280393, 280402, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 321560, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 223327, 149599, 321634, 149601, 149603, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 215154, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 125171, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 313705, 280940, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 305668, 240132, 223749, 281095, 338440, 150025, 223752, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 281210, 297594, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 199367, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 240519, 322440, 338823, 314249, 183184, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 380226, 281923, 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, 224657, 306581, 314779, 314785, 282025, 314793, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 282261, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 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, 282410, 241450, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 159545, 298811, 307009, 413506, 241475, 307012, 148946, 315211, 282446, 307027, 315221, 282454, 315223, 241496, 323414, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 298860, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 44948, 298901, 241556, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 217179, 315483, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 299191, 307385, 307386, 258235, 176316, 307388, 307390, 184503, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 307510, 332086, 151864, 307512, 168245, 307515, 282942, 307518, 151874, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 315801, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299440, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 283080, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 127466, 176620, 127474, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 233994, 135689, 291341, 233998, 234003, 234006, 152087, 127511, 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, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 299726, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 283421, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 292433, 234313, 316233, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 234370, 201603, 291714, 234373, 226182, 234375, 291716, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 324504, 234393, 209818, 308123, 324508, 234398, 234396, 291742, 234401, 291747, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 324522, 226220, 291756, 234414, 324527, 291760, 234417, 201650, 324531, 226230, 234422, 275384, 324536, 234428, 291773, 234431, 242623, 324544, 324546, 226239, 324548, 226245, 234437, 234439, 234434, 234443, 291788, 193486, 275406, 193488, 234446, 234449, 316370, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 234563, 308291, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 275545, 242777, 234585, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 300148, 234614, 398455, 144506, 275579, 234618, 234620, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 275594, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 234647, 275608, 308373, 234650, 234648, 308379, 283805, 234653, 324766, 119967, 234657, 300189, 324768, 242852, 283813, 234661, 300197, 234664, 275626, 234667, 316596, 308414, 234687, 316610, 300226, 226500, 234692, 300229, 308420, 283844, 308418, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 283904, 300289, 292097, 300292, 300294, 275719, 300299, 177419, 283917, 300301, 242957, 177424, 275725, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 284076, 144812, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 259567, 300527, 308720, 226802, 316917, 308727, 292343, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 194103, 284218, 226877, 284223, 284226, 243268, 292421, 226886, 284231, 128584, 284228, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 284245, 284247, 317015, 284249, 243290, 284251, 300628, 284253, 235097, 284255, 300638, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 276098, 284290, 325250, 284292, 292479, 292485, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 276187, 284379, 284381, 284384, 284386, 358114, 358116, 276197, 317158, 358119, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 358146, 317187, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 325408, 284449, 300834, 300832, 227109, 317221, 358183, 186151, 276268, 300845, 194351, 243504, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 178161, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 235581, 325692, 178238, 276544, 284739, 292934, 276553, 243785, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 194657, 227426, 276579, 178273, 194660, 227430, 276583, 309346, 309348, 276586, 309350, 309352, 309354, 276590, 350313, 227440, 350316, 284786, 350321, 276595, 301167, 350325, 350328, 292985, 301178, 292989, 292993, 301185, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 276689, 227540, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 276713, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 317729, 276775, 211241, 325937, 276789, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 178575, 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, 236043, 317963, 342541, 55822, 113167, 277011, 317971, 309781, 309779, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 318020, 301636, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 137889, 383658, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 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, 285453, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277314, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 277368, 15224, 236408, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 244731, 121850, 302075, 293882, 293887, 277504, 277507, 277511, 277519, 293908, 277526, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 310355, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 277608, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 392326, 285831, 253064, 302218, 285835, 294026, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 285862, 277671, 302248, 64682, 277678, 228526, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 384328, 277832, 277836, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 245191, 163272, 302534, 310727, 277959, 292968, 302541, 277963, 302543, 277966, 310737, 277971, 286169, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 212472, 40440, 278009, 40443, 286203, 228864, 40448, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 294435, 40484, 286246, 294439, 286248, 278057, 294440, 294443, 40486, 294445, 40488, 310831, 40491, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 228944, 212560, 400976, 40533, 147032, 40537, 40539, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40554, 40552, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 278150, 310925, 286354, 278163, 302740, 122517, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 278227, 229076, 286420, 319187, 286425, 319194, 278235, 301163, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 237409, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 294817, 319394, 40865, 294821, 311209, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
b60b41c9e3cc3333ac1441aeb7ac46af6e1ab207
d06471118096b2ba29ce50105e69b622b16d237b
/UCBMUNXXTests/UCBMUNXXTests.swift
be60f9cfc90dee035f4c94deaabb5fb3a6a529c9
[]
no_license
schoyc/UCBMUN-XXI
b10ea0429c95760d0c678a66ea3e4b6ec06b6ceb
a32bb533fdf2529e8a87189e9c7200d5c135ce87
refs/heads/master
2021-05-02T14:04:43.504954
2018-02-08T05:01:34
2018-02-08T05:01:34
120,713,050
0
0
null
null
null
null
UTF-8
Swift
false
false
974
swift
// // UCBMUNXXTests.swift // UCBMUNXXTests // // Created by Steven Chen on 12/24/15. // Copyright © 2015 Steven Chen. All rights reserved. // import XCTest @testable import UCBMUNXX class UCBMUNXXTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 360462, 98333, 278558, 16419, 229413, 204840, 278570, 344107, 360491, 155694, 253999, 229424, 229430, 319542, 163896, 180280, 213052, 376894, 286788, 352326, 311372, 196691, 278615, 385116, 237663, 254048, 319591, 221290, 278634, 278638, 319598, 352368, 204916, 131189, 131191, 237689, 131198, 278655, 311435, 311438, 278677, 196760, 426138, 278685, 311458, 278691, 49316, 196773, 278699, 32941, 278704, 377009, 278708, 131256, 295098, 139479, 254170, 229597, 311519, 205035, 286958, 327929, 344313, 147717, 368905, 278797, 180493, 254226, 319763, 368916, 262421, 377114, 278810, 237856, 237857, 278816, 311597, 98610, 262450, 180535, 336183, 278842, 287041, 319813, 311621, 319821, 254286, 344401, 377169, 368981, 155990, 368984, 106847, 98657, 270701, 246127, 270706, 246136, 139640, 246137, 311681, 311685, 106888, 385417, 385422, 213403, 246178, 385454, 311727, 377264, 278961, 278965, 319930, 311738, 33211, 278970, 336317, 336320, 311745, 278978, 254406, 188871, 278989, 278993, 278999, 328152, 369116, 287198, 279008, 279013, 279018, 311786, 319981, 279022, 319987, 279029, 254456, 279032, 377338, 279039, 377343, 254465, 287241, 279050, 303631, 139792, 303636, 393751, 279065, 377376, 180771, 377386, 197167, 385588, 352829, 115270, 385615, 426576, 369235, 295519, 139872, 66150, 344680, 279146, 287346, 139892, 287352, 344696, 279164, 189057, 303746, 311941, 336518, 311945, 369289, 344715, 279177, 311949, 287374, 377489, 311954, 352917, 230040, 271000, 377497, 303771, 377500, 205471, 344738, 139939, 279206, 295590, 287404, 295599, 205487, 303793, 336564, 164533, 230072, 287417, 287422, 66242, 377539, 164560, 385747, 279252, 361176, 418520, 287452, 295652, 279269, 246503, 369385, 279280, 312052, 230134, 172792, 344827, 221948, 279294, 205568, 295682, 197386, 434957, 426774, 197399, 426775, 336671, 344865, 197411, 279336, 295724, 312108, 197422, 353070, 164656, 295729, 353069, 328499, 353078, 197431, 230199, 353079, 336702, 279362, 353094, 353095, 353109, 377686, 230234, 189275, 435039, 295776, 279392, 303972, 385893, 246641, 246643, 295798, 246648, 361337, 279417, 254850, 369538, 213894, 287622, 58253, 295824, 279456, 189348, 353195, 140204, 377772, 353197, 304051, 230332, 287677, 377790, 353215, 353216, 213957, 213960, 345033, 279498, 386006, 418776, 50143, 123881, 304110, 320494, 287731, 271350, 295927, 304122, 320507, 328700, 328706, 410627, 320516, 295942, 386056, 353290, 230410, 377869, 320527, 238610, 418837, 140310, 230423, 197657, 336929, 189474, 369701, 345132, 238639, 312373, 238651, 230463, 377926, 238664, 296019, 353367, 156764, 156765, 304222, 230499, 279660, 173166, 156785, 312434, 377972, 353397, 279672, 337017, 377983, 402565, 279685, 222343, 386189, 296086, 238743, 296092, 238765, 279728, 238769, 402613, 230588, 279747, 353479, 353481, 402634, 353482, 279760, 189652, 189653, 419029, 148696, 296153, 279774, 304351, 304356, 222440, 328940, 279792, 353523, 386294, 386301, 320770, 386306, 279814, 312587, 328971, 353551, 320796, 222494, 304421, 279854, 353584, 345396, 386359, 116026, 378172, 222524, 279875, 312648, 337225, 304456, 230729, 222541, 238927, 353616, 296273, 222559, 378209, 230756, 386412, 230765, 296303, 279920, 312689, 296307, 116084, 181625, 337281, 148867, 378244, 296329, 296335, 230799, 9619, 370071, 279974, 279984, 173491, 304564, 279989, 353719, 296375, 296387, 361927, 296392, 296391, 280010, 370123, 148940, 280013, 312782, 222675, 353750, 239068, 280032, 271843, 280041, 296425, 361963, 329197, 329200, 296433, 321009, 280055, 288249, 230921, 329225, 296461, 149007, 304656, 329232, 370197, 402985, 394794, 230959, 312880, 288309, 312889, 288318, 280130, 124485, 288326, 288327, 280147, 239198, 99938, 312940, 222832, 247416, 288378, 337534, 337535, 263809, 288392, 239250, 419478, 345752, 255649, 206504, 321199, 198324, 296628, 337591, 321207, 296632, 280251, 280257, 321219, 280267, 403148, 9936, 313041, 9937, 370388, 272085, 345814, 280278, 280280, 18138, 345821, 321247, 321249, 345833, 345834, 313065, 280300, 239341, 419569, 67315, 173814, 313081, 124669, 288512, 288516, 280327, 280329, 321302, 345879, 116505, 321310, 255776, 247590, 362283, 378668, 280366, 296755, 280372, 321337, 280380, 345919, 436031, 403267, 280390, 345929, 18262, 362327, 280410, 370522, 345951, 362337, 345955, 296806, 288619, 288620, 280430, 214895, 313199, 362352, 313203, 124798, 182144, 305026, 67463, 329622, 337815, 124824, 214937, 247712, 436131, 354212, 436137, 362417, 124852, 288697, 362431, 214977, 280514, 214984, 362443, 247757, 231375, 280541, 329695, 436191, 313319, 337895, 247785, 296941, 436205, 329712, 362480, 313339, 43014, 354316, 313357, 182296, 305179, 313375, 239650, 354343, 354345, 223274, 124975, 346162, 124984, 288828, 436285, 288833, 288834, 436292, 403525, 313416, 280649, 436301, 354385, 338001, 338003, 223316, 280661, 329814, 223318, 338007, 354393, 288857, 280675, 280677, 43110, 321637, 313447, 436329, 288879, 223350, 280694, 288889, 215164, 313469, 215166, 280712, 141450, 215178, 346271, 436383, 362659, 239793, 125109, 182456, 280762, 223419, 379071, 280768, 149703, 338119, 346314, 321745, 387296, 280802, 379106, 338150, 346346, 321772, 125169, 338164, 436470, 157944, 125183, 149760, 411906, 125188, 313608, 125193, 125198, 272658, 125203, 125208, 305440, 125217, 338218, 321840, 379186, 125235, 280887, 125240, 321860, 280902, 182598, 289110, 215385, 272729, 379225, 354655, 321894, 280939, 354676, 436608, 362881, 248194, 240002, 436611, 280961, 395659, 395661, 240016, 108944, 190871, 149916, 420253, 141728, 289189, 108972, 272813, 338356, 436661, 289232, 281040, 256477, 281072, 174593, 420369, 223767, 289304, 223769, 207393, 182817, 289332, 174648, 338489, 338490, 322120, 281166, 297560, 354911, 436832, 436834, 191082, 313966, 420463, 281199, 346737, 313971, 346740, 420471, 330379, 133774, 330387, 117396, 346772, 330388, 264856, 289434, 346779, 338613, 166582, 314040, 158394, 199366, 363211, 363230, 289502, 264928, 338662, 330474, 346858, 289518, 199414, 35583, 363263, 191235, 322313, 322316, 117517, 322319, 166676, 207640, 281377, 289576, 191283, 273207, 289598, 281408, 420677, 281427, 281433, 322395, 330609, 207732, 158593, 240518, 224145, 355217, 256922, 289690, 289698, 420773, 289703, 363438, 347055, 289727, 273344, 330689, 363458, 379844, 19399, 52172, 183248, 338899, 248796, 248797, 207838, 347103, 314342, 289774, 183279, 347123, 314355, 240630, 314362, 257024, 330754, 134150, 330763, 322582, 281625, 281626, 175132, 248872, 322612, 207938, 314448, 339030, 314467, 281700, 257125, 322663, 273515, 207979, 404593, 363641, 363644, 150657, 248961, 330888, 363669, 339100, 380061, 339102, 199839, 429214, 330913, 306338, 265379, 249002, 306346, 3246, 421048, 208058, 339130, 265412, 290000, 298208, 363744, 298212, 298213, 290022, 330984, 298221, 298228, 216315, 208124, 388349, 363771, 437505, 322824, 257305, 126237, 339234, 199971, 372009, 412971, 306494, 216386, 224586, 372043, 331090, 314709, 314710, 372054, 159066, 224606, 314720, 142689, 281957, 281962, 380271, 314739, 208244, 249204, 290173, 306559, 224640, 314751, 314758, 298374, 314760, 142729, 388487, 281992, 314766, 306579, 282007, 290207, 314783, 314789, 282022, 314791, 396711, 396712, 282024, 241066, 314798, 380337, 380338, 150965, 380357, 339398, 306639, 413137, 429542, 191981, 282096, 306673, 306677, 191990, 290301, 282114, 372227, 306693, 323080, 192010, 323087, 175639, 388632, 282136, 396827, 282141, 134686, 282146, 306723, 347694, 290358, 265798, 282183, 265804, 396882, 290390, 44635, 396895, 323172, 282213, 323178, 224883, 314998, 323196, 175741, 339584, 192131, 282245, 224901, 282246, 290443, 323217, 282259, 282271, 282273, 282276, 298661, 323236, 290471, 282280, 298667, 224946, 110268, 224958, 323263, 282303, 274115, 306890, 241361, 298712, 216795, 298720, 12010, 282348, 282358, 175873, 323331, 323332, 339715, 216839, 339720, 372496, 323346, 249626, 282400, 339745, 241441, 257830, 421672, 159533, 282417, 282427, 315202, 282434, 307011, 282438, 216918, 241495, 307031, 282474, 241528, 315264, 339841, 282504, 315273, 315274, 372626, 380821, 282518, 282519, 44952, 298909, 118685, 200627, 323507, 290745, 290746, 274371, 151497, 372701, 298980, 380908, 282612, 290811, 282633, 241692, 307231, 102437, 315432, 102445, 233517, 176175, 241716, 159807, 225351, 315465, 315476, 307289, 200794, 315487, 356447, 307299, 315497, 315498, 438377, 299121, 233589, 266357, 422019, 241808, 323729, 381073, 233636, 299174, 299187, 405687, 184505, 299198, 258239, 389313, 299203, 299209, 372941, 282831, 266449, 356576, 176362, 307435, 438511, 233715, 381172, 184570, 168188, 184575, 381208, 299293, 151839, 233762, 217380, 282919, 151847, 332083, 332085, 332089, 315706, 282939, 241986, 438596, 332101, 323913, 348492, 323916, 323920, 250192, 348500, 168281, 332123, 332127, 323935, 242023, 242029, 160110, 242033, 291192, 340357, 225670, 242058, 373134, 291224, 242078, 283038, 61857, 315810, 315811, 381347, 61859, 340398, 61873, 61880, 283064, 127427, 127428, 283075, 324039, 373197, 176601, 242139, 160225, 242148, 291311, 233978, 291333, 340490, 283153, 258581, 291358, 283182, 283184, 234036, 315960, 348732, 242237, 70209, 348742, 70215, 348749, 381517, 332378, 201308, 111208, 184940, 373358, 389745, 209530, 291454, 373375, 184962, 152195, 348806, 152203, 184973, 316049, 111253, 316053, 111258, 111259, 176808, 299699, 299700, 422596, 422599, 291530, 225995, 225997, 242386, 226004, 226007, 422617, 422626, 226019, 234217, 299759, 234234, 299776, 291585, 430849, 234241, 209670, 291592, 226058, 234250, 62220, 234253, 422673, 430865, 291604, 234263, 422680, 283419, 234268, 234277, 234283, 152365, 234286, 422703, 234289, 422709, 152374, 234294, 242485, 160571, 234301, 430910, 160575, 160580, 234311, 234312, 299849, 283467, 381773, 234317, 201551, 234323, 234326, 234331, 242529, 349026, 357218, 234340, 234343, 275303, 201577, 234346, 308076, 242541, 234355, 234360, 209785, 234361, 177019, 185211, 308092, 398206, 234366, 291712, 234367, 234372, 381829, 226181, 226184, 316298, 308107, 308112, 349072, 234386, 234387, 234392, 209817, 324506, 324507, 390045, 234400, 185250, 234404, 324517, 185254, 283558, 234409, 275371, 234419, 373687, 234425, 234427, 234430, 349121, 234436, 234438, 373706, 316364, 234444, 234445, 234451, 234454, 234457, 340955, 234463, 340961, 234466, 234472, 234473, 324586, 234477, 340974, 234482, 316405, 349175, 201720, 127992, 234498, 357379, 234500, 234506, 324625, 234514, 308243, 316437, 201755, 234531, 300068, 357414, 234534, 234542, 300084, 234548, 324666, 234555, 308287, 234560, 21569, 234565, 234569, 218186, 300111, 341073, 234577, 234583, 439384, 234584, 234587, 250981, 300135, 300136, 316520, 275565, 357486, 316526, 144496, 300146, 275571, 300150, 291959, 300151, 234616, 398457, 160891, 341115, 300158, 234622, 349316, 349318, 275591, 234632, 234638, 373903, 169104, 177296, 234642, 308372, 185493, 119962, 300187, 300188, 119963, 234656, 234659, 234663, 300201, 300202, 275625, 226481, 373945, 283840, 259268, 283847, 62665, 283852, 283853, 259280, 316627, 333011, 357595, 234733, 234742, 128251, 316669, 234755, 439562, 292107, 242954, 414990, 251153, 177428, 349462, 226608, 382258, 300343, 382269, 226624, 193859, 226632, 177484, 406861, 259406, 234831, 251213, 120148, 283991, 357719, 374109, 218462, 292195, 333160, 284014, 243056, 316787, 111993, 357762, 112017, 234898, 259475, 275859, 112018, 357786, 251298, 333220, 316842, 374191, 210358, 284089, 292283, 415171, 292292, 300487, 300489, 284107, 284116, 366037, 210390, 210391, 210393, 226781, 144867, 316902, 54765, 251378, 308723, 300536, 300542, 210433, 366083, 259599, 316946, 308756, 398869, 374296, 374299, 308764, 349726, 431649, 349741, 169518, 431663, 194110, 235070, 349763, 218696, 292425, 276040, 128587, 333388, 366154, 276045, 243274, 333393, 300630, 128599, 235095, 243292, 333408, 300644, 374372, 317032, 415338, 243307, 54893, 325231, 276085, 366203, 325245, 235135, 194180, 415375, 276120, 276126, 153251, 300714, 210603, 415420, 333503, 218819, 259781, 333517, 276173, 333520, 333521, 333523, 325346, 276195, 153319, 325352, 284401, 276210, 325371, 276219, 194303, 284429, 276238, 243472, 366360, 284442, 325404, 276253, 325410, 341796, 399147, 431916, 300848, 317232, 276282, 259899, 276283, 325439, 276287, 276294, 153415, 276298, 341836, 415567, 325457, 317269, 341847, 350044, 128862, 300894, 284514, 292712, 325484, 423789, 292720, 325492, 276341, 341879, 317304, 333688, 276344, 112509, 194429, 55167, 325503, 333701, 243591, 243597, 325518, 333722, 350109, 292771, 415655, 333735, 284587, 292782, 243637, 276408, 276421, 276430, 301008, 153554, 276444, 219101, 292836, 292837, 276454, 317415, 276459, 325619, 432116, 333817, 292858, 415741, 333828, 358410, 399373, 317467, 145435, 292902, 325674, 227370, 309295, 129076, 276534, 243767, 358456, 227417, 194656, 309345, 227428, 276582, 194666, 276589, 260207, 432240, 227439, 333940, 284788, 292988, 292992, 194691, 227460, 333955, 415881, 104587, 235662, 325776, 276627, 317587, 276632, 284826, 333991, 333992, 284842, 129203, 301251, 309444, 276682, 194782, 301279, 317664, 211193, 243962, 375039, 309503, 194820, 375051, 325905, 325912, 309529, 211235, 432421, 211238, 358703, 358709, 260418, 227658, 276813, 325968, 6481, 366930, 6482, 366929, 6489, 391520, 276835, 383332, 383336, 416104, 276847, 285040, 317820, 211326, 317831, 227725, 227726, 178578, 252308, 293274, 317852, 121245, 285090, 375207, 342450, 293303, 276920, 276925, 293310, 416197, 129483, 342476, 317901, 326100, 285150, 227809, 358882, 342498, 334309, 227813, 391655, 195045, 432618, 375276, 301571, 276998, 342536, 186893, 342553, 416286, 375333, 293419, 244269, 375343, 236081, 23092, 375351, 277048, 244281, 301638, 309830, 293448, 55881, 416341, 309846, 244310, 416351, 268899, 277094, 39530, 277101, 277111, 301689, 244347, 277133, 326287, 375440, 334481, 227990, 318106, 318107, 342682, 285353, 285361, 318130, 383667, 293556, 342706, 342713, 285371, 285373, 39614, 334547, 203477, 318173, 375526, 285415, 342762, 342763, 293612, 129773, 277227, 154359, 228088, 432893, 162561, 285444, 383754, 285458, 310036, 285466, 326429, 293664, 326433, 400166, 293672, 318250, 318252, 375609, 293693, 162621, 162626, 277316, 252741, 277325, 293711, 244568, 244570, 301918, 293730, 351077, 342887, 277366, 228215, 277370, 269178, 400252, 359298, 359299, 260996, 277381, 113542, 228233, 392074, 228234, 56208, 318364, 310176, 310178, 293800, 236461, 326581, 326587, 326601, 359381, 433115, 343005, 130016, 64485, 277479, 326635, 187374, 383983, 277492, 318461, 293886, 293893, 277509, 277510, 433165, 384016, 146448, 277523, 433174, 252958, 310317, 252980, 203830, 359478, 302139, 277563, 359495, 277597, 113760, 392290, 253029, 285798, 228458, 15471, 351344, 187506, 285814, 285820, 392318, 187521, 384131, 285828, 302213, 253063, 302216, 228491, 228493, 285838, 162961, 326804, 187544, 351390, 302240, 343203, 253099, 253100, 318639, 367799, 113850, 294074, 64700, 277690, 302274, 367810, 343234, 244940, 228563, 195808, 310497, 195811, 228588, 253167, 302325, 204022, 228600, 228609, 261377, 245019, 253216, 277792, 130338, 130343, 277800, 113966, 261425, 351537, 286013, 286018, 113987, 15686, 146762, 294218, 294219, 318805, 425304, 294243, 163175, 327024, 327025, 327031, 318848, 179587, 253317, 384393, 368011, 318864, 318868, 318875, 310692, 245161, 286129, 286132, 228795, 425405, 302529, 302531, 163268, 163269, 425418, 302540, 310732, 64975, 327121, 228827, 286172, 310757, 187878, 343542, 343543, 286202, 359930, 228861, 302590, 286205, 228867, 253451, 253452, 359950, 65041, 146964, 253463, 204313, 286244, 245287, 245292, 278060, 286254, 196164, 56902, 286288, 179801, 196187, 147036, 343647, 286306, 310889, 204397, 138863, 188016, 188031, 294529, 229001, 310923, 188048, 425626, 229020, 302754, 245412, 229029, 40614, 40613, 40615, 278191, 286388, 384695, 319162, 327358, 286399, 212685, 302797, 384720, 212688, 302802, 245457, 286423, 278233, 278234, 294622, 278240, 229088, 212716, 212717, 360177, 229113, 286459, 278272, 319233, 311042, 360195, 278291, 294678, 278299, 286494, 294700, 409394, 319292, 360252, 360264, 188251, 376669, 245599, 237408, 425825, 302946, 425833, 417654, 188292, 253829, 40853, 294807, 376732, 294814, 311199, 319392, 294823, 327596, 294843, 188348, 237504, 294850, 384964, 163781, 344013, 212942, 212946, 24532, 294886, 253929, 327661, 311281, 311282 ]
ae9ff8a9719ac28f05ef2702e3aa8ee9e91a37a3
a81a203f303213f3a634e36b064fac3ef19004c9
/testePadraoViper/Interactors/PersonsInteractor.swift
973f28ea1f0a623b257ff3b78f83376f98525470
[]
no_license
regeiss/testePadraoViper
0b4f25e3e14585b984d3d028924036e0e205d9ed
af102767a04cf57dbe276bbb19a2584ddeb00779
refs/heads/main
2023-07-15T19:10:43.763511
2021-09-01T18:01:34
2021-09-01T18:01:34
402,128,752
0
0
null
null
null
null
UTF-8
Swift
false
false
253
swift
// // PostsInteractor.swift // testePadraoViper // // Created by Roberto Edgar Geiss on 01/09/21. // import Foundation class PersonsInteractor { let model: DataModel init(model: DataModel) { self.model = model } }
[ -1 ]
c13301790169f3995929fde63029e715d289568e
8de7cfe17df69763ff0c02dccc8c06242a56e616
/SecretAgentKit/SocketController.swift
0c916c3a8f1441cb6e28699da952dddb3b433c81
[ "MIT" ]
permissive
EppO/secretive
23d7be4dd1b894f6a4ff982499a2fb3cfc626c0d
6c3748b6bfca9b6c5ba4c5214fb5e89130768b1b
refs/heads/main
2023-02-19T22:20:57.510320
2020-11-29T21:15:14
2020-11-29T21:15:14
329,375,337
1
0
MIT
2021-01-13T17:00:08
2021-01-13T17:00:07
null
UTF-8
Swift
false
false
2,798
swift
import Foundation import OSLog public class SocketController { private var fileHandle: FileHandle? private var port: SocketPort? public var handler: ((FileHandleReader, FileHandleWriter) -> Void)? public init(path: String) { Logger().debug("Socket controller setting up at \(path)") if let _ = try? FileManager.default.removeItem(atPath: path) { Logger().debug("Socket controller removed existing socket") } let exists = FileManager.default.fileExists(atPath: path) assert(!exists) Logger().debug("Socket controller path is clear") port = socketPort(at: path) configureSocket(at: path) Logger().debug("Socket listening at \(path)") } func configureSocket(at path: String) { guard let port = port else { return } fileHandle = FileHandle(fileDescriptor: port.socket, closeOnDealloc: true) NotificationCenter.default.addObserver(self, selector: #selector(handleConnectionAccept(notification:)), name: .NSFileHandleConnectionAccepted, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(handleConnectionDataAvailable(notification:)), name: .NSFileHandleDataAvailable, object: nil) fileHandle?.acceptConnectionInBackgroundAndNotify(forModes: [RunLoop.current.currentMode!]) } func socketPort(at path: String) -> SocketPort { var addr = sockaddr_un() addr.sun_family = sa_family_t(AF_UNIX) var len: Int = 0 withUnsafeMutablePointer(to: &addr.sun_path.0) { pointer in path.withCString { cstring in len = strlen(cstring) strncpy(pointer, cstring, len) } } addr.sun_len = UInt8(len+2) var data: Data! withUnsafePointer(to: &addr) { pointer in data = Data(bytes: pointer, count: MemoryLayout<sockaddr_un>.size) } return SocketPort(protocolFamily: AF_UNIX, socketType: SOCK_STREAM, protocol: 0, address: data)! } @objc func handleConnectionAccept(notification: Notification) { Logger().debug("Socket controller accepted connection") guard let new = notification.userInfo?[NSFileHandleNotificationFileHandleItem] as? FileHandle else { return } handler?(new, new) new.waitForDataInBackgroundAndNotify() fileHandle?.acceptConnectionInBackgroundAndNotify(forModes: [RunLoop.current.currentMode!]) } @objc func handleConnectionDataAvailable(notification: Notification) { Logger().debug("Socket controller has new data available") guard let new = notification.object as? FileHandle else { return } Logger().debug("Socket controller received new file handle") handler?(new, new) } }
[ -1 ]
3eba9334838dd57ac2127497380acb74bd8a6c6d
45d7c9d199aee3b28f66b475a64bd31b5be10891
/macOS/Contacts/CNContactVCardSerialization.swift
958d85afcd413946c90ec933239847326888febb
[]
no_license
DougGregor/swift-concurrency-objc
f8ba0cfa2a4153d1cd129d7d61060d0a47067847
5ab47b4f70a675a4298dc00b1526505b964b4061
refs/heads/xcode-12-2-beta-3
2023-01-28T12:41:18.646533
2020-10-15T19:42:00
2020-10-15T19:42:00
304,435,605
40
8
null
2020-10-15T20:05:54
2020-10-15T20:02:53
Swift
UTF-8
Swift
false
false
259
swift
@available(macOS 10.11, *) class CNContactVCardSerialization : NSObject { class func descriptorForRequiredKeys() -> CNKeyDescriptor class func data(with contacts: [CNContact]) throws -> Data class func contacts(with data: Data) throws -> [CNContact] }
[ -1 ]