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
0e69a8dd47df960cbd6a99ce45c9d28f95c598dd
e38c915c7d2f5e8168b38c349e50cbe299a1e05d
/macOS/macOS/ViewController.swift
8fea91e0fcfb946c371df335cc821f3544cf65ad
[]
no_license
L1cardo/LiveText
2a221ba8a9d2754209c090f701474cbdf557c9bf
5dbbb72b31ee77121616726951d067a992b2302a
refs/heads/master
2020-09-01T17:42:18.765498
2019-11-01T16:28:17
2019-11-01T16:28:17
219,018,431
0
0
null
null
null
null
UTF-8
Swift
false
false
755
swift
// // ViewController.swift // LiveText // // Created by Licardo on 2019/11/1. // Copyright © 2019 Licardo. All rights reserved. // import Cocoa // 1. add NSTextFieldDelegate to the main class class ViewController: NSViewController, NSTextFieldDelegate { @IBOutlet weak var label: NSTextField! @IBOutlet weak var text: NSTextField! override func viewDidLoad() { super.viewDidLoad() // 2. set NSTextField delegate to self text.delegate = self } override var representedObject: Any? { didSet { } } // 3. use controlTextDidChange to monitor the textchange func controlTextDidChange(_ obj: Notification) { label.stringValue = text.stringValue } }
[ -1 ]
4f13d32d6eac320b0b03ba500b438d10a9548a8c
c5aebda843d68bd55441a4470e2eb1e9222b8387
/LiterateSwift/LatexViewController.swift
6cebfeb84b86330abe22b5e20abe452fe00cba50
[]
no_license
mohanrajsambath/LiterateSwiftGUI
d491bda14afc3964529d7f1b64c78083c27fad14
6ca6a12039a967ca690f545f43067780b6aa164a
refs/heads/master
2020-06-22T05:07:03.081592
2015-09-07T13:58:04
2015-09-07T13:58:04
null
0
0
null
null
null
null
UTF-8
Swift
false
false
873
swift
// // LatexViewController.swift // LiterateSwift // // Created by Chris Eidhof on 17/07/15. // Copyright © 2015 Unsigned Integer. All rights reserved. // import Foundation import CommonMark import LiterateSwift class LatexViewController: NSViewController { @IBOutlet var textview: NSTextView? func loadNode(elements: [Block]) { let text = latexString(elements) let attributes: [String: AnyObject] = [NSFontAttributeName: NSFont(name: "Monaco", size: 14)!] let attributedString = NSAttributedString(string: text, attributes: attributes) textview?.textStorage?.setAttributedString(attributedString) } override func viewDidAppear() { guard let doc = view.window?.windowController?.document as? MarkdownDocument else { return } doc.callbacks.append(self.loadNode) loadNode(doc.elements) } }
[ -1 ]
46047bf0e3619be4171f34e2e9c52e7769b4078a
9f4052757eb2ae574a9132a02c2341df5cfb2b0d
/AnimatedText/AppDelegate.swift
916570fc893c513a481e72ce0da2bc991d98f326
[]
no_license
romanmazeev/AnimatedText
8ffd7a328a3310630278bbea691f15a80d896fde
309031cbf2510fee84942d052586508e6911f8f6
refs/heads/master
2021-09-05T08:36:26.880134
2018-01-25T17:07:03
2018-01-25T17:07:03
118,941,738
1
0
null
null
null
null
UTF-8
Swift
false
false
2,180
swift
// // AppDelegate.swift // GravityText // // Created by Mazeev Roman on 24.01.2018. // Copyright © 2018 Mazeev Roman. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 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, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 131209, 303241, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 320007, 287238, 172552, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 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, 107208, 107212, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 279267, 312035, 295654, 279272, 312048, 230128, 312050, 230131, 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, 295822, 213902, 189329, 295825, 189331, 304019, 58262, 304023, 279452, 410526, 279461, 279462, 304042, 213931, 304055, 230327, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 295949, 230413, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 132165, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 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, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 296264, 238919, 320840, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 148843, 230763, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 288214, 280021, 239064, 329177, 288217, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 321022, 206336, 402942, 296450, 296446, 230916, 230919, 214535, 304651, 370187, 304653, 230923, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 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, 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, 173907, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 313340, 239612, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 321740, 313548, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 240011, 199051, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 338440, 150025, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 297594, 281210, 158347, 264845, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 240535, 289687, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 306555, 314747, 298365, 290171, 290174, 224641, 281987, 314756, 298372, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 282261, 175770, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 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, 323330, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 307009, 413506, 241475, 307012, 298822, 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, 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, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 217179, 315483, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 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, 282881, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 276052, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 299440, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 315856, 176592, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 127457, 291299, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 135672, 233979, 291323, 127485, 291330, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 135844, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 201557, 185173, 234329, 234333, 308063, 234336, 234338, 349027, 242530, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 201603, 291714, 234373, 316294, 226182, 234375, 308105, 291716, 226185, 234379, 324490, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 234410, 291754, 291756, 324522, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 324548, 234437, 226245, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 308291, 316483, 160835, 234563, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 275579, 234620, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 234648, 234653, 300189, 119967, 324766, 324768, 283805, 234657, 242852, 234661, 283813, 300197, 234664, 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, 300299, 177419, 242957, 283917, 300301, 177424, 275725, 349451, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 324978, 136562, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 226802, 292338, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 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, 276095, 284288, 292481, 284290, 325250, 284292, 292485, 292479, 276098, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 276166, 284358, 358089, 284362, 276170, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 284511, 317279, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 358292, 284564, 317332, 284566, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 276464, 178161, 227314, 276466, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 276539, 235581, 178238, 325692, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 194654, 178273, 309346, 194657, 309348, 350308, 309350, 227426, 309352, 350313, 309354, 301163, 350316, 194660, 227430, 276583, 276590, 350321, 284786, 276595, 301167, 350325, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 309455, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 227571, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 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, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 293706, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 285690, 293882, 302075, 121850, 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, 253064, 302218, 294026, 285835, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 310659, 351619, 294276, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 245191, 310727, 64966, 163272, 277959, 292968, 302541, 277963, 302543, 277966, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 40488, 278057, 294439, 40491, 294440, 294443, 294445, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 400976, 212560, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 302793, 294601, 343757, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 311048, 294664, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 319390, 237470, 40865, 319394, 294817, 294821, 311209, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
30fe8e4ac2cea43f7022cca0a98fb77ccd54f1a2
a449bc335dfd81086eea04272f3ab7aa59963a17
/SharkFeedUITests/SharkFeedUITests.swift
e083e5ac9e424a68801e1219248b97ba067dd136
[]
no_license
portia-s/SharkFeed
bb1b12e22d1e825c88030fefa9070fefe69aa2d1
1b8a4ef3b35c16d5be77d9c9ae19668ed8e829ae
refs/heads/master
2021-05-01T23:05:25.804514
2018-02-13T15:04:10
2018-02-13T15:04:10
120,929,008
0
0
null
null
null
null
UTF-8
Swift
false
false
1,253
swift
// // SharkFeedUITests.swift // SharkFeedUITests // // Created by Portia Sharma on 2/6/18. // Copyright © 2018 Portia Sharma. All rights reserved. // import XCTest class SharkFeedUITests: 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, 278669, 278676, 311447, 327834, 278684, 278690, 311459, 278698, 278703, 278707, 180409, 278713, 295099, 139459, 131270, 229591, 147679, 311520, 147680, 319719, 295147, 286957, 319764, 278805, 311582, 278817, 311596, 336177, 98611, 278843, 287040, 319812, 311622, 319816, 229716, 278895, 287089, 139641, 311679, 311692, 106893, 156069, 311723, 377265, 311739, 319931, 278974, 336319, 311744, 278979, 336323, 278988, 278992, 279000, 279009, 369121, 188899, 279014, 319976, 279017, 311787, 319986, 279030, 311800, 279033, 279042, 287237, 377352, 279053, 303634, 303635, 279060, 279061, 279066, 188954, 279092, 377419, 303693, 115287, 189016, 295518, 287327, 279143, 279150, 287345, 189054, 287359, 303743, 164487, 311944, 279176, 344714, 311948, 311950, 311953, 287379, 336531, 295575, 303772, 205469, 221853, 279207, 295591, 295598, 279215, 279218, 287412, 164532, 287418, 303802, 66243, 287434, 287438, 279249, 303826, 369365, 369366, 279253, 230105, 295653, 230120, 279278, 312046, 230133, 279293, 205566, 295688, 312076, 295698, 221980, 336678, 262952, 262953, 279337, 262957, 164655, 328495, 303921, 230198, 295745, 222017, 279379, 295769, 230238, 230239, 279393, 303973, 279398, 295797, 295799, 279418, 336765, 287623, 279434, 320394, 189327, 189349, 279465, 304050, 189373, 213956, 345030, 213961, 279499, 304086, 304104, 123880, 320492, 320495, 287730, 320504, 214009, 312313, 312315, 312317, 328701, 328705, 418819, 230411, 320526, 238611, 140311, 238617, 197658, 336930, 132140, 189487, 312372, 238646, 238650, 320571, 336962, 238663, 296023, 205911, 156763, 214116, 230500, 279659, 238706, 312435, 279666, 230514, 279686, 222344, 337037, 296091, 238764, 279729, 148674, 312519, 148687, 189651, 279766, 189656, 279775, 304352, 304353, 279780, 279789, 279803, 320769, 312588, 320795, 320802, 304422, 312628, 345398, 222523, 181568, 279872, 279874, 304457, 230730, 345418, 337228, 296269, 222542, 238928, 296274, 230757, 296304, 312688, 230772, 337280, 296328, 296330, 304523, 9618, 279955, 148899, 279979, 279980, 173492, 279988, 280003, 370122, 280011, 337359, 329168, 312785, 222674, 329170, 280020, 280025, 239069, 320997, 280042, 280043, 329198, 337391, 296434, 288248, 288252, 312830, 230922, 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, 296636, 280253, 321217, 280259, 321220, 239305, 296649, 280266, 9935, 313042, 280279, 18139, 280285, 321250, 337638, 181992, 288492, 34547, 67316, 313082, 288508, 288515, 280326, 116491, 280333, 124691, 116502, 321308, 321309, 280367, 280377, 321338, 280381, 345918, 280386, 280391, 280396, 18263, 370526, 296807, 296815, 313200, 313204, 124795, 280451, 67464, 305032, 124816, 214936, 337816, 239515, 214943, 313257, 288698, 214978, 280517, 280518, 214983, 231382, 329696, 190437, 313322, 329707, 174058, 296942, 124912, 313338, 239610, 182277, 313356, 305173, 223269, 354342, 354346, 313388, 124974, 321589, 215095, 288829, 288835, 313415, 239689, 354386, 329812, 223317, 354394, 321632, 280676, 313446, 215144, 288878, 288890, 215165, 329884, 215204, 125108, 280761, 223418, 280767, 338118, 280779, 321744, 280792, 280803, 182503, 338151, 125166, 125170, 395511, 313595, 125180, 125184, 125192, 125197, 125200, 125204, 338196, 125215, 125225, 338217, 321839, 125236, 280903, 289109, 379224, 239973, 313703, 280938, 321901, 354671, 199030, 223611, 248188, 313726, 158087, 313736, 240020, 190870, 190872, 289185, 305572, 289195, 338359, 289229, 281038, 281039, 281071, 322057, 182802, 322077, 289328, 338491, 322119, 281165, 281170, 281200, 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, 314240, 158594, 330627, 240517, 289691, 240543, 289699, 289704, 289720, 289723, 281541, 19398, 191445, 183254, 183258, 207839, 314343, 183276, 289773, 248815, 240631, 330759, 330766, 281647, 322609, 314437, 207954, 339031, 314458, 281698, 281699, 322664, 314493, 347286, 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, 290170, 224637, 306558, 290176, 306561, 314752, 314759, 298378, 314771, 306580, 224662, 282008, 314776, 282013, 290206, 314788, 298406, 314790, 282023, 241067, 314797, 306630, 306634, 339403, 191980, 282097, 306678, 191991, 290304, 323083, 323088, 282132, 282135, 175640, 282147, 306730, 290359, 323132, 282182, 224848, 224852, 290391, 306777, 282214, 224874, 314997, 290425, 339579, 282244, 323208, 282248, 323226, 282272, 282279, 298664, 298666, 306875, 282302, 323262, 323265, 282309, 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, 126896, 200628, 282572, 282573, 323554, 298987, 282634, 241695, 315433, 102441, 102446, 282671, 241717, 307269, 315468, 233548, 315477, 200795, 323678, 315488, 315489, 45154, 233578, 307306, 241809, 323730, 299166, 299176, 184489, 323761, 184498, 258233, 299197, 299202, 176325, 299208, 282832, 356575, 307431, 184574, 217352, 315674, 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, 299449, 291266, 283088, 283089, 242138, 176602, 160224, 291297, 242150, 283138, 233987, 324098, 340489, 283154, 291359, 283185, 234037, 340539, 234044, 332379, 111197, 242274, 291455, 316044, 184974, 316048, 316050, 340645, 176810, 299698, 291529, 225996, 135888, 242385, 299737, 234216, 234233, 242428, 291584, 299777, 291591, 291605, 283418, 234276, 283431, 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, 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, 292092, 234756, 242955, 177420, 292145, 300342, 333114, 333115, 193858, 300354, 300355, 234830, 283990, 357720, 300378, 300379, 316764, 292194, 284015, 234864, 316786, 243073, 292242, 112019, 234902, 333224, 284086, 259513, 284090, 54719, 415170, 292291, 300488, 300490, 144862, 300526, 308722, 300539, 210429, 292359, 218632, 316951, 374297, 235069, 349764, 194118, 292424, 292426, 333389, 349780, 128600, 235096, 300643, 300645, 243306, 325246, 333438, 235136, 317102, 300725, 300729, 333508, 333522, 325345, 153318, 333543, 284410, 284425, 300810, 300812, 284430, 161553, 284436, 325403, 341791, 325411, 186148, 186149, 333609, 284460, 300849, 325444, 153416, 325449, 317268, 325460, 341846, 284508, 300893, 284515, 276326, 292713, 292719, 325491, 333687, 317305, 317308, 333700, 325508, 243590, 243592, 325514, 350091, 350092, 350102, 333727, 333734, 219046, 284584, 292783, 300983, 153553, 292835, 6116, 292838, 317416, 325620, 333827, 243720, 292901, 325675, 243763, 325695, 333902, 227432, 194667, 284789, 284790, 292987, 227459, 194692, 235661, 333968, 153752, 284827, 333990, 284840, 284843, 227517, 309443, 227525, 301255, 227536, 301270, 301271, 325857, 334049, 317676, 309504, 194832, 227601, 325904, 334104, 211239, 334121, 317738, 325930, 227655, 383309, 391521, 285031, 416103, 227702, 211327, 227721, 285074, 227730, 317851, 293275, 285083, 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, 309847, 244311, 244326, 301688, 244345, 301702, 334473, 326288, 227991, 285348, 318127, 285360, 293552, 285362, 342705, 154295, 342757, 285419, 170735, 342775, 375552, 228099, 285443, 285450, 326413, 285457, 285467, 326428, 318247, 293673, 318251, 301872, 285493, 285496, 301883, 342846, 293702, 318279, 244569, 301919, 293729, 351078, 310132, 228214, 269179, 228232, 416649, 252812, 293780, 310166, 277404, 310177, 293801, 326571, 326580, 326586, 359365, 211913, 56270, 203758, 277493, 293894, 293911, 326684, 113710, 318515, 203829, 277600, 285795, 228457, 318571, 187508, 302202, 285819, 285823, 285833, 285834, 318602, 228492, 162962, 187539, 326803, 285850, 302239, 302251, 294069, 294075, 64699, 228541, 343230, 310496, 228587, 302319, 228608, 318732, 318746, 245018, 130342, 130344, 130347, 286012, 294210, 286019, 294220, 318804, 294236, 327023, 327030, 310650, 179586, 294278, 318860, 368012, 318876, 343457, 245160, 286128, 286133, 310714, 302523, 228796, 302530, 228804, 310725, 302539, 310731, 310735, 327122, 310747, 286176, 187877, 310758, 40439, 286201, 359931, 286208, 245249, 228868, 302602, 294413, 359949, 302613, 302620, 245291, 310853, 286281, 196184, 212574, 204386, 204394, 138862, 310896, 294517, 286344, 286351, 188049, 229011, 229021, 302751, 245413, 212649, 286387, 286392, 302778, 286400, 212684, 286419, 294621, 294629, 286457, 286463, 319232, 278273, 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 ]
459852750a28bd0ed4168bb05f59969b42541031
b336f06327862682cec589191c5ab421f5ca75ac
/Sources/MPPSolarTool/ProtocolID.swift
fc50b239a75f7f9656894913706abdaf32130ab3
[ "MIT" ]
permissive
MillerTechnologyPeru/MPPSolar
3c7d2bd32ef4c4a919fdc90359e3ae6748dd7d9d
ce32452d297e8b22e90702d975a829cef4d5c4b4
refs/heads/master
2023-04-06T15:57:53.280324
2023-03-31T07:14:44
2023-03-31T07:14:44
252,925,330
3
1
null
null
null
null
UTF-8
Swift
false
false
864
swift
// // ProtocolID.swift // // // Created by Alsey Coleman Miller on 7/26/20. // import Foundation import MPPSolar import ArgumentParser private typealias Query = ProtocolID.Query extension SolarTool { struct ProtocolID: SolarToolCommand { static let configuration = CommandConfiguration(abstract: "Read the device protocol ID.") @OptionGroup() var options: Options func run(device: MPPSolar) async throws { let protocolID = try await device.send(Query()).protocolID print("Protocol ID:", protocolID) } } } extension SolarTool.ProtocolID { struct Options: ParsableArguments { @Option(help: "The special file path to the solar device.") var path = "/dev/hidraw0" } var path: String { return options.path } }
[ -1 ]
e04dc72bbda8a522a282b3dbe31122f879197ee9
60810a0107efbdc074e548ae09c225a58d095b5a
/QuickPerformanceTests/QuickSpec265.swift
3388880a428538d64e6911be8fa839886ff479dd
[]
no_license
tangzhen/QuickPerformance
bb1905d2214c694b586a691488281a5e215b3e2b
c4babdc6d5d6a8ca134512a815301d28c6e8c442
refs/heads/master
2020-12-03T14:12:05.691204
2016-08-31T09:27:12
2016-08-31T09:27:12
67,023,455
0
0
null
null
null
null
UTF-8
Swift
false
false
372
swift
// // QuickPerformanceTests.swift // QuickPerformanceTests // // Created by Zhen Tang on 8/29/16. // Copyright © 2016 Zhen Tang. All rights reserved. // import Quick import XCTest class QuickSpec265: QuickSpec { override func spec() { it("should pass the test") { XCTAssertEqual(1 + 1, 2, "one plus one should equal two") } } }
[ -1 ]
57d816bcd88e2df42d76360918beed4101ac7195
849784215800d495c78b41c1017ded4aa6a58d3f
/FretelloTask2/FretelloTask2/Constants+Structs+Methods/Constants.swift
96545aa2f707ce13db1f9fe372a3513ba5405fff
[]
no_license
MonoN0Aware/FretelloCodingChallenge
42c54a0c90bf39278cf55b5db73b2da771fb2f35
4fd00aa543776950b56cf6460c4864591836b5fc
refs/heads/main
2023-06-01T10:46:31.061404
2021-06-11T14:02:35
2021-06-11T14:02:35
376,042,889
1
0
null
null
null
null
UTF-8
Swift
false
false
221
swift
// // Constants.swift // FretelloTask2 // // Created by Decagon on 09/06/2021. // import Foundation enum constants { static let urlStr = "http://codingtest.fretello.com:3000/img/" static let png = ".png" }
[ -1 ]
31f6f16f11ff50a1cac69f2c23b712a1a77bd9ee
40a73a124ad0025f2811f39b1f81ffcd4528a790
/Sources/App/configure.swift
63a91cc02d685728e743af364ae1ae8a8de4f027
[]
no_license
kamcma/baseball-weather
caa3b40a76de300c4abe85a118e795e10c6446c9
7f8ca89674ec6a274e3cb2ece49957d15405caa1
refs/heads/master
2021-01-11T07:06:46.818943
2019-03-05T01:47:05
2019-03-05T01:47:05
71,908,512
0
0
null
null
null
null
UTF-8
Swift
false
false
368
swift
import Vapor public func configure( _ config: inout Config, _ env: inout Environment, _ services: inout Services ) throws { let router = EngineRouter.default() try routes(router) services.register(router, as: Router.self) var middlewares = MiddlewareConfig() middlewares.use(ErrorMiddleware.self) services.register(middlewares) }
[ -1 ]
7daba85e6d9c9203a860eb116a3228364ddbefc7
8434eff974479ae9c82b9d8b9d17eddc8484ee5e
/Sources/Doggie/Serialization/ByteOutputStream.swift
cc177cdd4d13fd428c1b100fca040244a4d07ce0
[ "MIT" ]
permissive
ExamplesSwift/Doggie
6b5f82f570a69723f77def108713cba089f48384
cae3b6184dfb906acfd0b1ae9955905a196733da
refs/heads/master
2020-08-21T11:35:33.437778
2019-10-18T13:46:21
2019-10-18T13:46:21
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,771
swift
// // ByteOutputStream.swift // // The MIT License // Copyright (c) 2015 - 2019 Susan Cheng. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // public protocol ByteOutputStream { mutating func write(_ bytes: UnsafeRawBufferPointer) } extension ByteOutputStream { @inlinable mutating func write<Buffer: ContiguousBytes>(_ buffer: Buffer) { buffer.withUnsafeBytes { self.write($0) } } } public protocol ByteOutputStreamable { func write<Target: ByteOutputStream>(to stream: inout Target) } @frozen @usableFromInline struct _ByteOutputStream: ByteOutputStream { @usableFromInline let sink: (UnsafeRawBufferPointer) -> Void @inlinable init(sink: @escaping (UnsafeRawBufferPointer) -> Void) { self.sink = sink } @inlinable func write(_ bytes: UnsafeRawBufferPointer) { sink(bytes) } } extension ByteOutputStreamable { @inlinable public func enumerateBytes(_ body: (UnsafeRawBufferPointer) -> Void) { withoutActuallyEscaping(body) { var stream = _ByteOutputStream(sink: $0) self.write(to: &stream) } } @inlinable public func write<C : RangeReplaceableCollection>(to data: inout C) where C.Element == UInt8 { self.enumerateBytes { data.append(contentsOf: $0) } } } extension RangeReplaceableCollection where Element == UInt8 { @inlinable public mutating func encode<T: ByteOutputStreamable>(_ value: T) { value.write(to: &self) } } extension ByteOutputStream { @inlinable public mutating func encode<T: ByteOutputStreamable>(_ value: T) { value.write(to: &self) } }
[ 224814 ]
aebc080c50d18eecc59b65fa3aac395e0b1455aa
6492be24c8279782a16f25ac90fa334efe7a3ca9
/HMRequestFramework/database/coredata/protocol/managed/HMCDObjectAliasType.swift
af25fcbe07957525d674fc1dd62c976c4d15c21c
[ "MIT" ]
permissive
protoman92/HMRequestFramework-Swift
308f3c05c68d0869cc9378e80764602435484dfb
e930828a087c83e7fce0affd47ab5601866f96dd
refs/heads/master
2021-10-02T08:09:27.695177
2018-11-29T18:02:56
2018-11-29T18:02:56
98,516,681
4
0
null
null
null
null
UTF-8
Swift
false
false
623
swift
// // HMCDObjectAliasType.swift // HMRequestFramework // // Created by Hai Pham on 10/8/17. // Copyright © 2017 Holmusk. All rights reserved. // import CoreData /// CoreData classes must implement this protocol. public protocol HMCDObjectAliasType { /// Convert the current alias into NSManagedObject. /// /// - Returns: A NSManagedObject instance. func asManagedObject() -> NSManagedObject } public extension HMCDObjectAliasType where Self: NSManagedObject { public func asManagedObject() -> NSManagedObject { return self } } extension NSManagedObject: HMCDObjectAliasType {}
[ -1 ]
7ff915c12475e760a8c819e1673277b005af21a9
c6898195dfd3d71ae61327b05fb70d28a846a533
/SwiftUIFirestore/App/AppDelegate.swift
fbc823ba43b69e99d22f9495115036c777395a0c
[]
no_license
NicHaley/SwiftUIFirebase
8bc2ddd37459f87612b8bf693f3c29b3ea91c4d8
79cb97864010fab515bb58f024ffe5758098be69
refs/heads/master
2022-04-22T18:23:12.251632
2020-04-12T16:47:22
2020-04-12T16:47:22
254,961,849
0
0
null
null
null
null
UTF-8
Swift
false
false
1,520
swift
// // AppDelegate.swift // SwiftUIFirestore // // Created by Nicholas Haley on 2020-04-11. // Copyright © 2020 Nicholas Haley. All rights reserved. // import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. FirebaseApp.configure() Auth.auth().signInAnonymously() 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. } }
[ 350213, 393222, 393230, 350224, 350231, 350237, 350240, 393250, 344102, 350248, 178218, 350251, 393261, 350256, 430129, 350259, 266294, 385081, 350271, 421960, 376905, 378954, 395339, 350285, 254030, 286800, 374864, 338004, 368735, 342111, 180320, 376931, 421990, 266350, 286831, 368752, 266362, 286844, 262283, 381068, 432271, 250004, 225429, 225437, 329885, 286879, 346272, 225441, 225444, 225447, 286888, 438440, 225450, 100524, 333997, 258222, 225455, 430256, 387249, 225458, 377012, 225461, 225466, 389307, 387260, 225470, 256191, 381120, 260289, 372929, 225475, 430274, 389320, 395466, 260298, 350410, 377036, 225484, 346316, 180431, 225487, 350416, 225490, 266453, 225493, 350422, 225496, 350425, 377046, 411861, 411868, 334045, 225502, 225505, 411873, 379107, 377060, 387301, 225510, 411876, 338152, 225514, 387306, 350445, 387312, 393456, 375026, 393460, 321786, 336123, 350461, 379134, 411903, 336128, 350464, 385280, 350467, 262404, 389380, 397571, 180490, 350475, 411916, 268559, 350480, 368911, 379152, 395538, 387349, 262422, 338199, 350486, 387352, 325914, 350490, 432405, 325917, 182558, 350493, 356637, 356640, 350498, 338211, 262436, 356643, 377117, 266536, 350504, 356649, 358700, 350509, 391468, 248111, 356655, 358704, 340275, 356660, 262454, 397622, 358713, 332090, 358716, 225597, 332097, 201028, 362822, 262472, 348488, 383306, 436555, 334161, 213332, 250199, 65880, 383321, 250202, 262496, 418144, 250210, 262499, 383330, 383333, 213352, 348522, 262507, 391530, 348525, 262510, 348527, 354673, 248186, 334203, 194941, 250238, 389502, 356740, 385419, 393612, 420236, 366990, 379278, 262550, 262552, 373145, 340379, 416157, 354727, 375208, 385451, 262573, 389550, 393647, 338352, 375216, 385458, 262586, 262592, 358856, 330189, 338381, 338386, 360916, 334304, 338403, 340451, 334311, 338409, 160234, 375277, 127471, 334321, 328179, 328182, 340472, 328189, 324094, 328192, 164361, 324111, 186897, 393747, 340500, 334358, 254490, 188958, 385570, 33316, 197159, 354855, 350761, 324142, 383536, 358961, 356916, 324149, 188987, 324155, 348733, 418363, 252482, 324164, 219718, 348743, 356934, 385609, 324173, 324176, 199249, 385616, 352856, 332380, 373343, 352864, 346721, 369253, 262760, 248425, 381545, 191084, 191092, 346742, 352887, 254587, 377472, 334465, 336512, 148105, 377484, 330383, 326290, 352918, 342679, 342683, 258721, 332453, 150183, 344744, 361129, 389805, 381617, 434867, 164534, 336567, 342710, 350206, 260797, 223934, 260801, 350917, 352968, 418507, 357069, 385742, 355024, 273108, 385748, 264918, 391894, 154328, 416473, 361179, 183005, 256734, 369381, 338664, 332520, 361195, 340718, 332533, 344831, 391937, 207619, 336643, 344835, 373510, 344841, 338700, 256786, 434970, 369435, 199452, 262942, 162591, 396066, 336675, 346916, 396069, 389926, 326441, 355122, 340789, 326454, 336696, 361273, 355131, 244540, 326460, 375612, 326467, 328515, 355140, 127814, 328519, 355143, 326473, 328522, 338763, 336714, 355150, 357201, 330580, 326485, 357206, 416597, 389978, 357211, 197468, 254812, 355166, 265055, 357214, 361309, 265058, 361315, 430939, 326502, 375656, 361322, 326507, 326510, 211825, 330610, 340849, 430965, 211831, 351097, 119674, 398201, 328573, 359295, 342915, 381833, 236430, 330642, 342930, 430995, 252822, 392091, 400285, 422816, 398245, 359334, 340909, 400306, 207808, 351168, 359361, 359366, 398279, 340939, 345035, 340941, 209873, 345043, 386003, 396245, 330710, 359382, 248792, 386011, 359388, 340957, 248798, 383967, 431072, 386018, 340963, 386022, 343015, 359407, 257008, 183282, 435187, 330748, 349180, 439294, 330760, 328714, 330768, 361489, 209943, 336921, 386073, 209946, 336925, 211998, 377887, 250914, 357410, 396328, 209965, 345133, 359470, 396336, 209971, 396339, 209975, 339001, 388154, 209979, 361536, 388161, 209987, 330826, 341071, 189520, 345169, 250967, 156761, 210010, 339036, 412764, 257120, 148578, 341091, 384098, 384101, 265320, 210025, 210027, 367723, 384107, 187502, 210030, 345199, 384114, 210039, 248951, 420984, 341113, 210044, 349308, 361598, 160895, 152703, 210052, 214149, 345222, 210055, 349319, 330889, 351364, 210067, 210071, 339097, 210077, 214175, 210080, 210084, 251044, 44197, 380070, 210088, 339112, 210095, 210098, 367794, 337075, 210107, 351423, 210115, 332997, 326855, 253130, 210127, 333009, 146642, 210131, 386258, 330965, 333014, 265436, 328924, 210143, 388319, 351466, 386285, 218354, 386291, 351479, 218360, 251128, 275706, 275712, 275715, 275721, 261389, 359694, 175375, 333078, 251160, 245020, 345376, 175396, 245029, 171302, 208166, 410917, 351534, 372015, 245040, 372018, 199988, 337205, 396600, 378169, 369978, 415033, 437566, 175423, 437570, 343365, 337222, 437575, 357708, 337229, 212303, 331088, 437583, 437587, 263508, 396633, 437595, 259421, 175457, 333154, 208227, 175460, 251235, 343393, 343398, 345448, 374117, 402791, 425328, 343409, 271730, 378227, 390516, 175477, 154999, 249208, 333175, 343417, 175483, 175486, 175489, 249218, 271745, 245127, 249224, 136590, 245136, 249234, 112020, 245142, 349590, 230809, 245145, 343450, 175516, 245148, 175522, 181670, 181673, 327084, 380332, 181678, 396722, 181690, 259515, 361917, 415166, 181696, 327107, 372163, 384453, 181703, 380360, 216522, 339404, 327117, 359886, 208337, 359890, 366034, 339412, 413141, 415185, 415191, 339417, 415193, 249308, 368092, 415196, 271839, 249312, 415199, 423392, 339428, 415207, 361960, 339434, 343534, 343539, 210420, 368119, 343544, 69113, 368122, 415224, 423423, 372228, 337415, 419339, 208398, 380432, 175635, 359955, 419349, 345625, 415257, 419355, 415263, 419362, 370213, 415270, 419368, 144939, 415278, 359983, 415281, 415285, 415290, 415293, 349761, 265795, 415300, 396872, 419400, 333386, 353867, 419402, 419406, 419410, 366172, 257633, 333413, 345701, 372327, 394853, 423532, 222830, 257646, 138864, 210544, 224884, 155254, 224887, 370297, 224890, 415353, 224894, 224897, 372353, 216707, 403075, 415361, 224904, 155273, 345736, 11918, 224913, 224916, 345749, 224919, 208538, 224922, 224926, 368288, 224929, 345762, 419491, 224932, 345765, 425638, 224936, 257704, 419497, 419501, 224942, 370350, 419506, 257716, 337592, 257720, 155322, 419512, 257724, 425662, 155327, 257732, 210631, 333511, 419527, 419530, 333518, 419535, 358099, 394966, 155351, 419542, 419544, 155354, 345818, 419547, 419550, 224993, 257761, 155363, 419559, 337642, 245483, 419563, 337645, 431851, 339695, 210672, 409335, 339710, 155393, 210695, 362247, 268041, 210698, 155403, 339721, 395021, 362255, 210706, 372499, 167700, 245525, 399128, 333594, 116509, 155422, 184094, 210719, 225053, 225058, 360223, 378663, 257836, 413484, 155438, 225070, 358191, 345905, 358200, 397112, 225082, 354106, 397115, 225087, 354111, 247617, 366401, 341829, 46920, 329544, 341834, 257868, 370509, 257871, 341843, 397139, 415573, 370519, 155482, 358234, 261981, 257886, 155487, 350045, 399199, 155490, 155491, 399206, 257896, 274280, 327531, 261996, 376685, 261999, 358255, 399215, 262002, 358259, 327539, 345970, 262005, 147317, 345974, 257912, 262008, 262011, 155516, 243579, 354172, 155521, 333698, 155531, 333708, 262027, 262030, 337808, 262033, 397200, 247700, 262036, 380822, 262042, 225180, 155549, 262045, 333724, 262048, 436126, 262051, 436132, 327589, 155559, 155562, 382890, 184244, 337844, 372664, 393150, 346063, 393169, 155611, 372702, 329697, 372706, 155619, 354277, 253926, 190439, 247789, 350189, 204784, 350193, 380918, 350202, 393212, 155646 ]
ad4a8f50afaa750afd70da1f148462da810c4fab
1d60e5ea1e4c5adeb4bc64c3b08784b66b16320c
/TKR_Reminder/Controller/ViewController.swift
8500b1751b56dc89770c75377a7f95224ed4aba1
[]
no_license
tanaykumar018/TKR_Reminder
b33a2b35472b4d3048f8010ef56a9f4f56bfc1b1
73a657d2c422657b8d948172b57689ea5214cbb2
refs/heads/master
2021-08-28T08:13:31.471983
2017-12-11T16:58:08
2017-12-11T16:58:08
113,885,031
0
0
null
null
null
null
UTF-8
Swift
false
false
2,187
swift
// // ViewController.swift // TKR_Reminder // // Created by Tanay Kumar on 11/12/17. // Copyright © 2017 Tanay Kumar. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() UNService.shared.authorize() CLService.shared.authorize() NotificationCenter.default.addObserver(self, selector: #selector(didEnterRegion), name: NSNotification.Name("internalNotification.enteredRegion"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(handleAction(_:)), name: NSNotification.Name("internalNotification.handleAction"), object: nil) } @IBAction func onTimerTapped() { print("timer") AlertService.actionSheet(in: self, title: "5 seconds") { UNService.shared.timerRequest(with: 5) } } @IBAction func onDateTapped() { print("date") AlertService.actionSheet(in: self, title: "Some future time") { var components = DateComponents() components.second = 0 UNService.shared.dateRequest(with: components) } } @IBAction func onLocationTapped() { print("location") AlertService.actionSheet(in: self, title: "When I return") { CLService.shared.updateLocation() } } @objc func didEnterRegion() { UNService.shared.locationRequst() } @objc func handleAction(_ sender: Notification) { guard let action = sender.object as? NotificationActionID else { return } switch action { case .timer: print("timer logic") case .date: print("date logic") case .location: changeBackground() } } func changeBackground() { view.backgroundColor = .red } }
[ -1 ]
d3e6899d03cf0df1075aaa9385fe885dc0d29073
20a18058322ea7986e240074f5d51b1d4b8b59c3
/Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift
22e95a70a7868d9b9668ce2890b9661615aa5106
[ "Apache-2.0", "Swift-exception" ]
permissive
aciidb0mb3r/swift-driver
87608d79dca3846cee47dc03c292139b965bf4f7
dc8c976f22438d4f78331772142e64734d3d5755
refs/heads/master
2022-11-10T17:42:57.862370
2020-07-01T19:59:02
2020-07-01T19:59:02
277,155,375
0
0
null
2020-07-04T17:24:46
2020-07-04T17:24:45
null
UTF-8
Swift
false
false
3,976
swift
//===----------- PrintTargetInfoJob.swift - Swift Target Info Job ---------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// /// Swift versions are major.minor. struct SwiftVersion { var major: Int var minor: Int init?(string: String) { let components = string.split( separator: ".", maxSplits: 2, omittingEmptySubsequences: false) .compactMap { Int($0)} guard components.count == 2 else { return nil } self.major = components[0] self.minor = components[1] } } extension SwiftVersion: CustomStringConvertible { var description: String { "\(major).\(minor)" } } extension SwiftVersion: Codable { func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() try container.encode(description) } init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() let string = try container.decode(String.self) guard let version = SwiftVersion(string: string) else { throw DecodingError.dataCorrupted(.init( codingPath: decoder.codingPath, debugDescription: "Invalid Swift version string \(string)")) } self = version } } /// Describes information about the target as provided by the Swift frontend. public struct FrontendTargetInfo: Codable { struct Target: Codable { /// The target triple let triple: Triple /// The target triple without any version information. let unversionedTriple: Triple /// The triple used for module names. let moduleTriple: Triple /// The version of the Swift runtime that is present in the runtime /// environment of the target. var swiftRuntimeCompatibilityVersion: SwiftVersion? /// Whether the Swift libraries need to be referenced in their system /// location (/usr/lib/swift) via rpath. let librariesRequireRPath: Bool } struct Paths: Codable { /// The path to the SDK, if provided. let sdkPath: String? let runtimeLibraryPaths: [String] let runtimeLibraryImportPaths: [String] let runtimeResourcePath: String } var target: Target var targetVariant: Target? let paths: Paths } extension Toolchain { func printTargetInfoJob(target: Triple?, targetVariant: Triple?, sdkPath: VirtualPath? = nil, resourceDirPath: VirtualPath? = nil, requiresInPlaceExecution: Bool = false) throws -> Job { var commandLine: [Job.ArgTemplate] = [.flag("-frontend"), .flag("-print-target-info")] // If we were given a target, include it. Otherwise, let the frontend // tell us the host target. if let target = target { commandLine += [.flag("-target"), .flag(target.triple)] } // If there is a target variant, include that too. if let targetVariant = targetVariant { commandLine += [.flag("-target-variant"), .flag(targetVariant.triple)] } if let sdkPath = sdkPath { commandLine += [.flag("-sdk"), .path(sdkPath)] } if let resourceDirPath = resourceDirPath { commandLine += [.flag("-resource-dir"), .path(resourceDirPath)] } return Job( moduleName: "", kind: .printTargetInfo, tool: .absolute(try getToolPath(.swiftCompiler)), commandLine: commandLine, displayInputs: [], inputs: [], outputs: [.init(file: .standardOutput, type: .jsonTargetInfo)], requiresInPlaceExecution: requiresInPlaceExecution, supportsResponseFiles: false ) } }
[ -1 ]
248993da36257938147eb894c79db5c61440f7fc
6cbd2f2bbb9a5023ad702e27238c52eff56bd562
/RxCalendarLogicTests/MonthDisplayTest.swift
7f2d0f439c1d56d15997c3cdf564746ea8da6260
[ "MIT" ]
permissive
protoman92/RxCalendar-Swift
d4fce346e278d1859d65382a948fcff2eb56d2e1
80f5fff0c20d85c2f5084ed8ac5e162b214b513a
refs/heads/master
2020-03-14T22:28:28.956208
2018-05-10T19:31:34
2018-05-10T19:31:34
131,821,963
1
1
null
null
null
null
UTF-8
Swift
false
false
8,715
swift
// // MonthDisplayTest.swift // RxCalendarLogicTests // // Created by Hai Pham on 16/4/18. // Copyright © 2018 Hai Pham. All rights reserved. // import RxSwift import SwiftFP import SwiftUtilities import XCTest @testable import RxCalendarLogic public final class MonthDisplayTest: RootTest { fileprivate var model: RxCalendarLogic.MonthDisplay.Model! fileprivate var viewModel: RxCalendarLogic.MonthDisplay.ViewModel! fileprivate var currentMonth: RxCalendarLogic.Month! fileprivate var currentMonthSb: BehaviorSubject<RxCalendarLogic.Month>! fileprivate var allSelectionSb: BehaviorSubject<Try<Set<RxCalendarLogic.Selection>>>! override public func setUp() { super.setUp() model = RxCalendarLogic.MonthDisplay.Model(self) viewModel = RxCalendarLogic.MonthDisplay.ViewModel(model) currentMonth = RxCalendarLogic.Month(Date()) currentMonthSb = BehaviorSubject(value: currentMonth!) allSelectionSb = BehaviorSubject(value: Try.failure("")) } } extension MonthDisplayTest: MonthControlCommonTestProtocol { public func test_backwardAndForwardReceiver_shouldWork() { test_backwardAndForwardReceiver_shouldWork(viewModel!, model!) } public func test_minAndMaxMonths_shouldLimitMonthSelection() { test_minAndMaxMonths_shouldLimitMonthSelection(viewModel!, model!) } } extension MonthDisplayTest: SelectHighlightCommonTestProtocol { public func test_calculateHighlightParts_shouldWorkCorrectly() { test_calculateHighlightParts_shouldWorkCorrectly(viewModel!, model!) } } public extension MonthDisplayTest { public func test_multipleConstructors_shouldWork() { let monthControlModel = RxCalendarLogic.MonthControl.Model(self) let monthGridModel = RxCalendarLogic.MonthGrid.Model(self) let daySelectionModel = RxCalendarLogic.DaySelect.Model(self) let model1 = RxCalendarLogic.MonthDisplay .Model(monthControlModel, monthGridModel, daySelectionModel, self) let initialMonth = try! model!.initialMonthStream.toBlocking().first()! let initialMonth1 = try! model1.initialMonthStream.toBlocking().first()! XCTAssertEqual(initialMonth, initialMonth1) let monthControlVM = RxCalendarLogic.MonthControl.ViewModel(monthControlModel) let monthGridVM = RxCalendarLogic.MonthGrid.ViewModel(monthGridModel) let daySelectionVM = RxCalendarLogic.DaySelect.ViewModel(daySelectionModel) let viewModel1 = RxCalendarLogic.MonthDisplay.ViewModel(monthControlVM, monthGridVM, daySelectionVM, model1) viewModel!.setupAllBindingsAndSubBindings() viewModel1.setupAllBindingsAndSubBindings() XCTAssertEqual(viewModel!.weekdayStacks, viewModel1.weekdayStacks) XCTAssertEqual( try! viewModel!.dayStream.take(1).toBlocking().first(), try! viewModel1.dayStream.take(1).toBlocking().first() ) } public func test_dayStreamForCurrentMonth_shouldWorkCorrectly() { /// Setup let dayObs = scheduler!.createObserver([RxCalendarLogic.Day].self) var currentMonth = self.currentMonth! viewModel!.dayStream.subscribe(dayObs).disposed(by: disposable!) viewModel!.setupMonthDisplayBindings() viewModel!.setupMonthControlBindings() /// When for _ in 0..<iterations! { let forward = Bool.random() let jump = Int.random(1, 20) currentMonth = currentMonth.with(monthOffset: forward ? jump : -jump)! let currentDays = model!.dayRange(currentMonth) viewModel!.currentMonthReceiver.onNext(currentMonth) waitOnMainThread(waitDuration!) /// Then let lastDays = dayObs.nextElements().last! XCTAssertEqual(lastDays, currentDays) } } public func test_gridSelectionStream_shouldWorkCorrectly() { /// Setup var currentMonth = self.currentMonth! viewModel!.setupMonthDisplayBindings() viewModel!.setupMonthControlBindings() viewModel!.setupDaySelectionBindings() /// When for _ in 0..<iterations! { let forward = Bool.random() currentMonth = currentMonth.with(monthOffset: forward ? 1 : -1)! let currentDays = model!.dayRange(currentMonth) viewModel!.currentMonthReceiver.onNext(currentMonth) waitOnMainThread(waitDuration!) // This will be ignored anyway, but we add in just to check. let monthIndex = Int.random(0, 1000) let dayIndex = Int.random(0, 1000) let gridPosition = RxCalendarLogic.GridPosition(monthIndex, dayIndex) let validSelection = dayIndex < currentDays.count let selectedDay = validSelection ? currentDays[dayIndex] : nil let wasSelected = selectedDay.map({viewModel!.isDateSelected($0.date)}) ?? false viewModel!.gridSelectionReceiver.onNext(gridPosition) waitOnMainThread(waitDuration!) /// Then let lastSelections = try! allSelectionSb.value().getOrElse([]) // If the date was selected previously, it should be removed from all date // selections (thanks to single day selection logic). if let selectedDay = selectedDay { XCTAssertNotEqual( lastSelections.contains(where: {$0.contains(selectedDay.date)}), wasSelected) } } } public func test_gridSelectionIndexChanges_shouldWorkCorrectly() { /// Setup let indexChangesObs = scheduler!.createObserver(Set<Int>.self) let weekdayStacks = viewModel!.weekdayStacks let firstWeekday = model!.firstWeekday var currentMonth = self.currentMonth! viewModel!.gridDayIndexSelectionChangesStream .subscribe(indexChangesObs) .disposed(by: disposable!) viewModel!.setupMonthControlBindings() /// When for _ in 0..<iterations! { let forward = Bool.random() currentMonth = currentMonth.with(monthOffset: forward ? 1 : -1)! viewModel!.currentMonthReceiver.onNext(currentMonth) waitOnMainThread(waitDuration!) let dayRange = model!.dayRange(currentMonth) let selectedIndex = Int.random(0, weekdayStacks * RxCalendarLogic.Util.weekdayCount) let selectedDay = dayRange[selectedIndex] let wasSelected = viewModel!.isDateSelected(selectedDay.date) allSelectionReceiver.onNext(Set(arrayLiteral: RxCalendarLogic.DateSelection(selectedDay.date, firstWeekday))) waitOnMainThread(waitDuration!) /// Then let lastChanges = indexChangesObs.nextElements().last! // If this index is already selected previously, it should not appear in // in the set of index changes. // // If we look at a similar test for MonthSectionView (for grid selection // changes), we will see that an extra step (navigating to the current // month) is added. Said step is not needed here because for this view, // there will always be only 1 month active at a time, so the month index // (which is used for calculation by the DateSelection object) is fixed. XCTAssertEqual(lastChanges.contains(selectedIndex), !wasSelected) } } } extension MonthDisplayTest: RxMonthDisplayModelDependency { public var firstWeekday: Int { return firstWeekdayForTest! } public var weekdayStacks: Int { return RxCalendarLogic.Util.defaultWeekdayStacks } public var allSelectionReceiver: AnyObserver<Set<RxCalendarLogic.Selection>> { return allSelectionSb.mapObserver(Try.success) } public var allSelectionStream: Observable<Try<Set<RxCalendarLogic.Selection>>> { return allSelectionSb.asObservable() } public var initialMonthStream: Single<RxCalendarLogic.Month> { return Single.just(currentMonth!) } public var currentMonthReceiver: AnyObserver<RxCalendarLogic.Month> { return currentMonthSb.asObserver() } public var currentMonthStream: Observable<RxCalendarLogic.Month> { return currentMonthSb.asObservable() } public func isDateSelected(_ date: Date) -> Bool { return try! allSelectionSb.value() .map({$0.contains(where: {$0.contains(date)})}) .getOrElse(false) } public func highlightPart(_ date: Date) -> RxCalendarLogic.HighlightPart { return try! allSelectionSb.value() .map({RxCalendarLogic.Util.highlightPart($0, date)}) .getOrElse(.none) } public func gridSelectionChanges(_ monthComp: RxCalendarLogic.MonthComp, _ prev: Set<RxCalendarLogic.Selection>, _ current: Set<RxCalendarLogic.Selection>) -> Set<RxCalendarLogic.GridPosition> { return RxCalendarLogic.Util.defaultGridSelectionChanges(monthComp, prev, current) } }
[ -1 ]
44552039178567d1636b2e7b25629663b9457c19
702c8b6e60995b786ee32fb0a90b79bf8e9ea12b
/Sources/BIP44/CoinType.swift
1388ab83f026ac30b1316d4a44b246f1803e4acb
[ "Apache-2.0" ]
permissive
UnrealCrypto/WalletKit
40048e64249b961590c3f26c42425d2636a99087
2c1763050fba356a1f3b42f3b89d308037a25903
refs/heads/master
2023-04-29T17:39:37.911557
2021-05-07T19:32:35
2021-05-07T19:32:35
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,158
swift
import BIP32 import Base58 public protocol CoinType { var id :UInt32 { get } var symbol :String { get } func address(for privateKey: ExtendedKey, using keyDerivator: KeyDerivator.Type) throws -> String } extension CoinType { public var index: KeyIndex { .hardened(id) } } public struct AnyCoinType: CoinType { public let symbol :String public let id :UInt32 public func address(for privateKey: ExtendedKey, using keyDerivator: KeyDerivator.Type = DefaultKeyDerivator.self) throws -> String { switch symbol { case "eth", "ETH": return try keyDerivator .secp256k_1(data: privateKey.key.dropFirst(), compressed: false) .map { "0x" + $0.dropFirst().keccak256.suffix(20).hexString } .get() default: return privateKey.key.hexString } } } extension AnyCoinType { public static var ETH :AnyCoinType { AnyCoinType(symbol: "ETH", id: 60) } public static var BTC :AnyCoinType { AnyCoinType(symbol: "BTC", id: 00) } public static var TestNet :some CoinType { AnyCoinType(symbol: "", id: 01) } }
[ -1 ]
38009a8a41c9dc5f8a18c85f11fbcbf3a0e79cf6
dd362c11d7e5ff4051b97b5101fb1d03a539b9d0
/testBackgroundVideo/UIButton+Design.swift
35c2ae89015af75ec2ab2e635a18184c9c5746a1
[]
no_license
matrix01/BackgroundVideo
b22e25d47fa521abc9c5d460cfbc761b54a328a7
fdd68aa5068928ccababf919be4b666eb65d32c5
refs/heads/master
2021-01-20T14:03:40.683616
2017-05-07T19:43:18
2017-05-07T19:43:18
90,557,161
0
0
null
null
null
null
UTF-8
Swift
false
false
390
swift
// // UIButton+Design.swift // testBackgroundVideo // // Created by Milan Mia on 5/21/16. // Copyright © 2016 AAPBD. All rights reserved. // import Foundation import UIKit extension UIButton { @IBInspectable var borderColor: UIColor { get { return self.borderColor } set { layer.borderColor = borderColor.CGColor } } }
[ -1 ]
a99cd7b3ad066f989741457696a6e50b9e0e9bfe
700c6194249b260ce1e841a87d0e737cd2e974f8
/TimeFountain/API/TDAmeritrade/Instruments/InstrumentDetails.swift
1efbdc26eaa07270f421634c15de092ad5a28eaa
[]
no_license
scott-lydon/TimeFountainOriginal
132435c65c9e4c12a357e4b72404597fc0937d26
49ad9dcf0ab51b84bfbc83bbbb941cc3ea913aca
refs/heads/master
2022-11-11T13:37:19.708307
2020-06-27T07:02:58
2020-06-27T07:02:58
null
0
0
null
null
null
null
UTF-8
Swift
false
false
469
swift
// // InstrumentDetails.swift // TimeFountain // // Created by Scott Lydon on 5/21/20. // Copyright © 2020 Scott Lydon. All rights reserved. // import Foundation struct InstrumentDetails: Codable { let cusip, symbol, instrumentDetailsDescription, exchange: String let assetType: String enum CodingKeys: String, CodingKey { case cusip, symbol case instrumentDetailsDescription = "description" case exchange, assetType } }
[ -1 ]
38a2c3b34f5a37ea6184f9c8dc232aa301b97a1b
b4793dcf7989e8bdde9bcec71842c6effc8e95d1
/Swift-stickfigureGame/howtoplay2.swift
57eaf6c162709a3414ccb89d6a6578a82d8d9846
[]
no_license
Zero-77/Swift-stickfigureGamev.2
d124210ca76d50b02862d9354182a204077f94b6
37a3b48c0cdcfefc0e281e6ce5b158ff414befde
refs/heads/master
2022-07-06T02:36:59.234426
2020-05-17T05:57:34
2020-05-17T05:57:34
264,594,738
0
0
null
null
null
null
UTF-8
Swift
false
false
409
swift
// // howtoplay2.swift // Swift-stickfigureGame // // Created by 07 Zhang on 2020/5/13. // Copyright © 2020 07 Zhang. All rights reserved. // import SwiftUI struct howtoplay2: View { var body: some View { Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) } } struct howtoplay2_Previews: PreviewProvider { static var previews: some View { howtoplay2() } }
[ -1 ]
fc400aab7da0e01d0238e9592e818f3aa8ea4a00
0a2abc07a7f485b6589f5b053cde23ec79523c65
/LoadingAnimationSwift/ViewController.swift
56399255b12382afda74ec7fa551a8616c4b1a86
[ "MIT" ]
permissive
caoool/SwiftLoadingAnimation
a9e38cd33fd683484ecbcaf040d805eb816b6eb9
ac9434f8138beb9234e46e028c3f1088821a095c
refs/heads/master
2020-12-11T05:43:35.285541
2014-11-07T21:00:42
2014-11-07T21:00:45
35,649,843
1
0
null
2015-05-15T02:55:56
2015-05-15T02:55:56
null
UTF-8
Swift
false
false
2,825
swift
// // ViewController.swift // LoadingAnimationSwift // // Created by Adam Salvitti-Gucwa on 6/8/14. // Copyright (c) 2014 esgie. All rights reserved. // import UIKit class MainViewController: UIViewController { var loading = LoadingView() override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor() self.view.frame = super.view.bounds; } override func viewWillAppear(animated: Bool) { addButtons() loading.showAtCenterPointWithSize(CGPointMake(CGRectGetWidth(self.view.bounds)/2, CGRectGetHeight(self.view.bounds)/2), size: 8.0) self.view.addSubview(loading) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } func addButtons () { let buttonName = ["Start", "Stop", "Opacity", "Reset"] for name in buttonName { setupButtonsWithTitle(name) } } func setupButtonsWithTitle(title: NSString) { var button = UIButton() button.setTitle(title, forState: UIControlState.Normal) button.titleLabel?.textColor = UIColor.whiteColor() button.titleLabel?.font = preferredFont() button.backgroundColor = UIColor.lightGrayColor() switch title { case "Start": button.frame = CGRectMake(CGRectGetWidth(self.view.bounds)/2-65, CGRectGetHeight(self.view.bounds)-120, 60, 40) button.addTarget(self, action: "startAction:", forControlEvents: UIControlEvents.TouchUpInside) case "Stop": button.frame = CGRectMake(CGRectGetWidth(self.view.bounds)/2+5, CGRectGetHeight(self.view.bounds)-120, 60, 40) button.addTarget(self, action: "stopAction:", forControlEvents: UIControlEvents.TouchUpInside) case "Opacity": button.frame = CGRectMake(CGRectGetWidth(self.view.bounds)/2-65, CGRectGetHeight(self.view.bounds)-70, 60, 40) button.addTarget(self, action: "addOpacityAction:", forControlEvents: UIControlEvents.TouchUpInside) case "Reset": button.frame = CGRectMake(CGRectGetWidth(self.view.bounds)/2+5, CGRectGetHeight(self.view.bounds)-70, 60, 40) button.addTarget(self, action: "resetAction:", forControlEvents: UIControlEvents.TouchUpInside) default: break; } self.view .addSubview(button) } func preferredFont () -> (UIFont) { println("font time") return UIFont(name: "HelveticaNeue-Light", size: 14)! } func startAction(sender: UIButton) { println("start") loading.startLoading() } func stopAction(sender: UIButton) { println("stop") loading.stopLoading() } func addOpacityAction(sender: UIButton) { println("op") loading.addStartingOpacity(0.5) } func resetAction(sender: UIButton) { println("reset") loading.stopLoading() loading.addStartingOpacity(1.0) } }
[ -1 ]
719db7d57cf2c63f7f9f4332bcd54d92b7550825
8d6fe7a114f415ebf0ef348fc023511dc137e100
/HeroIMDBClient/Modules/MovieDetail/View/CustomCells/PersonsCell/PersonsCellViewModel.swift
679fa0fccc8ad3f74f10cd82850201ff2cda2304
[]
no_license
hgp691/HeroIMDBClient
44680759a54f94bb151063375cf6a784f3e12f11
2115a7d3d4668a572eeb95da61df18012386ee90
refs/heads/main
2023-03-01T03:53:22.401807
2021-02-11T20:41:01
2021-02-11T20:41:01
337,946,095
0
0
null
null
null
null
UTF-8
Swift
false
false
657
swift
// // PersonsCellViewModel.swift // HeroIMDBClient // // Created by Horacio Guzman on 9/02/21. // import Foundation class PersonsCellViewModel: TableViewCellViewModelProtocol { static var reuseID: String = "PersonsCell" static var nibName: String = "PersonsCell" private let persons: [Person] private let title: String var numerOfItems: Int { persons.count } func person(at index: Int) -> Person { persons[index] } var titleText: String { title } init(persons: [Person], title: String) { self.persons = persons self.title = title } }
[ -1 ]
55b93a7cee05e86d2aeaea526fb458d00c9dbc96
e75b5fbc1ce1f0113cce5a6fe33a3b3b6b405f04
/Swift - Tenary Operator/MyPlayground.playground/Contents.swift
e8612b3eb27ffd9e7fa409fa7f9bcfb7081e7a7b
[]
no_license
esaygiver/Swift-Library
6abc58a88e034806988b5ddb19e92fe3c1b0c3b9
319c9995b95d876bf935df115ca1d9782816be7c
refs/heads/main
2023-02-24T05:25:07.382393
2021-01-27T19:21:52
2021-01-27T19:21:52
333,530,703
1
0
null
null
null
null
UTF-8
Swift
false
false
283
swift
import Foundation func greaterThanFive(number: Int?) -> Bool { // tenary operator let result = number! > 5 ? true : false return result // if number > 5 { // return true // } else { // return false // } } greaterThanFive(number: 7)
[ -1 ]
6cd9bac87f842b0abc694ae79e3b88a6f6dd8198
f3291d776ba5df8b67197c6b76cf59fb67437094
/Pytorch-CoreML-Spectrogram/AppDelegate.swift
99254d30785e84e71d9caa95422bdb6d1741b9d5
[]
no_license
ml-illustrated/Pytorch-CoreML-Spectrogram
ad779f2462e9e8362780ceb8bcea52e64bf66d45
d0dd6c55eaf5fdcfaf00b1f036b258bd144b1ac4
refs/heads/master
2022-11-12T23:08:26.442566
2020-07-03T22:26:23
2020-07-03T22:26:23
268,439,648
11
0
null
null
null
null
UTF-8
Swift
false
false
1,421
swift
// // AppDelegate.swift // Pytorch-CoreML-Spectrogram // // Created by Gerald on 5/31/20. // Copyright © 2020 Gerald. 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, 376889, 376905, 327756, 254030, 286800, 368727, 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, 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, 336659, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 203506, 342776, 391937, 391948, 326416, 375568, 375571, 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, 245475, 155363, 245483, 155371, 409335, 155393, 155403, 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, 360438, 253943, 393212, 155646 ]
e88f334d83b6d204ebd2cd759ad32208fbf430fc
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/swift4/generated/OpenAPIClient/Classes/OpenAPIs/Models/ComAdobeCqAccountApiAccountManagementServiceProperties.swift
c6583f753dab180fb1d504a3c3d1a0610fd8c54c
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Swift
false
false
1,370
swift
// // ComAdobeCqAccountApiAccountManagementServiceProperties.swift // // Generated by openapi-generator // https://openapi-generator.tech // import Foundation public struct ComAdobeCqAccountApiAccountManagementServiceProperties: Codable { public var cqAccountmanagerTokenValidityPeriod: ConfigNodePropertyInteger? public var cqAccountmanagerConfigRequestnewaccountMail: ConfigNodePropertyString? public var cqAccountmanagerConfigRequestnewpwdMail: ConfigNodePropertyString? public init(cqAccountmanagerTokenValidityPeriod: ConfigNodePropertyInteger?, cqAccountmanagerConfigRequestnewaccountMail: ConfigNodePropertyString?, cqAccountmanagerConfigRequestnewpwdMail: ConfigNodePropertyString?) { self.cqAccountmanagerTokenValidityPeriod = cqAccountmanagerTokenValidityPeriod self.cqAccountmanagerConfigRequestnewaccountMail = cqAccountmanagerConfigRequestnewaccountMail self.cqAccountmanagerConfigRequestnewpwdMail = cqAccountmanagerConfigRequestnewpwdMail } public enum CodingKeys: String, CodingKey { case cqAccountmanagerTokenValidityPeriod = "cq.accountmanager.token.validity.period" case cqAccountmanagerConfigRequestnewaccountMail = "cq.accountmanager.config.requestnewaccount.mail" case cqAccountmanagerConfigRequestnewpwdMail = "cq.accountmanager.config.requestnewpwd.mail" } }
[ -1 ]
be828bcdba041ba1544f941172bd1675baa67f7f
944a95d89ece2f4001dcb71fea178163e0aaebc9
/SwiftLearning/Class/SortingPlayground1.16.playground/Contents.swift
ff4937ad6bb8b1f9c8b0f60ea8e8d736fa111c4c
[]
no_license
Jamaal51/SwiftProgress
1bea5d79653d28ca0df8c82b3b8f87a806eafb27
f70af528fad9f0b60c53e711679e2cb268dc804f
refs/heads/master
2021-01-10T16:30:30.707571
2016-05-11T21:32:06
2016-05-11T21:32:06
50,465,914
0
0
null
null
null
null
UTF-8
Swift
false
false
4,133
swift
//: Playground - noun: a place where people can play import UIKit var str = "Hello, playground" var arr = [4, 3, 1, 6, 9, 2, 11, 100, 55] var sortedArr = [Int]() //func bubbleSort (arr:[Int]) -> [Int]{ // //for i in 0..<arr.count { // var place = Int() // if (arr[i] > arr[i+1]){ // place = arr[i] // arr[i] = arr[i + 1] // } // sortedArr.append(i) //} // // return [Int]() // //} func bubbleSortTwo(var arr:[Int]) -> [Int]{ //inout -- pass by reference var swapped = true var temp: Int while(swapped){ swapped = false for i in 0..<arr.count-1 { if arr[i] > arr[i+1]{ temp = arr[i] arr[i] = arr[i+1] arr[i+1] = temp swapped = true } } } return arr } print(bubbleSortTwo(arr)) //&arr // cocktail sort var arrTwo = [1,4,8,5,3,2,50,35] func cocktailSort(arr:[Int]) -> [Int]{ var swapped = true var temp2: Int while(swapped){ swapped = false for i in 0..<arrTwo.count-1{ if arrTwo[i] > arrTwo[i+1]{ temp2 = arr[i] arrTwo[i] = arr[i+1] arrTwo[i+1] = temp2 for i in arrTwo.count-1...0{ if arrTwo[i-1] > arrTwo[i]{ temp2 = arr[i-1] arrTwo[i-1] = arr[i] arrTwo[i] = temp2 swapped = true } } } } } return arrTwo } //cocktailSort(arrTwo) /*Spiral Problem input: [1 2 3 4] [12 13 14 5] [11 16 15 6] [10 9 8 7] output: [1, 2, 3, ... 16] */ //func swap (arr:[Int])->[Int]{ // // var temp: [Int] // // for i in 0..<arr.count-1{ // if arr[i] > arr[i+1]{ // temp = arr[i] // arr[i] = arr[i+1] // arr[i+1] = temp // } // //} // let array1 = [[1,2,3,4], [12, 13, 15, 5], [11, 16, 15, 6], [10, 9, 8, 7]] var tempArray: [Int] var sorted = true //func sortArrays (array1:[Int]) -> [Int]{ // sorted = false // // while (sorted){ // // for i in 0...array1.count{ // bubbleSortTwo(array1[i]) // } // } // return array1 //} /* 3. You are given an array of 0s and 1s in random order. Segregate 0s on left side and 1s on right side of the array. Traverse array only once. Input array = [0, 1, 0, 1, 0, 0, 1, 1, 1, 0] Output array = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] Followup question: how much space does your algorithm use (do not count the space taken up by the input array a)? Can you revise your algorithm to use O(1) space? */ // SORTING (w/ Caleb) //inserting into sorted list func insert(x: Int, var intoSortedList xs: [Int])->[Int]{ var didInsertX = false for i in 0..<xs.count{ if (x < xs[i]){ xs.insert(x, atIndex:i) didInsertX = true break } } if !didInsertX{ xs.append(x) } return xs } insert(6, intoSortedList: [1,2,4,5]) insert(2, intoSortedList: [1,2,4,5]) insert(3, intoSortedList: [1,2,3,4]) // insertion sort func insertion_sort(xs:[Int])->[Int]{ var sortedSoFar = [Int]() for x in xs { sortedSoFar = insert(x, intoSortedList: sortedSoFar) } return sortedSoFar } insertion_sort([0,0,0,0,1,0,0]) //Selection Sort func select(xs: [Int], startingAt k: Int) -> Int{ var minIndex = k for i in (k + 1)..<xs.count{ if xs[i] < xs[minIndex]{ //we find new minimum minIndex = i } } return minIndex } select([0,1,2,3,9,5,4,6], startingAt: 4) select([8,6,7,5,3,0,9], startingAt: 0) select([0,1,2,6,3,5,4], startingAt: 3) func selection_sort(inout xs:[Int]) -> [Int]{ for sortedSoFar in 0..<xs.count{ let minIndex = select(xs, startingAt: sortedSoFar) (xs[sortedSoFar], xs[minIndex])=(xs[minIndex], xs[sortedSoFar]) } return xs } var xs = [8,6,7,5,3,0,9] selection_sort(&xs) // Bucket Sort
[ -1 ]
10f055ef00eed48f0016c1c070e3b4c6c7804911
e98c7dfdc6de133e761441e29ff7103146259fc3
/C14/MyFly/AppDelegate.swift
f7a6e4d74890b9e7d14b3c3715ea447040c45219
[]
no_license
istar0me/106b-swift-game-sample
410dd13a0d55526f7424f91f4451773f95e49804
240461676b69170e6fdcd61f7cf28a46590e0b1a
refs/heads/master
2020-03-06T18:49:28.464006
2018-06-06T03:25:59
2018-06-06T03:25:59
127,014,786
0
1
null
null
null
null
UTF-8
Swift
false
false
2,162
swift
// // AppDelegate.swift // MyFly // // Created by Powen Ko on 3/11/15. // Copyright (c) 2015 Powen Ko. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 286774, 286776, 319544, 204856, 229432, 286778, 352318, 286791, 237640, 278605, 286797, 311375, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 327814, 131209, 303241, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 286916, 286922, 286924, 286926, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 286962, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 278983, 319945, 278986, 278990, 278994, 311767, 279003, 279006, 188895, 287202, 279010, 279015, 172520, 279020, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 320007, 287238, 172552, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 189039, 295538, 172660, 189040, 189044, 287349, 287355, 287360, 295553, 295557, 311942, 303751, 287365, 352905, 311946, 279178, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 287390, 303773, 164509, 172705, 287394, 172702, 303780, 172707, 287398, 295583, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 328381, 287423, 328384, 279231, 287427, 312006, 107208, 107212, 172748, 287436, 287440, 295633, 172755, 303827, 279255, 287450, 303835, 279258, 189149, 303838, 213724, 279267, 295654, 279272, 312048, 230128, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 303914, 279340, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 303991, 303997, 295806, 295808, 304005, 304007, 320391, 213895, 304009, 304011, 304013, 279438, 189325, 213902, 189329, 295822, 189331, 304019, 295825, 58262, 304023, 279452, 234648, 279461, 279462, 304042, 213931, 304055, 230327, 287675, 197564, 304063, 238528, 304065, 213954, 189378, 156612, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 295949, 197645, 230413, 320528, 140312, 295961, 238620, 304164, 304170, 238641, 238652, 238655, 230465, 238658, 296004, 132165, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 296259, 378181, 296262, 230727, 296264, 238919, 320840, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 279929, 181631, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 288214, 280021, 239064, 329177, 288217, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 321022, 206336, 402942, 296446, 296450, 230916, 230919, 304651, 370187, 304653, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 239202, 370279, 312938, 280183, 280185, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 280276, 321239, 280283, 18140, 313052, 288478, 313055, 321252, 313066, 280302, 288494, 313073, 419570, 288499, 321266, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 124817, 280468, 239510, 280473, 124827, 247709, 214944, 313258, 321458, 296883, 124853, 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, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 280681, 313451, 223341, 280687, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 321740, 313548, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 280919, 248153, 215387, 354653, 313700, 313705, 280937, 190832, 280946, 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, 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, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 314029, 314033, 240309, 133817, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 338823, 322440, 314249, 240519, 183184, 240535, 289687, 224151, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 322563, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 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, 216303, 322801, 388350, 363802, 199976, 199978, 314671, 298292, 298294, 216376, 298306, 380226, 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, 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, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 192008, 323084, 282127, 290321, 282130, 282133, 290325, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 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, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 315190, 241464, 282425, 159545, 298811, 307009, 413506, 307012, 298822, 315211, 307027, 315221, 282454, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 241581, 241583, 323504, 241586, 282547, 241588, 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, 282645, 241693, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 184486, 307370, 307372, 307374, 307376, 323763, 176311, 299191, 307385, 307386, 258235, 307388, 176316, 307390, 184503, 299200, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 299225, 233701, 307432, 282881, 282893, 291089, 282906, 291104, 233766, 282931, 307508, 315701, 332086, 307510, 307512, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 276052, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 291231, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 299440, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127431, 315856, 176592, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127474, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 233994, 135689, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 135844, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 201444, 299750, 283368, 234219, 283372, 381677, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 348950, 201496, 234264, 234266, 291608, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 201557, 185173, 234329, 234333, 308063, 234336, 234338, 349027, 242530, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 201603, 234373, 316294, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 226200, 234398, 291742, 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, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 308291, 316483, 234563, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 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, 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, 177419, 300299, 242957, 283917, 300301, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 284010, 324978, 136562, 275834, 333178, 275836, 275840, 316803, 316806, 316811, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 284215, 316983, 194103, 284218, 226877, 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, 284258, 292452, 292454, 284263, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 284290, 325250, 284292, 292485, 292479, 276098, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 276166, 284358, 358089, 284362, 276170, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 325408, 300832, 300834, 284449, 317221, 227109, 358183, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 153417, 292681, 276308, 284502, 317271, 276315, 292700, 284511, 227175, 292715, 300912, 284529, 292721, 300915, 292729, 317306, 284540, 292734, 325512, 276365, 358292, 284564, 317332, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 276464, 178161, 227314, 276466, 350200, 276472, 317435, 276476, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 243733, 317468, 243740, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 276539, 235581, 178238, 325692, 276544, 243779, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350302, 227423, 194654, 178273, 309346, 194657, 309348, 350308, 309350, 227426, 309352, 350313, 309354, 301163, 350316, 194660, 227430, 276583, 276590, 350321, 284786, 276595, 301167, 350325, 227440, 350328, 292985, 301178, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 309455, 276689, 309462, 301272, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 276789, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 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, 342541, 113167, 277011, 309779, 317971, 309781, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 23094, 277054, 219714, 129603, 318020, 301636, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 342707, 318132, 154292, 293555, 277173, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 301884, 310080, 293696, 277317, 277322, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 310134, 15224, 236408, 277368, 416639, 416640, 113538, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293820, 203715, 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, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 310336, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 310355, 293971, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 302205, 285821, 392326, 285831, 253064, 302218, 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, 204023, 228601, 204026, 228606, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 113964, 285997, 384302, 285999, 113969, 318773, 318776, 286010, 417086, 286016, 302403, 294211, 384328, 146765, 294221, 326991, 294223, 179547, 146784, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 310659, 351619, 294276, 327046, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 228776, 277932, 310703, 310710, 130486, 310712, 310715, 302526, 228799, 302534, 245191, 310727, 64966, 163272, 292968, 302541, 302543, 310737, 228825, 163290, 310749, 310755, 187880, 310764, 286188, 310772, 40440, 212472, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 302617, 286233, 302621, 187936, 146977, 187939, 40484, 294435, 40486, 286246, 40488, 278057, 245288, 40491, 294439, 294440, 294443, 310831, 294445, 40499, 212538, 40507, 40511, 228933, 40521, 286283, 40525, 40527, 400976, 212560, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 294521, 343679, 310925, 286354, 278163, 122517, 278168, 179870, 327333, 229030, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 302793, 294601, 343757, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 278238, 229086, 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, 294776, 294785, 327554, 360322, 40851, 294811, 319390, 40865, 319394, 294817, 311209, 180142, 294831, 188340, 40886, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
f2a8e271530b76626c2af7b68b312632dbc92970
3366465541cc241750a3fc07ced6b1c4ac15647e
/Football Leagues App/Football Leagues App/Networking/Local/LeagueDataHelper.swift
3a804bc842d49b93b62a0d6ec28c33c080e3da1f
[]
no_license
KarimEbrahemAbdelaziz/Football-Leagues-Application
3b248736b5c6a9a951b8380ad0fe11c777d0e8e5
748ea998a25afacdb70577e20dd0a80ff398bc41
refs/heads/master
2020-04-02T13:03:54.550416
2018-07-01T04:40:02
2018-07-01T04:40:02
154,465,415
0
0
null
null
null
null
UTF-8
Swift
false
false
2,786
swift
// // LeagueDataHelper.swift // Football Leagues App // // Created by Karim Ebrahem on 6/30/18. // Copyright © 2018 Karim Ebrahem. All rights reserved. // import Foundation import SQLite class LeagueDataHelper: DataHelperProtocol { private let table = Table("Leagues") private let leagueTeamsUrl = Expression<String>("leagueTeamsUrl") private let caption = Expression<String>("caption") private let leagueShort = Expression<String>("league") private let numberOfTeams = Expression<Int>("numberOfTeams") private let numberOfGames = Expression<Int>("numberOfGames") typealias T = League init() { createTable() } private func createTable() { guard let DB = LocalLeagueManager.sharedInstance.dbConnection else { return } do { let _ = try DB.run( table.create(ifNotExists: true) { table in table.column(leagueTeamsUrl) table.column(caption, unique: true) table.column(leagueShort) table.column(numberOfTeams) table.column(numberOfGames) }) } catch _ { // Error throw if table already exists } } func insert(item: T) { guard let DB = LocalLeagueManager.sharedInstance.dbConnection else { return } let insert = table.insert(or: .replace, leagueTeamsUrl <- item.leagueTeamsUrl, caption <- item.caption, leagueShort <- item.league, numberOfTeams <- item.numberOfTeams, numberOfGames <- item.numberOfGames) do { let rowId = try DB.run(insert) guard rowId > 0 else { throw DataAccessError.Insert_Error } } catch _ { } } func findAll() -> [T] { guard let DB = LocalLeagueManager.sharedInstance.dbConnection else { return [] } var leagues = [T]() let items = try! DB.prepare(table) for item in items { leagues.append(League(leagueTeamsUrl: item[leagueTeamsUrl], caption: item[caption], league: item[leagueShort], numberOfTeams: item[numberOfTeams], numberOfGames: item[numberOfGames])) } return leagues } func drop() { guard let DB = LocalLeagueManager.sharedInstance.dbConnection else { return } do { try DB.run(table.drop(ifExists: true)) } catch _ { } } }
[ -1 ]
731868ee1ee1ade16ccf93a04020d646d2d4f980
666d25a7cd5175dd9340eefe380de37514fb07eb
/MemeMe/MemeEditorViewController.swift
ab4c433090d52411146dcd664e0f049155f6d486
[]
no_license
iankennedy87/MemeMe
00c6bb2ca4edd08eb68e187210da27ea8d8a8acd
38acf76185751e15628ea0632275b49e57a91771
refs/heads/master
2021-01-10T10:17:34.325965
2016-01-23T22:53:44
2016-01-23T22:53:44
46,599,891
0
0
null
null
null
null
UTF-8
Swift
false
false
8,298
swift
// // ViewController.swift // MemeMe // // Created by Ian Kennedy on 11/5/15. // Copyright © 2015 Udacity. All rights reserved. // import UIKit class MemeEditorViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextFieldDelegate { let memeTextAttributes = [ NSStrokeColorAttributeName : UIColor.blackColor(), NSForegroundColorAttributeName : UIColor.whiteColor(), NSFontAttributeName : UIFont(name: "HelveticaNeue-CondensedBlack", size: 40)!, NSStrokeWidthAttributeName : NSNumber(float: -5) ] let topTextFieldDelegate = TextFieldDelegate() let bottomTextFieldDelegate = TextFieldDelegate() @IBOutlet weak var topToolbar: UIToolbar! @IBOutlet weak var bottomToolbar: UIToolbar! @IBOutlet weak var pickerImageView: UIImageView! @IBOutlet weak var cameraButton: UIBarButtonItem! @IBOutlet weak var shareButton: UIBarButtonItem! @IBOutlet weak var topTextField: UITextField! @IBOutlet weak var bottomTextField: UITextField! var memedImage: UIImage! var toolbarsAreHidden: Bool = false var topTextIsDefault: Bool = true var isFromDetailView: Bool = false var meme: Meme! var testVariable: String! override func viewDidLoad() { super.viewDidLoad() // tabBarController?.tabBar.hidden = true // navigationController?.navigationBarHidden = true shareButton.enabled = false cameraButton.enabled = UIImagePickerController.isSourceTypeAvailable(.Camera) prepareTextFields() } override func prefersStatusBarHidden() -> Bool { return true } override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) tabBarController?.tabBar.hidden = true navigationController?.navigationBarHidden = true if isFromDetailView { topTextField.text = meme.topText bottomTextField.text = meme.bottomText pickerImageView.image = meme.originalImage isFromDetailView = false } subscribeToKeyboardNotifications() } override func viewWillDisappear(animated: Bool) { super.viewWillDisappear(animated) tabBarController?.tabBar.hidden = false navigationController?.navigationBarHidden = false unsubscribeFromKeyboardNotifications() } @IBAction func pickAnImage(sender: UIBarButtonItem) { let pickerController = UIImagePickerController() pickerController.delegate = self pickerController.sourceType = .PhotoLibrary presentViewController(pickerController, animated: true, completion: nil) } @IBAction func pickAnImageFromCamera(sender: UIBarButtonItem) { let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType = .Camera presentViewController(imagePicker, animated: true, completion: nil) } @IBAction func shareMeme(sender: UIBarButtonItem) { memedImage = generateMemedImage() let activityViewController = UIActivityViewController( activityItems: [memedImage as UIImage], applicationActivities: nil) activityViewController.completionWithItemsHandler = {(activityType, completed, items, error) in if completed { self.save() self.dismissViewControllerAnimated(true, completion: nil) } else { return } } presentViewController(activityViewController, animated: true, completion: nil) } @IBAction func cancelMeme(sender: UIBarButtonItem) { shareButton.enabled = false pickerImageView.image = nil prepareTextFields() navigationController?.popToRootViewControllerAnimated(true) // tabBarController?.tabBar.hidden = false // navigationController?.navigationBarHidden = false } func prepareTextFields() { topTextField.text = "TOP" bottomTextField.text = "BOTTOM" topTextField.delegate = self bottomTextField.delegate = bottomTextFieldDelegate topTextIsDefault = true bottomTextFieldDelegate.textIsDefault = true topTextField.defaultTextAttributes = memeTextAttributes bottomTextField.defaultTextAttributes = memeTextAttributes topTextField.textAlignment = NSTextAlignment.Center bottomTextField.textAlignment = NSTextAlignment.Center } func textFieldShouldBeginEditing(textField: UITextField) -> Bool { if bottomTextField.isFirstResponder() { return false } return true } func textFieldDidBeginEditing(textField: UITextField) { textField.autocorrectionType = UITextAutocorrectionType.No if topTextIsDefault { textField.text = "" topTextIsDefault = false } } func textFieldShouldReturn(textField: UITextField) -> Bool { textField.resignFirstResponder() return true; } func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) { if let image = info["UIImagePickerControllerOriginalImage"] as? UIImage { pickerImageView.image = image shareButton.enabled = true } dismissViewControllerAnimated(true, completion: nil) } func imagePickerControllerDidCancel(picker: UIImagePickerController) { dismissViewControllerAnimated(true, completion: nil) } func subscribeToKeyboardNotifications() { NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillShow:" , name: UIKeyboardWillShowNotification, object: nil) NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillHide:" , name: UIKeyboardWillHideNotification, object: nil) } func unsubscribeFromKeyboardNotifications() { NSNotificationCenter.defaultCenter().removeObserver(self, name: UIKeyboardWillShowNotification, object: nil) NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillHide:" , name: UIKeyboardWillHideNotification, object: nil) } func keyboardWillShow(notification: NSNotification) { if bottomTextField.isFirstResponder() { view.frame.origin.y = getKeyboardHeight(notification) * -1 } } func keyboardWillHide(notification: NSNotification) { view.frame.origin.y = 0 } func getKeyboardHeight(notification: NSNotification) -> CGFloat { let userInfo = notification.userInfo let keyboardSize = userInfo![UIKeyboardFrameEndUserInfoKey] as! NSValue // of CGRect return keyboardSize.CGRectValue().height } func save() { //Create the meme let meme = Meme(topText : topTextField.text!, bottomText : bottomTextField.text!, originalImage: pickerImageView.image!, memedImage: memedImage) let object = UIApplication.sharedApplication().delegate let appDelegate = object as! AppDelegate appDelegate.memes.append(meme) } func generateMemedImage() -> UIImage { //hide toolbars toggleToolbars() //generate image UIGraphicsBeginImageContext(view.frame.size) view.drawViewHierarchyInRect(view.frame, afterScreenUpdates: true) let memedImage : UIImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() //show toolbars toggleToolbars() return memedImage } func toggleToolbars() { if toolbarsAreHidden { topToolbar.hidden = false bottomToolbar.hidden = false toolbarsAreHidden = false } else { topToolbar.hidden = true bottomToolbar.hidden = true toolbarsAreHidden = true } } }
[ -1 ]
aa269cd56b070fe591abce6b916e070bc7ea3855
ae9639ed032111153d6ccd4370b92bca7a47ec87
/FinanceAndCredit/CreditNetworkRequest.swift
4ec15ada231243859cb02faf649ebcfe06d51086
[]
no_license
wangghon/Swift_SelfLearning
f0a772e99051ac942bd3ae5b4cf4f0d917b1277f
85cd28588593fd2dc6db36a629ca623ec4b66f0b
refs/heads/master
2020-01-23T22:00:59.444545
2016-11-25T00:50:09
2016-11-25T00:50:09
74,713,816
0
0
null
null
null
null
UTF-8
Swift
false
false
595
swift
// // CreditNetworkRequest.swift // FinanceAndCredit // // Created by HB on 16/8/25. // Copyright © 2016年 whb. All rights reserved. // import Foundation let kStringCreditUrl = "https://www.baifubao.com/walletapp/umoney/queryumoneylist" class CreditNetworkRequest: BaseNetworkRequest { override var url: String { get { return kStringCreditUrl } } override var params: [String: String] { get { var pms = super.params pms["cate[app_youqianhua]"] = "" return pms } } }
[ -1 ]
8489c510f15ab56c05356024943d7638a31cd65a
2c48c5db05e9f1690fad9ce9ba4dbe84d06ee99c
/StarWarsAnimatedTransitioning/StarWarsAnimatedTransitioning.swift
42bde0b6aed31f1c2519443ef7d87b951c3b81b4
[ "MIT" ]
permissive
hlebowicz/StarWarsAnimatedTransitioning
2986ab3741daaf7178e60c5eec7a982eacc139ae
f0a85268c87a19ca996654939549e57e18e53cee
refs/heads/master
2021-01-12T22:22:25.789145
2014-12-28T00:29:48
2014-12-28T00:29:48
28,741,822
1
0
null
2015-01-03T11:18:08
2015-01-03T11:18:08
null
UTF-8
Swift
false
false
7,642
swift
// // StarWarsAnimatedTransitioning.swift // // Created by Ivan Konov on 12/18/14. // //The MIT License (MIT) // //Copyright (c) 2014 Ivan Konov // //Permission is hereby granted, free of charge, to any person obtaining a copy //of this software and associated documentation files (the "Software"), to deal //in the Software without restriction, including without limitation the rights //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //copies of the Software, and to permit persons to whom the Software is //furnished to do so, subject to the following conditions: // //The above copyright notice and this permission notice shall be included in all //copies or substantial portions of the Software. // //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE //SOFTWARE. import UIKit enum StarWarsTransitionDirection: String { case Right = "Right" case Left = "Left" case Up = "Up" case Down = "Down" } enum StarWarsOperation: String { case Present = "Present" case Dismiss = "Dismiss" } class StarWarsAnimatedTransitioning: NSObject, UIViewControllerAnimatedTransitioning { var duration: NSTimeInterval = 0.65 var transitionOperation: StarWarsOperation = .Present var transitionDirection: StarWarsTransitionDirection = .Right // MARK: Objective-C Support class func presentTransitionOperation() -> String { return StarWarsOperation.Present.rawValue } class func dismissTransitionOperation() -> String { return StarWarsOperation.Dismiss.rawValue } class func rightTransitionDirection() -> String { return StarWarsTransitionDirection.Right.rawValue } class func leftTransitionDirection() -> String { return StarWarsTransitionDirection.Left.rawValue } class func upTransitionDirection() -> String { return StarWarsTransitionDirection.Up.rawValue } class func downTransitionDirection() -> String { return StarWarsTransitionDirection.Down.rawValue } var operation: String? { didSet { if operation != nil { if let transitionOperation = StarWarsOperation(rawValue: operation!) { self.transitionOperation = transitionOperation } } } } var direction: String? { didSet { if direction != nil { if let transitionDirection = StarWarsTransitionDirection(rawValue: direction!) { self.transitionDirection = transitionDirection } } } } // MARK: Implementation func transitionDuration(transitionContext: UIViewControllerContextTransitioning) -> NSTimeInterval { return duration } func animateTransition(transitionContext: UIViewControllerContextTransitioning) { let fromController = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey) let toController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey) let containerView = transitionContext.containerView() var animatedLayer: CALayer! if transitionOperation == .Present { animatedLayer = toController?.view.layer containerView.addSubview(toController!.view) } else { animatedLayer = fromController!.view.layer } setUpAnimationWithLayer(animatedLayer!) { if self.transitionOperation == .Dismiss { fromController!.view.removeFromSuperview() } transitionContext.completeTransition(true) } } private func setUpAnimationWithLayer(layer: CALayer, completion: () -> Void) { let maskLayer = CALayer() maskLayer.backgroundColor = UIColor.whiteColor().CGColor // the actual color is isrrelevant; all we need is the alpha channel layer.mask = maskLayer let (initalFrame, finalPosition) = maskFrameAndPositionForLayer(layer) maskLayer.frame = initalFrame performTransitionWithLayer(layer, finalPosition: finalPosition, completion: completion) } private func maskFrameAndPositionForLayer(layer: CALayer) -> (CGRect, CGPoint){ var initialMaskFrame: CGRect! var finalPosition: CGPoint! switch transitionDirection { case .Right: if transitionOperation == .Present { initialMaskFrame = layer.bounds initialMaskFrame.origin.x -= CGRectGetWidth(initialMaskFrame) finalPosition = layer.position } else { initialMaskFrame = layer.bounds finalPosition = layer.position finalPosition.x += CGRectGetWidth(layer.bounds) } case .Left: if transitionOperation == .Present { initialMaskFrame = layer.bounds initialMaskFrame.origin.x += CGRectGetWidth(initialMaskFrame) finalPosition = layer.position } else { initialMaskFrame = layer.bounds finalPosition = layer.position finalPosition.x -= CGRectGetWidth(layer.bounds) } case .Up: if transitionOperation == .Present { initialMaskFrame = layer.bounds initialMaskFrame.origin.y += CGRectGetHeight(layer.bounds) finalPosition = layer.position } else { initialMaskFrame = layer.bounds finalPosition = layer.position finalPosition.y -= CGRectGetHeight(layer.bounds) } case .Down: if transitionOperation == .Present { initialMaskFrame = layer.bounds initialMaskFrame.origin.y -= CGRectGetHeight(layer.bounds) finalPosition = layer.position } else { initialMaskFrame = layer.bounds finalPosition = layer.position finalPosition.y += CGRectGetHeight(layer.bounds) } } return (initialMaskFrame, finalPosition) } private func performTransitionWithLayer(layer: CALayer, finalPosition: CGPoint, completion: () -> Void) { CATransaction.setCompletionBlock { // clean up layer.mask = nil completion() } let animation = CABasicAnimation(keyPath: "position") animation.duration = duration animation.fromValue = NSValue(CGPoint: layer.mask.position) animation.toValue = NSValue(CGPoint: finalPosition) layer.mask.addAnimation(animation, forKey: "position") // make sure the screen will not blink due to mask layer going back to it's position set in the model layer.mask.position = finalPosition } }
[ -1 ]
a971db3040ea8f738b41b15e1157f398651fd8c5
d0446842aaccdbb75491dd745452ccc8a1bf5bb6
/locationsaver/DebugViewController.swift
dd0b9428c791da06e5caee69493f3f65aba33009
[]
no_license
buremer/locationsaver
79fbac34f4b74bb0b229d1164238e8f8d5cef710
a6131734ecd6d23d4eb8f8742505c2d792f7d5e4
refs/heads/master
2021-01-22T12:26:32.206776
2015-11-04T08:43:31
2015-11-04T08:43:31
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,453
swift
// // DebugViewController.swift // locationsaver // // Created by Peter Alserda on 04/10/15. // Copyright © 2015 Peter Alserda. All rights reserved. // import UIKit class DebugViewController : UITableViewController { let locationManager = LocationController() var timer : NSTimer? = nil override func viewDidLoad() { super.viewDidLoad() timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: "refreshTable", userInfo: nil, repeats: true) tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell") } override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return Debugger.messages.count } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("cell") cell?.textLabel?.text = Debugger.messages[indexPath.row] cell?.textLabel?.font = UIFont.systemFontOfSize(15) return cell! } override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { print ("Nu geselecteerd is: \(indexPath.row)") } func refreshTable() { tableView.reloadData() } }
[ -1 ]
882b108fd3229fd2f72088fb9f8b93ca053c0c51
1204a9de261f8846017dad845d3416c4c99ece72
/NYTimesAppTests/ArticleServiceParamsSpec.swift
ccfa50a4ebdb1fd20e9f6f519d5a06b93e59bfcb
[]
no_license
marutharaj/NYTimes
50187a6478abc798ab8645d2a26be9d7ae3fc25e
5fa897fd027a6d3c9bfe15204826457b03aeef2e
refs/heads/master
2020-06-21T07:40:22.275182
2019-07-18T17:17:42
2019-07-18T17:17:42
197,384,686
0
0
null
null
null
null
UTF-8
Swift
false
false
1,894
swift
// // ArticleServiceParamsSpec.swift // NYTimesAppTests // // Created by Apple on 7/18/19. // Copyright © 2019 ta. All rights reserved. // import Foundation import Quick import Nimble @testable import NYTimesApp class ArticleServiceParamsSpec: QuickSpec { override func spec() { var subject: ArticleServiceParams! describe("Verify article service params") { context("When user select period as 1") { beforeEach { subject = ArticleServiceParams(period: 1) } it("should get the correct article service params") { expect(subject.httpMethod == .GET) == true expect(subject.path) == "1.json?api-key=\(ServiceConfiguration.apiKey)" } } context("When user select period as 7") { beforeEach { subject = ArticleServiceParams(period: 7) } it("should get the correct article service params") { expect(subject.httpMethod == .GET) == true expect(subject.path) == "7.json?api-key=\(ServiceConfiguration.apiKey)" } } context("When user select period as 30") { beforeEach { subject = ArticleServiceParams(period: 30) } it("should get the correct article service params") { expect(subject.httpMethod == .GET) == true expect(subject.path) == "30.json?api-key=\(ServiceConfiguration.apiKey)" } } } } }
[ -1 ]
9b1b054735848ca4f0f35f67fd54d0450816d382
82be3408866b24a8df9d155b4b1e8239ed43d0aa
/michi/SigninViewController.swift
9fa8f43cd8006fca66f41ec2e46f676d376c9d1c
[]
no_license
michelsch/michi
9ba66c81f01646049788332c79293cd14e1a9096
3738a0d42fe7cdd4795cf4b2a5479ea3b0df8b99
refs/heads/master
2021-07-25T14:50:56.713384
2017-11-07T07:38:13
2017-11-07T07:38:13
109,802,306
0
0
null
null
null
null
UTF-8
Swift
false
false
2,396
swift
// // SigninViewController.swift // michi // // Created by Michel Schoemaker on 5/24/16. // Copyright © 2016 Michel Schoemaker. All rights reserved. // import UIKit import Firebase import FirebaseDatabase class SigninViewController: UIViewController, UITextFieldDelegate { @IBOutlet private weak var emailField: UITextField! @IBOutlet private weak var passwordField: UITextField! @IBOutlet private weak var activityIndicator: UIActivityIndicatorView! @IBOutlet private weak var signinButton: UIButton! @IBOutlet private weak var errorMessage: UILabel! override func viewDidLoad() { super.viewDidLoad() if let _ = FIRAuth.auth()?.currentUser { // User is signed in. performSegueWithIdentifier("toTabView", sender: nil) } activityIndicator.hidden = true emailField.delegate = self; passwordField.delegate = self; } //atempts to sign a user in, segues to next view if successful, otherwise display error message @IBAction private func attemptSignin(sender: AnyObject) { self.errorMessage.hidden = true activityIndicator.hidden = false activityIndicator.startAnimating() signinButton.hidden = true if let email = emailField.text { if let password = passwordField.text { //use Firebase to authenticate FIRAuth.auth()?.signInWithEmail(email, password: password) { (user, error) in self.activityIndicator.stopAnimating() if error != nil { self.activityIndicator.hidden = true self.signinButton.hidden = false self.errorMessage.hidden = false self.textFieldShouldReturn(self.passwordField) } else { //segue to main view self.performSegueWithIdentifier("toTabView", sender: nil) } } } } } //function from http://stackoverflow.com/questions/24180954/how-to-hide-keyboard-in-swift-on-pressing-return-key func textFieldShouldReturn(textField: UITextField) -> Bool { self.view.endEditing(true) return false } @IBAction func unwindToViewController (sender: UIStoryboardSegue){ } }
[ -1 ]
d46e86a96467d3ed1b6ebab0dcd968a64718e386
92b76840d95a05c627b24ae2b9223b8154c02279
/MotelNetwork/Controller/TableViewHelper.swift
445ebd424d7aaa3e9eebfbeac552db2977260ab8
[]
no_license
nannymcphee/MotelNetwork
df6434b4a806dff777b6c98c7d9c17f981b5582c
748c7f411cfd1b2096f43cf5a67ad8519a9279d7
refs/heads/master
2020-03-07T16:49:13.234737
2018-06-25T02:14:40
2018-06-25T02:14:40
126,653,566
0
0
null
null
null
null
UTF-8
Swift
false
false
2,950
swift
// // TableViewHelper.swift // Motel Network // // Created by Nguyên Duy on 5/25/18. // Copyright © 2018 Nguyên Duy. All rights reserved. // import Foundation import UIKit extension UITableView { func setEmptyMessage(_ message: String) { guard self.numberOfRows() == 0 else { return } let messageLabel = UILabel(frame: CGRect(x: 0, y: 0, width: self.bounds.size.width, height: self.bounds.size.height)) messageLabel.text = message messageLabel.textColor = UIColor.lightGray messageLabel.numberOfLines = 0 messageLabel.textAlignment = .center messageLabel.font = UIFont(name: "HelveticaNeue-Light", size: 16.0) messageLabel.sizeToFit() self.backgroundView = messageLabel; self.separatorStyle = .none; } func showEmptyDataView(message: String, image: UIImage) { guard self.numberOfRows() == 0 else { return } let bgView = UIView(frame: CGRect(x: 0, y: 0, width: self.bounds.size.width, height: self.bounds.size.height)) let stackView = UIStackView() stackView.axis = .vertical stackView.distribution = .equalSpacing stackView.alignment = .center stackView.spacing = 10 let emptyImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 140, height: 140)) emptyImageView.translatesAutoresizingMaskIntoConstraints = false emptyImageView.widthAnchor.constraint(equalToConstant: 140).isActive = true emptyImageView.heightAnchor.constraint(equalToConstant: 140).isActive = true emptyImageView.image = image let messageLabel = UILabel(frame: CGRect(x: 0, y: 0, width: self.bounds.size.width, height: self.bounds.size.height)) messageLabel.text = message messageLabel.textColor = UIColor.lightGray messageLabel.numberOfLines = 0 messageLabel.textAlignment = .center messageLabel.lineBreakMode = .byWordWrapping messageLabel.font = UIFont(name: "HelveticaNeue-Light", size: 16.0) messageLabel.sizeToFit() stackView.addArrangedSubview(emptyImageView) stackView.addArrangedSubview(messageLabel) bgView.addSubview(stackView) stackView.translatesAutoresizingMaskIntoConstraints = false stackView.centerXAnchor.constraint(equalTo: bgView.centerXAnchor).isActive = true stackView.centerYAnchor.constraint(equalTo: bgView.centerYAnchor).isActive = true self.backgroundView = bgView } func restore() { self.backgroundView = nil self.separatorStyle = .singleLine } public func numberOfRows() -> Int { var section = 0 var rowCount = 0 while section < numberOfSections { rowCount += numberOfRows(inSection: section) section += 1 } return rowCount } }
[ -1 ]
d5ced55e19ca128901d62553560746dfe1bd1fba
b1031a5660091576d71d53a52df4e73e1af90af7
/artableadmin/Controller/SceneDelegate.swift
0187f1a904edaaaed01d7bb52f85d332816e2c16
[]
no_license
kubwensu/Artable-Master
270ad0f6b27010f7810629bf5b768becad756244
8bc980a4f9584ec45fd7ef682ac5bda9fed5d71f
refs/heads/master
2022-09-07T06:18:08.559441
2020-05-27T19:15:41
2020-05-27T19:15:41
267,406,859
0
0
null
null
null
null
UTF-8
Swift
false
false
2,361
swift
// // SceneDelegate.swift // artableadmin // // Created by Kubwensu mambwe on 2019/12/15. // Copyright © 2019 Kubwensu mambwe. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 16444, 393277, 376906, 327757, 254032, 286804, 368728, 254045, 368736, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 180432, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 336124, 385281, 336129, 262405, 180491, 336140, 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, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 98819, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 418508, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 386070, 271382, 336922, 345119, 377888, 328747, 214060, 345134, 345139, 361525, 361537, 377931, 197708, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 337048, 345247, 361645, 345268, 337076, 402615, 361657, 402636, 328925, 165086, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 115973, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 419360, 370208, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 403139, 337607, 419528, 419531, 272083, 394967, 419543, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 362274, 378664, 354107, 345916, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 247760, 346064, 346069, 329699, 354275, 190440, 247790, 354314, 346140, 337980, 436290, 395340, 378956, 436307, 338005, 329816, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 346317, 411862, 256214, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 272787, 354728, 338353, 338363, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 338661, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 330612, 330643, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 330750, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 331089, 437588, 396634, 175451, 437596, 429408, 175458, 208228, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 175487, 249215, 175491, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 339401, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 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, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 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, 356631, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250203, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 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, 340639, 258723, 332455, 332460, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 430940, 357212, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 119675, 340859, 324476, 430973, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 366173, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 267929, 333472, 333512, 259789, 358100, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333593, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 399222, 325494, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 334047, 350449, 375027, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 342431, 375209, 326059, 375220, 342453, 334263, 326087, 358857, 195041, 334312, 104940, 375279, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 244309, 334425, 326240, 375401, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 384099, 384102, 384108, 367724, 326764, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 384189, 384192, 351424, 343232, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 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, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 343399, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 155241, 138865, 155255, 155274, 368289, 245410, 425639, 245415, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 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, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
8f828a35e8f2a30f567bd5a65ab871bcd312fa3c
2fc40c7dd1e1360c9f1613eef971f765e616758b
/Swift Vocabulary/SceneDelegate.swift
22f5b3e889622cdd418e2c22b41cac59160fa4e6
[]
no_license
kennethjones1991/SwiftVocabulary
79e371920e890f3413277d10888ce0445b3da1ec
5b8c3490e3ab9cd4b595bab475e1ee9f241b62cb
refs/heads/master
2021-05-27T02:29:00.660627
2020-04-08T23:46:05
2020-04-08T23:46:05
254,205,571
0
0
null
2020-04-08T21:33:50
2020-04-08T21:33:49
null
UTF-8
Swift
false
false
2,357
swift
// // SceneDelegate.swift // Swift Vocabulary // // Created by Kenneth Jones on 4/8/20. // Copyright © 2020 Kenneth Jones. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 344103, 393260, 393269, 213049, 376890, 385082, 16444, 393277, 376906, 327757, 254032, 286804, 368728, 254045, 368736, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 180432, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 336124, 385281, 336129, 262405, 180491, 164107, 336140, 262417, 368913, 262423, 377118, 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, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 98819, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 270922, 385610, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 377473, 336513, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 386004, 345046, 386012, 386019, 328690, 435188, 328703, 328710, 418822, 328715, 377867, 361490, 386070, 336922, 345119, 377888, 328747, 345134, 345139, 361525, 361537, 377931, 197708, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 410746, 361594, 214150, 345224, 386187, 337048, 345247, 361645, 337072, 345268, 337076, 402615, 361657, 402636, 328925, 165086, 165092, 222438, 386286, 328942, 386292, 206084, 115973, 328967, 345377, 353572, 345380, 345383, 263464, 337207, 345400, 378170, 369979, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 370208, 419360, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 419404, 353868, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 419518, 403139, 337607, 419528, 419531, 419536, 272083, 394967, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 362274, 378664, 354107, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 337751, 247639, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 346064, 247760, 346069, 329699, 354275, 190440, 247790, 354314, 346140, 337980, 436290, 378956, 395340, 436307, 338005, 329816, 100454, 329833, 329853, 329857, 329868, 329886, 411806, 346273, 362661, 100525, 379067, 387261, 256193, 395467, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 354728, 338353, 338363, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 330612, 330643, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 330750, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 339199, 396552, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 331089, 396634, 175451, 437596, 429408, 175458, 208228, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 249215, 175487, 249219, 175491, 249225, 249228, 249235, 175514, 175517, 396703, 175523, 355749, 396723, 388543, 380353, 216518, 339401, 380364, 339406, 372177, 339414, 413143, 249303, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 175637, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 372354, 421509, 126597, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 225442, 192674, 438434, 225445, 438438, 225448, 438441, 225451, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 225494, 266454, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 389381, 356631, 356638, 356641, 356644, 356647, 266537, 356650, 389417, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 250239, 332162, 348548, 356741, 332175, 160152, 373146, 373149, 70048, 356783, 324032, 201158, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 381513, 348745, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 340639, 258723, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 155647, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 357212, 430940, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 119675, 324476, 430973, 340859, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 373672, 324525, 340910, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 381947, 201724, 431100, 349181, 431107, 349203, 209944, 209948, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 209996, 431180, 341072, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 160896, 349313, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 366173, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 267929, 333472, 333512, 259789, 358100, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333593, 333595, 358192, 366384, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 358256, 268144, 358260, 325494, 399222, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 350426, 334047, 350449, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 391564, 366991, 334224, 342431, 375209, 326059, 375220, 342453, 334263, 326087, 358857, 195041, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 252483, 219719, 399957, 244309, 334425, 326240, 334466, 334469, 391813, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 260993, 400260, 211846, 342921, 342931, 400279, 252823, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 359367, 326599, 187335, 359383, 359389, 383968, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 384099, 384102, 367724, 384108, 326764, 343155, 384115, 212095, 384136, 384140, 384144, 384152, 384158, 384161, 351399, 384169, 367795, 384182, 384189, 343232, 351424, 384192, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 261391, 359695, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 343399, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 138865, 155255, 155274, 368289, 245410, 245415, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 376672, 155488, 155492, 327532, 261997, 376686, 262000, 262003, 327542, 147319, 262006, 262009, 425846, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 327655, 253927, 360432, 393204, 360439, 253944, 393209, 393215 ]
8428ab4ef6b10b722c3cb4622eaafd8f66bc5d9c
b05906bef32143e5c5fa2d9128794c0bcc8a1a7d
/CarConvenient/Module/CarGroup(车圈)/RidersClub(车友俱乐部)/CCRidersClubViewController.swift
4cad406baddd7b81ea7bd8cfced69bb1d5bbf07b
[]
no_license
JqyModi/CarConvenient
df34347a5daa01c09aaa63fcb1a22ac3aec7068f
ad3475c509bdaf67472779cb31c13121119f4402
refs/heads/master
2020-04-22T08:29:54.404605
2019-03-01T09:49:20
2019-03-01T09:49:20
170,243,954
3
0
null
null
null
null
UTF-8
Swift
false
false
1,234
swift
// // CCRidersClubViewController.swift // CarConvenient // // Created by Modi on 2019/2/18. // Copyright © 2019年 modi. All rights reserved. // import UIKit class CCRidersClubViewController: BaseTableViewController { override func viewDidLoad() { super.viewDidLoad() } override func setupTableView() { super.setupTableView() self.identifier = "CCRidersClubTableViewCell" tableView.rowHeight = 100 } } extension CCRidersClubViewController { override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 10 } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: identifier) as! CCRidersClubTableViewCell cell.selectionStyle = .none return cell } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let vc = CCRidersClubDetailViewController.init(nibName: "CCRidersClubDetailViewController", bundle: nil) self.navigationController?.pushViewController(vc, animated: true) } }
[ -1 ]
8f8ba930f7d32363fe2338c925a14fed075eb5a3
9f76832d89efe382013c04d9358febd58898e8b9
/EmulatorAutomator/Deprecated/TableView/LibraryTableViewController.swift
a18edeebae4fde2f68af4cefe0d1b637e48374a7
[ "MIT" ]
permissive
MainasuK/EmulatorAutomator
faed9dc44ca28459cc220165cffa5b0cb5c09aea
840664b0ee2c8c7fc7dcc5975ae757a1020407be
refs/heads/master
2022-12-04T06:55:09.407096
2020-08-27T15:21:10
2020-08-27T15:21:10
271,796,868
0
0
null
null
null
null
UTF-8
Swift
false
false
3,505
swift
// // LibraryTableViewController.swift // EmulatorAutomator // // Created by Cirno MainasuK on 2020-3-29. // Copyright © 2020 MainasuK Cirno. All rights reserved. // import os import Cocoa //final class LibraryTableViewController: NSViewController { // // private let sceneTableViewController = SceneTableViewController() // private let assetTableViewController = AssetTableViewController() // // override func loadView() { // view = NSView() // } // //} // //extension LibraryTableViewController { // // override func viewDidLoad() { // super.viewDidLoad() // // // embed default view controller // embedChildViewController(assetTableViewController) // // // Setup outline selection listener // NotificationCenter.default.addObserver(self, selector: #selector(LibraryTableViewController.selectionChanged(_:)), name: LibraryOutlineViewController.NotificationName.selectionChanged, object: nil) // } // //} // //extension LibraryTableViewController { // // // handle outline selection changed // @objc private func selectionChanged(_ notification: Notification) { // os_log(.info, log: .interaction, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) // // guard let outlineViewController = notification.object as? LibraryOutlineViewController else { // return // } // // let viewController = viewControllerForSelectedNodes(outlineViewController.treeController.selectedNodes) // embedChildViewController(viewController) // } // //} // //extension LibraryTableViewController { // // func viewControllerForSelectedNodes(_ nodes: [NSTreeNode]) -> NSViewController? { // switch nodes.count { // case 0: // return nil // case 1: // guard let node = nodes[0].representedObject as? OutlineViewModel.Node else { // return nil // } // // guard let entry = OutlineViewModel.OutlineEntry(rawValue: node.name) else { // assertionFailure() // return nil // } // switch entry { // case .library: // return nil // case .asset: // return assetTableViewController // case .scene: // return sceneTableViewController // case .operator: // return nil // } // // default: // return nil // } // } // // func embedChildViewController(_ viewController: NSViewController?) { // if !children.isEmpty { // let childrenViewController = children[0] // removeChild(at: 0) // childrenViewController.view.removeFromSuperview() // } // // if let viewController = viewController { // addChild(viewController) // viewController.view.translatesAutoresizingMaskIntoConstraints = false // view.addSubview(viewController.view) // NSLayoutConstraint.activate([ // viewController.view.topAnchor.constraint(equalTo: view.topAnchor), // viewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), // viewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), // viewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), // ]) // } // } // //}
[ -1 ]
010046951cca54bec15e0b976fd0b2c6064550f4
0b093b5254f68b6fcba6c240d7480daecaa97c25
/Somuleco/Models/LearningGoal.swift
f01aacbe1146058fa072cf080fb5e3435a298519
[]
no_license
yonathanseleshi/Somuleco-IOS
fff5b916cd06ac438c2fe9622d1b74b762c14ac9
3276bdf526ef5c9e140ff5887deef9dd57e602aa
refs/heads/master
2021-07-16T01:14:24.365935
2020-06-06T16:57:48
2020-06-06T16:57:48
176,178,394
0
0
null
null
null
null
UTF-8
Swift
false
false
169
swift
// // LearningGoal.swift // Somuleco // // Created by yonathan.seleshi on 1/21/20. // Copyright © 2020 Yonathan Seleshi. All rights reserved. // import Foundation
[ -1 ]
32ab590b5fcc07605faba52c49878c6b9d77c010
a174884af417aadb0aa62b66c3154e29c6076b58
/Examples/Example-iOS_Swift-Carthage/Source/Views/Dashboard/DashboardViewController.swift
32be085bc490538d8b6a4a144d66764650ef69c6
[ "Apache-2.0" ]
permissive
janrain/AppAuth-iOS
1b8392054a1d6bd6096f1d5341e24fc65b4f08eb
567c88d2ca23bd66ef9c28428b5200a250d95f0b
refs/heads/master
2023-08-25T15:35:02.478987
2023-08-24T17:23:43
2023-08-24T17:23:43
229,835,479
1
0
Apache-2.0
2023-08-24T17:23:45
2019-12-23T23:10:14
Objective-C
UTF-8
Swift
false
false
9,792
swift
// // DashboardViewController.swift // Example // // Copyright © 2023 Akamai Technologies, Inc. All Rights Reserved. // import Foundation import UIKit class DashboardViewController: BaseViewController { @IBOutlet private(set) weak var tokenRequestStackView: UIStackView! @IBOutlet private(set) weak var codeExchangeButton: UIButton! @IBOutlet private(set) weak var userInfoButton: UIButton! @IBOutlet private(set) weak var refreshTokenButton: UIButton! @IBOutlet private(set) weak var browserButton: UIButton! @IBOutlet private(set) weak var profileButton: UIButton! @IBOutlet private(set) weak var logTextView: UITextView! @IBOutlet private(set) weak var tokenDataStackView: UIStackView! @IBOutlet private(set) weak var accessTokenTitleLabel: UILabel! @IBOutlet private(set) weak var refreshTokenTitleLabel: UILabel! @IBOutlet private(set) weak var accessTokenTextView: UITextView! @IBOutlet private(set) weak var refreshTokenTextView: UITextView! @IBOutlet private(set) weak var accessTokenStackView: UIStackView! @IBOutlet private(set) weak var refreshTokenStackView: UIStackView! var viewModel: DashboardViewModelProtocol! override func viewDidLoad() { super.viewDidLoad() // Initialize UI for current authentication state configureUI() // Load the discovery doc values discoverConfig() } } // MARK: Token IBActions extension DashboardViewController { @IBAction func codeExchange(_ sender: UIButton) { Task { setActivityIndicator(true) do { try await viewModel.exchangeAuthorizationCode() } catch let error as AuthError { displayAlert(error: error) printToLogTextView(error.localizedDescription) } catch { printToLogTextView(error.localizedDescription) } setActivityIndicator(false) updateUI() } } @IBAction func refreshToken(_ sender: UIButton) { Task { setActivityIndicator(true) do { try await viewModel.refreshTokens() } catch let error as AuthError { displayAlert(error: error) printToLogTextView(error.localizedDescription) } catch { printToLogTextView(error.localizedDescription) } setActivityIndicator(false) updateUI() } } @IBAction func userInfo(_ sender: UIButton) { Task { setActivityIndicator(true) do { let userInfo = try await viewModel.getUserInfo() printToLogTextView(userInfo) } catch AuthError.noDiscoveryDoc { discoverConfig() } catch let error as AuthError { displayAlert(error: error) printToLogTextView(error.localizedDescription) } catch { printToLogTextView(error.localizedDescription) } setActivityIndicator(false) updateUI() } } } // MARK: Browser IBActions extension DashboardViewController { @IBAction func auditBrowserSessionState(_ sender: UIButton) { Task { setActivityIndicator(true) do { try await viewModel.auditBrowserSession() } catch AuthError.noDiscoveryDoc { discoverConfig() } catch let error as AuthError { if error == .userCancelledAuthorizationFlow && !viewModel.isBrowserSessionActive { let alertAction = alertActionProvider?.makeAlertAction(.ok, style: .default) { action in Task { try await self.viewModel.appLogout() } } try await displayAlertWithAction(error: AuthError.userCancelledAuthorizationFlowLoginRequired, alertAction: alertAction) } else { displayAlert(error: error) } } catch { displayAlert(error: AuthError.api(error.localizedDescription, underlyingError: error)) printToLogTextView(error.localizedDescription) } setActivityIndicator(false) updateUI() } } @IBAction func profileManagement(_ sender: UIButton) { Task { setActivityIndicator(true) do { try await viewModel.loadProfileManagement() } catch AuthError.noDiscoveryDoc { discoverConfig() } catch let error as AuthError { displayAlert(error: error) printToLogTextView(error.localizedDescription) } catch { printToLogTextView(error.localizedDescription) } setActivityIndicator(false) updateUI() } } } // MARK: Logout IBActions extension DashboardViewController { @IBAction func logout(_ sender: UIButton) { Task { await displayLogoutAlert() } } } // MARK: UI IBActions extension DashboardViewController { @IBAction func clearLog(_ sender: UIButton) { logTextView.text = "" } } // MARK: Discovery Doc extension DashboardViewController { func discoverConfig() { Task { setActivityIndicator(true) do { let discoveryConfig = try await viewModel.discoverConfiguration() printToLogTextView(discoveryConfig) } catch { let alertAction = alertActionProvider?.makeAlertAction(.ok, style: .default) { action in self.discoverConfig() } try await displayAlertWithAction(error: AuthError.api(error.localizedDescription, underlyingError: error), alertAction: alertAction) } setActivityIndicator(false) updateUI() } } } // MARK: Logout Alert extension DashboardViewController { // Initialize and present an alert with logout options func displayLogoutAlert() async { setActivityIndicator(true) let logoutAlert = viewModel.getLogoutOptionsAlert() { result in switch result { case .success(let completed): let logoutCompleted = completed ? TextConstants.success : TextConstants.cancel print("\(TextConstants.logout) \(logoutCompleted)") case .failure(let error as AuthError): self.displayAlert(error: error) case .failure: self.displayAlert(error: AuthError.logoutFailed) } self.setActivityIndicator(false) self.updateUI() } present(logoutAlert, animated: true) } } // MARK: UI Methods extension DashboardViewController { func configureUI() { logTextView.layer.borderColor = UIColor(white: 0.8, alpha: 1.0).cgColor logTextView.layer.borderWidth = 1.0 logTextView.alwaysBounceVertical = true logTextView.textContainer.lineBreakMode = .byCharWrapping logTextView.text = "" accessTokenTextView.delegate = self refreshTokenTextView.delegate = self } func updateUI() { DispatchQueue.main.async { self.tokenRequestStackView.isHidden = self.viewModel.isTokenRequestStackViewHidden self.codeExchangeButton.isHidden = self.viewModel.isCodeExchangeButtonHidden self.refreshTokenButton.isHidden = self.viewModel.isRefreshTokenButtonHidden self.userInfoButton.isHidden = self.viewModel.isUserInfoButtonHidden self.profileButton.isHidden = self.viewModel.isProfileButtonHidden self.tokenDataStackView.isHidden = self.viewModel.isTokenDataStackViewHidden if !self.tokenDataStackView.isHidden { self.accessTokenTitleLabel.text = self.viewModel.accessTokenTitleLabelText self.accessTokenTextView.text = self.viewModel.accessTokenTextViewText self.refreshTokenTitleLabel.text = self.viewModel.refreshTokenTitleLabelText self.refreshTokenTextView.text = self.viewModel.refreshTokenTextViewText } } } } // MARK: BaseViewControllerDelegate extension DashboardViewController: BaseViewControllerDelegate { func printToLogTextView(_ data: String) { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "hh:mm:ss" let dateString = dateFormatter.string(from: Date()) // Appends to output log DispatchQueue.main.async { let logText = "\(self.logTextView.text ?? "")\(dateString): \(data)\n\n" self.logTextView.text = logText let range = NSMakeRange(self.logTextView.text.count - 1, 0) self.logTextView.scrollRangeToVisible(range) } } } // MARK: TextViewDelegate extension DashboardViewController: UITextViewDelegate { func textViewDidChangeSelection(_ textView: UITextView) { textView.selectedRange = NSMakeRange(0, textView.text.count) } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { accessTokenTextView.endEditing(true) refreshTokenTextView.endEditing(true) } }
[ -1 ]
bf84232db97b102ba9e0e5ae1fbf727ffd0a25fc
7b65600a3a4f3e63ed62eb19c411b4e1155f1332
/Insta/ViewControllers/CameraViewController.swift
fbdad04f3c4080e474553c044d09048b6b09baee
[]
no_license
amira-masoud/insta
2886d10185dfb7b6161458aa0ea82ff22a4b960e
dfb7f68bfb4937fe2d3eb0240f40e66dd3591e66
refs/heads/master
2020-11-30T21:27:19.875445
2020-01-06T18:05:11
2020-01-06T18:05:11
230,484,006
0
0
null
null
null
null
UTF-8
Swift
false
false
5,223
swift
// // CameraViewController.swift // Insta // // Created by Amira on 12/18/19. // Copyright © 2019 Amira. All rights reserved. // import UIKit import FirebaseStorage import FirebaseDatabase import ImagePicker class CameraViewController: UIViewController, ImagePickerDelegate { @IBOutlet weak var viewContainer: UIView! @IBOutlet weak var photo: UIImageView! @IBOutlet weak var captionTextView: UITextView! @IBOutlet weak var shareButton: UIButton! @IBOutlet weak var removeButtonOultlet: UIBarButtonItem! var selectedImage : UIImage? override func viewDidLoad() { super.viewDidLoad() // bt3ml action lel imageview let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handlerSelectedphoto)) photo.addGestureRecognizer(tapGesture) photo.isUserInteractionEnabled = true } @objc func handlerSelectedphoto() { let pickerController = UIImagePickerController() pickerController.delegate = self present(pickerController, animated: true, completion: nil) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) handlePost() } @IBAction func cameraButton_Touch(_ sender: Any) { let imagePickerController = ImagePickerController() imagePickerController.delegate = self imagePickerController.imageLimit = 5 present(imagePickerController, animated: true, completion: nil) } func wrapperDidPress(_ imagePicker: ImagePickerController, images: [UIImage]){ } func doneButtonDidPress(_ imagePicker: ImagePickerController, images: [UIImage]){ guard let image = images.first else { dismiss(animated: true, completion: nil) return } selectedImage = image photo.image = image dismiss(animated: true, completion: nil) // self.performSegue(withIdentifier: "filter_segue", sender: nil) } func cancelButtonDidPress(_ imagePicker: ImagePickerController) {} // bt8yer shakl el zorar w lono func handlePost() { if selectedImage != nil { self.shareButton.isEnabled = true self.removeButtonOultlet.isEnabled = true self.shareButton.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 1) } else { self.shareButton.isEnabled = false self.removeButtonOultlet.isEnabled = false self.shareButton.backgroundColor = UIColor.lightGray } } // dismiss keyboard override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { view.endEditing(true) } @IBAction func shareButton_Touch(_ sender: Any) { ProgressHUD.show("Waiting...", interaction: false) if let profileImg = self.selectedImage, let imageData = UIImage().jpegData(compressionQuality: 0.1){ let photoIdString = NSUUID().uuidString print(photoIdString) let storageRef = Storage.storage().reference().child("photo").child(photoIdString) storageRef.putData(imageData, metadata: nil, completion: {(metadata, error) in if error != nil { ProgressHUD.showError("This photo can't be loaded") return } let photoUrl = storageRef.downloadURL(completion:{ (photoUrl , error) in self.sendDataToDatabase(photoUrl: photoUrl!.absoluteString ) }) }) } else { ProgressHUD.showError("This photo can't be loaded") } } @IBAction func removeButton(_ sender: Any) { clean() handlePost() } func sendDataToDatabase(photoUrl: String){ let ref = Database.database().reference() let postsReference = ref.child("posts") let newPostId = postsReference.childByAutoId().key let newPostReference = postsReference.child(newPostId!) newPostReference.setValue(["photoUrl": photoUrl, "Caption": captionTextView.text!], withCompletionBlock: {(error, ref) in if error != nil { ProgressHUD.showError(error!.localizedDescription) return } ProgressHUD.showSuccess("Success") self.clean() self.tabBarController?.selectedIndex = 0 }) } // func btms7 elsora wl caption func clean() { self.captionTextView.text = "" self.photo.image = UIImage(named: "placeholderImg") self.selectedImage = nil } } extension CameraViewController : UIImagePickerControllerDelegate , UINavigationControllerDelegate{ //func 3shan t7otly el image elli ana a5trtha mn el gallery fe el image view func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage{ selectedImage = image photo.image = image } dismiss(animated: true, completion: nil) } }
[ -1 ]
46b5b776dd5a0fc9be636071f2229ad6b540d1d2
196f123fcd2d99804f387cc0e2241f624eb85f5f
/OrdersExternalServer/OrdersExternalServer/Customer.swift
a85307228a3b56b262fef0f7f6828f69779bbdaf
[]
no_license
DanielTejera/IOS
b0e4323bb42268f07bc80405fd0ed8ddbd3ca513
9f0c1ead26566ed448ad315c1c19e63c8b78b620
refs/heads/main
2023-01-09T20:42:55.388955
2020-11-16T12:39:36
2020-11-16T12:39:36
313,280,243
0
0
null
null
null
null
UTF-8
Swift
false
false
378
swift
// // Customer.swift // OrdersExternalServer // // Created by Alumno on 10/05/2017. // Copyright © 2017 Alumno. All rights reserved. // import UIKit class Customer { var id = "" var name = "" var address = "" init(id: String, name: String, address: String) { self.id = id self.name = name self.address = address } }
[ -1 ]
824445f10c495ec6411b5381a29e0516173c3123
0c93c3ef1ddb83b268a5bc4c322b66ec3fbc2850
/LearnSwiftForGenerics/LearnSwiftForGenerics/main.swift
e1db6091f91b1d548f01948feca47b3152252865
[ "MIT" ]
permissive
susuyan/LearnSwiftBasic
19154ed5039f23e12b88d6d31fadd505608f3972
5f0e51d7302f732de3cfc5c10ceceea67791b1fb
refs/heads/master
2021-08-18T16:21:17.427814
2017-11-23T07:52:53
2017-11-23T07:52:53
110,197,227
0
0
null
null
null
null
UTF-8
Swift
false
false
5,899
swift
// // main.swift // LearnSwiftForGenerics // // Created by susuyan on 2017/11/21. // Copyright © 2017年 susuyan. All rights reserved. // import Foundation print("Hello, World!") /* 泛型代码可以让你写出根据自我需求定义、适用于任何类型的,灵活且可重用的函数和类型。 它可以让你避免重复的代码,用一种清晰和抽象的方式来表达代码的意图 */ func swapTwoInts(_ a: inout Int, _ b: inout Int) { let temporaryA = a a = b b = temporaryA } var someInt = 3 var anotherInt = 107 swapTwoInts(&someInt, &anotherInt) print("someInt is now\(someInt), and anotherInt is now \(anotherInt)") func swapTwoValues<T>(_ a: inout T,_ b: inout T ){ let temporaryA = a a = b b = temporaryA } swapTwoValues(&someInt, &anotherInt) print("someInt is now\(someInt), and anotherInt is now \(anotherInt)") var someString = "hello" var anotherString = "world" swapTwoValues(&someString, &anotherString) // MARK: - 类型参数 /* 在上面的 swapTowValues 例子中,占位类型 T 是一种类型参数的示例 类型参数指定并命名为一个占位类型,并且紧随在函数后面,使用一堆尖括号括起来(<T>) 可支持多个类型参数,命名在尖括号中,用逗号分开 */ // MARK: - 命名类型参数 /* 在简单的情况下,泛型类型或泛型类型函数需要指定一个占位类型 通常用一单个字母 T 来命名类型参数 不过,你可以使用任何有效的标识来作为参数类型参数名 (驼峰命名,eg:KeyType , ValueType) */ // 非泛型版本的栈 struct IntStack { var items = [Int]() mutating func push(_ item: Int) { items.append(item) } mutating func pop() -> Int { return items.removeLast() } } // 泛型版本的栈 struct Stack <T> { var items = [T]() mutating func push(_ item: T){ items.append(item) } mutating func pop() -> T { return items.removeLast() } } // MARK: - 类型约束 /* 类型约束制定了一个必须继承自指定类的类型参数,或者遵循一个特定的协议或协议构成 */ func findIndex(ofString valueToFind:String, in array:[String]) -> Int? { for (index, value) in array.enumerated() { if value == valueToFind { return index } } return nil } let strings = ["cat", "dog", "llama", "parakeet", "terrapin"] if let foundIndex = findIndex(ofString: "llama", in: strings) { print("The index of llama is \(foundIndex)") } //func findIndex<T>(of valueToFind: T, in array:[T]) -> Int? { // for (index, value) in array.enumerated() { // if value == valueToFind { // 不是所有的 Swift 中的类型都可以用 == 进行比较 // return index // } // } // return nil //} func findIndex<T:Equatable>(of valueToFind: T, in array:[T]) -> Int? { for (index, value) in array.enumerated() { if value == valueToFind { // 不是所有的 Swift 中的类型都可以用 == 进行比较 return index } } return nil } if let fundIndex = findIndex(of: "parakeet", in: strings) { print("The index of parakeet is \(fundIndex)") } // MARK: - 关联类型 /* 当定义一个协议时,有的时候声明一个或多个关联类型作为协议定义的一部分是非常有用的。 一个关联类型作为协议的一部分, 给定了类型的一个占位名(或别名) 作用于关联类型上实际类型在协议被实现前是不需要指定的 关联类型被指定为 typealias 关键字 */ protocol Container { associatedtype Item mutating func append(_ item: Item) var count: Int {get} subscript(i: Int) -> Item {get} } // 非泛型版本 struct IntStack1: Container { var items = [Int]() mutating func push(_ item: Int) { items.append(item) } mutating func pop() -> Int { return items.removeLast() } typealias ItemType = Int mutating func append(_ item: Int) { self.push(item) } var count: Int{ return items.count } subscript(i: Int) -> Int { return items[i] } } // 泛型版本 struct Stack1<Element>: Container { var items = [Element]() mutating func push(_ item: Element) { items.append(item) } mutating func pop() -> Element { return items.removeLast() } mutating func append(_ item: Element) { self .push(item) } var count: Int { return items.count } subscript(i: Int) -> Element { return items[i] } } // MARK: - Where 语句 /* 类型约束能够确保类型符合泛型函数或类的定义约束 一个 where 语句能够使一个关联类型遵循一个特定的协议 以及那个特定的类型参数和关联类型可以是相同的 */ func allItemsMatch<C1:Container, C2:Container> (_ someContainer: C1, _ anotherContainer: C2) -> Bool where C1.Item == C2.Item, C1.Item: Equatable { if someContainer.count != anotherContainer.count { return false } for i in 0 ..< someContainer.count { if someContainer[i] != anotherContainer[i] { return false } } return true } var stackOfStrings = Stack1<String>() stackOfStrings.push("uno") stackOfStrings.push("dos") stackOfStrings.push("tres") var arrayOfStrings = ["uno", "dos", "tres"] //if allItemsMatch(stackOfStrings, arrayOfStrings) { // print("all items") //}else { // print("Not all ") //} extension Stack1 where Element: Equatable { func isTop(_ item: Element) -> Bool { guard let topItem = items.last else { return false } return topItem == item } } // TODO: - where 语句还得熟悉下
[ -1 ]
17e89c0839ac21871da946a6c56bdc57d3f45294
6838668da4ad3def7670872193d2f7639a224c6d
/Project 1/Project 1/ViewController.swift
456e84b2d5d710ba8ff0536adcd6790f025fb62b
[]
no_license
TylerKitchens/NMIX_4310
373cef1c02f2eb0490b97b954f861f4b353b384b
2a7c2ec8d5de44af1a3cdb065aed24130c36d885
refs/heads/master
2022-04-06T06:00:38.582561
2020-02-24T16:46:51
2020-02-24T16:46:51
236,505,658
0
0
null
null
null
null
UTF-8
Swift
false
false
332
swift
// // ViewController.swift // Project 1 // // Created by Tyler Kitchens on 1/13/20. // Copyright © 2020 Kitchens. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } }
[ 323334, 249229, 189326, 319888, 342547, 316949, 314774, 291223, 314780, 342300, 316317, 245024, 135840, 135842, 172578, 340649, 172586, 242346, 337068, 336557, 241071, 243505, 172722, 314048, 339520, 313029, 319815, 326600, 182474, 146645, 250212, 315492, 56044, 215408, 319990, 327033, 314748, 334205 ]
50c192ee9c5673adb0b7bdcc25639867b045f688
823c20eccd3e88f81c5267fb8e1caca2ee9049f7
/AviasalesSDKTemplate/Source/AviasalesSource/PriceCalendar/PriceCalendarChart/PriceCalendarChartView.swift
c0bc012e4adfcef713dcebbcecd08bda7006a8ae
[ "MIT" ]
permissive
gitavery/Aviasales-iOS-SDK
8b37ad80368af1e3704b486b1c9686b819f0fc79
6ca2f96c2cb901664697b0cb32e4763847bc937b
refs/heads/master
2020-03-29T07:33:09.129328
2018-08-09T11:09:05
2018-08-09T11:09:05
149,669,737
1
0
MIT
2018-09-20T20:57:00
2018-09-20T20:56:59
null
UTF-8
Swift
false
false
15,625
swift
// // PriceCalendarChartView.swift // Aviasales iOS Apps // // Created by Dmitry Ryumin on 10/06/15. // Copyright (c) 2015 aviasales. All rights reserved. // import UIKit @objc protocol PriceCalendarChartViewDelegate: NSObjectProtocol { func monthDidChangeInPriceCalendarChartView(_ chartView: PriceCalendarChartView) } private let barWidth: CGFloat = 58 private let kBarSpacing: CGFloat = 4 private let kPriceCalendarChartBarCellId = "PriceCalendarChartBarCell" private let kInsetHeaderId = "insetHeader" private let kInsetFooterId = "insetFooter" @objcMembers class PriceCalendarChartView: UIView { weak var delegate: PriceCalendarChartViewDelegate? @IBOutlet weak var collectionView: UICollectionView! @IBOutlet weak var monthLabel: UILabel! var selectOnScroll = true var showPriceView = true { didSet { priceView?.isHidden = !showPriceView } } private var currentDate: Date? fileprivate var needAnimateBars = false fileprivate var priceView: PriceCalendarPriceView! fileprivate var currentCenterCellRow = 0 private var priceLevelLineView: PriceCalendarPriceLevelView! private var priceLevelVerticalPositionConstraint: NSLayoutConstraint! fileprivate var departures = [JRSDKPriceCalendarDeparture]() private var prevSize = CGSize.zero fileprivate var numberOfOldDepartures = 0 fileprivate var dataReloading = false override func awakeFromNib() { super.awakeFromNib() monthLabel?.textColor = JRColorScheme.lightTextColor() collectionView.backgroundColor = .white collectionView.dataSource = self collectionView.delegate = self collectionView.register(UINib(nibName: kPriceCalendarChartBarCellId, bundle: nil), forCellWithReuseIdentifier: kPriceCalendarChartBarCellId) collectionView.register(UICollectionReusableView.self, forSupplementaryViewOfKind: UICollectionElementKindSectionHeader, withReuseIdentifier: kInsetHeaderId) collectionView.register(UICollectionReusableView.self, forSupplementaryViewOfKind: UICollectionElementKindSectionFooter, withReuseIdentifier: kInsetFooterId) NotificationCenter.default.addObserver(self, selector: #selector(PriceCalendarChartView.managerEndLoadingNotification(_:)), name: NSNotification.Name(rawValue: JRSDKPriceCalendarLoaderEndLoadingNotification), object: nil) priceView = PriceCalendarPriceView() addSubview(priceView) priceView.translatesAutoresizingMaskIntoConstraints = false addConstraint(NSLayoutConstraint(item: priceView, attribute: NSLayoutAttribute.centerX, relatedBy: NSLayoutRelation.equal, toItem: self, attribute: NSLayoutAttribute.centerX, multiplier: 1.0, constant: 0.0)) addConstraint(NSLayoutConstraint(item: priceView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: self, attribute: NSLayoutAttribute.top, multiplier: 1.0, constant: -9.0)) priceView.backgroundColor = UIColor.clear priceView?.isHidden = !showPriceView priceLevelLineView = PriceCalendarPriceLevelView() addSubview(priceLevelLineView) priceLevelLineView.translatesAutoresizingMaskIntoConstraints = false addConstraint(NSLayoutConstraint(item: priceLevelLineView, attribute: NSLayoutAttribute.left, relatedBy: NSLayoutRelation.equal, toItem: self, attribute: NSLayoutAttribute.left, multiplier: 1.0, constant: 0.0)) addConstraint(NSLayoutConstraint(item: priceLevelLineView, attribute: NSLayoutAttribute.right, relatedBy: NSLayoutRelation.equal, toItem: self, attribute: NSLayoutAttribute.right, multiplier: 1.0, constant: 0.0)) addConstraint(NSLayoutConstraint(item: priceLevelLineView, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1.0, constant: JRPixel())) priceLevelVerticalPositionConstraint = NSLayoutConstraint(item: priceLevelLineView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: collectionView, attribute: NSLayoutAttribute.bottom, multiplier: 1.0, constant: -29.0) addConstraint(priceLevelVerticalPositionConstraint) } deinit { NotificationCenter.default.removeObserver(self) } override func layoutSubviews() { super.layoutSubviews() if prevSize == .zero || bounds.size != prevSize { prevSize = bounds.size createDepartures() if let departure = PriceCalendarManager.shared.loader?.selectedDeparture { selectDeparture(departure, makeVisible: true) } } } fileprivate func createDepartures() { guard let loader = PriceCalendarManager.shared.loader else { return } numberOfOldDepartures = Int(ceil(bounds.width/(barWidth + kBarSpacing)/2)) let allDepartures = loader.allDepartures! departures = Array(allDepartures[(Int(JRSDKPriceCalendarLoaderNumberOfOldDepartures)-numberOfOldDepartures)..<allDepartures.count]) collectionView.reloadData() defineCenterCell() } func reloadData() { dataReloading = true layoutIfNeeded() createDepartures() if let selectedDeparture = PriceCalendarManager.shared.loader?.selectedDeparture { currentDate = selectedDeparture.date() scrollToDeparture(selectedDeparture, animated: false) } } fileprivate func scrollToDeparture(_ departure: JRSDKPriceCalendarDeparture, animated: Bool = true, completion: (() -> Void)? = nil) { if let index = departures.index(of: departure) { collectionView.scrollToItem(at: IndexPath(item: index, section: 0), at: UICollectionViewScrollPosition.centeredHorizontally, animated: animated) } //wait for scrolling DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { completion?() } } fileprivate func selectDeparture(_ departure: JRSDKPriceCalendarDeparture, makeVisible: Bool = false) { if let index = departures.index(of: departure) { collectionView.selectItem(at: IndexPath(item: index, section: 0), animated: false, scrollPosition: makeVisible ? .centeredHorizontally : UICollectionViewScrollPosition()) defineCenterCell() priceView.setPriceCalendarDeparture(departure) } } fileprivate func setMonth() { if currentCenterCellRow < departures.count { let departure = departures[currentCenterCellRow] let monthText = DateUtil.monthName(departure.date()).capitalized if monthText != monthLabel.text { let animation = CATransition() animation.duration = 0.5 animation.type = kCATransitionFade animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) monthLabel.layer.add(animation, forKey: "changeTextTransition") monthLabel.text = monthText delegate?.monthDidChangeInPriceCalendarChartView(self) } let levelCorrection = -PriceCalendarChartBarCell.barPadding + 2 * JRPixel() + PriceCalendarChartBarCell.cornerRadius if let minPriceInMonth = PriceCalendarManager.shared.loader?.minPrice(inMonthOf: departure.date())?.floatValue, minPriceInMonth > 0 { let level = PriceCalendarChartBarCell.calculateHeight(for: minPriceInMonth, bounds: collectionView.bounds) let newLevel = -level + levelCorrection if priceLevelVerticalPositionConstraint.constant != newLevel { updatePriceLineView(duration: 0.5, alpha: 1, constant: newLevel) } } else { updatePriceLineView(duration: 0.3, alpha: 0, constant: levelCorrection) } } } private func updatePriceLineView(duration: TimeInterval = 0, alpha: CGFloat, constant: CGFloat) { layoutIfNeeded() UIView.animate(withDuration: duration) { [weak self] in self?.priceLevelLineView.alpha = alpha self?.priceLevelVerticalPositionConstraint.constant = constant self?.layoutIfNeeded() } } func selectCurrentCenterCell() { guard selectOnScroll else { return } collectionView.selectItem(at: IndexPath(item: currentCenterCellRow, section: 0), animated: false, scrollPosition: UICollectionViewScrollPosition()) if currentCenterCellRow < departures.count { let departure = departures[currentCenterCellRow] if let selectedDeparture = PriceCalendarManager.shared.loader?.selectedDeparture, selectedDeparture.date() != departure.date() { PriceCalendarManager.shared.loader?.selectDepartureDate(departure.date(), initialSelect: false) selectDeparture(selectedDeparture) } priceView.setPriceCalendarDeparture(departure) } } fileprivate func defineCenterCell() { let scrollView = collectionView as UIScrollView let centerPoint = CGPoint(x: collectionView.frame.size.width/2 + scrollView.contentOffset.x, y: collectionView.frame.size.height/2 + scrollView.contentOffset.y) if let centerCellIndexPath = collectionView.indexPathForItem(at: centerPoint) { if currentCenterCellRow != centerCellIndexPath.row { currentCenterCellRow = max(centerCellIndexPath.row, numberOfOldDepartures) if centerCellIndexPath.row < departures.count { let departure = departures[centerCellIndexPath.row] priceView?.setPriceCalendarDeparture(departure) currentDate = departure.date() } } setMonth() } } } extension PriceCalendarChartView { @objc func managerEndLoadingNotification(_ notification: Notification) { needAnimateBars = dataReloading ? dataReloading : needAnimateBars createDepartures() if let selectedDeparture = PriceCalendarManager.shared.loader?.selectedDeparture { selectDeparture(selectedDeparture) } setMonth() } } extension PriceCalendarChartView: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return departures.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kPriceCalendarChartBarCellId, for: indexPath) as UICollectionViewCell if let cell = cell as? PriceCalendarChartBarCell { if indexPath.row < departures.count { let departure = departures[indexPath.row] cell.setDeparture(departure, animated: needAnimateBars) cell.isUserInteractionEnabled = !departure.isOld() } } return cell } func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { if kind == UICollectionElementKindSectionHeader { return collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionElementKindSectionHeader, withReuseIdentifier: kInsetHeaderId, for: indexPath) as UICollectionReusableView } else { return collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionElementKindSectionFooter, withReuseIdentifier: kInsetFooterId, for: indexPath) as UICollectionReusableView } } } extension PriceCalendarChartView: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: barWidth, height: collectionView.frame.height) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { return UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { return kBarSpacing } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { let diff: CGFloat = collectionView.bounds.width/2 - CGFloat(numberOfOldDepartures)*(barWidth+kBarSpacing) - barWidth/2 return CGSize(width: diff, height: 0) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize { return CGSize(width: collectionView.frame.width/2 - barWidth/2, height: 0) } } extension PriceCalendarChartView: UICollectionViewDelegate { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { if indexPath.row < departures.count { needAnimateBars = false dataReloading = false let departure = departures[indexPath.row] if let selectedDeparture = PriceCalendarManager.shared.loader?.selectedDeparture, departure == selectedDeparture { return } scrollToDeparture(departure) { PriceCalendarManager.shared.loader?.selectDepartureDate(departure.date(), initialSelect: false) } } } } extension PriceCalendarChartView: UIScrollViewDelegate { func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { needAnimateBars = false dataReloading = false } func scrollViewDidScroll(_ scrollView: UIScrollView) { defineCenterCell() } func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) { let velocityX = isRTL ? -velocity.x : velocity.x let deceleratingCellCount = Int(ceil(velocityX))*3 var targetX: CGFloat = 0 var targetRow = 0 if velocityX == 0 { targetRow = currentCenterCellRow } else if velocityX > 0 { targetRow = currentCenterCellRow + deceleratingCellCount + 1 if targetRow >= collectionView.numberOfItems(inSection: 0) { targetRow = collectionView.numberOfItems(inSection: 0) - 1 } } else if velocityX < 0 { targetRow = currentCenterCellRow + deceleratingCellCount - 1 if targetRow < 0 { targetRow = 0 } } if let currentCellAttrs = collectionView.layoutAttributesForItem(at: IndexPath(item: targetRow, section: 0)) { targetX = currentCellAttrs.frame.origin.x - collectionView.frame.width/2 + barWidth/2 - JRPixel() } targetContentOffset.pointee = CGPoint(x: targetX, y: 0) } func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) { if !decelerate { selectCurrentCenterCell() } } func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { selectCurrentCenterCell() } }
[ -1 ]
643f0307e1e2dc7eb201aca883e89b9dbcd676cc
b93377aa1cd281b1e67591ef346d904247fb5f32
/OnTheMap/Model/StudentInformation.swift
580468420db358f8e5dc5b60fd6afb7fdbd5ee62
[]
no_license
AmjadAlsulami/On-the-Map
a86c98f45d66f4a7221b6539a2f44eb794b852c4
15f5227fe9651218066001a1ae26b97a1c50a1fd
refs/heads/master
2020-04-20T17:56:39.954823
2019-08-10T03:50:44
2019-08-10T03:50:44
169,004,009
0
0
null
null
null
null
UTF-8
Swift
false
false
1,358
swift
// // StudentInformation.swift // OnTheMap // // Created by Amjad khalid on 26/12/2018. // Copyright © 2018 Amjad khaled. All rights reserved. // import Foundation //Mark: here is the Students Information session Request as an array struct StudentsInformation : Codable { let results : [StudentInformation]? } //Mark: here is the Students Information session Request for the singel student struct StudentPostInformation : Codable { let result : StudentInformation? } //Mark: here is the detailed of the singel student information Request struct StudentInformation : Codable { let createdAt : String? let firstName : String? let lastName : String? let latitude : Double? let longitude : Double? let mapString : String? let mediaURL : String? let objectId : String? let uniqueKey : String? let updatedAt : String? } //Mark: here is the detailed if the post new student location and link Request struct StudentPostJesonBody: Codable{ let uniqueKey : String? let firstName : String? let lastName : String? let latitude : Double? let longitude : Double? let mapString : String? let mediaURL : String? } //here is the Student Information Response struct StudentInformationResponse : Codable { let createdAt : String? let objectId : String? }
[ -1 ]
676fb89d6973ca477e599a95facd917930520ad1
fefc25a623bece6e5c4f13445a4b3014fb844982
/HW 31-32 UITableView Editing/HW 31-32 UITableView Editing/AppDelegate.swift
b3ea9f70edc39e8d2489e8a0fcbeb8891a51734f
[]
no_license
ikirillfedorov/homeWorks
5954ed8135f260aa222657155ef3a5d9fa7cedaa
dea161399ea4a2abb97fba4dbc05a0143cd2c13a
refs/heads/master
2020-04-23T23:12:51.873221
2020-01-26T14:29:24
2020-01-26T14:29:24
171,527,986
0
0
null
2020-01-26T14:29:25
2019-02-19T18:34:19
Swift
UTF-8
Swift
false
false
2,365
swift
// // AppDelegate.swift // HW 31-32 UITableView Editing // // Created by Kirill Fedorov on 22/05/2019. // Copyright © 2019 Kirill Fedorov. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let viewController = GarageListViewController() let navContoller = UINavigationController(rootViewController: viewController) self.window?.rootViewController = navContoller return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 294924, 229388, 229391, 327695, 229394, 229397, 229399, 229402, 229405, 278564, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 286776, 319544, 286778, 229432, 204856, 286791, 237640, 286797, 278605, 311375, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 286916, 286922, 286924, 286926, 131281, 278747, 155872, 319716, 237807, 303345, 286962, 303347, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 286987, 319757, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 155966, 319809, 319810, 319814, 311623, 319818, 311628, 319822, 287054, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 139689, 311728, 180668, 311741, 319938, 278980, 278983, 319945, 278986, 319947, 278990, 278994, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 311804, 287230, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 311850, 279082, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 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, 287398, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 287427, 312006, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 303871, 230146, 328453, 230154, 33548, 312077, 295695, 230169, 295707, 328476, 295710, 295720, 303914, 279340, 279353, 230202, 312124, 328508, 222018, 377676, 148302, 287569, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 304013, 295822, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 304065, 213954, 189378, 156612, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 295928, 320505, 295945, 230413, 295949, 320528, 140312, 295961, 238620, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 279661, 205934, 312432, 279669, 337018, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 296259, 378181, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 148843, 410987, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 312711, 312712, 296331, 288140, 288144, 337306, 288160, 288162, 288164, 304555, 370092, 173488, 288176, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 230860, 312783, 288210, 370130, 288212, 239064, 288217, 329177, 280027, 288220, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288236, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 296450, 230916, 230919, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 157229, 230961, 157236, 288320, 288325, 124489, 280140, 288338, 280149, 239194, 280158, 403039, 312938, 280185, 116354, 288408, 280222, 198310, 321195, 296622, 321200, 337585, 296634, 296637, 313027, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 288494, 280302, 321266, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 304968, 280393, 280402, 173907, 313171, 313176, 280419, 321381, 296812, 313201, 1920, 305028, 280454, 247688, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 124913, 165876, 239612, 313340, 288764, 239617, 313347, 313358, 305176, 321560, 313371, 305191, 223273, 313386, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 288848, 280658, 215123, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288947, 280755, 321717, 280759, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 280823, 280825, 280830, 280831, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 280919, 354653, 313700, 280937, 313705, 190832, 280946, 313720, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 240052, 289207, 289210, 305594, 289218, 289227, 281047, 215526, 166378, 305647, 174580, 240124, 305662, 305664, 240129, 305666, 305668, 223749, 281095, 223752, 150025, 338440, 223757, 281102, 223763, 223765, 281113, 322074, 281121, 182819, 281127, 150066, 158262, 289342, 281154, 322115, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 314045, 314047, 314051, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 207661, 289593, 289601, 281410, 240458, 240468, 281430, 322393, 297818, 281435, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 289687, 297883, 289694, 289700, 289712, 281529, 289724, 52163, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 322599, 322610, 314421, 281654, 314427, 314433, 314441, 322642, 314456, 281691, 314461, 281702, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 289997, 290008, 363742, 363745, 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, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 298377, 314763, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 150966, 298424, 306618, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 191985, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 306694, 192008, 323084, 290321, 282130, 290325, 282133, 241175, 290328, 290332, 241181, 282142, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282201, 306778, 159330, 314979, 323176, 224875, 241260, 323181, 314994, 257658, 315016, 282249, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282300, 323260, 323266, 282310, 323273, 282319, 241362, 306904, 52959, 216801, 282337, 241380, 323304, 282345, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 323345, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 298822, 315211, 307027, 315221, 315223, 241496, 241498, 307035, 307040, 110433, 241509, 110438, 110445, 315249, 110450, 315251, 315253, 315255, 339838, 315267, 241544, 241546, 241548, 298896, 298898, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 241581, 241583, 323504, 241586, 282547, 241588, 241590, 241592, 241598, 290751, 241600, 241605, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 290835, 282645, 241693, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 315463, 315466, 192589, 192596, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 299126, 233591, 299136, 315524, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 299225, 233701, 307432, 282893, 323854, 282906, 291104, 233766, 307508, 315701, 332086, 307510, 307512, 307515, 307518, 282942, 282947, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 299357, 242018, 242024, 299373, 250231, 242043, 315771, 299391, 291202, 299398, 242057, 291212, 299405, 315801, 283033, 242075, 291226, 61855, 291231, 283042, 291238, 291241, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291260, 283069, 127424, 299457, 291269, 127434, 315856, 176592, 315860, 283095, 299481, 176605, 160221, 242143, 291299, 127463, 242152, 291305, 176620, 127474, 291314, 291317, 127480, 135672, 291323, 127485, 291330, 283142, 135689, 233994, 127500, 233998, 127506, 234003, 234006, 127511, 152087, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 299740, 201444, 283368, 234219, 283372, 283382, 316151, 234236, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 234252, 234254, 291601, 234258, 242452, 234261, 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, 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, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234422, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 234443, 291788, 234446, 275406, 234449, 316370, 234452, 234455, 234459, 234461, 234464, 168935, 324585, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 316416, 234496, 234501, 308231, 234504, 234507, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 300085, 234549, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234581, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 160879, 234607, 275569, 234610, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 234627, 275588, 234629, 242822, 234634, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 324757, 308379, 300189, 324766, 119967, 234653, 324768, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 308401, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 316610, 226500, 300234, 283850, 283844, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 300263, 300265, 300267, 161003, 300270, 300272, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 300292, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 275725, 349464, 283939, 259367, 300344, 243003, 300357, 283973, 283983, 316758, 357722, 316766, 292192, 316768, 292197, 316774, 218473, 284010, 136562, 275834, 275836, 275840, 316803, 316806, 316811, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 300527, 308720, 292338, 226802, 316917, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 235047, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 284255, 284258, 292452, 292454, 284263, 284265, 292458, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 284288, 292481, 284290, 325250, 284292, 292485, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284316, 284320, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 284337, 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, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 317189, 317191, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 358183, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 292681, 153417, 358224, 276308, 178006, 317271, 276315, 292700, 317279, 284511, 227175, 292715, 292721, 284529, 300915, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 292784, 317361, 358326, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276452, 292839, 276455, 292843, 276464, 178161, 227314, 325624, 317435, 276479, 276482, 276485, 317446, 276490, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276544, 325700, 292934, 243785, 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, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 301252, 350406, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 309491, 309494, 243960, 276735, 227587, 276739, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 285061, 317833, 285070, 317853, 276896, 317858, 342434, 285093, 317864, 235955, 276917, 293304, 293314, 309707, 317910, 293336, 235996, 317917, 293343, 358880, 227810, 293346, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 113167, 309779, 317971, 309781, 227877, 227879, 227882, 309804, 105007, 236082, 23094, 277054, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170619, 309885, 309888, 277122, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 318132, 277177, 277181, 277191, 277194, 277196, 277201, 137946, 113378, 228069, 277223, 342760, 56043, 277232, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 285474, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 301884, 310080, 277317, 277322, 293706, 310100, 301911, 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, 293861, 228327, 318442, 228330, 228332, 326638, 277486, 318450, 293876, 285686, 302073, 121850, 293882, 302075, 285690, 293887, 277504, 277507, 293899, 277519, 293908, 293917, 293939, 318516, 277561, 310336, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 277601, 310374, 203879, 310376, 277608, 228460, 318573, 203886, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 294026, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 277671, 302248, 277678, 294063, 302258, 277687, 318651, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 204026, 228606, 204031, 64768, 310531, 285958, 318742, 130345, 113964, 285999, 318773, 318776, 286010, 417086, 286016, 302403, 294211, 384328, 294221, 294223, 326991, 179547, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 351619, 294276, 310659, 327046, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 277932, 310710, 310715, 302526, 228799, 302534, 310727, 64966, 245191, 163272, 302541, 302543, 310737, 310749, 310755, 187880, 310764, 310772, 40440, 212472, 40443, 286203, 40448, 228864, 286214, 302603, 65038, 302614, 286233, 302621, 286240, 146977, 187939, 40484, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 40544, 40548, 40550, 40552, 286313, 40554, 310892, 40557, 40560, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 278168, 179870, 327333, 229030, 278188, 302764, 278192, 319153, 302781, 302789, 294599, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 286425, 319194, 278235, 301163, 278238, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 360317, 294785, 327554, 40851, 294811, 237470, 319390, 40865, 319394, 294817, 311209, 180142, 343983, 188340, 40886, 294844, 294847, 24528, 393177, 294876, 294879, 311279, 278513, 237555, 278516, 311283, 237562 ]
a6b03bd90187f76a2d2e1d61d12bfe599d739e77
f6adc07cb2fcf885631266b4ef6b70502e80cb03
/Elements/UITextViewElement.swift
e48d1b5b384a82c675156edc12caab9704ed8012
[]
no_license
naruapon/Elements
3d2205939ec9c07d8c8d45f10598f6bf49f24c3d
68beed75fff9f6ecdecc5280cd73713b5a9c1511
refs/heads/master
2022-04-20T01:11:24.709334
2020-04-13T10:14:39
2020-04-13T10:14:39
255,293,039
0
0
null
null
null
null
UTF-8
Swift
false
false
1,234
swift
// // UITextViewElement.swift // Elements // // Created by Wittaya Malaratn on 6/8/18. // Copyright © 2018 Wittaya Malaratn. All rights reserved. // import UIKit class UITextViewElement: UIViewController { let textView: UITextView = { let textView = UITextView() textView.textColor = UIColor.blackAlpha(alpha: 0.8) textView.font = UIFont.PoppinsRegular(size: 16) textView.layer.borderColor = UIColor.blackAlpha(alpha: 0.3).cgColor textView.layer.borderWidth = 0.5 textView.layer.cornerRadius = 5 textView.textContainerInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) textView.showsVerticalScrollIndicator = false textView.isScrollEnabled = false return textView }() override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white view.addSubview(textView) textView.anchor(view.safeAreaLayoutGuide.topAnchor, left: view.leftAnchor, bottom: nil, right: view.rightAnchor, topConstant: 100, leftConstant: 20, bottomConstant: 0, rightConstant: 20, widthConstant: 0, heightConstant: 200) } }
[ -1 ]
65df872695b7749204666cc8bffbc15d406394fa
42ee13d1bad138f5a7f7f3d42c186f15ab18d9ff
/Tests/LiquidFloatingActionButtonTests/LiquidFloatingActionButtonTests.swift
0e5ef34b18f164d5619bd7b694c69c4eb9648910
[ "MIT" ]
permissive
kjaylee/LiquidFloatingActionButton
71ec7f3a26652a4967c22a8709489a8786b309e4
860b717b37b00f3ed2664ea627620dec53446fbb
refs/heads/master
2023-04-30T21:28:58.289165
2020-12-17T00:01:05
2020-12-17T00:01:05
322,129,032
0
1
MIT
2021-05-07T03:13:25
2020-12-16T23:40:35
Makefile
UTF-8
Swift
false
false
465
swift
import XCTest @testable import LiquidFloatingActionButton final class LiquidFloatingActionButtonTests: 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(LiquidFloatingActionButton().text, "Hello, World!") } static var allTests = [ ("testExample", testExample), ] }
[ 45059, 415749, 340486, 265739, 144396, 415759, 369692, 342564, 372780, 343600, 321587, 321592, 162363, 48188, 162370, 392263, 389706, 415818, 421458, 385622, 374374, 139368, 163441, 273526, 253047, 346748, 347261, 245378, 396930, 160900, 323213, 201362, 326293, 258712, 311963, 380059, 315549, 162461, 260267, 352944, 336561, 114353, 176818, 187579, 225982, 326336, 384705, 225987, 315587, 187587, 256196, 187594, 374476, 187598, 1745, 339669, 164054, 265444, 177386, 378097, 315142, 153350, 208139, 315152, 338194, 153362, 374552, 347420, 150814, 336673, 134435, 334117, 391473, 393521, 398131, 347446, 328502, 354104, 374591, 325454, 253783, 339802, 253787, 253791, 253796, 244583, 396651, 253808, 253812, 359289, 374650, 164735, 293770, 144268, 66446, 349586, 144283, 200604, 321438, 355234, 219049, 298410, 222126, 235959, 150972, 225213, 326594, 344517, 324043, 373200, 338391, 393706, 350704, 200184 ]
601977deeba15b85f2624fac94cea09f541c0478
271832c567373f6a58e39444a4805617294c8434
/100 Days of swift/Project9/Project7/SceneDelegate.swift
5caa742f11430fca05d8545df1b7e5fabce4a3b2
[ "MIT" ]
permissive
manuelteixeira/100_days_swift
69083e0a8d3d5b0c3201299314abdf91922ddec8
3bc6ef2d4750f960ad9949f3f013b974d9c0d2df
refs/heads/master
2022-12-17T08:38:15.298537
2020-09-15T16:21:38
2020-09-15T16:21:38
257,670,359
0
0
null
null
null
null
UTF-8
Swift
false
false
2,418
swift
// // SceneDelegate.swift // Project7 // // Created by Manuel Teixeira on 08/05/2020. // Copyright © 2020 Manuel Teixeira. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let _ = (scene as? UIWindowScene) else { return } if let tabBarController = window?.rootViewController as? UITabBarController { let storyboard = UIStoryboard(name: "Main", bundle: nil) let viewController = storyboard.instantiateViewController(withIdentifier: "NavController") viewController.tabBarItem = UITabBarItem(tabBarSystemItem: .topRated, tag: 1) tabBarController.viewControllers?.append(viewController) } } 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. } }
[ 419536, 341094, 419518, 225071 ]
8f7758b884c16cc1f7f92b4f6187cb189fcfb307
51278f368d0db68127ad7456e6c42b3a9847b3ee
/Project3/Project1/DetailViewController.swift
db2ca2935746b84b2769a1e1645c92e8df20a16c
[]
no_license
MNasybullin/HackingWithSwift
7b45c6ff240da35792b8814db39e27818e2c6fc8
fd52d2ea0cdb90f9deda7201c2b9f8fb331b1cd4
refs/heads/master
2023-01-09T01:09:40.144913
2020-11-04T17:37:35
2020-11-04T17:37:35
292,903,673
0
0
null
null
null
null
UTF-8
Swift
false
false
2,008
swift
// // DetailViewController.swift // Project1 // // Created by Stomach Diego on 7/31/20. // Copyright © 2020 Mansur Nasybullin. All rights reserved. // import UIKit class DetailViewController: UIViewController { @IBOutlet var imageView: UIImageView! var selectedImage: String? var imageTitleString: String? override func viewDidLoad() { super.viewDidLoad() //title = selectedImage title = imageTitleString navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(shareTapped)) navigationItem.largeTitleDisplayMode = .never if let imageToLoad = selectedImage { imageView.image = UIImage(named: imageToLoad) } // Do any additional setup after loading the view. } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.hidesBarsOnTap = true } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) navigationController?.hidesBarsOnTap = false } @objc func shareTapped() { guard let image = imageView.image?.jpegData(compressionQuality: 1) else { print("No image found") return } let imageName = selectedImage let vc = UIActivityViewController(activityItems: [image, imageName as Any], applicationActivities: []) vc.popoverPresentationController?.barButtonItem = navigationItem.rightBarButtonItem present(vc, animated: 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. } */ }
[ 339433, 339437 ]
36d9ff001d7e007bdcec74796b2856cb053b9530
94e2e5b58db5447c136bcc0c3909c9ae6d0d0f36
/SharePlay2/playItemManager.swift
922b2bfee20fe42ab0e688306aa10b3d3657a34c
[]
no_license
xanxus1204/SharePlay10
382956daa0c7f10e641af380424b0404a856e121
73cfdb7fda25dcf5102047ee731a33992a0e84da
refs/heads/master
2020-02-26T15:43:48.221931
2018-03-01T09:15:44
2018-03-01T09:15:44
70,762,504
1
1
null
2017-03-10T08:59:38
2016-10-13T02:47:56
Objective-C
UTF-8
Swift
false
false
689
swift
// // playItemManager.swift // SharePlay2 // // Created by 椛島優 on 2016/12/05. // Copyright © 2016年 椛島優. All rights reserved. // import UIKit import MediaPlayer class playItemManager: NSObject { var playListUrl:[URL] = [] override init() { super.init() } init(withItems Items:MPMediaItemCollection){ for item in Items.items{ playListUrl.append(item.assetURL!) } } func addDummyUrl(){ playListUrl.append(URL(fileURLWithPath: "dummy")) } func addPlayItems(Items:MPMediaItemCollection) -> () { for item in Items.items{ playListUrl.append(item.assetURL!) } } }
[ -1 ]
e889700d2d7f7b081dfc90a7366e96a6de290836
a0889e8332d3c04364afc50f4b7b6f588ea55885
/FinalProject/FinalProject/AppDelegate.swift
d9b29603974740e942f19cf3515397ab4a082675
[]
no_license
AzizAlhaider/toDoList
b793326fcca9857f2785089b520a3c0d6ba5e538
1561ef719b45433b3140f3b89598c7701936018a
refs/heads/main
2023-01-04T06:55:47.166364
2020-10-24T14:01:12
2020-10-24T14:01:12
304,295,856
0
0
null
null
null
null
UTF-8
Swift
false
false
1,424
swift
// // AppDelegate.swift // FinalProject // // Created by Aziz Alhaider on 10/15/20. // Copyright © 2020 Aziz Alhaider. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 213048, 385081, 376889, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 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, 410128, 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, 164538, 328378, 328386, 352968, 344776, 418507, 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, 426841, 197468, 254812, 361309, 361315, 361322, 328573, 377729, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 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, 181654, 230809, 181670, 181673, 181678, 337329, 181681, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 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, 403075, 345736, 198280, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 337592, 419512, 419517, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 141051, 337668, 362247, 395021, 362255, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 329832, 329855, 329885, 411805, 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, 395566, 248111, 362822, 436555, 190796, 379233, 354673, 248186, 420236, 379278, 354727, 338352, 330189, 338381, 338386, 338403, 338409, 248308, 199164, 330252, 199186, 330267, 354855, 10828, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 436962, 338660, 338664, 264941, 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, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 158761, 396336, 199728, 330800, 396339, 339001, 388154, 388161, 347205, 330826, 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, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 249214, 175486, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 372163, 216517, 380360, 216522, 339404, 208337, 339412, 413141, 339417, 249308, 339420, 249312, 339424, 339428, 339434, 249328, 69113, 372228, 208398, 380432, 175635, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 421508, 224904, 224909, 11918, 159374, 224913, 126610, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 372499, 167700, 225043, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 257871, 225103, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 225148, 257916, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 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, 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, 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, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 349180, 439294, 209943, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 341113, 210044, 349308, 160895, 152703, 349311, 210052, 210055, 349319, 210067, 210071, 210077, 210080, 210084, 251044, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 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, 366061, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 333498, 333511, 210631, 358099, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 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, 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, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 350467, 325891, 350475, 375053, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 334203, 268668, 194941, 391563, 366990, 416157, 342430, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 350761, 252461, 383536, 358961, 334384, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 203506, 342776, 391937, 391948, 326416, 375568, 162591, 326441, 326451, 326454, 244540, 326460, 375612, 260924, 326467, 244551, 326473, 326477, 326485, 416597, 342874, 326490, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 359295, 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, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 384181, 367800, 351423, 326855, 244937, 253130, 343244, 146642, 359649, 343270, 351466, 351479, 343306, 261389, 359694, 384275, 245020, 245029, 171302, 351534, 376110, 245040, 212291, 384323, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 154999, 253303, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 425649, 155322, 425662, 155327, 155351, 155354, 212699, 155363, 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, 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, 393206, 393212, 155646 ]
d7603ee532e13055034aafc6965f062a60eb7b18
63c79a9875b280574fa8e643498fb3d3f76ca9ce
/SwiftLocalizeBuilder/AppDelegate.swift
c4c233f6c14f7d376740adc8787687ea75dfbc77
[]
no_license
githubliuming/SwiftLocalizeBuilder
d49b00bd34ab5bfeba3c25f1d49ed15480073aef
3f16d9f240b28e6434db9cf2ac5effd7740d4c70
refs/heads/master
2020-03-28T10:48:08.055873
2018-09-25T08:01:32
2018-09-25T08:01:32
148,146,332
0
0
null
null
null
null
UTF-8
Swift
false
false
632
swift
// // AppDelegate.swift // SwiftLocalizeBuilder // // Created by liuming on 2018/9/10. // Copyright © 2018年 yoyo. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { // Insert code here to initialize your application } func applicationWillTerminate(_ aNotification: Notification) { // Insert code here to tear down your application } func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } }
[ 33451, 242030, 224112, 285811, 234965, 127451, 282940, 136574 ]
a31c99635f6309e11be7f2a30029262252e59548
a67a1c5d7f53f755951ca662a1635bdd966d24ca
/Flixiago/Flixiago/Models/Media.swift
a58923a1c8dd1a07d8dfef3f818a851b70ed1e6e
[]
no_license
NorbertoTaveras/flixiagoios
14977c2280a85d6dfd8871ce7a1bdf0f104e806a
46017309dba4838f4ab578aa02d6c9dc6ceaf079
refs/heads/master
2023-05-10T05:39:56.003728
2021-06-08T00:42:18
2021-06-08T00:42:18
228,424,588
0
1
null
null
null
null
UTF-8
Swift
false
false
25,499
swift
// // Media.swift // Flixiago // // Created by Norberto Taveras on 12/16/19. // Copyright © 2019 Norberto Taveras. All rights reserved. // import Foundation import Alamofire import AlamofireObjectMapper import ObjectMapper public class Media: Mappable, ImageProvider { var id: Int64 = 0 var poster_path: String? var overview: String? var backdrop_path: String? var vote_count: Int? var vote_average: Float? public required init?(map: Map) { mapping(map: map) } public func mapping(map: Map) { id <- map["id"] poster_path <- map["poster_path"] overview <- map["overview"] backdrop_path <- map["backdrop_path"] vote_count <- map["vote_count"] vote_average <- map["vote_average"] } func getTitle() -> String { fatalError("Don't call super") } func getGenreIds() -> [Int64] { fatalError("Don't call super") } func getReleaseDate() -> Date? { fatalError("Don't call super") } func getSeasonEpisodeText() -> String? { fatalError("Don't call super") } static func formatDate(_ date: Date) -> String { return UIUtils.formatDate(from: date) } public func formatReleaseDate() -> String { let date = getReleaseDate() if let date = date { return Media.formatDate(date) } return "Release Date Unkown" } public static func formatGenreList( genreIds: [Int64], lookup: GenreList.GenreLookup) -> String { var genreNames: [String] = [] for id in genreIds { genreNames.append(lookup[id] ?? "Genre Unknown") } return genreNames.joined(separator: " • ") } func formatGenreList(lookup: GenreList.GenreLookup) -> String { let genreIds = getGenreIds() return Media.formatGenreList( genreIds: genreIds, lookup: lookup) } private func setImage(into: UIImageView, urlText: String?) { if let urlText = urlText, let url = URL(string: urlText) { into.kf.setImage(with: url) } else { into.image = nil } } func setBackdropImage(into: UIImageView) { if let poster_path = backdrop_path { let urlText = TMDBUrls.getBackdropUrl( forWidth: Float(into.frame.width), path: poster_path) setImage(into: into, urlText: urlText) } else { into.image = nil } } func setPosterImage(into: UIImageView) { if let poster_path = poster_path { let urlText = TMDBUrls.getPosterUrl( forWidth: Float(into.frame.width), path: poster_path) setImage(into: into, urlText: urlText) } else { into.image = nil } } static func parseDate(fromText: String?) -> Date? { guard let txt = fromText, txt.count == 10 else { return nil } // Decode "YYYY-MM-DD" // 0123456789 let ySt = txt.index(txt.startIndex, offsetBy: 0) let yEn = txt.index(txt.startIndex, offsetBy: 3) let mSt = txt.index(txt.startIndex, offsetBy: 5) let mEn = txt.index(txt.startIndex, offsetBy: 6) let dSt = txt.index(txt.startIndex, offsetBy: 8) let dEn = txt.index(txt.startIndex, offsetBy: 9) let yRange = ySt ... yEn let mRange = mSt ... mEn let dRange = dSt ... dEn let yt = txt[yRange] let mt = txt[mRange] let dt = txt[dRange] let y = Int(yt) let m = Int(mt) let d = Int(dt) var dc = DateComponents() dc.year = y dc.month = m dc.day = d let calendar = Calendar.current let result = calendar.date(from: dc) return result } public func getGenreList( callback: @escaping (TMDBService.GenreLookup?, Error?) -> Void) { fatalError("Don't call super") } public func getReviews( page: Int, callback: @escaping (ReviewResponse?, Error?) -> Void) { fatalError("Don't call super") } public func getCertification( callback: @escaping (String?, Error?) -> Void) { } public func getCast( callback: @escaping (CastResponse?, Error?) -> Void) { fatalError("Don't call super") } public func getTrailers( callback: @escaping (TrailersResponse?, Error?) -> Void) { fatalError("Don't call super") } public func getSimilar( page: Int, callback: @escaping ([Media]?, Error?) -> Void) { fatalError("Don't call super") } public func getDetailsRecord( callback: @escaping (Media?, Error?) -> Void) { fatalError("Don't call super") } public func getRunTime() -> Int { fatalError("Don't call super") } public func getSeasonCount() -> Int? { return nil } public func getImageUrl() -> String? { guard let poster_path = poster_path else { return nil } return TMDBUrls.getPosterUrl(forWidth: 107, path: poster_path) } public func getImageCaption() -> String? { return getTitle() } public func getImageRating() -> Float? { return vote_average ?? 0 } @discardableResult public func setupButton( kind: String, type: String, into button: UIButton) -> FavoriteRecord? { return FavoriteRecord.setupButton( kind: kind, type: type, id: id, into: button) } @discardableResult public func setupButton( kind: String, type: String, into image: UIImageView) -> FavoriteRecord? { return FavoriteRecord.setupButton( kind: kind, type: type, id: id, into: image) } public class FavoriteToggler: NSObject { let media: Media? let id: Int64? let kind: String let type: String let view: UIView init(kind: String, type: String, media: Media?, id: Int64?, into view: UIView) { self.kind = kind self.type = type self.media = media self.id = id self.view = view super.init() setupTap() } @objc public func toggleTapped(sender: UITapGestureRecognizer) { if let media = media { // Show and movie need the full media object if let button = view as? UIButton { media.toggle(kind: kind, into: button) } else if let imageView = view as? UIImageView { media.toggle(kind: kind, into: imageView) } } else if let id = id { // No detail needed FavoriteRecord.toggle( kind: kind, type: type, id: id, into: view) } else { fatalError("No idea what to do") } } func setupTap() { let tapGesture = UITapGestureRecognizer( target: self, action: #selector(toggleTapped)) view.isUserInteractionEnabled = true view.addGestureRecognizer(tapGesture) } } // Setup a favorite/watch button, and attach tap handlers public func autoButton( kind: String, into view: UIView) -> FavoriteToggler { let type = getMediaType() if let button = view as? UIButton { setupButton( kind: kind, type: type, into: button) } else if let imageView = view as? UIImageView { setupButton( kind: kind, type: type, into: imageView) } else { fatalError("Unhandled view type") } let toggler = FavoriteToggler( kind: kind, type: type, media: self, id: nil, into: view) return toggler } @discardableResult public func setupFavoriteButton( into button: UIButton) -> FavoriteRecord? { return setupButton(kind: "f", type: getMediaType(), into: button) } @discardableResult public func setupFavoriteButton( into image: UIImageView) -> FavoriteRecord? { return setupButton(kind: "f", type: getMediaType(), into: image) } @discardableResult public func setupWatchButton( into button: UIButton) -> FavoriteRecord? { return setupButton(kind: "w", type: getMediaType(), into: button) } @discardableResult public func setupWatchButton( into image: UIImageView) -> FavoriteRecord? { return setupButton(kind: "w", type: getMediaType(), into: image) } @discardableResult public func toggle( kind: String, into button: UIButton) -> FavoriteRecord? { return toggle(kind: kind, type: getMediaType(), into: button) } @discardableResult public func toggle( kind: String, into imageView: UIImageView) -> FavoriteRecord? { return toggle(kind: kind, type: getMediaType(), into: imageView) } @discardableResult public func toggleFavorite( into view: UIImageView) -> FavoriteRecord? { return toggle(kind: "f", into: view) } @discardableResult public func toggleFavorite( into button: UIButton) -> FavoriteRecord? { return toggle(kind: "f", into: button) } @discardableResult public func toggleWatch( into button: UIButton) ->FavoriteRecord? { return toggle(kind: "w", into: button) } @discardableResult public func toggleWatch( into image: UIImageView) -> FavoriteRecord? { return toggle(kind: "w", into: image) } @discardableResult public func toggle( kind: String, type: String, into view: UIView) -> FavoriteRecord? { var record = FavoriteRecord.get( kind: kind, type: type, id: id) let wasOn = record?.favorite ?? false record = FavoriteRecord.set( kind: kind, type: type, id: id, isFavorite: !wasOn) if let button = view as? UIButton { record = FavoriteRecord.setupButton( kind: kind, type: type, id: id, into: button) } else if let image = view as? UIImageView { record = FavoriteRecord.setupButton( kind: kind, type: type, id: id, into: image) } if let record = record { FirestoreService.set( kind: kind, type: type, media: self, id: nil, timestamp: record.timestamp, watched: !wasOn) { (error) in if error != nil { print(error as Any) } } } return record } public func getMediaType() -> String { fatalError("Don't call super") } public func getNoun(capitalize: Bool, plural: Bool) -> String { fatalError("Don't call super") } } public class Show: Media, TMDBRecord { var name: String? var first_air_date: String? var genre_ids: [Int64]? var genres: [Genre]? var number_of_episodes: Int? var number_of_seasons: Int? var seasons: [ShowSeason]? public static let type = "tv" public static let noun = "TV Show" public required init?(map: Map) { super.init(map: map) } public override func mapping(map: Map) { super.mapping(map: map) name <- map["name"] first_air_date <- map["first_air_date"] genres <- map["genres"] number_of_seasons <- map["number_of_seasons"] number_of_episodes <- map["number_of_episodes"] seasons <- map["seasons"] genre_ids <- map["genre_ids"] } public override func getTitle() -> String { return name ?? "<untitled>" } public override func getGenreIds() -> [Int64] { if let genre_ids = genre_ids { return genre_ids } genre_ids = [] for genre in genres ?? [] { genre_ids!.append(genre.id) } return genre_ids! } public override func getReleaseDate() -> Date? { return Media.parseDate(fromText: first_air_date) } public override func getCertification( callback: @escaping (String?, Error?) -> Void) { TMDBService.getShowCertification(id: id, callback: callback) } public override func getGenreList( callback: @escaping (TMDBService.GenreLookup?, Error?) -> Void) { TMDBService.getShowGenres(callback: callback) } public override func getReviews( page: Int, callback: @escaping (ReviewResponse?, Error?) -> Void) { TMDBService.getShowReviews( id: id, page: page, callback: callback) } public override func getCast( callback: @escaping (CastResponse?, Error?) -> Void) { TMDBService.getShowCast( id: id, callback: callback) } public override func getTrailers( callback: @escaping (TrailersResponse?, Error?) -> Void) { TMDBService.getShowTrailers( id: id, callback: callback) } public override func getSimilar( page: Int, callback: @escaping ([Media]?, Error?) -> Void) { TMDBService.getShowsSimilar( id: id, page: page, callback: callback) } public override func getSeasonEpisodeText() -> String? { return "\(number_of_seasons ?? 0) seasons • \(number_of_episodes ?? 0) episodes" } public var description: String { return "Show(\(getTitle()))" } public override func getDetailsRecord( callback: @escaping (Media?, Error?) -> Void) { TMDBService.getShowDetail(id: id, callback: callback) } // Returns the number of episodes public override func getRunTime() -> Int { return number_of_episodes ?? 0 } public override func getSeasonCount() -> Int? { return number_of_seasons } @discardableResult public override func setupFavoriteButton( into view: UIButton) -> FavoriteRecord? { return FavoriteRecord.setupButton( kind: "f", type: "tv", id: id, into: view) } @discardableResult public override func setupFavoriteButton( into view: UIImageView) -> FavoriteRecord? { return FavoriteRecord.setupButton( kind: "f", type: "tv", id: id, into: view) } @discardableResult public override func setupWatchButton( into view: UIButton) -> FavoriteRecord? { return FavoriteRecord.setupButton( kind: "w", type: "tv", id: id, into: view) } @discardableResult public override func setupWatchButton( into view: UIImageView) -> FavoriteRecord? { return FavoriteRecord.setupButton( kind: "w", type: "tv", id: id, into: view) } @discardableResult public override func toggle( kind: String, into button: UIButton) -> FavoriteRecord? { return toggle(kind: kind, type: "tv", into: button) } @discardableResult public override func toggle( kind: String, into image: UIImageView) -> FavoriteRecord? { return toggle(kind: kind, type: "tv", into: image) } public override func getMediaType() -> String { return "tv" } public override func getNoun(capitalize: Bool, plural: Bool) -> String { return (capitalize ? "TV Show" : "TV show") + (plural ? "s" : "") } } public class Movie: Media, TMDBRecord { var title: String? var genre_ids: [Int64]? var release_date: String? var runtime: Int? public static let type = "movie" public static let noun = "movie" public required init?(map: Map) { super.init(map: map) } public override func mapping(map: Map) { super.mapping(map: map) genre_ids <- map["genre_ids"] title <- map["title"] release_date <- map["release_date"] runtime <- map["runtime"] } public override func getTitle() -> String { return title ?? "Title Unknown" } public override func getGenreIds() -> [Int64] { return genre_ids ?? [] } public override func getReleaseDate() -> Date? { return Media.parseDate(fromText: release_date) } public override func getCertification( callback: @escaping (String?, Error?) -> Void) { TMDBService.getMovieCertification(id: id, callback: callback) } public override func getGenreList( callback: @escaping (TMDBService.GenreLookup?, Error?) -> Void) { TMDBService.getMovieGenres(callback: callback) } public override func getReviews( page: Int, callback: @escaping (ReviewResponse?, Error?) -> Void) { TMDBService.getMovieReviews( id: id, page: page, callback: callback) } public override func getCast( callback: @escaping (CastResponse?, Error?) -> Void) { TMDBService.getMovieCast( id: id, callback: callback) } public override func getTrailers( callback: @escaping (TrailersResponse?, Error?) -> Void) { TMDBService.getMovieTrailers( id: id, callback: callback) } public override func getSimilar( page: Int, callback: @escaping ([Media]?, Error?) -> Void) { TMDBService.getMoviesSimilar( id: id, page: page, callback: callback) } public override func getSeasonEpisodeText() -> String? { return " \(formatReleaseDate()) • \(runtime ?? 0) Minutes" } public var description: String { return "Movie(\(getTitle()))" } public override func getDetailsRecord( callback: @escaping (Media?, Error?) -> Void) { TMDBService.getMovieDetail( id: id, callback: callback) } // Returns the run time in minutes public override func getRunTime() -> Int { return runtime ?? 0 } public override func setupFavoriteButton( into view: UIImageView) -> FavoriteRecord? { return FavoriteRecord.setupFavoriteButton( type: "movie", id: id, into: view) } public override func setupWatchButton( into view: UIButton) -> FavoriteRecord? { return FavoriteRecord.setupWatchButton( type: "movie", id: id, into: view) } public override func setupWatchButton( into view: UIImageView) -> FavoriteRecord? { return FavoriteRecord.setupWatchButton( type: "movie", id: id, into: view) } public override func toggle( kind: String, into button: UIButton) -> FavoriteRecord? { return toggle(kind: kind, type: "movie", into: button) } public override func toggle( kind: String, into image: UIImageView) -> FavoriteRecord? { return toggle(kind: kind, type: "movie", into: image) } public override func getMediaType() -> String { return "movie" } public override func getNoun(capitalize: Bool, plural: Bool) -> String { return (capitalize ? Movie.noun.capitalized : Movie.noun) + (plural ? "s" : "") } } public class MoviesResponse: TMDBRecord { var page: Int = 0 var results: [Movie] = [] var total_results: Int = 0 var total_pages: Int = 0 public required init?(map: Map) { mapping(map: map) } public func mapping(map: Map) { page <- map["page"] results <- map["results"] total_results <- map["total_results"] total_pages <- map["total_pages"] } } public class ShowsResponse: TMDBRecord { var page: Int = 0 var results: [Show] = [] var total_results: Int = 0 var total_pages: Int = 0 public required init?(map: Map) { mapping(map: map) } public func mapping(map: Map) { page <- map["page"] results <- map["results"] total_results <- map["total_results"] total_pages <- map["total_pages"] } } public class ShowSeason: TMDBRecord, ImageProvider { var id: Int64 = 0 var air_date: String? var episode_count: Int? var name: String? var overview: String? var poster_path: String? var season_number: Int? public required init?(map: Map) { mapping(map: map) } public func mapping(map: Map) { id <- map["id"] air_date <- map["air_date"] episode_count <- map["episode_count"] name <- map["name"] overview <- map["overview"] poster_path <- map["poster_path"] season_number <- map["season_number"] } public func getImageUrl() -> String? { guard let poster_path = poster_path else { return nil } return TMDBUrls.getPosterUrl(forWidth: 72, path: poster_path) } public func getImageCaption() -> String? { return name } public func getImageRating() -> Float? { return nil } } public class ShowSeasonResponse: TMDBRecord, ImageProvider { var id: Int64? var episodes: [ShowEpisode]? var name: String? var poster_path: String? public required init?(map: Map) { mapping(map: map) } public func mapping(map: Map) { id <- map["id"] episodes <- map["episodes"] name <- map["name"] poster_path <- map["poster_path"] } public func getImageUrl() -> String? { guard let poster_path = poster_path else { return nil } return TMDBUrls.getPosterUrl( forWidth: 72, path: poster_path) } public func getImageCaption() -> String? { return name } public func getImageRating() -> Float? { return nil } } public class ShowEpisode: TMDBRecord, ImageProvider { var id: Int64 = 0 var air_date: String? var name: String? var overview: String? var vote_average: Float? var vote_count: Int64? var still_path: String? var episode_number: Int? public required init?(map: Map) { mapping(map: map) } public func mapping(map: Map) { id <- map["id"] air_date <- map["air_date"] name <- map["name"] overview <- map["overview"] vote_average <- map["vote_average"] vote_count <- map["vote_count"] still_path <- map["still_path"] episode_number <- map["episode_number"] } public func getImageUrl() -> String? { guard let still_path = still_path else { return nil } return TMDBUrls.getPosterUrl( forWidth: 72, path: still_path) } public func getImageCaption() -> String? { return name } public func getImageRating() -> Float? { return vote_average } public func autoButton(into view: UIView) -> Media.FavoriteToggler { FavoriteRecord.setupButton( kind: "e", type: "tv", id: id, into: view) let toggler = Media.FavoriteToggler( kind: "e", type: "tv", media: nil, id: id, into: view) return toggler } }
[ -1 ]
e3590cb4e16060d033efab0383559d0509cae36d
dc5d95a89cbda3030aaf3635662326c1cbc81ddb
/spotify-home/SpotifyClone/View/Sections/GenericCardSection.swift
8508d02c09dc2f83e2993818c5d8f762d3d9f0cf
[ "MIT" ]
permissive
kb23b/swiftui.builds
2200a0548a04424d5229fcfbf55cc5f2715e269e
efc7a6b1545ca4ffd3af8f6e25680de342783557
refs/heads/master
2023-03-06T18:06:13.623395
2021-02-22T17:20:31
2021-02-22T17:20:31
null
0
0
null
null
null
null
UTF-8
Swift
false
false
746
swift
// // GenericCardSection.swift // SpotifyClone // // Created by Franck-Stephane Ndame Mpouli on 03/08/2020. // import SwiftUI struct GenericCardSection: View { var data: [GenericContent] var body: some View { ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 16) { ForEach(data) { item in GenericCard(data: item) } } .padding() .padding(.top, -16) } } } struct GenericCardSection_Previews: PreviewProvider { static var previews: some View { GenericCardSection(data: GenericContent.podcastsData) .previewLayout(.sizeThatFits) .background(Color.black) } }
[ -1 ]
a6cbf6afc82c2bf303081dce384f8f45f93cf86d
8477a407c041dda702231d44b0b571382d1cb505
/UIControls/UITextView/UITextView/ViewController.swift
d10aa08d10e2ab0a3246ecc1d6623325e7be9ae7
[]
no_license
dranhovskyi/SwiftBook
a13d94766988346c029c526c8a02ceb2239e2da4
adcf21bb43ce458e04f1b7d3f572f5a260f573ff
refs/heads/master
2023-08-24T16:28:23.874523
2021-09-26T11:26:55
2021-09-26T11:26:55
326,463,391
1
0
null
null
null
null
UTF-8
Swift
false
false
4,904
swift
// // ViewController.swift // UITextView // // Created by Nazar Dranhovskyi on 14.08.2021. // import UIKit class ViewController: UIViewController { @IBOutlet weak var countLabel: UILabel! @IBOutlet weak var textView: UITextView! @IBOutlet weak var textViewButtomConstraint: NSLayoutConstraint! @IBOutlet weak var stepperControl: UIStepper! @IBOutlet weak var activityIndicator: UIActivityIndicatorView! @IBOutlet weak var progressView: UIProgressView! override func viewDidLoad() { super.viewDidLoad() textView.delegate = self textView.backgroundColor = self.view.backgroundColor textView.font = UIFont(name: "AppleSDGothicNeo-Regular", size: 17) textView.layer.cornerRadius = 10 textView.isHidden = true //textView.alpha = 0 activityIndicator.hidesWhenStopped = true activityIndicator.color = #colorLiteral(red: 0.2196078449, green: 0.007843137719, blue: 0.8549019694, alpha: 1) activityIndicator.startAnimating() progressView.setProgress(0, animated: true) Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block: { _ in if self.progressView.progress != 1 { self.progressView.progress += 0.2 } else { self.activityIndicator.stopAnimating() self.textView.isHidden = false self.stepperControl.isUserInteractionEnabled = true self.progressView.isHidden = true } }) stepperControl.value = 17 stepperControl.minimumValue = 10 stepperControl.maximumValue = 25 stepperControl.tintColor = .white stepperControl.backgroundColor = .gray stepperControl.layer.cornerRadius = 5 stepperControl.isUserInteractionEnabled = false // UIView.animateKeyframes(withDuration: 0, delay: 3, options: .allowUserInteraction, animations: { self.textView.alpha = 1 }) { (finished) in // self.activityIndicator.stopAnimating() // self.textView.isHidden = false // self.stepperControl.isUserInteractionEnabled = true // } NotificationCenter.default.addObserver(self, selector: #selector(updateTextView(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(updateTextView(notification:)), name: UIResponder.keyboardWillHideNotification, object: nil) } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { super.touchesBegan(touches, with: event) self.view.endEditing(true) // textView.resignFirstResponder() // скрывает клавиатуру для вызваного елемента } @objc func updateTextView(notification: Notification) { guard let userInfo = notification.userInfo as? [String: Any], let keyboardFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue else { return } if notification.name == UIResponder.keyboardWillHideNotification { textView.contentInset = UIEdgeInsets.zero } else if notification.name == UIResponder.keyboardWillShowNotification { textView.contentInset = UIEdgeInsets.init(top: 0, left: 0, bottom: keyboardFrame.height - textViewButtomConstraint.constant, right: 0) textView.scrollIndicatorInsets = textView.contentInset } textView.scrollRangeToVisible(textView.selectedRange) } @IBAction func changeFont(_ sender: UIStepper) { let font = textView.font?.fontName let fontSize = CGFloat(sender.value) textView.font = UIFont(name: font!, size: fontSize) } } extension ViewController: UITextViewDelegate { func textViewDidBeginEditing(_ textView: UITextView) { textView.backgroundColor = .white textView.textColor = .gray } func textViewDidEndEditing(_ textView: UITextView) { textView.backgroundColor = self.view.backgroundColor textView.textColor = .black } func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { countLabel.text = "\(textView.text.count)" return textView.text.count + (text.count - range.length) <= 500 } }
[ -1 ]
6debbb866bc2da2acb9722e72f19a43e51803324
eec7fedcdb75491f1978c1b9eca0ec4192f06557
/WeatherAPPUI/View/Home.swift
7965bcafeb57753c5fe8dcf162a0642dae1bf078
[]
no_license
Zyf210304/WeatherAPPUI
611137fa72e5eea9cd8469625849e8c50313d141
166fe98fb7c1e78ef0cebe91e4ecee40f4359690
refs/heads/main
2023-06-06T15:04:02.139754
2021-06-19T02:19:21
2021-06-19T02:19:21
377,732,710
2
0
null
null
null
null
UTF-8
Swift
false
false
8,640
swift
// // Home.swift // WeatherAPPUI // // Created by 张亚飞 on 2021/6/17. // import SwiftUI import SpriteKit struct Home: View { @State var offset: CGFloat = 0 var topEdge: CGFloat // to avoid early starting of landing animation @State var showRain = true //were goingt to delay start it var body: some View { ZStack { GeometryReader { proxy in Image("sky") .resizable() .aspectRatio(contentMode: .fill) .frame(width: proxy.size.width, height: proxy.size.height, alignment: .center) } .ignoresSafeArea() .overlay(.ultraThinMaterial) //Rain fall view GeometryReader{ _ in SpriteView(scene: RainFall(), options: [.allowsTransparency]) } .ignoresSafeArea() .opacity(showRain ? 1 : 0) // mianview .. ScrollView(.vertical, showsIndicators: false) { VStack { //weather Data... VStack(alignment: .center, spacing: 5) { Text("San Jose") .font(.system(size: 25)) .foregroundColor(.white) .shadow(radius: 5) Text(" 90° ") .font(.system(size: 45)) .foregroundColor(.white) .shadow(radius: 5) .opacity(getTitleOpactiy()) Text("Cloudy") .foregroundStyle(.secondary) .foregroundColor(.white) .shadow(radius: 5) .opacity(getTitleOpactiy()) Text("H:113° L:105°") .foregroundStyle(.primary) .foregroundColor(.white) .shadow(radius: 5) .opacity(getTitleOpactiy()) } .offset(y: -offset) //For bottom drag effect... .offset(y: offset > 0 ? (offset / UIScreen.main.bounds.width) * 100 : 0) .offset(y: getTitleOffset()) //custome data view... VStack(spacing: 8) { //custom Stack CustomStackView { // label Here... Label { Text("Hourly Forecast") } icon: { Image(systemName: "clock") } } contentView: { //content... ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 15) { ForecastView(time:"12 AM", celcius: 97, image: "sun.min") ForecastView(time:"1 PM", celcius: 97, image: "sun.haze") ForecastView(time:"2 PM", celcius: 97, image: "sun.min") ForecastView(time:"3 PM", celcius: 97, image: "cloud.sun") ForecastView(time:"4 PM", celcius: 97, image: "sun.haze") ForecastView(time:"5 PM", celcius: 97, image: "sun.haze") ForecastView(time:"6 PM", celcius: 97, image: "sun.haze") } } } WeatherDataView() } .background { GeometryReader{ _ in SpriteView(scene: RainFallLanding(), options: [.allowsTransparency]) .offset(y: -10) } .offset(y: -(offset + topEdge) > 60 ? -(offset + (60 + topEdge)) : 0) .opacity(showRain ? 1 : 0) } } .padding(.top, 25) .padding(.top, topEdge) .padding([.horizontal, .bottom]) //getting offset .overlay( GeometryReader { proxy -> Color in let minY = proxy.frame(in: .global).minY DispatchQueue.main.async { self.offset = minY print("++++++++++++++\(minY + topEdge)") } return Color.clear } ) } } } func getTitleOpactiy() -> CGFloat { let titleOffset = -getTitleOffset() let progress = titleOffset / 20 let opacity = 1 - progress return opacity } func getTitleOffset() -> CGFloat { //setting one max height for whole title... //consider max as 120... if offset < 0 { let progress = -offset / 120 let newOffset = (progress <= 1.0 ? progress : 1) * 20 return -newOffset } return 0 } } struct Home_Previews: PreviewProvider { static var previews: some View { ContentView() } } struct ForecastView: View { var time: String var celcius: CGFloat var image: String var body: some View { VStack(spacing: 15) { Text(time) .font(.callout.bold()) .foregroundStyle(.white) Image(systemName: image) .font(.title2) // multicolor .symbolVariant(.fill) .symbolRenderingMode(.palette) .foregroundStyle(.yellow, .white) .frame(height: 30) Text("\(Int(celcius))°") .font(.callout.bold()) .foregroundStyle(.white) } .padding(.horizontal, 10) } } // going to create Rain/Snow effect Like ios 15 weather app.... // sprite kit rain scene class RainFall: SKScene { override func sceneDidLoad() { size = UIScreen.main.bounds.size scaleMode = .resizeFill //anchor point anchorPoint = CGPoint(x: 0.5, y: 1) //bg color backgroundColor = .clear // creating node and adding to scene... let node = SKEmitterNode(fileNamed: "RainFall.sks")! addChild(node) //full Width node.particlePositionRange.dx = UIScreen.main.bounds.width } } // next rain fall landing scene... class RainFallLanding: SKScene { override func sceneDidLoad() { size = UIScreen.main.bounds.size scaleMode = .resizeFill let height = UIScreen.main.bounds.height //geting percentage by eminiationg postion range... //anchor point anchorPoint = CGPoint(x: 0.5, y: (height - 5) / height) //bg color backgroundColor = .clear // creating node and adding to scene... let node = SKEmitterNode(fileNamed: "RainFallLanding.sks")! addChild(node) //Romoved for card padding node.particlePositionRange.dx = UIScreen.main.bounds.width - 30 } }
[ -1 ]
9ee0c53dd28732b65186a74baa9585f5ffaf197d
c78784dfb8e1e1cd3558f9381474eab273b9bbc6
/AddressBook/AddressBook/ViewController.swift
f73b9731041793da3d00a3bc90643a6ae750079c
[ "MIT" ]
permissive
alreadyRight/Swift-algorithm
d5b16b1570b15129c037e48c236b8572a746ea78
bd6d96516eb7f9c354f3a7b8bc77f0aa4be2ef33
refs/heads/master
2021-08-29T14:10:36.089429
2017-12-14T02:30:50
2017-12-14T02:30:50
107,658,496
0
0
null
null
null
null
UTF-8
Swift
false
false
2,463
swift
// // ViewController.swift // AddressBook // // Created by 周冰烽 on 2017/12/11. // Copyright © 2017年 周冰烽. All rights reserved. // import UIKit class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { private var arr:Array<[String:String]> = [] private var selfTableView = UITableView() override func viewWillAppear(_ animated: Bool) { setNormalValues() } override func viewDidLoad() { super.viewDidLoad() navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(clickAdd)) let tableView = UITableView(frame: CGRect(x: 0, y: 64, width: view.frame.size.width, height: view.frame.size.height - 64), style: .plain) tableView.delegate = self tableView.dataSource = self view.addSubview(tableView) selfTableView = tableView } func setNormalValues() -> Void { let ud = UserDefaults.standard guard let tArr: Array<[String : String]> = ud.object(forKey: "addressBook") as? Array<[String:String]> else { return } arr = tArr selfTableView.reloadData() } func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return arr.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { var cell = tableView.dequeueReusableCell(withIdentifier: "cellID") if cell == nil { cell = UITableViewCell(style: .subtitle, reuseIdentifier: "cellID") } cell?.selectionStyle = .none cell?.textLabel?.text = arr[indexPath.row]["name"] cell?.detailTextLabel?.text = arr[indexPath.row]["phone"] return cell! } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let detailVC = DetailViewController() detailVC.status = 1 detailVC.name = arr[indexPath.row]["name"] detailVC.phone = arr[indexPath.row]["phone"] detailVC.address = arr[indexPath.row]["address"] navigationController?.pushViewController(detailVC, animated: true) } @objc func clickAdd()->Void{ let detailVC = DetailViewController() navigationController?.pushViewController(detailVC, animated: true) } }
[ -1 ]
c120b86eec7dc580c552b7800ff4ac7da84da3e7
d5f107b4a159f7c4b58be741d73894f90ff6ebfc
/Third Eye/RegisterViewController.swift
01835f3247fbd2d42bd8eddd85a9b29022bbdc4a
[]
no_license
andrewholliday/ThirdEye
e098e77d6f9aefffb324d6d4175767ab84d75cf1
27294142a94616d4f4c926d4bf079bd8f34bf0e3
refs/heads/master
2016-08-12T05:15:38.600884
2015-11-10T04:14:23
2015-11-10T04:14:23
45,810,729
0
0
null
null
null
null
UTF-8
Swift
false
false
2,160
swift
// // RegisterViewController.swift // Third Eye // // Created by Admin on 10/8/15. // Copyright (c) 2015 Admin. All rights reserved. // import UIKit import CoreLocation class RegisterViewController: UIViewController, UITextFieldDelegate { @IBOutlet weak var sldDistance: UISlider! @IBOutlet weak var txtChildName: UITextField! @IBOutlet weak var lblMajor: UILabel! @IBOutlet weak var lblMinor: UILabel! @IBOutlet weak var lblDistance: UILabel! var SelectedTag:Tag? // required init(coder aDecoder: NSCoder) { // super.init(coder: aDecoder) // // fatalError("init(coder:) has not been implemented") // } override func viewDidLoad() { super.viewDidLoad() lblDistance.text = "5" sldDistance.value = 5 lblMajor.text = String(SelectedTag!.major) lblMinor.text = String(SelectedTag!.minor) txtChildName.delegate = self // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resousrces that can be recreated. } func textFieldShouldReturn(textField: UITextField) -> Bool // called when 'return' key pressed. return NO to ignore. { txtChildName.resignFirstResponder() return true; } @IBAction func onDistanceChanged(sender: UISlider) { lblDistance.text = String(Int(sender.value)) } @IBAction func onRegisterChildClick(sender: AnyObject) { // // var b = Tag(uuid: self.SelectedBeacon.proximityUUID, // major: Int(self.SelectedBeacon.major), // minor: Int(self.SelectedBeacon.minor)) var newTag = RegisteredTag(name: txtChildName.text!, alarmDistance: Int(sldDistance.value), uuid: self.SelectedTag!.uuid, major: self.SelectedTag!.major, minor: self.SelectedTag!.minor) TagManager.Service.AddTag(newTag) performSegueWithIdentifier("RegisteredTagSegue", sender: sender) } }
[ -1 ]
2cdaa0c9bec5b47e31d8b4aa1f884786e6c05eb0
d128ee6f90470911ac7f29700fd2400c939691c3
/GitUseExample/ViewController.swift
637714075c1393f884043d91f78caf8b1e9dfbc2
[]
no_license
howhyone/GitUseExample-master
4fbc0de38291f12f5516a47d75c80ccfc18f003c
74dd739e29813c2ae5dbf392fa295202b4f5dd3a
refs/heads/master
2020-03-23T07:20:16.982156
2018-07-17T09:10:23
2018-07-17T09:10:23
141,264,740
0
0
null
null
null
null
UTF-8
Swift
false
false
499
swift
// // ViewController.swift // GitUseExample // // Created by mob on 2018/7/17. // Copyright © 2018年 mob. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() print("This is a Git tutorial") print("all is a dream") } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ 311045, 284005, 187882, 233869, 229712, 284310, 283032, 283035, 283036 ]
d696783eb1fdee59f215feb68807de956f7b9d56
29113312795c827983fee718bc1334a96ea6d54a
/Delegates and Protocols/Delegates and Protocols/SecondViewController.swift
239e8af697a80685b6a0d4fabf150c860dd29e8c
[]
no_license
JasneetC/iOS-12-Course
1fe626c7c9055336a290d080e5efe757f2cf4bce
33fe4cc1b7c590622f3eba01ed142f91653b5a55
refs/heads/master
2020-04-28T19:57:02.496831
2019-03-27T15:13:29
2019-03-27T15:13:29
175,495,129
0
0
null
null
null
null
UTF-8
Swift
false
false
1,055
swift
// // SecondViewController.swift // Delegates and Protocols // // Created by Jasneet Singh on 3/1/19. // Copyright © 2019 Jasneet Singh. All rights reserved. // import UIKit protocol CanReceive { func dataReceived(data: String) } class SecondViewController: UIViewController { var delegate : CanReceive? //setting delegate CanReceive - it is an optional var data = "" //setting variable data to an empty string so it can be used for input of textField from firstViewCon @IBOutlet weak var label: UILabel! @IBOutlet weak var textField: UITextField! override func viewDidLoad() { super.viewDidLoad() label.text = data //setting label of SecondVC to display data that was inputted on firstVC } @IBAction func sendDataBack(_ sender: Any) { delegate?.dataReceived(data: textField.text!) //setting button to trigger data to send to delegate, if it is not nil dismiss(animated: true, completion: nil) } }
[ -1 ]
0d575a07e570a63814754cdadb1bcb07753eb3d5
c278e8ad0ad64ccd49063c55f689cba9e35e986a
/Classes/Models/Weather Data/HourlyForecast.swift
e38b8c8c9d56de1b1208d7f1ca79832de51c5d10
[ "MIT" ]
permissive
penguinbee/RxOpenWeatherMap
fa88498a51ecc6e7830542e11dd93856ff5d3f2f
9a7bd940289df41077a3d543cf9cd8bf2217d34d
refs/heads/main
2023-06-03T12:38:40.874601
2021-06-19T09:29:30
2021-06-19T09:29:30
378,369,129
0
0
MIT
2021-06-19T09:04:51
2021-06-19T09:04:50
null
UTF-8
Swift
false
false
1,065
swift
// // Forecast.swift // WeatherApp-MVVMC // // Created by Greener Chen on 2021/2/26. // import Foundation public struct HourlyForecast: Codable { public let dt: TimeInterval public let temparature: Float public let feelsLike: Float public let pressure: Int public let humidity: Int public let dewPoint: Float public let uvi: Float public let clouds: Int public let visibility: Int public let windSpeed: Float public let windDegree: Int public let weather: [Weather] public let pop: Float // Probability of precipitation public let rain: Rain? public let snow: Snow? enum CodingKeys: String, CodingKey { case dt case temparature = "temp" case feelsLike = "feels_like" case pressure case humidity case dewPoint = "dew_point" case uvi case clouds case visibility case windSpeed = "wind_speed" case windDegree = "wind_deg" case weather case pop case rain case snow } }
[ -1 ]
ac372fbe28dfd31d5100c0f330ed62226b121c0a
945cb5c081a27fd0811c141e2ce4d24950c8add5
/GitTest/Controllers/DetailRepoViewController.swift
b14e99cd0e8291d022a127835e8d0213696a40f2
[]
no_license
eStoyann/GitApp
21c6247e4733bd30fd7dac7a3a98d4b59fa0e727
64e5e18bce8c467c0f1b0e06d933b7919d1a64c9
refs/heads/master
2020-04-07T12:16:48.659735
2018-11-20T09:47:49
2018-11-20T09:47:49
155,854,403
0
0
null
null
null
null
UTF-8
Swift
false
false
3,310
swift
// // DetailRepoViewController.swift // GitTest // // Created by Evgeniy on 10/30/18. // Copyright © 2018 com.gmail.1001stoyanhik. All rights reserved. // import UIKit import CoreData class DetailRepoViewController: UIViewController { //MARK: - Outlets @IBOutlet private weak var titleRepo: UILabel! @IBOutlet private weak var descriptionRepo: UILabel! @IBOutlet private weak var languageRepo: UILabel! @IBOutlet private weak var starsRepo: UILabel! @IBOutlet private weak var watchersRepo: UILabel! @IBOutlet private weak var forksRepo: UILabel! @IBOutlet private weak var createdRepo: UILabel! @IBOutlet private weak var updatedRepo: UILabel! @IBOutlet private weak var pushedRepo: UILabel! @IBOutlet private weak var addToDBBtnOutlt: UIBarButtonItem! //MARK: Private property private var objectInDBis = false { didSet { self.addToDBBtnOutlt.title = objectInDBis ? "-" : "+" } } //MARK: Public property var repoModel: RepoElement? { didSet { checkRepoInDB() configureUI() } } var context: NSManagedObjectContext? = (UIApplication.shared.delegate as! AppDelegate).backgoundContext { didSet { checkRepoInDB() } } //MARK: - Lifecycle override func viewDidLoad() { super.viewDidLoad() configureUI() } //MARK: - Action @IBAction func addToDBBtn(_ sender: UIBarButtonItem) { if let repo = repoModel, let context = self.context { if objectInDBis { CoreDataManager.shared.delete(objects: [repo], context: context) { [weak self] in guard let _self = self else { return } _self.checkRepoInDB() } } else { CoreDataManager.shared.create(objects: [repo], context: context) { [weak self] in guard let _self = self else { return } _self.checkRepoInDB() } } } } //MARK: Private method private func configureUI() { self.titleRepo?.text = repoModel?.name ?? "No Name" self.descriptionRepo?.text = repoModel?.description ?? "No description" self.languageRepo?.text = repoModel?.language ?? "No language" self.starsRepo?.text = numberFormatter.string(from: NSNumber(value: repoModel?.watchers ?? 0)) self.watchersRepo?.text = numberFormatter.string(from: NSNumber(value: repoModel?.watchers ?? 0)) self.forksRepo?.text = numberFormatter.string(from: NSNumber(value: repoModel?.forks ?? 0)) self.createdRepo?.text = dateFormatter.string(from: repoModel?.created ?? Date()) self.updatedRepo?.text = dateFormatter.string(from: repoModel?.updated ?? Date()) self.pushedRepo?.text = dateFormatter.string(from: repoModel?.pushed ?? Date()) } private func checkRepoInDB() { guard let repo = self.repoModel, let context = self.context else { return } CoreDataManager.shared.find(objects: [repo], context: context) { [weak self] (data) in guard let _self = self else { return } DispatchQueue.main.async { _self.objectInDBis = !data.isEmpty } } } }
[ -1 ]
5b2a48d8e77bbbb4af1c43941a3ef93757d1576a
59889ff87f70c2315b2536a10479cbe0dacbd4eb
/CryptoTrackerTests/API Request Tests/CryptoGetAllCurrenciesRequestTests.swift
5008f9d16423710cf47238c0777efb8091512d61
[]
no_license
chrisczupak/CrypoTracker
7919944415bd6b8fd768ecddddb4d8d49d215d94
3666eec40ff8895be64b63f6f15ca26b08bf7f41
refs/heads/master
2020-03-21T06:52:35.129538
2018-06-22T02:57:24
2018-06-22T02:57:24
138,246,565
0
0
null
null
null
null
UTF-8
Swift
false
false
1,847
swift
// // CryptoGetAllCurrenciesRequest.swift // CryptoTrackerTests // // Created by Christopher Czupak on 6/19/18. // Copyright © 2018 Christopher Czupak. All rights reserved. // import XCTest @testable import Alamofire @testable import BrightFutures @testable import CryptoTracker class CryptoGetAllCurrenciesAPIRequestTests: XCTestCase { func test_Initializer() { let request = CryptoGetAllCurrenciesRequest() XCTAssertEqual(request.method, .get) XCTAssertEqual(request.relativePath, "/assets") XCTAssertEqual(request.absolutePath, "https://api.cryptowat.ch/assets") XCTAssertNotNil(request.encoding) XCTAssertNil(request.headers) XCTAssertNil(request.parameters) } func test_Mapper() { let json: JSON = [ "result": [ [ "symbol": "eth", "name": "Ethereum", "fiat": false, "route": "https://api.cryptowat.ch/assets/etc" ], [ "symbol": "btc", "name": "Bitcoin", "fiat": false, "route": "https://api.cryptowat.ch/assets/btc" ], ] ] let response = CryptoGetAllCurrenciesRequest.map(from: json) XCTAssertNotNil(response.value) let allCurrencies = response.value! XCTAssertEqual(allCurrencies.count, 2) let ethereum = Cryptocurrency(name: "Ethereum", symbol: "eth", price: "Unavailable") let bitcoin = Cryptocurrency(name: "Bitcoin", symbol: "btc", price: "Unavailable") XCTAssertEqual(allCurrencies.first!, ethereum) XCTAssertEqual(allCurrencies.last!, bitcoin) } }
[ -1 ]
ff6e9048873c614934b9d9b94bfe615f71b52074
22c1751a28c9651ad4e31116f9778173b9f2e12a
/AlfaOnePositiv/LoginVIewController.swift
de40ecfcc43cfc02afea0779094f470501dca9a0
[]
no_license
toha827/AlfaHR
73af023e325725dd9691afb8d702fa3092ef3281
20980f52eb998e551e9c6560f2b49ccb423972a7
refs/heads/master
2020-06-23T23:56:16.248357
2019-07-25T15:21:51
2019-07-25T15:21:51
198,776,907
0
0
null
null
null
null
UTF-8
Swift
false
false
1,649
swift
// // ViewController.swift // AlfaOnePositiv // // Created by санжар on 17.07.2019. // Copyright © 2019 Aktilek. All rights reserved. // import UIKit class LoginViewController: UIViewController { var loginView : LoginView! override func viewDidLoad() { super.viewDidLoad() setupView() } func setupView(){ //let imageLogo = createLogoImage(image: #imageLiteral(resourceName: "alfa_logo.png"), size: view.frame.width/2) let mainView = LoginView(frame: self.view.frame) self.loginView = mainView self.view.addSubview(loginView) // self.view.addSubview(imageLogo) self.view.backgroundColor = UIColor.white loginView.setAnchor(top: view.topAnchor, left: view.leftAnchor, bottom: view.bottomAnchor, right: view.rightAnchor, paddingTop: 0, paddingLeft: 0, paddingBottom: 0, paddingRight: 0) self.loginView.loginAction = loginPressed self.loginView.signUpAction = signUpPressed // imageLogo.bottomAnchor.constraint(equalTo: loginView.emailTextField.topAnchor).isActive = true // imageLogo.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true } func loginPressed() { } func signUpPressed() { let signUpController = RegistrationViewController() present(signUpController,animated: true,completion: nil) } }
[ -1 ]
7711a5cb2b70acf29ff91413195144cc85a7a5ca
6002f0e180ae57d6d48edc3ab92e21121eef68b0
/HeightMapAR/PubgAPI/Models/Match/MatchShardID.swift
b0d94e5df4eac9e9adea15744a2b30cb83dbc671
[ "Apache-2.0" ]
permissive
TrGiLong/AR-Match-Replays-for-PUBG
f0942fa069159cfca3e91c8f6eeee82e621dd1af
155d43b55015c7e4e490b477742a50b397e4105a
refs/heads/master
2023-06-27T15:05:27.209739
2021-08-02T13:39:33
2021-08-02T13:39:33
197,818,667
0
0
null
null
null
null
UTF-8
Swift
false
false
83
swift
import Foundation enum MatchShardID: String, Codable { case steam = "steam" }
[ -1 ]
32069a38fbe81ebb04118f7f64835b24a00f2308
f2fc1fd2c6cf9872baa21e03b0c84297cb6ec519
/5.CollectionView/Flickr/FlickrSearchResults.swift
1a362249f5441fb076454f9171a3d4ad1f3b0529
[]
no_license
mobiledevclass2019/5.CollectionView
20487970ee63c0d9ad9d38f40a88063b526afb2e
7592181a0e64e775e0284e13129eafb6dbdd096c
refs/heads/master
2020-09-22T04:21:18.957931
2019-11-30T17:31:55
2019-11-30T17:31:55
225,046,985
0
0
null
null
null
null
UTF-8
Swift
false
false
114
swift
import Foundation struct FlickrSearchResults { let searchTerm: String var searchResults: [FlickrPhoto] }
[ -1 ]
9954b6703e4c6cd91904cb625ede7360db5cb0bf
b1c06c131649d80ae1a8f5234d50c17b97162f4c
/poohColor/ViewController.swift
59087004dcb960674131afc2e5199e4fe100dd7d
[]
no_license
twber/poohColor
6ff4f336fd820d26866d8c328d3cb77f7d5abd7b
111f221579ae18f2cc30506bc45c1bf6f0081432
refs/heads/main
2022-12-14T13:26:40.834187
2020-08-20T08:39:52
2020-08-20T08:39:52
288,950,264
0
0
null
null
null
null
UTF-8
Swift
false
false
6,903
swift
// // ViewController.swift // changeColor // // Created by Bernice TSAI on 2020/8/18. // import UIKit class ViewController: UIViewController { @IBOutlet weak var colorLabel: UILabel! @IBOutlet weak var gradientView: UIImageView! @IBOutlet weak var poohImageView: UIImageView! @IBOutlet weak var patternImageView: UIImageView! @IBOutlet weak var alphaSlider: UISlider! @IBOutlet weak var blueSlider: UISlider! @IBOutlet weak var greenSlider: UISlider! @IBOutlet weak var redSlider: UISlider! @IBOutlet weak var sliderRedDown: UISlider! @IBOutlet weak var sliderGreenDown: UISlider! @IBOutlet weak var sliderBlueDown: UISlider! @IBOutlet weak var sliderAlphaDown: UISlider! @IBOutlet weak var borderSlider: UISlider! let gradientLayer = CAGradientLayer() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func colorChangeSlider(_ sender: Any) { gradientLayer.frame = gradientView.bounds //讓所有控制顏色的 Slider 數值填入對應位置 gradientLayer.colors = [CGColor(red: CGFloat(redSlider.value), green: CGFloat(greenSlider.value), blue: CGFloat(blueSlider.value), alpha: CGFloat(alphaSlider.value)),CGColor(red: CGFloat(sliderRedDown.value), green: CGFloat(sliderGreenDown.value), blue: CGFloat(sliderBlueDown.value), alpha: CGFloat(sliderAlphaDown.value))] //gradientMiddleSlider只有調整中間區塊,數值放在中間位置 gradientLayer.locations = [0.5, NSNumber(value: borderSlider.value) , 1] gradientView.layer.addSublayer(gradientLayer) gradientView.bounds = poohImageView.frame gradientView.addSubview(poohImageView) colorLabel.text = "無庫存" //poohImageView.backgroundColor = UIColor(red: CGFloat(redSlider.value), green: CGFloat(greenSlider.value), blue: CGFloat(blueSlider.value), alpha: CGFloat(alphaSlider.value)) } @IBAction func randomChange(_ sender: Any) { //定義亂數 redSlider.value = Float.random(in: 0...1) greenSlider.value = Float.random(in: 0...1) blueSlider.value = Float.random(in: 0...1) //alphaSlider.value = Float.random(in: 0.5...1) sliderRedDown.value = Float.random(in: 0...1) sliderGreenDown.value = Float.random(in: 0...1) sliderBlueDown.value = Float.random(in: 0...1) //sliderAlphaDown.value = Float.random(in: 0.5...1) borderSlider.value = Float.random(in: 0.5...1) //以下與colorChangeSlider 同 gradientLayer.frame = gradientView.bounds //讓所有控制顏色的 Slider 數值填入對應位置 gradientLayer.colors = [CGColor(red: CGFloat(redSlider.value), green: CGFloat(greenSlider.value), blue: CGFloat(blueSlider.value), alpha: CGFloat(alphaSlider.value)),CGColor(red: CGFloat(sliderRedDown.value), green: CGFloat(sliderGreenDown.value), blue: CGFloat(sliderBlueDown.value), alpha: CGFloat(sliderAlphaDown.value))] //gradientMiddleSlider只有調整中間區塊,數值放在中間位置 gradientLayer.locations = [0.5, NSNumber(value: borderSlider.value) , 1] gradientView.layer.addSublayer(gradientLayer) gradientView.bounds = poohImageView.frame gradientView.addSubview(poohImageView) colorLabel.text = "無庫存" //poohImageView.backgroundColor = UIColor(red: CGFloat(redSlider.value), green: CGFloat(greenSlider.value), blue: CGFloat(blueSlider.value), alpha: CGFloat(alphaSlider.value)) } @IBAction func redButton(_ sender: UIButton) { sliderRedDown.value = 255/255 sliderGreenDown.value = 192/255 sliderBlueDown.value = 203/255 sliderAlphaDown.value = 1 borderSlider.value = 0 //以下與colorChangeSlider 同 gradientLayer.frame = gradientView.bounds //讓所有控制顏色的 Slider 數值填入對應位置 gradientLayer.colors = [CGColor(red: CGFloat(redSlider.value), green: CGFloat(greenSlider.value), blue: CGFloat(blueSlider.value), alpha: CGFloat(alphaSlider.value)),CGColor(red: CGFloat(sliderRedDown.value), green: CGFloat(sliderGreenDown.value), blue: CGFloat(sliderBlueDown.value), alpha: CGFloat(sliderAlphaDown.value))] //gradientMiddleSlider只有調整中間區塊,數值放在中間位置 gradientLayer.locations = [0.5, NSNumber(value: borderSlider.value) , 1] gradientView.layer.addSublayer(gradientLayer) gradientView.bounds = poohImageView.frame gradientView.addSubview(poohImageView) colorLabel.text = "時中粉" } @IBAction func tealButton(_ sender: UIButton) { sliderRedDown.value = 175/255 sliderGreenDown.value = 238/255 sliderBlueDown.value = 238/255 sliderAlphaDown.value = 1 borderSlider.value = 0 //以下與colorChangeSlider 同 gradientLayer.frame = gradientView.bounds //讓所有控制顏色的 Slider 數值填入對應位置 gradientLayer.colors = [CGColor(red: CGFloat(redSlider.value), green: CGFloat(greenSlider.value), blue: CGFloat(blueSlider.value), alpha: CGFloat(alphaSlider.value)),CGColor(red: CGFloat(sliderRedDown.value), green: CGFloat(sliderGreenDown.value), blue: CGFloat(sliderBlueDown.value), alpha: CGFloat(sliderAlphaDown.value))] //gradientMiddleSlider只有調整中間區塊,數值放在中間位置 gradientLayer.locations = [0.5, NSNumber(value: borderSlider.value) , 1] gradientView.layer.addSublayer(gradientLayer) gradientView.bounds = poohImageView.frame gradientView.addSubview(poohImageView) colorLabel.text = "經典藍" } @IBAction func chinaButton(_ sender: UIButton) { sliderAlphaDown.value = 0 sliderRedDown.value = 1 sliderGreenDown.value = 1 sliderBlueDown.value = 1 borderSlider.value = 0 //以下與colorChangeSlider 同 gradientLayer.frame = gradientView.bounds //讓所有控制顏色的 Slider 數值填入對應位置 gradientLayer.colors = [CGColor(red: CGFloat(redSlider.value), green: CGFloat(greenSlider.value), blue: CGFloat(blueSlider.value), alpha: CGFloat(alphaSlider.value)),CGColor(red: CGFloat(sliderRedDown.value), green: CGFloat(sliderGreenDown.value), blue: CGFloat(sliderBlueDown.value), alpha: CGFloat(sliderAlphaDown.value))] //gradientMiddleSlider只有調整中間區塊,數值放在中間位置 gradientLayer.locations = [0.5, NSNumber(value: borderSlider.value) , 1] gradientView.layer.addSublayer(gradientLayer) gradientView.bounds = poohImageView.frame gradientView.addSubview(poohImageView) colorLabel.text = "青花瓷\n 庫存緊張" } }
[ -1 ]
10f5f6406cce26b7e246b4bb3433105b6824bd5c
a95fa982041eb977b25b8cb5d601090e49405916
/TransitionAnimation/ViewController.swift
86c88e5791dde31759735589f603fa816471cc8c
[]
no_license
a-stupid-wood/TransitionAnimation
aeb26037c297f7c5feab784246faf746703b8fa6
d27ec196d1ac53696b6ffdcfee5e0f38cb0883eb
refs/heads/master
2021-01-21T06:06:27.024954
2017-08-30T23:43:33
2017-08-30T23:43:33
101,938,718
0
0
null
null
null
null
UTF-8
Swift
false
false
3,630
swift
// // ViewController.swift // TransitionAnimation // // Created by zj on 2017/8/28. // Copyright © 2017年 zj. All rights reserved. // import UIKit let kWidth = UIScreen.main.bounds.size.width let kHeight = UIScreen.main.bounds.size.height class ViewController: UIViewController,UIViewControllerTransitioningDelegate,UICollectionViewDelegateFlowLayout,UICollectionViewDataSource { let modalAnimator = ModalAnimation() let pics = ["pic1","pic2","pic3","pic4","pic5","pic6","pic1","pic2","pic3","pic4","pic5","pic6","pic1","pic2","pic3","pic4","pic5","pic6"] var mainCollectionView : UICollectionView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. view.backgroundColor = UIColor.white title = "List" let layout = UICollectionViewFlowLayout() layout.minimumLineSpacing = 5 layout.minimumInteritemSpacing = 5 layout.itemSize = CGSize(width: kWidth / 2.0 - 7.5, height: kWidth / 2.0 - 7.5) layout.scrollDirection = UICollectionViewScrollDirection.vertical mainCollectionView = UICollectionView(frame: view.bounds, collectionViewLayout: layout) mainCollectionView.delegate = self mainCollectionView.dataSource = self mainCollectionView.backgroundColor = UIColor.white mainCollectionView.register(PicCollectionViewCell.self, forCellWithReuseIdentifier: "CollectionViewCellId") view.addSubview(mainCollectionView) } //MARK:UICollectionViewDelegateFlowLayout,UICollectionViewDataSource func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return pics.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CollectionViewCellId", for: indexPath) as! PicCollectionViewCell cell.imageView.image = UIImage(named: pics[indexPath.item]) return cell } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { let detailVC = DetailViewController() detailVC.imageName = pics[indexPath.item] let cell = collectionView.cellForItem(at: indexPath) as! PicCollectionViewCell let animator = Animator.shareAnimator animator.originalView = cell animator.originalFrame = cell.imageView.convert(cell.imageView.frame, to: view) navigationController?.pushViewController(detailVC, animated: true) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { return UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5) } //MARK:UIViewControllerTransitioningDelegate func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { modalAnimator.modalPresentingType = ModalPresentingType.present return modalAnimator } func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { modalAnimator.modalPresentingType = ModalPresentingType.dismiss return modalAnimator } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
dcad6ffeee31de9f06894f4bb57639e063a2f712
1200dfc5a3e7e7a065336c290d6ed6b46e048f8c
/Sample/Pluginized/TicTacToe/TicTacToeCore/Game/GameViewController.swift
41a53326eb38e85285a7b2323077450b6ac6bdce
[ "Apache-2.0" ]
permissive
ermik/needle
3248d3cfd2bb11c8081deca7c9130a53e24ffdc1
dd614b714e0c61bdf3979c5bf1e406e57edbce7f
refs/heads/master
2020-03-31T04:57:46.188601
2018-10-06T01:02:56
2018-10-06T01:02:56
151,927,460
1
0
Apache-2.0
2018-10-07T09:55:15
2018-10-07T09:55:15
null
UTF-8
Swift
false
false
10,884
swift
// // Copyright (c) 2018. Uber Technologies // // 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 RxSwift import ScoreSheet import SnapKit import UIKit private let rowCount = 3 private let colCount = 3 private let sectionCount = 1 private let cellSize: CGFloat = UIScreen.main.bounds.width / CGFloat(colCount) private let cellIdentifier = "TicTacToeCell" private enum Players: Int { case player1 = 1 case player2 var color: UIColor { switch self { case .player1: return UIColor.red case .player2: return UIColor.blue } } } class GameViewController: ObservableViewController, UICollectionViewDataSource, UICollectionViewDelegate, ScoreSheetListener { private let mutableScoreStream: MutableScoreStream private let playersStream: PlayersStream private let scoreSheetBuilder: ScoreSheetBuilder private let collectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() layout.minimumLineSpacing = 0 layout.minimumInteritemSpacing = 0 layout.itemSize = CGSize(width: cellSize, height: cellSize) return UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) }() private var appearanceDisposable = CompositeDisposable() init(mutableScoreStream: MutableScoreStream, playersStream: PlayersStream, scoreSheetBuilder: ScoreSheetBuilder) { self.mutableScoreStream = mutableScoreStream self.playersStream = playersStream self.scoreSheetBuilder = scoreSheetBuilder super.init(nibName: nil, bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor.purple buildCollectionView() buildScoerButton() initBoard() } override func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated) appearanceDisposable.dispose() appearanceDisposable = CompositeDisposable() } private func buildCollectionView() { collectionView.dataSource = self collectionView.delegate = self collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: cellIdentifier) view.addSubview(collectionView) collectionView.snp.makeConstraints { (maker: ConstraintMaker) in maker.center.equalTo(self.view.snp.center) maker.size.equalTo(CGSize(width: CGFloat(colCount) * cellSize, height: CGFloat(rowCount) * cellSize)) } } private func announce(_ winner: Players, withCompletionHandler handler: @escaping () -> ()) { performOnPlayerNames { [weak self] (player1Name: String, player2Name: String) in let winnerName: String switch winner { case .player1: winnerName = player1Name case .player2: winnerName = player2Name } self?.showAlert(with: "\(winnerName) Won!", completionHandler: handler) } } private func announceDraw(withCompletionHandler handler: @escaping () -> ()) { showAlert(with: "It's a Tie", completionHandler: handler) } private func showAlert(with title: String, completionHandler handler: @escaping () -> ()) { let alert = UIAlertController(title: title, message: nil, preferredStyle: .alert) let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { _ in handler() } alert.addAction(closeAction) present(alert, animated: true, completion: nil) } private func performOnPlayerNames(with handler: @escaping (String, String) -> ()) { let disposable = playersStream.names .take(1) .flatMap { (names: (String, String)?) -> Observable<(String, String)> in if let names = names { return Observable.just(names) } else { return Observable.never() } } .subscribe(onNext: { (player1Name: String, player2Name: String) in handler(player1Name, player2Name) }) _ = appearanceDisposable.insert(disposable) } // MARK: - High Scores private func buildScoerButton() { let scoreButton = UIButton() view.addSubview(scoreButton) scoreButton.snp.makeConstraints { (maker: ConstraintMaker) in maker.bottom.equalTo(self.view.snp.bottom).offset(-70) maker.leading.trailing.equalTo(self.view).inset(40) maker.height.equalTo(50) } scoreButton.setTitle("High Scores", for: .normal) scoreButton.setTitleColor(UIColor.white, for: .normal) scoreButton.backgroundColor = UIColor.black scoreButton.addTarget(self, action: #selector(didTapScoreButton), for: .touchUpInside) } @objc private func didTapScoreButton() { if let scoreSheetVC = scoreSheetBuilder.scoreSheetViewController as? ScoreSheetViewController { scoreSheetVC.listener = self present(scoreSheetVC, animated: true) } } func done() { dismiss(animated: true, completion: nil) } // MARK: - Game Logic private var currentPlayer = Players.player1 private var board = [[Players?]]() private func initBoard() { for _ in 0 ..< rowCount { board.append([nil, nil, nil]) } } private func placeCurrentPlayerMark(at row: Int, col: Int) { guard board[row][col] == nil else { return } let currentPlayer = getAndFlipCurrentPlayer() board[row][col] = currentPlayer setCell(at: row, col: col, withPlayerType: currentPlayer) let endGame = checkEndGame() if endGame.didEnd { if let winner = endGame.winner { performOnPlayerNames { [weak self] (player1Name: String, player2Name: String) in let winnerName = winner == .player1 ? player1Name : player2Name let loserName = winner != .player1 ? player1Name : player2Name self?.announce(winner) { [weak self] in self?.mutableScoreStream.updateScore(withWinner: winnerName, loser: loserName) } } } else { announceDraw { [weak self] in self?.mutableScoreStream.updateDraw() } } } } private func setCell(at row: Int, col: Int, withPlayerType playerType: Players) { let indexPathRow = row * colCount + col let cell = collectionView.cellForItem(at: IndexPath(row: indexPathRow, section: sectionCount - 1)) cell?.backgroundColor = playerType.color } private func getAndFlipCurrentPlayer() -> Players { let currentPlayer = self.currentPlayer self.currentPlayer = currentPlayer == .player1 ? .player2 : .player1 return currentPlayer } private func checkEndGame() -> (winner: Players?, didEnd: Bool) { let winner = checkWinner() if let winner = winner { return (winner, true) } let isDraw = checkDraw() if isDraw { return (nil, true) } return (nil, false) } private func checkWinner() -> Players? { // Rows. for row in 0 ..< rowCount { guard let assumedWinner = board[row][0] else { continue } var winner: Players? = assumedWinner for col in 1 ..< colCount { if assumedWinner.rawValue != board[row][col]?.rawValue { winner = nil break } } if let winner = winner { return winner } } // Cols. for col in 0 ..< colCount { guard let assumedWinner = board[0][col] else { continue } var winner: Players? = assumedWinner for row in 1 ..< rowCount { if assumedWinner.rawValue != board[row][col]?.rawValue { winner = nil break } } if let winner = winner { return winner } } // Diagnals. guard let p11 = board[1][1] else { return nil } if let p00 = board[0][0], let p22 = board[2][2] { if p00.rawValue == p11.rawValue && p11.rawValue == p22.rawValue { return p11 } } if let p02 = board[0][2], let p20 = board[2][0] { if p02.rawValue == p11.rawValue && p11.rawValue == p20.rawValue { return p11 } } return nil } private func checkDraw() -> Bool { for row in 0 ..< rowCount { for col in 0 ..< colCount { if board[row][col] == nil { return false } } } return true } // MARK: - UICollectionViewDataSource func numberOfSections(in collectionView: UICollectionView) -> Int { return sectionCount } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return rowCount * colCount } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let reusedCell = collectionView.dequeueReusableCell(withReuseIdentifier: cellIdentifier, for: indexPath) reset(cell: reusedCell) return reusedCell } private func reset(cell: UICollectionViewCell) { cell.backgroundColor = UIColor.white cell.contentView.layer.borderWidth = 2 cell.contentView.layer.borderColor = UIColor.lightGray.cgColor } // MARK: - UICollectionViewDelegate func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { let row = indexPath.row / colCount let col = indexPath.row - row * rowCount placeCurrentPlayerMark(at: row, col: col) } }
[ -1 ]
f725d4a60a1890d40d4192e759a9ad30f552a54d
5a10fa24c35fe6fcd15ed778ce5dc0b224adc74e
/DevslopeMunchyBurgers/BurgerCell.swift
fafa6e6fde11884e5db1a5bade3444c9beb5a815
[]
no_license
ChouVue/DevslopeMunchyBurgers
028bddc9bdfaeb3ec9ad50f8fee6c2c3db1cc5be
91f64a45a4c285e62202a0aea227d327dd05dad5
refs/heads/master
2021-05-14T09:10:27.258803
2018-01-22T15:07:17
2018-01-22T15:07:17
116,320,185
0
0
null
null
null
null
UTF-8
Swift
false
false
548
swift
// // BurgerCell.swift // DevslopeMunchyBurgers // // Created by Chou Vue on 1/5/18. // Copyright © 2018 VUE. All rights reserved. // import UIKit class BurgerCell: UICollectionViewCell, NibLoadableView, Shakeable { @IBOutlet weak var burgerImg: UIImageView! @IBOutlet weak var burgerLbl: UILabel! var burger: Burger! func configureCell(burger: Burger) { self.burger = burger burgerImg.image = UIImage(named: burger.proteinId.rawValue) burgerLbl.text = burger.productName } }
[ -1 ]
34841615a92145c9060de86f8da5a019e4a533aa
be42c7d91e5666c8825b724a1cd75eed1c1d1084
/NotificationManager/AppDelegate.swift
2ed4376d6c9dcbfb640d25265a1d964713c79869
[]
no_license
piyush23dez/CustomNotificatonCenter
6b6bb718013c1ef670c9321d8748320a83025e5b
0bef5729d0e184d0b6b82d6d13c97a4befb73c97
refs/heads/master
2020-09-10T02:04:10.783389
2016-10-23T20:47:02
2016-10-23T20:47:02
67,440,073
0
0
null
null
null
null
UTF-8
Swift
false
false
2,157
swift
// // AppDelegate.swift // NotificationManager // // Created by Piyush Sharma on 9/2/16. // Copyright © 2016 Piyush Sharma. 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, 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, 303241, 417930, 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, 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, 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, 287381, 311957, 221850, 287386, 164509, 287390, 295583, 303773, 230045, 287394, 172702, 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, 213895, 320391, 304007, 304009, 304011, 230284, 304013, 213902, 279438, 295822, 295825, 189329, 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, 295949, 197645, 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, 230592, 279750, 230600, 230607, 148690, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 214294, 320792, 230681, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 230718, 312639, 296255, 296259, 378181, 230727, 238919, 320840, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 181626, 304506, 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, 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, 296439, 288250, 402942, 148990, 206336, 296446, 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, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280458, 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, 223303, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 223327, 149599, 321634, 149603, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 215154, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 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, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 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, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 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, 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, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 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, 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, 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, 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, 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, 242152, 291305, 127466, 176620, 127474, 291314, 291317, 135672, 291323, 233979, 291330, 283142, 127497, 233994, 135689, 291341, 233998, 234003, 234006, 152087, 127511, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 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, 234356, 177011, 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, 234446, 193488, 275406, 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, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234556, 234558, 316479, 234561, 316483, 234563, 308291, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 300148, 234614, 398455, 144506, 234618, 275579, 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, 308418, 283844, 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, 177419, 300299, 283917, 300301, 242957, 177424, 275725, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 243003, 283963, 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, 144812, 284076, 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, 300527, 308720, 226802, 316917, 308727, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 194103, 284215, 284218, 226877, 284223, 284226, 243268, 292421, 226886, 284231, 128584, 284228, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 284245, 276053, 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, 284290, 325250, 284292, 276098, 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, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 325408, 284449, 300834, 300832, 317221, 227109, 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, 235579, 276539, 235581, 178238, 325692, 276544, 284739, 292934, 243785, 276553, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 178273, 227426, 194657, 194660, 276579, 227430, 276583, 309346, 309348, 309350, 309352, 309354, 350308, 276590, 350313, 227440, 350316, 284786, 350321, 276595, 301167, 350325, 350328, 292985, 301178, 292989, 292993, 301185, 350339, 317570, 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, 227522, 350402, 301252, 350406, 227529, 309450, 301258, 276685, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 276713, 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, 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, 317971, 277011, 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, 121458, 277106, 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, 285453, 310029, 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, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 244731, 293882, 302075, 121850, 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, 162964, 384148, 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, 277822, 417086, 286016, 294211, 302403, 277832, 384328, 277836, 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, 277892, 310659, 327046, 253320, 310665, 318858, 277898, 277894, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 277923, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 245191, 163272, 277959, 302534, 310727, 292968, 302541, 277966, 302543, 277963, 310737, 277971, 277975, 286169, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 278003, 310772, 228851, 278006, 212472, 278009, 40440, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 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, 212560, 228944, 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, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 278227, 286420, 319187, 229076, 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 ]
7d31b6a6767b8aa11208a50377d074a2b6885b41
7ea2ad4ab81964193cae652858d5ec216f878f94
/CurrencyRates/Resources/Fonts/Fonts.swift
67c95e35f317059fb1f8b4c13b81c7c783628278
[]
no_license
nitrey/CodeExample
847010922428a5387f067d4f4372d51ffb1c001e
0a4a4fc9ca7015e184958bb3b5003a0afad985cd
refs/heads/master
2020-06-15T18:53:12.777043
2019-09-12T08:21:25
2019-09-12T08:21:25
195,369,019
0
0
null
null
null
null
UTF-8
Swift
false
false
545
swift
// // Fonts.swift // Created by Alexander Antonov on 13/04/2019. // import UIKit.UIFont enum Fonts { static let robotoRegular20 = UIFont.appFont(.robotoRegular(size: 20)) static let robotoRegular16 = UIFont.appFont(.robotoRegular(size: 16)) static let robotoRegular14 = UIFont.appFont(.robotoRegular(size: 14)) static let robotoMedium20 = UIFont.appFont(.robotoMedium(size: 20)) static let robotoMedium16 = UIFont.appFont(.robotoMedium(size: 16)) static let robotoMedium14 = UIFont.appFont(.robotoMedium(size: 14)) }
[ -1 ]
83c1e461df735ae36f4b9abf67f761f032bf4355
bba6a8b4b51c81bfc93a7481a07f7a868e34b070
/PixbayApp/Helpers/PersistentStorage.swift
efb65046c52e08e359ce4afc8671f79c95dd21ff
[]
no_license
tarekabdallah/pixbay
14ee2b273b15b5c9b7e0471b8292c96c104c1e27
7a3732bc8c990fbad077e49157cc510c0ce7f4d9
refs/heads/master
2023-02-24T22:53:39.770286
2020-08-01T12:57:53
2020-08-01T12:57:53
283,795,105
0
0
null
null
null
null
UTF-8
Swift
false
false
1,337
swift
// // PersistentStorage.swift // PixbayApp // // Created by Tarek Abdallah on 7/31/20. // Copyright © 2020 Personal. All rights reserved. // import Foundation import CoreData final class PersistentStorage { private init() {} static let shared = PersistentStorage() // MARK: - Core Data stack lazy var persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: "PixbayApp") container.loadPersistentStores { _, error in if let error = error as NSError? { fatalError("Unresolved error \(error), \(error.userInfo)") } } return container }() lazy var context = persistentContainer.viewContext // MARK: - Core Data Saving support func saveContext() { if context.hasChanges { do { try context.save() } catch { let nserror = error as NSError fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } } func fetchManagedObject<T: NSManagedObject>(managedObject: T.Type) -> [T]? { guard let result = try? PersistentStorage .shared .context .fetch(managedObject.fetchRequest()) as? [T] else { return nil } return result } }
[ -1 ]
f099b9d4341ad3aa1fac09f45d4c7d4d3d72c5ec
f41037cb9b8fbc55ffa1785930f95fcb65913166
/GoJekUser/Account/AccountView/AccountCustomView/PayStackView/PayStackView.swift
782194459fc3a1541b9bb0afea1af0adb7e01a38
[]
no_license
Masriyan/gojek_ios_user
25b7c25c8dde1f9b65601f314367362b3255893d
549469b4c30ac604413dbc519d132156b284ea0c
refs/heads/master
2023-02-23T13:33:27.314126
2021-01-30T12:17:30
2021-01-30T12:17:30
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,215
swift
// // payStackView.swift // GoJekUser // // Created by apple on 01/05/19. // Copyright © 2019 Appoets. All rights reserved. // import UIKit class PayStackView: UIView { @IBOutlet weak var walletTitleLabel: UILabel! @IBOutlet weak var walletAmtTextField: UITextField! @IBOutlet weak var seperaterLabel: UILabel! @IBOutlet weak var submitButton: UIButton! @IBOutlet weak var cancelButton: UIButton! @IBOutlet weak var payStackView: UIView! var onClickSubmit: ((String?)->())? var onClickCancel: ((String?)->())? override func awakeFromNib() { super.awakeFromNib() self.walletAmtTextField.delegate = self as? UITextFieldDelegate self.walletTitleLabel.font = UIFont.setCustomFont(name: .bold, size: .x16) self.submitButton.titleLabel?.font = UIFont.setCustomFont(name: .bold, size: .x18) self.cancelButton.titleLabel?.font = UIFont.setCustomFont(name: .bold, size: .x18) self.walletAmtTextField.font = UIFont.setCustomFont(name: .bold, size: .x20) self.payStackView.setCornerRadiuswithValue(value: 5.0) self.submitButton.setTitle(Constant.SSubmit.localized, for: .normal) self.cancelButton.setTitle(Constant.SCancel.localized, for: .normal) self.cancelButton.textColor(color: .xuberColor) self.cancelButton.addTarget(self, action: #selector(cancelButtonAction(_:)), for: .touchUpInside) self.submitButton.textColor(color: .xuberColor) self.submitButton.addTarget(self, action: #selector(submitButtonAction(_:)), for: .touchUpInside) let userDetails = AppManager.shared.getUserDetails() self.walletTitleLabel.text = "\(Constant.walletAmount.localized) ( \(userDetails?.currency_symbol ?? "$") )".uppercased() payStackView.backgroundColor = .backgroundColor walletAmtTextField.backgroundColor = .boxColor walletAmtTextField.textColor = .blackColor } @objc func submitButtonAction(_ sender: UIButton) { onClickSubmit?(walletAmtTextField.text) } @objc func cancelButtonAction(_ sender: UIButton) { onClickCancel?(walletAmtTextField.text) } }
[ -1 ]
734422d2ddde12584136d07943238a1f83df403c
0a5e86ab5bbe9260283155582c604d59a57aa89c
/App/Shared/ReviewController.swift
6e2bbac780a9ef8109996c8e725f0ee796c8b03f
[ "MIT" ]
permissive
weiran/Hackers
10679b2293820fb60857f0cd40bf8fbe19a5018b
ac5386d432cbd90afa92e4186f5db21e6ea4275a
refs/heads/master
2023-07-21T12:42:17.195557
2023-07-17T09:04:45
2023-07-17T09:04:45
8,503,186
459
95
MIT
2023-07-17T09:04:47
2013-03-01T14:41:11
Swift
UTF-8
Swift
false
false
1,099
swift
// // ReviewController.swift // Hackers // // Created by Weiran Zhang on 07/10/2017. // Copyright © 2017 Weiran Zhang. All rights reserved. // import StoreKit enum ReviewController { static var disablePrompts = false private static let showPromptIncrements = [5, 10, 15] private static let LaunchCounter = "Launch Counter" static func incrementLaunchCounter() { let counter = launchCounter() UserDefaults.standard.set(counter + 1, forKey: LaunchCounter) } static func launchCounter() -> Int { return UserDefaults.standard.integer(forKey: LaunchCounter) } static func requestReview() { if ProcessInfo.processInfo.arguments.contains("disableReviewPrompts") { return } let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene if let scene = scene, showPromptIncrements.contains(launchCounter()), disablePrompts == false { SKStoreReviewController.requestReview(in: scene) } } }
[ -1 ]
c742e1009a17902c14e783e1b206fb43da5add9b
57f5468eb4d756679de2bc80206621c4ca20da26
/soilconnect-map/soilconnect-map/Controllers/UserLocationViewController.swift
293f6ba9ef8ad7a7ab7ac6b3531dc0c676276bb7
[]
no_license
jeremy-mankin/soilconnect
4f860510779831e644bbf2e04b80de568fb1c050
68ec42f19065f07d6cade5d3d9e5f65deba29a8e
refs/heads/master
2022-11-04T23:25:17.558221
2020-06-19T19:42:38
2020-06-19T19:42:38
273,572,943
0
0
null
null
null
null
UTF-8
Swift
false
false
4,909
swift
// // UserLocationViewController.swift // soilconnect-map // // Created by Jeremy Mankin on 6/19/20. // Copyright © 2020 Jeremy Mankin. All rights reserved. // import UIKit import CoreLocation import MapKit class UserLocationViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate { @IBOutlet var mapView: MKMapView! @IBOutlet var addressName: UILabel! @IBOutlet var addressLocality: UILabel! @IBOutlet var addressState: UILabel! @IBOutlet var addressZipCode: UILabel! let locationManager = CLLocationManager() let regionRadius: Double = 800 // adjust to set the radius of the map var locationLatitude: CLLocationDegrees? var locationLongitude: CLLocationDegrees? override func viewDidLoad() { super.viewDidLoad() // requesr authorization to determine user location configureLocationRequest() locationManager.delegate = self mapView.delegate = self mapView.showsUserLocation = true mapView.showsCompass = true mapView.showsScale = true mapView.mapType = .mutedStandard } // MARK: CoreLocation Delegate Functions func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { // center user location on map centerMapOnUserLocation() guard let locationValue: CLLocationCoordinate2D = manager.location?.coordinate else { return } print("locations = \(locationValue.latitude) \(locationValue.longitude)") // show user location address, if not possible, display as Times Square default location let locationVariable: CLLocation = CLLocation(latitude: manager.location?.coordinate.latitude ?? 40.7580, longitude: manager.location?.coordinate.longitude ?? 73.9855) displayCurrentLocationLabel(location: locationVariable) } // MARK: User Location Helper Methods func configureLocationRequest() { locationManager.requestWhenInUseAuthorization() let status = CLLocationManager.authorizationStatus() if status == CLAuthorizationStatus.authorizedWhenInUse { mapView.showsUserLocation = true } } func centerMapOnUserLocation() { guard let coordinate = locationManager.location?.coordinate else {return} let coordinateRegion = MKCoordinateRegion(center: coordinate, latitudinalMeters: regionRadius, longitudinalMeters: regionRadius) mapView.setRegion(coordinateRegion, animated: true) } func displayCurrentLocationLabel(location: CLLocation) { let geoCoder = CLGeocoder() geoCoder.reverseGeocodeLocation(location, completionHandler: {(placemarks, error) -> Void in var placemark:CLPlacemark! var placeName: String = "" var streetCity: String = "" var streetState: String = "" var streetZipCode: String = "" if error == nil { placemark = (placemarks?[0])! as CLPlacemark if placemark.country == "United States" { // country e.g. US if placemark.postalCode != nil { // zip code e.g. 10001 streetZipCode = placemark.postalCode ?? "Unknown" } if placemark.administrativeArea != nil { // state e.g. NY streetState = placemark.administrativeArea! } if placemark.locality != nil { // city e.g. New York streetCity = placemark.locality ?? "New York" } if placemark.name != nil { // location name? placeName = placemark.name ?? "Unknown" } /* print("placemark.name is: \(String(describing: placemark.name))") print("placemark.locality is: \(String(describing: placemark.locality))") print("placemark.state is: \(String(describing: placemark.administrativeArea))") print("placemark.postalCode is: \(String(describing: placemark.postalCode))") */ self.addressName.text = placeName self.addressLocality.text = streetCity self.addressState.text = streetState self.addressZipCode.text = streetZipCode } } }) } }
[ -1 ]
cb52813854ffcb880bee27cd24160903bd1718f8
e245bcb11b12bfccebe2f4beb768c535a0cb1e31
/Practice/RoundButton.swift
fd88b8b3191d571a9564c432ee04faa9abdae051
[]
no_license
tammopinkid/Practice
c350636ac2bf5fcc1d69a87a5e1d55b2a0d84155
746e3944b2c8f7ecabcdcffa03fbec33cfee115c
refs/heads/master
2021-05-06T20:39:44.145226
2017-11-28T17:41:09
2017-11-28T17:41:09
112,367,911
0
0
null
null
null
null
UTF-8
Swift
false
false
659
swift
// // RoundButton.swift // Practice // // Created by Kamonwat Rojjanadechakul on 11/28/2560 BE. // Copyright © 2560 Benjarat Saeang. All rights reserved. // import UIKit @IBDesignable class RoundButton: 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 } } }
[ 225067 ]
3431d7eeaa695761decca6ec1568a3e9e2b4f971
ec3ed746e9aa5012c9f4ba7382078491be39d91f
/Playlistable/SubClasses/MyNavigationController.swift
6867bc5911eaf5b9e5a8d3b224be6c277df103fb
[]
no_license
cpizzaia/Playlistable
00501e2e67a7070c0d2eeb0acb220095bd2f3cde
8784eafb9c3b6d8a53921c81b8aeb4469937b290
refs/heads/master
2018-12-26T04:33:03.741320
2018-11-18T04:17:04
2018-11-18T04:17:04
107,891,057
1
0
null
2018-01-15T02:44:34
2017-10-22T18:18:03
Swift
UTF-8
Swift
false
false
907
swift
// // MyNavigationController.swift // Playlistable // // Created by Cody Pizzaia on 11/1/18. // Copyright © 2018 Cody Pizzaia. All rights reserved. // import Foundation import UIKit class MyNavigationController: UINavigationController { // MARK: Public Methods override init(rootViewController: UIViewController) { super.init(rootViewController: rootViewController) navigationBar.titleTextAttributes = [ NSAttributedString.Key.font: UIFont.myFontBold(withSize: 17), NSAttributedString.Key.foregroundColor: UIColor.myWhite ] navigationBar.backgroundColor = UIColor.myLightBlack navigationBar.barTintColor = UIColor.myLightBlack } override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } }
[ -1 ]
cb74f15ee296ab73c25ec18fce41b451d941c006
6c7d56902a8eb8f8b812c7c67444880984e0ebd8
/StreamPlayer/StreamPlayer/ViewController.swift
acb8acc18ac69b19bbdb0d6b43f8fc10fde9ca2c
[]
no_license
MobileDevStar/StreamPlayer_iOS
fca725943e36a3a8cee2515eda5a95b500b5b6f8
d306a71b19800841ac27b9c488323b23581d43f4
refs/heads/master
2021-02-05T10:25:37.091927
2020-02-28T16:37:05
2020-02-28T16:37:05
243,769,962
0
0
null
null
null
null
UTF-8
Swift
false
false
977
swift
// // ViewController.swift // StreamPlayer // // Created by simba on 2/28/20. // Copyright © 2020 simba. All rights reserved. // import UIKit import AVKit import AVFoundation class ViewController: UIViewController { // private var playerLayer: AVPlayerLayer! // private var player: AVPlayer! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. playStartVideo() } private func playStartVideo() { let fileURL = NSURL(string: "http://www.aaa.com/m3u8/l.m3u8") let avAsset = AVURLAsset(url: fileURL! as URL, options: nil) let item = AVPlayerItem(asset: avAsset) let player = AVPlayer(playerItem: item) let playerLayer = AVPlayerLayer(player: player) playerLayer.frame = self.view.bounds self.view.layer.addSublayer(playerLayer) player.play() } }
[ -1 ]
577e5fb6acc7b2161ed92b85f68ba78f2cf59858
ac7d6e17e840d23307f189b561dd0ade5b8bd59f
/Notebooks/Notebooks/NoteMO+CoreDataClass.swift
b408d9ec43fd9a82e12b9622a8a1d2fbebf62bdc
[ "MIT" ]
permissive
jsmdev/xi-bootcamp-mobile-ios-persistence
f27f7e8e6c43b3c9f62a70ef663d3ea35c39039a
ea495a93aadf210eb7f2d19d4c24ea4f010800e9
refs/heads/main
2023-03-02T21:35:27.202819
2021-02-14T18:47:55
2021-02-14T18:47:55
333,494,303
0
0
null
null
null
null
UTF-8
Swift
false
false
744
swift
// // NoteMO+CoreDataClass.swift // Notebooks // // Created by Daniel Torres on 1/28/21. // // import Foundation import CoreData @objc(NoteMO) public class NoteMO: NSManagedObject { @discardableResult static func createNote(managedObjectContext: NSManagedObjectContext, notebook: NotebookMO, title: String, createdAt: Date) -> NoteMO? { let note = NSEntityDescription.insertNewObject(forEntityName: "Note", into: managedObjectContext) as? NoteMO note?.title = title note?.createdAt = createdAt note?.notebook = notebook return note } }
[ -1 ]
7ad1fa67826013f434a12f85ab516d64282c4dc2
7da034587713331cd5d5f53ddeb01f3f62cb6c7a
/Project_Get_Word/Project_Get_Word/Services/CoreData/CoreDataService.swift
d29a926c90984628de390bf2693c15578daa86b6
[ "MIT" ]
permissive
Davirepository/Get_Word
ee2aaad4b010eb7af8351a69dc756317e6b6959e
8ce4a8b52f70f8267f23aa32fb64c56513a9ee21
refs/heads/master
2020-09-27T17:00:06.784634
2019-12-10T23:51:23
2019-12-10T23:51:23
226,564,050
0
0
null
null
null
null
UTF-8
Swift
false
false
1,738
swift
// // CoreDataService.swift // Project_Get_Word // // Created by Давид on 06/12/2019. // Copyright © 2019 David. All rights reserved. // import CoreData import UIKit final class CoreDataService { let stack = CoreDataStack.shared func saveInStorage(data model: Int16) { stack.persistentContainer.performBackgroundTask { (context) in let score = MOScore(context: context) score.score = model do { try context.save() } catch { print(error.localizedDescription) } } } func loadFromStorage(completion: @escaping ([MOScore]) -> Void) { stack.persistentContainer.performBackgroundTask { (context) in let fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Score") // return data in right order let sorter: NSSortDescriptor = NSSortDescriptor(key: "score" , ascending: false) fetch.sortDescriptors = [sorter] do { let result = try context.fetch(fetch) as? [MOScore] guard let results = result else { return } completion(results) } catch { print(error.localizedDescription) completion([MOScore]()) } } } func deleteData() { stack.persistentContainer.performBackgroundTask { (context) in let fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Score") do { try context.execute(NSBatchDeleteRequest(fetchRequest: fetch)) try context.save() } catch { print(error.localizedDescription) } } } }
[ -1 ]
69c4d94d4f5901e8c91de6afeb0418ac1a236012
7d27016834cf0b58e4aa62add529fb5f85578d6c
/swiftfun/ViewController.swift
cddbfffa1539f9325b7e181fc7c3e0cdc03a10d7
[]
no_license
alderandvine/swiftfun
99946f629a2411d537bf3272cc6b1fa97c7030fd
982e0455b74ec86ff90a39ff88042bfcef0c196d
refs/heads/master
2021-08-30T03:38:09.808447
2017-12-15T22:15:42
2017-12-15T22:15:42
114,399,541
0
0
null
null
null
null
UTF-8
Swift
false
false
1,756
swift
// // ViewController.swift // swiftfun // // Created by Heather Q Hay on 12/10/17. // Copyright © 2017 Alder & Vine. All rights reserved. // import UIKit class ViewController: UIViewController { // var buttonCount = 0 @IBOutlet weak var test1: UILabel! @IBOutlet weak var toptextfield: UITextField! @IBOutlet weak var bottomtextfield: UITextField! @IBOutlet weak var addorsub: UISwitch! @IBAction func action1(_ sender: Any) { let addition = addorsub.isOn if addition { let sum = Double(toptextfield.text!)! + Double(bottomtextfield.text!)! test1.text = "\(toptextfield.text!) + \(bottomtextfield.text!) = \(sum)" } else { let sum = Double(toptextfield.text!)! - Double(bottomtextfield.text!)! test1.text = "\(toptextfield.text!) - \(bottomtextfield.text!) = \(sum)" } /* buttonCount += 1 print (buttonCount) if buttonCount >= 10 { view.backgroundColor = UIColor.darkGray test1.text = "you hit it enough!!" } if buttonCount >= 12 { test1.text = "ok that's probably enough" } if buttonCount >= 14 { view.backgroundColor = UIColor.red test1.text = "no seriously - stop it" } */ } 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. } }
[ -1 ]
2294428b8c306941d92407fe0df7968871298f11
5980f740507afb125fbce9cad981b99a1e03efea
/OpenWeather/API/HttpClient.swift
cc2593c48ef78dd674a024c64e792dcb7c674034
[]
no_license
jaysalvador/weather
5f8d9c4775e2795908f5cf9d0353ecb839d6f034
416ee4a366c922b53a030f8644bb71779adc4dc8
refs/heads/master
2021-05-16T19:08:33.846865
2020-05-25T01:53:01
2020-05-25T01:53:01
250,433,123
0
0
null
null
null
null
UTF-8
Swift
false
false
5,489
swift
// // HttpClient.swift // OpenWeather // // Created by Jay Salvador on 26/3/20. // Copyright © 2020 Jay Salvador. All rights reserved. // import Foundation /// function type for the return value /// `T` can be any model object to represent the response from JSON /// `HTTPError` returns as the error type public typealias HttpCompletionClosure<T> = ((Result<T, HttpError>) -> Void) /// Helper enum for HTTP Methods public enum HttpMethod: String { case get = "GET" case delete = "DELETE" case post = "POST" case put = "PUT" } /// Protocol to define function signatures for `HttpClient` public protocol HttpClientProtocol { func request<T>(_ type: T.Type, endpoint: String, httpMethod: HttpMethod, headers: Dictionary<String, String>?, onCompletion: HttpCompletionClosure<T>?) where T: Decodable } /// Class that helps retrieve JSON data and decodes into the specified response object public class HttpClient: HttpClientProtocol { let appKey: String private let baseUrl: String private let urlSession: URLSessionProtocol /// Convenience init with the pre-assigned `baseUrl` and `urlSession` public convenience init?() { self.init( baseUrl: "https://api.openweathermap.org/data/2.5", appKey: "1e34e9a0576d50acb44921ea8f6b8081", urlSession: URLSession.shared) } /// Creates a custom instance of `HttpClient` /// - Parameter _baseUrl: path of the API /// - Parameter _appKey: API Key /// - Parameter _urlSession: `URLSession` Object init(baseUrl _baseUrl: String, appKey _appKey: String, urlSession _urlSession: URLSessionProtocol) { self.baseUrl = _baseUrl self.appKey = _appKey self.urlSession = _urlSession } /// Creates an HTTP request to a particular service endpoint /// - Parameter type: The class type you want to bind the response to /// - Parameter endpoint: API service enpoint path /// - Parameter httpMethod: HTTP Method (get, post, put, delete) /// - Parameter headers: additional HTTP headers /// - Parameter onCompletion: completion closure with `Result` containing the binded model or error states public func request<T>(_ type: T.Type, endpoint: String, httpMethod: HttpMethod, headers: Dictionary<String, String>?, onCompletion: HttpCompletionClosure<T>?) where T: Decodable { DispatchQueue.background.async { if let url = URL(string: self.baseUrl + endpoint) { var request = URLRequest(url: url) request.httpMethod = httpMethod.rawValue request.addValue("application/json", forHTTPHeaderField: "Accept") if let headers = headers { for (key, value) in headers { request.addValue(value, forHTTPHeaderField: key) } } self.send(request, returnType: type, onCompletion: onCompletion) } } } /// Sends requests to the API service /// - Parameter request: `URLRequest` object /// - Parameter returnType: class type your response would be binded to /// - Parameter onCompletion: completion closure with `Result` containing the binded model or error states private func send<T>(_ request: URLRequest?, returnType: T.Type, onCompletion: HttpCompletionClosure<T>?) where T: Decodable { guard let request = request else { onCompletion?(.failure(HttpError.nilRequest)) return } let task = urlSession.dataTask(with: request) { (data, urlResponse, error) -> Void in if let httpUrlResponse = urlResponse as? HTTPURLResponse, httpUrlResponse.statusCode < 400 { if let data = data { do { let decoder = JSONDecoder() decoder.dateDecodingStrategy = .millisecondsSince1970 let decoded = try decoder.decode(returnType, from: data) DispatchQueue.main.async { onCompletion?(.success(decoded)) } } catch { DispatchQueue.main.async { onCompletion?(.failure(HttpError.decoding(error))) } } return } } var statusCode: Int? if let httpUrlResponse = urlResponse as? HTTPURLResponse { statusCode = httpUrlResponse.statusCode } DispatchQueue.main.async { onCompletion?(.failure(HttpError.unknown(statusCode: statusCode, data: data))) } } task.resume() } }
[ -1 ]
31f4e0d976755b81c65907ddefa14f3a00f678a6
7d7f135c3da0b7a6391bfbf5cf774e2642896035
/SharedModels/Ad.swift
0a1466c86874978b7faaa99b8f2fc190efb45d47
[]
no_license
kknet/iOSKeyboard
922dbbd0424d51bd08ed15c429343c7775e83c39
f0cba24ce2ac0af9d3478a5b5baa415dcb70af5e
refs/heads/master
2020-03-29T01:27:31.244508
2018-01-28T20:30:57
2018-01-28T20:30:57
null
0
0
null
null
null
null
UTF-8
Swift
false
false
853
swift
// // Ad.swift // Afghan Keyboard // // Created by Maihan Nijat on 2018-01-22. // Copyright © 2018 Sunzala Technology. All rights reserved. // import GoogleMobileAds class Ad { // Parent Controller and Ad View required for class let parentController: UIViewController let adView: GADBannerView let request = GADRequest() init(adView: GADBannerView, parentController: UIViewController) { self.adView = adView self.parentController = parentController adView.adUnitID = "ca-app-pub-6404264627814552/9678744784" adView.rootViewController = parentController } // Load the ad and set the test device. func loadAd(testing: Bool){ if testing { request.testDevices = ["b285e2de2a9acf7444baa910e45c61e5"] } adView.load(request) } }
[ -1 ]
d4498a0670f6ddfb7440ec4f044a924ec5f1f256
3c578e76c63cebd0c22d077654d378f9efb2c0c6
/HelloWorldApp/HelloWorldApp/AppDelegate.swift
b2a42539f4e21d9ae5e0a3d1571ee3d15336f13f
[]
no_license
Gerst20051/Swift
88ab035236e9dd9e90131083078dd0a8bb73236a
e4c52fda3f9962dbaf62006280de5d79cfd32066
refs/heads/master
2021-01-18T23:09:50.541894
2017-06-04T19:01:44
2017-06-04T19:01:44
23,135,605
2
1
null
2020-04-16T01:42:47
2014-08-20T04:18:11
Swift
UTF-8
Swift
false
false
2,177
swift
// // AppDelegate.swift // HelloWorldApp // // Created by Andrew Gerst on 8/20/14. // Copyright (c) 2014 Andrew Gerst. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 229432, 286776, 286778, 319544, 204856, 352318, 286791, 237640, 278605, 286797, 311375, 237646, 163920, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 131209, 303241, 417930, 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, 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, 287032, 155966, 319809, 319810, 278849, 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, 172550, 287238, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 189039, 295538, 189040, 172660, 189044, 287349, 352880, 287355, 287360, 295553, 287365, 311942, 303751, 295557, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 164509, 303773, 172702, 230045, 172705, 287394, 172707, 303780, 287390, 287398, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 279231, 287427, 312006, 172748, 287436, 107212, 172751, 295633, 172755, 303827, 279255, 172760, 279258, 303835, 213724, 189149, 303838, 287450, 279267, 312035, 295654, 279272, 312048, 230128, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 369433, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 213895, 320391, 304007, 304009, 304011, 230284, 304013, 279438, 189325, 213902, 189329, 295822, 304019, 189331, 58262, 304023, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 304063, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 295949, 197645, 230413, 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, 279661, 205934, 164973, 312432, 279669, 337018, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 279750, 312518, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296205, 230674, 320786, 230677, 296213, 296215, 230679, 320792, 230681, 214294, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 312639, 296255, 230718, 296259, 378181, 296262, 230727, 238919, 320840, 296264, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 312711, 312712, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 173488, 279985, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 288214, 148946, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 402942, 296446, 148990, 321022, 296450, 206336, 230916, 230919, 214535, 304651, 370187, 304653, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 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, 321195, 296622, 321200, 337585, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 321266, 419570, 288499, 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, 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, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 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, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 149599, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 215154, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 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, 125171, 157940, 280819, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 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, 330244, 240132, 281095, 338440, 150025, 223752, 223749, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 281210, 297594, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 240519, 322440, 314249, 338823, 183184, 289687, 240535, 224151, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 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, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 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, 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, 307009, 241475, 307012, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 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, 315524, 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, 323854, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 307510, 332086, 307512, 168245, 307515, 282942, 307518, 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, 283033, 291226, 242075, 315801, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 176592, 315856, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127474, 291314, 291317, 135672, 233979, 291323, 127485, 291330, 283142, 127497, 233994, 135689, 291341, 233998, 234003, 234006, 152087, 127511, 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, 135844, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 381677, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 234239, 242431, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 201496, 234264, 234266, 291608, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 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, 234364, 291711, 234368, 234370, 201603, 291714, 234373, 226182, 234375, 291716, 226185, 308105, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 226200, 234398, 291742, 234401, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 324522, 226220, 291756, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 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, 324599, 234487, 234490, 234493, 234496, 316416, 234501, 275462, 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, 316483, 234563, 308291, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 300148, 234614, 398455, 144506, 234618, 275579, 234620, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 234647, 275608, 308373, 234650, 324757, 308379, 234653, 324766, 119967, 300189, 234648, 283805, 234657, 324768, 234661, 283813, 177318, 234664, 242852, 275626, 234667, 300197, 316596, 308414, 234687, 300223, 300226, 308418, 226500, 234692, 300229, 308420, 283844, 308422, 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, 300289, 292097, 161027, 300292, 300294, 275719, 177419, 300299, 283917, 300301, 349451, 177424, 242957, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 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, 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, 226802, 292338, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 308790, 284215, 316983, 194101, 284218, 194103, 226877, 284223, 284226, 243268, 292421, 226886, 284231, 128584, 284228, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 243293, 284258, 292452, 177766, 284263, 292454, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 284290, 325250, 284292, 292485, 292479, 276098, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 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, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 284511, 317279, 227175, 292715, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 358292, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 292776, 276395, 292784, 276402, 161718, 358326, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276452, 276455, 292839, 350186, 292843, 276464, 227314, 325624, 350200, 317435, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 276496, 317456, 317458, 243733, 317468, 243740, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 284739, 325700, 292934, 243785, 276553, 350293, 350295, 194649, 227418, 309337, 350299, 350302, 227423, 194654, 178273, 194657, 227426, 194660, 276579, 227430, 276583, 309346, 309348, 309350, 309352, 309354, 350308, 276590, 350313, 350316, 350321, 284786, 276595, 301167, 350325, 227440, 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, 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, 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, 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, 293370, 301562, 317951, 309764, 121352, 236043, 317963, 342541, 55822, 113167, 317971, 309779, 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, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 137889, 383658, 285357, 318128, 277170, 342707, 154292, 293555, 318132, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 228135, 318248, 277291, 293677, 318253, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 293706, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 351217, 318450, 293876, 293877, 285686, 302073, 285690, 121850, 293882, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 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, 285821, 302205, 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, 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, 204023, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 130345, 277801, 113964, 277804, 384302, 285999, 285997, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 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, 351619, 294276, 310659, 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, 64966, 245191, 163272, 302534, 310727, 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, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 187936, 146977, 286240, 187939, 40484, 294435, 286246, 40486, 245288, 278057, 294439, 294440, 294443, 294445, 40491, 310831, 40488, 286248, 40499, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 228944, 400976, 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, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 343757, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 302862, 319251, 302872, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 280021, 188252, 237409, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 319390, 237470, 294817, 319394, 40865, 294821, 311209, 180142, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
8246ce7aadf1cd31e0ecc551ea748e9543e41ed4
1bd1c54e50f54c6ae4b1dca485433ee0cba75d83
/KrueAgeCalculator/MenuTableView.swift
065c0412a3eeed17a33be0de2b2ec0a6d2d15450
[]
no_license
chengxiaohou/KrueAgeCalculator
83060653058c44dafdf131a23459b926c80877d6
c50de5df2710e9076d5596b3da24d74e9e55300d
refs/heads/master
2020-07-10T02:10:36.911084
2019-08-24T09:52:05
2019-08-24T09:52:05
204,139,459
0
0
null
null
null
null
UTF-8
Swift
false
false
3,997
swift
// // MenuTableView.swift // KrueAgeCalculator // // Created by Vipin Saini on 08/08/19. // Copyright © 2019 AlienBrainz Softwares Pvt. Ltd. All rights reserved. // import UIKit import SideMenu class MenuTableView: UITableViewController { override func viewDidLoad() { super.viewDidLoad() // Uncomment the following line to preserve selection between presentations // self.clearsSelectionOnViewWillAppear = false // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem // var settings = SideMenuSettings() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) // refresh cell blur effect in case it changed tableView.reloadData() // Set up a cool background image for demo purposes let imageView = UIImageView(image: #imageLiteral(resourceName: "bg")) imageView.contentMode = .scaleAspectFill imageView.backgroundColor = UIColor.black.withAlphaComponent(0.2) tableView.backgroundView = imageView } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = super.tableView(tableView, cellForRowAt: indexPath) as! UITableViewVibrantCell cell.blurEffectStyle = .dark // if let menu = navigationController as? UISideMenuNavigationController { // cell.blurEffectStyle = menu.blurEffectStyle // } return cell } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 0 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return 0 } /* override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) // Configure the cell... return cell } */ /* // Override to support conditional editing of the table view. override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the specified item to be editable. return true } */ /* // Override to support editing the table view. override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { // Delete the row from the data source tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } */ /* // Override to support rearranging the table view. override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { } */ /* // Override to support conditional rearranging of the table view. override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { // Return false if you do not want the item to be re-orderable. return true } */ /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
[ -1 ]
1ab89ed3718d89550f1b92070c7c696b068629e6
b0ba431c81ee5abc88dcc648014edb8b526d977a
/CI2GoWatchExtension/ComplicationController.swift
66c226d68981875822311a9df46500350023777b
[ "MIT" ]
permissive
kimh/ci2go
ba038588143d8b6af4d6e7a120cef2f72e0e79ad
3d2d58a3caa0dfe8f3b7050cebfa558f45f15b37
refs/heads/master
2020-08-07T02:12:43.725033
2019-04-11T06:35:13
2019-04-11T06:35:13
null
0
0
null
null
null
null
UTF-8
Swift
false
false
7,792
swift
// // ComplicationController.swift // CI2GoWatch Extension // // Created by Atsushi Nagase on 2018/06/23. // Copyright © 2018 LittleApps Inc. All rights reserved. // import ClockKit class ComplicationController: NSObject, CLKComplicationDataSource { // MARK: - Timeline Configuration lazy var builds: [Build] = { return [Build].fromCache() ?? [] }() func builds(for complation: CLKComplication) -> [Build] { return builds.filter { $0.template(for: complation) != nil }.sorted() } func getSupportedTimeTravelDirections( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimeTravelDirections) -> Void) { handler([.forward, .backward]) } func getTimelineStartDate( for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) { let date = self.builds(for: complication).first?.timestamp handler(date) } func getTimelineEndDate( for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) { let date = self.builds(for: complication).last?.timestamp handler(date) } func getPrivacyBehavior( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) { handler(.showOnLockScreen) } // MARK: - Timeline Population func getCurrentTimelineEntry( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void) { // Call the handler with the current timeline entry guard let build = self.builds(for: complication).last, let date = build.timestamp, let template = build.template(for: complication) else { handler(nil) return } let entry = CLKComplicationTimelineEntry(date: date, complicationTemplate: template) handler(entry) } func getTimelineEntries( for complication: CLKComplication, before date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) { let entries: [CLKComplicationTimelineEntry] = self.builds(for: complication) .filter { build in if let timestamp = build.timestamp, timestamp < date { return true } return false } .prefix(limit) .map { build in return CLKComplicationTimelineEntry( date: build.timestamp!, complicationTemplate: build.template(for: complication)! ) } handler(entries) } func getTimelineEntries( for complication: CLKComplication, after date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) { let entries: [CLKComplicationTimelineEntry] = self.builds(for: complication) .filter { build in if let timestamp = build.timestamp, timestamp > date { return true } return false } .prefix(limit) .map { build in return CLKComplicationTimelineEntry( date: build.timestamp!, complicationTemplate: build.template(for: complication)! ) } handler(entries) } func getTimelineAnimationBehavior( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineAnimationBehavior) -> Void) { handler(.grouped) } // MARK: - Placeholder Templates func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) { handler(nil) } // swiftlint:disable:next cyclomatic_complexity function_body_length func template(for complication: CLKComplication) -> CLKComplicationTemplate { let appNameTextProvider = CLKTextProvider.localizableTextProvider(withStringsFileTextKey: "CI2Go") let emptyTextProvider = CLKTextProvider.localizableTextProvider(withStringsFileTextKey: "") switch complication.family { case .circularSmall: let tmpl = CLKComplicationTemplateCircularSmallSimpleImage() tmpl.imageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: "appicon-circularSmall")) return tmpl case .extraLarge: let tmpl = CLKComplicationTemplateExtraLargeSimpleImage() tmpl.imageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: "appicon-extraLarge")) return tmpl case .modularLarge: let tmpl = CLKComplicationTemplateModularLargeStandardBody() tmpl.headerImageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: "appicon-modularLarge-header")) tmpl.headerTextProvider = emptyTextProvider tmpl.body1TextProvider = appNameTextProvider tmpl.body2TextProvider = emptyTextProvider return tmpl case .modularSmall: let tmpl = CLKComplicationTemplateModularSmallSimpleImage() tmpl.imageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: "appicon-modularSmall")) return tmpl case .utilitarianLarge: let tmpl = CLKComplicationTemplateUtilitarianLargeFlat() tmpl.imageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: "appicon-utilitarian")) tmpl.textProvider = appNameTextProvider return tmpl case .utilitarianSmallFlat, .utilitarianSmall: let tmpl = CLKComplicationTemplateUtilitarianSmallFlat() tmpl.imageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: "appicon-utilitarian")) tmpl.textProvider = appNameTextProvider return tmpl case .graphicCorner: if #available(watchOSApplicationExtension 5.0, *) { let tmpl = CLKComplicationTemplateGraphicCornerTextImage() tmpl.imageProvider = CLKFullColorImageProvider(fullColorImage: #imageLiteral(resourceName: "appicon-utilitarian")) tmpl.textProvider = appNameTextProvider return tmpl } else { fatalError() } case .graphicBezel: if #available(watchOSApplicationExtension 5.0, *) { let tmpl = CLKComplicationTemplateGraphicBezelCircularText() tmpl.textProvider = appNameTextProvider return tmpl } else { fatalError() } case .graphicCircular: if #available(watchOSApplicationExtension 5.0, *) { let tmpl = CLKComplicationTemplateGraphicCircularOpenGaugeImage() tmpl.bottomImageProvider = CLKFullColorImageProvider(fullColorImage: #imageLiteral(resourceName: "appicon-utilitarian")) return tmpl } else { fatalError() } case .graphicRectangular: if #available(watchOSApplicationExtension 5.0, *) { let tmpl = CLKComplicationTemplateGraphicRectangularLargeImage() tmpl.imageProvider = CLKFullColorImageProvider(fullColorImage: #imageLiteral(resourceName: "appicon-utilitarian")) tmpl.textProvider = appNameTextProvider return tmpl } else { fatalError() } } } }
[ -1 ]
585d1440caeefece30b4ef156c7dfe187394481e
ca836b35a1dcc79530597ae59066f4f2c69067d4
/Lab 4/Trees:Heaps/Tree_starter/TestSuite/BinaryTreeTests.swift
fc1f15f2b68e673268ad0c6dfe7236b55acb7438
[]
no_license
tuf79200/Labs
b4781e8eb464354474775ef1a4a45fa35f57e3a7
0077b9db888e22c9a42da64251c14a9c53a00baa
refs/heads/master
2020-04-28T23:20:49.868485
2018-09-19T01:18:39
2018-09-19T01:18:39
null
0
0
null
null
null
null
UTF-8
Swift
false
false
882
swift
// // BinaryTreeTests.swift // BinaryTrees // // Created by Jordan Stapinski on 1/29/18. // import XCTest class BinaryTreeTests: 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, 278558, 229413, 204840, 344107, 155694, 229430, 163896, 180280, 213052, 376894, 352326, 311372, 311374, 196691, 385116, 237663, 254048, 319591, 221290, 131178, 319598, 204916, 131191, 237689, 131198, 319629, 311438, 196760, 426138, 278685, 311458, 278691, 278699, 377009, 278708, 180408, 295098, 139479, 229597, 311519, 205035, 286958, 327929, 344313, 147717, 368905, 278797, 254226, 368916, 262421, 377114, 237856, 237857, 278816, 311597, 98610, 180535, 336183, 287041, 139589, 344401, 377169, 368981, 155990, 278869, 368984, 106847, 98657, 270701, 270706, 139640, 311685, 106888, 385417, 311691, 385422, 213403, 385454, 377264, 311738, 33211, 336320, 311745, 278978, 254406, 188871, 278989, 278993, 278999, 328152, 369116, 287198, 279008, 279013, 279018, 311786, 319981, 319987, 279029, 254456, 377338, 377343, 279039, 254465, 279050, 139792, 303636, 279062, 393751, 279065, 377376, 180771, 377386, 197167, 385588, 115270, 377418, 385615, 426576, 369235, 295519, 139872, 279146, 295536, 287346, 139892, 287352, 344696, 279164, 189057, 311941, 336518, 311945, 369289, 344715, 311949, 287374, 377489, 311954, 352917, 230040, 271000, 377497, 303771, 377500, 295576, 205471, 344738, 139939, 279206, 205487, 295599, 303793, 336564, 164533, 287417, 287422, 377539, 164560, 385747, 279252, 361176, 418520, 287452, 295652, 279269, 369385, 279280, 312052, 172792, 344827, 221948, 279294, 205568, 295682, 197386, 434957, 312079, 295697, 426774, 197399, 426775, 197411, 279336, 295724, 312108, 197422, 353070, 164656, 295729, 197431, 230199, 336702, 295746, 353109, 377686, 230234, 189275, 435039, 295776, 279392, 303972, 385893, 246643, 295798, 361337, 279417, 254850, 369538, 295824, 353195, 140204, 377772, 304051, 230332, 377790, 353215, 213957, 213960, 345033, 279498, 386006, 418776, 50143, 123881, 304110, 287731, 271350, 295927, 312314, 328700, 328706, 410627, 320516, 295942, 386056, 353290, 377869, 320527, 238610, 418837, 140310, 197657, 189474, 369701, 238639, 312373, 238651, 377926, 214086, 296019, 353367, 304222, 230499, 279660, 173166, 312434, 377972, 353397, 279672, 337017, 377983, 402565, 222343, 386189, 296086, 238743, 296092, 238765, 238769, 402613, 230588, 279747, 353479, 353481, 402634, 189652, 189653, 419029, 148696, 296153, 304351, 304356, 222440, 328940, 279792, 66801, 353523, 386294, 386301, 320770, 386306, 66825, 328971, 353551, 320796, 222494, 115998, 304421, 279854, 66862, 353584, 345396, 386359, 378172, 312648, 337225, 304456, 230729, 238927, 353616, 296273, 222559, 378209, 386412, 296303, 296307, 116084, 181625, 337281, 148867, 296329, 304524, 296335, 9619, 370071, 279984, 173491, 304564, 279989, 353719, 304577, 280004, 361927, 296392, 280010, 312782, 222675, 271843, 280041, 329200, 296433, 321009, 280055, 230913, 329225, 230921, 296461, 304656, 329232, 370197, 402985, 394794, 230959, 288309, 312889, 288318, 288327, 280147, 239198, 157281, 99938, 312940, 222832, 337534, 337535, 263809, 312965, 288392, 239250, 419478, 321199, 337591, 280251, 280257, 321219, 403148, 9936, 9937, 370388, 272085, 345814, 280278, 280280, 345821, 321247, 321249, 345833, 345834, 280300, 67315, 173814, 288512, 288516, 321295, 321302, 345879, 116505, 321310, 255776, 313120, 362283, 378668, 280366, 296755, 280372, 280380, 345919, 436031, 403267, 280390, 280392, 345929, 18262, 362327, 345951, 362337, 345955, 296806, 288619, 288620, 296814, 214895, 313199, 362352, 182144, 305026, 67463, 329622, 337815, 436131, 313254, 436137, 362417, 362431, 214977, 280514, 214984, 362443, 231375, 329695, 436191, 313319, 436205, 296941, 223218, 43014, 354316, 313357, 239650, 329765, 354343, 223274, 346162, 288828, 436285, 288833, 288834, 436292, 403525, 436301, 338001, 354385, 338003, 280661, 329814, 354393, 280675, 280677, 43110, 321637, 329829, 436329, 288879, 223350, 280694, 288889, 215164, 215166, 280712, 346271, 436383, 362659, 239793, 182456, 280762, 223419, 379071, 280768, 149703, 346314, 321745, 280795, 387296, 280802, 379106, 346346, 321772, 125169, 436470, 149760, 411906, 321800, 272658, 338197, 305440, 338218, 321840, 379186, 321860, 182597, 280902, 289110, 215385, 354655, 321894, 313713, 354676, 436608, 362881, 240002, 436611, 108944, 190871, 149916, 420253, 141728, 289189, 108972, 272813, 338356, 436661, 281037, 289232, 281040, 256477, 330218, 109042, 174593, 420369, 289304, 207393, 289332, 174648, 338489, 338490, 297560, 436832, 436834, 313966, 420463, 346737, 313971, 346740, 420471, 330379, 330387, 117396, 346772, 330388, 264856, 289434, 346779, 289462, 314040, 109241, 248517, 363211, 363230, 289502, 264928, 330474, 289518, 199414, 322313, 117517, 322319, 166676, 207640, 281377, 289576, 191283, 273207, 289598, 281427, 322395, 109409, 330609, 174963, 207732, 109428, 158593, 109447, 224145, 355217, 256922, 289690, 420773, 289703, 240552, 363438, 347055, 289722, 289727, 273344, 330689, 363458, 379844, 19399, 191446, 248796, 347103, 52200, 289774, 183279, 347123, 314355, 240630, 314362, 257024, 330754, 134150, 330763, 281626, 175132, 248872, 322612, 314448, 339030, 281697, 314467, 257125, 281706, 273515, 207979, 404593, 363641, 363644, 150657, 248961, 330888, 363669, 339100, 380061, 429214, 199839, 265379, 249002, 306346, 3246, 421048, 265412, 290000, 298208, 298212, 298213, 290022, 330984, 298221, 298228, 216315, 208124, 437505, 322824, 257305, 126237, 339234, 372009, 412971, 298291, 306494, 216386, 224586, 331090, 314709, 314710, 372054, 159066, 134491, 314720, 281957, 306542, 380271, 208244, 249204, 249205, 290169, 290173, 306559, 314751, 224640, 306560, 298374, 314758, 314760, 142729, 388487, 314766, 224661, 282007, 290207, 314783, 314789, 282022, 314791, 396711, 396712, 282024, 241066, 314798, 380337, 380338, 150965, 380357, 339398, 306631, 306639, 413137, 429542, 191981, 282096, 191990, 290301, 372227, 323080, 323087, 323089, 175639, 388632, 396827, 282141, 134686, 347694, 290358, 265798, 282183, 265804, 224847, 118353, 396882, 290390, 44635, 396895, 323172, 282213, 224883, 314998, 323196, 175741, 339584, 282246, 290443, 282259, 257699, 298661, 290471, 61101, 224946, 110268, 224958, 282303, 323264, 274115, 306890, 241361, 298712, 298720, 12010, 339715, 216839, 339720, 372496, 323346, 339745, 241441, 315171, 257830, 421672, 200498, 282434, 307011, 315202, 282438, 413521, 216918, 241495, 282480, 241528, 315264, 339841, 241540, 282504, 315273, 315274, 372626, 380821, 282518, 118685, 298909, 323507, 290745, 274371, 151497, 372701, 298980, 380908, 290811, 241692, 315432, 315434, 102445, 233517, 176175, 282672, 241716, 225351, 315465, 307289, 200794, 315487, 356447, 307299, 438377, 233589, 266357, 233590, 422019, 241808, 381073, 299174, 405687, 299198, 258239, 389313, 299203, 299209, 372941, 266449, 356576, 307435, 438511, 381172, 184575, 381208, 299293, 151839, 233762, 217380, 151847, 282919, 332083, 332085, 332089, 282939, 438596, 332101, 323913, 348492, 323920, 282960, 348500, 168281, 332123, 332127, 323935, 242023, 160110, 242033, 291192, 315773, 291198, 340357, 225670, 332167, 242058, 373134, 291224, 242078, 315810, 315811, 381347, 340398, 299441, 283064, 291265, 127427, 291267, 127428, 283075, 324039, 373197, 160225, 127465, 291311, 233978, 291333, 340490, 258581, 291358, 283182, 283184, 234036, 315960, 348732, 242237, 70209, 348742, 70215, 348749, 381517, 332378, 201308, 111208, 184940, 373358, 389745, 209530, 291454, 373375, 152195, 348806, 316049, 111253, 316053, 111258, 111259, 176808, 299699, 299700, 422596, 422599, 291530, 225995, 242386, 422617, 422626, 299746, 234217, 299759, 234234, 299776, 291585, 430849, 291592, 62220, 422673, 430865, 291604, 422680, 291612, 152365, 422703, 422709, 152374, 234294, 160571, 430910, 160575, 160580, 381773, 201549, 201551, 242529, 349026, 357218, 177001, 201577, 308076, 242541, 209783, 177019, 185211, 308092, 398206, 291712, 381829, 316298, 349072, 308112, 209817, 324506, 390045, 127902, 185250, 185254, 283558, 316333, 373687, 316343, 373706, 316364, 316405, 349175, 201720, 127992, 357379, 234514, 308243, 316437, 300068, 357414, 300084, 308287, 21569, 218186, 341073, 439384, 234587, 300135, 316520, 357486, 316526, 144496, 300146, 300150, 291959, 300151, 160891, 300158, 349316, 349318, 234638, 373903, 169104, 177296, 308372, 119962, 300187, 300188, 283802, 234663, 300201, 300202, 373945, 259268, 283852, 259280, 316627, 333011, 333022, 234733, 234742, 128251, 292091, 234755, 439562, 292107, 414990, 251153, 177428, 349462, 333090, 382258, 300343, 382269, 333117, 300359, 177484, 406861, 259406, 234831, 120148, 357719, 374109, 316765, 333160, 284014, 316787, 111993, 357762, 112017, 234898, 259475, 275859, 112018, 357786, 251298, 333220, 316842, 374191, 284089, 292283, 415171, 300487, 300489, 284107, 210390, 210391, 210393, 144867, 103909, 316902, 251378, 308723, 300536, 300542, 292356, 259599, 308756, 398869, 374296, 374299, 308764, 431649, 169518, 431663, 194110, 349763, 292423, 218696, 292425, 243274, 128587, 333388, 128599, 235095, 333408, 300644, 317032, 415338, 243307, 54893, 325231, 333430, 325245, 194180, 415375, 153251, 300714, 210603, 415420, 333503, 259781, 333509, 333517, 333520, 325346, 153319, 325352, 284401, 325371, 194303, 194304, 284431, 243472, 161554, 366360, 325404, 399147, 431916, 284459, 300848, 259899, 325439, 325445, 153415, 341836, 415567, 325457, 317269, 341847, 284507, 350044, 128862, 300894, 276327, 292712, 325484, 423789, 292720, 325492, 276341, 341879, 317304, 333688, 112509, 194429, 55167, 325503, 333701, 243591, 243597, 325518, 333722, 350109, 292771, 300963, 415655, 292782, 317360, 243637, 284619, 301008, 153554, 292836, 292837, 317415, 325619, 432116, 333817, 292858, 415741, 333828, 358410, 399373, 145435, 317467, 292902, 325674, 227370, 129076, 243767, 358456, 309345, 194666, 260207, 432240, 227460, 415881, 104587, 235662, 325776, 284826, 333991, 227513, 301251, 227524, 309444, 194782, 301279, 317664, 243962, 375039, 194820, 325905, 325912, 227616, 211235, 432421, 211238, 358703, 358709, 325968, 6481, 366930, 366929, 334171, 383332, 383336, 416104, 211326, 317831, 227725, 227726, 252308, 285084, 121245, 317852, 285090, 342450, 293303, 293310, 416197, 129483, 342476, 317901, 285150, 342498, 358882, 334309, 391655, 432618, 375276, 301571, 342536, 416286, 375333, 293419, 244269, 375343, 236081, 23092, 375351, 244281, 301638, 309830, 293448, 55881, 416341, 416351, 268899, 244327, 39530, 301689, 244347, 326287, 375440, 334481, 318106, 318107, 342682, 318130, 383667, 293556, 342706, 285372, 39614, 285374, 154316, 96984, 375526, 342762, 342763, 293612, 154359, 432893, 162561, 383754, 326414, 285458, 310036, 326429, 293664, 326433, 400166, 293672, 318252, 285487, 301871, 375609, 293693, 252741, 318278, 293711, 244568, 244570, 342887, 400239, 310131, 400252, 359298, 359299, 260996, 113542, 416646, 228233, 392074, 236428, 56208, 318364, 310176, 310178, 310182, 293800, 236461, 293806, 326581, 326587, 326601, 359381, 433115, 343005, 326635, 203757, 187374, 383983, 277492, 318461, 293886, 293893, 433165, 384016, 433174, 326685, 252958, 203830, 359478, 302139, 392290, 253029, 228458, 318572, 15471, 351344, 285814, 285820, 392318, 384131, 285828, 302213, 302216, 228491, 228493, 326804, 285851, 351390, 253099, 253100, 318639, 367799, 113850, 294074, 64700, 228540, 228542, 302274, 367810, 195808, 310497, 228588, 302325, 261377, 228609, 245019, 253216, 261425, 351537, 171317, 318775, 286013, 113987, 146762, 294218, 294219, 318805, 425304, 163175, 327024, 327025, 318848, 294275, 253317, 384393, 368011, 318864, 318868, 318875, 310692, 245161, 286129, 286132, 228795, 425405, 302531, 425418, 302540, 310732, 64975, 310736, 327121, 286172, 245223, 286202, 359930, 228861, 302590, 286205, 253451, 359950, 146964, 253463, 187938, 286244, 245287, 245292, 196164, 56902, 228943, 179801, 343647, 286306, 310889, 204397, 138863, 188016, 294529, 229001, 310923, 188048, 302739, 425626, 229020, 302754, 40613, 40614, 40615, 384695, 327358, 212685, 384720, 212688, 302802, 286423, 229088, 212716, 212717, 360177, 319233, 360195, 278291, 294678, 286494, 294700, 409394, 319292, 360252, 360264, 376669, 245599, 237408, 425825, 302946, 425833, 417654, 188292, 327557, 294807, 376732, 294814, 311199, 319392, 294823, 327596, 294843, 188348, 237504, 294850, 384964, 344013, 212942, 24532, 294886, 278512, 311281, 311282 ]
5a4226764f7ef429968da1f2ceb75ca9fc9ac76b
80fa5b35725873e4fec46e92c32fb08fe6814c28
/LandmarkRemark/Routing/MainNavigator.swift
ea04ef5162f4b19b0dbd88a25cd5dc261c657aeb
[]
no_license
jke661s/landmark
295e68a34d69c25f239601807dcc5d1f5606fb54
15238c9cc3fe8dfe406b57db5b776821bf977720
refs/heads/main
2023-06-08T21:34:52.658543
2021-06-15T07:23:54
2021-06-15T07:23:54
376,507,893
0
0
null
null
null
null
UTF-8
Swift
false
false
699
swift
// // MainNavigator.swift // LandmarkRemark // // Created by Jackie Wang on 14/6/21. // import UIKit /// A navigator for MainViewController struct MainNavigator: NavigatorProviding { // MARK: - NavigatorProviding conformance func navigate(from viewController: UIViewController, using transitionType: TransitionType, parameters: [String : String]) { let destinationViewController = MainViewController() let navigationController = UINavigationController(rootViewController: destinationViewController) navigate(to: navigationController, from: viewController, using: transitionType) } }
[ -1 ]
37f359b716fff7092c10bc77b002588acfab540d
08cbc3d1517f017913e6ff28a5c5dd949b259290
/Shared/Views/SearchView.swift
7fa93f65ad940775ce304769920e6859ae3b7f10
[]
no_license
slate-engineering/slate-ios
4e6661d907c1175b48c8fc53d9a7add0937d0b5d
94feea7359c124f7467b7f1735e584e624498d3a
refs/heads/main
2023-03-26T15:33:27.024324
2021-03-03T21:59:17
2021-03-03T21:59:17
333,904,017
1
0
null
null
null
null
UTF-8
Swift
false
false
5,591
swift
// // SearchView.swift // Slate iOS (iOS) // // Created by Martina Long on 1/29/21. // import SwiftUI struct FileSearchResultView: View { var file: File var slate: Slate? var user: User? var body: some View { HStack { Image("image") .resizable() .frame(width: 24, height: 24) .foregroundColor(Color(red: 191/255, green: 191/255, blue: 191/255)) .frame(width: 48, height: 48) .overlay(RoundedRectangle(cornerRadius: 4).stroke(Color("foreground"), lineWidth: 1)) VStack(alignment: .leading) { Text(file.wrappedName) .font(Font.custom("Inter", size: 14)) .fontWeight(.medium) .foregroundColor(Color("textGray")) .lineLimit(1) Text(Strings.getFileExtension(file.wrappedFilename).uppercased()) .font(Font.custom("Inter", size: 12)) .foregroundColor(Color("textGrayLight")) .lineLimit(1) } Spacer() } } } struct SlateSearchResultView: View { var slate: Slate var user: User? var body: some View { HStack { Image("box") .resizable() .frame(width: 24, height: 24) .foregroundColor(Color(red: 191/255, green: 191/255, blue: 191/255)) .frame(width: 48, height: 48) .overlay(RoundedRectangle(cornerRadius: 4).stroke(Color("foreground"), lineWidth: 1)) VStack(alignment: .leading) { if user != nil { Text(slate.data.name) .font(Font.custom("Inter", size: 14)) .fontWeight(.medium) .foregroundColor(Color("textGray")) .lineLimit(1) Text(user!.data.name != nil && user!.data.name!.count > 0 ? "\(user!.data.name!)" : "@\(user!.username)") .font(Font.custom("Inter", size: 12)) .foregroundColor(Color("textGrayLight")) .lineLimit(1) } else { Text(slate.data.name) .font(Font.custom("Inter", size: 14)) .fontWeight(.medium) .foregroundColor(Color("textGray")) .lineLimit(1) } } Spacer() } } } struct UserSearchResultView: View { var user: User var body: some View { HStack { Image("user") .resizable() .frame(width: 24, height: 24) .foregroundColor(Color(red: 191/255, green: 191/255, blue: 191/255)) .frame(width: 48, height: 48) .overlay(RoundedRectangle(cornerRadius: 4).stroke(Color("foreground"), lineWidth: 1)) VStack(alignment: .leading) { if user.data.name != nil || user.data.name!.count == 0 { Text("has a name") Text("\(user.data.name!)") .font(Font.custom("Inter", size: 14)) .fontWeight(.medium) .foregroundColor(Color("textGray")) .lineLimit(1) Text("@\(user.username)") .font(Font.custom("Inter", size: 12)) .foregroundColor(Color("textGrayLight")) .lineLimit(1) } else { Text("has no name") Text("@\(user.username)") .font(Font.custom("Inter", size: 14)) .fontWeight(.medium) .foregroundColor(Color("textGray")) .lineLimit(1) } } Spacer() } .onAppear { print(} } } struct SearchView: View { @State private var query = "" @State private var results = [SearchResult]() var body: some View { VStack { HStack { InputView("Search...", text: $query) Image("search") .resizable() .frame(width: 24, height: 24) .foregroundColor(Color("darkGray")) .onTapGesture { Actions.search(query: query, type: nil) { results = $0 } } } .padding(.horizontal, Constants.sideMargin) ScrollView(.vertical) { VStack { ForEach(results, id: \.id) { result in if result.type == .file && result.file != nil{ FileSearchResultView(file: result.file!, slate: result.slate, user: result.user) } else if result.type == .slate && result.slate != nil { SlateSearchResultView(slate: result.slate!, user: result.user) } else if result.type == .user && result.user != nil { UserSearchResultView(user: result.user!) } } Spacer() } .padding(.horizontal, Constants.sideMargin) .padding(.bottom, Constants.bottomMargin) } } } } struct SearchView_Previews: PreviewProvider { static var previews: some View { SearchView() } }
[ -1 ]
9f5c94172387457706e65b786c4476c9c5e3745f
c907c8b0fe155cedc582d3a56269c1c97d9a3239
/RootViewController.swift
f5e60856e8ebc8da091b7e9135e0406a94effe0f
[]
no_license
jakeseaton/HitThat
b303899a6cad23d4641f61c322be90ffc3589c5d
6f4bf185c8afdbdefd434a91a19da6f80a94a336
refs/heads/master
2021-01-19T05:36:22.743868
2017-03-12T22:57:45
2017-03-12T22:57:45
33,130,232
3
1
null
null
null
null
UTF-8
Swift
false
false
4,878
swift
// // RootViewController.swift // derp // // Created by Jake Seaton on 3/24/15. // Copyright (c) 2015 Jake Seaton. All rights reserved. // import UIKit class RootViewController: UIViewController, UIPageViewControllerDelegate { var pageViewController: UIPageViewController? override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. // Configure the page view controller and add it as a child view controller. self.pageViewController = UIPageViewController(transitionStyle: .Scroll, navigationOrientation: .Vertical, options: nil) self.pageViewController!.delegate = self let startingViewController: DataViewController = self.modelController.viewControllerAtIndex(0, storyboard: self.storyboard!)! let viewControllers = [startingViewController] self.pageViewController!.setViewControllers(viewControllers, direction: .Forward, animated: false, completion: {done in }) self.pageViewController!.dataSource = self.modelController self.addChildViewController(self.pageViewController!) self.view.addSubview(self.pageViewController!.view) // Set the page view controller's bounds using an inset rect so that self's view is visible around the edges of the pages. var pageViewRect = self.view.bounds if UIDevice.currentDevice().userInterfaceIdiom == .Pad { pageViewRect = CGRectInset(pageViewRect, 40.0, 40.0) } self.pageViewController!.view.frame = pageViewRect self.pageViewController!.didMoveToParentViewController(self) // Add the page view controller's gesture recognizers to the book view controller's view so that the gestures are started more easily. self.view.gestureRecognizers = self.pageViewController!.gestureRecognizers } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } var modelController: ModelController { // Return the model controller object, creating it if necessary. // In more complex implementations, the model controller may be passed to the view controller. if _modelController == nil { _modelController = ModelController() } return _modelController! } var _modelController: ModelController? = nil // MARK: - UIPageViewController delegate methods func pageViewController(pageViewController: UIPageViewController, spineLocationForInterfaceOrientation orientation: UIInterfaceOrientation) -> UIPageViewControllerSpineLocation { if (orientation == .Portrait) || (orientation == .PortraitUpsideDown) || (UIDevice.currentDevice().userInterfaceIdiom == .Phone) { // In portrait orientation or on iPhone: Set the spine position to "min" and the page view controller's view controllers array to contain just one view controller. Setting the spine position to 'UIPageViewControllerSpineLocationMid' in landscape orientation sets the doubleSided property to YES, so set it to NO here. let currentViewController = self.pageViewController!.viewControllers[0] as UIViewController let viewControllers = [currentViewController] self.pageViewController!.setViewControllers(viewControllers, direction: .Forward, animated: true, completion: {done in }) self.pageViewController!.doubleSided = false return .Min } // In landscape orientation: Set set the spine location to "mid" and the page view controller's view controllers array to contain two view controllers. If the current page is even, set it to contain the current and next view controllers; if it is odd, set the array to contain the previous and current view controllers. let currentViewController = self.pageViewController!.viewControllers[0] as DataViewController var viewControllers: [AnyObject] let indexOfCurrentViewController = self.modelController.indexOfViewController(currentViewController) if (indexOfCurrentViewController == 0) || (indexOfCurrentViewController % 2 == 0) { let nextViewController = self.modelController.pageViewController(self.pageViewController!, viewControllerAfterViewController: currentViewController) viewControllers = [currentViewController, nextViewController!] } else { let previousViewController = self.modelController.pageViewController(self.pageViewController!, viewControllerBeforeViewController: currentViewController) viewControllers = [previousViewController!, currentViewController] } self.pageViewController!.setViewControllers(viewControllers, direction: .Forward, animated: true, completion: {done in }) return .Mid } }
[ 299110, 285490, 321843, 291602, 275509, 280344, 296794, 304349, 308735 ]
8196b41fb8c1c52bb5841c2135094bb205ab03d8
c19187b931def63a46287b3663dda28510851302
/main.swift
b9c0fea691040210ae10475139cb045e772ae49e
[ "MIT" ]
permissive
Raghavender1437/Messaging-Board-code
7f6683b9e98ad7a29bd29a3011935daf53b7ed74
3aef73292f920f1c28c1eb334aca12e52e2049f4
refs/heads/master
2021-07-13T02:32:07.918065
2017-10-10T17:26:17
2017-10-10T17:26:17
106,448,559
0
0
null
null
null
null
UTF-8
Swift
false
false
1,138
swift
import MongoKitten import Vapor print("Hello, world!") let drop = Droplet() let server = try Server(mongoURL: "mongodb://localhost/") let database = server["MKTutorial"] drop.get { req in return try drop.view.make("welcome", ["message":drop.localization[req.lang, "WELCOME", "title"]]) } //GET drop.get("hello") { req in return "Hello, Mongokitten!" } //POST drop.post("message") { req in guard let username = req.data["username"]?.string, let email = req.data["email"]?.string, let message = req.data["message"]?.string else { throw Abort.badRequest } let user = Message(username:username, email: email, message:message) try user.save() return "Created a User with username: \(user.username), email:\(user.email), message:\(message)" } drop.get("message") { req in guard let id = req.headers["id"]?.string else { throw Abort.badRequest } let user = try Message(id: id) return "User found with Username \(user.username), email:\(user.email), message:\(user.message) " } drop.run()
[ -1 ]
fb977a48853af47c38d32ae99e2f2a0331e78fa7
0353b8892d5a8b02c311a30e956f0afb24b0a2fc
/OnTheRoadPictureExe/PicViewController.swift
846cf0093de55011bcf970db687efcb2f23aad77
[]
no_license
wendyfan09/On-the-Road
92e865645fab511d33a43ee0dbc71556e26c8f8e
2c4df7b61af0c95c0b634148ae3cc3021549b14e
refs/heads/master
2016-08-05T00:05:47.576556
2015-03-28T21:45:56
2015-03-28T21:45:56
33,051,357
0
0
null
null
null
null
UTF-8
Swift
false
false
3,791
swift
// // PicViewController.swift // OnTheRoadPictureExe // // Created by JiangYi Zhang on 14/11/8. // Copyright (c) 2014年 JiangYi Zhang. All rights reserved. // import UIKit import CoreData class PicViewController: UIViewController, UIScrollViewDelegate { var dataPic:Array<AnyObject>! = [] var data: NSManagedObject! var context: NSManagedObjectContext! var Scrollview: UIScrollView! var picturearray: Array<String> = [] override func viewDidLoad() { super.viewDidLoad() context = (UIApplication.sharedApplication().delegate as AppDelegate).managedObjectContext Scrollview = UIScrollView(frame: CGRectMake(0, 65, 378, 568)) Scrollview.scrollEnabled = true self.view.backgroundColor = UIColor.blackColor() // self.navigationController?.navigationBar.backgroundColor = UIColor.whiteColor() } override func viewWillAppear(animated: Bool) { var comment = data.valueForKey("rcomment") as String var groupid = data.valueForKey("recordid") as String var f = NSFetchRequest(entityName: "Picture") // 返回是一个anyobject数组 dataPic = context.executeFetchRequest(f, error: nil) var doc = NSHomeDirectory() + "/Documents" for var i = 0; i < dataPic.count; i++ { var recordid: AnyObject? = dataPic[i].valueForKey("groupid") var picname: AnyObject? = dataPic[i].valueForKey("picturename") var groupidp = "\(recordid!)" var picnamep = "\(picname!)" if groupid == groupidp { let tmp:String = "\(doc)/\(groupid)/\(picnamep)" picturearray.append(tmp) } } println("\(picturearray[0])") var commentTextView = UITextView(frame: CGRectMake(5, 5, 180, 165)) commentTextView.text = comment var MapImageView = UIImageView(frame: CGRectMake(190, 5, 185, 165)) MapImageView.image = UIImage(contentsOfFile: picturearray[0]) Scrollview.addSubview(commentTextView) Scrollview.addSubview(MapImageView) var y: CGFloat = 180 for var i = 1; i < picturearray.count; i++ { let cgrect = CGRectMake(0, y, 378, 170) var imageview = UIImageView(frame: cgrect) imageview.image = UIImage(contentsOfFile: picturearray[i]) println("\(picturearray[i])") self.Scrollview.addSubview(imageview) y = y + 180 } } override func viewDidAppear(animated: Bool) { let height = picturearray.count * 180 Scrollview.contentSize = CGSize(width: 378, height: height) self.view.addSubview(Scrollview) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func preferredStatusBarStyle() -> UIStatusBarStyle { return UIStatusBarStyle.BlackOpaque } @IBAction func didBackBtnClicked(sender: AnyObject) { dismissViewControllerAnimated(true, completion: nil) } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
38e5d6f3f690bc1b282a8fe77088bd695bae0cf7
7f0af1a374e101b4cfd29dec59f7874b510d9ea2
/Sources/SwiftFormatRules/FileScopedDeclarationPrivacy.swift
4b2d514027e1d45144925a7fedac203963a7d60f
[ "Apache-2.0", "Swift-exception" ]
permissive
doc22940/swift-format
1bc188b57afa16b5cea5c3e6a87f417d583e5734
80ce1ed2170a473cb3bc139dfdf2d17f51c927da
refs/heads/master
2022-04-25T08:03:50.369959
2020-04-17T21:31:03
2020-04-17T21:31:03
257,170,924
1
0
Apache-2.0
2020-04-20T04:26:54
2020-04-20T04:26:52
null
UTF-8
Swift
false
false
7,238
swift
//===----------------------------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// import SwiftFormatCore import SwiftSyntax /// Declarations at file scope with effective private access should be consistently declared as /// either `fileprivate` or `private`, determined by configuration. /// /// Lint: If a file-scoped declaration has formal access opposite to the desired access level in the /// formatter's configuration, a lint error is raised. /// /// Format: File-scoped declarations that have formal access opposite to the desired access level in /// the formatter's configuration will have their access level changed. public final class FileScopedDeclarationPrivacy: SyntaxFormatRule { public override func visit(_ node: SourceFileSyntax) -> Syntax { let newStatements = rewrittenCodeBlockItems(node.statements) return Syntax(node.withStatements(newStatements)) } /// Returns a list of code block items equivalent to the given list, but where any file-scoped /// declarations with effective private access have had their formal access level rewritten, if /// necessary, to be either `private` or `fileprivate`, as determined by the formatter /// configuration. /// /// - Parameter codeBlockItems: The list of code block items to rewrite. /// - Returns: A new `CodeBlockItemListSyntax` that has possibly been rewritten. private func rewrittenCodeBlockItems(_ codeBlockItems: CodeBlockItemListSyntax) -> CodeBlockItemListSyntax { let newCodeBlockItems = codeBlockItems.map { codeBlockItem -> CodeBlockItemSyntax in switch codeBlockItem.item.as(SyntaxEnum.self) { case .ifConfigDecl(let ifConfigDecl): // We need to look through `#if/#elseif/#else` blocks because the decls directly inside // them are still considered file-scope for our purposes. return codeBlockItem.withItem(Syntax(rewrittenIfConfigDecl(ifConfigDecl))) case .functionDecl(let functionDecl): return codeBlockItem.withItem( Syntax(rewrittenDecl( functionDecl, modifiers: functionDecl.modifiers, factory: functionDecl.withModifiers))) case .variableDecl(let variableDecl): return codeBlockItem.withItem( Syntax(rewrittenDecl( variableDecl, modifiers: variableDecl.modifiers, factory: variableDecl.withModifiers))) case .classDecl(let classDecl): return codeBlockItem.withItem( Syntax(rewrittenDecl( classDecl, modifiers: classDecl.modifiers, factory: classDecl.withModifiers))) case .structDecl(let structDecl): return codeBlockItem.withItem( Syntax(rewrittenDecl( structDecl, modifiers: structDecl.modifiers, factory: structDecl.withModifiers))) case .enumDecl(let enumDecl): return codeBlockItem.withItem( Syntax(rewrittenDecl( enumDecl, modifiers: enumDecl.modifiers, factory: enumDecl.withModifiers))) case .protocolDecl(let protocolDecl): return codeBlockItem.withItem( Syntax(rewrittenDecl( protocolDecl, modifiers: protocolDecl.modifiers, factory: protocolDecl.withModifiers))) case .typealiasDecl(let typealiasDecl): return codeBlockItem.withItem( Syntax(rewrittenDecl( typealiasDecl, modifiers: typealiasDecl.modifiers, factory: typealiasDecl.withModifiers))) default: return codeBlockItem } } return SyntaxFactory.makeCodeBlockItemList(newCodeBlockItems) } /// Returns a new `IfConfigDeclSyntax` equivalent to the given node, but where any file-scoped /// declarations with effective private access have had their formal access level rewritten, if /// necessary, to be either `private` or `fileprivate`, as determined by the formatter /// configuration. /// /// - Parameter ifConfigDecl: The `IfConfigDeclSyntax` to rewrite. /// - Returns: A new `IfConfigDeclSyntax` that has possibly been rewritten. private func rewrittenIfConfigDecl(_ ifConfigDecl: IfConfigDeclSyntax) -> IfConfigDeclSyntax { let newClauses = ifConfigDecl.clauses.map { clause -> IfConfigClauseSyntax in switch clause.elements.as(SyntaxEnum.self) { case .codeBlockItemList(let codeBlockItemList): return clause.withElements(Syntax(rewrittenCodeBlockItems(codeBlockItemList))) default: return clause } } return ifConfigDecl.withClauses(SyntaxFactory.makeIfConfigClauseList(newClauses)) } /// Returns a rewritten version of the given declaration if its modifier list contains `private` /// that contains `fileprivate` instead. /// /// If the modifier list is not inconsistent with the configured access level, the original /// declaration is returned unchanged. /// /// - Parameters: /// - decl: The declaration to possibly rewrite. /// - modifiers: The modifier list of the declaration (i.e., `decl.modifiers`). /// - factory: A reference to the `decl`'s `withModifiers` instance method that is called to /// rewrite the node if needed. /// - Returns: A new node if the modifiers were rewritten, or the original node if not. private func rewrittenDecl<DeclType: DeclSyntaxProtocol>( _ decl: DeclType, modifiers: ModifierListSyntax?, factory: (ModifierListSyntax?) -> DeclType ) -> DeclType { let invalidAccess: TokenKind let validAccess: TokenKind let diagnostic: Diagnostic.Message switch context.configuration.fileScopedDeclarationPrivacy.accessLevel { case .private: invalidAccess = .fileprivateKeyword validAccess = .privateKeyword diagnostic = .replaceFileprivateWithPrivate case .fileprivate: invalidAccess = .privateKeyword validAccess = .fileprivateKeyword diagnostic = .replacePrivateWithFileprivate } guard let modifiers = modifiers, modifiers.has(modifier: invalidAccess) else { return decl } let newModifiers = modifiers.map { modifier -> DeclModifierSyntax in let name = modifier.name if name.tokenKind == invalidAccess { diagnose(diagnostic, on: name) return modifier.withName(name.withKind(validAccess)) } return modifier } return factory(SyntaxFactory.makeModifierList(newModifiers)) } } extension Diagnostic.Message { public static let replacePrivateWithFileprivate = Diagnostic.Message(.warning, "replace 'private' with 'fileprivate' on file-scoped declarations") public static let replaceFileprivateWithPrivate = Diagnostic.Message(.warning, "replace 'fileprivate' with 'private' on file-scoped declarations") }
[ -1 ]
ccef414f4e68479789cf4a510b19150de7d0bb4d
6c203053a60e36a66b653cf787cc34a976d9df1a
/Sources/MonacoEditor/EditorMinimapOptions.swift
abfc6d6783b32fb586139d58048a0ca36334ef0b
[ "MIT" ]
permissive
alladinian/SwiftMonacoEditor
62a69f22ace04ac9917afb1055a0506d4fb97495
469d164af1e6f9bbcbb62e858c2f1e283e7eabf3
refs/heads/main
2022-12-02T03:46:41.468399
2020-08-23T22:04:41
2020-08-23T22:04:41
null
0
0
null
null
null
null
UTF-8
Swift
false
false
970
swift
// Copyright 2020 Naked Software, LLC // // This program is confidential and proprietary to Naked Software, LLC, // and may not be reproduced, published, or disclosed to others without // company authorization. import Foundation struct EditorMinimapOptions: Codable { let enabled: Bool? let maxColumn: Int? let renderCharacters: Bool? let scale: Float? let showSlider: String? let side: String? init(_ options: MonacoEditorMinimapOptions) { enabled = options.enabled maxColumn = options.maxColumn renderCharacters = options.renderCharacters scale = options.scale if let value = options.showSlider { switch value { case .always: showSlider = "always" case .mouseover: showSlider = "mouseover" } } else { showSlider = nil } if let value = options.side { switch value { case .left: side = "left" case .right: side = "right" } } else { side = nil } } }
[ -1 ]
649cc79eda9f8f405b4f4e3bdc6deacd176c9b4d
5cba15ecced06e184722f0784df7fbb235f432ea
/CoffeeMaker/CoffeeMaker/Coffee/SimpleCoffee.swift
d9cb832da1dae82feeb7b5b9abd2bfd612fdc801
[]
no_license
therealniks/CoffeeMaker
85becefa3cc3e530ff42f29c21a26acf5259cb0b
8a418d145f14b83b5a21d2b54ffa34bb8c197d0b
refs/heads/main
2023-05-26T08:08:03.680753
2021-06-08T12:35:14
2021-06-08T12:35:14
360,272,272
0
0
null
2021-06-02T19:15:52
2021-04-21T18:43:47
null
UTF-8
Swift
false
false
405
swift
// // SimpleCoffee.swift // CoffeeMaker // // Created by N!kS on 21.04.2021. // import Foundation class SimpleCoffee: Coffee { var price: Double var type: BaseCoffeeTypePrice var volume: VolumeMultiplier init(type: BaseCoffeeTypePrice, volume: VolumeMultiplier) { self.type = type self.volume = volume self.price = type.rawValue * volume.rawValue } }
[ -1 ]
9af527c21292f3a63453232998cb689980d6bb02
e741e422dc3cfc98145cf6be42194b52942636cc
/ListableUI/Tests/Layout/LayoutAttributesSnapshot.swift
cc3fdace84d7950ac2e6963af8e90ac3c8352840
[ "Apache-2.0" ]
permissive
n8chur/Listable
4ee1dbbf3ee461cc17d832d085bca1dcf101f6cf
f75dbb72d63b47cd0e0e689e5709fb602e6fa8b5
refs/heads/main
2023-08-23T08:50:41.985444
2021-09-15T23:58:30
2021-09-15T23:58:30
409,694,396
0
0
Apache-2.0
2021-09-23T17:59:51
2021-09-23T17:59:50
null
UTF-8
Swift
false
false
891
swift
// // LayoutAttributesSnapshot.swift // ListableUI // // Created by Kyle Van Essen on 6/11/20. // import Foundation import Snapshot @testable import ListableUI struct LayoutAttributesSnapshot : SnapshotOutputFormat { typealias RenderingFormat = ListView static func snapshotData(with renderingFormat: ListView) throws -> Data { renderingFormat.collectionViewLayout.layout.content.layoutAttributes.stringRepresentation.data(using: .utf8)! } static var outputInfo: SnapshotOutputInfo { SnapshotOutputInfo( directoryName: "ListAttributes", fileExtension: "txt" ) } static func validate(render: ListView, existingData: Data) throws { let new = try Self.snapshotData(with: render) if new != existingData { throw SnapshotValidationError.notMatching } } }
[ -1 ]
8274d3ad5e8c7cf025a9c5e5765a9ea7fc92bb95
1f282491f394c09db9527f5c28f653b47c98c20c
/TouchTracker/Line.swift
445ca1210cd60febd2b619d1a0ede3f92db7b254
[]
no_license
codeWonderland/iOS-PS5
3ecde0f489602c811778b704c3fb84e2b73b62df
8a1b1961fd378e61a210d807a643abdb777e10cf
refs/heads/master
2020-05-07T10:35:54.511180
2019-04-09T19:04:07
2019-04-09T19:04:07
180,424,273
0
0
null
null
null
null
UTF-8
Swift
false
false
220
swift
// // Copyright © 2015 Big Nerd Ranch // import Foundation import CoreGraphics struct Line { var begin = CGPoint.zero var end = CGPoint.zero var touchStart: TimeInterval var touchStop: TimeInterval }
[ 280709 ]
2ee97308d03d261ccd731c28061b8a776068a284
17ae7938b7741d2c392af7b6bb49eab727f7336d
/CalculatorCloneTests/CalculatorCloneTests.swift
1362e9b4c5f1d78df3ec411392960b4c9766de66
[]
no_license
CynthiaStrickland/Calculator-Clone
5e5b0ccc0723231705802048625b0e7c7cf80f3c
3cb295c8e8a187a932e6b04d184bb503de61b499
refs/heads/master
2021-06-11T15:26:05.741396
2017-01-05T00:22:17
2017-01-05T00:22:17
48,631,369
0
0
null
null
null
null
UTF-8
Swift
false
false
1,014
swift
// // CalculatorCloneTests.swift // CalculatorCloneTests // // Created by Cynthia Whitlatch on 12/26/15. // Copyright © 2015 Cynthia Whitlatch. All rights reserved. // import XCTest @testable import CalculatorClone class CalculatorCloneTests: 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. } } }
[ 282633, 313357, 182296, 241692, 98333, 278558, 239650, 16419, 102437, 229413, 354343, 292902, 354345, 278570, 204840, 223274, 344107, 233517, 124975, 253999, 227370, 346162, 229430, 319542, 124984, 358456, 288833, 286788, 352326, 311372, 311374, 354385, 196691, 315476, 280661, 329814, 278615, 338007, 307289, 200794, 354393, 315487, 45153, 309345, 280675, 280677, 313447, 131178, 194666, 278634, 315498, 319598, 288879, 352368, 299121, 204916, 284788, 233589, 280694, 333940, 237689, 131191, 292988, 215164, 313469, 215166, 292992, 278655, 333955, 194691, 227460, 280712, 215178, 311438, 241808, 323729, 325776, 317587, 278677, 284826, 278685, 346271, 311458, 278691, 49316, 233636, 184484, 333991, 333992, 284841, 233642, 284842, 278699, 32941, 278704, 239793, 278708, 125109, 131256, 182456, 280762, 184505, 227513, 223419, 299198, 379071, 280768, 299203, 301251, 309444, 338119, 282831, 321745, 254170, 301279, 356576, 338150, 176362, 286958, 125169, 338164, 327929, 184570, 243962, 125183, 309503, 184575, 125188, 313608, 125193, 375051, 180493, 125198, 278797, 325905, 254226, 125203, 125208, 325912, 309529, 299293, 278816, 282913, 233762, 125217, 211235, 217380, 211238, 305440, 151847, 282919, 125235, 332085, 280887, 125240, 332089, 278842, 282939, 315706, 287041, 241986, 287043, 260418, 332101, 280902, 182598, 227654, 323916, 319821, 254286, 348492, 250192, 6481, 323920, 344401, 348500, 366929, 155990, 366930, 278869, 6489, 272729, 379225, 289110, 332127, 106847, 323935, 391520, 321894, 227616, 280939, 242029, 246127, 285040, 242033, 354676, 199029, 139640, 246136, 246137, 291192, 362881, 248194, 225670, 395659, 227725, 395661, 240016, 178582, 291224, 293274, 317852, 283038, 61857, 285090, 61859, 289189, 375207, 340398, 377264, 61873, 61880, 283064, 278970, 319930, 336317, 293310, 278978, 127427, 127428, 283075, 188871, 324039, 317901, 278989, 281040, 278993, 326100, 278999, 328152, 176601, 242139, 369116, 285150, 287198, 279008, 342498, 242148, 195045, 279013, 279018, 281072, 279029, 279032, 233978, 279039, 301571, 291333, 342536, 287241, 279050, 340490, 283153, 230499, 303636, 279062, 289304, 279065, 342553, 291358, 182817, 375333, 377386, 244269, 283182, 283184, 23092, 315960, 352829, 301638, 348742, 322120, 55881, 293448, 348749, 281166, 244310, 297560, 354911, 436832, 66150, 111208, 344680, 191082, 279146, 313966, 281199, 287352, 301689, 279164, 291454, 189057, 311941, 348806, 279177, 369289, 330379, 344715, 184973, 311949, 330387, 330388, 117397, 352917, 227990, 230040, 271000, 342682, 303771, 205471, 279206, 295590, 300542, 287404, 295599, 303793, 299699, 299700, 164533, 338613, 293556, 314040, 287417, 158394, 285371, 342713, 285373, 66242, 287433, 363211, 154316, 287439, 279252, 318173, 289502, 363230, 299746, 295652, 338662, 285415, 234217, 346858, 230125, 289518, 312047, 125684, 199414, 154359, 230134, 299770, 35583, 205568, 162561, 295682, 299776, 363263, 285444, 322319, 295697, 166676, 291604, 207640, 291612, 326429, 336671, 326433, 344865, 281377, 283430, 279336, 289576, 293672, 318250, 295724, 152365, 312108, 285487, 318252, 353069, 164656, 328499, 242485, 234294, 230199, 353078, 353079, 285497, 336702, 160575, 295744, 420677, 353094, 353095, 299849, 283467, 293711, 201551, 281427, 353109, 281433, 230234, 301918, 293730, 303972, 351077, 279397, 275303, 342887, 242541, 400239, 246641, 330609, 207732, 246648, 209785, 269178, 177019, 279417, 361337, 291712, 158593, 254850, 359298, 113542, 287622, 240518, 228233, 228234, 308107, 56208, 295824, 308112, 209817, 324506, 324507, 318364, 310178, 189348, 324517, 283558, 289703, 293800, 310182, 353195, 140204, 353197, 353216, 349121, 363458, 213960, 279498, 316364, 338899, 304087, 340955, 248797, 207838, 50143, 130016, 340961, 64485, 314342, 123881, 324586, 203757, 320493, 289774, 304110, 320494, 340974, 287731, 316405, 240630, 295927, 201720, 304122, 314362, 320507, 328700, 328706, 320516, 134150, 230410, 320527, 146448, 324625, 316437, 140310, 418837, 197657, 281626, 201755, 336929, 300068, 357414, 248872, 345132, 238639, 252980, 300084, 322612, 359478, 324666, 238651, 302139, 21569, 359495, 238664, 300111, 314448, 341073, 353367, 156764, 277597, 156765, 304222, 113760, 302177, 281697, 314467, 281700, 250981, 285798, 322663, 300136, 316520, 228458, 207979, 281706, 300135, 316526, 15471, 357486, 187506, 353397, 291959, 300151, 160891, 341115, 363644, 300158, 150657, 187521, 248961, 285828, 349316, 279685, 349318, 222343, 228491, 228493, 285838, 169104, 162961, 177296, 308372, 185493, 296086, 326804, 283802, 300187, 119962, 296092, 300188, 339102, 302240, 306338, 343203, 300201, 300202, 253099, 282327, 238765, 279728, 367799, 339130, 64700, 302274, 343234, 367810, 259268, 283847, 353479, 62665, 353481, 353482, 283852, 244940, 283853, 290000, 228563, 189652, 189653, 279765, 296153, 357595, 279774, 298208, 304356, 298212, 290022, 330984, 228588, 298221, 234733, 253167, 279792, 353523, 298228, 292085, 228600, 292091, 216315, 208124, 316669, 363771, 388349, 228609, 279814, 322824, 242954, 292107, 312587, 328971, 251153, 245019, 320796, 126237, 130338, 130343, 279854, 351537, 298291, 345396, 300343, 116026, 222524, 286018, 113987, 193859, 279875, 304456, 230729, 224586, 372043, 177484, 251213, 238927, 234831, 296273, 120148, 318805, 283991, 357719, 222559, 314720, 292195, 230756, 281957, 294243, 333160, 230765, 284014, 306542, 279920, 243056, 312689, 314739, 116084, 327025, 327031, 111993, 290173, 306559, 179587, 378244, 298374, 314758, 314760, 388487, 296329, 368011, 314766, 296335, 112017, 112018, 234898, 306579, 224661, 282007, 357786, 290207, 314783, 310692, 333220, 314789, 279974, 282024, 241066, 316842, 279984, 286129, 173491, 286132, 210358, 284089, 292283, 228795, 302529, 302531, 163268, 380357, 415171, 300487, 296392, 361927, 300489, 370123, 148940, 280013, 310732, 64975, 312782, 327121, 284107, 222675, 306639, 366037, 210390, 210391, 353750, 210393, 228827, 286172, 280032, 144867, 310757, 187878, 280041, 361963, 54765, 191981, 306673, 321009, 308723, 251378, 343542, 280055, 300536, 288249, 343543, 286202, 286205, 228861, 302590, 290301, 210433, 282114, 228867, 292356, 306692, 366083, 296448, 323080, 230921, 253452, 323087, 304656, 329232, 316946, 146964, 398869, 308756, 282136, 308764, 282141, 349726, 282146, 306723, 245287, 245292, 349741, 169518, 230959, 286254, 288309, 290358, 194110, 235070, 288318, 349763, 196164, 124485, 56902, 288326, 288327, 292425, 243274, 128587, 333388, 228943, 286288, 333393, 280147, 290390, 235095, 300630, 306776, 196187, 239198, 343647, 157281, 286306, 374372, 282213, 300644, 317032, 323178, 54893, 138863, 222832, 314998, 247416, 366203, 175741, 337535, 235135, 294529, 224901, 282245, 282246, 288392, 229001, 310923, 188048, 323217, 239250, 302739, 282259, 345752, 229020, 298654, 282271, 333470, 255649, 282276, 229029, 298661, 40613, 40614, 40615, 282280, 300714, 245412, 323236, 290471, 286391, 321207, 296632, 319162, 280251, 282303, 286399, 218819, 321219, 282312, 306890, 280267, 302797, 282318, 212685, 9936, 212688, 302802, 333517, 333520, 241361, 245457, 286423, 280280, 333521, 18138, 333523, 280278, 298712, 278234, 294622, 321247, 278240, 153319, 12010, 288491, 280300, 212716, 212717, 282348, 284401, 282355, 282358, 229113, 313081, 286459, 325371, 124669, 194303, 194304, 282369, 278272, 175873, 319233, 323331, 323332, 311042, 280327, 280329, 282378, 284429, 321295, 278291, 278293, 294678, 282391, 321302, 366360, 116505, 249626, 284442, 325404, 286494, 321310, 282400, 241441, 325410, 339745, 341796, 247590, 257830, 282409, 317232, 282417, 200498, 280372, 321337, 282427, 280380, 360252, 325439, 315202, 307011, 280390, 280392, 345929, 341836, 304977, 325457, 18262, 216918, 280410, 284507, 370522, 188251, 345951, 237408, 362337, 284514, 345955, 284512, 296806, 292712, 288619, 325484, 288620, 292720, 362352, 313203, 284532, 325492, 241528, 194429, 124798, 325503, 182144, 305026, 253829, 333701, 67463, 282504, 315273, 315274, 243591, 243597, 325518, 184208, 282518, 282519, 124824, 214937, 214938, 239514, 329622, 118685, 294814, 298909, 319392, 294809, 292771, 354212, 294823, 333735, 284587, 317360, 124852, 243637, 288697, 290746, 294843, 214977, 294850, 163781, 214984, 284619, 247757, 344013, 301008, 153554, 212946, 280541, 219101, 298980, 292837, 292836, 317415, 294886, 337895, 247785, 253929, 296941, 327661, 278512, 362480, 311282, 325619, 282612, 311281, 333817, 313339 ]