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
9b353d3dd66906c784c72055300b06ab8e46ffb9
d1db529663a019d42baea1f90f5d502b3b235764
/Yasmin_A_PizzaExercise/Yasmin_A_PizzaExercise/AppDelegate.swift
e109ff27ef740c96205c194ac27a122bd2e8a523
[]
no_license
yasminralberto/Pizza-Exercise
274f093173928bb489a7b78b7fd22cf45e11fc6a
89a7d03fa55856ee8219cb699d610b7749fd2ada
refs/heads/master
2022-11-25T01:50:11.364437
2020-08-05T04:49:49
2020-08-05T04:49:49
285,169,333
0
0
null
null
null
null
UTF-8
Swift
false
false
1,444
swift
// // AppDelegate.swift // Yasmin_A_PizzaExercise // // Created by Yasmin Alberto Ruiz on 8/4/20. // Copyright © 2020 Yasmin Alberto Ruiz. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 163891, 213048, 376889, 385081, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 336123, 418043, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 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, 377383, 352821, 188987, 418363, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 254587, 377472, 148105, 352918, 98968, 344744, 361129, 385713, 434867, 164534, 336567, 328378, 164538, 328386, 352968, 352971, 418507, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 328519, 336711, 361288, 328522, 336714, 426841, 254812, 361309, 197468, 361315, 361322, 328573, 377729, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 222437, 328941, 386285, 345376, 345379, 410917, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 181638, 353673, 181643, 181649, 181654, 230809, 181670, 181673, 337329, 181681, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 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, 353919, 403075, 198280, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 337592, 419512, 419517, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 141051, 337659, 337668, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 370509, 354130, 247637, 337750, 313180, 354142, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329885, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 248111, 362822, 436555, 190796, 321879, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 248308, 199164, 330252, 199186, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 436962, 338660, 338664, 264941, 363251, 207619, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 355175, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 158761, 199728, 330800, 396336, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 248985, 339097, 44197, 380070, 339112, 249014, 330958, 330965, 388319, 388347, 175375, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 437620, 175477, 249208, 175483, 249214, 175486, 175489, 249218, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 339428, 339434, 249328, 69113, 372228, 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, 159374, 11918, 339601, 126610, 224913, 224916, 224919, 126616, 224922, 224926, 224929, 224932, 257704, 224936, 224942, 257712, 224947, 257716, 257720, 257724, 257732, 224969, 339662, 257747, 224981, 224986, 224993, 257761, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 167700, 372499, 225048, 257819, 225053, 184094, 225058, 339747, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 397112, 225082, 397115, 225087, 225092, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 225127, 257896, 274280, 257901, 225137, 257908, 225141, 257912, 257916, 225148, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 266297, 217157, 421960, 356439, 430180, 421990, 266350, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 225493, 266453, 225496, 225499, 225502, 356578, 217318, 225510, 225514, 225518, 372976, 381176, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 332097, 201028, 348488, 332106, 250199, 250202, 332125, 250210, 348525, 332152, 250238, 389502, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 340451, 160234, 127471, 340472, 324094, 266754, 324111, 340500, 324117, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 381512, 324173, 324176, 389723, 332380, 340627, 184982, 373398, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389926, 152370, 340789, 348982, 398139, 127814, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 324472, 398201, 119674, 324475, 340858, 340861, 324478, 430972, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 349180, 439294, 431106, 209943, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 341113, 210044, 152703, 160895, 349311, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 210084, 251044, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 251128, 218360, 275712, 275715, 275721, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 210260, 365911, 259421, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 136590, 112020, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 415216, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 153227, 333498, 333511, 210631, 259788, 358099, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 358191, 210739, 366387, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 399199, 259938, 399206, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 268298, 333850, 178218, 350256, 243781, 350285, 374864, 342111, 342133, 374902, 333997, 260289, 350410, 260298, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 375053, 268559, 350480, 432405, 350486, 350490, 325914, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 268701, 342430, 416157, 375208, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 358961, 383536, 334394, 252482, 219718, 334407, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 391894, 154328, 416473, 64230, 342766, 375535, 203506, 342776, 391937, 391948, 326416, 375568, 375571, 162591, 326441, 326451, 326454, 244540, 326460, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 392060, 351104, 236430, 342930, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 367800, 384188, 351423, 384191, 384198, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 384249, 343306, 261389, 359694, 253200, 261393, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 384314, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 154999, 253303, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 155322, 425662, 155327, 245460, 155351, 155354, 212699, 245475, 155363, 245483, 155371, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 425845, 262005, 147317, 262008, 262011, 155516, 155521, 155525, 360326, 262027, 155531, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 384977, 393169, 155611, 155619, 253923, 155621, 327654, 253926, 393203, 360438, 253943, 393206, 393212, 155646 ]
ede9569b59b53779491df795b20dbcdd5939c283
c82d864208631bb59bfddcd52f044892c396460b
/AudioWeather/BoxDatePicker.swift
38137ce7c5dca74a67a40ff1aa9298ef34936c98
[]
no_license
sweetchild222/AudioWeather
cdf8c2f2bcf621d191870582c1ed2e82e396eeff
63fba879c4e99fce430b5c46426fcd909f197fa8
refs/heads/master
2021-01-20T06:35:59.164063
2017-10-26T10:57:48
2017-10-26T10:57:48
89,894,422
0
0
null
null
null
null
UTF-8
Swift
false
false
1,633
swift
// // DatePickerPopUp.swift // AudioWeather // // Created by 최인국 on 2017. 6. 7.. // Copyright © 2017년 최인국. All rights reserved. // import UIKit class BoxDatePicker: UIView { @IBOutlet weak var datePicker: UIDatePicker! @IBOutlet weak var baseView: UIView! var date:Date = Date() var delegate:PickDateDelegate? override func awakeFromNib() { super.awakeFromNib() initStyle() initDatePicker() addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.touchedOutSide))) } func touchedOutSide() { self.removeFromSuperview() } func initDatePicker(){ let calendar = Calendar.current let maxDate = calendar.date(byAdding: .year, value: 1, to: Date()) let minDate = calendar.date(byAdding: .year, value: 0, to: Date()) self.datePicker.maximumDate = maxDate self.datePicker.minimumDate = minDate } func initStyle(){ self.backgroundColor = UIColor.gray.withAlphaComponent(0.9) self.baseView.backgroundColor = UIColor.white self.baseView.layer.cornerRadius = 9.0 } @IBAction func dateChanged(_ sender: Any) { guard let picker = sender as? UIDatePicker else{ return } self.date = picker.date } @IBAction func selectDate(_ sender: Any) { self.removeFromSuperview() self.delegate?.selectFixDateHandler(date:self.date) } }
[ -1 ]
18b1d0850a3d27a192e5b235e188c2f484ca8da0
1500f8c876c3dfd91acbd264f43c03e327050788
/MovieFilter/results.swift
817971f39c40cf08fbd05cb15617c045746a6fab
[]
no_license
kbabla/MovieFilter-
51085d8edc327e1e444d058d2215d3df8da87259
e7bd64c4bd8d4ffc9c94000cf959561a256b2375
refs/heads/master
2020-03-25T08:54:26.567063
2018-11-18T20:33:41
2018-11-18T20:33:41
143,637,321
0
0
null
null
null
null
UTF-8
Swift
false
false
670
swift
// // results.swift // MovieFilter // // Created by Krishna Babla on 5/3/18. // Copyright © 2018 Krishna Babla. All rights reserved. // import Foundation class results: Codable{ var title: String var overview: String var release_date: String var genre_ids: Array<Int> var poster_path: String init(title: String, overview: String, release_date: String, genre_ids: Array<Int>, poster_path: String) { self.title = title self.overview = overview self.release_date = release_date self.genre_ids = genre_ids self.poster_path = poster_path } }
[ -1 ]
24f19afd862d23704e4ac91b3d0c19a33c00fa6f
10d1d50af7869b44ef65ef5ef05e24cc846a062a
/Ahoy/Additions/TimeOffsetRepository.swift
24e47614841e3ad077400a9ea58315c2aff9b9ce
[]
no_license
santisme/AhoyiOS
c8028d2138982eb2b3ff960cf5592ff0e5b2b459
1c6235c07bbceb68303fc71a5285c3125cc94588
refs/heads/master
2022-10-01T08:56:24.997106
2020-06-01T16:53:08
2020-06-01T16:53:08
264,414,878
0
0
null
null
null
null
UTF-8
Swift
false
false
1,944
swift
// // TimeOffsetRepository.swift // Ahoy // // Created by Santiago Sanchez merino on 08/03/2020. // Copyright © 2020 Santiago Sanchez Merino. All rights reserved. // import Foundation struct TimeOffset { let amount: Int let unit: Calendar.Component } final class TimeOffsetRepository { static let factory: TimeOffsetRepository = TimeOffsetRepository() private init() { } func getTimeOffset(dateToCompareString: String) -> TimeOffset { let MINUTES_MILLIS: Double = 60 let HOUR_MILLIS: Double = MINUTES_MILLIS * 60 let DAY_MILLIS = HOUR_MILLIS * 24 let MONTH_MILLIS = DAY_MILLIS * 30 let YEAR_MILLIS = MONTH_MILLIS * 12 let current = Date().timeIntervalSince1970 let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" guard let dateToCompare = dateFormatter.date(from: dateToCompareString) else { return TimeOffset(amount: 0, unit: Calendar.Component.minute) } let diff = current - dateToCompare.timeIntervalSince1970 let years = Int(diff / YEAR_MILLIS) if (years > 0) { return TimeOffset(amount: years, unit: Calendar.Component.year) } let months = Int(diff / MONTH_MILLIS) if (months > 0) { return TimeOffset(amount: months, unit: Calendar.Component.month)} let days = Int(diff / DAY_MILLIS) if (days > 0) { return TimeOffset(amount: days, unit: Calendar.Component.day)} let hours = Int(diff / HOUR_MILLIS) if (hours > 0) { return TimeOffset(amount: hours, unit: Calendar.Component.hour)} let minutes = Int(diff / MINUTES_MILLIS) if (minutes > 0) { return TimeOffset(amount: minutes, unit: Calendar.Component.minute)} return TimeOffset(amount: 0, unit: Calendar.Component.minute) } }
[ -1 ]
3a821fd86fa69cc9b11342e0c084eafb530872e0
adddff7f596178284694669d172afbaeae11264b
/CalTipUITests/CalTipUITests.swift
02e9e6974eefe461d51c27436f36460b58b511fb
[]
no_license
jukilove/CalTip
9a43031b4f8101427d0d6580d740d7e8f3415bf4
a0afb13f01aca799c1e4b80f20b3dac9d2e209d4
refs/heads/master
2021-05-09T16:42:09.826364
2018-01-28T01:59:58
2018-01-28T01:59:58
119,121,318
0
0
null
null
null
null
UTF-8
Swift
false
false
1,237
swift
// // CalTipUITests.swift // CalTipUITests // // Created by Elizabeth on 1/26/18. // Copyright © 2018 Elizabeth. All rights reserved. // import XCTest class CalTipUITests: 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. } }
[ 182277, 243720, 313356, 155665, 305173, 237599, 241695, 223269, 229414, 354342, 102441, 354346, 278571, 313388, 315433, 325675, 282671, 102446, 229425, 243763, 241717, 180279, 229431, 213051, 288829, 288835, 286787, 307269, 237638, 313415, 239689, 233548, 311373, 315468, 333902, 196687, 278607, 311377, 354386, 280660, 223317, 329812, 315477, 200795, 368732, 180317, 323678, 315488, 315489, 45154, 280674, 280676, 313446, 227432, 215144, 307306, 194667, 233578, 278637, 288878, 319599, 278642, 284789, 284790, 131190, 288890, 215165, 131199, 227459, 194692, 280708, 278669, 333968, 241809, 323730, 278676, 311447, 153752, 327834, 284827, 278684, 329884, 299166, 278690, 233635, 311459, 215204, 333990, 284840, 299176, 278698, 284843, 278703, 323761, 184498, 278707, 278713, 223418, 280761, 258233, 299197, 180409, 280767, 295099, 227517, 299202, 139459, 309443, 176325, 131270, 301255, 338118, 299208, 280779, 233678, 282832, 321744, 227536, 301270, 229591, 280792, 301271, 147679, 311520, 325857, 334049, 147680, 356575, 307431, 338151, 182503, 317676, 286957, 125170, 395511, 313595, 184574, 309504, 217352, 194832, 227601, 325904, 319764, 278805, 338196, 241440, 282908, 311582, 299294, 282912, 278817, 233761, 282920, 334121, 317738, 325930, 311596, 338217, 321839, 336177, 315698, 98611, 332084, 282938, 307514, 127292, 278843, 287040, 319812, 311622, 280903, 227655, 323914, 201037, 383309, 229716, 289109, 250196, 168280, 379224, 323934, 391521, 239973, 381286, 285031, 313703, 416103, 280938, 242027, 242028, 321901, 278895, 354671, 287089, 250227, 199030, 227702, 315768, 291193, 315769, 223611, 291194, 248188, 139641, 311679, 291200, 211327, 313726, 158087, 313736, 227721, 242059, 311692, 106893, 227730, 285074, 240020, 190870, 190872, 291225, 285083, 293275, 317851, 242079, 227743, 285089, 293281, 289185, 305572, 156069, 283039, 301482, 311723, 289195, 375211, 377265, 334259, 338359, 311739, 319931, 293309, 278974, 336319, 311744, 317889, 278979, 326083, 336323, 278988, 289229, 281038, 326093, 278992, 283089, 281039, 283088, 129484, 279000, 176602, 242138, 160224, 279009, 291297, 285152, 369121, 195044, 279014, 319976, 279017, 311787, 334315, 281071, 319986, 236020, 279030, 311800, 293368, 279033, 317949, 279042, 283138, 233987, 287237, 324098, 377352, 322057, 309770, 342537, 334345, 279053, 340489, 283154, 303634, 279060, 279061, 303635, 182802, 279066, 188954, 322077, 291359, 342560, 227881, 293420, 236080, 289328, 283185, 23093, 234037, 244279, 338491, 340539, 301635, 309831, 55880, 322119, 377419, 281165, 303693, 301647, 281170, 115287, 189016, 309847, 244311, 332379, 111197, 295518, 287327, 242274, 279143, 277095, 279150, 287345, 301688, 244345, 189054, 303743, 297600, 287359, 291455, 301702, 164487, 279176, 311944, 334473, 344714, 316044, 311950, 184974, 316048, 311953, 316050, 287379, 326288, 336531, 295575, 227991, 289435, 303772, 205469, 221853, 285348, 314020, 340645, 279207, 295591, 176810, 295598, 248494, 279215, 293552, 285362, 299698, 318127, 166581, 164532, 342705, 154295, 279218, 303802, 314043, 287418, 66243, 291529, 287434, 225996, 363212, 287438, 135888, 279249, 242385, 303826, 369365, 369366, 279253, 158424, 299737, 230105, 322269, 338658, 295653, 342757, 289511, 230120, 330473, 234216, 285419, 330476, 289517, 279278, 312046, 170735, 215790, 125683, 230133, 199415, 342775, 234233, 242428, 279293, 205566, 322302, 289534, 299777, 35584, 228099, 285443, 375552, 295688, 322312, 346889, 264971, 285450, 326413, 312076, 322320, 285457, 295698, 291605, 166677, 207639, 283418, 285467, 326428, 221980, 281378, 234276, 336678, 283431, 203560, 279337, 262952, 262953, 289580, 262957, 318247, 164655, 293673, 318251, 234290, 301872, 303921, 328495, 230198, 285493, 285496, 301883, 201534, 289599, 281407, 295745, 342846, 222017, 293702, 283466, 281426, 279379, 244569, 234330, 281434, 322396, 295769, 230238, 230239, 275294, 279393, 293729, 349025, 281444, 303973, 279398, 351078, 301919, 357219, 177002, 308075, 295797, 228214, 207735, 201590, 295799, 177018, 279418, 269179, 308093, 336765, 314240, 291713, 158594, 330627, 340865, 240517, 287623, 228232, 299912, 279434, 320394, 416649, 316299, 234382, 252812, 308111, 308113, 293780, 310166, 304025, 289691, 209820, 240543, 289699, 189349, 279465, 293801, 326571, 177074, 304050, 326580, 289720, 326586, 289723, 189373, 379845, 19398, 281541, 359365, 213961, 345030, 279499, 127945, 211913, 56270, 191445, 304086, 183254, 207839, 340960, 234469, 142309, 314343, 304104, 123880, 340967, 324587, 234476, 289773, 183276, 203758, 248815, 320495, 287730, 320492, 240631, 320504, 214009, 312313, 201721, 312317, 328701, 328705, 234499, 418819, 330759, 320520, 322571, 230411, 320526, 330766, 234513, 238611, 140311, 293911, 238617, 197658, 326684, 336930, 113710, 189487, 281647, 322609, 318515, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 160834, 336962, 349254, 238663, 300109, 234578, 207954, 250965, 205911, 296023, 339031, 314458, 156763, 234588, 281698, 281699, 285795, 214116, 230500, 214119, 322664, 228457, 250982, 279659, 234606, 300145, 230514, 238706, 187508, 312435, 300147, 279666, 302202, 285819, 314493, 285823, 234626, 279686, 222344, 285833, 285834, 234635, 318602, 228492, 337037, 177297, 162962, 187539, 326803, 347286, 308375, 324761, 285850, 296091, 119965, 234655, 300192, 302239, 339106, 306339, 234662, 300200, 302251, 208044, 238764, 249003, 322733, 3243, 324790, 300215, 294075, 64699, 228541, 339131, 343230, 283841, 148674, 283846, 312519, 279752, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 279775, 304352, 310496, 298209, 304353, 279780, 339167, 228587, 279789, 290030, 302319, 251124, 316661, 283894, 234741, 208123, 292092, 279803, 228608, 320769, 234756, 322826, 242955, 312588, 177420, 318732, 126229, 245018, 320795, 320802, 130342, 304422, 130344, 130347, 292145, 261426, 298290, 312628, 208179, 345398, 300342, 159033, 333114, 222523, 333115, 286012, 181568, 279872, 279874, 300355, 193858, 216387, 300354, 372039, 294210, 230730, 345418, 337228, 296269, 234830, 224591, 238928, 222542, 296274, 331091, 314708, 150868, 283990, 314711, 357720, 318804, 300378, 300379, 314721, 292194, 230757, 281958, 314727, 134504, 306541, 296304, 234864, 312688, 314740, 230772, 327030, 314745, 310650, 224637, 306558, 290176, 306561, 243073, 337280, 294278, 314759, 296328, 296330, 298378, 318860, 314765, 9618, 279955, 306580, 112019, 224662, 234902, 282008, 314776, 318876, 282013, 290206, 343457, 148899, 314788, 298406, 314790, 245160, 333224, 282023, 279979, 279980, 241067, 314797, 286128, 173492, 279988, 286133, 284086, 259513, 284090, 310714, 228796, 54719, 302530, 280003, 228804, 310725, 306630, 292291, 415170, 300488, 306634, 370122, 302539, 234957, 339403, 300490, 329168, 310731, 222674, 327122, 280020, 329170, 337359, 312785, 280025, 310747, 239069, 144862, 286176, 187877, 310758, 320997, 280042, 280043, 191980, 329198, 337391, 300526, 282097, 308722, 296434, 306678, 40439, 288248, 191991, 300539, 288252, 210429, 312830, 359931, 290304, 245249, 228868, 323079, 218632, 302602, 230922, 323083, 294413, 359949, 304655, 329231, 323088, 302613, 230933, 316951, 175640, 374297, 302620, 222754, 313338, 282147, 306730, 245291, 312879, 230960, 288305, 239159, 290359, 323132, 235069, 157246, 288319, 130622, 288322, 280131, 349764, 310853, 282182, 288328, 292424, 292426, 286281, 333389, 224848, 333700, 224852, 349780, 290391, 128600, 235096, 239192, 230999, 306777, 196184, 212574, 204386, 300643, 300645, 282214, 312937, 204394, 312941, 138862, 206447, 310896, 314997, 294517, 290425, 288377, 339579, 337533, 325246, 235136, 280193, 282244, 239238, 288391, 282248, 286344, 286351, 188049, 229011, 239251, 280217, 323226, 229021, 198304, 282272, 245413, 282279, 298664, 212649, 298666, 286387, 300725, 337590, 286392, 300729, 302778, 306875, 280252, 280253, 282302, 323262, 286400, 321217, 296636, 280259, 321220, 282309, 333508, 239305, 296649, 212684, 302798, 9935, 282321, 313042, 286419, 333522, 241366, 280279, 278232, 282330, 18139, 278237, 280285, 245471, 294621, 278241, 321250, 325345, 294629, 153318, 333543, 181992, 12009, 337638, 282347, 288492, 282349, 34547, 67316, 323315, 286457, 284410, 313082, 200444, 288508, 282366, 286463, 319232, 288515, 280326, 282375, 323335, 249606, 300810, 282379, 216844, 116491, 284430, 280333, 300812, 284425, 278292, 118549, 278294, 282390, 116502, 284436, 325403, 321308, 321309, 341791, 282399, 282401, 339746, 325411, 315172, 186149, 186148, 241447, 216868, 333609, 286507, 294699, 284460, 280367, 300849, 282418, 280373, 282424, 280377, 321338, 319289, 282428, 280381, 345918, 241471, 280386, 325444, 280391, 153416, 315209, 325449, 159563, 280396, 307024, 317268, 237397, 241494, 18263, 307030, 325460, 188250, 341846, 284508, 300893, 307038, 370526, 237411, 284515, 276326, 282471, 296807, 292713, 282476, 292719, 313200, 325491, 313204, 333687, 317308, 339840, 315265, 280451, 325508, 188293, 243590, 282503, 67464, 315272, 243592, 305032, 315275, 327556, 325514, 311183, 184207, 350091, 350092, 282517, 294806, 350102, 214936, 337816, 294808, 239515, 214943, 298912, 319393, 333727, 294820, 118693, 219046, 333734, 284584, 294824, 298921, 313257, 292783, 126896, 200628, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 231382, 329696, 323554, 292835, 6116, 190437, 292838, 294887, 317416, 313322, 278507, 329707, 311277, 296942, 174058, 298987, 327666, 278515, 325620, 239610 ]
d983a36782133cb2444a9409aad3547ce5e8bf1f
97eeb514d9ee5e2142967bed1c13ecee97ccae25
/MultimediaTextView/Controller/MMTextCreatePostTableViewCell.swift
95c00be64fab417a2d647eecc9294044e69e5f2e
[]
no_license
realerikk0/MultimediaTextView
38f661833f24b0c1100ddd995ef23581022d34ef
d8dcdc827c23aec3a81b5f217af72f3085d5be25
refs/heads/master
2022-10-07T14:11:58.093064
2017-10-04T23:29:07
2017-10-04T23:29:07
null
0
0
null
null
null
null
UTF-8
Swift
false
false
3,434
swift
// // MMTextCreatePostTableViewCell.swift // MultimediaTextView // // Created by Eric on 10/2/17. // Copyright © 2017 Eric. All rights reserved. // import UIKit import Photos import PhotosUI protocol MMTextCreatePostTableViewCellDelegate { func didTapAddText() func didAddText(text: NSAttributedString, at: Int) } class MMTextCreatePostTableViewCell: UITableViewCell, UITextViewDelegate { @IBOutlet var addTextButton: UIButton! @IBOutlet var attributedTextView: UITextView! @IBOutlet var animatedImageView: AnimatedImageView! @IBOutlet var livePhotoView: PHLivePhotoView! @IBOutlet var stillImageView: UIImageView! @IBOutlet var progressView: UIProgressView! var tblViewCellId = 0 var isPlayingHint = false var delegate: MMTextCreatePostTableViewCellDelegate? @IBAction func addTextTapped(_ sender: UIButton) { delegate?.didTapAddText() } override func awakeFromNib() { super.awakeFromNib() attributedTextView.delegate = self attributedTextView.font = UIFont.preferredFont(forTextStyle: .body) //attributedTextView.placeholder = "Your mind begins here..." attributedTextView.keyboardDismissMode = .interactive attributedTextView.inputAccessoryView = inputToolBar addTextButton.layer.borderWidth = 1.0 addTextButton.layer.borderColor = UIColor.lightGray.cgColor addTextButton.layer.cornerRadius = 5.0 stillImageView.contentMode = .scaleAspectFit livePhotoView.contentMode = .scaleAspectFit } lazy var inputToolBar: UIToolbar = { let toolBar = UIToolbar() toolBar.sizeToFit() let flexibleSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) let returnButton = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(self.handleDoneClicked)) toolBar.setItems([flexibleSpace,returnButton], animated: false) return toolBar }() @objc func handleDoneClicked() { self.endEditing(true) } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } func textViewDidBeginEditing(_ textView: UITextView) { attributedTextView.layer.borderWidth = 1.0 attributedTextView.layer.cornerRadius = 2.0 attributedTextView.layer.borderColor = UIColor.lightGray.cgColor } func textViewDidEndEditing(_ textView: UITextView) { print("TextView Change Detected!") attributedTextView.layer.borderWidth = 0.0 if textView.attributedText.length == 0 { //textView.placeholder = "Your mind begins here..." } delegate?.didAddText(text: textView.attributedText, at: self.tblViewCellId) } } // MARK: PHLivePhotoViewDelegate extension MMTextCreatePostTableViewCell: PHLivePhotoViewDelegate { func livePhotoView(_ livePhotoView: PHLivePhotoView, willBeginPlaybackWith playbackStyle: PHLivePhotoViewPlaybackStyle) { isPlayingHint = (playbackStyle == .hint) } func livePhotoView(_ livePhotoView: PHLivePhotoView, didEndPlaybackWith playbackStyle: PHLivePhotoViewPlaybackStyle) { isPlayingHint = (playbackStyle == .hint) } }
[ -1 ]
aee1948ff2d5ec7f429d2ff16ac2cf17bdc07e24
f9ddeb7835a91d03b49035e2a771f1bb8fd879a2
/TabExample/SecondViewController.swift
eddcedd4b692ebb9694a5565244b006a7fdadd98
[]
no_license
chathura90/TabView
fe40cecacf8ae98de304c0c96c0247daa9cf0096
49570dfdc3a724cd72900aae85fbcbdbf829fea6
refs/heads/master
2020-03-19T06:14:06.029902
2018-06-05T12:36:30
2018-06-05T12:36:30
136,002,308
0
0
null
null
null
null
UTF-8
Swift
false
false
1,814
swift
// // SecondViewController.swift // TabExample // // Created by hSenid on 6/4/18. // Copyright © 2018 hSenid. All rights reserved. // import UIKit class SecondViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func onButtonClick(_ sender: Any) { alertOnButtonClick() } @IBAction func onActionSheetButtonClick(_ sender: Any) { actionSheetOnButtonClick() } func alertOnButtonClick(){ let alert = UIAlertController(title: "What's your name?", message: nil, preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) alert.addTextField(configurationHandler: { textField in textField.placeholder = "Input your name here..." }) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in if let name = alert.textFields?.first?.text { print("Your name: \(name)") } })) self.present(alert, animated: true) } func actionSheetOnButtonClick(){ let alert = UIAlertController(title: "Did you bring your towel?", message: "It's recommended you bring your towel before continuing.", preferredStyle: .actionSheet) alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: nil)) alert.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil)) self.present(alert, animated: true) } }
[ -1 ]
213b245e0092c0d4866fcf70c4ce5b0891aba53f
306021260eabc7337101b21e0419baed51a2dfad
/Beginning iPhone Development with Swift Exploring the iOS SDK/07 - Pickers/Pickers/DependentComponentPickerViewController.swift
f22149b58581b4d0c3755151419a696040c82745
[]
no_license
yhyuan/Swift
dd1e8fc4b4b2d47368181e8e126c2f6a829313d5
218c439fa86006a681f35ec87f513accb47d4812
refs/heads/master
2021-01-10T19:20:04.810438
2014-12-16T08:54:34
2014-12-16T08:54:34
27,607,436
3
3
null
null
null
null
UTF-8
Swift
false
false
3,414
swift
// // DependentComponentPickerViewController.swift // Pickers // // Created by Kim Topley on 9/13/14. // Copyright (c) 2014 Apress. All rights reserved. // import UIKit class DependentComponentPickerViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource { private let stateComponent = 0 private let zipComponent = 1 private var stateZips:[String : [String]]! private var states:[String]! private var zips:[String]! @IBOutlet weak var dependentPicker: UIPickerView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. let bundle = NSBundle.mainBundle() let plistURL = bundle.URLForResource("statedictionary", withExtension: "plist") stateZips = NSDictionary(contentsOfURL: plistURL!) as [String : [String]] let allStates = stateZips.keys states = sorted(allStates) let selectedState = states[0] zips = stateZips[selectedState] } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func buttonPressed(sender: AnyObject) { let stateRow = dependentPicker.selectedRowInComponent(stateComponent) let zipRow = dependentPicker.selectedRowInComponent(zipComponent) let state = states[stateRow] let zip = zips[zipRow] let title = "You selected zip code \(zip)" let message = "\(zip) is in \(state)" let alert = UIAlertController( title: title, message: message, preferredStyle: .Alert) let action = UIAlertAction( title: "OK", style: .Default, handler: nil) alert.addAction(action) presentViewController(alert, animated: true, completion: nil) } // MARK:- // MARK: Picker Data Source Methods func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int { return 2 } func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { if component == stateComponent { return states.count } else { return zips.count } } // MARK:- // MARK: Picker Delegate Methods func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String! { if component == stateComponent { return states[row] } else { return zips[row] } } func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { if component == stateComponent { let selectedState = states[row] zips = stateZips[selectedState] dependentPicker.reloadComponent(zipComponent) dependentPicker.selectRow(0, inComponent: zipComponent, animated: true) } } func pickerView(pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat { let pickerWidth = pickerView.bounds.size.width if component == zipComponent { return pickerWidth/3 } else { return 2 * pickerWidth/3 } } }
[ -1 ]
8006268c7b8f231e70ab22d327fa518a1b4b1b86
05579f1417a4faac6130c1df2666d434c0b434f4
/Whats The Weather/Whats The Weather/AppDelegate.swift
f33ce97928e9cb94efba417ebe864ba396d7d41b
[]
no_license
dion/ios_swift_collection
7936a9563679ba4900e4fafddfca6fa6aa08e592
9654d37d06db1ffe3f041f10678414c84b880d5f
refs/heads/master
2016-09-14T00:41:57.980969
2016-04-18T20:35:45
2016-04-18T20:35:45
56,371,588
0
0
null
null
null
null
UTF-8
Swift
false
false
2,148
swift
// // AppDelegate.swift // Whats The Weather // // Created by Dion Yang on 4/18/16. // Copyright © 2016 Dion Yang. 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, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 229432, 319544, 204856, 286776, 286791, 237640, 278605, 286797, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 278648, 131192, 237693, 327814, 131209, 417930, 303241, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 278849, 319809, 319810, 319814, 319818, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 320007, 172552, 172550, 303623, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 311911, 189034, 295533, 189039, 189040, 352880, 295538, 172655, 189044, 287349, 172656, 172660, 287355, 287360, 295553, 287365, 311942, 303751, 295557, 352905, 279178, 287371, 311946, 311951, 287377, 311957, 287381, 221850, 287386, 164509, 287390, 295583, 230045, 172705, 287394, 303773, 303780, 172702, 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, 287450, 213724, 189149, 303835, 303838, 279267, 312035, 295654, 279272, 312048, 230128, 312050, 230131, 205564, 303871, 230146, 295685, 230154, 33548, 312077, 295695, 295701, 369433, 230169, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 279383, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 320391, 213895, 304009, 304007, 304011, 230284, 304013, 213902, 279438, 295822, 295825, 189329, 304019, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 304063, 238528, 304065, 189378, 213954, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 320490, 304106, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 197645, 295949, 230413, 320528, 140312, 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, 189562, 337018, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 304311, 230592, 279750, 312518, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 279781, 304360, 279788, 320748, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 230679, 296215, 230681, 320792, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 296255, 312639, 230718, 296259, 378181, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 230763, 410987, 230768, 296305, 312692, 230773, 279929, 181626, 304505, 304506, 181631, 312711, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 279985, 173488, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 280021, 288214, 222676, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 296439, 288250, 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, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 280260, 280264, 206536, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 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, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 313340, 288764, 239612, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 223303, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 223327, 149601, 149599, 149603, 321634, 329830, 280681, 313451, 223341, 280687, 215154, 280691, 313458, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 182517, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 313705, 280940, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 223749, 305668, 281095, 223752, 338440, 150025, 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, 338823, 322440, 314249, 240519, 183184, 240535, 289687, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 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, 224647, 265604, 298377, 314763, 142733, 298381, 224657, 306581, 314779, 314785, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 282261, 298651, 323229, 282269, 323231, 298655, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 282410, 241450, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 159545, 298811, 307009, 413506, 241475, 307012, 148946, 315211, 282446, 307027, 315221, 282454, 315223, 241496, 323414, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 298860, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 44948, 298901, 241556, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 178273, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299006, 282623, 315397, 241669, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 217179, 315483, 192605, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 184503, 307385, 307386, 258235, 176316, 307388, 307390, 299200, 184512, 307394, 307396, 299204, 184518, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 282931, 307508, 176435, 307510, 332086, 151864, 307512, 168245, 307515, 315701, 282942, 307518, 151874, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 242043, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299440, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 127429, 127431, 283080, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 242152, 291305, 127466, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 135689, 233994, 127497, 291341, 233998, 234003, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 111193, 284245, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 299726, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 381677, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 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, 234313, 316233, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 234356, 177011, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324504, 234398, 291742, 324508, 234401, 291747, 291748, 234405, 291750, 234407, 324518, 324520, 291754, 324522, 226220, 291756, 234414, 324527, 234410, 234417, 291760, 324531, 201650, 226230, 234422, 324536, 275384, 234428, 291773, 226239, 324544, 234431, 234434, 324546, 242623, 226245, 234437, 234439, 324548, 234443, 291788, 193486, 275406, 193488, 234446, 234449, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 234520, 316439, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234556, 234558, 316479, 234561, 316483, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 275545, 234585, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 300148, 234614, 398455, 234618, 275579, 234620, 144506, 234623, 226433, 234627, 275588, 234629, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 308373, 275608, 234647, 234650, 234648, 308379, 283805, 234653, 119967, 300189, 234657, 324768, 324766, 242852, 283813, 234661, 300197, 234664, 275626, 234667, 316596, 308414, 234687, 316610, 300226, 234692, 308420, 283844, 308418, 300229, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 283904, 292097, 300289, 300292, 300294, 275719, 177419, 300299, 283917, 242957, 275725, 177424, 300301, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 292192, 316768, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 284076, 144812, 144814, 284084, 144820, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 259567, 300527, 308720, 226802, 316917, 308727, 292343, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 194103, 284218, 226877, 284223, 284226, 243268, 284228, 226886, 284231, 128584, 292421, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 300628, 317015, 292433, 235097, 243290, 284251, 284249, 284253, 300638, 284255, 284247, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292479, 276098, 284290, 325250, 284292, 292485, 292481, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 317098, 284329, 284331, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 276187, 284379, 284381, 284384, 284386, 358116, 276197, 317158, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358128, 358126, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 300832, 284449, 300834, 325408, 227109, 317221, 358183, 186151, 276268, 300845, 194351, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 161718, 358326, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301015, 301017, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 178161, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 325692, 235579, 235581, 178238, 276544, 284739, 292934, 276553, 243785, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 194657, 227426, 276579, 194660, 350308, 227430, 276583, 292968, 350313, 276586, 309354, 350316, 309348, 276590, 301167, 227440, 350321, 284786, 276595, 301163, 350325, 350328, 292985, 301178, 292989, 292993, 317570, 350339, 301185, 317573, 350342, 227463, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 276713, 317674, 325867, 243948, 194801, 227571, 309491, 276725, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 342298, 309530, 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, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 277011, 317971, 309779, 309781, 55837, 227877, 227879, 293417, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 318020, 301636, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 137889, 383658, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 318132, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 285453, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277314, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 277368, 236408, 15224, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 244731, 121850, 293882, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 7232, 310336, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 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, 204023, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 277807, 285999, 113969, 277811, 318773, 277816, 318776, 286010, 277819, 294204, 277822, 417086, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 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, 277898, 277894, 318858, 277903, 310672, 277905, 351633, 277908, 277917, 310689, 277921, 277923, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 245191, 163272, 310727, 277959, 302534, 277963, 302541, 277966, 302543, 310737, 277971, 277975, 286169, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 278003, 310772, 228851, 278006, 40440, 278009, 212472, 286203, 40443, 228864, 40448, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 286240, 146977, 294435, 187939, 40484, 40486, 294439, 286248, 40488, 286246, 294440, 294443, 294445, 278057, 40491, 310831, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 228944, 212560, 400976, 40533, 147032, 40537, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40552, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 122517, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 319171, 302789, 294599, 278216, 294601, 302793, 278227, 229076, 319187, 286420, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 237409, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 294817, 319394, 40865, 294821, 309346, 294831, 180142, 188340, 40886, 319419, 294844, 294847, 309350, 309352, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
505afcadf61800614a410b7af4dac449ff49d6b3
f21cebac3b0918a69d95dba18350d3bed0e7912f
/WorkingwithString.playground/Contents.swift
bd1ecbd9fbcac9be780e9da8e2009c9c3dea012e
[]
no_license
unnat5/iosDevelopment
c9c967bf6d3b0ebf0a4481a293a95e91f155927f
ae5a90c91f4fd714c534edf7aa9452bee26e2229
refs/heads/master
2020-04-13T15:41:19.221438
2018-12-27T13:50:32
2018-12-27T13:50:32
163,299,480
0
0
null
null
null
null
UTF-8
Swift
false
false
1,169
swift
import UIKit var str = "Hello," // creating and concatenating string var append = str + " Unnat!" for c in append{ // append.character print(c) } // type string : NSString let nsstring = NSString(string: append) //NS stands for NEXT-STRING and NEXT was the company founded by jobs. nsstring.substring(to: 5) // like python string substring[:5] nsstring.substring(from: 4) // like python string substring[4:] // Just getting the name var name_with_ex = nsstring.substring(from: 7) as NSString print(name_with_ex.substring(to: 5)) //Better way of doing it. print(nsstring.substring(with: NSMakeRange(7, 5))) // checking whether the a string contains a substring. if nsstring.contains("Unnat"){ print("nsstring contains name Unnat!") } // spliting the string with space('\ ') character. // works as .split() method in python print(nsstring.components(separatedBy: " ")) nsstring.uppercased nsstring.lowercased // Summary // methods that we covered /* 1. NSString.substring(from:) 2. NSString.substring(to:) 3. NSString.substring(with: NSMakeRange(from:,len:)) 4. NSString.components(seperatedBy:"") 5. NSString.lowercased 6. NSString.uppercased */
[ -1 ]
55ae6fd6274faf97a7b4a91ff4c5bc8ff8195350
39bce7eba147929b72fe93fa3c2427a91a582e12
/SalonMerchant/Controller/MessageTableViewController.swift
a1b58837f486653a33e42fac63a7655ae91b77a4
[]
no_license
Ajays786/BeautyApp_Merchant
21d41953dba132d55babe97e06332c1ccd45aec1
10e2a1380228e9b347347133bebe1961be1c7500
refs/heads/master
2020-06-21T07:18:27.194628
2019-07-25T07:55:49
2019-07-25T07:55:49
197,379,962
0
0
null
null
null
null
UTF-8
Swift
false
false
3,011
swift
// // MessageTableViewController.swift // Salon // // Created by mac on 2018/8/22. // Copyright © 2018年 Hengyu Liu. All rights reserved. // import UIKit import Firebase class MessageTableViewController: UITableViewController { var db: Firestore! var message: [MessageModel] = [] { didSet { self.tableView.reloadData() } } override func viewDidLoad() { super.viewDidLoad() self.loadMessage() } // MARK: - Load data func loadMessage() { guard let uid = Auth.auth().currentUser?.uid else { return } print(uid) db = Firestore.firestore() let dealsRef = db.collection("chat").document(uid) dealsRef.addSnapshotListener { (snapshot, error) in self.reloadDB() } } func reloadDB() { guard let uid = Auth.auth().currentUser?.uid else { return } self.message.removeAll() db = Firestore.firestore() let dealsRef = db.collection("chat").document(uid) dealsRef.getDocument { (snapshot, error) in guard let doc = snapshot else { print(error!) return } print("lhy has doc.data() \(String(describing: doc.data()))") for (reservationID, _) in doc.data() ?? [:] { let detailRef = self.db.collection("chatDetail").document(reservationID) detailRef.getDocument(completion: { (sn, err) in guard err == nil, let sn = sn else { return } var data = sn.data() data?["reservationID"] = reservationID self.message.append(MessageModel(data: data ?? [:])) print(self.message) }) } } } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return message.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "userMessageCell", for: indexPath) as! MessageTableViewCell let info = message[indexPath.row] cell.nameLabel.text = info.merchantName return cell } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let info = message[indexPath.row] let chatLogController = ChatViewController(collectionViewLayout: UICollectionViewFlowLayout()) chatLogController.reservationID = info.reservationID chatLogController.temTitle = info.merchantName navigationController?.pushViewController(chatLogController, animated: true) } }
[ -1 ]
16f24039be7eaf43035cad280a0ab6c70708fb60
fd53825540d9dfd5e40b17cf1a2edaa225e4d0e3
/pass-share/Activity/ActivityTableViewController.swift
730a84254de7addb965a30d483c29bbc6fe06a89
[]
no_license
chingyi-lin/beam-1
7ff8092a521c4d8d98ba6daec6b47ce5a7855635
50a15b2d4bc1808abba6411eb8ded173586d9c88
refs/heads/master
2020-05-22T10:18:50.156516
2019-05-13T08:17:20
2019-05-13T08:17:20
186,307,559
0
1
null
2019-05-12T21:47:09
2019-05-12T21:47:09
null
UTF-8
Swift
false
false
3,061
swift
// // ActivityTableViewController.swift // pass-share // // Created by CY on 2019/4/28. // Copyright © 2019 Pass Share. All rights reserved. // import UIKit protocol ActivityTableViewControllerDelegate { func acceptSharing(with shareInvitationID: String, _ activityID: String) } class ActivityTableViewController: UITableViewController { var activityTableViewControllerDelegate: ActivityTableViewControllerDelegate! var activities = [Activity]() override func viewDidLoad() { super.viewDidLoad() } override func viewWillAppear(_ animated: Bool) { print("reloading data: activity child view") super.viewWillAppear(animated) activities = [Activity]() let queryResult = RealmAPI.shared.readAllActivity() for data in queryResult { activities.append(data) } self.tableView.reloadData() } override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return activities.count } override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { if activities[indexPath.row].isActionable { return 140.0 } else { return 60.0 } } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let formatter = DateFormatter() formatter.timeZone = TimeZone.current formatter.dateStyle = .short formatter.timeStyle = .short formatter.doesRelativeDateFormatting = true if activities[indexPath.row].isActionable { let cell = tableView.dequeueReusableCell(withIdentifier: "actionableActivityTableViewCell", for: indexPath) as! ActionableActivityTableViewCell cell.shareInvitationID = activities[indexPath.row].shareInvitationID cell.activityID = activities[indexPath.row].activityID cell.actionableActivityTableViewCellDelegate = self cell.activityLabel?.text = activities[indexPath.row].text cell.timeLabel?.text = formatter.string(from: activities[indexPath.row].time) cell.declineBtn.layer.borderColor = UIColor(red:0.06, green:0.11, blue:0.28, alpha:1.0).cgColor return cell } else { let cell = tableView.dequeueReusableCell(withIdentifier: "displayActivityTableViewCell", for: indexPath) as! DisplayActivityTableViewCell cell.activityLabel?.text = activities[indexPath.row].text cell.timeLabel?.text = formatter.string(from: activities[indexPath.row].time) return cell } } } extension ActivityTableViewController: ActionableActivityTableViewCellDelegate { func acceptSharing(with shareInvitationID: String, _ activityID: String) { activityTableViewControllerDelegate.acceptSharing(with: shareInvitationID, activityID) } }
[ -1 ]
d71cad054438d39bd31aee7c8a3456f5ef995663
7652af1d98a3d7facb96a75fd2862acbf6d2fea5
/IrregularVerbsApp/Controllers/ViewController.swift
2ea2053e7e18257a22d9d583d8059ae94a70a01f
[]
no_license
vasiljeu95/IrregularVerbsApp
b265ead17230f6a097108b3a885c0878c3cbb021
9132e2b775d52221277b25b122a5850dec271d22
refs/heads/master
2020-12-23T05:46:41.303219
2020-02-03T20:37:18
2020-02-03T20:37:18
237,056,013
0
0
null
null
null
null
UTF-8
Swift
false
false
400
swift
// // ViewController.swift // IrregularVerbsApp // // Created by Stepan Vasilyeu on 1/26/20. // Copyright © 2020 Stepan Vasilyeu. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. print(irregularVerbsArray[1].infinitive) } }
[ -1 ]
5e7c77421d96d371170eb02f1e57f56c93d43111
049a4f1ecf9730db7d98343a0d8e5373f9884277
/HLCoreTests/HLCoreTests.swift
a35f0d763ac0caefda2d80e6c2ed1e067be8cec3
[]
no_license
StaticFrameWork/HLCore
573133710e3d1439f1b79e28879f5818389f9a5f
9c7af142329d5151007ffe7bf85e2a545039b04d
refs/heads/master
2020-04-06T08:43:20.304971
2018-11-13T03:36:48
2018-11-13T03:36:48
157,313,872
0
0
null
null
null
null
UTF-8
Swift
false
false
909
swift
// // HLCoreTests.swift // HLCoreTests // // Created by Li, Havi X. -ND on 2018/11/13. // Copyright © 2018 Li, Havi X. -ND. All rights reserved. // import XCTest @testable import HLCore class HLCoreTests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 333828, 282633, 305179, 317467, 241692, 229413, 315432, 325674, 315434, 243759, 229424, 319542, 288828, 325694, 288833, 288834, 313416, 254027, 311372, 196691, 315476, 329814, 180311, 180312, 200794, 237663, 307299, 321637, 329829, 319591, 313447, 319598, 288879, 288889, 215164, 313469, 333955, 215178, 241808, 323729, 317587, 278677, 284825, 278704, 323762, 241843, 299187, 280762, 258239, 227524, 282831, 317664, 356576, 321772, 286958, 327929, 194820, 313608, 321800, 319763, 334103, 325912, 315673, 309529, 299293, 227616, 278816, 233762, 211238, 282919, 98610, 332083, 278842, 282939, 241986, 182598, 323916, 383311, 325968, 6481, 289110, 305495, 332123, 106847, 391520, 242023, 354677, 211326, 313727, 240002, 332167, 311691, 240016, 178582, 293274, 61857, 246178, 315811, 61859, 289194, 108972, 311727, 377264, 319930, 291267, 127428, 324039, 317901, 373197, 289232, 281040, 242139, 369116, 242148, 242149, 109042, 287241, 279057, 23092, 234036, 338490, 348732, 242237, 55881, 340558, 281166, 281171, 332378, 295519, 242277, 244327, 111208, 279146, 287346, 313971, 244347, 311941, 326287, 316049, 311954, 330387, 330388, 117397, 295576, 111258, 111259, 289434, 221852, 205487, 295599, 318130, 166582, 109241, 158394, 287422, 66242, 164560, 242386, 96984, 287452, 318173, 330474, 289518, 322291, 312052, 199414, 221948, 205568, 242433, 291585, 299776, 285444, 322316, 117517, 312079, 295697, 285458, 207640, 326429, 326433, 262951, 262954, 312108, 353069, 285487, 262962, 285497, 353095, 244568, 281433, 244570, 301918, 109409, 293730, 242529, 230248, 201577, 326505, 246641, 209783, 246648, 269178, 177019, 291712, 240518, 109447, 287622, 236428, 56208, 293781, 318364, 127902, 240544, 289698, 289703, 353195, 189374, 353216, 279498, 183257, 340961, 52200, 324586, 203757, 304110, 316405, 314362, 320507, 293886, 320516, 254987, 330763, 324625, 320536, 189474, 345132, 21569, 214086, 349255, 250954, 205906, 353367, 300135, 316520, 207979, 318572, 144496, 291959, 160891, 285820, 279685, 330888, 177296, 162961, 347283, 326804, 308372, 296086, 185493, 339102, 302240, 318639, 279728, 339130, 208058, 64700, 322749, 228542, 353479, 353480, 283847, 244940, 283853, 228563, 316627, 279765, 279774, 304356, 298212, 290022, 328940, 279792, 353524, 316669, 234755, 322824, 242954, 328971, 318733, 208164, 298291, 333117, 216386, 193859, 345415, 312648, 372043, 120148, 314709, 318805, 222559, 234850, 134506, 306542, 296303, 327024, 243056, 316787, 116084, 314741, 290169, 179587, 142729, 304524, 296335, 9619, 357786, 318875, 290207, 333220, 316842, 150965, 284089, 304577, 296392, 329173, 286172, 187878, 316902, 282096, 306673, 333300, 306677, 191990, 333303, 286202, 306692, 306693, 323080, 329225, 253451, 316946, 308756, 175639, 333343, 230943, 286244, 230959, 280130, 349763, 243274, 333388, 280147, 300630, 290390, 306776, 333408, 286306, 345700, 282213, 243307, 312940, 323196, 325245, 294529, 312965, 286343, 282273, 323236, 229029, 61101, 296632, 323264, 280257, 319177, 280267, 333517, 282318, 313041, 245457, 241361, 333521, 241365, 286423, 224984, 18138, 321247, 282339, 282348, 239341, 284401, 323316, 282358, 278272, 288512, 323331, 67332, 323332, 300811, 284431, 294678, 284442, 325404, 282400, 241441, 241442, 325410, 333610, 317232, 282417, 296755, 321337, 319292, 325439, 282434, 307011, 325445, 282438, 153415, 339783, 323406, 241495, 280410, 300894, 307039, 245599, 276327, 282474, 280430, 313199, 282480, 296814, 300918, 317304, 333688, 325503, 315264, 241540, 327557, 67463, 325515, 325518, 110480, 337815, 294807, 294809, 118685, 292771, 313254, 333735, 284587, 243637, 282549, 288697, 290746, 163781, 284619, 212942, 24532, 280541, 329695, 298980, 294886, 247785, 247791, 282612 ]
420183aa03460663f03ef6987b63f98f41827f4d
8ad89486e30e3fbe00295c64b3165cfbb431a3ed
/Bloomr/Bloomr/Common/BaseConfig/Dimension.swift
dee336cc1c5901a621714d46cce195cab237c34d
[]
no_license
tantan39/Bloomer
9a53eba7fd06cb77b2547d272e313cad09fcf003
8b60c60609d18677e4fc8b2f10f57219d68a87d2
refs/heads/master
2022-03-05T02:45:27.071009
2019-10-23T11:06:52
2019-10-23T11:06:52
204,047,292
1
0
null
null
null
null
UTF-8
Swift
false
false
4,758
swift
// // Dimension.swift // Bloomr // // Created by Tan Tan on 8/2/19. // Copyright © 2019 phdv. All rights reserved. // import UIKit public let dimension = Dimension.shared open class Dimension { public static let shared = Dimension() public var widthScreen: CGFloat = 1.0 public var heightScreen: CGFloat = 1.0 public var widthScale: CGFloat = 1.0 public var heightScale: CGFloat = 1.0 private init() { self.widthScale = UIScreen.main.bounds.width / 375 self.heightScale = UIScreen.main.bounds.height / 667 self.widthScreen = UIScreen.main.bounds.width self.heightScreen = UIScreen.main.bounds.height if self.widthScale >= 2.0 { self.widthScale /= 1.4 self.heightScale /= 1.4 } } public var fontScale: CGFloat { return 1.0 } // MARK: Default height public var buttonHeight: CGFloat { return 48 //* self.heightScale } public var mediumButtonHeight: CGFloat { return 40 //* self.heightScale } public var smallButtonHeight: CGFloat { return 28 //* self.heightScale } public var smallButtonWidth: CGFloat { return 77 //* self.heightScale } public var textViewHeight: CGFloat { return 0.108 * self.heightScreen } public var largeTextViewHeight: CGFloat { return 0.231 * self.heightScreen } public var textFieldHeight: CGFloat { return 52 * self.heightScale } // MARK: Spacing public var smallHorizontalMargin: CGFloat { return 4 * self.widthScale } public var smallVerticalMargin: CGFloat { return 4 * self.widthScale } public var mediumHorizontalMargin: CGFloat { return 8 * self.widthScale } public var mediumVerticalMargin: CGFloat { return 8 * self.widthScale } public var mediumHorizontalMargin_12: CGFloat { return 12 * self.widthScale } public var mediumVerticalMargin_12: CGFloat { return 12 * self.widthScale } public var normalHorizontalMargin: CGFloat { return 16 * self.widthScale } public var normalVerticalMargin: CGFloat { return 16 * self.widthScale } public var largeHorizontalMargin: CGFloat { return 24 * self.widthScale } public var largeVerticalMargin: CGFloat { return 24 * self.widthScale } public var largeHorizontalMargin_32: CGFloat { return 32 * self.widthScale } public var largeVerticalMargin_32: CGFloat { return 32 * self.widthScale } public var largeVerticalMargin_38: CGFloat { return 38 * self.widthScale } public var largeHorizontalMargin_40: CGFloat { return 40 * self.widthScale } public var largeHorizontalMargin_42: CGFloat { return 40 * self.widthScale } public var largeVerticalMargin_40: CGFloat { return 40 * self.widthScale } public var largeHorizontalMargin_48: CGFloat { return 48 * self.widthScale } public var largeVerticalMargin_48: CGFloat { return 48 * self.widthScale } public var largeHorizontalMargin_56: CGFloat { return 56 * self.widthScale } public var largeVerticalMargin_56: CGFloat { return 56 * self.widthScale } public var largeHorizontalMargin_60: CGFloat { return 60 * self.widthScale } public var largeVerticalMargin_60: CGFloat { return 60 * self.widthScale } public var largeHorizontalMargin_80: CGFloat { return 80 * self.widthScale } public var largeVerticalMargin_80: CGFloat { return 80 * self.widthScale } public var largeHorizontalMargin_90: CGFloat { return 90 * self.widthScale } public var largeVerticalMargin_90: CGFloat { return 90 * self.widthScale } public var largeHorizontalMargin_96: CGFloat { return 96 * self.widthScale } public var largeHorizontalMargin_120: CGFloat { return 120 * self.widthScale } public var largeVerticalMargin_120: CGFloat { return 120 * self.widthScale } public var zeroMargin: CGFloat { return 0.0 } public var segmentIndicatorHeight: CGFloat { return 2 * self.widthScale } public var generalScale: CGFloat { let standardArea = CGFloat(375.0 * 667.0) let currentArea = UIScreen.main.bounds.width * UIScreen.main.bounds.height return sqrt(currentArea/standardArea) } }
[ -1 ]
085d7072ecb2e0526d5df7ba8f2d4af4b7447d67
c7f3e18a560ea87a884e67dfd538f81ecf53216a
/TipCalc/TipCalc/View/BillCell.swift
822c16d2d0077ed1717c42e5f1c1628166d806cc
[]
no_license
israman30/Tip-Calculator
cc696c46cae53b4c6165d6c90d2825be6ddbfb9a
78185aeafe3c990e0d738ac0dc627b46e06db1ad
refs/heads/master
2023-05-13T13:50:48.321311
2023-05-10T01:32:02
2023-05-10T01:32:02
98,336,359
0
0
null
2023-09-05T02:45:09
2017-07-25T18:12:15
Swift
UTF-8
Swift
false
false
2,192
swift
// // BillCell.swift // TipCalc // // Created by Israel Manzo on 7/30/19. // Copyright © 2019 Israel Manzo. All rights reserved. // import UIKit class BillCell: UITableViewCell { private let totalLabel: UILabel = { let label = UILabel() label.setBoldDynamicFont(font: .preferredFont(forTextStyle: .title1)) label.text = "$0.0" return label }() private let billLabel: UILabel = { let label = UILabel() label.text = "$0.0" label.setDynamicFont(font: .preferredFont(forTextStyle: .body)) return label }() private let tipLabel: UILabel = { let label = UILabel() label.text = "$0.0" label.setDynamicFont(font: .preferredFont(forTextStyle: .body)) return label }() private let dateLabel: UILabel = { let label = UILabel() label.text = "00/00/2019" label.setDynamicFont(font: .preferredFont(forTextStyle: .caption2)) label.textColor = .lightGray return label }() func configure(bill: Bill?) { guard let total = bill?.total, let inputBill = bill?.input, let tip = bill?.tip, let date = bill?.date else { return } totalLabel.text = total billLabel.text = inputBill tipLabel.text = tip dateLabel.text = date } private func setLabels() { let stackView = UIStackView(arrangedSubviews: [totalLabel, billLabel, tipLabel, dateLabel] ) stackView.axis = .vertical stackView.distribution = .fillProportionally stackView.spacing = 3 addSubview(stackView) stackView.anchor( top: topAnchor, left: leftAnchor, bottom: bottomAnchor, right: rightAnchor, padding: .init(top: 10, left: 0, bottom: 10, right: 0) ) } override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) setLabels() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
[ -1 ]
b07d371d241b07f68b752705d93fb75ef6ab1ae7
b39c62bcd86be38c87fbf3f59bed3705ea105177
/jinsei/AppDelegate.swift
7997a6d21aa1c3084f2d1cb618dfa2abf2bee103
[ "MIT" ]
permissive
motooka/jinsei
7adb02e4d9316d7fd38e028c76b7b2ecbb51c0b3
edbfad97239fa1b4dbc43d89c7f379910574313c
refs/heads/main
2023-08-07T07:47:06.868257
2021-09-15T18:02:39
2021-09-15T18:02:39
406,867,553
1
0
null
null
null
null
UTF-8
Swift
false
false
518
swift
// // AppDelegate.swift // jinsei // // Created by T. MOTOOKA on 2021/09/15. // import Cocoa @main 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 } }
[ 66688, 348928, 357760, 210923, 389981, 349069, 224143, 193490, 373370, 371549 ]
6c4792d13287a78399c5156cb7ab39e1c44179a6
2224cf96ae904e9e6307a448a691ff51f05a6dfa
/tableview/Models/Alumno.swift
3bc68eb6eb009c0951982ebe40a08aa1f72fcc60
[]
no_license
German-99/Tableview
94e77f9dde9d0f52d8a50880adc77b9d18ef0e74
3fb632fdc17e3d95ea7393f2c7c6960d9631fee9
refs/heads/master
2023-01-12T03:58:01.293416
2020-11-02T22:31:40
2020-11-02T22:31:40
309,510,681
0
0
null
null
null
null
UTF-8
Swift
false
false
263
swift
// // Alumno.swift // tableview // // Created by Alumno on 11/2/20. // Copyright © 2020 Alumno. All rights reserved. // import Foundation class Alumno { var nombre : String var matrivula : String var carrera: String init (nombre: String) }
[ -1 ]
932d098d6b2cc009382f2fb8f679758bda8b3320
3c75a84858267bcb03a24d85739c26db49d733b1
/sawtti/ViewModel.swift
2547b1ae1497313fead7d9d9498351aa977d3cc9
[ "MIT" ]
permissive
utsav475908/Sawtti
093645a5cb622c5dc8246a88ad1a0db1cbb4443c
5f824e540fc459eb518561f68e04293e000ee2c3
refs/heads/master
2020-06-03T22:31:01.120813
2019-03-07T16:35:40
2019-03-07T16:35:40
null
0
0
null
null
null
null
UTF-8
Swift
false
false
16,610
swift
// // ViewModel.swift // sawtti // // Created by Nour on 06/03/2018. // Copyright © 2018 Nour Saffaf. All rights reserved. // FFT based on https://gist.github.com/ArthurGuibert/31eb614a4bf5bf52d84cedfac1eb9483#file-fftperform-swift import Foundation import AVFoundation import Accelerate import RealmSwift import RxSwift enum ProcessingError: Error { case BufferCreationFailed case BufferUnloaded } class ViewModel { private let realmService = RealmService() private let audioEngine = AVAudioEngine() private let audioPlayerNode = AVAudioPlayerNode() private let bufferSize = 1024 private let sampleSize = 8 private let samplingFrequency = 44100 //private var outfile: AVAudioFile! //var isFingerPrintMode = true private var silenceThreashold: Float = 10.0 //var noiseThreashold: Float = 0.17 private let maxNeighbor = 7 private var peaks : [FPModel] = [] private var sampleCount = 0 //private let freqBins = [50, 100, 184, 368, 552] //16 Kb private let freqBins = [25, 50, 92, 184, 276] //8Kb var startNextFingerPrinting = PublishSubject<Bool>() var detectionResult = PublishSubject<String>() var averageMagnitude = PublishSubject<Float>() private let disposeBag = DisposeBag() func restartAudioSession() { } func fingerPrint(for songUrl: URL, songName: String, artist: String, cover: String?) { silenceThreashold = 100.0 do { try realmService.createSongRecord(for: songName, artist: artist, cover: cover) } catch { print("Could not create database record \(error)") return } do { try processAudioFile(url: songUrl) }catch { print("Could not process audio file \(error)") return } } private func processAudioFile(url: URL) throws { sampleCount = 0 audioEngine.attach(audioPlayerNode) var done = false let audioFile = try! AVAudioFile(forReading: url) let buffer = AVAudioPCMBuffer(pcmFormat: audioFile.processingFormat, frameCapacity: AVAudioFrameCount(audioFile.length)) guard let _ = buffer else {throw ProcessingError.BufferCreationFailed} do { try audioFile.read(into: buffer!) }catch{ print("failed to fill the buffer due to \(error)") throw ProcessingError.BufferUnloaded } let audioFormat = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: Double(samplingFrequency), channels: 1, interleaved: false) let monoMixer = AVAudioMixerNode() audioEngine.attach(monoMixer) audioEngine.connect(audioPlayerNode, to: monoMixer, format: buffer!.format) audioEngine.connect(monoMixer, to: audioEngine.mainMixerNode, format: audioFormat) audioPlayerNode.scheduleBuffer(buffer!) { done = true } print("audio format \(audioFormat.debugDescription)") monoMixer.installTap(onBus: 0, bufferSize: AVAudioFrameCount(bufferSize * sampleSize), format: audioFormat) { (buffer, time) in //print("frame length = \(buffer.frameLength)") let dataPtr = buffer.floatChannelData?.pointee let dataSize = dataPtr?[Int(buffer.frameLength) - 1] if done && dataSize == 0.0 { print("sample count = \(self.sampleCount)") self.audioPlayerNode.stop() self.audioEngine.stop() self.audioEngine.reset() monoMixer.removeTap(onBus: 0) self.audioEngine.detach(monoMixer) self.audioEngine.detach(self.audioPlayerNode) self.saveToDatabase() return } self.sampleCount += 1 self.performFFT(buffer: buffer, time: time) } audioEngine.prepare() do { try audioEngine.start() }catch { print("audio engine could not start \(error)") } audioPlayerNode.play() } func extractPeaks(magz: [Float], time: AVAudioTime, size:Int) { var magnitudes:[Float] = [0,0,0,0] var frequencies:[Int] = [0,0,0,0] for i in 0..<freqBins.last! { let mag = magz[i] let freq = i * samplingFrequency / (bufferSize * sampleSize) switch i { case freqBins[0] ... freqBins[1]: if magnitudes[0] < mag { frequencies[0] = freq magnitudes[0] = mag } case freqBins[1] ... freqBins[2]: if magnitudes[1] < mag { frequencies[1] = freq magnitudes[1] = mag } case freqBins[2] ... freqBins[3]: if magnitudes[2] < mag { frequencies[2] = freq magnitudes[2] = mag } case freqBins[3] ... freqBins[4]: if magnitudes[3] < mag { frequencies[3] = freq magnitudes[3] = mag } default: break } } let highestMagnitude = magnitudes.sorted().last ?? 0 //print("highestMagnitude \(highestMagnitude)") if highestMagnitude > silenceThreashold { for x in 0..<freqBins.count-1 { let fp = FPModel(position: sampleCount, frequency: frequencies[x], magnitude: magnitudes[x], time: time.sampleTime, band: x+1) peaks.append(fp) } } if sampleCount % 10 == 0 { let totalMagnitude = magz.reduce(0, +) let average = totalMagnitude / Float(magz.count) print("average \(average)") averageMagnitude.onNext(average) } } func generateHashes(duplicates: Bool) -> [Int] { var hashes: [Int] = [] if peaks.count > (maxNeighbor) { for n in 0..<(peaks.count - maxNeighbor) { for x in 1..<maxNeighbor { let nextId = n + x if peaks[n].band != peaks[nextId].band && peaks[n].position != peaks[nextId].position { if peaks[n].frequency != 0 && peaks[nextId].frequency != 0 { let hashValue = hash(peak: peaks[n].frequency, peakTime: peaks[n].time, nextPeak: peaks[nextId].frequency, nextPeakTime: peaks[nextId].time) hashes.append(hashValue) } } } } } //print("size before = \(hashes.count)") if !duplicates { hashes = Array(Set(hashes)) } //print("size after = \(hashes.count)") return hashes } func hash(peak:Int, peakTime: Int64, nextPeak: Int, nextPeakTime: Int64) -> Int { let timeDiff = Int(nextPeakTime - peakTime) let freqDiff = abs(nextPeak - peak) var pins = [0,0,0,0] pins[0] = abs(((peak + nextPeak) << 3) &+ timeDiff) pins[1] = abs(((nextPeak << 3) + peak &- freqDiff)) let peakHash = Int(((pins[0] * 1000000 ) + pins[1])) return peakHash } func saveToDatabase(){ //peakMap() do { try realmService.addToDatabase(hashes: generateHashes(duplicates: false)) }catch { print("database error \(error)") } peaks = [] startNextFingerPrinting.onNext(true) } func filter(results: [Results<FingerPrints>]) -> [String : Int]{ var filteredResults: [String : Int] = [:] if !results.isEmpty { for result in results { for fingerPrint in result { for songId in fingerPrint.songs{ let currentValue = filteredResults[songId] ?? 0 filteredResults.updateValue(currentValue + 1, forKey: songId) } } } } return filteredResults } func detectSong() -> Observable<String> { return Observable.create { observer in let qResults = self.realmService.searchDatabase(hashes: self.generateHashes(duplicates: true)) let filteredResults = self.filter(results: qResults) let sortedResults = filteredResults.sorted{ $0.value > $1.value } if sortedResults.count > 0 { //let correctSong:Results<Song>? = nil let correctSong:Results<Song>? = self.realmService.getSong(id: sortedResults.first!.key) guard let songName = correctSong?.first?.name else { observer.onNext("Song not found in the Database?") observer.onCompleted() return Disposables.create() } if sortedResults.count > 1 { if (sortedResults.first!.value - sortedResults[1].value) < 10 { observer.onNext("I guess \(songName)") } else { observer.onNext(songName) } let nextSong = self.realmService.getSong(id: sortedResults[1].key) print("next song = \(String(describing: nextSong?.first?.name))") }else { observer.onNext(songName) print("song found \(songName)") } } else { observer.onNext("No single match in Database?") } // for testing only ---- check order or detection var x = 1 for res in sortedResults { print("\(x)- \(res.value)") x += 1 } //--------------------- observer.onCompleted() return Disposables.create() } // //.observeOn(bgSched1).subscribe(onNext: { qResults in //let qResults = realmService.searchDatabase(hashes: generateHashes(duplicates: true)) } func stop() { audioEngine.stop() audioEngine.reset() audioEngine.inputNode.removeTap(onBus: 0) let bgSched1 = SerialDispatchQueueScheduler(queue: DispatchQueue.global(qos: .default), internalSerialQueueName: "background_search") // peakMap() detectSong().subscribeOn(bgSched1).subscribe(onNext: { result in self.detectionResult.onNext(result) }, onCompleted: { self.peaks = [] }).disposed(by: disposeBag) } func listenToMic(){ sampleCount = 0 silenceThreashold = 10.0 let audioFormat = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: Double(samplingFrequency), channels: 1, interleaved: false) /* let fm = FileManager.default let doc = try! fm.url(for:.documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) let outurl = doc.appendingPathComponent("mic.wav", isDirectory:false) outfile = try! AVAudioFile(forWriting: outurl, settings: [ AVFormatIDKey : kAudioFormatLinearPCM, AVNumberOfChannelsKey : 1, AVSampleRateKey : 44100, AVLinearPCMBitDepthKey:32, AVLinearPCMIsFloatKey: true, AVLinearPCMIsNonInterleaved: false ]) //print("format: \(outfile.processingFormat)") //print(outfile.processingFormat) */ print(audioFormat.debugDescription) audioEngine.inputNode.installTap(onBus: 0, bufferSize: AVAudioFrameCount(bufferSize * sampleSize), format: audioFormat) { buffer, time in /* do { try self.outfile.write(from:buffer) } catch { print(error) } */ self.sampleCount += 1 self.performFFT(buffer: buffer, time: time) } audioEngine.prepare() try? audioEngine.start() } func performFFT(buffer: AVAudioPCMBuffer, time: AVAudioTime) { let frameCount = buffer.frameLength let log2n = UInt(round(log2(Double(frameCount)))) let bufferSizePOT = Int(1 << log2n) let inputCount = bufferSizePOT / 2 print("bufferSize = \(bufferSize)") print("inputCount = \(bufferSizePOT)") let fftSetup = vDSP_create_fftsetup(log2n, Int32(kFFTRadix2)) var realp = [Float](repeating: 0, count: inputCount) var imagp = [Float](repeating: 0, count: inputCount) var magz = [Float](repeating: 0, count: inputCount) var output = DSPSplitComplex(realp: &realp, imagp: &imagp) let windowSize = bufferSizePOT var transferBuffer = [Float](repeating: 0, count: windowSize) var window = [Float](repeating: 0, count: windowSize) // Hann windowing to reduce the frequency leakage vDSP_hann_window(&window, vDSP_Length(windowSize), Int32(vDSP_HANN_NORM)) vDSP_vmul((buffer.floatChannelData?.pointee)!, 1, window, 1, &transferBuffer, 1, vDSP_Length(windowSize)) // Transforming the [Float] buffer into a UnsafePointer<Float> object for the vDSP_ctoz method // And then pack the input into the complex buffer (output) let temp = UnsafePointer<Float>(transferBuffer) temp.withMemoryRebound(to: DSPComplex.self, capacity: transferBuffer.count) { vDSP_ctoz($0, 2, &output, 1, vDSP_Length(inputCount)) } // Perform the FFT vDSP_fft_zrip(fftSetup!, &output, 1, log2n, FFTDirection(FFT_FORWARD)) // Gets the magnitude vDSP_zvabs(&output, 1, &magz, 1, vDSP_Length(inputCount)) extractPeaks(magz: magz, time: time, size: inputCount) vDSP_destroy_fftsetup(fftSetup) } /*for Visualization peak map only*/ func peakMap() { var freq: [Int] = [] var time : [Int] = [] for fp in peaks { freq.append(fp.frequency) time.append(fp.position) } print("freq = \(freq);") print("time = \(time);") } //not used func normalize() { let noiseThreashold: Float = 0.0 for x in 1..<4 { let filteredPeak = peaks.filter { $0.band == x } let sortedPeaks = filteredPeak.sorted { $0.magnitude > $1.magnitude } let highestMagnitude = sortedPeaks.first?.magnitude ?? -1 if highestMagnitude != -1 { for j in 0..<peaks.count { if peaks[j].band == x { if (peaks[j].magnitude / highestMagnitude) < noiseThreashold { peaks[j].frequency = 0 } } } } } } func test() { let transferImage = Observable<Int>.create { (obs) -> Disposable in if let nextPacket = self.getNextPacket() { obs.onNext(nextPacket) } else{ obs.onNext(-1) obs.onCompleted() } return Disposables.create() } transferImage.takeWhile{$0 > 0}.subscribe(onNext: { nextPacket in print(nextPacket) let completed = self.sendFWpacket() if !completed { self.test() } }, onError: { error in print(error) }, onCompleted: { print("onCompleted") }) { print("disposed") }.disposed(by: disposeBag) } func sendFWpacket()-> Bool { return false } func getNextPacket() -> Int? { return 1 } }
[ -1 ]
fb2b1abe68071945da5a1631d333511637f7fc60
63c0891fa4be245efb62ca7547daee13a3ee78ce
/9、命令模式--HeadFirst(Meta)/命令模式/StereoOffCommand.swift
9c46dd68876abff336c0f30a9f3ebe6e8c3358c0
[ "MIT" ]
permissive
tsc000/SwiftDesignPattern
c670a4fb64d635b15757f501f592eb2b01466ffe
a2e66ba4b761463a6b83a08ea487d4329939877f
refs/heads/master
2021-06-07T09:24:30.395062
2019-04-02T02:45:38
2019-04-02T02:45:38
96,838,553
0
0
null
null
null
null
UTF-8
Swift
false
false
442
swift
// // StereoOffCommand.swift // 命令模式 // // Created by zilly.MAC009 on 2019/3/19. // Copyright © 2019 zilly.MAC009. All rights reserved. // import Cocoa class StereoOffCommand: CommandProtocol { var stereo: Stereo init(stereo: Stereo) { self.stereo = stereo } func excute() { stereo.off() } func undo() { stereo.on() stereo.setCd() stereo.setVolume(11) } }
[ -1 ]
36bb37164b1faafefc41eafcd74c714a5e161f14
1d0a713d064f342b7504eae0e379ff7908245943
/MengxiaFB/AVCamBarcode/HistoryCell.swift
aab062a20d35648d7a8de89e4535f901e813b3cc
[]
no_license
virt888/FB-Admin
dfa3cca22292337c6c0c87349148ae06c2d754e7
bfb36a3e5bdc5c515056fc9539e097bf2bec6f08
refs/heads/master
2021-01-20T13:16:20.212646
2017-02-22T01:35:16
2017-02-22T01:35:16
82,681,189
0
0
null
null
null
null
UTF-8
Swift
false
false
885
swift
// // HistoryCell.swift // MengxiaFB // // Created by 陈梦霞 on 17/2/16. // Copyright © 2017年 Apple, Inc. All rights reserved. // import UIKit class HistoryCell: UITableViewCell { @IBOutlet weak var dateLab: UILabel! @IBOutlet weak var clientLab: UILabel! @IBOutlet weak var amountLab: UILabel! var record: TransactionRecord? { willSet(new) { dateLab.text = DateCalculator.ddMMMyyyy.string(from: (new?.date)!) clientLab.text = new?.client amountLab.text = "HKD " + (new?.amount.description)! } } override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ -1 ]
40a3bbbc60a24247530180c100aad30d6df11897
d57d399e279e5be9c2f44ffc08da077ce629f21c
/ComposePlayground/Platform/ViewModifiers/Style/ButtonStyle/MainButtonStyle.swift
975d8555074dcda43631716eedf19594515dee2b
[]
no_license
GonzaCS/ios-swiftui-example
5dd332aa32949ed5a44418e938de1f8204ceb96c
7fe63291a8f2cf9c8a205ec8ee29fb1712933362
refs/heads/master
2023-08-19T20:54:07.105171
2021-10-19T16:29:34
2021-10-19T16:29:34
null
0
0
null
null
null
null
UTF-8
Swift
false
false
868
swift
// // MainButtonStyle.swift // ComposePlayground // // Created by Miguel Sánchez Rueda on 7/10/21. // import SwiftUI struct MainButtonStyle: ButtonStyle { let color: Color func makeBody(configuration: Self.Configuration) -> some View { MainButtonStyleView(configuration: configuration, color: color) } } private extension MainButtonStyle { struct MainButtonStyleView: View { let configuration: MainButtonStyle.Configuration let color: Color private let aspectRatio: CGFloat = 184/36 private let radius: CGFloat = 4 var body: some View { return configuration.label .frame(maxWidth: .infinity, maxHeight: .infinity) .aspectRatio(aspectRatio, contentMode: .fit) .background(color) .cornerRadius(radius) } } }
[ -1 ]
74a6f08452e923bfac44fdab0d92fb9f6c689877
447fd8c68c6a54823a084ed96afd47cec25d9279
/icons/fuel/src/fuel.swift
45359f15d7ed2d34bf49be397c0e5dac562902d6
[]
no_license
friends-of-cocoa/material-design-icons
cf853a45d5936b16d0fddc88e970331379721431
d66613cf64e521e32a4cbb64dadd9cb20ea6199e
refs/heads/master
2022-07-29T15:51:13.647551
2020-09-16T12:15:32
2020-09-16T12:15:32
295,662,032
0
0
null
null
null
null
UTF-8
Swift
false
false
384
swift
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen // swiftlint:disable superfluous_disable_command identifier_name line_length nesting type_body_length type_name public enum MDIIcons { public static let fuel24pt = MDIIcon(name: "fuel_24pt").image } // swiftlint:enable superfluous_disable_command identifier_name line_length nesting type_body_length type_name
[ -1 ]
7935f25cbb862577b43b866f0dac89638150ecef
af61c45ff1ee43433be0d1e1ac6d32f8e216bb6d
/Sources/SwifterSwift/SceneKit/SCNShapeExtensions.swift
ea41d6ff237afe8f12d3beb656129f3f7df3c7a4
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SwifterSwift/SwifterSwift
30bef3e0b6451bf3b415ba88429e318401f0f5ba
05ff7460358fcfaa71cbc33b1a0385f69e89e486
refs/heads/master
2023-08-31T09:50:16.574593
2023-08-25T23:13:57
2023-08-25T23:13:57
64,705,781
11,313
1,770
MIT
2023-09-08T16:31:57
2016-08-01T22:25:24
Swift
UTF-8
Swift
false
false
1,318
swift
// SCNShapeExtensions.swift - Copyright 2020 SwifterSwift #if canImport(SceneKit) import SceneKit #if canImport(UIKit) import UIKit #endif // MARK: - Methods public extension SCNShape { #if canImport(UIKit) /// SwifterSwift: Creates a shape geometry with the specified path, extrusion depth, and material. /// /// - Parameters: /// - path: The two-dimensional path forming the basis of the shape. /// - extrusionDepth: The thickness of the extruded shape along the z-axis. /// - material: The material of the geometry. convenience init(path: UIBezierPath, extrusionDepth: CGFloat, material: SCNMaterial) { self.init(path: path, extrusionDepth: extrusionDepth) materials = [material] } /// SwifterSwift: Creates a shape geometry with the specified path, extrusion depth, and material. /// /// - Parameters: /// - path: The two-dimensional path forming the basis of the shape. /// - extrusionDepth: The thickness of the extruded shape along the z-axis. /// - color: The color of the geometry's material. convenience init(path: UIBezierPath, extrusionDepth: CGFloat, color: SFColor) { self.init(path: path, extrusionDepth: extrusionDepth) materials = [SCNMaterial(color: color)] } #endif } #endif
[ 106679 ]
7b94d35b991f5fbfc96bc8a982dc00d8cdd8e01c
575a0157542a64d2b4775160b8f17450084fdf81
/Riot/Modules/SplitView/SplitViewCoordinator.swift
479ebf7029db2b24173a47d2378300fec79b89ce
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
mbalinionut/element-ios
0534c682ae7d689504b458746ba9ebdcd0e31715
60251057c726246036b3b0ad13c863ee819d2ed1
refs/heads/master
2023-08-30T04:31:15.429347
2021-10-21T18:33:26
2021-10-21T18:33:26
null
0
0
null
null
null
null
UTF-8
Swift
false
false
18,019
swift
/* Copyright 2020 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import Foundation /// SplitViewCoordinatorParameters input parameters class SplitViewCoordinatorParameters { let router: RootRouterType let userSessionsService: UserSessionsService let appNavigator: AppNavigatorProtocol init(router: RootRouterType, userSessionsService: UserSessionsService, appNavigator: AppNavigatorProtocol) { self.router = router self.userSessionsService = userSessionsService self.appNavigator = appNavigator } } final class SplitViewCoordinator: NSObject, SplitViewCoordinatorType { // MARK: - Constants private enum Constants { static let detailModulesCheckDelay: Double = 0.3 } // MARK: - Properties // MARK: Private private let parameters: SplitViewCoordinatorParameters private let splitViewController: UISplitViewController private weak var masterPresentable: SplitViewMasterPresentable? private var detailNavigationController: UINavigationController? private var detailNavigationRouter: NavigationRouterType? private var selectedNavigationRouter: NavigationRouterType? { return self.masterPresentable?.selectedNavigationRouter } private weak var tabBarCoordinator: TabBarCoordinatorType? // Indicate if coordinator has been started once private var hasStartedOnce: Bool = false // MARK: Public var childCoordinators: [Coordinator] = [] weak var delegate: SplitViewCoordinatorDelegate? // MARK: - Setup init(parameters: SplitViewCoordinatorParameters) { self.parameters = parameters let splitViewController = RiotSplitViewController() splitViewController.preferredDisplayMode = .allVisible self.splitViewController = splitViewController } // MARK: - Public methods func start() { self.start(with: nil) } func start(with spaceId: String?) { if hasStartedOnce == false { self.hasStartedOnce = true self.splitViewController.delegate = self // Create primary controller let tabBarCoordinator = self.createTabBarCoordinator() tabBarCoordinator.delegate = self tabBarCoordinator.splitViewMasterPresentableDelegate = self tabBarCoordinator.start(with: spaceId) // Create secondary controller let placeholderDetailViewController = self.createPlaceholderDetailsViewController() let detailNavigationController = RiotNavigationController(rootViewController: placeholderDetailViewController) // Setup split view controller self.splitViewController.viewControllers = [tabBarCoordinator.toPresentable(), detailNavigationController] self.add(childCoordinator: tabBarCoordinator) self.tabBarCoordinator = tabBarCoordinator self.masterPresentable = tabBarCoordinator self.detailNavigationController = detailNavigationController self.detailNavigationRouter = NavigationRouter(navigationController: detailNavigationController) self.parameters.router.setRootModule(self.splitViewController) self.registerNavigationRouterNotifications() } else { // Pop to home screen when selecting a new space self.popToHome(animated: true) { // Update tabBarCoordinator selected space self.tabBarCoordinator?.start(with: spaceId) } } } func toPresentable() -> UIViewController { return self.splitViewController } // TODO: Do not expose publicly this method func restorePlaceholderDetails() { // Be sure that the primary is then visible too. if splitViewController.displayMode == .primaryHidden { splitViewController.preferredDisplayMode = .allVisible } self.resetDetailNavigationControllerWithPlaceholder(animated: false) // Release the current selected item (room/contact/group...). self.tabBarCoordinator?.releaseSelectedItems() } func popToHome(animated: Bool, completion: (() -> Void)?) { self.resetDetailNavigationControllerWithPlaceholder(animated: animated) // Force back to the main screen if this is not the one that is displayed self.tabBarCoordinator?.popToHome(animated: animated, completion: completion) } // MARK: - Private methods private func createPlaceholderDetailsViewController() -> UIViewController { return PlaceholderDetailViewController.instantiate() } private func createTabBarCoordinator() -> TabBarCoordinator { let coordinatorParameters = TabBarCoordinatorParameters(userSessionsService: self.parameters.userSessionsService, appNavigator: self.parameters.appNavigator) let tabBarCoordinator = TabBarCoordinator(parameters: coordinatorParameters) tabBarCoordinator.delegate = self return tabBarCoordinator } private func resetDetailNavigationControllerWithPlaceholder(animated: Bool) { guard let detailNavigationRouter = self.detailNavigationRouter else { return } // Check if placeholder is already shown if detailNavigationRouter.modules.count == 1 && detailNavigationRouter.modules.last is PlaceholderDetailViewController { return } // Set placeholder screen as root controller of detail navigation controller let placeholderDetailsVC = self.createPlaceholderDetailsViewController() detailNavigationRouter.setRootModule(placeholderDetailsVC, hideNavigationBar: false, animated: animated, popCompletion: nil) } private func isPlaceholderShown(from secondaryViewController: UIViewController) -> Bool { if let detailNavigationController = secondaryViewController as? UINavigationController, let topViewController = detailNavigationController.viewControllers.last { return topViewController is PlaceholderDetailViewController } else { return secondaryViewController is PlaceholderDetailViewController } } private func releaseRoomDataSourceIfNeeded(for roomCoordinator: RoomCoordinatorProtocol) { guard roomCoordinator.canReleaseRoomDataSource, let session = roomCoordinator.mxSession, let roomId = roomCoordinator.roomId else { return } let existingRoomCoordinatorWithSameRoomId = self.detailModules.first { presentable -> Bool in if let currentRoomCoordinator = presentable as? RoomCoordinatorProtocol { return currentRoomCoordinator.roomId == roomCoordinator.roomId } return false } guard existingRoomCoordinatorWithSameRoomId == nil else { MXLog.debug("[SplitViewCoordinator] Do not release RoomDataSource for room id \(roomId), another RoomCoordinator with same room id using it") return } let dataSourceManager = MXKRoomDataSourceManager.sharedManager(forMatrixSession: session) dataSourceManager?.closeRoomDataSource(withRoomId: roomId, forceClose: false) } private func registerNavigationRouterNotifications() { NotificationCenter.default.addObserver(self, selector: #selector(navigationRouterDidPopViewController(_:)), name: NavigationRouter.didPopModule, object: nil) } @objc private func navigationRouterDidPopViewController(_ notification: Notification) { guard let userInfo = notification.userInfo, let navigationRouter = userInfo[NavigationRouter.NotificationUserInfoKey.navigationRouter] as? NavigationRouterType, let poppedController = userInfo[NavigationRouter.NotificationUserInfoKey.viewController] as? UIViewController else { return } // In our split view configuration is possible to have nested navigation controller (see https://blog.malcolmhall.com/2017/01/27/default-behaviour-of-uisplitviewcontroller-collapsesecondaryviewcontroller/)). // When the split view controller has one column visible with the detail navigation controller nested inside the primary, // check to see whether the primary navigation controller is popping the detail navigation controller. // In this case the detail navigation controller will be popped but not its content. It means completions will not be called. if navigationRouter === self.selectedNavigationRouter, let poppedNavigationController = poppedController as? UINavigationController, poppedNavigationController == self.detailNavigationController { // Clear the detailNavigationRouter to trigger completions associated to each controllers self.detailNavigationRouter?.popAllModules(animated: false) } if let poppedModule = userInfo[NavigationRouter.NotificationUserInfoKey.module] as? Presentable { if let roomCoordinator = poppedModule as? RoomCoordinatorProtocol { // If the RoomCoordinator view controller is popped from the detail navigation controller, check if the associated room data source should be released. // If there is no other RoomCoordinator using the same data source, release it. // A small delay is set to be sure navigation stack manipulation ended before checking the whole stack. DispatchQueue.main.asyncAfter(deadline: .now() + Constants.detailModulesCheckDelay) { self.releaseRoomDataSourceIfNeeded(for: roomCoordinator) } } } } } // MARK: - UISplitViewControllerDelegate extension SplitViewCoordinator: UISplitViewControllerDelegate { /// Provide the new secondary view controller for the split view interface. /// This method returns the view controller to use as the secondary view controller in the expanded split view interface (when 2 column are visible). /// Sample case: large iPhone goes from portrait to landsacpe. func splitViewController(_ splitViewController: UISplitViewController, separateSecondaryFrom primaryViewController: UIViewController) -> UIViewController? { // If the primary root controller of the UISplitViewController is a UINavigationController, // it's possible to have nested navigation controllers due to private property `_allowNestedNavigationControllers` set to true (https://blog.malcolmhall.com/2017/01/27/default-behaviour-of-uisplitviewcontroller-collapsesecondaryviewcontroller/). // So if the top view controller of the primary navigation controller is a navigation controller and it corresponds to the existing `detailNavigationController` instance. // Return `detailNavigationController` as is, it will be used as the secondary view of the split view controller. if let topMostNavigationController = self.selectedNavigationRouter?.modules.last as? UINavigationController, topMostNavigationController == self.detailNavigationController { return self.detailNavigationController } // Else return the default empty details view controller. // Be sure that the primary is then visible too. if splitViewController.displayMode == .primaryHidden { splitViewController.preferredDisplayMode = .allVisible } // Restore detail navigation controller with placeholder as root self.resetDetailNavigationControllerWithPlaceholder(animated: false) // Return up to date detail navigation controller // In any cases `detailNavigationController` will be used as secondary view of the split view controller. return self.detailNavigationController } /// Adjust the primary view controller and incorporate the secondary view controller into the collapsed interface if needed. /// Return false to let the split view controller try to incorporate the secondary view controller's content into the collapsed interface, /// or true to indicate that you do not want the split view controller to do anything with the secondary view controller. /// Sample case: large iPhone goes from landscape to portrait. func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool { // If the secondary view is the placeholder screen do not merge the secondary into the primary. // Note: In this case, the secondaryViewController will be automatically discarded. if self.isPlaceholderShown(from: secondaryViewController) { return true } // Return false to let the split view controller try to incorporate the secondary view controller's content into the collapsed interface. // If the primary root controller of a UISplitViewController is a UINavigationController, // it's possible to have nested navigation controllers due to private property `_allowNestedNavigationControllers` set to true (https://blog.malcolmhall.com/2017/01/27/default-behaviour-of-uisplitviewcontroller-collapsesecondaryviewcontroller/). // So in this case returning false here will push the `detailNavigationController` on top of the `primaryNavigationController`. // Sample primary view stack: // primaryNavigationController[ // MasterTabBarController, // detailNavigationController[RoomViewController, RoomInfoListViewController]] // Note that normally pushing a navigation controller on top of a navigation controller don't work. return false } } // MARK: - TabBarCoordinatorDelegate extension SplitViewCoordinator: TabBarCoordinatorDelegate { func tabBarCoordinatorDidCompleteAuthentication(_ coordinator: TabBarCoordinatorType) { self.delegate?.splitViewCoordinatorDidCompleteAuthentication(self) } } // MARK: - SplitViewMasterPresentableDelegate extension SplitViewCoordinator: SplitViewMasterPresentableDelegate { var detailModules: [Presentable] { return self.detailNavigationRouter?.modules ?? [] } func splitViewMasterPresentable(_ presentable: Presentable, wantsToReplaceDetailWith detailPresentable: Presentable, popCompletion: (() -> Void)?) { MXLog.debug("[SplitViewCoordinator] splitViewMasterPresentable: \(presentable) wantsToReplaceDetailWith detailPresentable: \(detailPresentable)") guard let detailNavigationController = self.detailNavigationController else { MXLog.debug("[SplitViewCoordinator] splitViewMasterPresentable: Failed to display because detailNavigationController is nil") return } let detailController = detailPresentable.toPresentable() // Reset the detail navigation controller with the given detail controller self.detailNavigationRouter?.setRootModule(detailPresentable, popCompletion: popCompletion) // This will call first UISplitViewControllerDelegate method: `splitViewController(_:showDetail:sender:)`, if implemented, to give the opportunity to customise `UISplitViewController.showDetailViewController(:sender:)` behavior. // - If the split view controller is collpased (one column visible): // The `detailNavigationController` will be pushed on top of the primary navigation controller. // In fact if the primary root controller of a UISplitViewController is a UINavigationController, // it's possible to have nested navigation controllers due to private property `_allowNestedNavigationControllers` set to true (https://blog.malcolmhall.com/2017/01/27/default-behaviour-of-uisplitviewcontroller-collapsesecondaryviewcontroller/). // - Else if the split view controller is not collpased (two column visible) // It will set the `detailNavigationController` as the secondary view of the split view controller self.splitViewController.showDetailViewController(detailNavigationController, sender: nil) // Set leftBarButtonItem with split view display mode button if there is no leftBarButtonItem defined detailController.vc_setupDisplayModeLeftBarButtonItemIfNeeded() } func splitViewMasterPresentable(_ presentable: Presentable, wantsToStack detailPresentable: Presentable, popCompletion: (() -> Void)?) { guard let detailNavigationRouter = self.detailNavigationRouter else { MXLog.debug("[SplitViewCoordinator] Failed to stack \(detailPresentable) because detailNavigationRouter is nil") return } detailNavigationRouter.push(detailPresentable, animated: true, popCompletion: popCompletion) } func splitViewMasterPresentableWantsToResetDetail(_ presentable: Presentable) { self.resetDetailNavigationControllerWithPlaceholder(animated: false) } }
[ -1 ]
69faffc179242c92ab13166de3e3ca4c48ca1a98
ff177d36afc28e8822e35d3bf64f2529720355cc
/Eventure/User Account/Account Page/PersonalInfoPage.swift
f97144987b66618e61ae4add9b137bf99b2db58e
[]
no_license
lytzV/Eventure-iOS
d352be037b61a12025bbfc119679be6d9e722059
7607ec7be1be672ca6be46e5c2082c4957081ee0
refs/heads/master
2020-08-09T06:34:39.504771
2019-10-07T21:43:28
2019-10-07T21:43:28
188,906,077
0
0
null
2019-05-27T20:35:42
2019-05-27T20:35:42
null
UTF-8
Swift
false
false
8,258
swift
// // PersonalInfoPage.swift // Eventure // // Created by jeffhe on 2019/8/25. // Copyright © 2019 UC Berkeley. All rights reserved. // import Foundation import UIKit import SwiftyJSON class PersonalInfoPage: UIViewController,UITableViewDelegate, UITableViewDataSource { private var myTableView: UITableView! private var spinner: UIActivityIndicatorView! private var spinnerLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. view.backgroundColor = .white title = "Manage Account" myTableView = UITableView() myTableView.register(AccountCell.classForCoder(), forCellReuseIdentifier: "MyCell") myTableView.dataSource = self myTableView.delegate = self myTableView.backgroundColor = UIColor.init(white: 0.95, alpha: 1) self.view.addSubview(myTableView) //set location constraints of the tableview myTableView.translatesAutoresizingMaskIntoConstraints = false myTableView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true myTableView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true myTableView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true myTableView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true //make sure table view appears limited self.myTableView.tableFooterView = UIView(frame: CGRect.zero) spinner = { let spinner = UIActivityIndicatorView(style: .whiteLarge) spinner.color = .lightGray spinner.hidesWhenStopped = true spinner.translatesAutoresizingMaskIntoConstraints = false view.addSubview(spinner) spinner.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true spinner.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -5).isActive = true return spinner }() spinnerLabel = { let label = UILabel() label.text = "Verifying password..." label.isHidden = true label.font = .systemFont(ofSize: 17, weight: .medium) label.textColor = .darkGray label.translatesAutoresizingMaskIntoConstraints = false view.addSubview(label) label.centerXAnchor.constraint(equalTo: spinner.centerXAnchor).isActive = true label.topAnchor.constraint(equalTo: spinner.bottomAnchor, constant: 10).isActive = true return label }() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) myTableView.reloadData() } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 4 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) if indexPath.row == 0 { //if the user tries to change the name self.pushToModifyPage(type: .displayedName) } else if indexPath.row == 1 { //if the user tries to change the password let alert = UIAlertController(title: "Verification", message: "Please enter your current password to continue.", preferredStyle: .alert) alert.addTextField(configurationHandler: { (textField) in textField.isSecureTextEntry = true }) alert.addAction(UIAlertAction(title: "Confirm", style: .default, handler: { action in let pwd = alert.textFields![0].text! if pwd.md5() == User.current!.password_MD5 { let passwordSettings = UpdatePasswordPage() self.navigationController?.pushViewController(passwordSettings, animated: true) } else { let warning = UIAlertController(title: "Incorrect Password", message: nil, preferredStyle: .alert) warning.addAction(.init(title: "Dismiss", style: .cancel, handler: nil)) self.present(warning, animated: true, completion: nil) } })) alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) self.present(alert, animated: true) } else if indexPath.row == 2 { pushToModifyPage(type: .email) } else if indexPath.row == 3 { let genderPage = changeGender() navigationController?.pushViewController(genderPage, animated: true) } } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell") as! AccountCell cell.setup(sectionNum: indexPath.section,rowNum: indexPath.row, type: "Personal") return cell } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 55.0 } func pushToModifyPage(type: Types) { let modifyAccount: GenericOneFieldPage if type == .displayedName { modifyAccount = GenericOneFieldPage(fieldName: "Displayed Name", fieldDefault: User.current!.displayedName, type: .displayedName) } else { modifyAccount = .init(fieldName: "Email Address", fieldDefault: User.current!.email, type: .email) } modifyAccount.submitAction = { inputField, spinner in inputField.isEnabled = false spinner.startAnimating() let url = URL.with(base: API_BASE_URL, API_Name: "account/UpdateUserInfo", parameters: [ "uuid": String(User.current!.uuid) ])! var request = URLRequest(url: url) request.httpMethod = "POST" request.addAuthHeader() let body = JSON(dictionaryLiteral: (type.rawValue, inputField.text!)) request.httpBody = try? body.rawData() let task = CUSTOM_SESSION.dataTask(with: request) { data, response, error in DispatchQueue.main.async { spinner.stopAnimating() inputField.isEnabled = true } guard error == nil else { DispatchQueue.main.async { internetUnavailableError(vc: self) } return } let msg = String(data: data!, encoding: .utf8) if msg == INTERNAL_ERROR { DispatchQueue.main.async { serverMaintenanceError(vc: self) } return } else if msg == "success" { DispatchQueue.main.async { if type == .displayedName { User.current?.displayedName = inputField.text! } else if type == .email { User.current!.email = inputField.text! } self.navigationController?.popViewController(animated: true) } } else { DispatchQueue.main.async { let alert = UIAlertController(title: "Error", message: msg, preferredStyle: .alert) alert.addAction(.init(title: "OK", style: .cancel)) self.present(alert, animated: true) } } } task.resume() } modifyAccount.hidesBottomBarWhenPushed = true navigationController?.pushViewController(modifyAccount, animated: true) } } extension PersonalInfoPage { enum Types: String { case displayedName = "Displayed name" case email = "Email" } }
[ -1 ]
166c7997512bc57d18766c63064fea1c0f6a78d6
ac154f589120658990a51e8c765f62a5f5ab6e4a
/Chapter07/POP_design_Playground.playground/Contents.swift
fa69052f7c10f3f7e0e8605bbda09cb4d348e722
[ "MIT" ]
permissive
PacktPublishing/Swift-5-Protocol-Oriented-Programming-Fourth-Edition
ee232c9d2fb9e028faa3576d5b961fce9bcaebc7
ca67b46de1d2bc9b466fff089bd22afb6f04ba89
refs/heads/master
2023-02-03T19:37:30.491901
2023-01-30T09:17:08
2023-01-30T09:17:08
192,530,907
40
11
null
null
null
null
UTF-8
Swift
false
false
3,454
swift
import Cocoa protocol Vehicle { var hitPoints: Int {get set} } extension Vehicle { mutating func takeHit(amount: Int) { hitPoints -= amount } func hitPointsRemaining() -> Int { return hitPoints } func isAlive() -> Bool { return hitPoints > 0 ? true : false } } protocol LandVehicle: Vehicle { var landAttack: Bool {get} var landMovement: Bool {get} var landAttackRange: Int {get} func doLandAttack() func doLandMovement() } protocol SeaVehicle: Vehicle { var seaAttack: Bool {get} var seaMovement: Bool {get} var seaAttackRange: Int {get} func doSeaAttack() func doSeaMovement() } protocol AirVehicle: Vehicle { var airAttack: Bool {get} var airMovement: Bool {get} var airAttackRange: Int {get} func doAirAttack() func doAirMovement() } struct Tank: LandVehicle { var hitPoints = 68 let landAttackRange = 5 let landAttack = true let landMovement = true func doLandAttack() { print("Tank Attack") } func doLandMovement() { print("Tank Move") } } struct Amphibious: LandVehicle, SeaVehicle { var hitPoints = 25 let landAttackRange = 1 let seaAttackRange = 1 let landAttack = true let landMovement = true let seaAttack = true let seaMovement = true func doLandAttack() { print("Amphibious Land Attack") } func doLandMovement() { print("Amphibious Land Move") } func doSeaAttack() { print("Amphibious Sea Attack") } func doSeaMovement() { print("Amphibious Sea Move") } } struct Transformer: LandVehicle, SeaVehicle, AirVehicle { var hitPoints = 75 let landAttackRange = 7 let seaAttackRange = 5 let airAttackRange = 6 let landAttack = true let landMovement = true let seaAttack = true let seaMovement = true let airAttack = true let airMovement = true func doLandAttack() { print("Transformer Land Attack") } func doLandMovement() { print("Transformer Land Move") } func doSeaAttack() { print("Transformer Sea Attack") } func doSeaMovement() { print("Transformer Sea Move") } func doAirAttack() { print("Transformer Sea Attack") } func doAirMovement() { print("Transformer Sea Move") } } var vehicles = [Vehicle]() var vh1 = Amphibious() var vh2 = Amphibious() var vh3 = Tank() var vh4 = Transformer() vehicles.append(vh1) vehicles.append(vh2) vehicles.append(vh3) vehicles.append(vh4) for (index, vehicle) in vehicles.enumerated() { if let Vehicle = vehicle as? AirVehicle { print("Vehicle at \(index) is Air") } if let Vehicle = vehicle as? LandVehicle { print("Vehicle at \(index) is Land") } if let Vehicle = vehicle as? SeaVehicle { print("Vehicle at \(index) is Sea") } } for (index, vehicle) in vehicles.enumerated() where vehicle is LandVehicle { let vh = vehicle as! LandVehicle if vh.landAttack { vh.doLandAttack() } if vh.landMovement { vh.doLandMovement() } }
[ -1 ]
e8176af2b9c5114dfa3fabf55952894994551520
2f704d75f3bcae7f75c587f801b908ad89478444
/GithubMVVMFlux/TabBar/TabBarController.swift
48a76486268c311f7ca971a024fc1a77ce297ef0
[]
no_license
ARATAYOKOYAMA/GithubMVVMFlux
a87ac5908f0258a1511588017fc001fc5ae2fd76
9c03cf8b7964683ad9c71cef5b95c4b5a98e4444
refs/heads/master
2023-04-12T20:30:15.248706
2019-12-31T14:51:09
2019-12-31T14:51:09
216,466,697
0
0
null
2023-04-11T23:41:27
2019-10-21T03:05:27
Swift
UTF-8
Swift
false
false
2,023
swift
// // TabBarController.swift // GithubMVVMFlux // // Created by 横山新 on 2019/10/28. // Copyright © 2019 ARATAYOKOYAMA. All rights reserved. // import UIKit class TabBarController: UITabBarController { private var currentUser: User? // MARK: Storyboard private let storyboardTrend = UIStoryboard(name: "Trend", bundle: nil) private let storyboardSearch = UIStoryboard(name: "Search", bundle: nil) // MARK: View private let pageViewController = RepositoryFavoratePageViewController() private var trendViewController: TrendViewController! private var searchViewController: SearchViewController! // MARK: Navigation private var pageViewNavigation: UINavigationController! private var trendViewNavigation: UINavigationController! private var searchNavigation: UINavigationController! override func viewDidLoad() { super.viewDidLoad() // TabBarController trendViewController = storyboardTrend.instantiateViewController(withIdentifier: "storyboardTrend") as? TrendViewController searchViewController = storyboardSearch.instantiateViewController(withIdentifier: "storyboardSearch") as? SearchViewController pageViewController.tabBarItem = UITabBarItem(tabBarSystemItem: .contacts, tag: 1) trendViewController.tabBarItem = UITabBarItem(tabBarSystemItem: .recents, tag: 2) searchViewController.tabBarItem = UITabBarItem(tabBarSystemItem: .search, tag: 3) // MARK: Navigation pageViewNavigation = UINavigationController(rootViewController: pageViewController) trendViewNavigation = UINavigationController(rootViewController: trendViewController) searchNavigation = UINavigationController(rootViewController: searchViewController) let vcs: [UIViewController] = [pageViewNavigation, trendViewNavigation, searchNavigation] self.setViewControllers(vcs, animated: true) } func inject(currentUser: User) { self.currentUser = currentUser } }
[ -1 ]
3247d99662cf947eede32ec23afa6e791d8a8b5e
a74df5d1b8593c0dff1d406818f71d4b6e9c2fc3
/AppOfThrones/AppOfThrones/AppDelegate.swift
c4bc10ca82fe8ad2d429a6bffd99676c2a6188b5
[]
no_license
esevilla/AppOfThrones
800e0cf904bfc4f7502de257c1f6de3a2d2d7aad
33e99a8fa0303576feae7bbd965d13460d2b5001
refs/heads/master
2022-11-28T12:54:20.606007
2020-07-27T18:15:08
2020-07-27T18:15:08
282,978,604
0
0
null
null
null
null
UTF-8
Swift
false
false
1,448
swift
// // AppDelegate.swift // AppOfThrones // // Created by Fernando Torcelly Garcia on 09/02/2020. // Copyright © 2020 Fernando Torcelly Garcia. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 163891, 213048, 385081, 376889, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 262472, 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, 385713, 434867, 164534, 336567, 328378, 164538, 328386, 352968, 344776, 418507, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 361288, 328522, 336714, 426841, 254812, 361309, 197468, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 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, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 419410, 345701, 394853, 222830, 370297, 403070, 403075, 345736, 198280, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 419517, 337599, 419527, 419530, 419535, 272081, 419542, 394966, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 141051, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 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, 329867, 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, 321879, 379233, 354673, 321910, 248186, 420236, 379278, 354727, 338352, 330189, 338381, 338386, 338403, 338409, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 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, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 158761, 199728, 396336, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 183383, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265432, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 249312, 339428, 339434, 249328, 69113, 372228, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 339588, 421508, 224904, 224909, 11918, 159374, 224913, 126610, 339601, 224916, 224919, 126616, 224922, 208538, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 372499, 167700, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 225148, 257916, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 217157, 421960, 356439, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 266453, 225493, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 397571, 389380, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 389502, 250238, 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, 389892, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 340858, 324475, 430972, 340861, 324478, 119674, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 381946, 349180, 439294, 431106, 209943, 209946, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 349308, 210044, 349311, 152703, 160895, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 251044, 210084, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 218360, 251128, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 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, 210487, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 333498, 210631, 333511, 358099, 153302, 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, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 350202, 333818, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 375053, 268559, 350480, 432405, 350486, 350490, 325914, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 416157, 342430, 268701, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 162591, 326441, 326451, 326454, 326460, 244540, 375612, 260924, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 342874, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 384107, 367723, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 367800, 384188, 384191, 351423, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 343306, 261389, 359694, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 425649, 155322, 425662, 155327, 245460, 155351, 155354, 212699, 245475, 155363, 245483, 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, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 253926, 327654, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
e2daae00411e7e780d243f46d486239e5d8027f3
45d7c9d199aee3b28f66b475a64bd31b5be10891
/iOS/CoreFoundation/CFCalendar.swift
888aa2c96c39caaf48aea61a3449cdb9e30d0612
[]
no_license
DougGregor/swift-concurrency-objc
f8ba0cfa2a4153d1cd129d7d61060d0a47067847
5ab47b4f70a675a4298dc00b1526505b964b4061
refs/heads/xcode-12-2-beta-3
2023-01-28T12:41:18.646533
2020-10-15T19:42:00
2020-10-15T19:42:00
304,435,605
40
8
null
2020-10-15T20:05:54
2020-10-15T20:02:53
Swift
UTF-8
Swift
false
false
2,630
swift
class CFCalendar : _CFObject { } func CFCalendarGetTypeID() -> CFTypeID func CFCalendarCopyCurrent() -> CFCalendar! func CFCalendarCreateWithIdentifier(_ allocator: CFAllocator!, _ identifier: CFCalendarIdentifier!) -> CFCalendar! func CFCalendarGetIdentifier(_ calendar: CFCalendar!) -> CFCalendarIdentifier! func CFCalendarCopyLocale(_ calendar: CFCalendar!) -> CFLocale! func CFCalendarSetLocale(_ calendar: CFCalendar!, _ locale: CFLocale!) func CFCalendarCopyTimeZone(_ calendar: CFCalendar!) -> CFTimeZone! func CFCalendarSetTimeZone(_ calendar: CFCalendar!, _ tz: CFTimeZone!) func CFCalendarGetFirstWeekday(_ calendar: CFCalendar!) -> CFIndex func CFCalendarSetFirstWeekday(_ calendar: CFCalendar!, _ wkdy: CFIndex) func CFCalendarGetMinimumDaysInFirstWeek(_ calendar: CFCalendar!) -> CFIndex func CFCalendarSetMinimumDaysInFirstWeek(_ calendar: CFCalendar!, _ mwd: CFIndex) struct CFCalendarUnit : OptionSet { init(rawValue: CFOptionFlags) let rawValue: CFOptionFlags static var era: CFCalendarUnit { get } static var year: CFCalendarUnit { get } static var month: CFCalendarUnit { get } static var day: CFCalendarUnit { get } static var hour: CFCalendarUnit { get } static var minute: CFCalendarUnit { get } static var second: CFCalendarUnit { get } @available(iOS, introduced: 2.0, deprecated: 8.0, message: "Use kCFCalendarUnitWeekOfYear or kCFCalendarUnitWeekOfMonth instead") static var week: CFCalendarUnit { get } static var weekday: CFCalendarUnit { get } static var weekdayOrdinal: CFCalendarUnit { get } @available(iOS 4.0, *) static var quarter: CFCalendarUnit { get } @available(iOS 5.0, *) static var weekOfMonth: CFCalendarUnit { get } @available(iOS 5.0, *) static var weekOfYear: CFCalendarUnit { get } @available(iOS 5.0, *) static var yearForWeekOfYear: CFCalendarUnit { get } } func CFCalendarGetMinimumRangeOfUnit(_ calendar: CFCalendar!, _ unit: CFCalendarUnit) -> CFRange func CFCalendarGetMaximumRangeOfUnit(_ calendar: CFCalendar!, _ unit: CFCalendarUnit) -> CFRange func CFCalendarGetRangeOfUnit(_ calendar: CFCalendar!, _ smallerUnit: CFCalendarUnit, _ biggerUnit: CFCalendarUnit, _ at: CFAbsoluteTime) -> CFRange func CFCalendarGetOrdinalityOfUnit(_ calendar: CFCalendar!, _ smallerUnit: CFCalendarUnit, _ biggerUnit: CFCalendarUnit, _ at: CFAbsoluteTime) -> CFIndex @available(iOS 2.0, *) func CFCalendarGetTimeRangeOfUnit(_ calendar: CFCalendar!, _ unit: CFCalendarUnit, _ at: CFAbsoluteTime, _ startp: UnsafeMutablePointer<CFAbsoluteTime>!, _ tip: UnsafeMutablePointer<CFTimeInterval>!) -> Bool var kCFCalendarComponentsWrap: CFOptionFlags { get }
[ -1 ]
5d0efe7c1efb84b68389818f685a19aed65d7b3d
f6286d38afb82d690997d90999c7f4c465b5abc4
/phoneWithFriends/Person.swift
019da3c7f0f49ce2cff6336f9bca5431275645ed
[]
no_license
bmbowdish/phoneWithFriends
df722746e29b46e3bc1bc68c5fd7af1ccc724065
daeb6c5cca2098c630173dc75be22712c53aee65
refs/heads/master
2021-05-03T12:57:58.497832
2018-02-20T23:38:57
2018-02-20T23:38:57
120,506,058
0
0
null
null
null
null
UTF-8
Swift
false
false
2,235
swift
// // Person.swift // phoneWithFriends // // Created by Braden Bowdish on 2/4/18. // Copyright © 2018 Braden Bowdish. All rights reserved. // import Foundation class Person { var firstName: String var lastName: String var age: Int var description: String? var friends: [Person] var location: String // first and last names are tracked but not used var name: String { return "\(firstName) \(lastName)" } // create a person init(firstName: String, lastName: String, age: Int, description: String?, friends: [Person], location: String){ self.firstName = firstName self.lastName = lastName self.age = age self.description = description self.friends = [] self.location = location } // add a friend func addFriend(newFriend: Person){ for friend in friends{ if(friend === newFriend){ return } } friends.append(newFriend) newFriend.addFriend(newFriend: self) } // static function for testing that gives a list of fake people static func createPersons() -> [Person] // array of persons created { // a test let newPersons = [Person(firstName: "Bob",lastName: "El Papo",age: 91,description: nil, friends: [],location: "Philadelphia, PA"), Person(firstName: "Braden",lastName: "Bowdish",age:21,description: nil, friends: [],location: "Rochester, NY"), Person(firstName: "Kyle", lastName: "Smith",age:10,description: nil, friends: [], location: "Phoenixville, PA"), Person(firstName: "Meghan", lastName: "Nopalopalus",age:24,description:nil,friends:[],location:"San Francisco, CA") ] return newPersons } func getFriendStr() -> String{ var str = "" if (friends.count > 2) { return "\(self.firstName) has \(friends.count) friends." } else if(friends.count > 0){ for friend in friends{ str = str + "\(friend.name), " } return str } else { return "No friends." } } }
[ -1 ]
5d4de835f77094096c8debdc6c352adfb7765bbf
f152611d796bec2d36058e0996942972bd53a3d2
/MyBrowserTests/MyBrowserTests.swift
d7829dee9eb285d84761f54377924781e51ba617
[]
no_license
rebecasouza/MyBrowser
7656d0ab1266120289d5967ae19863bc58b3ad61
0ce492d47812abd210752ff07bab782af9905164
refs/heads/master
2021-01-21T07:25:00.827713
2017-05-16T00:14:43
2017-05-16T00:14:43
91,612,935
0
0
null
null
null
null
UTF-8
Swift
false
false
982
swift
// // MyBrowserTests.swift // MyBrowserTests // // Created by Rebeca Souza on 2017-05-15. // Copyright © 2017 Rebeca Souza. All rights reserved. // import XCTest @testable import MyBrowser class MyBrowserTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 360462, 98333, 278558, 16419, 229413, 204840, 278570, 344107, 360491, 155694, 253999, 229424, 237620, 229430, 319542, 180280, 163896, 376894, 286788, 352326, 311372, 196691, 278615, 385116, 237663, 254048, 319591, 221290, 278634, 278638, 319598, 352368, 204916, 131189, 131191, 237689, 131198, 278655, 311435, 311438, 278677, 196760, 426138, 278685, 311458, 278691, 49316, 196773, 32941, 278704, 377009, 278708, 131256, 295098, 139479, 254170, 229597, 311519, 205035, 286958, 327929, 344313, 147717, 368905, 278797, 180493, 254226, 319763, 368916, 262421, 377114, 278810, 237856, 237857, 278816, 311597, 98610, 262450, 180535, 336183, 278842, 287041, 287043, 319813, 139589, 311621, 319821, 254286, 344401, 377169, 368981, 155990, 368984, 106847, 98657, 270701, 246127, 270706, 246136, 139640, 246137, 311681, 311685, 106888, 385417, 385422, 213403, 246178, 385454, 311727, 377264, 278961, 278965, 319930, 278970, 311738, 33211, 336317, 336320, 311745, 278978, 254406, 188871, 278989, 278993, 278999, 328152, 369116, 287198, 279008, 279013, 279018, 319981, 279022, 319987, 279029, 254456, 279032, 377338, 279039, 377343, 254465, 287241, 279050, 303631, 139792, 279057, 303636, 279062, 393751, 279065, 377376, 180771, 377386, 197167, 385588, 352829, 115270, 377418, 385615, 426576, 369235, 287318, 295519, 139872, 66150, 344680, 279146, 295536, 287346, 139892, 287352, 344696, 279164, 189057, 303746, 311941, 336518, 311945, 369289, 344715, 279177, 311949, 287374, 377489, 311954, 352917, 230040, 271000, 377497, 303771, 221852, 377500, 205471, 344738, 139939, 279206, 295590, 279210, 287404, 295599, 205487, 303793, 336564, 164533, 230072, 287417, 303803, 287422, 66242, 377539, 287433, 164560, 385747, 279252, 361176, 418520, 287452, 295652, 279269, 246503, 369385, 230125, 312047, 279280, 312052, 230134, 172792, 344827, 221948, 279294, 205568, 295682, 197386, 434957, 426774, 197399, 426775, 336671, 344865, 197411, 262951, 279336, 295724, 312108, 197422, 353070, 164656, 295729, 262962, 353069, 328499, 353078, 230199, 197431, 353079, 336702, 279362, 295746, 353094, 353095, 353109, 377686, 230234, 189275, 435039, 279392, 295776, 303972, 385893, 246641, 246643, 295798, 246648, 361337, 279417, 254850, 369538, 213894, 287622, 58253, 295824, 279456, 189348, 279464, 353195, 140204, 377772, 353197, 304051, 230332, 287677, 377790, 353215, 353216, 213957, 213960, 345033, 279498, 386006, 418776, 50143, 123881, 304110, 320494, 287731, 271350, 295927, 312314, 304122, 328700, 320507, 328706, 410627, 320516, 295942, 386056, 230410, 353290, 377869, 320527, 238610, 418837, 140310, 230423, 197657, 336929, 369701, 345132, 238639, 312373, 238651, 230463, 377926, 238664, 296019, 353367, 156764, 156765, 304222, 230499, 279660, 173166, 156785, 312434, 377972, 353397, 279672, 337017, 377983, 279685, 402565, 222343, 386189, 296086, 238743, 296092, 238765, 279728, 238769, 402613, 230588, 279747, 353479, 353481, 402634, 353482, 279760, 189652, 189653, 419029, 279765, 148696, 296153, 279774, 304351, 304356, 222440, 328940, 279792, 353523, 386294, 386301, 320770, 386306, 279814, 312587, 328971, 353551, 320796, 222494, 304421, 353584, 345396, 386359, 116026, 378172, 222524, 279875, 312648, 230729, 337225, 304456, 222541, 296270, 238927, 353616, 296273, 222559, 378209, 230756, 386412, 230765, 296303, 279920, 312689, 296307, 116084, 181625, 337281, 148867, 378244, 296329, 296335, 230799, 9619, 370071, 279974, 173491, 304564, 279989, 353719, 296375, 296387, 361927, 296392, 296391, 280010, 370123, 148940, 280013, 312782, 222675, 353750, 239068, 280032, 271843, 280041, 296425, 361963, 329197, 329200, 296433, 321009, 280055, 288249, 296448, 230913, 230921, 329225, 296461, 149007, 304656, 329232, 370197, 230943, 402985, 394794, 230959, 312880, 288309, 312889, 288318, 280130, 124485, 288326, 288327, 280147, 239198, 99938, 312940, 222832, 247416, 288378, 337534, 337535, 263809, 288392, 239250, 419478, 345752, 255649, 206504, 321199, 198324, 296628, 337591, 321207, 296632, 280251, 321219, 280267, 403148, 9936, 313041, 9937, 370388, 272085, 345814, 280278, 280280, 18138, 67292, 345821, 321247, 321249, 345833, 345834, 288491, 280300, 239341, 313065, 419569, 67315, 173814, 313081, 124669, 288512, 288516, 280327, 280329, 321295, 321302, 345879, 116505, 321310, 255776, 313120, 247590, 362283, 378668, 280366, 296755, 280372, 321337, 345919, 436031, 403267, 280390, 345929, 18262, 362327, 280410, 370522, 345951, 362337, 345955, 296806, 288619, 288620, 280430, 214895, 313199, 362352, 313203, 124798, 182144, 305026, 67463, 329622, 337815, 124824, 214937, 239514, 247712, 436131, 354212, 436137, 362417, 124852, 288697, 362431, 214977, 280514, 280519, 214984, 362443, 247757, 231375, 280541, 329695, 436191, 313319, 337895, 247785, 296941, 436205, 329712, 362480, 313339, 43014, 354316, 313357, 182296, 305179, 313375, 239650, 354343, 354345, 223274, 124975, 346162, 124984, 288828, 436285, 288833, 288834, 436292, 403525, 313416, 280649, 436301, 354385, 338001, 338003, 223316, 280661, 329814, 223318, 338007, 354393, 288857, 280675, 280677, 43110, 321637, 313447, 436329, 288879, 223350, 280694, 288889, 215164, 313469, 215166, 280712, 141450, 215178, 346271, 436383, 362659, 239793, 125109, 182456, 280762, 223419, 379071, 280768, 149703, 338119, 346314, 280778, 321745, 280795, 387296, 280802, 379106, 338150, 346346, 321772, 125169, 338164, 436470, 157944, 125183, 149760, 411906, 125188, 313608, 125193, 125198, 272658, 125203, 125208, 305440, 125217, 338218, 321840, 379186, 125235, 280887, 125240, 321860, 280902, 182598, 289110, 215385, 379225, 272729, 354655, 321894, 280939, 354676, 199029, 436608, 362881, 248194, 240002, 436611, 280961, 395659, 395661, 240016, 108944, 190871, 149916, 420253, 141728, 289189, 108972, 272813, 338356, 436661, 281037, 289232, 281040, 256477, 281072, 174593, 420369, 223767, 289304, 223769, 207393, 182817, 289332, 174648, 338489, 338490, 322120, 281166, 281171, 297560, 354911, 436832, 436834, 191082, 313966, 420463, 281199, 346737, 313971, 346740, 420471, 330379, 133774, 330387, 117396, 117397, 346772, 330388, 264856, 314009, 289434, 346779, 338613, 166582, 289462, 314040, 158394, 199366, 363211, 289502, 363230, 264928, 338662, 330474, 346858, 289518, 199414, 35583, 363263, 191235, 322313, 322316, 117517, 322319, 166676, 207640, 281377, 289576, 191283, 273207, 289598, 281408, 420677, 281427, 281433, 322395, 330609, 174963, 207732, 158593, 240518, 224145, 355217, 256922, 289690, 289698, 420773, 289703, 363438, 347055, 289727, 273344, 330689, 363458, 379844, 19399, 52172, 183248, 338899, 330708, 248796, 248797, 207838, 347103, 314342, 289774, 183279, 347123, 314355, 240630, 314362, 257024, 330754, 134150, 322570, 330763, 322582, 281625, 281626, 175132, 248872, 322612, 207938, 314448, 339030, 281697, 314467, 281700, 257125, 322663, 207979, 273515, 404593, 363641, 363644, 150657, 248961, 330888, 363669, 339100, 380061, 339102, 199839, 429214, 330913, 306338, 265379, 249002, 306346, 3246, 421048, 208058, 339130, 265412, 290000, 298208, 363744, 298212, 298213, 290022, 330984, 298221, 298228, 216315, 208124, 388349, 363771, 437505, 322824, 257305, 126237, 339234, 199971, 372009, 412971, 298291, 306494, 216386, 224586, 372043, 331090, 314709, 314710, 372054, 159066, 224606, 314720, 142689, 281957, 281962, 306542, 380271, 314739, 208244, 249204, 290173, 306559, 224640, 314751, 314758, 388487, 298374, 314760, 142729, 281992, 314766, 306579, 282007, 290207, 314783, 314789, 282022, 314791, 396711, 396712, 282024, 241066, 314798, 380337, 380338, 150965, 380357, 339398, 306631, 306639, 413137, 429542, 191981, 282096, 306673, 306677, 191990, 290300, 290301, 282114, 372227, 306692, 306693, 323080, 192010, 323087, 282129, 175639, 388632, 282136, 396827, 282141, 134686, 282146, 306723, 347694, 290358, 265798, 282183, 265804, 396882, 290390, 306776, 44635, 396895, 323172, 282213, 323178, 224883, 314998, 323196, 175741, 339584, 192131, 282245, 282246, 224901, 290443, 323217, 282259, 282271, 282273, 282276, 298661, 323236, 282280, 298667, 224946, 306874, 110268, 224958, 323263, 282303, 274115, 306890, 241361, 282327, 298712, 216795, 298720, 282339, 12010, 282348, 282355, 323316, 282358, 175873, 323331, 323332, 339715, 216839, 339720, 282378, 372496, 323346, 249626, 282400, 339745, 241441, 315171, 257830, 421672, 159533, 282417, 200498, 282427, 315202, 282434, 307011, 282438, 307025, 216918, 241495, 307031, 282474, 282480, 241528, 315264, 339841, 282504, 315273, 315274, 110480, 184208, 372626, 380821, 282518, 282519, 44952, 298909, 118685, 298920, 200627, 323507, 290745, 290746, 274371, 151497, 372701, 298980, 380908, 282612, 282633, 241692, 307231, 102437, 315432, 102445, 233517, 176175, 282672, 241716, 159807, 225351, 315465, 315476, 307289, 200794, 315487, 356447, 45153, 307301, 315497, 315498, 438377, 299121, 233589, 266357, 422019, 241808, 323729, 381073, 233636, 299174, 299187, 405687, 184505, 299198, 258239, 389313, 299203, 299209, 372941, 282831, 266449, 356576, 176362, 307435, 438511, 233715, 381172, 184570, 168188, 184575, 381208, 282909, 299293, 151839, 282913, 233762, 217380, 282919, 151847, 332083, 332085, 332089, 315706, 282939, 241986, 438596, 332101, 323913, 348492, 323916, 323920, 250192, 348500, 168281, 332123, 332127, 323935, 242023, 242029, 160110, 242033, 291192, 340357, 225670, 242058, 373134, 291224, 242078, 283038, 61857, 315810, 315811, 61859, 381347, 340398, 61873, 61880, 283064, 291267, 127427, 283075, 127428, 324039, 373197, 176601, 242139, 160225, 242148, 291311, 233978, 291333, 340490, 283153, 258581, 291358, 283182, 283184, 234036, 315960, 348732, 242237, 70209, 348742, 70215, 348749, 381517, 332378, 201308, 111208, 184940, 373358, 389745, 209530, 291454, 373375, 184962, 152195, 348806, 152203, 184973, 316049, 111253, 316053, 111258, 111259, 176808, 299699, 299700, 422596, 422599, 291530, 225995, 225997, 242386, 226004, 226007, 422617, 422626, 226019, 234217, 299759, 234234, 299770, 299776, 242433, 291585, 430849, 234241, 209670, 291592, 226058, 234250, 62220, 234253, 422673, 430865, 291604, 234263, 422680, 283419, 234268, 234277, 283430, 234283, 152365, 234286, 422703, 234289, 422709, 152374, 234294, 242485, 160571, 234301, 430910, 160575, 160580, 234311, 234312, 299849, 283467, 381773, 234317, 201551, 234323, 234326, 234331, 242529, 349026, 357218, 234340, 234343, 275303, 201577, 234346, 308076, 242541, 234355, 234360, 209785, 234361, 177019, 185211, 308092, 398206, 234366, 291712, 234367, 234372, 381829, 226181, 226184, 316298, 308107, 308112, 349072, 234386, 234387, 234392, 209817, 324506, 324507, 390045, 234400, 185250, 234404, 324517, 283558, 185254, 234409, 275371, 316333, 234419, 373687, 234425, 234427, 234430, 349121, 234436, 234438, 373706, 316364, 234444, 234445, 234451, 234454, 234457, 340955, 234463, 340961, 234466, 234472, 234473, 324586, 234477, 340974, 234482, 316405, 349175, 201720, 127992, 234498, 357379, 234500, 234506, 324625, 234514, 308243, 316437, 201755, 234531, 300068, 357414, 234534, 234542, 300084, 234548, 324666, 234555, 308287, 234560, 21569, 234565, 349255, 234569, 218186, 300111, 341073, 234577, 234583, 439384, 234584, 234587, 250981, 300135, 300136, 316520, 275565, 357486, 316526, 144496, 234609, 275571, 300150, 291959, 300151, 234616, 398457, 160891, 341115, 300158, 234622, 234625, 349316, 349318, 275591, 234632, 234638, 373903, 169104, 177296, 234642, 308372, 185493, 119962, 300187, 300188, 119963, 283802, 234656, 234659, 234663, 300201, 300202, 275625, 226481, 373945, 283840, 259268, 283847, 62665, 283852, 283853, 259280, 316627, 333011, 357595, 234733, 234742, 128251, 316669, 439562, 292107, 242954, 414990, 251153, 177428, 349462, 226608, 382258, 300343, 382269, 226624, 193859, 226632, 177484, 406861, 259406, 234831, 251213, 120148, 283991, 357719, 374109, 218462, 292195, 333160, 284014, 243056, 316787, 357762, 112017, 234898, 259475, 275859, 112018, 357786, 251298, 333220, 316842, 374191, 210358, 284089, 292283, 415171, 292292, 300487, 300489, 284116, 366037, 210390, 210391, 210393, 226781, 144867, 316902, 54765, 251378, 308723, 300536, 300542, 210433, 366083, 292356, 259599, 316946, 308756, 398869, 374296, 374299, 308764, 349726, 431649, 349741, 169518, 431663, 194110, 235070, 349763, 218696, 292425, 276040, 128587, 333388, 366154, 276045, 243274, 333393, 300630, 128599, 235095, 243292, 333408, 300644, 374372, 317032, 415338, 243307, 54893, 325231, 276085, 366203, 325245, 235135, 194180, 415375, 276120, 276126, 153251, 300714, 210603, 415420, 333503, 218819, 259781, 333517, 276173, 333520, 333521, 333523, 325346, 276195, 153319, 325352, 284401, 276210, 300794, 325371, 276219, 194303, 300811, 284429, 276238, 284431, 243472, 366360, 284442, 325404, 276253, 325410, 341796, 399147, 431916, 284459, 300848, 317232, 276282, 259899, 276283, 325439, 276287, 276294, 153415, 276298, 341836, 415567, 325457, 317269, 341847, 284507, 350044, 300894, 128862, 284512, 284514, 276327, 292712, 325484, 423789, 292720, 325492, 276341, 300918, 341879, 317304, 333688, 276344, 194429, 112509, 55167, 325503, 333701, 243591, 243597, 325518, 333722, 350109, 292771, 415655, 333735, 284587, 292782, 243637, 276408, 276421, 276430, 301008, 153554, 276444, 219101, 292836, 292837, 276454, 317415, 276459, 325619, 432116, 333817, 292858, 415741, 333828, 358410, 399373, 317467, 145435, 292902, 325674, 227370, 309295, 129076, 276534, 243767, 358456, 227417, 194656, 309345, 227428, 276582, 194666, 276589, 260207, 432240, 227439, 333940, 284788, 292988, 292992, 194691, 333955, 415881, 104587, 235662, 325776, 276627, 317587, 276632, 284825, 284826, 333991, 333992, 284842, 153776, 129203, 227513, 301251, 309444, 227524, 276682, 227548, 194782, 301279, 317664, 211193, 227578, 243962, 375039, 309503, 194820, 375051, 325905, 325912, 309529, 211235, 432421, 211238, 358703, 358709, 260418, 227654, 227658, 276813, 325968, 6481, 366930, 6482, 366929, 6489, 391520, 276835, 383332, 416104, 383336, 276847, 285040, 317820, 211326, 317831, 227725, 178578, 252308, 293274, 285084, 121245, 317852, 285090, 375207, 342450, 293303, 276920, 293306, 276925, 293310, 416197, 129483, 342476, 317901, 326100, 285150, 227809, 358882, 342498, 334309, 227813, 391655, 195045, 432618, 375276, 309744, 301571, 276998, 342536, 186893, 342553, 416286, 375333, 293419, 244269, 375343, 23092, 375351, 277048, 244281, 301638, 309830, 293448, 55881, 416341, 309846, 244310, 416351, 268899, 277094, 39530, 277101, 277111, 301689, 244347, 277133, 326287, 375440, 334481, 227990, 318106, 318107, 342682, 285353, 285361, 318130, 383667, 293556, 342706, 342713, 285371, 285372, 285373, 285374, 39614, 334547, 203477, 318173, 375526, 285415, 342762, 342763, 293612, 129773, 277227, 154359, 228088, 432893, 162561, 285444, 383754, 310036, 285466, 326429, 293664, 326433, 400166, 293672, 318250, 318252, 285487, 375609, 285497, 293693, 162621, 162626, 277316, 252741, 318278, 277325, 293711, 244568, 244570, 301918, 293730, 351077, 342887, 400239, 310131, 277366, 228215, 277370, 269178, 400252, 359298, 359299, 260996, 277381, 113542, 228233, 392074, 228234, 56208, 293781, 318364, 310176, 310178, 310182, 293800, 236461, 326581, 326587, 326601, 359381, 433115, 343005, 130016, 64485, 277479, 326635, 203757, 187374, 383983, 277492, 318461, 293886, 277509, 293893, 277510, 433165, 384016, 146448, 277523, 277524, 293910, 433174, 252958, 310317, 252980, 203830, 359478, 277563, 302139, 359495, 277597, 113760, 302177, 392290, 253029, 285798, 228458, 15471, 351344, 187506, 285814, 285820, 392318, 187521, 384131, 285828, 302213, 285830, 253063, 302216, 228491, 228493, 285838, 162961, 326804, 187544, 285851, 351390, 302240, 343203, 253099, 253100, 318639, 367799, 294074, 113850, 277690, 64700, 228542, 228540, 302274, 367810, 343234, 244940, 228563, 195808, 310497, 195811, 228588, 253167, 302325, 204022, 228600, 228609, 261377, 245019, 253216, 277792, 130338, 130343, 277800, 113966, 261425, 351537, 286013, 286018, 113987, 15686, 146762, 294218, 294219, 318805, 425304, 294243, 163175, 327024, 327025, 327031, 318848, 179587, 294275, 253317, 384393, 368011, 318864, 318868, 318875, 310692, 245161, 310701, 286129, 286132, 228795, 425405, 302529, 302531, 163268, 163269, 425418, 310732, 302540, 64975, 310736, 327121, 228827, 286172, 310757, 187878, 343542, 343543, 286202, 359930, 286205, 302590, 228867, 253451, 253452, 359950, 65041, 146964, 253463, 204313, 302623, 286244, 245287, 245292, 278060, 286254, 196164, 56902, 286288, 179801, 196187, 147036, 343647, 286306, 310889, 204397, 138863, 188016, 188031, 294529, 229001, 310923, 188048, 425626, 229020, 302754, 245412, 229029, 40614, 40613, 40615, 278191, 286388, 286391, 384695, 319162, 327358, 286399, 212685, 302797, 212688, 384720, 302802, 245457, 286423, 278233, 278234, 294622, 278240, 212716, 212717, 360177, 229113, 286459, 278272, 319233, 311042, 360195, 278291, 278293, 294678, 278299, 286494, 294700, 409394, 319292, 360252, 360264, 188251, 376669, 245599, 237408, 425825, 425833, 417654, 188292, 253829, 40853, 294807, 376732, 311199, 319392, 294823, 327596, 294843, 188348, 237504, 294850, 384964, 163781, 344013, 212942, 212946, 24532, 294886, 253929, 327661, 311281, 311282 ]
312c8507e0e4d103427636c6a58bc30e9751b3f7
4f97adc5f118617e6bb9f6b242cba0f5f226c90b
/sortStringChars.swift
ac307771ada6393c048b08215078b5d16cf9db68
[]
no_license
porowskid/interview-solutions
21223c4c96040ba0be4e22312339228db05f8511
5487b0c96c5bcce6e0f06b4c1211e74b6c42f6f0
refs/heads/master
2021-01-20T00:16:55.955224
2017-04-23T02:44:10
2017-04-23T02:44:10
89,109,461
0
0
null
null
null
null
UTF-8
Swift
false
false
606
swift
func stringSort (str: String) -> String { var charsCounted = [Character: Int]() var sortedChars = [Character]() var outString = String() var orderlyChars = [Character]() if !str.isEmpty { for char in str.characters { if !charsCounted.keys.contains(char) { charsCounted[char] = 1 sortedChars.append(char) } else { charsCounted[char]!+=1 } } } else { return "Empty string, please provide a value." } orderlyChars = sortedChars.sorted() for char in sortedChars { outString.append(char) if let tmp = charsCounted[char] { outString.append(String(tmp)) } } return outString }
[ -1 ]
854459b5ac35edf51ec467b191865a5835013c92
da91587c89c1d06726ad4d9d6711310e85cde524
/TravelApp/PlacesTableView.swift
6e30fa6c02a53a243ab1e036e1de31fb33a7d574
[]
no_license
EEnglmeier/TravelApp
06b3e1a340e07d4ea04b89362ce1425dae9d49a9
67263a6d43a54df636e668776714c35a378bfbe3
refs/heads/master
2020-05-16T23:25:34.421466
2015-01-15T10:27:06
2015-01-15T10:27:06
27,879,271
0
0
null
null
null
null
UTF-8
Swift
false
false
3,067
swift
// // PlacesTableView.swift // TravelApp // // Created by Eli on 23.12.14. // Copyright (c) 2014 Eli. All rights reserved. // import UIKit class PlacesTableView: UIViewController,UITableViewDelegate,UITableViewDataSource{ var tableView:UITableView = UITableView() var selectedItems :[Marker] = [] override func viewDidLoad() { //Add and Configure TableView tableView.frame = CGRectMake(10, 75, 300, 400) tableView.dataSource = self tableView.delegate = self tableView.autoresizingMask = UIViewAutoresizing.FlexibleHeight tableView.allowsMultipleSelection = false tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell") tableView.reloadData() self.view.addSubview(tableView) //Add and Configure NavigationBar var navBar = UINavigationBar() navBar.frame = CGRectMake(self.view.bounds.minX,self.view.bounds.minY,self.view.bounds.width,70) navBar.backgroundColor = UIColor.grayColor() self.view.addSubview(navBar) super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if(!RouteModel.sharedInstance.allLocs.isEmpty){ tableView.allowsSelection = true return RouteModel.sharedInstance.allLocs.count} else{ tableView.allowsSelection = false; return 1; } } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { var cell:UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as UITableViewCell if(!RouteModel.sharedInstance.allLocs.isEmpty){ cell.textLabel.text = RouteModel.sharedInstance.allLocs[indexPath.item].name cell.detailTextLabel?.text = RouteModel.sharedInstance.allLocs[indexPath.item].address } else{ cell.textLabel.text = "No Places found" } return cell } func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { self.selectedItems.append(RouteModel.sharedInstance.allLocs[indexPath.row]) } func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) { self.selectedItems.removeObject(RouteModel.sharedInstance.allLocs[indexPath.row]) } func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { return !RouteModel.sharedInstance.allLocs.isEmpty } func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if(editingStyle == UITableViewCellEditingStyle.Delete && !RouteModel.sharedInstance.allLocs.isEmpty){ RouteModel.sharedInstance.allLocs.removeAtIndex(indexPath.row) } tableView.reloadData() } }
[ -1 ]
f40b05cadb703fb9b96ad97b4e12a0c17ad5aab4
ad90ce76b857f3492f213e224c8e1c794881c1db
/Twitter/HomeTableViewController.swift
aca9cd1353c19331a4ada1a38329d7e8a0eca090
[]
no_license
DameDollaForThree/SimpleTweet
c732aefd9dac03e6fd71862866d7eea469a65aa8
bd0c1c74c9d2c674d25d4027b3d44c4d6b208e5b
refs/heads/master
2023-04-08T18:14:45.759712
2021-04-21T19:38:28
2021-04-21T19:38:28
332,581,576
0
0
null
null
null
null
UTF-8
Swift
false
false
7,044
swift
// // HomeTableViewController.swift // Twitter // // Created by caijicang on 2021/4/13. // Copyright © 2021 Dan. All rights reserved. // import UIKit class HomeTableViewController: UITableViewController { // "var" can be changed; "let" cannot be changed. var tweetArray = [NSDictionary]() // store all the tweets in a dictionary var numberOfTweet: Int! let myRefreshControl = UIRefreshControl() override func viewDidLoad() { super.viewDidLoad() loadTweets() myRefreshControl.addTarget(self, action: #selector(loadTweets), for: .valueChanged) // "self" means the current screen tableView.refreshControl = myRefreshControl tableView.rowHeight = UITableView.automaticDimension tableView.estimatedRowHeight = 150 // 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 } // viewDidAppear is called everytime the view is appeared override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) self.loadTweets() } @objc func loadTweets() { numberOfTweet = 20 let myUrl = "https://api.twitter.com/1.1/statuses/home_timeline.json" let myParams = ["count": numberOfTweet] TwitterAPICaller.client?.getDictionariesRequest(url: myUrl, parameters: myParams, success: { (tweets: [NSDictionary]) in self.tweetArray.removeAll() // clean up our tweetArray // populate our tweet dictionary for tweet in tweets { self.tweetArray.append(tweet) } self.tableView.reloadData() // reload data after repopulating the table self.myRefreshControl.endRefreshing() // end refreshing after pulling, otherwise the spin will be there forever }, failure: { (Error) in print("Could not retrieve tweets! oh no!!") }) } func loadMoreTweets() { let myUrl = "https://api.twitter.com/1.1/statuses/home_timeline.json" numberOfTweet += 20 let myParams = ["count": numberOfTweet] // exactly the same API call as loadTweets() TwitterAPICaller.client?.getDictionariesRequest(url: myUrl, parameters: myParams, success: { (tweets: [NSDictionary]) in self.tweetArray.removeAll() // clean up our tweetArray for tweet in tweets { self.tweetArray.append(tweet) } self.tableView.reloadData() // reload data after repopulating the table }, failure: { (Error) in print("Could not retrieve tweets! oh no!!") }) } // When the user gets to the end of the page override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { // load more tweets if indexPath.row + 1 == tweetArray.count { loadMoreTweets() } } @IBAction func onLogout(_ sender: Any) { TwitterAPICaller.client?.logout() self.dismiss(animated: true, completion: nil) // dimiss myself (dismiss the current view / back to log in screen) UserDefaults.standard.set(false, forKey: "userLoggedIn") } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "tweetCell", for: indexPath) as! TweetCell // work with API // retrieve information from our tweet dictionary let user = tweetArray[indexPath.row]["user"] as! NSDictionary cell.userNameLabel.text = user["name"] as? String cell.tweetContent.text = tweetArray[indexPath.row]["text"] as? String // image let imageUrl = URL(string: (user["profile_image_url_https"]) as! String) let data = try? Data(contentsOf: imageUrl!) if let imageData = data { cell.profileImageView.image = UIImage(data: imageData) } cell.setFavorite(tweetArray[indexPath.row]["favorited"] as! Bool) cell.tweetId = tweetArray[indexPath.row]["id"] as! Int cell.setRetweeted(tweetArray[indexPath.row]["retweeted"] as! Bool) return cell } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return tweetArray.count } /* 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. } */ }
[ 399197 ]
2e678d1142f221c0ed9bcc1262cfe3b450d58f2d
a30feb43bb98ff10d2aa171a726ebf85925fefbd
/Challenge77/Views/ImageDetailsView.swift
ff525a40cfc453fe784d70454a1a7678f5dddf8c
[]
no_license
LevitKanner/Challenge77
d2fe2983bf4a80174725d963c95c9303a819ffd6
9b17db4bc74d08de1ae07c5c2f65d51527595457
refs/heads/master
2020-09-28T19:22:27.049031
2019-12-10T14:17:30
2019-12-10T14:17:30
226,845,296
0
0
null
null
null
null
UTF-8
Swift
false
false
1,468
swift
// // ImageDetailsView.swift // Challenge77 // // Created by Levit Kanner on 09/12/2019. // Copyright © 2019 Levit Kanner. All rights reserved. // import SwiftUI struct ImageDetailsView: View { @State var image: ImageModel @State var viewDisplayed = 0 var segments = ["Photo", "Map"] var body: some View { GeometryReader{ geometry in if self.viewDisplayed == 0{ VStack{ Text(self.image.name.uppercased()) .font(.largeTitle) .padding() Divider() self.image.image .resizable() .scaledToFit() .frame(maxWidth: geometry.size.width) Spacer() } }else { MapView(location: self.image.location!) .edgesIgnoringSafeArea(.all) } } .navigationBarItems(trailing: Picker(selection: $viewDisplayed.animation(Animation.easeInOut), label: Text("view"), content: { ForEach(0..<segments.count){ Text(self.segments[$0]) } }) .shadow(radius: 2) .pickerStyle(SegmentedPickerStyle())) .navigationBarBackButtonHidden(self.viewDisplayed == 1) } }
[ -1 ]
13359fb43bca291d473fb4c7174512c9fc3ef103
9ae5086d3c8c635e4bb7007b1f599de247a9e87a
/WebimClientLibrary/Implementation/MessageTrackerImpl.swift
0f6bba3b4e6593a5db669a040e8ce3128dd81e9c
[ "MIT" ]
permissive
OberemkovGrigoriy/webim-client-sdk-ios
5445c327cd0ea81bc4804371531c625f856c3d3e
b0eb9824bfccd2a066ed790306681750fcae67a7
refs/heads/master
2021-05-04T20:33:14.115526
2018-02-01T11:42:12
2018-02-01T11:42:12
119,822,044
0
0
null
2018-02-01T10:43:01
2018-02-01T10:43:01
null
UTF-8
Swift
false
false
25,302
swift
// // MessageTrackerImpl.swift // WebimClientLibrary // // Created by Nikita Lazarev-Zubov on 09.08.17. // Copyright © 2017 Webim. 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. // import Foundation /** - Author: Nikita Lazarev-Zubov - Copyright: 2017 Webim */ final class MessageTrackerImpl { // MARK: - Properties let messageListener: MessageListener private let messageHolder: MessageHolder var idToHistoryMessageMap = [String: MessageImpl]() private var allMessageSourcesEnded = false private var cachedCompletionHandler: MessageHolderCompletionHandlerWrapper? private var cachedLimit: Int? private var destroyed: Bool? private var headMessage: MessageImpl? private var firstHistoryUpdateReceived: Bool? private var messagesLoading: Bool? // MARK: - Initialization init(messageListener: MessageListener, messageHolder: MessageHolder) { self.messageListener = messageListener self.messageHolder = messageHolder } // MARK: - Methods func addedNew(message: MessageImpl, of messageHolder: MessageHolder) { do { try message.getSource().assertIsCurrentChat() } catch { WebimInternalLogger.shared.log(entry: "Message which is being added is not a part of current chat: \(message.toString()).", verbosityLevel: .DEBUG) return } if (headMessage != nil) || allMessageSourcesEnded { addNewOrMerge(message: message, of: messageHolder) } else { var currentChatMessages = messageHolder.getCurrentChatMessages() currentChatMessages.append(message) messageHolder.set(currentChatMessages: currentChatMessages) // FIXME: Do it on endOfBatch only. if let completionHandler = cachedCompletionHandler { getNextUncheckedMessagesBy(limit: ((cachedLimit != nil) ? cachedLimit! : 0), completion: completionHandler.getCompletionHandler()) cachedCompletionHandler = nil } } } func addedNew(messages: [MessageImpl], of messageHolder: MessageHolder) { if (headMessage != nil) || allMessageSourcesEnded { for message in messages { addNewOrMerge(message: message, of: messageHolder) } } else { var currentChatMessages = messageHolder.getCurrentChatMessages() for message in messages { currentChatMessages.append(message) } messageHolder.set(currentChatMessages: currentChatMessages) if let completionHandler = cachedCompletionHandler { getNextUncheckedMessagesBy(limit: ((cachedLimit != nil) ? cachedLimit! : 0), completion: completionHandler.getCompletionHandler()) cachedCompletionHandler = nil } } } func changedCurrentChatMessage(from previousVersion: MessageImpl, to newVersion: MessageImpl, at index: Int, of messageHolder: MessageHolder) { do { try previousVersion.getSource().assertIsCurrentChat() } catch { WebimInternalLogger.shared.log(entry: "Message which is being changed is not a part of current chat: \(previousVersion.toString()).", verbosityLevel: .DEBUG) return } do { try newVersion.getSource().assertIsCurrentChat() } catch { WebimInternalLogger.shared.log(entry: "Replacement message for a current chat message is not a part of current chat: \(newVersion.toString()).", verbosityLevel: .DEBUG) return } if let headMessage = headMessage { if headMessage.getSource().isHistoryMessage() { if previousVersion == headMessage { self.headMessage = newVersion } messageListener.changed(message: previousVersion, to: newVersion) } else { let currentChatMessages = messageHolder.getCurrentChatMessages() for (currentChatMessageIndex, currentChatMessage) in currentChatMessages.enumerated() { if currentChatMessage.getID() == headMessage.getID() { if index >= currentChatMessageIndex { if previousVersion == headMessage { self.headMessage = newVersion } messageListener.changed(message: previousVersion, to: newVersion) } return } } } } } func deletedCurrentChat(message: MessageImpl, at index: Int, messageHolder: MessageHolder) { do { try message.getSource().assertIsCurrentChat() } catch { WebimInternalLogger.shared.log(entry: "Message which is being deleted is not a part of current chat: \(message.toString())", verbosityLevel: .DEBUG) } let currentChatMessages = messageHolder.getCurrentChatMessages() if let headMessage = headMessage { let headIndex = currentChatMessages.index(of: headMessage) ?? -1 if headMessage.getSource().isHistoryMessage() || (index > headIndex) { if headIndex == (index + 1) { self.headMessage = (currentChatMessages.count < headIndex) ? nil : currentChatMessages[headIndex] } messageListener.removed(message: message) } } } func endedHistoryBatch() { if firstHistoryUpdateReceived != true { firstHistoryUpdateReceived = true if let completionHandler = cachedCompletionHandler { getNextUncheckedMessagesBy(limit: ((cachedLimit != nil) ? cachedLimit! : 0), completion: completionHandler.getCompletionHandler()) cachedCompletionHandler = nil } } } func deletedHistoryMessage(withID messageID: String) { guard let message = idToHistoryMessageMap[messageID] else { return } idToHistoryMessageMap[messageID] = nil if let headMessage = headMessage { if headMessage.getSource().isHistoryMessage() && (message.getTimeInMicrosecond() >= headMessage.getTimeInMicrosecond()) { messageListener.removed(message: message) } } } func changedHistory(message: MessageImpl) { do { try message.getSource().assertIsHistory() } catch { WebimInternalLogger.shared.log(entry: "Message which is being changed is not a part of history: \(message.toString()).", verbosityLevel: .DEBUG) } if let headMessage = headMessage { if headMessage.getSource().isHistoryMessage() && (message.getTimeInMicrosecond() >= headMessage.getTimeInMicrosecond()) { let previousMessage: MessageImpl? = idToHistoryMessageMap[message.getHistoryID()!.getDBid()] idToHistoryMessageMap[message.getHistoryID()!.getDBid()] = message if previousMessage != nil { messageListener.changed(message: previousMessage!, to: message) } else { WebimInternalLogger.shared.log(entry: "Unknown message was changed: \(message.toString())", verbosityLevel: .DEBUG) } } } } func addedHistory(message: MessageImpl, before id: HistoryID?) { do { try message.getSource().assertIsHistory() } catch { WebimInternalLogger.shared.log(entry: "Message which is being added is not a part of history: \(message.toString()).", verbosityLevel: .DEBUG) } if headMessage != nil { if headMessage!.getSource().isHistoryMessage() { if let beforeID = id { if let beforeMessage = idToHistoryMessageMap[beforeID.getDBid()] { idToHistoryMessageMap[message.getHistoryID()!.getDBid()] = message messageListener.added(message: message, after: beforeMessage) } } else { idToHistoryMessageMap[message.getHistoryID()!.getDBid()] = message let currentChatMessages = messageHolder.getCurrentChatMessages() messageListener.added(message: message, after: (currentChatMessages.isEmpty ? nil : currentChatMessages.first!)) } } } } // For testing purposes. func set(messagesLoading: Bool) { self.messagesLoading = messagesLoading } // MARK: Private methods private func addNewOrMerge(message: MessageImpl, of messageHolder: MessageHolder) { do { try message.getSource().assertIsCurrentChat() } catch { WebimInternalLogger.shared.log(entry: "Message which is being added is not a part of current chat: \(message.toString()).", verbosityLevel: .DEBUG) return } var toCallMessageAdded = true var currentChatMessages = messageHolder.getCurrentChatMessages() if headMessage == nil { headMessage = message } else if (headMessage!.getTimeInMicrosecond()) > message.getTimeInMicrosecond() { toCallMessageAdded = false currentChatMessages.append(message) } else { for (historyID, historyMessage) in idToHistoryMessageMap { if message.getID() == historyMessage.getID() { toCallMessageAdded = false let replacingMessage = historyMessage.transferToCurrentChat(message: message) currentChatMessages.append(replacingMessage) if (replacingMessage != historyMessage) { messageListener.changed(message: historyMessage, to: replacingMessage) } idToHistoryMessageMap[historyID] = nil break } } } if toCallMessageAdded { for (currentChatMessageIndex, currentChatMessage) in currentChatMessages.enumerated() { if currentChatMessage.getID() == message.getID() { currentChatMessages[currentChatMessageIndex] = message messageListener.changed(message: currentChatMessage, to: message) messageHolder.set(currentChatMessages: currentChatMessages) break } } currentChatMessages.append(message) if let messageToSend = getToSendMirrorOf(message: message, of: messageHolder) { messageListener.changed(message: messageToSend, to: message) } else { let messagesToSend = messageHolder.getMessagesToSend() messageListener.added(message: message, after: (messageHolder.getMessagesToSend().isEmpty ? nil : messagesToSend.first!)) } } messageHolder.set(currentChatMessages: currentChatMessages) } private func getToSendMirrorOf(message: MessageImpl, of messageHolder: MessageHolder) -> MessageToSend? { let messagesToSend = messageHolder.getMessagesToSend() for messageToSend in messagesToSend { if messageToSend.getID() == message.getID() { return messageToSend } } return nil } private func getNextUncheckedMessagesBy(limit: Int, completion: @escaping ([Message]) -> ()) { let completionHandler = { [weak self] (messages: [Message]) -> () in self?.receive(messages: messages as! [MessageImpl], limit: limit, completion: completion) self?.messagesLoading = false } if headMessage != nil { messageHolder.getMessagesBy(limit: limit, before: headMessage!, completion: completionHandler) } else { messageHolder.getLatestMessages(byLimit: limit, completion: completionHandler) } } private func receive(messages: [MessageImpl], limit: Int, completion: @escaping ([Message]) -> ()) { var result: [MessageImpl]? // FIXME: Refactor this. if !messages.isEmpty { let currentChatMessages = messageHolder.getCurrentChatMessages() if !currentChatMessages.isEmpty { if (messages.last!.getTime() >= currentChatMessages.first!.getTime()) { // We received history that overlap current chat messages. Merging. var filteredMessages = [MessageImpl]() let firstMessage = messages.first! for message in messages { var addToFilteredMessages = true if message.getSource().isHistoryMessage() { let messageTime = message.getTime() if (messageTime >= currentChatMessages.first!.getTime()) && (messageTime <= currentChatMessages.last!.getTime()) { for currentChatMessage in currentChatMessages { if currentChatMessage.getID() == message.getID() { addToFilteredMessages = false currentChatMessage.setSecondaryHistory(historyEquivalentMessage: message) break } } } } if addToFilteredMessages { filteredMessages.append(message) } } if filteredMessages.isEmpty { messageHolder.getMessagesBy(limit: limit, before: firstMessage, completion: completion) return } result = filteredMessages } else { result = messages } } else { result = messages } for message in messages { if message.getSource().isHistoryMessage() { idToHistoryMessageMap[message.getHistoryID()!.getDBid()] = message } } let firstMessage = result!.first! // FIXME: Refactor this. if headMessage == nil { headMessage = firstMessage } else if firstMessage.getTimeInMicrosecond() < headMessage!.getTimeInMicrosecond() { headMessage = firstMessage } } else { result = messages allMessageSourcesEnded = true } completion(result!) } } // MARK: - MessageTracker extension MessageTrackerImpl: MessageTracker { func getLastMessages(byLimit limitOfMessages: Int, completion: @escaping ([Message]) -> ()) throws { try messageHolder.checkAccess() guard destroyed != true else { WebimInternalLogger.shared.log(entry: "MessageTracker object is destroyed. Unable to perform request to get new messages.") completion([Message]()) return } guard messagesLoading != true else { WebimInternalLogger.shared.log(entry: "Messages are already loading. Unable to perform a second request to get new messages.") completion([Message]()) return } guard limitOfMessages > 0 else { WebimInternalLogger.shared.log(entry: "Limit of messages to perform request to get new messages must be greater that zero. Passed value – \(limitOfMessages).") completion([Message]()) return } let currentChatMessages = messageHolder.getCurrentChatMessages() if currentChatMessages.isEmpty { messagesLoading = true cachedCompletionHandler = MessageHolderCompletionHandlerWrapper(completionHandler: completion) cachedLimit = limitOfMessages messageHolder.getHistoryStorage().getLatestHistory(byLimit: limitOfMessages) { [weak self] messages in if let cachedCompletionHandler = self?.cachedCompletionHandler, !messages.isEmpty { self?.firstHistoryUpdateReceived = true let completionHandlerToPass = cachedCompletionHandler.getCompletionHandler() self?.receive(messages: messages as! [MessageImpl], limit: limitOfMessages, completion: completionHandlerToPass) self?.cachedCompletionHandler = nil self?.messagesLoading = false } } } else { let result = Array(currentChatMessages.suffix(limitOfMessages)) headMessage = result.first completion(result) } } func getNextMessages(byLimit limitOfMessages: Int, completion: @escaping ([Message]) -> ()) throws { try messageHolder.checkAccess() guard destroyed != true else { WebimInternalLogger.shared.log(entry: "MessageTracker object is destroyed. Unable to perform request to get new messages.") completion([Message]()) return } guard messagesLoading != true else { WebimInternalLogger.shared.log(entry: "Messages are already loading. Unable to perform a second request to get new messages.") completion([Message]()) return } guard limitOfMessages > 0 else { WebimInternalLogger.shared.log(entry: "Limit of messages to perform request to get new messages must be greater that zero. Passed value – \(limitOfMessages).") completion([Message]()) return } messagesLoading = true let currentChatMessages = messageHolder.getCurrentChatMessages() if (firstHistoryUpdateReceived == true) || (!currentChatMessages.isEmpty && (currentChatMessages.first != headMessage)) { getNextUncheckedMessagesBy(limit: limitOfMessages, completion: completion) } else { cachedCompletionHandler = MessageHolderCompletionHandlerWrapper(completionHandler: completion) cachedLimit = limitOfMessages messageHolder.getHistoryStorage().getLatestHistory(byLimit: limitOfMessages) { [weak self] messages in if let cachedCompletionHandler = self?.cachedCompletionHandler, !messages.isEmpty { self?.firstHistoryUpdateReceived = true let completionHandlerToPass = cachedCompletionHandler.getCompletionHandler() self?.receive(messages: messages as! [MessageImpl], limit: limitOfMessages, completion: completionHandlerToPass) self?.cachedCompletionHandler = nil self?.messagesLoading = false } } } } func getAllMessages(completion: @escaping ([Message]) -> ()) throws { try messageHolder.checkAccess() guard destroyed != true else { WebimInternalLogger.shared.log(entry: "MessageTracker object is destroyed. Unable to perform request to get new messages.") completion([Message]()) return } messageHolder.getHistoryStorage().getFullHistory(completion: completion) } func resetTo(message: Message) throws { try messageHolder.checkAccess() guard destroyed != true else { WebimInternalLogger.shared.log(entry: "MessageTracker object was destroyed. Unable to perform a request to reset to a message.") return } guard messagesLoading != true else { WebimInternalLogger.shared.log(entry: "Messages is loading. Unable to perform a simultaneous request to reset to a message.") return } let unwrappedMessage = message as! MessageImpl if unwrappedMessage != headMessage { messageHolder.set(reachedEndOfLocalHistory: false) } if unwrappedMessage.getSource().isHistoryMessage() { var newIDToHistoryMessageMap = [String: MessageImpl]() for (id, iteratedMessage) in idToHistoryMessageMap { if iteratedMessage.getTimeInMicrosecond() >= unwrappedMessage.getTimeInMicrosecond() { newIDToHistoryMessageMap[id] = iteratedMessage } } idToHistoryMessageMap = newIDToHistoryMessageMap } else { idToHistoryMessageMap.removeAll() } headMessage = unwrappedMessage } func destroy() throws { try messageHolder.checkAccess() if destroyed != true { destroyed = true messageHolder.set(messagesToSend: [MessageToSend]()) messageHolder.set(messageTracker: nil) } } }
[ -1 ]
b1a05fb027cf685132d930505cf24b8241ecb094
47232492b813dbfdc281c7a6d42fb6ac638dc4eb
/UpaxApp/Models/Protocols.swift
a0216d68c93666441dd5b2daf3c1a89af7b4e1e7
[]
no_license
lemini10/UpaxApp
392262c60c90cc09eca05186ca9fd81afa845f6b
57e660f1b2d82482f3205ef0c941deea94259f02
refs/heads/main
2022-12-23T10:23:13.025641
2020-10-05T07:33:14
2020-10-05T07:33:14
301,329,540
0
0
null
null
null
null
UTF-8
Swift
false
false
967
swift
// // Utils.swift // UpaxApp // // Created by Luis Roberto Blancas Lemini on 04/10/20. // Copyright © 2020 Luis Roberto Blancas Lemini. All rights reserved. // import UIKit protocol CameraCellDelegate: AnyObject { func showImagePicker(vc: UIImagePickerController) } protocol TableCameraCellDelegate: AnyObject { func showImage(image: UIImage) } protocol NameCellDelegate: AnyObject{ func nameCellDelegate(didChangeString text: String) } protocol PhotoCellDelegate: AnyObject{ func photoCellDelegate(didDownloadImage image: UIImage) } protocol NumberCellDelegate: AnyObject{ func numberCellDelegate(didChangeNumber number: String) } protocol BirthdayCellDelegate: AnyObject{ func birthdayCellDelegate(didChangeBirthday birthday: Date) } protocol SexCellDelegate: AnyObject { func sexCellDelegate(didChangeSex sex: Sex) } protocol ColorCellDelegate: AnyObject { func colorCellDelegate(didChangeColor color: Color) }
[ -1 ]
4ddc2809dad809dc6a2f78cea66d40f6ac54ffce
8f7e3a507a3e096745731eb6dfe4317a3d906819
/Chapter4/AutoLayout/Exercise9/Exercise9/HomeViewController.swift
fb9bd5d38d8a7e3a702b9dd432d69cfcb120da9b
[]
no_license
suho/learn-swift
64b7561f474f8494519a72469d14ce595278bd8b
72e67d9480a48dba60b958f59f39712a8865eaf4
refs/heads/master
2021-06-08T06:16:43.924389
2016-10-06T03:51:53
2016-10-06T03:51:53
61,185,691
1
0
null
null
null
null
UTF-8
Swift
false
false
869
swift
// // HomeViewController.swift // Exercise9 // // Created by Mylo Ho on 6/23/16. // Copyright © 2016 Ho Van Su. All rights reserved. // import UIKit class HomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ 298202, 298204, 298206, 298207 ]
d36b80a499f69945ab81b8e7ad9dd07ad77b277c
fd4a5ba59d5e745ba4e01b398debccb19165c4bc
/Practices/ITime/ITime/Code/Features/Target/Chats/RectangleChart.swift
9fc7d85171944242c4f10dc9aca173241a027178
[]
no_license
Jyhwenchai/SwiftUIExample
a644e2a22cb29e5c17fc4c6705382899a8803050
b8c509db7a9d6787492a484fe67302370721ca7e
refs/heads/master
2023-08-30T20:25:09.267669
2023-08-28T08:01:34
2023-08-28T08:01:34
249,932,726
2
0
null
null
null
null
UTF-8
Swift
false
false
1,536
swift
// // RectangleChart.swift // ITime // // Created by 蔡志文 on 5/29/23. // import SwiftUI import Charts struct RectangleChart: View { var body: some View { List { Section { Chart(sales) { item in RectangleMark(x: .value("name", item.name), y: .value("sales", item.sales)) } .frame(height: 300) } header: { Text("折线") } Section { Chart(sales) { item in RectangleMark(x: .value("sales", item.sales), y: .value("name", item.name)) } .frame(height: 300) } header: { Text("折线水平布局") } Section { Chart(salesSeries) { series in ForEach(series.salesSummaries) { element in RectangleMark( x: .value("Day", element.weekday, unit: .day), y: .value("Sales", element.sales) ) .foregroundStyle(by: .value("City", series.city)) .symbol(by: .value("City", series.city)) } } .frame(height: 300) .chartYAxis { AxisMarks(position: .leading) } .chartXAxis { AxisMarks(values: .stride(by: .day)) { value in AxisGridLine().foregroundStyle(.orange) AxisValueLabel(format: .dateTime.weekday(), centered: true) } } } header: { Text("多条折线") } } } } struct RectangleChart_Previews: PreviewProvider { static var previews: some View { RectangleChart() } }
[ -1 ]
30c81dd320831f1e36523c9b8aa5d209512509b6
d558bed269362e8e141958fb340ae56a6359da66
/Events/ImagePicker/ImagePickerView.swift
30d8f86db4d2e80c7499856e775e3499e9ee5728
[]
no_license
andriyanovDS/Events
d017b869d5f54cd5007c7cbea7fdf8d668fe2d09
e2fa09fb887ff7cbd9a03f3026a745b973e15ddd
refs/heads/master
2022-08-23T02:51:07.398387
2020-05-16T21:02:33
2020-05-16T21:14:22
196,846,349
0
0
null
2020-05-14T21:11:48
2019-07-14T14:28:50
Swift
UTF-8
Swift
false
false
10,455
swift
// // ImagePickerView.swift // Events // // Created by Дмитрий Андриянов on 23/08/2019. // Copyright © 2019 Дмитрий Андриянов. All rights reserved. // import UIKit import Stevia class ImagePickerView: UIView { var actionsView: ImagePickerActionsView! let closeButton = UIButton() var state: ImagePickerState let collectionView: UICollectionView let backgroundView = UIView() private let dataSource: ImagePickerViewDataSource private let layout: ImagePickerCollectionViewLayout private let contentView = UIView() private let containerView = UIView() private let onSelectImageSource: (ImageSource) -> Void private let onConfirmSendImages: () -> Void struct Constants { static let imageSize = CGSize(width: 100, height: 90) static let actionButtonHeight: CGFloat = 50.0 } init( dataSource: ImagePickerViewDataSource, onSelectImageSource: @escaping (ImageSource) -> Void, onConfirmSendImages: @escaping () -> Void ) { self.dataSource = dataSource self.onSelectImageSource = onSelectImageSource self.onConfirmSendImages = onConfirmSendImages let selectedAssetCount = dataSource.selectedAssetIndices.count state = .makeFromSelectedAssetsCount(selectedAssetCount) layout = ImagePickerCollectionViewLayout(cellSize: Constants.imageSize) collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) super.init(frame: CGRect.zero) setupView() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } func animateAppearance() { contentView.transform = CGAffineTransform(translationX: 0, y: contentView.frame.height) UIView.animate(withDuration: 0.2, animations: { self.contentView.transform = .identity }) } func animateDisappearance(completion: @escaping () -> Void) { UIView.animate( withDuration: 0.2, animations: { self.contentView.transform = CGAffineTransform( translationX: 0, y: self.contentView.frame.height ) }, completion: { _ in completion() } ) } func scrollToCell(at index: Int, scale: CGFloat) { let offset = contentOffset(forCellAt: index, scale: scale) collectionView.setContentOffset(offset, animated: scale == 1.0) } func showCollectionView() { let insets = collectionView.contentInset let collectionViewPreviewHeight = Constants.imageSize.height + insets.top + insets.bottom let collectionViewHeight = state == .preview ? collectionViewPreviewHeight : state.scale * collectionViewPreviewHeight collectionView.heightConstraint?.constant = collectionViewHeight collectionView.contentOffset = CGPoint(x: -insets.left, y: insets.top) layoutIfNeeded() } func onImageDidSelected(at index: Int) { let selectedAssetIndices = dataSource.selectedAssetIndices updateCellSelectionCount(selectedAssetIndices: selectedAssetIndices) let currentState = state state = .makeFromSelectedAssetsCount(selectedAssetIndices.count) changeFirstAction() if (state == .preview) != (currentState == .preview) { changeCollectionHeight(andFocusAt: index) return } self.scrollToCell(at: index, scale: 1.0) } private func handleSelectedAction(_ action: ImagePickerActionsView.ImagePickerAction) { switch action { case .openCamera: onSelectImageSource(.camera) case .openLibrary: onSelectImageSource(.library) case .selectImages: onConfirmSendImages() } } private func setupView() { backgroundColor = .clear backgroundView.backgroundColor = UIColor.backgroundInverted.withAlphaComponent(0.4) setupCollectionView() setupCloseButton() actionsView = ImagePickerActionsView(actionHandler: {[unowned self] action in self.handleSelectedAction(action) }) actionsView.setupActions(actions: ImageSource.allCases.map { ImagePickerActionsView.ImagePickerAction.makeActionByImageSource($0) }) containerView.layer.cornerRadius = 10 containerView.clipsToBounds = true containerView.sv(collectionView, actionsView) contentView.sv([containerView, closeButton]) sv(backgroundView, contentView) contentView.left(10).right(10).Bottom == safeAreaLayoutGuide.Bottom closeButton.left(0).right(0).bottom(0).height(Constants.actionButtonHeight) collectionView.left(0).right(0).height(0).top(0).Bottom == actionsView.Top actionsView.left(0).right(0).bottom(0) containerView.left(0).right(0).top(0).Bottom == closeButton.Top - 15 backgroundView.fillContainer() } private func setupCollectionView() { layout.scrollDirection = .horizontal layout.minimumInteritemSpacing = 6 collectionView.style { v in v.contentInset = UIEdgeInsets( top: 5, left: 5, bottom: 5, right: 5 ) v.showsVerticalScrollIndicator = false v.showsHorizontalScrollIndicator = false v.backgroundColor = .background v.register(ImagePreviewCell.self, forCellWithReuseIdentifier: ImagePreviewCell.reuseIdentifier) } } private func setupCloseButton() { let closeButtonTitle = NSLocalizedString( "Close", comment: "Image picker: close" ) styleText( button: closeButton, text: closeButtonTitle, size: 20, color: .blueButtonBackground, style: .bold ) closeButton.backgroundColor = .background closeButton.layer.cornerRadius = 10 } private func changeCollectionHeight(andFocusAt activeIndex: Int) { let scale = state.scale let transform = CGAffineTransform(scaleX: scale, y: scale) let imageSize = layout.cellSize.applying(transform) layout.cellWidthForContentSizeCalculation = imageSize.width if scale > 1 { layout.invalidateLayout() layoutIfNeeded() } layout.cellSize = imageSize UIView.animate(withDuration: 0.2, animations: { self.collectionView.heightConstraint?.constant *= scale self.scrollToCell(at: activeIndex, scale: scale) self.layoutIfNeeded() }, completion: { _ in self.adjustCellSelectionButtonHorizontally() }) } private func changeFirstAction() { switch state { case .preview: actionsView.changeFirstAction(to: .openCamera) case .expanded(let selectedAssetsCount): actionsView.changeFirstAction(to: .selectImages(count: selectedAssetsCount)) } } } extension ImagePickerView { func adjustCellSelectionButtonHorizontally() { let cells = collectionView.visibleCells.compactMap { $0 as? ImagePreviewCell } let padding = ImagePreviewCell.Constants.selectionButtonPadding let rightmostIndex = rightmostCellIndex() for cell in cells { let indexPath = collectionView.indexPath(for: cell)! if indexPath.item == rightmostIndex { let nextPosition = selectionButtonOffset(forCellAt: indexPath.item) if nextPosition != -cell.selectButtonRightPadding { cell.setSelectButtonPosition(nextPosition) } continue } if cell.selectButtonRightPadding == padding { continue } cell.setSelectButtonPosition(padding) } } func selectionButtonOffset(forCellAt index: Int) -> CGFloat { let cellWidth = layout.cellSize.width let padding = ImagePreviewCell.Constants.selectionButtonPadding let cellTotalWidth = cellWidth + layout.minimumInteritemSpacing let scrollViewMaxX = collectionView.contentOffset.x + collectionView.bounds.width let cellMaxX = (CGFloat(index) * cellTotalWidth) + cellWidth if scrollViewMaxX > cellMaxX { return padding } let offset = abs(scrollViewMaxX - cellMaxX) var resultOffset: CGFloat = offset if offset + ImagePreviewCell.Constants.selectionButtonSize > cellWidth - padding { resultOffset = cellWidth - padding - ImagePreviewCell.Constants.selectionButtonSize } if offset < padding { resultOffset = padding } return resultOffset } private func rightmostCellIndex() -> Int { let maxX = collectionView.contentOffset.x + collectionView.bounds.width let index = Int(maxX / (layout.cellSize.width + layout.minimumLineSpacing)) let itemsInCollectionView = collectionView.numberOfItems(inSection: 0) if index >= itemsInCollectionView { return itemsInCollectionView - 1 } return index } private func contentOffset(forCellAt index: Int, scale: CGFloat) -> CGPoint { let top = -collectionView.adjustedContentInset.top if scale == 1 { if index == 0 { return CGPoint(x: 0, y: top) } if index == collectionView.numberOfItems(inSection: 0) - 1 { return CGPoint( x: collectionView.contentSize.width - collectionView.bounds.width, y: top ) } } let indexPath = IndexPath(item: index, section: 0) guard let attributes = collectionView.layoutAttributesForItem(at: indexPath) else { return CGPoint( x: collectionView.contentSize.width - collectionView.bounds.width, y: top ) } let frame = attributes.frame let totalSpacingWidth = CGFloat(index) * layout.minimumInteritemSpacing let scaledMinX = (abs(frame.minX) - totalSpacingWidth) * scale + totalSpacingWidth let imageCenterX = scaledMinX + (frame.width * scale) / 2 return CGPoint( x: imageCenterX - collectionView.bounds.width / 2, y: top ) } private func updateCellSelectionCount(selectedAssetIndices: [Int]) { let cells = collectionView.visibleCells.compactMap { $0 as? ImagePreviewCell } for cell in cells { let indexPath = collectionView.indexPath(for: cell)! let selectionIndex = selectedAssetIndices.firstIndex(of: indexPath.item).map { $0 + 1 } cell.setSelectionCount(selectionIndex) } } } enum ImagePickerState: Equatable { case preview, expanded(selectedAssetsCount: Int) static func makeFromSelectedAssetsCount(_ count: Int) -> Self { count == 0 ? .preview : .expanded(selectedAssetsCount: count) } var scale: CGFloat { let ratio = ImagePickerView.Constants.actionButtonHeight / ImagePickerView.Constants.imageSize.width switch self { case .preview: return 1 / (1 + ratio) case .expanded: return 1 + ratio } } } protocol ImagePickerViewDataSource: class { var selectedAssetIndices: [Int] { get } }
[ -1 ]
9e76be9c9ad1e8ea624703381268e8bbd361c4ec
2632dc55ebc456b52d717d97e29f50a126ca687f
/favorite-place/AppDelegate.swift
9e5d7d8ca143af5ba460bf3295a6daf29841bf9c
[]
no_license
arorasagar/yucca-valley-app
d3ef6a4158bcb55ff51a3352dd49202ba677f707
8d41502baf608e9efdee55831f7b5128fa5703f3
refs/heads/master
2021-01-01T05:04:20.744850
2016-05-24T04:26:23
2016-05-24T04:26:23
59,540,170
0
0
null
null
null
null
UTF-8
Swift
false
false
2,151
swift
// // AppDelegate.swift // favorite-place // // Created by Sagar Arora on 5/23/16. // Copyright © 2016 Sagar Arora . All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 352284, 278559, 229408, 278564, 294950, 229415, 229417, 237613, 229422, 229426, 237618, 229428, 286774, 204856, 229432, 286776, 319544, 286791, 237640, 278605, 286797, 311375, 237646, 163920, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 327814, 131209, 417930, 303241, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 320007, 172550, 172552, 303623, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 189039, 189040, 352880, 295538, 172655, 189044, 287349, 172656, 172660, 287355, 287360, 295553, 287365, 311942, 295557, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 303773, 164509, 287390, 295583, 172702, 230045, 172705, 287394, 172707, 303780, 287398, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 328384, 287427, 312006, 107208, 279241, 107212, 172748, 287436, 172751, 287440, 295633, 303827, 172755, 279255, 172760, 279258, 287450, 213724, 303835, 189149, 303838, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 295685, 230154, 33548, 312077, 295695, 295701, 369433, 230169, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 213902, 279438, 295822, 189329, 295825, 304019, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 304063, 238528, 304065, 189378, 213954, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 197645, 295949, 230413, 320528, 140312, 295961, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 304311, 230592, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 279788, 320748, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 296255, 312639, 230718, 296259, 378181, 238919, 296264, 320840, 230727, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 279929, 181626, 304505, 304506, 181631, 312711, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 279985, 173488, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 280021, 288214, 222676, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 296446, 402942, 206336, 296450, 321022, 230916, 230919, 214535, 370187, 304651, 304653, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 280260, 280264, 206536, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 321316, 304932, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 304968, 280393, 280402, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 313340, 288764, 239612, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 223327, 149599, 149601, 149603, 321634, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 215154, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 182517, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 223749, 305668, 281095, 223752, 150025, 338440, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 281210, 297594, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 240535, 289687, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 306555, 314747, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 224657, 306581, 314779, 314785, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 282410, 241450, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 159545, 298811, 307009, 413506, 241475, 307012, 148946, 315211, 282446, 307027, 315221, 282454, 323414, 241496, 315223, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 298860, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 241556, 298901, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 178273, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 184503, 307385, 307386, 258235, 176316, 307388, 307390, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 307510, 332086, 151864, 307512, 168245, 307515, 282942, 307518, 151874, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299440, 299444, 127413, 283062, 291254, 194660, 127417, 291260, 283069, 127421, 127424, 127429, 127431, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 127466, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 234003, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 299726, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 234264, 201496, 234266, 283421, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 292433, 234313, 316233, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 234393, 209818, 324504, 234396, 324508, 234398, 291742, 308123, 234401, 291747, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 291754, 226220, 324522, 234414, 324527, 291760, 234417, 201650, 324531, 291756, 226230, 234422, 324536, 275384, 234428, 291773, 226239, 234431, 242623, 234434, 324544, 324546, 226245, 234437, 234439, 324548, 234443, 291788, 193486, 275406, 193488, 234446, 234449, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 234563, 316483, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 275545, 234585, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 300148, 234614, 398455, 234618, 275579, 144506, 234620, 234623, 226433, 234627, 275588, 234629, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 308373, 275608, 234647, 234648, 234650, 308379, 283805, 324757, 234653, 300189, 234657, 324766, 324768, 119967, 283813, 234661, 242852, 234664, 300197, 275626, 234667, 316596, 308414, 234687, 316610, 300226, 234692, 283844, 300229, 308420, 308418, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 283904, 292097, 300289, 300292, 300294, 275719, 300299, 177419, 283917, 242957, 275725, 177424, 300301, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 316768, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 284076, 144812, 144814, 284084, 144820, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 259567, 300527, 308720, 226802, 316917, 308727, 292343, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 194103, 284218, 226877, 284223, 284226, 243268, 284228, 226886, 284231, 128584, 292421, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 284245, 284247, 300628, 235097, 243290, 284251, 284249, 284253, 300638, 284255, 317015, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 292470, 284278, 292473, 284283, 276093, 284286, 276095, 292479, 292481, 276098, 325250, 284288, 292485, 284290, 284292, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 317138, 358098, 284370, 284372, 284377, 276187, 284379, 284381, 284384, 284386, 358116, 276197, 317158, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358128, 358126, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 300832, 284449, 300834, 325408, 227109, 317221, 358183, 186151, 276268, 300845, 194351, 243504, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 178161, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 235581, 325692, 178238, 276544, 284739, 292934, 276553, 243785, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 194657, 227426, 276579, 309346, 309348, 227430, 276583, 350308, 309350, 276586, 309352, 350313, 350316, 276590, 301167, 227440, 350321, 284786, 276595, 301163, 350325, 350328, 292985, 301178, 292989, 301185, 317570, 350339, 292993, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 153765, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 276689, 227540, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 276713, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 277011, 309779, 309781, 317971, 55837, 227877, 227879, 293417, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 285265, 399955, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 334476, 326285, 318094, 318092, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 137889, 383658, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 318132, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 285453, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277314, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 277368, 236408, 15224, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 244731, 121850, 302075, 293882, 293887, 277504, 277507, 277511, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 7232, 310336, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 392326, 285831, 253064, 302218, 285835, 294026, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 285862, 277671, 302248, 64682, 277678, 294063, 228526, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 277807, 285999, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 310659, 294276, 351619, 327046, 277892, 253320, 277894, 318858, 310665, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 245191, 163272, 302534, 310727, 277959, 292968, 302541, 277963, 302543, 277966, 310737, 277971, 286169, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 212472, 40440, 278009, 286203, 40443, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 294435, 40484, 286246, 294439, 286248, 294440, 40486, 294443, 40488, 294445, 40491, 310831, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 228944, 400976, 212560, 40533, 147032, 40537, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40552, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 122517, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 278227, 229076, 286420, 319187, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 237409, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 40865, 294817, 319394, 294821, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 309354, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
9cee139d41c1ab7723a424fa9d610ac54e70e35f
563dd5caf38fa911059e2c98aa367e0f61481540
/PythiaStoryboard/PythiaStoryboard/SubConditionsViewController.swift
b33ec9bb556f05c67c63da6cce552522925b6b32
[]
no_license
yelouis/pythia_app
1dbf2f0af2c9100d86163220a44b7f9f5b311443
e0da0c318606336b4d21d8c3bbff7c4b516fc72c
refs/heads/master
2023-01-12T04:10:47.271838
2020-11-05T00:11:24
2020-11-05T00:11:24
280,035,097
1
0
null
null
null
null
UTF-8
Swift
false
false
8,845
swift
// // SubConditionsViewController.swift // PythiaStoryboard // // Created by Nathaniel Veimau (old comp) on 8/2/20. // Copyright © 2020 Pythia. All rights reserved. // import UIKit class SubConditionsViewController: UIViewController { //var subConditionView: SubConditionView { return self.view as! SubConditionView } var finalCondition : Condition? = nil //This will be passed back once a user has finished making their condition var leftButtonTitle : String = "Select Attribute" var rightButtonTitle : String = "Select Attribute" //buyWith = false means %, buyWith = true means # of shares var buyWith : Bool = true var clickedButton : String = "somethin" var ticker : String = "" var saveCondition : Bool = true var amount : Double = 0 var isBuyCondition : Bool = true var comparatorString : String = "" //var pctButton : RadioButton = RadioButton.init() //var dollarsButton : RadioButton = RadioButton.init() @IBOutlet weak var comparatorField: UITextField! @IBOutlet weak var buyAmountField: UITextField! @IBOutlet weak var leftB: UIButton! @IBOutlet weak var rightB: UIButton! @IBOutlet weak var firstBuyConditionView: UIView! func saveSubcondition(){ var newCondType : Int var newAmountType: Int if isBuyCondition == true{ newCondType = 0 } else { newCondType = 1 } if buyWith == true { newAmountType = 0 } else { newAmountType = 1 } var compOneName : String = leftButtonTitle.components(separatedBy: " ")[0] var periodOneName : String = leftButtonTitle.components(separatedBy: " ").dropFirst().joined() var compTwoName : String = rightButtonTitle.components(separatedBy: " ")[0] var periodTwoName : String = rightButtonTitle.components(separatedBy: " ").dropFirst().joined() var newCondition : Condition = Condition( subconditions: [ Subcondition( comparandOne: compOneName, periodOne: periodOneName, comparandTwo: compTwoName, periodTwo: periodTwoName, comparator: comparatorString )], amount: (buyAmountField.text! as NSString).doubleValue, condType: newCondType, amountType: newAmountType ) finalCondition = newCondition } @IBAction func cancelButton(_ sender: Any) { saveCondition = false performSegue(withIdentifier: "saveCondition", sender: self) } @IBAction func pctButton(_ sender: Any) { buyWith = false } @IBAction func numSharesButton(_ sender: Any) { buyWith = true } @IBAction func rightButton(_ sender: Any) { clickedButton = "right" comparatorString = comparatorField.text! performSegue(withIdentifier: "toVar", sender: self) } @IBAction func leftButton(_ sender: Any) { clickedButton = "left" comparatorString = comparatorField.text! performSegue(withIdentifier: "toVar", sender: self) } @IBAction func addAnd(_ sender: Any) { comparatorString = comparatorField.text! amount = Double(buyAmountField.text!) ?? 0 performSegue(withIdentifier: "toDoubleSubCondition", sender: self) } @IBAction func saveCondition(_ sender: Any) { saveSubcondition() performSegue(withIdentifier: "saveCondition", sender: self) } /* override func awakeFromNib() { self.view.layoutIfNeeded() //pctButton.isSelected = true //dollarsButton.isSelected = false } */ override func viewDidLoad() { super.viewDidLoad() leftB.setTitle(leftButtonTitle, for: .normal) rightB.setTitle(rightButtonTitle, for: .normal) comparatorField.text = comparatorString //pctButton.alternateButton = [dollarsButton] //dollarsButton.alternateButton = [pctButton] buyAmountField.text = String(amount) if finalCondition != nil{ if finalCondition!.condType == 0{ isBuyCondition = true } else { isBuyCondition = false } self.amount = finalCondition!.amount if finalCondition!.amountType == 0 { buyWith = false } else { buyWith = true } //Sets subconditon leftButtonTitle = finalCondition!.subconditions![0].comparandOne rightButtonTitle = finalCondition!.subconditions![0].comparandTwo comparatorString = finalCondition!.subconditions![0].comparator //Need to unpack subconditions of finalCondition } //Check if finalCondition contains anything, if it does, set all the local variables equal to the ones stored in finalCondition } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "saveCondition" && saveCondition { let vc = segue.destination as! NewAlgorithmViewController if isBuyCondition == true { vc.buyConditionsList.append(finalCondition!) } else { vc.sellConditionsList.append(finalCondition!) } } else if segue.identifier == "toVar" { comparatorString = comparatorField.text! let vc = segue.destination as! StockAttributeViewController vc.amount = amount vc.clickedButton = clickedButton vc.leftCondition = self.leftB.titleLabel!.text! vc.rightCondition = self.leftB.titleLabel!.text! vc.comparator1 = comparatorString } else if segue.identifier == "toDoubleSubCondition" { let vc = segue.destination as! SubConditions2ViewController vc.topLeftButtonTitle = self.leftB.titleLabel!.text! vc.topRightButtonTitle = self.rightB.titleLabel!.text! vc.comparator1String = self.comparatorString vc.amount = self.amount //vc.topLef } } //save condition button will need to save into finalCondition and set isBuyCondition } /* class SubConditionView: UIView { //var makePattern override init(frame: CGRect) { super.init(frame: frame) self.backgroundColor = UIColor(red: 81, green: 165, blue: 186, alpha: 1) setupViews() //setupConstraints() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func setupViews() { self.addSubview(contentView) self.addSubview(makePatternButton) } /* we may not need this function because we are going to put this view in a stack view func setupConstraints() { self.translatesAutoresizingMaskIntoConstraints = false contentView.translatesAutoresizingMaskIntoConstraints = false contentView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 10).isActive = true contentView.topAnchor.constraint(equalTo: self., constant: <#T##CGFloat#>) } */ let contentView: UIView = { let view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) return view }() let makePatternButton: UIButton = { let button = UIButton(type: .system) button.setTitle("Make Pattern", for: .normal) return button }() } */ class RadioButton: UIButton { var alternateButton:Array<RadioButton>? override func awakeFromNib() { self.layer.cornerRadius = 5 self.layer.borderWidth = 2.0 self.layer.masksToBounds = true } func unselectAlternateButtons() { if alternateButton != nil { self.isSelected = true for aButton:RadioButton in alternateButton! { aButton.isSelected = false } } else { toggleButton() } } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { unselectAlternateButtons() super.touchesBegan(touches, with: event) } func toggleButton() { self.isSelected = !isSelected } override var isSelected: Bool { didSet { if isSelected { self.layer.borderColor = CGColor.init(srgbRed: 0, green: 0, blue: 255, alpha: 1) } else { self.layer.borderColor = CGColor.init(srgbRed: 125, green: 125, blue: 125, alpha: 1) } } } }
[ -1 ]
003902e1fcbbe7ab50ab6a1da51d29a25b10f7e2
9fbbf448c6f2001043f468183cda055c66314a38
/Swift/FirstARApp/FirstARApp/SceneDelegate.swift
c06e32728fe2d74bd532bacb76eea8206b099bcd
[]
no_license
MatthewSilletti/CAS-CompSci
620ea249254e15a084473f1b2822ebac5645332f
4884349a2dcadcefb08b59c1970f483d7a8b2b96
refs/heads/master
2020-07-23T15:05:22.246532
2020-04-23T05:42:06
2020-04-23T05:42:06
207,603,191
0
0
null
2020-04-23T05:42:08
2019-09-10T16:00:48
Swift
UTF-8
Swift
false
false
2,357
swift
// // SceneDelegate.swift // FirstARApp // // Created by Matthew Silletti on 3/9/20. // Copyright © 2020 Matthew Silletti. 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, 270922, 385610, 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, 222129, 345036, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 386070, 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, 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, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 419518, 403139, 337607, 419528, 419531, 419536, 272083, 394967, 419543, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 378664, 354107, 345916, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 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, 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, 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, 339401, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 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, 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, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 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, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 430940, 357212, 357215, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 340859, 324476, 430973, 119675, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 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, 160896, 349313, 152704, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 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, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 334047, 350449, 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, 391813, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 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, 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, 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, 262046, 253854, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
6e92da2c516ac06534adcfc85538584f40803640
02aaf77aa67cd91e49586dc90235906f812dd5c7
/optional2.swift
bb91c4dcb608465ba687ae32a473f483b592aa37
[]
no_license
wwq0327/swiftbyexample
7c3eafaa269193b6a0e5d5dd133625e69703ed51
ceaaca8a1f53aba027180ffba3d10da158e2ca9b
refs/heads/master
2020-12-24T14:56:55.384392
2015-02-27T11:55:13
2015-02-27T11:55:13
29,854,712
0
0
null
null
null
null
UTF-8
Swift
false
false
320
swift
class Person { var residence: Residence? } class Residence { var numberOfRooms = 1 } let john = Person() john.residence = Residence() if let roomCount = john.residence?.numberOfRooms { println("John's residence has \(roomCount) room(s).") } else { println("Unable to retrive the number of rooms.") }
[ -1 ]
8f6e61f88012b4c70b9646bc58206aa98666f956
f236bfb60f25e3f523ed64f55114c6882440e0c7
/Sources/MeditoNetwork/Extensions/Publishers+Extensions.swift
16d6050a9ba203682a4b30029a4fc3c05f419993
[]
no_license
lukacs-m/MeditoNetwork
482727c2f36b1c4309163994a6606cb2c664f5c9
abdb8033e5741c8db98aba5d0f3af5041f39ce9b
refs/heads/master
2023-06-09T23:47:47.482294
2021-07-03T17:08:47
2021-07-03T17:08:47
378,612,280
0
0
null
null
null
null
UTF-8
Swift
false
false
561
swift
// // File.swift // // // Created by Martin Lukacs on 19/06/2021. // import Combine // MARK: - Extensions linked to Just extension Just { /// Transforms a Just into a Anypublisher /// - Parameter errorType: The type of error the AnyPublisher should return /// - Returns: An AnyPublisher that returns the output and specified error type func switchToAnyPublisher<ReturnedError: Error>(with errorType: ReturnedError.Type) -> AnyPublisher<Output, ReturnedError> { self.setFailureType(to: errorType).eraseToAnyPublisher() } }
[ -1 ]
3f0ac5f64b8d93be4afd805b03b2726526c5784a
9c9bbec23eef457b88e4c6c6e69e7274699bb4fc
/LifeCalc/LifeCalc/Utilities/UIViewControllerExtensions.swift
9931ba6ab96d9ac3b432451af4faa8adecceef2c
[]
no_license
otakisan/lifecalc-ios
512f4c7f8e5d1a4b9578a23f73d74ba37e7f4845
68b232ad3d6f7babb4033faa8d6a219c77859402
refs/heads/master
2016-09-12T20:05:24.736778
2016-05-21T04:05:54
2016-05-21T04:05:54
56,911,325
0
0
null
null
null
null
UTF-8
Swift
false
false
1,668
swift
// // UIViewControllerExtensions.swift // LifeCalc // // Created by takashi on 2016/04/24. // Copyright © 2016年 Takashi Ikeda. All rights reserved. // import UIKit extension UIViewController { func popoverViewController(popoverViewController : UIViewController, sourcView : UIView, delegate : UIPopoverPresentationControllerDelegate, preferredContentSize : CGSize) { popoverViewController.modalPresentationStyle = UIModalPresentationStyle.Popover popoverViewController.preferredContentSize = preferredContentSize if let presentationController = popoverViewController.popoverPresentationController { presentationController.delegate = delegate presentationController.permittedArrowDirections = UIPopoverArrowDirection.Up presentationController.sourceView = sourcView presentationController.sourceRect = sourcView.bounds self.presentViewController(popoverViewController, animated: true, completion: nil) } } func initAnalysisTracker(screenName : String) { let tracker = GAI.sharedInstance().defaultTracker tracker.set(kGAIScreenName, value: screenName) tracker.send(GAIDictionaryBuilder.createScreenView().build() as [NSObject : AnyObject]) } func showAlertMessage(title : String?, message : String?, okHandler: ((UIAlertAction) -> Void)?) { let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert) alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: okHandler)) self.presentViewController(alert, animated: true, completion: nil) } }
[ -1 ]
e11880f2d8f16b43f9dc7f6c4864305e8601e9c1
c62d078e62f2fb898d1fa1209f4fb32e79ab60c0
/Framework/Components/UIKit/Gestures/ClosureTapRecognizer.swift
52d98aa585f99693aa6fc5d1a10ecbc17c5ae4eb
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
devpolant/SwiftyComponents
4dc759605533dbaee5a99fef4ee5a405cb631079
fdb599a3ca242cab44c9cee92105cd009feadf30
refs/heads/master
2021-10-14T08:43:57.583112
2019-02-03T13:35:30
2019-02-03T13:35:30
null
0
0
null
null
null
null
UTF-8
Swift
false
false
748
swift
// // ClosureTapRecognizer.swift // Components // // Created by Anton Poltoratskyi on 30.01.18. // Copyright © 2018 Anton Poltoratskyi. All rights reserved. // import UIKit public final class ClosureTapRecognizer: UITapGestureRecognizer { public let identifier: String public var action: ((UITapGestureRecognizer) -> Void)? public init(identifier: String, action: ((UITapGestureRecognizer) -> Void)? = nil) { self.identifier = identifier self.action = action super.init(target: nil, action: nil) addTarget(self, action: #selector(tapDidRecognized(recognizer:))) } @objc private func tapDidRecognized(recognizer: UITapGestureRecognizer) { action?(recognizer) } }
[ -1 ]
98fb1d0824c54de9e9b106018a604f3a9464129c
5d6a4940aa886a5eeb208bf3f4ad74c825f56942
/MyMovies/FavoritesViewController.swift
110b6d3ce09ead5947cbde6310f24ca293fa2c61
[]
no_license
Ratmir7/MyMovies
8dbf1c53afd8adf722e00335f4e54740c1f4269f
9e6181b02f28743d144b59fdc3ad37db6ebc6138
refs/heads/master
2021-01-19T04:40:52.237609
2016-09-27T13:39:47
2016-09-27T13:39:47
69,351,766
0
0
null
null
null
null
UTF-8
Swift
false
false
7,867
swift
// // FavoritesViewController.swift // MyMovies // // Created by Ratmir Naumov on 11.09.16. // Copyright © 2016 Ratmir Naumov. All rights reserved. // import UIKit import CoreData class FavoritesViewController: UITableViewController { var fetchedResultsController : NSFetchedResultsController! let cellID = "cellID" lazy var segmentedControl: UISegmentedControl = { let sc = UISegmentedControl(items: ["Movies", "TvShows"]) sc.selectedSegmentIndex = 0; sc.addTarget(self, action: #selector(segmentedControlChanged), forControlEvents: .ValueChanged) return sc }() let fetchedMovieController: NSFetchedResultsController = { let fr = NSFetchRequest(entityName: "Movie") fr.predicate = NSPredicate(format: "favorite = true") let voteSort = NSSortDescriptor(key: "voteAverage", ascending: true) fr.sortDescriptors = [voteSort] let fmc = NSFetchedResultsController(fetchRequest: fr, managedObjectContext: CoreDataManager.sharedInstance.context, sectionNameKeyPath: nil, cacheName: nil) return fmc }() let fetchedTvShowController: NSFetchedResultsController = { let fr = NSFetchRequest(entityName: "TvShow") fr.predicate = NSPredicate(format: "favorite = true") let voteSort = NSSortDescriptor(key: "popularity", ascending: false) fr.sortDescriptors = [voteSort] let fmc = NSFetchedResultsController(fetchRequest: fr, managedObjectContext: CoreDataManager.sharedInstance.context, sectionNameKeyPath: nil, cacheName: nil) return fmc }() lazy var fetchedControllers: [NSFetchedResultsController] = { return [self.fetchedMovieController, self.fetchedTvShowController] }() func segmentedControlChanged() { fetchedResultsController.delegate = nil fetchedResultsController = fetchedControllers[segmentedControl.selectedSegmentIndex] fetchedResultsController.delegate = self do { try fetchedResultsController.performFetch() } catch let error as NSError { print("Error: \(error.localizedDescription)") } tableView.reloadData() } override func viewDidLoad() { super.viewDidLoad() tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellID) self.navigationItem.titleView = segmentedControl fetchedResultsController = fetchedControllers[0] do { try fetchedResultsController.performFetch() } catch let error as NSError { print("Error: \(error.localizedDescription)") } } override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { if segmentedControl.selectedSegmentIndex == 0 { let movie = fetchedResultsController.objectAtIndexPath(indexPath) as? Movie let mvc = MovieViewController() mvc.movie = movie navigationController?.navigationBar.topItem?.title = "" navigationController?.pushViewController(mvc, animated: true) } else{ let tvShow = fetchedResultsController.objectAtIndexPath(indexPath) as? TvShow let tvc = TVShowViewController() tvc.tvShow = tvShow navigationController?.navigationBar.topItem?.title = "" navigationController?.pushViewController(tvc, animated: true) } } override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return fetchedResultsController.sections!.count } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { let sectionInfo = fetchedResultsController.sections![section] return sectionInfo.numberOfObjects } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { var cell = tableView.dequeueReusableCellWithIdentifier(cellID) if cell != nil { cell = UITableViewCell(style: .Subtitle, reuseIdentifier: cellID) } configureCell(cell!, indexPath: indexPath) return cell! } override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { return true } override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if editingStyle == .Delete { if segmentedControl.selectedSegmentIndex == 0 { let movie = fetchedResultsController.objectAtIndexPath(indexPath) as? Movie movie?.favorite = false }else { let tvShow = fetchedResultsController.objectAtIndexPath(indexPath) as? TvShow tvShow?.favorite = false } } } override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { return 80 } func configureCell(cell: UITableViewCell, indexPath: NSIndexPath) { if segmentedControl.selectedSegmentIndex == 0 { configureMovieCell(cell, indexPath: indexPath) }else { configureTvShowCell(cell, indexPath: indexPath) } } func configureMovieCell(cell: UITableViewCell, indexPath: NSIndexPath) { var movie: Movie? movie = fetchedResultsController.objectAtIndexPath(indexPath) as? Movie if let movie = movie { cell.textLabel?.text = movie.title if let imageData = movie.imageData { cell.imageView?.image = UIImage(data: imageData) cell.imageView?.contentMode = .ScaleAspectFill } } } func configureTvShowCell(cell: UITableViewCell, indexPath: NSIndexPath) { var tvShow: TvShow? tvShow = fetchedResultsController.objectAtIndexPath(indexPath) as? TvShow if let tvShow = tvShow { cell.textLabel?.text = tvShow.name if let imageData = tvShow.imageData { cell.imageView?.image = UIImage(data: imageData) cell.imageView?.contentMode = .ScaleAspectFit } } } } extension FavoritesViewController: NSFetchedResultsControllerDelegate { func controllerWillChangeContent(controller: NSFetchedResultsController) { tableView.beginUpdates() } func controller(controller: NSFetchedResultsController, didChangeObject anObject: AnyObject, atIndexPath indexPath: NSIndexPath?, forChangeType type: NSFetchedResultsChangeType, newIndexPath: NSIndexPath?) { switch type { case .Insert: tableView.insertRowsAtIndexPaths([newIndexPath!], withRowAnimation: .Automatic) case .Delete: tableView.deleteRowsAtIndexPaths([indexPath!], withRowAnimation: .Automatic) case .Update: if let cell = tableView.cellForRowAtIndexPath(indexPath!) { configureCell(cell, indexPath: indexPath!) } case .Move: tableView.deleteRowsAtIndexPaths([indexPath!], withRowAnimation: .Automatic) tableView.insertRowsAtIndexPaths([newIndexPath!], withRowAnimation: .Automatic) } } func controllerDidChangeContent(controller: NSFetchedResultsController) { tableView.endUpdates() } }
[ -1 ]
9f17303526f4940be405013edbb3a3cd2968d6fe
66e9e359e004c261ee07b475d63a4d92f870e861
/WatchNMRCalculator Extension/Views/NucleusList.swift
f13c727c966712d7a7bdb7694f1fcb8b90834e20
[]
no_license
jaeseung16/NMRCalculator
ae555bd7a284f1e6eb69d9f4ab63d6a3b664728f
fe54a88be5ff0f266d85e4a6195730e40f7a5d69
refs/heads/master
2022-12-20T06:21:37.161154
2021-03-08T00:51:21
2021-03-08T00:51:21
69,129,913
0
0
null
null
null
null
UTF-8
Swift
false
false
1,237
swift
// // NucleusList.swift // WatchNMRCalculator Extension // // Created by Jae Seung Lee on 1/12/20. // Copyright © 2020 Jae-Seung Lee. All rights reserved. // import SwiftUI struct NucleusList<DetailView: View>: View { @EnvironmentObject var userData: NMRPeriodicTableData let detailViewProducer: (NMRNucleus) -> DetailView var body: some View { GeometryReader { geometry in List { ForEach(self.userData.nuclei, id: \.self) { nucleus in NavigationLink(destination: self.detailViewProducer(nucleus) .environmentObject(self.userData)) { WatchNucleusView(nucleus: nucleus) } .navigationBarTitle("NMR Calculator") } .frame(width: geometry.size.width * 0.88, height: geometry.size.height * 0.7) } .listStyle(CarouselListStyle()) } } } struct NucleusList_Previews: PreviewProvider { static var previews: some View { let userData = NMRPeriodicTableData() return NucleusList {WatchNucleusView(nucleus: $0)} .environmentObject(userData) } }
[ -1 ]
8b4c854689fa1c13a0ef4b474585d682ab73a89e
d0f0e860f67ea5550bba41c19017a91ae19e638f
/UIMaster/Base/Vendor(第三方)/TGPhotoPicker/TGPhotoPreviewCell.swift
92d2555948f2800b934e56b0dbdba7b99184bd6e
[]
no_license
HobsonCheng/uimaster_iOS
71c4c2744c414c892f9b11a0e53b6e8fa8453f0f
22a74641bcd04f4a4eda0ba46cd694405db518e5
refs/heads/master
2020-06-24T18:18:20.129428
2020-05-18T10:30:28
2020-05-18T10:30:28
199,043,388
1
0
null
null
null
null
UTF-8
Swift
false
false
6,190
swift
// // TGPhotoPreviewCell.swift // TGPhotoPicker // // Created by targetcloud on 2017/7/19. // Copyright © 2017年 targetcloud. All rights reserved. // import Photos import UIKit protocol TGPhotoPreviewCellDelegate: AnyObject { func onImageSingleTap() } class TGPhotoPreviewCell: UICollectionViewCell { var asset: PHAsset? { didSet { let photoImageManager = TGPhotoImageManager() photoImageManager.getPhotoByMaxSize(asset: asset!, size: self.bounds.width) { image, _, _ -> Void in self.imageView.image = image self.resizeImageView() } } } var image: UIImage? { didSet { self.imageView.image = image self.resizeImageView() } } weak var delegate: TGPhotoPreviewCellDelegate? fileprivate var imageContainerView = UIView() private var imageView = UIImageView() private var scrollView: UIScrollView? override init(frame: CGRect) { super.init(frame: frame) setupUI() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setupUI() } private func setupUI() { self.scrollView = UIScrollView(frame: self.bounds) //self.scrollView!.bouncesZoom = true// default is YES. if set, user can go past min/max zoom while gesturing and the zoom will animate to the min/max value at gesture end self.scrollView!.maximumZoomScale = 2.5 self.scrollView!.isMultipleTouchEnabled = true self.scrollView!.delegate = self self.scrollView!.scrollsToTop = false self.scrollView!.showsHorizontalScrollIndicator = false self.scrollView!.showsVerticalScrollIndicator = false self.scrollView!.autoresizingMask = [.flexibleWidth, .flexibleHeight] self.scrollView!.delaysContentTouches = false// default is YES. if NO, we immediately call -touchesShouldBegin:withEvent:inContentView:. this has no effect on presses //self.scrollView!.canCancelContentTouches = true// default is YES. if NO, then once we start tracking, we don't try to drag if the touch moves. this has no effect on presses //self.scrollView!.alwaysBounceVertical = false// default NO. if YES and bounces is YES, even if content is smaller than bounds, allow drag vertically self.addSubview(self.scrollView!) self.imageContainerView.clipsToBounds = true self.scrollView!.addSubview(self.imageContainerView) self.imageView.backgroundColor = UIColor(white: 1.0, alpha: 0.5) self.imageView.clipsToBounds = true self.imageContainerView.addSubview(self.imageView) let singleTap = UITapGestureRecognizer(target: self, action: #selector(self.singleTap(tap:))) let doubleTap = UITapGestureRecognizer(target: self, action: #selector(self.doubleTap(tap:))) doubleTap.numberOfTapsRequired = 2 singleTap.require(toFail: doubleTap) self.addGestureRecognizer(singleTap) self.addGestureRecognizer(doubleTap) } private func resizeImageView() { self.imageContainerView.frame = CGRect(x: 0, y: 0, width: self.frame.width, height: self.imageContainerView.bounds.height) let image = self.imageView.image! if image.size.height / image.size.width > self.bounds.height / self.bounds.width { var originFrame = self.imageContainerView.frame originFrame.size.height = floor((image.size.height / image.size.width) * self.bounds.width) self.imageContainerView.frame = originFrame } else { var height = (image.size.height / image.size.width) * self.frame.width if height < 1 || height.isNaN { height = self.frame.height } var originFrame = self.imageContainerView.frame originFrame.size.height = floor(height) self.imageContainerView.frame = originFrame self.imageContainerView.center = CGPoint(x: self.imageContainerView.center.x, y: self.bounds.height / 2) } if self.imageContainerView.frame.height > self.frame.height && self.imageContainerView.frame.height - self.frame.height <= 1 { var originFrame = self.imageContainerView.frame originFrame.size.height = self.frame.height self.imageContainerView.frame = originFrame } self.scrollView?.contentSize = CGSize(width: self.frame.width, height: max(self.imageContainerView.frame.height, self.frame.height)) self.scrollView?.scrollRectToVisible(self.bounds, animated: false) self.scrollView?.alwaysBounceVertical = self.imageContainerView.frame.height > self.frame.height self.imageView.frame = self.imageContainerView.bounds } @objc private func singleTap(tap: UITapGestureRecognizer) { delegate?.onImageSingleTap() } @objc private func doubleTap(tap: UITapGestureRecognizer) { if (self.scrollView!.zoomScale > 1.0) { self.scrollView?.setZoomScale(1.0, animated: true) } else { let touchPoint = tap.location(in: self.imageView) let zoomScale = self.scrollView?.maximumZoomScale let width = self.frame.size.width / zoomScale! let height = self.frame.size.height / zoomScale! self.scrollView?.zoom(to: CGRect(x: touchPoint.x - width / 2, y: touchPoint.y - height / 2, width: width, height: height), animated: true) } } } extension TGPhotoPreviewCell: UIScrollViewDelegate { func viewForZooming(in scrollView: UIScrollView) -> UIView? { return self.imageContainerView } func scrollViewDidZoom(_ scrollView: UIScrollView) { let offsetX = (scrollView.frame.width > scrollView.contentSize.width) ? (scrollView.frame.width - scrollView.contentSize.width) * 0.5 : 0.0 let offsetY = (scrollView.frame.height > scrollView.contentSize.height) ? (scrollView.frame.height - scrollView.contentSize.height) * 0.5 : 0.0 self.imageContainerView.center = CGPoint(x: scrollView.contentSize.width * 0.5 + offsetX, y: scrollView.contentSize.height * 0.5 + offsetY) } }
[ -1 ]
d02c92f4ce37d4b4d859ae0befd49761212f44d9
658e54b646b2d6406ec6fc2ec3e53301b0c4f417
/miniProject/Album/Location/View/AddAlbumQRCodeView.swift
d11740dd100d236ffe19ee31755c3faee980d8d4
[]
no_license
qwer810520/TravelAdventur
ea4615895f12a8d4ece12e4eaeda4a832e4958d0
aec2635f60b25dc49391afd80e2d5dc14abede4f
refs/heads/master
2021-06-02T15:10:32.688343
2020-02-17T07:15:03
2020-02-17T07:15:03
95,619,051
0
0
null
null
null
null
UTF-8
Swift
false
false
1,297
swift
// // AddAlbumQRCodeView.swift // miniProject // // Created by 楷岷 張 on 2018/8/27. // Copyright © 2018年 楷岷 張. All rights reserved. // import UIKit class AddAlbumQRCodeView: UIView { var id: String lazy var qrcodeImageView: UIImageView = { let widthAndHeight: CGFloat = UIScreen.main.bounds.width - (80 * 2) return UIImageView(frame: CGRect(x: (UIScreen.main.bounds.width - widthAndHeight) / 2 , y: 150, width: widthAndHeight, height: widthAndHeight)) }() lazy private var descriptionLabel: UILabel = { let view = UILabel() view.translatesAutoresizingMaskIntoConstraints = false return view }() // MARK: - Initialization init(id: String) { self.id = id super.init(frame: .zero) setUserInterface() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func removeFromSuperview() { super.removeFromSuperview() qrcodeImageView.image = nil } // MARK: - Private Methods private func setUserInterface() { translatesAutoresizingMaskIntoConstraints = false backgroundColor = .white addSubview(qrcodeImageView) setUpAutoLayout() } private func setUpAutoLayout() { qrcodeImageView.image = id.toQRCode(with: qrcodeImageView) } }
[ -1 ]
fbd35dcfd8350c2628ce6ca79c07ada27fab16cd
d0ec217af6c0bd26f0cb970fb7f3066e4ac6c0ce
/Challenge-AS/Library/Utils.swift
4388c75bc2805cea0080604c51e8091ef85bc9b8
[]
no_license
bueno/challenge-as
a16b213e4dbe44752a9469959467ac94691ad280
02cf6a72d999c96fa9491b48be778bde34435f19
refs/heads/master
2020-03-18T09:35:40.569702
2019-03-08T22:45:31
2019-03-08T22:45:31
134,571,916
0
0
null
2019-03-08T22:45:32
2018-05-23T13:14:08
Swift
UTF-8
Swift
false
false
389
swift
// // Utils.swift // Challenge-AS // // Created by Luiz Henrique Bueno on 5/31/18. // Copyright © 2018 NxT. All rights reserved. // import Foundation class Utils { static func convertStringToDate(date: String, format: String) -> Date { let dateFormatter = DateFormatter() dateFormatter.dateFormat = format return dateFormatter.date(from: date)! } }
[ -1 ]
43273cc4f305f78a1cdcd83e5145aabcb7ec6708
c16eb04def1a0063874e4ed828dffbe7ebdfb512
/TheWeatherApp/View/FavouriteViewController.swift
e61935a7eae55cb89598a8dc219796cbe34b5aeb
[]
no_license
AfroCyberGuy/DWeatherapp
967de44d246702a20ce068746ad206892d25cd23
1630313756458125a06c6c5e4926d31def760d5b
refs/heads/master
2020-09-23T20:33:45.430179
2019-12-03T09:30:48
2019-12-03T09:30:48
225,580,801
0
0
null
null
null
null
UTF-8
Swift
false
false
304
swift
// // FavouriteViewController.swift // TheWeatherApp // // Created by Tatenda Kabike on 2019/12/03. // Copyright © 2019 Tatenda Kabike. All rights reserved. // import UIKit class FavouriteViewController: UIViewController{ override func viewDidLoad() { super.viewDidLoad() } }
[ -1 ]
8544a5401ddc67ce77c98c78bb53294fdf718ee2
442d40cd35be235d3c64b52bd23b6d4cb4e0fa80
/SLProject/Manager/StorageManager.swift
567427415f84742d0f6ce05275b427863ef8e8f0
[]
no_license
marwen86/SLProject1
1890ab0470c11fea1f38ff4cc5e7db8449a7eeb8
52b04d9f11dbf62e734cf515498733af2e369f54
refs/heads/master
2021-07-16T13:29:44.841639
2017-10-22T23:40:49
2017-10-22T23:40:49
107,890,063
0
0
null
null
null
null
UTF-8
Swift
false
false
542
swift
// // StorageManager.swift // SLProject // // Created by Mohamed Marouane YOUSSEF on 22/10/2017. // Copyright © 2017 Mohamed Marouane YOUSSEF. All rights reserved. // import Foundation struct StorageManager { static func setObject(value:Any ,key:String){ let pref = UserDefaults.standard pref.set(value, forKey: key) pref.synchronize() } static func getObject(key:String) -> Any?{ let pref = UserDefaults.standard let value = pref.value(forKey: key) return value } }
[ -1 ]
c383b5705e7eb130b614fec9874215dfd3bce683
517a0c09a6261b1e4e5cd64bca03e03301333459
/FavoriteActressList/DetailViewController.swift
b27c03290634962f1c60b9bf5b3d90cca6060398
[]
no_license
PPTaa/FavoriteActressList
207849b79cc72d487a02d9ce4bf604cd3f29fb7f
1ad4f5da88a0cc7622e48d3259546ec623400859
refs/heads/main
2023-03-20T01:16:00.858539
2021-02-17T14:27:11
2021-02-17T14:27:11
339,084,030
0
0
null
null
null
null
UTF-8
Swift
false
false
3,372
swift
// // DetailViewController.swift // FavoriteActressList // // Created by leejungchul on 2021/02/15. // import UIKit class DetailViewController: UIViewController { // MVVM // // Model // - ActressInfo // ActressInfo 제작 // // View // - imageView, nameLabel, explainLabel // view 들은 viewModel을 통해서 구성하ㄱ // // ViewModel // - DetailViewModel // 뷰레이어에서 필요한 메서드 만들기 // Model 가지고 있기, ActressInfo 들 override func viewDidLoad() { super.viewDidLoad() updateUI() prepareAnimation() } // 뷰가 나타나는 시점 override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) showAnimation() } private func prepareAnimation(){ // nameLabelCenterX.constant = view.bounds.width // explainLabelY.constant = view.bounds.width // 뷰속성을 이용한 애니메이션 사전 준비 nameLabel.transform = CGAffineTransform(translationX: view.bounds.width, y: 0).scaledBy(x: 3, y: 3).rotated(by: 180) nameLabel.alpha = 0 explainLabel.transform = CGAffineTransform(translationX: view.bounds.width, y: 0).scaledBy(x: 3, y: 3).rotated(by: 180) explainLabel.alpha = 0 } private func showAnimation(){ // nameLabelCenterX.constant = 0 // explainLabelY.constant = 40 // // 위치변화 에니메이션(튕기는 효과 추가) // UIView.animate(withDuration: 0.3, delay: 0.1, usingSpringWithDamping: 0.5, initialSpringVelocity: 2, options: .allowUserInteraction, animations: { // self.view.layoutIfNeeded() // }, completion: nil) // 뷰 속성을 이용한 애니메이션 UIView.animate(withDuration: 1, delay: 0, usingSpringWithDamping: 0.6, initialSpringVelocity: 2, options: .allowUserInteraction, animations: { self.nameLabel.transform = CGAffineTransform.identity self.nameLabel.alpha = 1 }, completion: nil) UIView.animate(withDuration: 1, delay: 0.2, usingSpringWithDamping: 0.6, initialSpringVelocity: 2, options: .allowUserInteraction, animations: { self.explainLabel.transform = CGAffineTransform.identity self.explainLabel.alpha = 1 }, completion: nil) // 회전 애니메이션 UIView.transition(with: imageView, duration: 0.1, options: .transitionFlipFromLeft, animations: nil, completion: nil) } @IBAction func close(_ sender: Any) { dismiss(animated: true, completion: nil) } @IBOutlet weak var imageView: UIImageView! @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var explainLabel: UILabel! @IBOutlet weak var nameLabelCenterX: NSLayoutConstraint! @IBOutlet weak var explainLabelY: NSLayoutConstraint! let viewModel = DetailViewModel() func updateUI() { if let actressInfo = self.viewModel.actressInfo { imageView.image = actressInfo.image nameLabel.text = actressInfo.name explainLabel.text = actressInfo.explain } } } class DetailViewModel { var actressInfo: ActressInfo? func update(model: ActressInfo?){ actressInfo = model } }
[ -1 ]
de50ad0659d764e6ab898d745263050c61b67dc7
b1a508f3d2bc72513ad6cc82e817fd29bdc86bb1
/RatingSlider/AppDelegate.swift
a6b944569ad4f7c4a185f0062db40da5901855ed
[]
no_license
yogeshrathore123/RatingSlider
72eafeb0be9a444fbfff80e2e6bb8aea0f9dea91
35976278585173cfdd93c2a7ac309787621576c4
refs/heads/master
2021-07-21T20:20:16.990221
2017-10-31T05:50:35
2017-10-31T05:50:35
108,950,827
0
0
null
null
null
null
UTF-8
Swift
false
false
2,189
swift
// // AppDelegate.swift // RatingSlider // // Created by Yogesh Rathore on 31/05/17. // Copyright © 2017 Sybrant Technologies. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 131278, 131281, 286928, 278743, 278747, 295133, 155872, 131299, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 189039, 172656, 352880, 295538, 172655, 172660, 287349, 189044, 189040, 287355, 287360, 295553, 172675, 295557, 311942, 287365, 303751, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 303773, 164509, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 304009, 213895, 304011, 230284, 304013, 295822, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 279661, 205934, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 337067, 165035, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 230763, 410987, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 148946, 370130, 222676, 288210, 288212, 288214, 239064, 329177, 288218, 280021, 288220, 288217, 239070, 280027, 288224, 370146, 288226, 280036, 288229, 280038, 288230, 288232, 320998, 288234, 280034, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 206336, 296450, 148990, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 280260, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 337732, 280388, 304968, 280393, 280402, 173907, 313171, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 223327, 149601, 321634, 149603, 280671, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 275606, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 354656, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 330244, 223752, 150025, 338440, 281095, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 281401, 289593, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 142226, 289687, 240535, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 282337, 216801, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 307385, 176311, 258235, 307388, 176316, 307390, 307386, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 127440, 176592, 315860, 176597, 127447, 283095, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 127460, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 299778, 234242, 242436, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 291711, 234368, 291714, 201603, 291716, 234373, 234370, 234375, 226182, 226185, 324490, 308105, 234379, 234384, 234388, 234390, 324504, 226200, 209818, 308123, 234396, 324508, 291742, 234393, 234398, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 324522, 291754, 291756, 226220, 234414, 324527, 291760, 234417, 201650, 324531, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 226239, 234434, 324546, 324548, 234431, 226245, 234437, 234439, 234443, 291788, 193486, 234446, 193488, 234449, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 234647, 234648, 226453, 234650, 308379, 275608, 300189, 324766, 119967, 324768, 234657, 234653, 283805, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 316596, 308414, 234687, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 275725, 177424, 283917, 349464, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 284076, 144814, 227426, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 227430, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 243268, 284231, 226886, 128584, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 276053, 284249, 317015, 235097, 243290, 284253, 300638, 284251, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 276206, 358128, 284399, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 276395, 284585, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 276448, 153568, 276452, 292839, 276455, 292843, 276460, 292845, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350302, 194654, 350304, 178273, 309346, 227423, 194660, 350308, 309350, 309348, 292968, 309352, 350313, 309354, 301163, 350316, 276583, 301167, 276586, 350321, 276590, 227440, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 227583, 276735, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 277368, 15224, 416639, 416640, 113538, 310147, 416648, 277385, 39817, 187274, 301972, 424853, 277405, 310179, 277411, 293798, 293802, 236460, 277426, 293811, 276579, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 318442, 228332, 326638, 277486, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 244731, 285690, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 253064, 294026, 285835, 302218, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 196133, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 40840, 294803, 40851, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
a7cbc6ed0f03ba8109bf3db26000212ada5b5020
17620041eef731adf98e662af7fd39ca6dbd9f90
/MGArchitecture/Scenes/ProductList/ProductListUseCase.swift
b0d27fd6343ec7f601d9c6c65669f0da33aa17e8
[ "MIT" ]
permissive
tuan188/MGArchitecture
c76492221d7abbadd246375d0015360247af78e9
525a3302b4747a6a813bc8fc3f2d5a92ce3c01b1
refs/heads/master
2022-06-23T06:09:26.444251
2022-06-08T04:57:25
2022-06-08T04:57:25
153,601,597
8
8
MIT
2020-03-05T01:51:55
2018-10-18T09:51:10
Swift
UTF-8
Swift
false
false
2,713
swift
// // ProductListUseCase.swift // MGArchitecture // // Created by Tuan Truong on 7/23/19. // Copyright © 2019 Sun Asterisk. All rights reserved. // import RxSwift protocol ProductListUseCaseType { func getProductList(query: String, page: Int) -> Observable<PagingInfo<Product>> func getProductList(page: Int) -> Observable<PagingInfo<Product>> func getEmptyProductList(page: Int) -> Observable<PagingInfo<Product>> func getProductList() -> Observable<[Product]> func getProduct(query: String) -> Observable<Product> } struct ProductListUseCase: ProductListUseCaseType { func getProductList(query: String, page: Int) -> Observable<PagingInfo<Product>> { return getProductList(page: page) } func getProductList(page: Int) -> Observable<PagingInfo<Product>> { return Observable.create { observer in DispatchQueue.global().asyncAfter(deadline: .now() + 1, execute: { let products = Array(0...9) .map { $0 + (page - 1) * 10 } .map { id in Product().with { $0.id = id $0.name = "Product \(id)" $0.price = Double(id * 2) } } let page = PagingInfo<Product>(page: page, items: products) observer.onNext(page) observer.onCompleted() }) return Disposables.create() } } func getEmptyProductList(page: Int) -> Observable<PagingInfo<Product>> { return Observable.create { observer in DispatchQueue.global().asyncAfter(deadline: .now() + 1, execute: { let page = PagingInfo<Product>(page: page, items: []) observer.onNext(page) observer.onCompleted() }) return Disposables.create() } } func getProductList() -> Observable<[Product]> { return Observable.create { observer in DispatchQueue.global().asyncAfter(deadline: .now() + 1, execute: { let products = Array(0...9) .map { id in Product().with { $0.id = id $0.name = "Product \(id)" $0.price = Double(id * 2) } } observer.onNext(products) observer.onCompleted() }) return Disposables.create() } } func getProduct(query: String) -> Observable<Product> { return Observable.just(Product()) } }
[ -1 ]
be07fbe1de18b195880bb63c0e604ca15d760d96
5a736984e888e806f9b6c63364ef58d5525e6a51
/ImprovementPlans.swift
1f684abcb9cf2f1dd8d158cb2aaccdec90f98c05
[]
no_license
Italof/DP2_iOS
d022551b7c25df23c5f876502f71571c59303db6
17f5ce482e25038b48b785f717d75b4f5c9d4bf0
refs/heads/master
2020-12-05T06:07:17.228572
2016-09-05T23:44:06
2016-09-05T23:44:06
66,892,985
0
0
null
null
null
null
UTF-8
Swift
false
false
3,681
swift
// // ImprovementPlans.swift // UASApp // // Created by Karl Montenegro on 06/05/16. // Copyright © 2016 puntobat. All rights reserved. // import UIKit class ImprovementPlans: UITableViewController { var faculty: Faculty? = nil var plans: Array<ImprovementPlan> = [] var dateFormatter = NSDateFormatter() override func viewDidLoad() { super.viewDidLoad() self.plans = ImprovementPlan.getPlansByFaculty(self.faculty!, ctx: globalCtx) self.dateFormatter.dateFormat = "dd/MM/yyyy" } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } // MARK: - Table view data source override func numberOfSectionsInTableView(tableView: UITableView) -> Int { // #warning Incomplete implementation, return the number of sections return 1 } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // #warning Incomplete implementation, return the number of rows return self.plans.count } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("improvementCell", forIndexPath: indexPath) as! ImprovementCell let plan = self.plans[indexPath.row] let firstName = plan.professor!.nombres! let lastName = plan.professor!.apellidos! let name: String = firstName + " " + lastName cell.lblCreator.text = name cell.lblAnalysis.text = plan.analisisCausal cell.lblDescription.text = plan.descripcion cell.lblTipo.text = plan.planType!.codigo cell.lblStartDate.text = self.dateFormatter.stringFromDate(plan.fechaImplementacion!) return cell } /* // Override to support conditional editing of the table view. override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> 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, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if editingStyle == .Delete { // Delete the row from the data source tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .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, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { } */ /* // Override to support conditional rearranging of the table view. override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> 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 prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
d1c87cd25207ea020dd268f1e4a5e404c0f16dfb
f13c8a23bdd0927e13ae8ca5cc6e6836086fd78a
/IDPDesign/UIKitProtocols/UIBarItemProtocol.swift
251a59d0c43c2d4f64246a35003276a3496eeb53
[ "BSD-3-Clause" ]
permissive
idapgroup/IDPDesign
5f2d4816fc7d27fc9753df3900d149429c321f4b
a4d5813f77fc000dc8fbe784de473072b487ae37
refs/heads/master
2023-02-18T02:42:33.451837
2021-01-20T11:48:18
2021-01-20T11:48:18
105,074,320
5
3
BSD-3-Clause
2021-01-20T11:40:57
2017-09-27T22:07:37
Swift
UTF-8
Swift
false
false
701
swift
// // UIBarItemProtocol.swift // IDPDesign // // Created by Oleksa 'trimm' Korin on 9/2/17. // Copyright © 2017 Oleksa 'trimm' Korin. All rights reserved. // protocol UIBarItemProtocol: UIObjectType { var isEnabled: Bool { get set } var title: String? { get set } var image: UIImage? { get set } var landscapeImagePhone: UIImage? { get set } var imageInsets: UIEdgeInsets { get set } var landscapeImagePhoneInsets: UIEdgeInsets { get set } var tag: Int { get set } func titleTextAttributes(for state: UIControl.State) -> [NSAttributedString.Key : Any]? func setTitleTextAttributes(_ attributes: [NSAttributedString.Key : Any]?, for state: UIControl.State) }
[ -1 ]
67dbfa7de6c11687b907c0b0921e05c6af85109d
d0213f7c4b0df67dddac0546c40784f470ee4bd6
/Hovos/Utilities/CustomLabels.swift
5635e339b14187f8acdfe197431425d722b021d4
[]
no_license
njios/hovos
89098b5610aad26f0e2a83e65ecba06c8dc562cd
698aec2b6244310c7c6f55042c68421af6743717
refs/heads/master
2021-07-14T04:47:10.397293
2020-11-15T11:02:47
2020-11-15T11:02:47
225,312,949
0
0
null
null
null
null
UTF-8
Swift
false
false
15,266
swift
// // CustomLabels.swift // Hovos // // Created by neeraj kumar joshi on 12/25/19. // Copyright © 2019 neeraj kumar joshi. All rights reserved. // import Foundation import UIKit class CustomLabels: UILabel { @IBInspectable var isComplete:Bool = false{ didSet{ let data = self.text?.split(separator: " ") let yourAttributes = [NSAttributedString.Key.foregroundColor: self.textColor!, NSAttributedString.Key.font: self.font!,NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue] as [NSAttributedString.Key : Any] let yourOtherAttributes = [NSAttributedString.Key.foregroundColor: self.textColor, NSAttributedString.Key.font: self.font] var complete = "" for i in 1..<data!.count{ complete = complete + data![i] + " " } if isComplete == false{ let partOne = NSMutableAttributedString(string: String(data![0]), attributes: yourAttributes as [NSAttributedString.Key : Any]) let partTwo = NSMutableAttributedString(string: " "+complete, attributes: yourOtherAttributes as [NSAttributedString.Key : Any]) let combination = NSMutableAttributedString() combination.append(partOne) combination.append(partTwo) self.attributedText = combination }else{ let partOne = NSMutableAttributedString(string: String(data![0]), attributes: yourAttributes as [NSAttributedString.Key : Any]) let partTwo = NSMutableAttributedString(string: " "+complete, attributes: yourAttributes as [NSAttributedString.Key : Any]) let combination = NSMutableAttributedString() combination.append(partOne) combination.append(partTwo) self.attributedText = combination } } } func setUnderLine(){ let data = self.text?.split(separator: " ") let yourAttributes = [NSAttributedString.Key.foregroundColor: self.textColor!, NSAttributedString.Key.font: self.font!,NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue] as [NSAttributedString.Key : Any] let yourOtherAttributes = [NSAttributedString.Key.foregroundColor: self.textColor, NSAttributedString.Key.font: self.font] var complete = "" for i in 1..<data!.count{ complete = complete + data![i] + " " } if isComplete == false{ let partOne = NSMutableAttributedString(string: String(data![0]), attributes: yourAttributes as [NSAttributedString.Key : Any]) let partTwo = NSMutableAttributedString(string: " "+complete, attributes: yourOtherAttributes as [NSAttributedString.Key : Any]) let combination = NSMutableAttributedString() combination.append(partOne) combination.append(partTwo) self.attributedText = combination }else{ let partOne = NSMutableAttributedString(string: String(data![0]), attributes: yourAttributes as [NSAttributedString.Key : Any]) let partTwo = NSMutableAttributedString(string: " "+complete, attributes: yourAttributes as [NSAttributedString.Key : Any]) let combination = NSMutableAttributedString() combination.append(partOne) combination.append(partTwo) self.attributedText = combination } } override init(frame: CGRect) { super.init(frame: frame) } required init?(coder: NSCoder) { super.init(coder: coder) } } class CustomButtons: UIButton { @IBInspectable var isComplete:Bool = false{ didSet{ let data = self.titleLabel?.text?.split(separator: " ") let yourAttributes = [NSAttributedString.Key.foregroundColor: self.titleLabel?.textColor! ?? UIColor.white, NSAttributedString.Key.font: self.titleLabel?.font! ?? UIFont.systemFont(ofSize: 15),NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue] as [NSAttributedString.Key : Any] let yourOtherAttributes = [NSAttributedString.Key.foregroundColor: self.titleLabel?.textColor, NSAttributedString.Key.font: self.titleLabel?.font!] var complete = "" for i in 1..<data!.count{ complete = complete + data![i] + " " } if isComplete == false{ let partOne = NSMutableAttributedString(string: String(data![0]), attributes: yourAttributes as [NSAttributedString.Key : Any]) let partTwo = NSMutableAttributedString(string: " "+complete, attributes: yourOtherAttributes as [NSAttributedString.Key : Any]) let combination = NSMutableAttributedString() combination.append(partOne) combination.append(partTwo) self.titleLabel?.attributedText = combination }else{ let partOne = NSMutableAttributedString(string: String(data![0]), attributes: yourAttributes as [NSAttributedString.Key : Any]) let partTwo = NSMutableAttributedString(string: " "+complete, attributes: yourAttributes as [NSAttributedString.Key : Any]) let combination = NSMutableAttributedString() combination.append(partOne) combination.append(partTwo) self.titleLabel?.attributedText = combination } } } override init(frame: CGRect) { super.init(frame: frame) } required init?(coder: NSCoder) { super.init(coder: coder) } } func imageWith(name: String?) -> UIImage? { let frame = CGRect(x: 0, y: 0, width: 30, height: 30) let nameLabel = UILabel(frame: frame) nameLabel.textAlignment = .center nameLabel.backgroundColor = UIColor(named: "orangeColor") nameLabel.textColor = .white nameLabel.font = UIFont.boldSystemFont(ofSize: 20) nameLabel.text = name nameLabel.layer.cornerRadius = 15 nameLabel.layer.masksToBounds = true UIGraphicsBeginImageContext(frame.size) if let currentContext = UIGraphicsGetCurrentContext() { nameLabel.layer.render(in: currentContext) let nameImage = UIGraphicsGetImageFromCurrentImageContext() return nameImage } return nil } @IBDesignable extension UIImageView{ @IBInspectable var hostImage:UIImage{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.image = newValue } } get{ return self.image! } } @IBInspectable var volImage:UIImage{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.image = newValue } } get{ return self.image! } } } @IBDesignable extension UIButton{ @IBInspectable var hostTitlecolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.setTitleColor(newValue, for: .normal) } } get{ return (self.titleLabel?.textColor!)! } } @IBInspectable var volTitlecolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.setTitleColor(newValue, for: .normal) } } get{ return (self.titleLabel?.textColor!)! } } @IBInspectable var hostcolore:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.backgroundColor = newValue } } get{ return self.backgroundColor! } } @IBInspectable var volcolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.backgroundColor = newValue } } get{ return self.backgroundColor! } } @IBInspectable var hostBordercolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.layer.borderColor = newValue.cgColor } } get{ return UIColor(cgColor: self.layer.borderColor!) } } @IBInspectable var volBordercolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.layer.borderColor = newValue.cgColor } } get{ return UIColor(cgColor: self.layer.borderColor!) } } @IBInspectable var hostImages:UIImage{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.setImage(newValue, for: .normal) } } get{ return self.image(for: .normal)! } } @IBInspectable var volImages:UIImage{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.setImage(newValue, for: .normal) } } get{ return self.image(for: .normal)! } } @IBInspectable var hostSelectedImages:UIImage{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.setImage(newValue, for: .selected) } } get{ return self.image(for: .selected)! } } @IBInspectable var volSelectedImages:UIImage{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.setImage(newValue, for: .selected) } } get{ return self.image(for: .selected)! } } @IBInspectable var hostText:String{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.setTitle(newValue, for: .normal) } } get{ return (self.titleLabel?.text!)! } } @IBInspectable var volText:String{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.setTitle(newValue, for: .normal) } } get{ return (self.titleLabel?.text!)! } } } @IBDesignable extension UILabel{ @IBInspectable var hostText:String{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ if newValue == " "{ self.text = "" }else{ self.text = newValue } } } get{ return self.text! } } @IBInspectable var volText:String{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ if newValue == " "{ self.text = "" }else{ self.text = newValue } } } get{ return self.text! } } @IBInspectable var hostcolore:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.backgroundColor = newValue } } get{ return self.backgroundColor! } } @IBInspectable var volcolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.backgroundColor = newValue } } get{ return self.backgroundColor! } } @IBInspectable var hostTitlecolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.textColor = newValue } } get{ return self.textColor! } } @IBInspectable var volTitlecolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.textColor = newValue } } get{ return self.textColor! } } @IBInspectable var hostReverseTitlecolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.textColor = newValue } } get{ return self.textColor! } } @IBInspectable var volReverseTitlecolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.textColor = newValue } } get{ return self.textColor! } } } @IBDesignable extension UIPageControl{ @IBInspectable var hostcolore:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.currentPageIndicatorTintColor = newValue } } get{ return self.currentPageIndicatorTintColor! } } @IBInspectable var volcolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.currentPageIndicatorTintColor = newValue } } get{ return self.currentPageIndicatorTintColor! } } } @IBDesignable extension UISwitch{ @IBInspectable var hostcolore:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "h"{ self.onTintColor = newValue } } get{ return self.onTintColor! } } @IBInspectable var volcolor:UIColor{ set{ if SharedUser.manager.auth.user?.role?.lowercased() == "v"{ self.onTintColor = newValue } } get{ return self.onTintColor! } } }
[ -1 ]
65401b22e1ae4580ca74d9a0eb55587e444aa032
9ad994cf420cd54723f1ca4256da684436df91e7
/Pods/Permission/Source/PermissionTypes/Bluetooth.swift
06f07ab51c7c7218fdd5f0138714b4f2d86fce85
[ "MIT" ]
permissive
PokeMapCommunity/PokeMap-iOS
ce2d2a3dd781fa81635fe92a2e360bacf70bfcb3
458a2da4ee700377ad53d7f3f5986fa29ceabbea
refs/heads/master
2021-01-20T19:06:09.045382
2016-07-28T09:43:45
2016-07-28T09:43:45
63,863,036
48
7
null
2016-07-30T03:13:42
2016-07-21T11:16:15
Swift
UTF-8
Swift
false
false
2,318
swift
// // Bluetooth.swift // // Copyright (c) 2015-2016 Damien (http://delba.io) // // 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 CoreBluetooth internal let BluetoothManager = CBPeripheralManager( delegate: Permission.Bluetooth, queue: nil, options: [CBPeripheralManagerOptionShowPowerAlertKey: false] ) extension Permission { var statusBluetooth: PermissionStatus { let state = (BluetoothManager.state, CBPeripheralManager.authorizationStatus()) switch state { case (.Unsupported, _), (.PoweredOff, _), (_, .Restricted): return .Disabled case (.Unauthorized, _), (_, .Denied): return .Denied case (.PoweredOn, .Authorized): return .Authorized default: return .NotDetermined } } func requestBluetooth(callback: Callback?) { Defaults.requestedBluetooth = true BluetoothManager.request(self) } } extension Permission: CBPeripheralManagerDelegate { public func peripheralManagerDidUpdateState(peripheral: CBPeripheralManager) { callback?(statusBluetooth) } } extension CBPeripheralManager { func request(permission: Permission) { startAdvertising(nil) stopAdvertising() } }
[ -1 ]
577fb898daa7b19d56d4f5fb5449a6294ae6f186
af494d966c847dfbc703781d9c04dfdbe6eeb2a8
/Gerador/ViewController.swift
14314df7f2b553ba203f5e76d444220d39d9fac0
[]
no_license
Rosinele/geradorDeSenha
ef1920961b69174e68b51148ad75227215481c2a
98ca1c26c5e19d12ec0ea0542e74f250e43eea5b
refs/heads/master
2021-08-24T02:35:39.870616
2017-12-07T17:42:51
2017-12-07T17:42:51
113,380,009
0
0
null
null
null
null
UTF-8
Swift
false
false
645
swift
// // ViewController.swift // Gerador // // Created by ios on 11/10/17. // Copyright © 2017 Rose. All rights reserved. // import UIKit class ViewController: UIViewController { @IBAction func cadastrarSenha(_ sender: Any) { } @IBAction func acessarSenha(_ sender: Any) { } 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 ]
1295dfa78e4793fa2da0bed97492789fed420d2b
1359358e96360761274c526f2ae4d823e984b0af
/ColdCrypto/Model/EOS/EOSContract.swift
a759d649d60aad0d5b2caebd56c656cf8fcd76f4
[ "MIT" ]
permissive
wepobid/cold-crypto-mobile
d243220ca5caf1a306770f7c1e5447a5872b2d30
b3b386df2d35db03492548bd216b53b0abb7955a
refs/heads/master
2020-07-01T01:55:24.685841
2019-07-09T17:18:32
2019-07-09T17:18:32
null
0
0
null
null
null
null
UTF-8
Swift
false
false
849
swift
// // EOSContract.swift // ColdCrypto // // Created by Kirill Kozhuhar on 26/11/2018. // Copyright © 2018 Kirill Kozhuhar. All rights reserved. // import Foundation class EOSContract: IContract { var name: String = "" var params: String = "" init?(contract: ApiSignContractCall) { name = contract.tx?.transaction?.actions?.first?.name ?? contract.tx?.method ?? "" var tmp = "" contract.tx?.transaction?.actions?.first?.data?.enumerated().forEach({ tmp += "\($0.offset+1).\t\($0.element.key) -> " if let arr = $0.element.value as? [AnyObject] { tmp += "\(arr.compactMap({ "\($0)" }).joined(separator: ", "))" } else { tmp += "\($0.element.value)" } tmp += "\n\n" }) params = tmp } }
[ -1 ]
a02996b74f4450f629626962a35b1e2aae0da360
1f8723c191c274ecb4a14daad1d4539dac2b3cff
/tracker/LoginDataFlow.swift
eb09ccf2e8772477ae9f4308d97078e969ea0926
[]
no_license
nejosephliu/tracker
ca541d687d80e25224cc7855281bd67c8d789868
973728f20a2e4521ada70a71b01959ebae7e7ead
refs/heads/master
2021-01-12T15:00:57.950188
2017-06-08T19:33:15
2017-06-08T19:33:15
71,661,944
0
0
null
2017-04-22T00:02:36
2016-10-22T19:48:19
Swift
UTF-8
Swift
false
false
1,374
swift
// // LoginDataFlow.swift // tracker // // Created by Joseph Liu on 10/22/16. // Copyright © 2016 Joseph Liu. All rights reserved. // import Foundation import Firebase import FirebaseAuth class LoginDataFlow{ static public var validCode : Int = 0 static public var invalidUsername : Int = 1 static public var invalidPassword : Int = 2 class func checkIfValid(email: String, password: String, completion:@escaping (String)-> Void){ FIRAuth.auth()?.signIn(withEmail: email, password: password) { (user, error) in if user != nil { UserDefaults.standard.setValue(user?.uid, forKey: "uid") UserDefaults.standard.synchronize() completion("") }else{ completion((error?.localizedDescription)!) } } } class func checkIfLoggedIn(completion:@escaping (Bool)-> Void){ if (FIRAuth.auth()?.currentUser) != nil{ completion(true) }else{ completion(false) } } class func logout(completion:@escaping ()-> Void){ try! FIRAuth.auth()!.signOut() UserDefaults.standard.setValue(nil, forKey: "uid") UserDefaults.standard.setValue(nil, forKey: "currentGroup") UserDefaults.standard.setValue(nil, forKey: "groups") completion() } }
[ -1 ]
54dece91f76d81f18e13ceffc6bed7006af0823b
753a2b18b69c8521de389db274d67a67de07664e
/intern_hackathon/Screen/Favorite/FavoriteViewCell.swift
efbfb9713f86bb3f57b3cb5c9ece2c5699f4a00d
[]
no_license
wattaihei/connpass_search
12801853b200ef0e3bfbb519fe92d03f0277fa05
1dfdb5e2ca5937b960a1fac15d9a66fafba2aaf6
refs/heads/develop
2022-12-01T11:58:19.706133
2020-08-14T08:42:04
2020-08-14T08:42:04
286,933,089
0
0
null
null
null
null
UTF-8
Swift
false
false
716
swift
// // FavoriteViewCell.swift // intern_hackathon // // Created by 渡辺泰平 on 2020/08/14. // Copyright © 2020 caraquri. All rights reserved. // import Nuke import RealmSwift import UIKit class FavoriteViewCell: UITableViewCell { @IBOutlet weak var titleTextLabel: UILabel! @IBOutlet weak var eventDate: UILabel! override func awakeFromNib() { super.awakeFromNib() } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) } func favoriteSet(title: String, url: String, id: Int, startedAt: String) { titleTextLabel.text = title eventDate.text = "\(startedAt)" } }
[ -1 ]
58e102616811f1a132383a50b1c6fbd018bb153d
2efb02371480199cc5185857312c54d8b79a9e02
/RandomUserProfileGenerationUITests/RandomUserProfileGenerationUITests.swift
a3b49671487d4ad6c90751b8895e743dc37d1d06
[]
no_license
venkatavamsi234/RandomUserProfileGeneration
ed812b5ec31211b004c2fcf99b57e01b0f4d4fad
ec7ce09188f460c030d4c4270e0eb58446836d35
refs/heads/master
2021-07-09T00:36:15.010498
2017-10-05T06:00:02
2017-10-05T06:00:02
105,749,613
0
0
null
null
null
null
UTF-8
Swift
false
false
1,291
swift
// // RandomUserProfileGenerationUITests.swift // RandomUserProfileGenerationUITests // // Created by user on 26/09/17. // Copyright © 2017 user. All rights reserved. // import XCTest class RandomUserProfileGenerationUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. XCUIApplication().launch() // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 155665, 237599, 229414, 278571, 229425, 229431, 180279, 213051, 286787, 237638, 311373, 278607, 196687, 311377, 368732, 180317, 278637, 319599, 278642, 131190, 131199, 278669, 278676, 311447, 327834, 278684, 278690, 311459, 278698, 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, 279092, 377419, 303693, 115287, 189016, 295518, 287327, 279143, 279150, 287345, 189054, 287359, 303743, 164487, 311944, 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, 312313, 214009, 312315, 312317, 328701, 328705, 418819, 320520, 230411, 320526, 238611, 140311, 238617, 197658, 336930, 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, 9618, 279955, 148899, 279979, 279980, 173492, 280003, 370122, 280011, 337359, 329168, 312785, 222674, 329170, 280020, 280025, 239069, 320997, 280042, 280043, 329198, 337391, 296434, 288248, 288252, 312830, 230922, 304655, 329231, 230933, 222754, 312879, 230960, 288305, 239159, 157246, 288319, 288322, 280131, 124486, 288328, 239192, 312937, 312941, 206447, 288377, 337533, 280193, 239238, 288391, 239251, 280217, 198304, 337590, 296636, 280252, 280253, 321217, 280259, 321220, 296649, 239305, 9935, 313042, 280279, 18139, 280285, 321250, 337638, 181992, 288492, 67316, 313082, 288508, 288515, 280326, 116491, 280333, 124691, 116502, 321308, 321309, 280367, 280373, 280377, 321338, 280381, 345918, 280386, 280391, 280396, 18263, 370526, 296807, 296815, 313200, 313204, 124795, 280451, 67464, 305032, 124816, 214936, 337816, 239515, 214943, 313257, 288698, 214978, 280517, 214983, 231382, 329696, 190437, 313322, 329707, 174058, 296942, 124912, 313338, 239610, 182277, 313356, 305173, 223269, 354342, 354346, 313388, 124974, 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, 125197, 125204, 338196, 125215, 125225, 338217, 321839, 125236, 280903, 289109, 239973, 313703, 280938, 321901, 354671, 199030, 223611, 248188, 313726, 240003, 158087, 313736, 240020, 190870, 190872, 289185, 305572, 289195, 338359, 289229, 281038, 281039, 281071, 322057, 182802, 322077, 289328, 338491, 322119, 281165, 281170, 281200, 313970, 297600, 289435, 314020, 248494, 166581, 314043, 363212, 158424, 322269, 338658, 289511, 330473, 330476, 289517, 215790, 125683, 199415, 289534, 322302, 35584, 322312, 346889, 264971, 322320, 166677, 207639, 281378, 289580, 289599, 281407, 281426, 281434, 322396, 281444, 314240, 158594, 330627, 240517, 289691, 240543, 289699, 289704, 289720, 289723, 281541, 19398, 191445, 183254, 183258, 207839, 314343, 183276, 248815, 240631, 330759, 330766, 281647, 322609, 314437, 207954, 339031, 314458, 281698, 281699, 322664, 347286, 339106, 249003, 208044, 322733, 3243, 339131, 290001, 339167, 298209, 290030, 208123, 322826, 126229, 298290, 208179, 159033, 216387, 372039, 224591, 331091, 314708, 150868, 314711, 314721, 281958, 314727, 134504, 306541, 314740, 290170, 224637, 306558, 290176, 306561, 314759, 298378, 314765, 306580, 224662, 282008, 314776, 282013, 290206, 314788, 298406, 314790, 282023, 241067, 314797, 306630, 306634, 339403, 191980, 282097, 306678, 191991, 290304, 323079, 323083, 323088, 282132, 282135, 175640, 282147, 306730, 290359, 323132, 282182, 224848, 224852, 290391, 306777, 282214, 224874, 314997, 290425, 339579, 282244, 323208, 282248, 323226, 282272, 282279, 298664, 298666, 306875, 282302, 323262, 323265, 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, 282428, 413500, 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, 315431, 102441, 315433, 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, 282908, 299294, 282912, 233761, 282920, 315698, 332084, 307514, 282938, 127292, 323914, 201037, 282959, 250196, 168280, 323934, 381286, 242027, 242028, 250227, 315768, 315769, 291194, 291193, 291200, 242059, 291225, 242079, 283039, 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, 283418, 234276, 283431, 242481, 234290, 201534, 283466, 201562, 234330, 275294, 349025, 357219, 177002, 308075, 242540, 201590, 177018, 308093, 291713, 340865, 299912, 316299, 234382, 308111, 308113, 209820, 283551, 177074, 127945, 340960, 234469, 340967, 324587, 234476, 201721, 234499, 300087, 21567, 308288, 160834, 349254, 300109, 234578, 250965, 250982, 234606, 300145, 300147, 234626, 234635, 177297, 308375, 324761, 119965, 234655, 300192, 234662, 300200, 324790, 300215, 283841, 283846, 283849, 316628, 251124, 234741, 283894, 316661, 292092, 234756, 242955, 177420, 292145, 333114, 333115, 193858, 300354, 300355, 234830, 283990, 357720, 300378, 300379, 292194, 284015, 234864, 316786, 243073, 292242, 112019, 234902, 333224, 284086, 259513, 284090, 54719, 415170, 292291, 300488, 300490, 234957, 144862, 300526, 308722, 300539, 210429, 292359, 218632, 316951, 374297, 235069, 349764, 194118, 292424, 292426, 333389, 349780, 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, 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, 211239, 334121, 317738, 325930, 227655, 383309, 391521, 285031, 416103, 227702, 211327, 227721, 285074, 227730, 317851, 293275, 285083, 227743, 293281, 285089, 301482, 375211, 334259, 293309, 317889, 326083, 129484, 326093, 285152, 195044, 334315, 236020, 293368, 317949, 342537, 309770, 334345, 342560, 293420, 236080, 23093, 244279, 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, 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, 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, 294699, 286507, 319289, 237397, 188250, 237411, 327556, 188293, 311183, 294806, 294808, 319393, 294820, 294824, 343993, 98240, 294849, 24531, 294887, 278507, 311277, 327666, 278515 ]
9bdea79fa82967f5641a2ba7e9315ff8f541248c
6c21c42f18c18904c2b76fb7a0bd7463f2561560
/DLight/Profile.swift
c1290139b88a49801f628a6f2071570305982b99
[]
no_license
zzeleznick/ios-decal-proj4
ccf8243d41d08f4139a0d713e41cceabf08f61b8
9026c3fab613d603aa7a0d4513918fc8e6ad4604
refs/heads/master
2021-01-21T12:53:21.550534
2016-05-02T06:47:50
2016-05-02T06:47:50
55,576,333
0
0
null
null
null
null
UTF-8
Swift
false
false
4,150
swift
// // Profile.swift // DLight // // Created by Zach Zeleznick on 4/23/16. // Copyright © 2016 zzeleznick. All rights reserved. // import Foundation import UIKit extension String { static func random(length: Int = 20) -> String { let base = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" var randomString: String = "" for _ in 0..<length { let randomValue = arc4random_uniform(UInt32(base.characters.count)) randomString += "\(base[base.startIndex.advancedBy(Int(randomValue))])" } return randomString } } class CenterScaleToFitImageView: UIImageView { override var bounds: CGRect { didSet { adjustContentMode() } } override var image: UIImage? { didSet { adjustContentMode() } } func adjustContentMode() { guard let image = image else { return } if image.size.width > bounds.size.width || image.size.height > bounds.size.height { contentMode = .ScaleAspectFit } else { contentMode = .ScaleAspectFill } } } enum DiabeticStatus:Int, CustomStringConvertible { case NONE = 0, TYPEI, TYPEII var description:String { switch self { case .NONE: return "None" case .TYPEI: return "Type I" case .TYPEII: return "Type II" } } func toString() -> String { return self.description } } enum ActivityLevel:Int, CustomStringConvertible { case LOW = 0, MEDIUM, HIGH var description:String { switch self { case .LOW: return "Low Activity" case .MEDIUM: return "Medium Activity" case .HIGH: return "High Activity" } } func toString() -> String { return self.description } } class AgeRange: CustomStringConvertible { var age: Int! init(age: Int) { self.age = age } var description:String { switch self.age { case let age where age >= 90: return "90+" case 75..<90: return "75-90" case 60..<75: return "60-75" case 50..<60: return "50-60" case 40..<50: return "40-50" case 35..<40: return "35-40" case 30..<35: return "30-35" case 25..<30: return "25-30" case 20..<25: return "20-25" case 16..<20: return "16-20" case 0..<16: return "Under 16" default: return "Unspecified" } } } class Restrictions: CustomStringConvertible { var members: [String]! init(members: [String]) { self.members = members } var description: String { return self.members.joinWithSeparator(", ") } } class Profile: CustomStringConvertible { let randID = String.random(32) var name: String! var ageRange: AgeRange! var diabeticStatus: DiabeticStatus! var activityLevel: ActivityLevel! var intakeRestrictions: Restrictions! var dietaryRestrictions: Restrictions! init(name:String, age: Int, diabetes: Int, activity: Int, intakeRestrictions: [String], dietaryRestrictions: [String]) { self.name = name self.ageRange = AgeRange(age: age) self.diabeticStatus = DiabeticStatus(rawValue: diabetes) self.activityLevel = ActivityLevel(rawValue: activity) self.intakeRestrictions = Restrictions(members: intakeRestrictions) self.dietaryRestrictions = Restrictions(members: dietaryRestrictions) } lazy var dict: [String:String] = { [unowned self] in let out = ["Name": self.name!, "Age Range": "\(self.ageRange!)", "Diabetic Status": "\(self.diabeticStatus!)", "Activity Level": "\(self.activityLevel!)", "Intake Restrictions": "\(self.intakeRestrictions!)", "Dietary Restrictions": "\(self.dietaryRestrictions!)", ] return out }() var description: String { let out = "Profile{(\(self.name)}" return out } }
[ -1 ]
c021792ad8c64d503b18866f1958f6416cea95bd
bfde557b63f3af7f42e6ad5d43c78629d68bd0fa
/MVP-C/TransportDetailView/TransportCollectionViewCell.swift
adfbfdd13c4447d5869f05067c6ece0a986c73d9
[]
no_license
ruben-ml/coordinator-pattern
d57b794bb22332c86c950c5fd957770243439fff
28c9dd1f1dfdfb32ac587ba11c2afac03e58845f
refs/heads/main
2023-08-29T07:51:58.629512
2021-11-08T11:42:54
2021-11-08T11:42:54
407,465,438
0
0
null
null
null
null
UTF-8
Swift
false
false
426
swift
// // TransportCollectionViewCell.swift // MVP-C // // Created by Rubén Muñoz López on 21/9/21. // import UIKit class TransportCollectionViewCell: UICollectionViewCell { @IBOutlet weak var imageTransport: UIImageView! @IBOutlet weak var lblTransport: UILabel! func setupTransport(with field: Transport) { imageTransport.image = field.image lblTransport.text = field.title } }
[ -1 ]
b1fe5ff39f85ccfdf29c9d006578d19455825ca7
3c5865b93abee7332761361d6fe76c0edba5db30
/GM_iOSApp/GM_iOSAppUITests/GM_iOSAppUITests.swift
9de56a1ec0e5617fade561ac9f50eefd3cad59c8
[]
no_license
nikhil-code07/GM_iOSApp
94f525e32fcc7b043ee62706e2c87125309b9260
818f8c50b33000ea629e3488aab6ca5922f88301
refs/heads/master
2020-06-25T06:06:29.331273
2019-07-29T03:14:18
2019-07-29T03:14:18
199,225,225
0
0
null
null
null
null
UTF-8
Swift
false
false
1,171
swift
// // GM_iOSAppUITests.swift // GM_iOSAppUITests // // Created by Nikhil Murade on 7/27/19. // Copyright © 2019 Nikhil Murade. All rights reserved. // import XCTest class GM_iOSAppUITests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // 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. } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 333827, 243720, 282634, 313356, 305173, 241695, 237599, 223269, 229414, 315431, 292901, 315433, 354342, 325675, 354346, 278571, 124974, 282671, 102446, 229425, 102441, 243763, 313388, 321589, 241717, 215095, 229431, 180279, 319543, 213051, 288829, 325695, 286787, 288835, 307269, 237638, 313415, 285360, 239689, 233548, 315468, 311373, 196687, 278607, 311377, 354386, 333902, 329812, 315477, 223317, 354394, 200795, 323678, 315488, 315489, 45154, 321632, 280676, 313446, 215144, 227432, 217194, 194667, 233578, 278637, 307306, 319599, 288878, 278642, 284789, 131190, 284790, 249976, 288890, 292987, 215165, 131199, 227459, 194692, 235661, 278669, 241809, 323730, 278676, 311447, 153752, 327834, 284827, 329884, 278684, 299166, 278690, 233635, 215204, 311459, 284840, 299176, 278698, 284843, 184489, 278703, 323761, 184498, 278707, 125108, 180409, 280761, 278713, 295099, 227517, 299197, 280767, 258233, 223418, 299202, 139459, 309443, 176325, 131270, 301255, 227525, 299208, 280779, 233678, 282832, 321744, 227536, 301270, 301271, 229591, 280792, 356575, 311520, 325857, 334049, 280803, 182503, 338151, 319719, 307431, 295147, 317676, 286957, 125166, 125170, 313595, 125180, 184574, 125184, 309504, 125192, 217352, 125197, 125200, 194832, 227601, 325904, 125204, 319764, 278805, 334104, 315674, 282908, 311582, 125215, 299294, 282912, 233761, 278817, 211239, 282920, 125225, 317738, 325930, 311596, 321839, 315698, 98611, 125236, 332084, 307514, 282938, 278843, 168251, 287040, 319812, 311622, 227655, 280903, 319816, 323914, 201037, 282959, 229716, 289109, 168280, 379224, 323934, 391521, 239973, 381286, 285031, 313703, 416103, 280938, 242027, 242028, 321901, 354671, 354672, 287089, 278895, 227702, 199030, 315768, 315769, 139641, 291194, 248188, 223611, 313726, 211327, 291200, 311679, 291193, 240003, 158087, 313736, 227721, 242059, 311692, 285074, 227730, 240020, 190870, 315798, 190872, 291225, 285083, 293275, 317851, 242079, 227743, 285089, 293281, 283039, 305572, 156069, 289185, 301482, 311723, 289195, 377265, 338359, 299449, 319931, 311739, 293309, 278974, 311744, 317889, 291266, 278979, 326083, 278988, 289229, 281038, 326093, 278992, 283089, 373196, 281039, 283088, 279000, 242138, 176602, 285152, 369121, 291297, 279009, 195044, 188899, 242150, 279014, 319976, 279017, 311787, 281071, 319986, 236020, 279030, 311800, 279033, 317949, 279042, 283138, 233987, 287237, 377352, 322057, 309770, 342537, 279053, 182802, 303635, 283154, 279061, 303634, 254487, 279066, 188954, 322077, 291359, 227881, 293420, 289328, 283185, 236080, 279092, 23093, 234037, 244279, 244280, 338491, 234044, 301635, 309831, 55880, 322119, 377419, 303693, 281165, 301647, 281170, 326229, 309847, 189016, 115287, 332379, 111197, 295518, 287327, 242274, 244326, 279143, 279150, 281200, 287345, 313970, 287348, 301688, 244345, 189054, 287359, 291455, 297600, 303743, 301702, 164487, 279176, 311944, 334473, 316044, 311948, 311950, 184974, 316048, 311953, 316050, 336531, 287379, 326288, 227991, 295575, 289435, 303772, 221853, 205469, 285348, 314020, 279207, 295591, 248494, 318127, 293552, 295598, 285362, 279215, 287412, 166581, 299698, 154295, 164532, 342705, 287418, 314043, 303802, 66243, 291529, 287434, 225996, 363212, 287438, 242385, 303826, 279253, 158424, 230105, 299737, 322269, 295653, 342757, 289511, 230120, 330473, 310731, 285419, 330476, 289517, 279278, 170735, 312046, 234216, 215790, 125683, 230133, 199415, 234233, 242428, 279293, 205566, 322302, 289534, 299777, 291584, 228099, 285443, 291591, 295688, 346889, 285450, 264971, 312076, 322312, 326413, 322320, 285457, 295698, 166677, 291605, 283418, 285467, 326428, 221980, 281378, 234276, 283431, 262952, 262953, 279337, 318247, 318251, 262957, 289580, 164655, 328495, 301872, 242481, 303921, 234290, 285493, 230198, 285496, 301883, 201534, 281407, 289599, 222017, 295745, 342846, 293702, 318279, 283466, 281426, 279379, 295769, 201562, 244569, 281434, 322396, 230238, 275294, 301919, 293729, 230239, 279393, 349025, 281444, 303973, 279398, 351078, 243592, 177002, 308075, 242540, 242542, 310132, 295797, 201590, 207735, 228214, 295799, 177018, 269179, 279418, 308093, 314240, 291713, 158594, 330627, 240517, 287623, 299912, 416649, 279434, 236427, 316299, 252812, 228232, 189327, 308111, 308113, 320394, 234382, 293780, 310166, 289691, 209820, 277404, 240543, 283551, 310177, 289699, 189349, 293673, 289704, 293801, 279465, 326571, 177074, 304050, 326580, 289720, 326586, 289723, 189373, 213956, 281541, 345030, 19398, 213961, 326602, 279499, 56270, 191445, 183254, 304086, 183258, 234469, 340967, 304104, 314343, 324587, 183276, 289773, 203758, 320495, 234476, 320492, 287730, 277493, 240631, 320504, 312313, 214009, 312317, 328701, 328705, 234499, 293894, 320520, 230411, 320526, 330766, 234513, 238611, 140311, 293911, 238617, 197658, 316441, 330789, 248871, 132140, 113710, 189487, 281647, 322609, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 160834, 336962, 314437, 349254, 238663, 300109, 207954, 234578, 205911, 296023, 314458, 156763, 277600, 281698, 281699, 230500, 285795, 214116, 322664, 228457, 318571, 279659, 234606, 300145, 238706, 312435, 187508, 279666, 230514, 302202, 285819, 314493, 285823, 150656, 234626, 279686, 222344, 318602, 285834, 228492, 337037, 234635, 177297, 162962, 187539, 326803, 308375, 324761, 285850, 296091, 119965, 302239, 330912, 300192, 339106, 234655, 306339, 234662, 300200, 249003, 208044, 238764, 322733, 3243, 302251, 279729, 294069, 300215, 294075, 339131, 228541, 64699, 148674, 283846, 312519, 279752, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 279775, 304352, 298209, 304353, 310496, 279780, 228587, 279789, 290030, 302319, 251124, 316661, 283894, 234741, 279803, 208123, 292092, 228608, 320769, 234756, 322826, 242955, 318732, 177420, 312588, 126229, 245018, 320795, 318746, 320802, 304422, 130342, 130344, 292145, 298290, 312628, 345398, 300342, 159033, 333114, 333115, 286012, 222523, 181568, 279872, 279874, 216387, 294210, 286019, 193858, 372039, 300354, 304457, 345418, 230730, 300355, 296269, 234830, 224591, 238928, 294220, 296274, 314708, 318804, 283990, 314711, 357720, 300378, 300379, 316764, 294236, 234330, 314721, 292194, 230757, 281958, 314727, 134504, 306541, 314734, 284015, 234864, 312688, 316786, 327023, 314740, 296304, 314742, 327030, 230772, 314745, 290170, 310650, 224637, 306558, 290176, 243073, 179586, 306561, 314752, 294278, 314759, 296328, 296330, 298378, 318860, 314765, 304523, 292242, 279955, 112019, 306580, 224662, 234902, 282008, 314776, 314771, 318876, 282013, 290206, 148899, 314788, 314790, 282023, 333224, 298406, 245160, 241067, 279980, 314797, 279979, 286128, 173492, 286133, 284086, 279988, 284090, 302523, 228796, 310714, 54719, 415170, 292291, 302530, 280003, 228804, 310725, 300488, 306630, 306634, 339403, 280011, 302539, 370122, 300490, 329168, 312785, 327122, 222674, 280020, 329170, 234957, 310735, 280025, 310747, 239069, 144862, 286176, 320997, 310758, 187877, 280042, 280043, 191980, 300526, 337391, 329198, 282097, 308722, 296434, 306678, 40439, 191991, 288248, 286201, 300539, 288252, 312830, 290304, 286208, 245249, 228868, 323079, 292359, 218632, 230922, 323083, 302602, 294413, 329231, 304655, 323088, 282132, 230933, 302613, 316951, 282135, 374297, 302620, 313338, 222754, 282147, 306730, 245291, 312879, 230960, 288305, 239159, 290359, 323132, 235069, 157246, 288319, 288322, 280131, 349764, 310853, 124486, 282182, 288328, 286281, 292426, 194118, 333389, 224848, 224852, 290391, 196184, 239192, 306777, 128600, 235096, 212574, 99937, 204386, 323171, 345697, 300645, 282214, 300643, 312937, 204394, 224874, 243306, 312941, 206447, 310896, 294517, 314997, 288377, 290425, 325246, 333438, 235136, 280193, 282244, 239238, 288391, 323208, 286344, 282248, 286351, 188049, 239251, 229011, 280217, 323226, 229021, 302751, 282272, 198304, 245413, 282279, 298664, 212649, 298666, 317102, 286387, 337590, 286392, 300729, 302778, 306875, 280252, 296636, 282302, 323262, 286400, 323265, 280253, 280259, 333508, 321220, 321217, 282309, 319176, 296649, 239305, 306891, 212684, 280266, 302798, 9935, 241360, 282321, 333522, 313042, 286419, 241366, 280279, 282330, 18139, 280285, 294621, 282336, 325345, 321250, 294629, 153318, 333543, 181992, 12009, 337638, 282347, 288492, 282349, 34547, 67316, 323315, 286457, 284410, 288508, 200444, 282366, 286463, 319232, 278273, 288515, 280326, 282375, 323335, 300810, 282379, 116491, 280333, 216844, 300812, 284430, 161553, 124691, 278292, 118549, 278294, 282390, 116502, 284436, 325403, 321308, 321309, 282399, 241440, 282401, 325411, 186148, 186149, 315172, 241447, 333609, 294699, 286507, 284460, 280367, 300849, 282418, 280373, 282424, 280377, 321338, 319289, 282428, 280381, 345918, 241471, 413500, 280386, 325444, 280391, 153416, 325449, 315209, 159563, 280396, 307024, 337746, 317268, 325460, 307030, 237397, 241494, 18263, 188250, 284508, 300893, 307038, 237411, 284515, 276326, 282471, 296807, 292713, 282476, 292719, 296815, 313200, 325491, 313204, 333687, 317305, 124795, 317308, 339840, 182145, 315265, 280451, 325508, 333700, 243590, 282503, 67464, 188293, 327556, 325514, 305032, 315272, 315275, 184207, 124816, 311183, 279218, 282517, 294806, 214936, 337816, 294808, 329627, 239515, 214943, 298912, 319393, 333727, 294820, 219046, 333734, 294824, 298921, 313257, 284584, 292783, 126896, 200628, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 24531, 231382, 329696, 323554, 292835, 6116, 190437, 292838, 294887, 317416, 313322, 278507, 329707, 298987, 296942, 311277, 124912, 327666, 278515, 325620, 239610 ]
62c54486c151ade904cd3384e81f881a06ed4f19
0942aa1e770515f0e7f358cdd20cd33bff6c4761
/project/project/Class/Controller/RegistHistoryViewController.swift
6e029afdf8c35461e0872f61707ad6e6d07bfb60
[]
no_license
yuyangdexue/swift-
e70abe2e4ef9d5417cb2453d3b7b314115d66d1f
e51d073710b40fffa2281a855dc8c68ea49ef896
refs/heads/master
2021-01-10T00:58:15.461629
2017-12-18T07:54:44
2017-12-18T07:54:44
52,080,421
3
1
null
null
null
null
UTF-8
Swift
false
false
885
swift
// // RegistHistoryViewController.swift // project // // Created by 于洋 on 16/1/8. // Copyright © 2016年 于洋. All rights reserved. // import UIKit class RegistHistoryViewController: BaseViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
a9c00a88607480feeb7fc57e2ce778dfc5688992
31e88870998cc0271592b4b7e9ceacff90870113
/SwimTracker/AppDelegate.swift
9c48b99b6fb4067870b7ebff60a3de8d6c86fe97
[]
no_license
Kduong125/SwimTracker
c6b1a5cd4be64f681479eeabf390f5ece40f5aa0
499dec5918ae3132302e013359ba10fcded87f81
refs/heads/master
2023-01-22T21:09:11.151534
2020-11-09T08:09:32
2020-11-09T08:09:32
308,422,832
0
0
null
null
null
null
UTF-8
Swift
false
false
1,472
swift
// // AppDelegate.swift // SwimTracker // // Created by Kenneth Duong on 10/16/20. // Copyright © 2020 Kenneth Duong. 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() return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 213048, 385081, 376889, 393275, 376905, 254030, 286800, 368735, 180320, 376931, 286831, 368752, 286844, 262283, 286879, 286888, 377012, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 336123, 418043, 336128, 385280, 262404, 180490, 368911, 262422, 377117, 262436, 336180, 262454, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 262507, 246123, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 410128, 393747, 254490, 188958, 385570, 33316, 197159, 377383, 352821, 188987, 418363, 385609, 385616, 352864, 369253, 262760, 352874, 352887, 254587, 336512, 377472, 148105, 377484, 352918, 344744, 361129, 434867, 164534, 336567, 328378, 328386, 352968, 344776, 418507, 385742, 385748, 361179, 369381, 361195, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 328522, 336714, 197468, 254812, 361309, 361315, 361322, 328573, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328714, 361489, 386069, 336921, 386073, 336925, 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, 386285, 328941, 386291, 345376, 345379, 410917, 337205, 345399, 378169, 369978, 337222, 337229, 263508, 402791, 345448, 271730, 378227, 271745, 353673, 181643, 181654, 230809, 181670, 181673, 181678, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 419362, 394786, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 419410, 345701, 394853, 222830, 370297, 403070, 403075, 345736, 345749, 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, 337659, 337668, 362247, 395021, 362255, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 329544, 345930, 370509, 247637, 337750, 370519, 313180, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337844, 346057, 346063, 247759, 329697, 354277, 190439, 247789, 354313, 378954, 395339, 338004, 329832, 329855, 329867, 329885, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 436473, 321786, 379134, 411903, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 248111, 362822, 436555, 190796, 354673, 248186, 420236, 379278, 354727, 338352, 330189, 338381, 338386, 338403, 338409, 248308, 199164, 330252, 420376, 330267, 354855, 10828, 199249, 346721, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 248504, 223934, 355024, 273108, 264918, 183005, 256734, 338660, 338664, 264941, 207619, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 387944, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 330748, 330760, 330768, 248862, 396328, 158761, 396336, 199728, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 339097, 248985, 44197, 380070, 339112, 330965, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 372015, 347441, 372018, 199988, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249224, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 249312, 339424, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 224904, 11918, 159374, 224913, 126610, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 257724, 224959, 257732, 224965, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 225020, 339710, 257790, 225025, 339721, 257804, 225038, 257807, 372499, 167700, 225043, 225048, 225053, 184094, 225058, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 397112, 225082, 397115, 225087, 323402, 257868, 257871, 225103, 397139, 225108, 225112, 257883, 257886, 225119, 339814, 225127, 257896, 274280, 257901, 225137, 225141, 257912, 225148, 257916, 225155, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 430129, 266294, 421960, 421990, 266350, 266362, 381068, 225423, 250002, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 266453, 225493, 225496, 225499, 225502, 225505, 356578, 225510, 225514, 372976, 381176, 397571, 389380, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 348502, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 250238, 389502, 356740, 332172, 373145, 340379, 389550, 324030, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 381481, 356907, 324139, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 324170, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 373398, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 357069, 332493, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 152370, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 357211, 430939, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 119674, 324475, 340858, 340861, 324478, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 324524, 340909, 324533, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 381946, 349180, 439294, 431106, 209943, 209946, 250914, 357410, 357418, 209965, 209971, 209975, 209979, 209987, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210039, 341113, 210044, 349308, 160895, 152703, 349311, 210052, 210055, 349319, 210067, 210071, 210077, 210080, 210084, 251044, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210143, 218354, 218360, 251128, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 415033, 251210, 357708, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 136590, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 366172, 333413, 423532, 210544, 415353, 333439, 415361, 267909, 333498, 210631, 333511, 333518, 358099, 153302, 333534, 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, 268143, 358255, 399215, 358259, 341876, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 333774, 358371, 350189, 350193, 350202, 350206, 350213, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 350467, 325891, 350475, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 268701, 416157, 342430, 375208, 375216, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 334358, 342550, 342554, 334363, 350761, 383536, 358961, 334384, 334394, 252482, 219718, 334407, 375400, 334465, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 260801, 350917, 391894, 154328, 416473, 64230, 342766, 375535, 203506, 342776, 391937, 391948, 326416, 375568, 375571, 375574, 162591, 326441, 326451, 326454, 244540, 326460, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 400306, 351168, 359361, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 261147, 359451, 211998, 261159, 359470, 343131, 384098, 384101, 367723, 384107, 187502, 384114, 343154, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 351423, 384191, 384198, 326855, 244937, 253130, 343244, 146642, 343270, 351466, 351479, 384249, 343306, 384269, 261389, 359694, 384275, 245020, 245029, 171302, 351534, 376110, 245040, 425276, 212291, 384323, 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, 359947, 359955, 359983, 327275, 245357, 138864, 155254, 155273, 368288, 425638, 155322, 425662, 155327, 155351, 155354, 212699, 155363, 245475, 245483, 155371, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 425845, 147317, 262005, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 253926, 204784, 393203, 393206, 253943, 360438, 393212, 155646 ]
05845e05243d1706084ba3a88d9f80efeaac67cb
a5a7a3c141e9f4c315c7ffc0e10743020fe9eb9e
/Cooked/AppDelegate.swift
0b8d40e0aba7ba141ddb892fce2b56132e99dbc7
[]
no_license
Maurice-Goldberg/Cooked
21a37fa129995bf1c2e3ad8b265e38987ee12fa1
0edcd163966f2347b2530af7d49ec3925c48648d
refs/heads/master
2022-04-13T01:34:58.927930
2020-04-10T03:34:15
2020-04-10T03:34:15
254,536,029
0
0
null
null
null
null
UTF-8
Swift
false
false
1,402
swift
// // AppDelegate.swift // Cooked // // Created by Maurice on 4/4/20. // Copyright © 2020 Maurice. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 163891, 213048, 376889, 385081, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 368752, 417924, 262283, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 393538, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 246123, 262507, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 328206, 410128, 393747, 254490, 188958, 385570, 33316, 377383, 197159, 352821, 188987, 418363, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 336512, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 328378, 164538, 328386, 352968, 344776, 352971, 418507, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 361288, 328522, 336714, 426841, 254812, 361309, 197468, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 66782, 222437, 328941, 386285, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181654, 230809, 181670, 181673, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 214610, 419410, 345701, 394853, 222830, 370297, 403070, 353919, 403075, 198280, 345736, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 419517, 337599, 419527, 419530, 419535, 272081, 419542, 394966, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 141051, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329867, 329885, 411805, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 321879, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 338409, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 436962, 338660, 338664, 264941, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 355175, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 158761, 199728, 330800, 396336, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 183383, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265432, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 339588, 421508, 224904, 224909, 11918, 159374, 224913, 126610, 339601, 224916, 224919, 126616, 224922, 208538, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 372499, 167700, 225048, 257819, 225053, 225058, 339747, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 257916, 225148, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 266297, 217157, 421960, 356439, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 225493, 266453, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348525, 332152, 389502, 250238, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 348743, 381512, 324170, 324173, 324176, 389723, 332380, 381545, 340627, 184982, 373398, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389892, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 340858, 324475, 430972, 340861, 324478, 119674, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 381946, 349180, 439294, 431106, 209943, 209946, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 341113, 349308, 210044, 349311, 152703, 160895, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 251044, 210084, 185511, 210088, 210095, 210098, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 218360, 251128, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 210260, 259421, 365921, 333154, 251235, 333162, 234866, 390516, 333175, 357755, 251271, 136590, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 415216, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 153227, 333498, 210631, 333511, 259788, 358099, 153302, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 210719, 358191, 366387, 210739, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 333818, 350202, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 375053, 268559, 350480, 432405, 350486, 350490, 325914, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 416157, 342430, 268701, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 375574, 162591, 326441, 326451, 326454, 326460, 244540, 260924, 375612, 326467, 244551, 326473, 326477, 326485, 326490, 342874, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 384107, 367723, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 367800, 384188, 384191, 351423, 384198, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 384249, 343306, 261389, 359694, 253200, 261393, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 384314, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 425649, 155322, 425662, 155327, 245460, 155351, 155354, 212699, 245475, 155363, 245483, 155371, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 147317, 262005, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 384977, 393169, 155611, 155619, 253923, 155621, 253926, 327654, 393203, 360438, 253943, 393206, 393212, 155646 ]
01d94c48073588dd46e9378389d485ee57ec97da
4d14d7912b3d7747d1d6b49118279d692524feec
/Reciplease/Model/CoreData/RecipeSave+CoreDataClass.swift
baeadf9d015463450144ee51aa39eae0a8b20a89
[]
no_license
deknyfgregory/Reciplease
30a63f331f661ea89715da7ab318eebf9cd84eb8
ee5318d4b48b88a929ef3e25be885b53ed5b17ad
refs/heads/master
2020-04-04T16:57:04.893689
2019-02-21T09:16:24
2019-02-21T09:16:24
null
0
0
null
null
null
null
UTF-8
Swift
false
false
251
swift
// // RecipeSave+CoreDataClass.swift // Reciplease // // Created by Gregory De knyf on 22/01/2019. // Copyright © 2019 De knyf Gregory. All rights reserved. // // import Foundation import CoreData public class RecipeSave: NSManagedObject { }
[ -1 ]
c7356d97670e4fa5cd0d2776f3c4801cdf72e6e2
0a1c55e96338a22ac87c3b5c0e3a959d04ba88d2
/AoC2019.playground/Sources/day5.swift
1184e16ec7b260196fa960510ec0dea9135fb6d6
[]
no_license
cnowacek/advent-of-code-2019
108083f5a5661fe43d3532a734d7fab07460b0a7
15407fa45eb244989a931fd32a3c7ba85b36009b
refs/heads/master
2020-09-26T20:49:36.692058
2019-12-20T21:29:44
2019-12-20T21:29:44
226,341,120
0
0
null
null
null
null
UTF-8
Swift
false
false
9,783
swift
import UIKit var intcode: [Int] = [3,225,1,225,6,6,1100,1,238,225,104,0,1101,40,71,224,1001,224,-111,224,4,224,1002,223,8,223,101,7,224,224,1,224,223,223,1102,66,6,225,1102,22,54,225,1,65,35,224,1001,224,-86,224,4,224,102,8,223,223,101,6,224,224,1,224,223,223,1102,20,80,225,101,92,148,224,101,-162,224,224,4,224,1002,223,8,223,101,5,224,224,1,224,223,223,1102,63,60,225,1101,32,48,225,2,173,95,224,1001,224,-448,224,4,224,102,8,223,223,1001,224,4,224,1,224,223,223,1001,91,16,224,101,-79,224,224,4,224,1002,223,8,223,101,3,224,224,1,224,223,223,1101,13,29,225,1101,71,70,225,1002,39,56,224,1001,224,-1232,224,4,224,102,8,223,223,101,4,224,224,1,223,224,223,1101,14,59,225,102,38,143,224,1001,224,-494,224,4,224,102,8,223,223,101,3,224,224,1,224,223,223,1102,30,28,224,1001,224,-840,224,4,224,1002,223,8,223,101,4,224,224,1,223,224,223,4,223,99,0,0,0,677,0,0,0,0,0,0,0,0,0,0,0,1105,0,99999,1105,227,247,1105,1,99999,1005,227,99999,1005,0,256,1105,1,99999,1106,227,99999,1106,0,265,1105,1,99999,1006,0,99999,1006,227,274,1105,1,99999,1105,1,280,1105,1,99999,1,225,225,225,1101,294,0,0,105,1,0,1105,1,99999,1106,0,300,1105,1,99999,1,225,225,225,1101,314,0,0,106,0,0,1105,1,99999,107,677,226,224,1002,223,2,223,1005,224,329,1001,223,1,223,8,226,226,224,102,2,223,223,1006,224,344,101,1,223,223,7,226,677,224,1002,223,2,223,1005,224,359,101,1,223,223,1007,677,226,224,1002,223,2,223,1005,224,374,1001,223,1,223,1007,677,677,224,1002,223,2,223,1006,224,389,101,1,223,223,1008,226,226,224,1002,223,2,223,1005,224,404,1001,223,1,223,108,677,226,224,1002,223,2,223,1006,224,419,1001,223,1,223,1108,677,226,224,102,2,223,223,1006,224,434,1001,223,1,223,108,226,226,224,1002,223,2,223,1005,224,449,101,1,223,223,7,677,677,224,1002,223,2,223,1006,224,464,1001,223,1,223,8,226,677,224,1002,223,2,223,1005,224,479,1001,223,1,223,107,226,226,224,102,2,223,223,1006,224,494,101,1,223,223,1007,226,226,224,1002,223,2,223,1005,224,509,1001,223,1,223,1107,226,677,224,102,2,223,223,1005,224,524,1001,223,1,223,108,677,677,224,1002,223,2,223,1005,224,539,101,1,223,223,1107,677,226,224,102,2,223,223,1005,224,554,1001,223,1,223,107,677,677,224,1002,223,2,223,1005,224,569,101,1,223,223,8,677,226,224,102,2,223,223,1005,224,584,1001,223,1,223,7,677,226,224,102,2,223,223,1006,224,599,101,1,223,223,1008,677,677,224,1002,223,2,223,1005,224,614,101,1,223,223,1008,677,226,224,102,2,223,223,1006,224,629,1001,223,1,223,1108,677,677,224,102,2,223,223,1006,224,644,101,1,223,223,1108,226,677,224,1002,223,2,223,1005,224,659,1001,223,1,223,1107,226,226,224,102,2,223,223,1006,224,674,1001,223,1,223,4,223,99,226] var inputValues = [5] enum ParamMode { case position case immediate } struct Parameter { let value: Int let mode: ParamMode } extension Parameter: CustomDebugStringConvertible { var debugDescription: String { return mode == ParamMode.position ? "[\(value)]" : "\(value)" } } enum Instruction { case add(param1: Parameter, param2: Parameter, destination: Int) case multiply(param1: Parameter, param2: Parameter, destination: Int) case input(param1: Parameter) case output(param1: Parameter) case jumpIfTrue(param1: Parameter, param2: Parameter) case jumpIfFalse(param1: Parameter, param2: Parameter) case lessThan(param1: Parameter, param2: Parameter, destination: Int) case equals(param1: Parameter, param2: Parameter, destination: Int) case halt var numValues: Int { switch self { case .add: return 4 case .multiply: return 4 case .input: return 2 case .output: return 2 case .jumpIfTrue: return 3 case .jumpIfFalse: return 3 case .lessThan: return 4 case .equals: return 4 case .halt: return 1 } } var code: String { switch self { case .add: return "ADD" case .multiply: return "MULT" case .input: return "IN" case .output: return "OUT" case .jumpIfTrue: return "JIT" case .jumpIfFalse: return "JIF" case .lessThan: return "LEST" case .equals: return "EQUA" case .halt: return "HALT" } } } extension Instruction: CustomDebugStringConvertible { var debugDescription: String { return "\(code)" } } func instructionAt(pointer: Int, program: [Int]) -> Instruction { let opValue = program[pointer] var opValueString = "\(opValue)" // Prepend 0's for _ in 0..<(5-opValueString.count) { opValueString.insert("0", at: opValueString.startIndex) } let opCodeString = opValueString.suffix(2) let opCode = Int(opCodeString)! let param3Mode = opValueString[opValueString.startIndex] == "1" ? ParamMode.immediate : ParamMode.position let param2Mode = opValueString[opValueString.index(opValueString.startIndex, offsetBy: 1)] == "1" ? ParamMode.immediate : ParamMode.position let param1Mode = opValueString[opValueString.index(opValueString.startIndex, offsetBy: 2)] == "1" ? ParamMode.immediate : ParamMode.position switch opCode { case 1: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) let param2 = Parameter(value: program[pointer + 2], mode: param2Mode) return .add(param1: param1, param2: param2, destination: program[pointer + 3]) case 2: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) let param2 = Parameter(value: program[pointer + 2], mode: param2Mode) return .multiply(param1: param1, param2: param2, destination: program[pointer + 3]) case 3: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) return .input(param1: param1) case 4: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) return .output(param1: param1) case 5: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) let param2 = Parameter(value: program[pointer + 2], mode: param2Mode) return .jumpIfTrue(param1: param1, param2: param2) case 6: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) let param2 = Parameter(value: program[pointer + 2], mode: param2Mode) return .jumpIfFalse(param1: param1, param2: param2) case 7: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) let param2 = Parameter(value: program[pointer + 2], mode: param2Mode) return .lessThan(param1: param1, param2: param2, destination: program[pointer + 3]) case 8: let param1 = Parameter(value: program[pointer + 1], mode: param1Mode) let param2 = Parameter(value: program[pointer + 2], mode: param2Mode) return .equals(param1: param1, param2: param2, destination: program[pointer + 3]) case 99: return .halt default: fatalError("Unknown Opcode: \(opCode)") } } func execute(instruction: Instruction, pointer: Int) -> Int { print("Executing \(instruction) at \(pointer)") switch instruction { case .add(let param1, let param2, let destination): let operand1 = (param1.mode == ParamMode.position) ? intcode[param1.value] : param1.value let operand2 = (param2.mode == ParamMode.position) ? intcode[param2.value] : param2.value intcode[destination] = operand1 + operand2 case .multiply(let param1, let param2, let destination): let operand1 = (param1.mode == ParamMode.position) ? intcode[param1.value] : param1.value let operand2 = (param2.mode == ParamMode.position) ? intcode[param2.value] : param2.value intcode[destination] = operand1 * operand2 case .input(let param1): // TODO: Add stdin? let input = inputValues.removeFirst() intcode[param1.value] = input break case .output(let param1): if param1.mode == ParamMode.position { print(intcode[param1.value]) } else { print(param1.value) } case .jumpIfTrue(let param1, let param2): let operand1 = (param1.mode == ParamMode.position) ? intcode[param1.value] : param1.value let operand2 = (param2.mode == ParamMode.position) ? intcode[param2.value] : param2.value if operand1 != 0 { return operand2 } case .jumpIfFalse(let param1, let param2): let operand1 = (param1.mode == ParamMode.position) ? intcode[param1.value] : param1.value let operand2 = (param2.mode == ParamMode.position) ? intcode[param2.value] : param2.value if operand1 == 0 { return operand2 } case .lessThan(let param1, let param2, let destination): let operand1 = (param1.mode == ParamMode.position) ? intcode[param1.value] : param1.value let operand2 = (param2.mode == ParamMode.position) ? intcode[param2.value] : param2.value if operand1 < operand2 { intcode[destination] = 1 } else { intcode[destination] = 0 } case .equals(let param1, let param2, let destination): let operand1 = (param1.mode == ParamMode.position) ? intcode[param1.value] : param1.value let operand2 = (param2.mode == ParamMode.position) ? intcode[param2.value] : param2.value if operand1 == operand2 { intcode[destination] = 1 } else { intcode[destination] = 0 } case .halt: return -1 } return pointer + instruction.numValues } public func day5() { var ipx = 0 while ipx >= 0 { let instruction = instructionAt(pointer: ipx, program: intcode) ipx = execute(instruction: instruction, pointer: ipx) } }
[ -1 ]
8b5b09d23f1864520add39bee365953ff10dd061
a9e75bbdb6818f3cf9632c356c8c956af67cb57f
/apiApp/AppDelegate.swift
4222dd1b5da9401c3fc43e4bb912803a3cc10085
[]
no_license
mrEdo/apiAppIOS
42be8a119ca068ec59e755ade624a2e93f6f8161
1d79ca1dabbadc1141ecb8a2e9b8483c2f43d33d
refs/heads/master
2020-06-07T10:01:49.522641
2019-06-27T23:52:26
2019-06-27T23:52:26
192,994,443
0
0
null
null
null
null
UTF-8
Swift
false
false
2,159
swift
// // AppDelegate.swift // apiApp // // Created by admin on 6/20/19. // Copyright © 2019 admin. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 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, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 279178, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 287390, 303773, 172705, 287394, 172707, 303780, 164509, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 213895, 304009, 304011, 230284, 304013, 295822, 279438, 213902, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 132165, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 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, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 142226, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 298365, 290174, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 298822, 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, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307386, 258235, 307388, 307385, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 276052, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 176592, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 283142, 127494, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 316294, 201603, 226182, 308105, 234375, 226185, 234379, 324490, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 226200, 234396, 234398, 291742, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 291754, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 234437, 226245, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 234648, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 226500, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 275725, 349451, 349464, 415009, 283939, 259367, 283951, 292143, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 227426, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 276053, 284249, 284251, 300638, 284253, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 284290, 325250, 284292, 292485, 292479, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 284566, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 301163, 350313, 350316, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 252022, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 227571, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 293706, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
919738e5ff95812813360bbb007a868ceefc696e
0289afc95400563e8d3434aa45f061bdc3160292
/Sources/Bridge.swift
f0438a42cf7ace104bd492db327fec8d8530cf37
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
liamnichols/RbSwift
2b3e6c49f2d14443c92311c9ac9c1646ecb76645
522a1211258379df045cfdac1486c9bed2ee78bd
refs/heads/master
2020-09-05T12:24:34.900365
2019-11-06T23:12:58
2019-11-06T23:12:58
220,103,609
0
0
MIT
2019-11-06T22:38:22
2019-11-06T22:38:22
null
UTF-8
Swift
false
false
2,266
swift
// // Bridgeswift // RbSwift // // Created by draveness on 17/04/2017 // Copyright © 2017 draveness All rights reserved // import Foundation public extension NSString { var bridge: String { return self as String } } public extension String { var bridge: NSString { return self as NSString } } public extension NSData { var bridge: Data { return self as Data } } public extension Data { var bridge: NSData { return self as NSData } } public extension NSURL { var bridge: URL { return self as URL } } public extension URL { var bridge: NSURL { return self as NSURL } } public extension NSIndexPath { var bridge: IndexPath { return self as IndexPath } } public extension IndexPath { var bridge: NSIndexPath { return self as NSIndexPath } } public extension NSError { var bridge: Error { return self as Error } } public extension Error { var bridge: NSError { return self as NSError } } public extension NSIndexSet { var bridge: IndexSet { return self as IndexSet } } public extension IndexSet { var bridge: NSIndexSet { return self as NSIndexSet } } public extension NSCalendar { var bridge: Calendar { return self as Calendar } } public extension Calendar { var bridge: NSCalendar { return self as NSCalendar } } public extension NSTimeZone { var bridge: TimeZone { return self as TimeZone } } public extension TimeZone { var bridge: NSTimeZone { return self as NSTimeZone } } public extension NSDate { var bridge: Date { return self as Date } } public extension Date { var bridge: NSDate { return self as NSDate } } public extension NSURLRequest { var bridge: URLRequest { return self as URLRequest } } public extension URLRequest { var bridge: NSURLRequest { return self as NSURLRequest } } public extension NSURLComponents { var bridge: URLComponents { return self as URLComponents } } public extension URLComponents { var bridge: NSURLComponents { return self as NSURLComponents } }
[ -1 ]
9af6e52ccb4e68a689af1d448d9dd60a9fd102f6
969aed1e981a46a19297f495be9461df920a7663
/Aelf/AelfApp/Classes/Modules/Discover/Models/DappActionType.swift
6f4160391e3c7afb3f02ac5521f4cd98acbcb1e6
[ "MIT" ]
permissive
mohsinalimat/aelf-wallet-ios
bc7229c7551657cb83a33b611c5ccdedd2bdf163
705e466e9225b7a7028c7f2d20f5178e4404f2a5
refs/heads/master
2021-01-30T14:38:30.935486
2020-02-24T08:33:29
2020-02-24T08:33:29
243,502,066
1
0
MIT
2020-02-27T11:22:23
2020-02-27T11:22:22
null
UTF-8
Swift
false
false
314
swift
// // DappActionType.swift // AElfApp // // Created by 晋先森 on 2019/12/9. // Copyright © 2019 AELF. All rights reserved. // import Foundation enum DappActionType: String,CaseIterable { case connect case account case invoke case invokeRead case api case disconnect }
[ -1 ]
c69c390ba1a26d2709171c43e6244deb41496b07
5afd7acfa420a5e23ecaf9f3c18aa1747e8d594f
/2Guesstheflag/2Guesstheflag/ViewController.swift
36f2c9a36dadc32046677ad4fba90d4686506da2
[]
no_license
vishwanath79/Swifthack
760669cbd97f9753bd66db1de8ee4f06418837f5
7d4ebf5992a14d389f9f4c81cd9223da08744e9a
refs/heads/master
2020-04-12T08:07:13.827922
2016-10-11T05:25:29
2016-10-11T05:25:29
61,445,957
0
0
null
null
null
null
UTF-8
Swift
false
false
2,820
swift
// // ViewController.swift // 2Guesstheflag // // Created by Subramanian, Vishwanath on 6/15/16. // Copyright © 2016 Vish. All rights reserved. // import UIKit import GameKit class ViewController: UIViewController { @IBOutlet var button1: UIButton! @IBOutlet var button2: UIButton! @IBOutlet var button3: UIButton! var countries = [String]() var correctAnswer = 0 var score = 0 override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. countries.append("estonia") countries.append("france") countries.append("germany") countries.append("ireland") countries.append("italy") countries.append("monaco") countries.append("nigeria") countries.append("poland") countries.append("russia") countries.append("spain") countries.append("uk") countries.append("us") button1.layer.borderWidth = 1 button2.layer.borderWidth = 1 button3.layer.borderWidth = 1 button1.layer.borderColor = UIColor.lightGrayColor().CGColor button2.layer.borderColor = UIColor.lightGrayColor().CGColor button3.layer.borderColor = UIColor.lightGrayColor().CGColor askQuestion(nil) } func askQuestion(action: UIAlertAction!) { countries = GKRandomSource.sharedRandom().arrayByShufflingObjectsInArray(countries) as! [String] button1.setImage(UIImage(named: countries[0]), forState: .Normal) button2.setImage(UIImage(named: countries[1]), forState: .Normal) button3.setImage(UIImage(named: countries[2]), forState: .Normal) correctAnswer = GKRandomSource.sharedRandom().nextIntWithUpperBound(3) title = countries[correctAnswer].uppercaseString } @IBAction func buttonTapped(sender: UIButton) { var title: String if sender.tag == correctAnswer { title = "Correct" score += 1 } else { title = "Incorrect" score -= 1 } let ac = UIAlertController(title: title, message: "Your score is \(score)", preferredStyle: .Alert) ac.addAction(UIAlertAction(title: "Continue", style: .Default, handler: askQuestion)) //ac.addAction(UIAlertAction(title: "Continue", style: .Default, handler: { (UIAlertAction) in // self.askQuestion() //})) presentViewController(ac, animated: true, completion: nil) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
340aebd305a47d813990d1d3b1a23f0622b865aa
d01bf67e765efaed05296be14df9cb9577d129da
/Tests/LinuxMain.swift
9d22008db896161f91324f4163674cb306336b31
[ "Apache-2.0" ]
permissive
miolabs/MIODBPostgreSQL
89f86c16ec52561f98e3b927516ef2b6feb41f57
baca7993bb01275e23bdc2fb04799ea1cad82ead
refs/heads/master
2023-08-09T04:56:23.903058
2023-07-24T06:39:30
2023-07-24T06:39:30
234,872,799
0
0
null
2023-04-22T10:25:20
2020-01-19T09:24:13
Swift
UTF-8
Swift
false
false
132
swift
import XCTest import MIODBPostgreSQLTests var tests = [XCTestCaseEntry]() tests += MIODBPostgreSQLTests.allTests() XCTMain(tests)
[ 248320, 45058, 254467, 222725, 145938, 35347, 238613, 323613, 217120, 342562, 333349, 224296, 35372, 199216, 168501, 54336, 253504, 175173, 187467, 352334, 341076, 184406, 327256, 345191, 139367, 312943, 253046, 346746, 347259, 323711, 160899, 258709, 315548, 343205, 314022, 352942, 229049, 325305, 222401, 323781, 339668, 254173, 352992, 323818, 329453, 211187, 315124, 337651, 194809, 319236, 374023, 208138, 136462, 315151, 353048, 347418, 342307, 334116, 341808, 347444, 321846, 368445, 325452, 323408, 253782, 253786, 253790, 351071, 38753, 253794, 244581, 211814, 246117, 253802, 351083, 106860, 316780, 253810, 240501, 421793, 344504, 343486, 326592, 373199, 340946, 319458, 241123, 319462, 340969, 247798 ]
fcb24c94a724782f979be7ca5dab59c6753f4429
e2ab2bc8d7abe7842bda39403f6cac47ab5e6d7e
/Tareas/Tarea 4/Tarea 4/Helper.swift
8c28ac0500d398fbddf5c3d67e46238b35d54d0f
[]
no_license
tonymanpro/CursoIOsTony
2bc4046b1874a43b8af222d57a6d93a19b0dca70
fee7faf356ccaa6afbcc8fcbd7dc983e1b36b229
refs/heads/master
2020-12-30T11:39:23.326373
2017-06-06T22:09:08
2017-06-06T22:09:08
91,507,316
0
0
null
2017-05-16T21:49:46
2017-05-16T21:45:03
Swift
UTF-8
Swift
false
false
630
swift
// // Helper.swift // Tarea 4 // // Created by IMPESA S.A on 6/4/17. // Copyright © 2017 IMPESA S.A. All rights reserved. // import Foundation import UIKit extension UIViewController{ class func getViewControllerIdentifier() -> String{ return String(describing: self) } } extension UITableViewCell{ class func getTableViewCellIdentifier() -> String{ return String(describing: self) } } extension UITableView{ func registerCustomCell(identifier: String){ let nib = UINib(nibName: identifier, bundle: nil) self.register(nib, forCellReuseIdentifier: identifier) } }
[ -1 ]
f2ba7156da26f259a307456ade3aecc89a090e34
f1ba256274c73092235990900749665bbd00311b
/SQLiteSwiftUI/SQLiteSwiftUIApp.swift
99a6fe40ba1cb6b0055223aa07f717fd962e7a0a
[]
no_license
yokomotoh/SQLiteSwiftUI
59750839595780ad9d47b27ad6f2721fd7779f37
bf5a247dcd36d74ac27830cc8c562be9eb4c87ce
refs/heads/main
2023-09-05T09:56:34.573602
2021-11-17T20:54:33
2021-11-17T20:54:33
429,196,587
3
1
null
null
null
null
UTF-8
Swift
false
false
247
swift
// // SQLiteSwiftUIApp.swift // SQLiteSwiftUI // // Created by vincent schmitt on 17/11/2021. // import SwiftUI @main struct SQLiteSwiftUIApp: App { var body: some Scene { WindowGroup { ContentView() } } }
[ -1 ]
dd19bcb9dfe495977c0bfc2486dcb52286ace10b
7125f186941ce41002c14e6986c40402f5997425
/HouseOfToday/HouseOfToday/Utility/Extensions/AlertExtension.swift
f43ff8f8e2b1f47f348481184be9938b71be87f6
[ "MIT" ]
permissive
DanJeong-KR/iOSHouseOfToday
7d5d7a8760eb3d945964671d92637ff44b6823bd
96505967a66f84b1e755fa9385c98d27aa4a49a6
refs/heads/master
2022-01-17T04:49:39.593872
2019-09-05T07:44:42
2019-09-05T07:44:42
195,509,668
1
0
null
null
null
null
UTF-8
Swift
false
false
1,708
swift
/** * Copyright 2015-2018 Kakao Corp. * * 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 UIKit extension UIAlertController { static func showMessage(_ message: String) { showAlert(title: "", message: message, actions: [UIAlertAction(title: "OK", style: .cancel, handler: nil)]) } static func showAlert(title: String?, message: String?, actions: [UIAlertAction]) { DispatchQueue.main.async { let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) for action in actions { alert.addAction(action) } if let navigationController = UIApplication.shared.keyWindow?.rootViewController as? UINavigationController, let presenting = navigationController.topViewController { presenting.present(alert, animated: true, completion: nil) } } } static func show(_ message: String, _ handler: ((UIAlertAction) -> Void)?) -> UIAlertController { let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert) let action = UIAlertAction(title: "확인", style: .cancel, handler: handler) alert.addAction(action) return alert } }
[ -1 ]
04d4d0b773c5bb80cdfbd17fbb85083ce645f75c
c8f6dbdbeed0f7b404ba832cb6e38bb9609ec31a
/BreakingBad/View Controller/ViewDetailController.swift
0d0710780c162ec99250f2cc05766c9fa5557d2d
[]
no_license
ZolaniChamane/BreakingBad
90c178a8547c775112d161345e849c44a24180d0
c11f48f0317547c6900bd14f63fc31358733b594
refs/heads/master
2022-12-11T11:37:24.529766
2020-08-02T23:12:39
2020-08-02T23:12:39
283,574,591
0
0
null
null
null
null
UTF-8
Swift
false
false
390
swift
// // ViewDetailController.swift // BreakingBad // // Created by Zolani Chamane on 2020/08/01. // Copyright © 2020 Zolani Chamane. All rights reserved. // import UIKit class ViewDetailController: UIViewController { var Name = "" var NickName = "" override func viewDidLoad() { super.viewDidLoad() self.navigationItem.title = self.Name } }
[ -1 ]
190f4fe6865585eb44e37eb33275102637489ad6
309eaabb7170196cd4cfc74a353f82b2c9370cae
/GitTesting/AppDelegate.swift
360af891cfa68672b61e4bdec4fd6c1a9b268d32
[]
no_license
hfigor/GitTesting
d630ebc852d2aa820f8e6d0e03f35bb3850503f1
462ae8c5f555fffb5358709f8947877b6f1d0f11
refs/heads/master
2020-04-22T11:19:25.981268
2019-02-11T21:22:09
2019-02-11T21:22:09
170,335,846
0
0
null
null
null
null
UTF-8
Swift
false
false
2,178
swift
// // AppDelegate.swift // GitTesting // // Created by Frank Cipolla on 2/7/19. // Copyright © 2019 Frank Cipolla. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 294924, 229388, 229391, 327695, 229394, 229397, 229399, 229402, 278556, 229405, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 234648, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 148946, 222676, 280021, 239064, 288217, 329177, 280027, 288220, 288214, 239070, 288218, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 320998, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 206336, 296450, 148990, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 313027, 280260, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 354656, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 290321, 323090, 282130, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 176592, 127440, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 283142, 127494, 135689, 233994, 127497, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 324490, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 226230, 234422, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 324757, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 275725, 349464, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 276206, 358128, 284399, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 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, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 277329, 162643, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 326638, 277486, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 237562 ]
c41013adfcaaebb1a55abc618947a0c62ab8cf7c
66d389ac15e2a3582a16ea1de912dca42b399ce9
/yemeksepeti-ios/Modules/NetworkAPI/NetworkAPI/Source/Enums/Task.swift
e65fefa5d7d5d6cadb9eb69b9d4cd0afd7690f9d
[]
no_license
semraince/FeedMeProject
ab27cb96fc27e77f37b592cc69a3e2da63d3e0de
b60c2b43d41b947548b5123a2a5e1f62263dc4f0
refs/heads/master
2023-07-17T16:02:32.199030
2021-08-22T21:59:06
2021-08-22T21:59:06
null
0
0
null
null
null
null
UTF-8
Swift
false
false
209
swift
// // Task.swift // yemeksepeti // // Created by semra on 14.08.2021. // import Foundation public typealias Parameters = [String: Any] public enum Task { case plain case parameters(Parameters) }
[ -1 ]
c9e6c04f62e0a4dc85d1efc43eb507981ddbec3e
7b3a6531b85f36b27797bf16f473bc8241549687
/EARS/EARS/Managers/QRCodeManager.swift
94a6340c2f4779a8db6535d716b0a877bce35ec1
[ "Apache-2.0" ]
permissive
C4DMH/EARS-iOS-Public
ecf02b8c09a75df92531f7e13317401387a75aae
0cd28b63d32adfb38874a23dbc5c1cd0ffb0573b
refs/heads/master
2022-04-17T18:30:47.062345
2020-04-10T23:17:44
2020-04-10T23:17:44
254,729,899
3
0
null
null
null
null
UTF-8
Swift
false
false
2,486
swift
// // QRCodeManager.swift // EARS // // Created by Wyatt Reed on 4/2/19. // Copyright © 2019 UO Center for Digital Mental Health. All rights reserved. // import Foundation import AVFoundation import UIKit protocol CodeReader { func startReading(completion: @escaping (String) -> Void) func stopReading() var videoPreview: CALayer {get} } class QRCodeManager: NSObject{ fileprivate(set) var videoPreview = CALayer() fileprivate var captureSession: AVCaptureSession? fileprivate var didRead: ((String) -> Void)? override init() { super.init() //Make sure the device can handle video guard let videoDevice = AVCaptureDevice.default(for: .video), let deviceInput = try? AVCaptureDeviceInput(device: videoDevice) else { return } //session captureSession = AVCaptureSession() //input captureSession?.addInput(deviceInput) //output let captureMetadataOutput = AVCaptureMetadataOutput() captureSession?.addOutput(captureMetadataOutput) captureMetadataOutput.setMetadataObjectsDelegate(self, queue: DispatchQueue.main) //interprets qr codes only captureMetadataOutput.metadataObjectTypes = [.qr] //preview guard let captureSession = captureSession else { return } let captureVideoPreview = AVCaptureVideoPreviewLayer(session: captureSession) captureVideoPreview.videoGravity = .resizeAspectFill self.videoPreview = captureVideoPreview } } extension QRCodeManager: AVCaptureMetadataOutputObjectsDelegate { func metadataOutput(_ captureOutput: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) { guard let readableCode = metadataObjects.first as? AVMetadataMachineReadableCodeObject, let code = readableCode.stringValue else { return } //Vibrate the phone AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate)) stopReading() didRead?(code) } } extension QRCodeManager: CodeReader { func startReading(completion: @escaping (String) -> Void) { self.didRead = completion captureSession?.startRunning() } func stopReading() { captureSession?.stopRunning() } }
[ -1 ]
c360c070aaa69d5d1efbc4248ae8028361635584
8eb00b7dcc3f9e5c357a8c3590f8e06ffd7704b2
/Xcode projects/ConferenceMeetup/ConferenceMeetup/ContentView.swift
3c107367be4854fd3ab89648bb3aec5c88ca7ee5
[]
no_license
mkramar7/ios_projects
36d017711655b2ea8176666c7d948a4cf7660485
6b5e6da9360d2d6b4b2b8c15992ac91a1a8c5890
refs/heads/master
2023-05-15T05:09:58.680580
2021-06-15T16:12:49
2021-06-15T16:12:49
335,397,145
0
0
null
null
null
null
UTF-8
Swift
false
false
5,862
swift
// // ContentView.swift // ConferenceMeetup // // Created by Marko Kramar on 31/10/2020. // import SwiftUI import MapKit struct PhotoJson: Codable { var id: UUID var name: String } struct Photo: Identifiable, Comparable { var id: UUID var name: String var image: UIImage static func < (lhs: Photo, rhs: Photo) -> Bool { lhs.name < rhs.name } } class PhotoStore: ObservableObject { @Published var photos = [Photo]() init() { let filename = PhotoStore.getDocumentsDirectory().appendingPathComponent("SavedImages") do { let data = try Data(contentsOf: filename) let photosCodable = try JSONDecoder().decode([PhotoJson].self, from: data) for photoJson in photosCodable { let imageUrlToReadFrom = PhotoStore.getDocumentsDirectory().appendingPathComponent("\(photoJson.id).png") let image = UIImage(contentsOfFile: imageUrlToReadFrom.path) if image != nil { photos.append(Photo(id: photoJson.id, name: photoJson.name, image: image!)) } } } catch { print("Unable to load saved images") print("Exact error: \(error.localizedDescription)") } } func persist() { let filename = PhotoStore.getDocumentsDirectory().appendingPathComponent("SavedImages") var photosJson = [PhotoJson]() for photo in photos { let imageUrlToWriteTo = PhotoStore.getDocumentsDirectory().appendingPathComponent("\(photo.id).png") if let pngData = photo.image.pngData() { try? pngData.write(to: imageUrlToWriteTo) } photosJson.append(PhotoJson(id: photo.id, name: photo.name)) } do { let data = try JSONEncoder().encode(photosJson) try data.write(to: filename, options: [.atomicWrite]) } catch { print("Unable to save data") print("Exact error: \(error.localizedDescription)") } } static func getDocumentsDirectory() -> URL { let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask) return paths[0] } } struct InsertView: View { @State var photoStore: PhotoStore @State private var showingImagePicker = false @State private var photoName = "" @State private var photoInputImage: UIImage? @Environment(\.presentationMode) var presentationMode var body: some View { NavigationView { VStack { Form { TextField("Photo name", text: $photoName) if photoInputImage != nil { Image(uiImage: photoInputImage!) .resizable() .scaledToFit() } } .onAppear { showingImagePicker = true } .sheet(isPresented: $showingImagePicker) { ImagePicker(image: $photoInputImage) } Button("Save") { savePhoto() } .disabled(isPhotoNameEmptyOrImageNotSelected()) } .navigationBarTitle(Text("Add photo")) } } func isPhotoNameEmptyOrImageNotSelected() -> Bool { photoName.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || photoInputImage == nil } func savePhoto() { self.photoStore.photos.append(Photo(id: UUID(), name: photoName, image: photoInputImage!)) self.photoStore.persist() self.presentationMode.wrappedValue.dismiss() } } struct DetailView: View { @State var photo: Photo var locationFetcher: LocationFetcher var body: some View { VStack { Form { TextField("Photo name", text: $photo.name) .disabled(true) Image(uiImage: photo.image) .resizable() .scaledToFit() } .navigationBarTitle(Text(photo.name), displayMode: .inline) MapView(centerCoordinate: locationFetcher.lastKnownLocation!, annotations: [createMkPointAnnotation(location: locationFetcher.lastKnownLocation!)]) .edgesIgnoringSafeArea(.all) } } func createMkPointAnnotation(location: CLLocationCoordinate2D) -> MKPointAnnotation { let locationAnnotation = MKPointAnnotation() locationAnnotation.coordinate = location locationAnnotation.title = "Place where photo is taken" return locationAnnotation } } struct ContentView: View { @ObservedObject private var photoStore = PhotoStore() @State private var showingInsertView = false let locationFetcher = LocationFetcher() var body: some View { NavigationView { List(photoStore.photos.sorted()) { photo in NavigationLink(destination: DetailView(photo: photo, locationFetcher: locationFetcher)) { Text("\(photo.name)") } } .navigationBarTitle(Text("Conference photos")) .navigationBarItems(trailing: Button(action: { self.showingInsertView = true }) { Image(systemName: "plus") }) .sheet(isPresented: $showingInsertView) { InsertView(photoStore: photoStore) } }.onAppear { self.locationFetcher.start() } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
[ -1 ]
ed8b2735a5dfc0f5be35442ddaee2145115b7ba2
d104bccf9c124a519535dd8218ede3129b407462
/WeatherGift/ListVC.swift
50a17e66ae93f3600b25e07aa0d134cd092aa614
[]
no_license
pcalabrese16/PCalabreseHW07
f2caaa134030216da06480d5e6821ac2de6890db
4ef20ef0bdf9cabf298b26d1ab71bf97ec536a4a
refs/heads/master
2021-01-23T04:58:27.983058
2017-04-01T20:14:25
2017-04-01T20:14:25
86,258,704
0
0
null
null
null
null
UTF-8
Swift
false
false
5,500
swift
// // ListVC.swift // WeatherGift // // Created by Patrick Calabrese on 3/16/17. // Copyright © 2017 Patrick Calabrese. All rights reserved. // import UIKit import GooglePlaces class ListVC: UIViewController { @IBOutlet weak var tableView: UITableView! @IBOutlet weak var editBarButton: UIBarButtonItem! @IBOutlet weak var addBarButton: UIBarButtonItem! var locationsArray = [String]() var currentPage = 0 override func viewDidLoad() { super.viewDidLoad() tableView.delegate = self tableView.dataSource = self tableView.reloadData() // Do any additional setup after loading the view. } // MARK: - Segues override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "ToPageVC" { let controller = segue.destination as! PageVC // identify the table cell (row) that the user tapped // This is passed back to PageVC as currentPage, so that PageVC knows which page to create and display currentPage = (tableView.indexPathForSelectedRow?.row)! controller.currentPage = currentPage controller.locationsArray = locationsArray } } // MARK: - @IBActions @IBAction func editButtonPressed(_ sender: UIBarButtonItem) { if tableView.isEditing == true { tableView.setEditing(false, animated: true) editBarButton.title = "Edit" addBarButton.isEnabled = true } else { tableView.setEditing(true, animated: true) editBarButton.title = "Done" addBarButton.isEnabled = false } } @IBAction func addButtonPressed(_ sender: UIBarButtonItem) { let autocompleteController = GMSAutocompleteViewController() autocompleteController.delegate = self present(autocompleteController, animated: true, completion: nil) } } extension ListVC: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return locationsArray.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "LocationCell", for: indexPath) cell.textLabel?.text = locationsArray[indexPath.row] return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // We do not need to put any code here because the cell triggers a segue } // MARK: - TableView Editing Functions func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { locationsArray.remove(at: indexPath.row) tableView.deleteRows(at: [indexPath], with: .fade) } } func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { // First make a copy of the item that you are going to move let itemToMove = locationsArray[sourceIndexPath.row] // Delete item from the original location pre-move locationsArray.remove(at: sourceIndexPath.row) // Insert item into the "to" post-move location locationsArray.insert(itemToMove, at: destinationIndexPath.row) } // MARK: - TableView code to freeze the first cell func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { return (indexPath.row == 0 ? false : true) } func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { if indexPath.row == 0 { return false } else { return true } } func tableView(_ tableView: UITableView, targetIndexPathForMoveFromRowAt sourceIndexPath: IndexPath, toProposedIndexPath proposedDestinationIndexPath: IndexPath) -> IndexPath { if proposedDestinationIndexPath.row == 0 { return sourceIndexPath } else { return proposedDestinationIndexPath } } } extension ListVC: GMSAutocompleteViewControllerDelegate { // Handle the user's selection. func viewController(_ viewController: GMSAutocompleteViewController, didAutocompleteWith place: GMSPlace) { print("Place name: \(place.name)") print("Place address: \(place.formattedAddress)") print("Place attributions: \(place.attributions)") dismiss(animated: true, completion: nil) } func viewController(_ viewController: GMSAutocompleteViewController, didFailAutocompleteWithError error: Error) { // TODO: handle the error. print("Error: ", error.localizedDescription) } // User canceled the operation. func wasCancelled(_ viewController: GMSAutocompleteViewController) { dismiss(animated: true, completion: nil) } // Turn the network activity indicator on and off again. func didRequestAutocompletePredictions(_ viewController: GMSAutocompleteViewController) { UIApplication.shared.isNetworkActivityIndicatorVisible = true } func didUpdateAutocompletePredictions(_ viewController: GMSAutocompleteViewController) { UIApplication.shared.isNetworkActivityIndicatorVisible = false } }
[ -1 ]
e2df3a34aa6a7026add18c590239217b43b79272
baa55dbf13cad8032be020747bd415dad5d29fd6
/UICatalogCreatingandCustomizingUIKitControlsObj-CandSwift/Swift/UICatalog/DefaultSearchBarViewController.swift
3e6eb51cc8e534050c84c3299ef64cbb59f74691
[]
no_license
73153/apple-ios-samples-master..........BEST-OF-ALL-PROJECTS
47b9ee221ac14989b20f26f254b217736ffc7d16
e0572af526d25107737e454ea70ba0008fdd0a75
refs/heads/master
2020-04-13T03:07:33.171094
2015-03-20T04:41:40
2015-03-20T04:41:40
32,562,734
3
2
null
null
null
null
UTF-8
Swift
false
false
1,482
swift
/* Copyright (C) 2014 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: A view controller that demonstrates how to use a default UISearchBar. */ import UIKit class DefaultSearchBarViewController: UIViewController, UISearchBarDelegate { // MARK: Properties @IBOutlet weak var searchBar: UISearchBar! // MARK: View Life Cycle override func viewDidLoad() { super.viewDidLoad() configureSearchBar() } // MARK: Configuration func configureSearchBar() { searchBar.showsCancelButton = true searchBar.showsScopeBar = true searchBar.scopeButtonTitles = [ NSLocalizedString("Scope One", comment: ""), NSLocalizedString("Scope Two", comment: "") ] } // MARK: UISearchBarDelegate func searchBar(searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) { NSLog("The default search selected scope button index changed to \(selectedScope).") } func searchBarSearchButtonClicked(searchBar: UISearchBar) { NSLog("The default search bar keyboard search button was tapped: \(searchBar.text).") searchBar.resignFirstResponder() } func searchBarCancelButtonClicked(searchBar: UISearchBar) { NSLog("The default search bar cancel button was tapped.") searchBar.resignFirstResponder() } }
[ -1 ]
59516ed41dd521732e7ffe994c50df681023c7eb
02b77ab93c405d35dbc7c3d5e17131eadcc00f01
/Sources/Examples/RouteGuide/Server/main.swift
e061fc213fe685c949d6e37c9cde7e2f9040a817
[ "Apache-2.0" ]
permissive
glbrntt/grpc-swift
01eeea6f1d0017a14af773697e90d6a53eb00c87
1b527c9a29bffba78754a10c0075561def99fc94
refs/heads/main
2023-08-16T11:22:30.281682
2021-09-13T10:53:24
2021-09-13T10:53:24
162,566,748
1
0
Apache-2.0
2022-11-01T14:21:26
2018-12-20T10:54:33
Swift
UTF-8
Swift
false
false
2,211
swift
/* * Copyright 2019, gRPC Authors All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * 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 ArgumentParser import Foundation import GRPC import Logging import NIO import RouteGuideModel import SwiftProtobuf /// Loads the features from `route_guide_db.json`, assumed to be in the directory above this file. func loadFeatures() throws -> [Routeguide_Feature] { let url = URL(fileURLWithPath: #file) .deletingLastPathComponent() // main.swift .deletingLastPathComponent() // Server/ .appendingPathComponent("route_guide_db.json") let data = try Data(contentsOf: url) return try Routeguide_Feature.array(fromJSONUTF8Data: data) } struct RouteGuide: ParsableCommand { @Option(help: "The port to listen on for new connections") var port = 1234 func run() throws { // Create an event loop group for the server to run on. let group = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount) defer { try! group.syncShutdownGracefully() } // Read the feature database. let features = try loadFeatures() // Create a provider using the features we read. let provider = RouteGuideProvider(features: features) // Start the server and print its address once it has started. let server = Server.insecure(group: group) .withServiceProviders([provider]) .bind(host: "localhost", port: self.port) server.map { $0.channel.localAddress }.whenSuccess { address in print("server started on port \(address!.port!)") } // Wait on the server's `onClose` future to stop the program from exiting. _ = try server.flatMap { $0.onClose }.wait() } } RouteGuide.main()
[ -1 ]
dfd576393e3af5a01b75fb587693df439d9d3b79
cadbd85ee65a24cc19bfe75dd900ed2083c9aaae
/CodeSample1/Code/Modules/Service/ServiceViewController.swift
d677a7f47bb60861bb89b9d70a9f256dfce87652
[ "Unlicense" ]
permissive
artem-shmatkov/CodeSample1
c05694195f7355964738d639bb6f6f0c87d4e042
733a63e6cbc7cd02ff7368173e153c948286f02f
refs/heads/master
2022-07-23T15:25:20.004539
2020-05-21T17:28:38
2020-05-21T17:28:38
263,835,822
0
0
null
null
null
null
UTF-8
Swift
false
false
5,331
swift
// // ServiceViewController.swift // CodeSample1 // // Created by Artem Shmatkov on 14.05.2020. // import UIKit fileprivate let cellIdentifier = ServiceTableCell.description() class ServiceViewController: UIViewController, ServiceViewProtocol, UITableViewDelegate, UITableViewDataSource { var interactor: ServiceInteractorProtocol! var array: [ServiceItemModel] = [] var errorView: ErrorView! var loaderView: LoaderView! var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white setupTable() setupBar() setupLoaderView() setupErrorView() } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) showLoading(true) interactor.viewReady() } fileprivate func setupTable() { tableView = UITableView() view.addSubview(tableView) tableView.register(ServiceTableCell.self, forCellReuseIdentifier: cellIdentifier) tableView.delegate = self tableView.dataSource = self tableView.translatesAutoresizingMaskIntoConstraints = false tableView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true } fileprivate func setupBar() { self.navigationItem.title = ui.string.common.service } fileprivate func setupLoaderView() { loaderView = LoaderView() view.addSubview(loaderView) loaderView.translatesAutoresizingMaskIntoConstraints = false loaderView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true loaderView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true loaderView.widthAnchor.constraint(equalToConstant: 100).isActive = true loaderView.heightAnchor.constraint(equalToConstant: 100).isActive = true loaderView.isHidden = true loaderView.setup() } fileprivate func setupErrorView() { errorView = ErrorView() view.addSubview(errorView) errorView.translatesAutoresizingMaskIntoConstraints = false errorView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true errorView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true errorView.widthAnchor.constraint(equalToConstant: 200).isActive = true errorView.heightAnchor.constraint(equalToConstant: 200).isActive = true errorView.isHidden = true errorView.setup() let tapGesture = UITapGestureRecognizer(target: self, action: #selector(hideError)) errorView.addGestureRecognizer(tapGesture) } fileprivate func showLoading(_ loading: Bool) { loaderView.isHidden = false UIView.animate(withDuration: 0.3, delay: 0.0, options: [.beginFromCurrentState, .allowUserInteraction, .allowAnimatedContent, .curveEaseInOut], animations: { [weak self] in self?.loaderView.alpha = loading ? 1.0 : 0.0 self?.tableView.alpha = loading ? 0.0 : 1.0 }) { [weak self] (finished) in self?.loaderView.alpha = loading ? 1.0 : 0.0 self?.tableView.alpha = loading ? 0.0 : 1.0 } } @objc fileprivate func hideError() { UIView.animate(withDuration: 0.3, delay: 0.0, options: [.beginFromCurrentState, .allowUserInteraction, .allowAnimatedContent, .curveEaseInOut], animations: { [weak self] in self?.errorView.alpha = 0.0 }) { [weak self] (finished) in self?.errorView.alpha = 0.0 self?.errorView.isHidden = true } } // MARK: ServiceViewProtocol func showList(_ list: [ServiceItemModel]) { array = list tableView.reloadData() showLoading(false) } func showError(_ error: Error?) { errorView.alpha = 0.0 errorView.isHidden = false errorView.update(error) UIView.animate(withDuration: 0.3, delay: 0.0, options: [.beginFromCurrentState, .allowUserInteraction, .allowAnimatedContent, .curveEaseInOut], animations: { [weak self] in self?.errorView.alpha = 1.0 }) { [weak self] (finished) in self?.errorView.alpha = 1.0 } } // MARK: UITableViewDelegate func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 160 } // MARK: UITableViewDataSource func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return array.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) if let listCell = cell as? ServiceTableCell { let item = array[indexPath.row] listCell.update(model: item) } return cell } }
[ -1 ]
9c5ef642398dc51e423bf92e48e89b9703ac23f1
acb1d492b4d59d08cebd570aaf84db0e0254e4cc
/Sources/Connect/ActionContext+Merge.swift
4e12f6d9aa1cc3dc5c47bc0474481625798a86c9
[ "Apache-2.0" ]
permissive
tonystone/coherence
071e8d04b0bcf9e2668a337031da3fb313d853c3
501ec2f5d82dbf66af6d3ddade12bbd1c65e550d
refs/heads/master
2021-01-17T15:03:29.691283
2020-01-29T23:39:57
2020-01-29T23:39:57
45,281,440
3
3
Apache-2.0
2020-01-29T23:39:58
2015-10-30T23:26:23
Swift
UTF-8
Swift
false
false
7,613
swift
/// /// ActionContext+Merge.swift /// /// Copyright 2017 Tony Stone /// /// 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. /// /// Created by Tony Stone on 2/5/17. /// import Foundation import CoreData import TraceLog extension ActionContext { /// /// Merge `objects` into the database. /// /// - Throws: `Coherence.Errors.unmanagedEntity` if the `for entity` is not managed by `Connect` /// public func merge<ManagedObjectType: NSManagedObject>(objects: [ManagedObjectType], for entity: NSEntityDescription, ignoreAttributes: [String] = [], subsetFilter: NSPredicate? = nil, condition: NSPredicate = NSPredicate(value: true)) throws { guard let entityName = entity.name else { throw Errors.missingEntityName("Entity does not have a name, cannot merge objects.") } guard entity.managed else { throw Errors.unmanagedEntity("Entity '\(entityName)' not managed, cannot merge objects.") } let updateAttributes = Array<String>(entity.attributesByName.keys).filter({ !ignoreAttributes.contains($0) }) /// /// Create the sort descriptors to sort both the source objects and the persistent objects. /// let objectSortDescriptors = try self.sortDescriptors(for: entity) let objectComparator: (ManagedObjectType, ManagedObjectType) -> ComparisonResult = { (object1, object2) -> ComparisonResult in /// /// First element that is not orderedSame, return that order /// otherwise continue testing until you run out of elements. /// for sortDescriptor in objectSortDescriptors { switch sortDescriptor.compare(object1, to: object2) { case .orderedAscending: return .orderedAscending case .orderedDescending: return .orderedDescending case .orderedSame: continue } } return .orderedSame } /// /// We need a list of new and existing objects in the same sorted order /// let newObjects = objects.sorted { (object1, object2) -> Bool in return objectComparator(object1, object2) == .orderedAscending } /// Get the existing ManagedObjects let existingObjects = try { () throws -> [ManagedObjectType] in let request = NSFetchRequest<ManagedObjectType>() request.entity = entity request.predicate = subsetFilter request.sortDescriptors = objectSortDescriptors request.returnsObjectsAsFaults = false return try self.fetch(request) /// This fetch will come back sorted }() logInfo(self.tag ?? Log.tag) { var message = "Merging \(newObjects.count) pending object(s) into \(existingObjects.count) existing object(s) for entity '\(entityName)'" if ignoreAttributes.count > 0 { message.append(", ignoring attributes: \(ignoreAttributes)") } if let filter = subsetFilter { message.append(", using filter: \(filter)") } message.append(", with update condition: \(condition)") message.append(".") return message } var newIterator = newObjects.makeIterator() var existingIterator = existingObjects.makeIterator() var newObject = newIterator.next() var existingObject = existingIterator.next() /// Loop through both lists, comparing identifiers, until both are empty while newObject != nil || existingObject != nil { /// Compare identifiers let comparisonResult: ComparisonResult if newObject == nil { /// If the new key list has run out, the new aKey sorts last (i.e. remove remaining existing objects) comparisonResult = .orderedDescending } else if existingObject == nil { /// If existing list has run out, the import aKey sorts first (i.e. add remaining new objects) comparisonResult = .orderedAscending } else if let newObject = newObject, let existingObject = existingObject { /// If neither list has run out, compare with the object comparisonResult = objectComparator(newObject, existingObject) } else { comparisonResult = .orderedSame } if comparisonResult == .orderedSame { /// UPDATE: Identifiers match if let existingObject = existingObject, let newObject = newObject { /// Only do the update if the condition supplied by the user is true if condition.evaluate(with: existingObject) { /// Update the existing object with the values from the new object. let keysAndValues = newObject.dictionaryWithValues(forKeys: updateAttributes) existingObject.setValuesForKeys(keysAndValues) } } /// /// Move ahead in both lists. /// newObject = newIterator.next() existingObject = existingIterator.next() } else if comparisonResult == .orderedAscending { /// /// INSERT: Imported item sorts before stored item /// if let newObject = newObject { self.insert(newObject) } /// /// Move ahead in just the new list since we used it for an insert. /// newObject = newIterator.next() } else { /// /// DELETE: Imported item sorts after stored item /// /// The stored item is not among those imported, and should be removed, then move ahead to the next stored item if let existingObject = existingObject { /// Only do the delete if the condition supplied by the user is true if condition.evaluate(with: existingObject) { self.delete(existingObject) } } /// /// Move ahead just the existing since we deleted it. /// existingObject = existingIterator.next() } } /// Only save this if there are actually changes that took place if self.hasChanges { try self.save() } } } extension ActionContext { fileprivate func sortDescriptors(for entity: NSEntityDescription) throws -> [NSSortDescriptor] { var descriptors: [NSSortDescriptor] = [] for attribute in entity.uniquenessAttributes { descriptors.append(NSSortDescriptor(key: attribute, ascending: true)) } return descriptors } }
[ -1 ]
d0a2b361455395891b28dfec55628947b45d07ef
8de7d2fc5f8eae1a30b7823f3bceff760bfe6d8b
/EosioSwiftVault/Keychain.swift
02ce20a9dc339fe1f569c9565b36e0f3bcf91811
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
EOSLaoMao/eosio-swift-vault
c87d317b93b3b6a414e253ccf2647525ee354553
fd3159f546b2c5f3954e6d8c257f5a532557318e
refs/heads/master
2021-05-26T00:33:31.967661
2020-04-09T06:05:56
2020-04-09T06:05:56
253,982,602
0
0
MIT
2020-04-08T04:11:28
2020-04-08T04:11:28
null
UTF-8
Swift
false
false
24,366
swift
// // Keychain.swift // EosioSwiftVault // // Created by Todd Bowden on 7/11/18. // Copyright (c) 2017-2019 block.one and its contributors. All rights reserved. // import Foundation import Security import EosioSwift /// General class for interacting with the Keychain and Secure Enclave. public class Keychain { /// Accessibility of keychain item. public enum AccessibleProtection { case whenUnlocked case afterFirstUnlock case whenPasscodeSetThisDeviceOnly case whenUnlockedThisDeviceOnly case afterFirstUnlockThisDeviceOnly var cfstringValue: CFString { switch self { case .whenUnlocked: return kSecAttrAccessibleWhenUnlocked case .afterFirstUnlock: return kSecAttrAccessibleAfterFirstUnlock case .whenPasscodeSetThisDeviceOnly: return kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly case .whenUnlockedThisDeviceOnly: return kSecAttrAccessibleWhenUnlockedThisDeviceOnly case .afterFirstUnlockThisDeviceOnly: return kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly } } } /// The accessGroup allows multiple apps (including extensions) in the same team to share the same Keychain. public let accessGroup: String /// Init with accessGroup. The accessGroup allows multiple apps (including extensions) in the same team to share the same Keychain. /// /// - Parameter accessGroup: The access group should be an `App Group` on the developer account. public init(accessGroup: String) { self.accessGroup = accessGroup } /// Save a value to the Keychain. /// /// - Parameters: /// - name: The name associated with this item. /// - value: The value to save. /// - service: The service associated with this item. /// - Returns: True if saved, otherwise false. public func saveValue(name: String, value: String, service: String) -> Bool { guard let data = value.data(using: String.Encoding.utf8) else { return false } let query: [String: Any] = [ kSecClass as String: kSecClassGenericPassword, kSecAttrAccount as String: name, kSecAttrService as String: service, kSecValueData as String: data, kSecAttrAccessGroup as String: accessGroup, kSecAttrAccessible as String: kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly, kSecAttrSynchronizable as String: false, kSecAttrIsInvisible as String: true ] let status = SecItemAdd(query as CFDictionary, nil) return status == errSecSuccess } /// Update a value in the Keychain. /// /// - Parameters: /// - name: The name associated with this item. /// - value: The updated value. /// - service: The service associated with this item. /// - Returns: True if updated, otherwise false. public func updateValue(name: String, value: String, service: String) -> Bool { guard let data = value.data(using: String.Encoding.utf8) else { return false } let query: [String: Any] = [ kSecClass as String: kSecClassGenericPassword, kSecAttrAccount as String: name, kSecAttrService as String: service, kSecAttrAccessGroup as String: accessGroup ] let attributes: [String: Any] = [kSecValueData as String: data] let status = SecItemUpdate(query as CFDictionary, attributes as CFDictionary) return status == errSecSuccess } /// Delete an item from the Keychain. /// /// - Parameters: /// - name: The name of the item to delete. /// - service: The service associated with this item. public func delete(name: String, service: String) { let query: [String: Any] = [ kSecClass as String: kSecClassGenericPassword, kSecAttrAccount as String: name, kSecAttrService as String: service, kSecAttrAccessGroup as String: accessGroup ] SecItemDelete(query as CFDictionary) } /// Get a value from the Keychain. /// /// - Parameters: /// - name: The name of the item. /// - service: The service associated with this item. /// - Returns: The value for the specified item. public func getValue(name: String, service: String) -> String? { let query: [String: Any] = [ kSecClass as String: kSecClassGenericPassword, kSecAttrAccount as String: name, kSecAttrService as String: service, kSecAttrAccessGroup as String: accessGroup, kSecReturnData as String: true ] var item: CFTypeRef? let status = SecItemCopyMatching(query as CFDictionary, &item) guard status == errSecSuccess else { return nil } let data = item as! CFData // swiftlint:disable:this force_cast guard let value = String(data: data as Data, encoding: .utf8) else { return nil } return value } /// Get a dictionary of values from the Keychain for the specified service. /// /// - Parameter service: A service name. /// - Returns: A dictionary of names and values for the specified service. public func getValues(service: String) -> [String: String]? { let query: [String: Any] = [ kSecClass as String: kSecClassGenericPassword, kSecAttrService as String: service, kSecAttrAccessGroup as String: accessGroup, kSecMatchLimit as String: kSecMatchLimitAll, kSecReturnAttributes as String: true, kSecReturnRef as String: true ] var items: CFTypeRef? let status = SecItemCopyMatching(query as CFDictionary, &items) guard status == errSecSuccess else { return nil } var values = [String: String]() guard let array = items as? [[String: Any]] else { return nil } for item in array { if let name = item[kSecAttrAccount as String] as? String, let data = item["v_Data"] as? Data, let value = String(data: data as Data, encoding: .utf8) { values[name] = value } } return values } /// Make query for Key. private func makeQueryForKey(key: SecKey) -> [String: Any] { return [ kSecValueRef as String: key, kSecAttrAccessGroup as String: accessGroup, kSecReturnRef as String: true ] } /// Make query for ecKey. private func makeQueryForKey(ecKey: ECKey) -> [String: Any] { let query: [String: Any] = [ kSecValueRef as String: ecKey.privateSecKey, kSecAttrAccessGroup as String: accessGroup, kSecReturnRef as String: true ] return query } /// Make query to retrieve all elliptic curve keys in the Keychain. private func makeQueryForAllEllipticCurveKeys(tag: String? = nil) -> [String: Any] { var query: [String: Any] = [ kSecClass as String: kSecClassKey, kSecMatchLimit as String: kSecMatchLimitAll, kSecAttrKeyType as String: kSecAttrKeyTypeECSECPrimeRandom, kSecAttrAccessGroup as String: accessGroup, kSecReturnRef as String: true ] if let tag = tag { query[kSecAttrApplicationTag as String] = tag } return query } /// Delete key given the SecKey. /// /// - Parameter secKey: The SecKey to delete. public func deleteKey(secKey: SecKey) { let query = makeQueryForKey(key: secKey) SecItemDelete(query as CFDictionary) } /// Delete key if public key exists. /// /// - Parameter publicKey: The public key of the key to delete. public func deleteKey(publicKey: Data) { guard let privateSecKey = getPrivateSecKey(publicKey: publicKey) else { return } deleteKey(secKey: privateSecKey) } /// Update label. /// /// - Parameters: /// - label: The new label value. /// - publicKey: The public key of the key to update. public func update(label: String, publicKey: Data) { guard let ecKey = getEllipticCurveKey(publicKey: publicKey) else { return } let query = makeQueryForKey(ecKey: ecKey) let attributes: [String: Any] = [ kSecAttrLabel as String: label ] _ = SecItemUpdate(query as CFDictionary, attributes as CFDictionary) } /// Get elliptic curve key -- getting the key from the Keychain given the key is used for testing. public func getSecKey(key: SecKey) -> SecKey? { let query = makeQueryForKey(key: key) var item: CFTypeRef? let status = SecItemCopyMatching(query as CFDictionary, &item) guard status == errSecSuccess else { return nil } let key = item as! SecKey // swiftlint:disable:this force_cast return key } /// Get an elliptic curve key given the public key. /// /// - Parameter publicKey: The public key. /// - Returns: An ECKey corresponding to the public key. public func getEllipticCurveKey(publicKey: Data) -> ECKey? { guard let allKeys = try? getAllEllipticCurveKeys() else { return nil } for key in allKeys { if key.compressedPublicKey == publicKey || key.uncompressedPublicKey == publicKey { return key } } return nil } /// Get all elliptic curve keys with option to filter by tag. /// /// - Parameter tag: The tag to filter by (defaults to `nil`). /// - Returns: An array of ECKeys. /// - Throws: If there is an error in the key query. public func getAllEllipticCurveKeys(tag: String? = nil) throws -> [ECKey] { var query: [String: Any] = [ kSecClass as String: kSecClassKey, kSecMatchLimit as String: kSecMatchLimitAll, kSecAttrAccessGroup as String: accessGroup, kSecReturnAttributes as String: true, kSecReturnRef as String: true ] if let tag = tag { query[kSecAttrApplicationTag as String] = tag } var items: CFTypeRef? let status = SecItemCopyMatching(query as CFDictionary, &items) if status == errSecItemNotFound { return [ECKey]() } guard status == errSecSuccess else { throw EosioError(.keyManagementError, reason: "Get keys query error \(status)") } guard let array = items as? [[String: Any]] else { throw EosioError(.keyManagementError, reason: "Get keys items not an array of dictionaries") } var keys = [ECKey]() for item in array { if let key = ECKey(attributes: item) { keys.append(key) } } return keys } /// Get all elliptic curve private Sec Keys. /// For Secure Enclave private keys, the SecKey is a reference. It's not posible to export the actual private key data. /// /// - Parameter tag: The tag to filter by (defaults to `nil`). /// - Returns: An array of SecKeys. public func getAllEllipticCurvePrivateSecKeys(tag: String? = nil) -> [SecKey]? { let query = makeQueryForAllEllipticCurveKeys(tag: tag) var items: CFTypeRef? let status = SecItemCopyMatching(query as CFDictionary, &items) guard status == errSecSuccess else { return nil } guard let keys = items as? [SecKey] else { return nil } return keys } /// Get all elliptic curve keys and return the public keys. /// /// - Returns: An array of public SecKeys. public func getAllEllipticCurvePublicSecKeys() -> [SecKey]? { guard let privateKeys = getAllEllipticCurvePrivateSecKeys() else { return nil } var publicKeys = [SecKey]() for privateKey in privateKeys { if let publicKey = SecKeyCopyPublicKey(privateKey) { publicKeys.append(publicKey) } } return publicKeys } /// Get the private SecKey for the public key if the key exists in the Keychain. /// Public key data can be in either compressed or uncompressed format. /// /// - Parameter publicKey: A public key in either compressed or uncompressed format. /// - Returns: A SecKey. public func getPrivateSecKey(publicKey: Data) -> SecKey? { guard let allPrivateKeys = getAllEllipticCurvePrivateSecKeys() else { return nil } for privateKey in allPrivateKeys { if let uncompressedPubKey = privateKey.publicKey?.externalRepresentation { if uncompressedPubKey == publicKey || uncompressedPubKey.compressedPublicKey == publicKey { return privateKey } } } return nil } /// Create a **NON**-Secure-Enclave elliptic curve private key. /// /// - Parameter isPermanent: Is the key stored permanently in the Keychain? /// - Returns: A SecKey. public func createEllipticCurvePrivateKey(isPermanent: Bool = false) -> SecKey? { guard let access = SecAccessControlCreateWithFlags(kCFAllocatorDefault, kSecAttrAccessibleWhenUnlockedThisDeviceOnly, [], nil) else { return nil } let attributes: [String: Any] = [ kSecUseAuthenticationUI as String: kSecUseAuthenticationContext, kSecAttrKeyType as String: kSecAttrKeyTypeECSECPrimeRandom, kSecAttrKeySizeInBits as String: 256, kSecPrivateKeyAttrs as String: [ kSecAttrIsPermanent as String: isPermanent, kSecAttrAccessControl as String: access ] ] var error: Unmanaged<CFError>? guard let privateKey = SecKeyCreateRandomKey(attributes as CFDictionary, &error) else { return nil } return privateKey } /// Import an external elliptic curve private key into the Keychain. /// /// - Parameters: /// - privateKey: The private key as data (97 bytes). /// - tag: A tag to associate with this key. /// - label: A label to associate with this key. /// - protection: Accessibility defaults to .whenUnlockedThisDeviceOnly. /// - accessFlag: The accessFlag for this key. /// - Returns: The imported key as an ECKey. /// - Throws: If the key is not valid or cannot be imported. public func importExternal(privateKey: Data, tag: String? = nil, label: String? = nil, protection: AccessibleProtection = .whenUnlockedThisDeviceOnly, accessFlag: SecAccessControlCreateFlags? = nil) throws -> ECKey { //check data length guard privateKey.count == 97 else { throw EosioError(.keyManagementError, reason: "Private Key data should be 97 bytes, found \(privateKey.count) bytes") } let publicKey = privateKey.prefix(65) if getEllipticCurveKey(publicKey: publicKey) != nil { throw EosioError(.keyManagementError, reason: "Key already exists") } guard let access = makeSecSecAccessControl(secureEnclave: false, protection: protection, accessFlag: accessFlag) else { throw EosioError(.keyManagementError, reason: "Error creating Access Control") } var attributes: [String: Any] = [ kSecAttrKeyType as String: kSecAttrKeyTypeECSECPrimeRandom, kSecAttrKeyClass as String: kSecAttrKeyClassPrivate, kSecAttrKeySizeInBits as String: 256, kSecAttrAccessGroup as String: accessGroup, kSecAttrIsPermanent as String: true, kSecPrivateKeyAttrs as String: [ kSecAttrIsPermanent as String: true, kSecAttrAccessControl as String: access ] ] if let tag = tag { attributes[kSecAttrApplicationTag as String] = tag } if let label = label { attributes[kSecAttrLabel as String] = label } var error: Unmanaged<CFError>? guard let secKey = SecKeyCreateWithData(privateKey as CFData, attributes as CFDictionary, &error) else { print(error.debugDescription) throw EosioError(.keyManagementError, reason: error.debugDescription) } attributes = [ kSecClass as String: kSecClassKey, kSecValueRef as String: secKey, kSecAttrAccessGroup as String: accessGroup ] if let tag = tag { attributes[kSecAttrApplicationTag as String] = tag } if let label = label { attributes[kSecAttrLabel as String] = label } let status = SecItemAdd(attributes as CFDictionary, nil) guard status == errSecSuccess else { throw EosioError(.keyManagementError, reason: "Unable to add key \(publicKey) to Keychain") } guard let key = getEllipticCurveKey(publicKey: publicKey) else { throw EosioError(.keyManagementError, reason: "Unable to find key \(publicKey) in Keychain") } return key } /// Make SecAccessControl private func makeSecSecAccessControl(secureEnclave: Bool, protection: AccessibleProtection = .whenUnlockedThisDeviceOnly, accessFlag: SecAccessControlCreateFlags? = nil) -> SecAccessControl? { var flags: SecAccessControlCreateFlags if let accessFlag = accessFlag { if secureEnclave { flags = [.privateKeyUsage, accessFlag] } else { flags = [accessFlag] } } else { if secureEnclave { flags = [.privateKeyUsage] } else { flags = [] } } return SecAccessControlCreateWithFlags( kCFAllocatorDefault, protection.cfstringValue, flags, nil ) } /// Create a new Secure Enclave key. /// /// - Parameters: /// - tag: A tag to associate with this key. /// - label: A label to associate with this key. /// - accessFlag: accessFlag for this key. /// - Returns: A Secure Enclave SecKey. /// - Throws: If a key cannot be created. public func createSecureEnclaveSecKey(tag: String? = nil, label: String? = nil, accessFlag: SecAccessControlCreateFlags? = nil) throws -> SecKey { return try createEllipticCurveSecKey(secureEnclave: true, tag: tag, label: label, accessFlag: accessFlag) } /// Create a new elliptic curve key. /// /// - Parameters: /// - secureEnclave: Generate this key in Secure Enclave? /// - tag: A tag to associate with this key. /// - label: A label to associate with this key. /// - protection: Accessibility defaults to whenUnlockedThisDeviceOnly. /// - accessFlag: The accessFlag for this key. /// - Returns: A SecKey. /// - Throws: If a key cannot be created. public func createEllipticCurveSecKey(secureEnclave: Bool, tag: String? = nil, label: String? = nil, protection: AccessibleProtection = .whenUnlockedThisDeviceOnly, accessFlag: SecAccessControlCreateFlags? = nil) throws -> SecKey { guard let access = makeSecSecAccessControl(secureEnclave: secureEnclave, protection: protection, accessFlag: accessFlag) else { throw EosioError(.keyManagementError, reason: "Error creating Access Control") } var attributes: [String: Any] = [ kSecUseAuthenticationUI as String: kSecUseAuthenticationContext, kSecUseOperationPrompt as String: "", kSecAttrKeyType as String: kSecAttrKeyTypeECSECPrimeRandom, kSecAttrKeySizeInBits as String: 256, kSecAttrAccessGroup as String: accessGroup, kSecPrivateKeyAttrs as String: [ kSecAttrIsPermanent as String: true, kSecAttrAccessControl as String: access ] ] if secureEnclave { attributes[kSecAttrTokenID as String] = kSecAttrTokenIDSecureEnclave } if let tag = tag { attributes[kSecAttrApplicationTag as String] = tag } if let label = label { attributes[kSecAttrLabel as String] = label } var error: Unmanaged<CFError>? guard let privateKey = SecKeyCreateRandomKey(attributes as CFDictionary, &error) else { throw EosioError(.keyManagementError, reason: error.debugDescription) } return privateKey } /// Sign if the key is in the Keychain. /// /// - Parameters: /// - publicKey: The public key corresponding to a private key to use for signing. /// - data: The data to sign. /// - Returns: A signature. /// - Throws: If private key is not available. public func sign(publicKey: Data, data: Data) throws -> Data { guard let privateKey = getPrivateSecKey(publicKey: publicKey) else { throw EosioError(.keyManagementError, reason: "Private key is not available for public key \(publicKey.hex)") } return try sign(privateKey: privateKey, data: data) } /// Sign with Secure Enclave or Keychain. /// /// - Parameters: /// - privateKey: The private key to use for signing. /// - data: The data to sign. /// - Returns: A signature. /// - Throws: If an error is encountered attempting to sign. public func sign(privateKey: SecKey, data: Data) throws -> Data { let algorithm: SecKeyAlgorithm = .ecdsaSignatureMessageX962SHA256 guard SecKeyIsAlgorithmSupported(privateKey, .sign, algorithm) else { throw EosioError(.keySigningError, reason: "Algorithm \(algorithm) is not supported") } var error: Unmanaged<CFError>? guard let der = SecKeyCreateSignature(privateKey, algorithm, data as CFData, &error) else { throw EosioError(.keyManagementError, reason: error.debugDescription) } return der as Data } /// Decrypt data using `SecKeyAlgorithm.eciesEncryptionCofactorVariableIVX963SHA256AESGCM`. /// /// - Parameters: /// - publicKey: The public key corresponding to a private key to use for decrypting. /// - message: The encrypted message. /// - Returns: The decrypted message. /// - Throws: If the private key is not found or the message cannot be decrypted. public func decrypt(publicKey: Data, message: Data) throws -> Data { // lookup ecKey in the Keychain guard let ecKey = getEllipticCurveKey(publicKey: publicKey) else { throw EosioError(.keyManagementError, reason: "key not found") } // decrypt var error: Unmanaged<CFError>? let algorithm = SecKeyAlgorithm.eciesEncryptionCofactorVariableIVX963SHA256AESGCM guard let decryptedData = SecKeyCreateDecryptedData(ecKey.privateSecKey, algorithm, message as CFData, &error) else { throw EosioError(.keyManagementError, reason: error.debugDescription) } return decryptedData as Data } } public extension Data { /// Compress an uncompressed 65 byte public key to a 33 byte compressed public key. var compressedPublicKey: Data? { guard self.count == 65 else { return nil } let uncompressedKey = self guard uncompressedKey[0] == 4 else { return nil } let x = uncompressedKey[1...32] let yLastByte = uncompressedKey[64] let flag: UInt8 = 2 + (yLastByte % 2) let compressedKey = Data([flag]) + x return compressedKey } } public extension SecKey { /// The externalRepresentation of a SecKey in ANSI X9.63 format. var externalRepresentation: Data? { var error: Unmanaged<CFError>? if let cfdata = SecKeyCopyExternalRepresentation(self, &error) { return cfdata as Data } return nil } /// The public key for a private SecKey. var publicKey: SecKey? { return SecKeyCopyPublicKey(self) } }
[ -1 ]
cf890cacaf2f336bd607e0fd03ec1e25b34779cb
f1d226b9f04acfad5e5a908952fda4fe42a777e5
/URLRequestDemo.playground/Contents.swift
922fce13224e79201cb03b1c88a5246f744b2264
[ "MIT" ]
permissive
jerjunkel/AC3.2-URLRequest
56cea13d8b466aa07c56f4d3e18b32ec9e543695
9f54814b4a63643f287d3b722a6fa017077ff319
refs/heads/master
2020-07-22T05:18:22.593822
2016-11-14T23:38:53
2016-11-14T23:38:53
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,498
swift
//: Playground - noun: a place where people can play import UIKit import XCPlayground var str = "Hello, playground" /* What is the CustomStringConvertible protocol? Glad you asked Conforming to this protocol means you need to implement the "description" property, which is a computerd value that is used in places where a description of an object is printed out... such as anywhere you call print() */ struct PlaceholderPost: CustomStringConvertible { let body: String let title: String let id: Int let userID: Int var description: String { return "\(self.title) by user \(self.userID)" } } // GET Request func getAllPosts() { // create a new URLRequest var getRequest = URLRequest(url: URL(string: "http://jsonplaceholder.typicode.com/posts/")!) // set the HTTP method getRequest.httpMethod = "GET" // add header fields getRequest.addValue("application/json", forHTTPHeaderField: "Content-Type") // this API specifically asks that we pass this header key/value // y'all know this part... ❤️ // create a new session let session = URLSession(configuration: URLSessionConfiguration.default) // this is slightly different: we use dataTask(with: URLRequest) instead of dataTask(with: URL) session.dataTask(with: getRequest) { (data: Data?, urlResponse: URLResponse?, error: Error?) in if error != nil { print(error!) } if urlResponse != nil { print(urlResponse!) } if data != nil { do { let jsonData = try JSONSerialization.jsonObject(with: data!, options: []) // be aware that casting a single post will fail, as the return type is [String : AnyObject] guard let parsedJson = jsonData as? [[String : AnyObject]] else { print("ERROR attempting to cast Any to [[String:AnyObject]]") return } var returnedPosts = [PlaceholderPost]() for postJson in parsedJson { guard let body = postJson["body"] as? String, let title = postJson["title"] as? String, let id = postJson["id"] as? Int, let userID = postJson["userId"] as? Int else { print("Error parsing post keys") return } let newPost = PlaceholderPost(body: body, title: title, id: id, userID: userID) returnedPosts.append(newPost) } // print(returnedPosts) } catch { print("error occured parsing: \(error)") } } }.resume() } // POST Request func postNewPost() { var postRequest = URLRequest(url: URL(string: "http://jsonplaceholder.typicode.com/posts/")!) postRequest.httpMethod = "POST" postRequest.addValue("application/json", forHTTPHeaderField: "Content-Type") let httpBodyDict: [String : Any] = [ "title" : "Test Title", "body" : "THis is the body of the text!!", "userId" : 1 ] do { let jsonData = try JSONSerialization.data(withJSONObject: httpBodyDict, options: []) postRequest.httpBody = jsonData } catch { print("Error attempting to convert dictionary to data") } let session = URLSession(configuration: URLSessionConfiguration.default) session.dataTask(with: postRequest) { (data: Data?, urlResponse: URLResponse?, error: Error?) in if error != nil { print(error!) } if urlResponse != nil { print(urlResponse!) } if data != nil { do { let jsonData = try JSONSerialization.jsonObject(with: data!, options: []) guard let parsedJsonData = jsonData as? [String : AnyObject] else { print("Error casting Any to [String : AnyObject]") return } guard let title = parsedJsonData["title"] as? String, let body = parsedJsonData["body"] as? String, let id = parsedJsonData["id"] as? Int, let userId = parsedJsonData["userId"] as? Int else { print("Error parsing post") return } let newPost = PlaceholderPost(body: body, title: title, id: id, userID: userId) print(newPost) } catch { print("error occured parsing: \(error)") } } }.resume() } // uncomment as needed (will cause some performance issues) //getAllPosts() //postNewPost() // uncommon the below to allow this playground to work properly //XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
[ -1 ]
e121bcbd4b84555a412ee995a186d466c31d606a
c9a573d9b05e703df06eab444524f806816e57c9
/网易新闻/Class/Home/Controller/HomeViewController.swift
a61fb6e71688e55d5d15e0ad6d0614b0376654d3
[ "MIT" ]
permissive
yanrenjie/NetEasyNews
7119fa2965cdca34935fa323a5cd29da1ff3dfba
f514af85d70eb647e077b5acb5212079f32340b5
refs/heads/master
2020-09-15T11:22:51.256058
2020-07-13T09:05:59
2020-07-13T09:05:59
223,431,076
0
0
null
null
null
null
UTF-8
Swift
false
false
5,657
swift
// // HomeViewController.swift // 网易新闻 // // Created by 颜仁浩 on 2019/11/13. // Copyright © 2019 颜仁浩. All rights reserved. // import UIKit class HomeViewController: JieBaseViewController { let titles : [String] = ["测试", "头条", "要闻", "娱乐", "体育", "财经", "军事", "科技", "手机", "数码", "时尚", "游戏", "教育", "健康", "旅游", "视频", "直播", "段子", "汽车"] lazy var multiTitleView : JieMultiTitleView = {[weak self] in let titleView = JieMultiTitleView(frame: CGRect(x: 0, y: Int(kHeightNavigation), width: Int(ScreenWidth), height: 50), titles: self!.titles) titleView.backgroundColor = .white titleView.delegate = self return titleView }() lazy var multiContentView : JieMultiContentView = {[weak self] in var childVCs : [UIViewController] = [] childVCs.append(TestViewController()) childVCs.append(HomeHeadLineViewController()) childVCs.append(NewsViewController()) childVCs.append(EntertainmentViewController()) childVCs.append(SportViewController()) childVCs.append(BusinessViewController()) childVCs.append(MilitaryViewController()) childVCs.append(TechnologyViewController()) childVCs.append(CellPhoneViewController()) childVCs.append(DigitalViewController()) childVCs.append(FashionViewController()) childVCs.append(GameViewController()) childVCs.append(EducationViewController()) childVCs.append(HealthViewController()) childVCs.append(TravelViewController()) childVCs.append(HomeVideoViewController()) childVCs.append(LiveViewController()) childVCs.append(JokeViewController()) childVCs.append(CarViewController()) var index = 0 for vc in childVCs { let tempvc = vc as! JieBaseViewController tempvc.titleString = (self?.titles[index])! index = index + 1 } let contentView = JieMultiContentView(frame: CGRect(x: 0, y: CGFloat(50 + kHeightNavigation), width: CGFloat(ScreenWidth), height: CGFloat(ScreenHeight - 83 - 50 - 88)), childVCs: childVCs, parentVC: self!) contentView.delegate = self return contentView }() override func viewDidLoad() { super.viewDidLoad() // 未做自定义导航栏时候的设置 // navigationController?.navigationBar.setBackgroundImage(UIImage(named: "home_navigation_background_image"), for: .default) setupUI() } func jieNavigationBarBackgroundImage(navigationBar: JieNavigationBar) -> UIImage { return UIImage(named: "home_navigation_background_image")! } // 左边按钮 func jieNavigationBarLeftButtonImage(leftButton: UIButton?, navigationBar: JieNavigationBar) -> UIImage { return UIImage(named: "home_logo")! } // 中间搜索框 func jieNavigationBarTitleView(navigationBar: JieNavigationBar) -> UIView { let titleView = HomeNavigationSearchView(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: 44)) return titleView } func jieNavigationBarRightButtonImage(rightButton: UIButton?, navigationBar: JieNavigationBar) -> UIImage { return UIImage(named: "home_hot")! } func leftButtonEvent(sender: UIButton, navigationBar: JieNavigationBar) { print(#function) } func rightButtonEvent(sender: UIButton, navigationBar: JieNavigationBar) { print(#function) } } extension HomeViewController { fileprivate func setupUI() { // 设置导航了(未做自定义导航栏时的设置) // setupNavigationUI() // 滚动标题栏 view.addSubview(multiTitleView) // 多子视图控制器 view.addSubview(multiContentView) } func setupNavigationUI() { let leftImageView = UIImageView() leftImageView.sizeThatFits(CGSize(width: 66, height: 44)) let leftImage = UIImage(named: "home_logo") leftImageView.image = leftImage navigationItem.leftBarButtonItem = UIBarButtonItem(customView: leftImageView) let hotBtn = UIButton(type: .custom) hotBtn.sizeThatFits(CGSize(width: 44, height: 44)) hotBtn.isHighlighted = false hotBtn.adjustsImageWhenHighlighted = false hotBtn.setImage(UIImage(named: "home_hot"), for: .normal) let hotItem = UIBarButtonItem(customView: hotBtn) let messageBtn = UIButton(type: .custom) messageBtn.sizeThatFits(CGSize(width: 44, height: 44)) messageBtn.isHighlighted = false messageBtn.adjustsImageWhenHighlighted = false messageBtn.setImage(UIImage(named: "home_message"), for: .normal) let messageItem = UIBarButtonItem(customView: messageBtn) navigationItem.rightBarButtonItems = [messageItem, hotItem] let titleView = HomeNavigationSearchView() navigationItem.titleView = titleView } } extension HomeViewController : JieMultiTitleViewDelegate { func multiTitleView(titleView: JieMultiTitleView, selectedIndex: Int) { multiContentView.setCurrentIndex(currentIndex: selectedIndex) } } extension HomeViewController : JieMultiContentViewDelegate { func multiContentView(contentView: JieMultiContentView, progress: CGFloat, sourceIndex: Int, targetIndex: Int) { multiTitleView.setTitleWithProgress(progress: progress, sourceIndex: sourceIndex, targetIndex: targetIndex) } }
[ -1 ]
bb7fc64a4806dc75857c4d8960b11bd07393f3ee
ab68c7083a3a90185ffc778b349bf9f598ecc3c2
/AppDelegate.swift
fde739fbfa236d015a50a76e79bf72e376cd6472
[]
no_license
vandanpatelgithub/ARKitGame
abbc0c0c731bca35ade4f960e8d7b6b8e062b941
178ef27993cb3cf98c4aabb51ee668d29b535d00
refs/heads/master
2021-01-21T23:23:44.347414
2017-06-24T18:18:43
2017-06-24T18:18:43
95,238,877
1
1
null
null
null
null
UTF-8
Swift
false
false
2,176
swift
// // AppDelegate.swift // ARKitGame // // Created by Preeti Patel on 23/06/17. // Copyright © 2017 Vandan Patel. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 213902, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 66690, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 279929, 181626, 181631, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 280021, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 289111, 248153, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 148946, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 282481, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 176311, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 283069, 127424, 299457, 127429, 127431, 127434, 315856, 127440, 176592, 315860, 176597, 127447, 283095, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 234648, 275606, 234650, 275608, 308379, 300189, 324766, 119967, 234653, 283805, 234657, 324768, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 275725, 349451, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 276052, 284253, 300638, 284255, 235097, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 284566, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 244731, 285690, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
8b06a252afa9877d6d4ff1cddcbbcb5a350eb78d
fb65dd45bb1f58203151479fc0bd1a49c6eee815
/StanCassiniUITests/StanCassiniUITests.swift
0ee4afb249b3b1764393653bc26d0e9250362240
[]
no_license
mantonelli01a/StanCassini
2e51527e6e1b36589fb588c2f110a95008eadf1d
ed58c570e6cb3a610438d92b252510fd15535452
refs/heads/master
2021-01-22T02:07:50.118616
2017-02-19T19:24:14
2017-02-19T19:24:14
81,026,650
0
0
null
null
null
null
UTF-8
Swift
false
false
1,271
swift
// // StanCassiniUITests.swift // StanCassiniUITests // // Created by Michael Antonelli on 05/02/2017. // Copyright © 2017 Michael Antonelli. All rights reserved. // import XCTest class StanCassiniUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. XCUIApplication().launch() // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 155665, 237599, 229414, 278571, 229425, 229431, 180279, 319543, 213051, 286787, 237638, 311373, 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, 287319, 295518, 287327, 279143, 279150, 287345, 287348, 189054, 287359, 303743, 164487, 311944, 279176, 344714, 311948, 311950, 311953, 287379, 336531, 295575, 303772, 205469, 221853, 279207, 295591, 295598, 279215, 279218, 287412, 164532, 287418, 303802, 66243, 287434, 287438, 164561, 303826, 279249, 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, 312313, 214009, 312317, 328701, 328705, 418819, 320520, 230411, 320526, 238611, 140311, 238617, 197658, 336930, 132140, 189487, 312372, 238646, 238650, 320571, 336962, 238663, 296023, 205911, 156763, 214116, 230500, 279659, 238706, 312435, 279666, 230514, 279686, 222344, 337037, 296091, 238764, 279729, 148674, 312519, 279752, 148687, 189651, 279766, 189656, 279775, 304352, 304353, 279780, 279789, 279803, 320769, 312588, 320795, 320802, 304422, 312628, 345398, 222523, 181568, 279872, 279874, 304457, 230730, 345418, 337228, 296269, 222542, 238928, 296274, 230757, 312688, 296304, 230772, 337280, 296328, 296330, 304523, 9618, 279955, 148899, 279979, 279980, 279988, 173492, 280003, 370122, 280011, 337359, 329168, 312785, 222674, 329170, 280020, 280025, 239069, 320997, 280042, 280043, 329198, 337391, 296434, 288248, 288252, 312830, 230922, 304655, 329231, 230933, 222754, 312879, 230960, 288305, 239159, 157246, 288319, 288322, 280131, 124486, 288328, 230999, 239192, 99937, 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, 280373, 280377, 321338, 280381, 345918, 280386, 280391, 280396, 18263, 370526, 296807, 296815, 313200, 313204, 124795, 280451, 305032, 67464, 124816, 214936, 337816, 124826, 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, 240003, 158087, 313736, 240020, 190870, 190872, 289185, 305572, 289195, 338359, 289229, 281038, 281039, 281071, 322057, 182802, 322077, 289328, 338491, 322119, 281165, 281170, 281200, 313970, 297600, 289435, 314020, 248494, 166581, 314043, 363212, 158424, 322269, 338658, 289511, 330473, 330476, 289517, 215790, 125683, 199415, 289534, 322302, 35584, 322312, 346889, 264971, 322320, 166677, 207639, 281378, 289580, 281407, 289599, 281426, 281434, 322396, 281444, 207735, 314240, 158594, 330627, 240517, 289691, 240543, 289699, 289704, 289720, 289723, 281541, 19398, 191445, 183254, 183258, 207839, 314343, 183276, 289773, 248815, 240631, 330759, 330766, 281647, 322609, 314437, 207954, 339031, 314458, 281698, 281699, 322664, 314493, 347286, 330912, 339106, 306339, 249003, 208044, 322733, 3243, 339131, 290001, 339167, 298209, 290030, 208123, 322826, 126229, 298290, 208179, 159033, 216387, 372039, 224591, 331091, 150868, 314708, 314711, 314721, 281958, 134504, 306541, 314734, 314740, 314742, 290170, 224637, 306558, 290176, 306561, 314752, 314759, 298378, 314765, 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, 323171, 282214, 224874, 314997, 290425, 339579, 282244, 323208, 282248, 323226, 282272, 282279, 298664, 298666, 306875, 282302, 323262, 323265, 282309, 306891, 241360, 282321, 241366, 282330, 282336, 12009, 282347, 282349, 323315, 200444, 282366, 249606, 282375, 323335, 282379, 216844, 118549, 282390, 282399, 241440, 282401, 339746, 315172, 216868, 241447, 282418, 282424, 282428, 413500, 241471, 315209, 159563, 307024, 307030, 241494, 307038, 282471, 282476, 339840, 315265, 282503, 315272, 315275, 184207, 282517, 298912, 118693, 298921, 126896, 200628, 282572, 282573, 323554, 298987, 282634, 241695, 315433, 102441, 102446, 282671, 241717, 307269, 315468, 233548, 315477, 200795, 323678, 315488, 315489, 45154, 233578, 307306, 217194, 241809, 323730, 299166, 233635, 299176, 184489, 323761, 184498, 258233, 299197, 299202, 176325, 299208, 233678, 282832, 356575, 307431, 184574, 217352, 315674, 282908, 299294, 282912, 233761, 282920, 315698, 332084, 307514, 282938, 127292, 168251, 323914, 201037, 282959, 250196, 168280, 323934, 381286, 242027, 242028, 250227, 315768, 315769, 291194, 291193, 291200, 242059, 315798, 291225, 283039, 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, 242542, 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, 234741, 283894, 316661, 292092, 234756, 242955, 177420, 292145, 300342, 333114, 333115, 193858, 300354, 300355, 234830, 283990, 357720, 300378, 300379, 316764, 292194, 284015, 234864, 316786, 243073, 112019, 234902, 333224, 284086, 259513, 284090, 54719, 415170, 292291, 300488, 300490, 234957, 144862, 300526, 308722, 300539, 210429, 292359, 218632, 316951, 374297, 235069, 349764, 194118, 292424, 292426, 333389, 349780, 128600, 235096, 300643, 300645, 243306, 325246, 333438, 235136, 317102, 300729, 333508, 333522, 325345, 153318, 333543, 284410, 284425, 300810, 300812, 284430, 161553, 284436, 325403, 341791, 325411, 186148, 186149, 333609, 284460, 300849, 325444, 153416, 325449, 317268, 325460, 341846, 284508, 300893, 284515, 276326, 292713, 292719, 325491, 333687, 317305, 317308, 325508, 333700, 243590, 243592, 325514, 350091, 350092, 350102, 333727, 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, 293275, 317851, 285083, 227743, 293281, 285089, 301482, 375211, 334259, 293309, 317889, 326083, 129484, 326093, 285152, 195044, 334315, 236020, 293368, 317949, 342537, 309770, 334345, 342560, 227881, 293420, 236080, 23093, 244279, 244280, 301635, 309831, 55880, 301647, 326229, 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, 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, 179853, 286351, 188049, 229011, 179868, 229021, 302751, 245413, 212649, 286387, 286392, 302778, 286400, 212684, 302798, 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 ]
2485d4d8ccb5c0df542bb17cd7cdac5da1c2706f
58a2995dd249b73813a4be2c16c552d7f5620bfe
/datalakestoreaccount/resource-manager/Sources/datalakestoreaccount/data/TrustedIdProviderStateEnum.swift
4ceb8230f0d4a16671d20b78a2a8cb7d00e0e69a
[ "MIT" ]
permissive
Azure/azure-libraries-for-swift
e577d83d504f872cf192c31d97d11edafc79b8be
b7321f3c719c381894e3ee96c5808dbcc97629d7
refs/heads/master
2023-05-30T20:22:09.906482
2021-02-01T09:29:10
2021-02-01T09:29:10
106,317,605
9
5
MIT
2021-02-01T09:29:11
2017-10-09T18:02:45
Swift
UTF-8
Swift
false
false
715
swift
// TrustedIdProviderState enumerates the values for trusted id provider state. // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. public enum TrustedIdProviderStateEnum: String, Codable { // TrustedIdProviderStateDisabled specifies the trusted id provider state disabled state for trusted id provider state. case TrustedIdProviderStateDisabled = "Disabled" // TrustedIdProviderStateEnabled specifies the trusted id provider state enabled state for trusted id provider state. case TrustedIdProviderStateEnabled = "Enabled" }
[ -1 ]
cbbd2f41d64ae981a2067048126da334559f4bf7
cad3bd1db238d7790b2a9c65a0d3f7d9f9e1fe09
/Hero/HeroContext.swift
4d7a6aa4fb667025aa56413827e61828a725c4a0
[ "MIT" ]
permissive
alexcp91/Hero
a68fb4c8d78d9fac085df358c7a629e27ece010b
675edcd3e4b9b20fade9769df57e14d63dd98358
refs/heads/master
2021-01-02T08:09:28.616471
2017-01-10T17:21:29
2017-01-10T17:27:36
78,580,795
1
0
null
2017-01-10T22:36:03
2017-01-10T22:36:02
null
UTF-8
Swift
false
false
6,710
swift
// The MIT License (MIT) // // Copyright (c) 2016 Luke Zhao <[email protected]> // // 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 public class HeroContext { fileprivate var heroIDToSourceView = [String:UIView]() fileprivate var heroIDToDestinationView = [String:UIView]() fileprivate var snapshotViews = [UIView:UIView]() fileprivate var viewAlphas = [UIView:CGFloat]() fileprivate var targetStates = [UIView:HeroTargetState]() internal init(container:UIView, fromView:UIView, toView:UIView){ fromViews = HeroContext.processViewTree(view: fromView, container: container, idMap: &heroIDToSourceView, stateMap: &targetStates) toViews = HeroContext.processViewTree(view: toView, container: container, idMap: &heroIDToDestinationView, stateMap: &targetStates) self.container = container } /** The container holding all of the animating views */ public let container:UIView /** A flattened list of all views from source ViewController */ public let fromViews:[UIView] /** A flattened list of all views from destination ViewController */ public let toViews:[UIView] } // public extension HeroContext{ /** - Returns: a source view matching the heroID, nil if not found */ public func sourceView(for heroID: String) -> UIView? { return heroIDToSourceView[heroID] } /** - Returns: a destination view matching the heroID, nil if not found */ public func destinationView(for heroID: String) -> UIView? { return heroIDToDestinationView[heroID] } /** - Returns: a view with the same heroID, but on different view controller, nil if not found */ public func pairedView(for view:UIView) -> UIView?{ if let id = view.heroID{ if sourceView(for: id) == view{ return destinationView(for: id) } else if destinationView(for: id) == view{ return sourceView(for: id) } } return nil } /** - Returns: a snapshot view for animation */ public func snapshotView(for view: UIView) -> UIView { if let snapshot = snapshotViews[view] { return snapshot } unhide(view: view) // capture a snapshot without alpha & cornerRadius let oldCornerRadius = view.layer.cornerRadius let oldAlpha = view.alpha view.layer.cornerRadius = 0 view.alpha = 1 let snapshot:UIView if #available(iOS 9.0, *), let stackView = view as? UIStackView{ snapshot = stackView.slowSnapshotView() } else if let imageView = view as? UIImageView{ let contentView = UIImageView(image: imageView.image) contentView.frame = imageView.bounds contentView.contentMode = imageView.contentMode contentView.tintColor = imageView.tintColor contentView.backgroundColor = imageView.backgroundColor let snapShotView = UIView() snapShotView.addSubview(contentView) snapshot = snapShotView } else { snapshot = view.snapshotView(afterScreenUpdates: true)! } view.layer.cornerRadius = oldCornerRadius view.alpha = oldAlpha // the Snapshot's contentView must have hold the cornerRadius value, // since the snapshot might not have maskToBounds set let contentView = snapshot.subviews[0] contentView.layer.cornerRadius = view.layer.cornerRadius contentView.layer.masksToBounds = true snapshot.layer.cornerRadius = view.layer.cornerRadius if let zPosition = self[view]?.zPosition { snapshot.layer.zPosition = zPosition } else { snapshot.layer.zPosition = view.layer.zPosition } snapshot.layer.opacity = view.layer.opacity snapshot.layer.isOpaque = view.layer.isOpaque snapshot.layer.anchorPoint = view.layer.anchorPoint snapshot.layer.masksToBounds = view.layer.masksToBounds snapshot.layer.borderColor = view.layer.borderColor snapshot.layer.borderWidth = view.layer.borderWidth snapshot.layer.transform = view.layer.transform snapshot.layer.shadowRadius = view.layer.shadowRadius snapshot.layer.shadowOpacity = view.layer.shadowOpacity snapshot.layer.shadowColor = view.layer.shadowColor snapshot.layer.shadowOffset = view.layer.shadowOffset snapshot.frame = container.convert(view.bounds, from: view) snapshot.heroID = view.heroID hide(view: view) container.addSubview(snapshot) snapshotViews[view] = snapshot return snapshot } public subscript(view: UIView) -> HeroTargetState? { get { return targetStates[view] } set(newValue) { targetStates[view] = newValue } } } // internal extension HeroContext{ internal func hide(view:UIView) { if viewAlphas[view] == nil{ viewAlphas[view] = view.alpha view.alpha = 0 } } internal func unhide(view:UIView){ if let oldAlpha = viewAlphas[view]{ view.alpha = oldAlpha viewAlphas[view] = nil } } internal func unhideAll(){ for (view, oldAlpha) in viewAlphas{ view.alpha = oldAlpha } viewAlphas.removeAll() } internal static func processViewTree(view:UIView, container:UIView, idMap:inout [String:UIView], stateMap:inout [UIView:HeroTargetState]) -> [UIView]{ var rtn:[UIView] if container.convert(view.bounds, from: view).intersects(container.bounds){ rtn = [view] if let heroID = view.heroID{ idMap[heroID] = view } if let modifiers = view.heroModifiers { stateMap[view] = HeroTargetState(modifiers: modifiers) } } else { rtn = [] } for sv in view.subviews{ rtn.append(contentsOf: processViewTree(view: sv, container:container, idMap:&idMap, stateMap:&stateMap)) } return rtn } }
[ 289077 ]