blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
625
content_id
stringlengths
40
40
detected_licenses
listlengths
0
47
license_type
stringclasses
2 values
repo_name
stringlengths
5
116
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
643 values
visit_date
timestamp[ns]
revision_date
timestamp[ns]
committer_date
timestamp[ns]
github_id
int64
80.4k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
16 values
gha_event_created_at
timestamp[ns]
gha_created_at
timestamp[ns]
gha_language
stringclasses
85 values
src_encoding
stringclasses
7 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
4
6.44M
extension
stringclasses
17 values
content
stringlengths
4
6.44M
duplicates
listlengths
1
9.02k
05aeee072f5baa97dd9334763183ea74b8d6ed7c
b95fa31de281a7008ba3f47cc50682271517b4f0
/Milestone Project 3 - Habits/Habits/Habits/BlockView.swift
302e0abb10da3bb2ce5412f1928e184adfe43c76
[ "MIT" ]
permissive
rajhraval/My100DaysOfSwiftUI
2605982ebac19f8b70baefd6c2c7ee4f49471fda
f693a9f19152a6d04bff6fb2768521aba82b902e
refs/heads/master
2022-04-16T08:18:09.026227
2020-04-09T07:59:00
2020-04-09T07:59:00
210,406,202
4
1
null
null
null
null
UTF-8
Swift
false
false
1,377
swift
// // BlockView.swift // Habits // // Created by RAJ RAVAL on 10/03/20. // Copyright © 2020 Buck. All rights reserved. // import SwiftUI struct BlockView: View { let category: String let title: String let color: UIColor var body: some View { HStack { ZStack(alignment: .leading) { Color(color) .frame(width: 366, height: 113) .cornerRadius(13) HStack { Spacer() .frame(width: 23) VStack(alignment: .leading, spacing: 8) { Text(category) .font(.system(size: 14)) .fontWeight(.medium) .multilineTextAlignment(.leading) .foregroundColor(.white) Text(title) .font(.system(size: 22)) .fontWeight(.bold) .multilineTextAlignment(.leading) .foregroundColor(.white) } } } } } } struct BlockView_Previews: PreviewProvider { static var previews: some View { BlockView(category: "Health", title: "Eat eggs even on Sunday or Monday!", color: .red) } }
[ -1 ]
f7c83a689702407e3a7f89d5cd8afb2c3ebdfbc2
918ceec0a60a4c2eb85caafa5c8c9dbb82198cd9
/APP08/Meus Filmes/Filme.swift
4de7fbd4f75a70e92a3e23e9274acc759ec9d06b
[]
no_license
abdo010/CursoIOS
19b5dd3f04bc0ffff22eb33b3377a844a34c4284
f0a4a505c39d8970fa9fc84096492e5dc33aeafe
refs/heads/master
2020-03-28T01:59:57.649433
2018-08-15T22:04:40
2018-08-15T22:04:40
null
0
0
null
null
null
null
UTF-8
Swift
false
false
421
swift
// // Filme.swift // Meus Filmes // // Created by Leonardo Paza on 29/06/18. // Copyright © 2018 Curso IOS. All rights reserved. // import UIKit class Filme { var titulo: String! var descricao: String! var imagem: UIImage! init(titulo: String, descricao: String, imagem: UIImage) { self.titulo = titulo self.descricao = descricao self.imagem = imagem } }
[ -1 ]
3ccb236e1312c3a7d3b81fda5862e4c4ae70ab0f
9610012d59a0337c4e70c19ab8a6ea03374f677f
/Mac slic/KLrcCamera/KLrcCamera/Src/Siri/UI/com/NavigationBar.swift
bcbb468571bc3543bcd3a2d743d0b9be57429285
[]
no_license
QiuYeHong90/Mac-Development
45e0e5566b5829d25fc400011fc92df3b651eb36
0914d7ee5f985f25b0a6b617147577911bfa5d6a
refs/heads/master
2023-03-21T04:20:55.376283
2021-03-09T12:06:24
2021-03-09T12:06:24
null
0
0
null
null
null
null
UTF-8
Swift
false
false
195
swift
// // NavigationBar.swift // QEditor // // Created by Q YiZhong on 2019/10/6. // Copyright © 2019 YiZhong Qi. All rights reserved. // import UIKit class NavigationBar: UINavigationBar { }
[ -1 ]
a7687b4843dde22e6cf25e218ad883a96eee066c
8e1fa0424e7bd1659b56da93608a2c2c16510a48
/GoRestAPIwithProxy/GoRestAPIwithProxy/GoRestAPIwithProxy/Services/JSONModels/GET/User/User_Result.swift
54e6d5e3ed065ee1b423b1072d2980ce71af48b4
[]
no_license
vladikkk23/Network-Programing
7483e70c4ef18393843b7ba7459a2f39a1e06a26
785fd20f4832a1ec57e6350dfbf1e6e63f5c8e22
refs/heads/master
2022-10-05T08:25:47.828007
2020-06-08T13:35:41
2020-06-08T13:35:41
250,575,702
0
0
null
null
null
null
UTF-8
Swift
false
false
1,196
swift
// // User_Result.swift // GoRestAPIwithProxy // // Created by vladikkk on 02/04/2020. // Copyright © 2020 PR. All rights reserved. // import Foundation // MARK: - Users_Result used when Result is an Array of Users struct Users_Result: Codable { let meta: Meta let users: [User] enum CodingKeys: String, CodingKey { case meta = "_meta" case users = "result" } } // MARK: - User_Result used when Result is a single User struct User_Result: Codable { let meta: Single_Meta let user: User enum CodingKeys: String, CodingKey { case meta = "_meta" case user = "result" } } // MARK: - User Model struct User: Codable { let id, firstName, lastName: String let gender: Gender let dob, email, phone: String let website: String let address: String let status: Status let links: Links enum CodingKeys: String, CodingKey { case id case firstName = "first_name" case lastName = "last_name" case gender, dob, email, phone, website, address, status case links = "_links" } } enum Gender: String, Codable { case female = "female" case male = "male" }
[ -1 ]
e678a5027809133973d46364e82dfe0f5a3f0778
003d92001e9be8cd71dccd83e874c92af3c6cd29
/MSMacHelpQueueTests/MSMacHelpQueueTests.swift
7a4753601b42a55f8853e77b6bb2851aaf70a5b7
[]
no_license
simonyangme/MSMacHelpQueue
7fe06edab28d71c1a4fadf80a7a8c009381436b7
e3f49314adc820c9f17b78e2e902d7e50e1ccb12
refs/heads/master
2021-01-16T00:16:46.422325
2015-07-22T16:53:14
2015-07-22T16:53:14
38,399,196
0
0
null
null
null
null
UTF-8
Swift
false
false
919
swift
// // MSMacHelpQueueTests.swift // MSMacHelpQueueTests // // Created by Simon Yang on 6/30/15. // Copyright (c) 2015 Simon Yang. All rights reserved. // import Cocoa import XCTest class MSMacHelpQueueTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. XCTAssert(true, "Pass") } func testPerformanceExample() { // This is an example of a performance test case. self.measureBlock() { // Put the code you want to measure the time of here. } } }
[ 276481, 276489, 276492, 360491, 159807, 276543, 280649, 223318, 288857, 227417, 194652, 276577, 43109, 276582, 276581, 276585, 223340, 276589, 227439, 276592, 276603, 276606, 276613, 141450, 311435, 276627, 276631, 184475, 227492, 196773, 227495, 129203, 176314, 227528, 276684, 278742, 278746, 276709, 276710, 276715, 157944, 227576, 276753, 276760, 278810, 262450, 278846, 164162, 278856, 278862, 278863, 276821, 276822, 276831, 276835, 276847, 278898, 278908, 178571, 278951, 278954, 278965, 276920, 278969, 278985, 176594, 279002, 227813, 279019, 279022, 276998, 186893, 279054, 223767, 223769, 277017, 277029, 277048, 301634, 369220, 277066, 166507, 277101, 189037, 189042, 189043, 277117, 277118, 184962, 225933, 277133, 225936, 277138, 277142, 225943, 225944, 164512, 225956, 285353, 225962, 209581, 154291, 154294, 199366, 225997, 226001, 164563, 277204, 226004, 119513, 363231, 201442, 226035, 209660, 234238, 234241, 226051, 234245, 209670, 277254, 234250, 234253, 234256, 234263, 369432, 234268, 105246, 348959, 228129, 234280, 277289, 234283, 234286, 226097, 234289, 234301, 234304, 234305, 162626, 234311, 234312, 234317, 277327, 234323, 234326, 277339, 297822, 234335, 234340, 174949, 234343, 234346, 277354, 234349, 277360, 213876, 277366, 234361, 234366, 234367, 234372, 226181, 213894, 277381, 234377, 234381, 226194, 234387, 234392, 234395, 279456, 277410, 234404, 226214, 234409, 275371, 234412, 226223, 234419, 226227, 234425, 234430, 275397, 234438, 226249, 234445, 234450, 234451, 234454, 234457, 275418, 234463, 234466, 179176, 234477, 234482, 234492, 234495, 277505, 234498, 277510, 234503, 234506, 234509, 277517, 197647, 277518, 295953, 275469, 234517, 281625, 234530, 234531, 234534, 275495, 234539, 275500, 310317, 277550, 275505, 234548, 277563, 234555, 7229, 7230, 7231, 156733, 234560, 277566, 207938, 281666, 234565, 234569, 207953, 277585, 296018, 234583, 234584, 275547, 277596, 234594, 277603, 234603, 281707, 275565, 156785, 234612, 398457, 234622, 275590, 253063, 234631, 277640, 302217, 234632, 234642, 226451, 226452, 275607, 119963, 234652, 277665, 275620, 275625, 208043, 226479, 226481, 277686, 277690, 277694, 275671, 363744, 195811, 285929, 120055, 120056, 204041, 277792, 199971, 259363, 277800, 277803, 113966, 277806, 226608, 226609, 277809, 277815, 277821, 277824, 277825, 277831, 226632, 277838, 277841, 222548, 277844, 277845, 277852, 224605, 224606, 142689, 277862, 173420, 277868, 277871, 279919, 226675, 277878, 275831, 277882, 277883, 142716, 275838, 275839, 277890, 277891, 275847, 277896, 277897, 281992, 277900, 230799, 296338, 277907, 206228, 226711, 226712, 277911, 277925, 277927, 370091, 277936, 277939, 277940, 296375, 277946, 277949, 277952, 296387, 277957, 296391, 277962, 282060, 277965, 277974, 228823, 228824, 277977, 277980, 226781, 277983, 277988, 277993, 277994, 296425, 277997, 278002, 278005, 153095, 192010, 280077, 149007, 65041, 204313, 278060, 128583, 276040, 226888, 366154, 276046, 226897, 243292, 370271, 276085, 276088, 278140, 276097, 276100, 276101, 312972, 278160, 276116, 276117, 276120, 278170, 280220, 276126, 278191, 276146, 278195, 276148, 296628, 278201, 276156, 278214, 323276, 276179, 276180, 216795, 216796, 276195, 313065, 276210, 276219, 278285, 227091, 184086, 278299, 276257, 278307, 288547, 278316, 276279, 276282, 276283, 288574, 276287, 276298, 188246, 276311, 276332, 110452, 255872, 40850, 40853, 44952, 247712, 276385, 276394, 276400, 276401, 276408, 161722, 276413, 276430, 153552, 153566, 276450, 276454, 276468, 276469, 278518, 276475, 276478 ]
f9956b84ca158722025699696c90932fdfbd6e3c
7a5039771e4817468f3fcbc6e018d7d6c9c85c99
/projects/tuist/fixtures/ios_app_with_framework_and_resources/StaticFramework4/Project.swift
4df1f43a79dde01b9a1679f49565eb171a72318d
[ "MIT" ]
permissive
tuist/tuist
03ff07ebe1ad9db0d0ab85126eb9e08593b01cb7
2ab34d3aa91837ad50be109416752d76c90c3601
refs/heads/main
2023-09-03T15:40:59.094168
2023-09-01T11:11:05
2023-09-01T11:11:05
129,699,403
3,711
485
MIT
2023-09-13T08:01:42
2018-04-16T07:02:54
Swift
UTF-8
Swift
false
false
435
swift
import ProjectDescription let project = Project( name: "StaticFramework4", targets: [ Target( name: "StaticFramework4", platform: .iOS, product: .staticFramework, bundleId: "io.tuist.StaticFramework4", infoPlist: .default, sources: "Sources/**", resources: "Resources/**", dependencies: [ ] ), ] )
[ -1 ]
58d3bf831c4533266c32dd06a39a9296fccd8993
eeb4e8ad9cc206873d7b92013ed931f3875090fe
/Neural Networks.playgroundbook/Contents/Sources/BoardView.swift
4e684fc9252719857ddec4e0ca4f6c9324193890
[ "MIT" ]
permissive
GuiyeC/WWDC-2019
c34fb258601284e6e99a57a69a6cf80c9115f3e5
c2aec96d3604a5c090fb77a6c753dec54503fe41
refs/heads/master
2020-05-01T18:12:08.839936
2019-03-25T15:59:07
2019-03-25T15:59:07
177,618,886
0
0
null
null
null
null
UTF-8
Swift
false
false
5,648
swift
// // BoardView.swift // Neural Networks // // Created by Guillermo Cique on 23/03/2019. // import UIKit public class BoardView: UIView { public struct Constants { public static let shadowRadius: CGFloat = 3 public static let shadowOpacity: Float = 0.35 public static let borderWidthRatio: CGFloat = 0.015 public static let cornerRadiusRatio: CGFloat = 0.08 public static let squareAlpha: CGFloat = 0.08 } let rows: Int let columns: Int let glowLayer: CAShapeLayer = CAShapeLayer() public init(rows: Int, columns: Int, frame: CGRect = .zero) { self.rows = rows self.columns = columns super.init(frame: frame) didLoad() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } func didLoad() { isUserInteractionEnabled = false isOpaque = false layer.masksToBounds = false layer.shadowColor = tintColor.cgColor layer.shadowOffset = CGSize(width: 1, height: 1) layer.shadowOpacity = Constants.shadowOpacity layer.shadowRadius = Constants.shadowRadius glowLayer.frame = bounds glowLayer.shadowColor = tintColor.cgColor glowLayer.shadowOffset = CGSize.zero glowLayer.shadowRadius = 5 glowLayer.shadowOpacity = 1.0 glowLayer.fillColor = UIColor.clear.cgColor glowLayer.strokeColor = tintColor.cgColor // Create an animation that slowly fades the glow view in and out forever. let animation = CABasicAnimation(keyPath: "opacity") animation.fromValue = 0.2 animation.toValue = 0.6 animation.repeatCount = .infinity animation.duration = 1.0 animation.autoreverses = true animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut) glowLayer.add(animation, forKey: "neonGlow") layer.addSublayer(glowLayer) } override public func draw(_ rect: CGRect) { let borderWidth = min(rect.height, rect.width) * Constants.borderWidthRatio let cornerRadius = min(rect.height, rect.width) * Constants.cornerRadiusRatio let inset = borderWidth/2 var innerRect = rect innerRect.origin.x += inset innerRect.origin.y += inset innerRect.size.width -= borderWidth innerRect.size.height -= borderWidth tintColor.setFill() let rowHeight: CGFloat = innerRect.height / CGFloat(rows) let columnWidth: CGFloat = innerRect.width / CGFloat(columns) for row in 0..<rows { for column in 0..<columns { if row % 2 == column % 2 { let squareRect = CGRect( x: columnWidth*CGFloat(column) + inset, y: rowHeight*CGFloat(row) + inset, width: columnWidth, height: rowHeight) let squarePath = squarePathFor(row: row, column: column, rect: squareRect, cornerRadius: cornerRadius) squarePath.fill(with: .lighten, alpha: Constants.squareAlpha) } } } tintColor.setStroke() let path = UIBezierPath(roundedRect: innerRect, cornerRadius: cornerRadius) glowLayer.path = path.cgPath glowLayer.lineWidth = borderWidth path.lineWidth = borderWidth path.stroke(with: .lighten, alpha: 1) UIColor.black.setStroke() path.lineWidth = inset path.stroke(with: .darken, alpha: 0.05) } func squarePathFor(row: Int, column: Int, rect: CGRect, cornerRadius: CGFloat) -> UIBezierPath { switch (row, column) { case (0, 0): return UIBezierPath( roundedRect: rect, byRoundingCorners: .topLeft, cornerRadii: CGSize(width: cornerRadius, height: 0)) case (0, columns-1): return UIBezierPath( roundedRect: rect, byRoundingCorners: .topRight, cornerRadii: CGSize(width: cornerRadius, height: 0)) case (rows-1, 0): return UIBezierPath( roundedRect: rect, byRoundingCorners: .bottomLeft, cornerRadii: CGSize(width: cornerRadius, height: 0)) case (rows-1, columns-1): return UIBezierPath( roundedRect: rect, byRoundingCorners: .bottomRight, cornerRadii: CGSize(width: cornerRadius, height: 0)) default: return UIBezierPath(rect: rect) } } override public func layoutSubviews() { super.layoutSubviews() // Animate glowLayer CATransaction.begin() if let animation = layer.animation(forKey: "bounds") { CATransaction.setAnimationDuration(animation.duration) CATransaction.setAnimationTimingFunction(animation.timingFunction) let animation = CABasicAnimation(keyPath: "path") glowLayer.add(animation, forKey: "path") } else { CATransaction.disableActions() } glowLayer.frame = bounds setNeedsDisplay() CATransaction.commit() } override public func tintColorDidChange() { super.tintColorDidChange() layer.shadowColor = tintColor.cgColor glowLayer.shadowColor = tintColor.cgColor glowLayer.strokeColor = tintColor.cgColor setNeedsDisplay() } }
[ -1 ]
fdab6d194a9d3a1f4e7b2f72176170d9c26af8a8
3bc13a52af8f0f6b98ef925f5e631e1e33ab87f7
/reserveMyStuff/reserveMyStuff/SceneDelegate.swift
fe0b8efb8b2435d3f7df9decaaad1f84ddbf15e7
[]
no_license
JoshFranco/reserveMyStuff
8e8b38e6f3762632c9fab9d570b7acaeeb3a5deb
44befb986b812fecd2f39b68c361f047c2b28c6d
refs/heads/master
2022-04-14T11:41:08.877888
2020-04-18T06:44:48
2020-04-18T06:44:48
256,575,994
0
0
null
null
null
null
UTF-8
Swift
false
false
2,448
swift
// // SceneDelegate.swift // reserveMyStuff // // Created by Josh Franco on 4/17/20. // Copyright © 2020 Josh Franco. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? var appCoordinator: AppCoordinator? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } window = UIWindow(frame: windowScene.coordinateSpace.bounds) window?.windowScene = windowScene self.appCoordinator = AppCoordinator(within: self.window, with: nil) self.appCoordinator?.start() } 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. // Save changes in the application's managed object context when the application transitions to the background. (UIApplication.shared.delegate as? AppDelegate)?.saveContext() } }
[ 266688, 332162, 389507, 345766, 268299, 330830, 399409, 334322, 268435, 343610, 268922 ]
81a27a0d120cff5eb2e92a9ff3d3eb4070d3daca
5eb204359f0e3e4c30e3e415d25f8f0dee86bb85
/AppTracker/TrackEvents/VisitEvent.swift
86f4ad89fdf30f464d4f46b879fe1fbdf496ac24
[]
no_license
pikaboo/AppTracker
a9afea6f2c63054c04926b5e38b72d75ab55bbea
14f7ba2095b730a53e0195d09318e309773ea426
refs/heads/master
2020-04-19T02:59:37.844125
2019-01-28T18:06:50
2019-01-28T18:06:50
167,921,310
0
0
null
null
null
null
UTF-8
Swift
false
false
746
swift
// // VisitEvent.swift // AppTracker // // Created by Lena Brusilovski on 26/01/2019. // Copyright © 2019 Lena Brusilovski. All rights reserved. // import UIKit import CoreLocation class VisitEvent:NSObject, Codable { let logDate:String = Date().toString() let name:String! = "VisitEvent" let arrivalDate: String! let departureDate:String! let horizontalAccuracy:Double! let coordinate:Coordinate! init(visit:CLVisit) { self.arrivalDate = visit.arrivalDate.toString() self.departureDate = visit.departureDate.toString() self.coordinate = Coordinate(lat: visit.coordinate.latitude, lng: visit.coordinate.longitude) self.horizontalAccuracy = visit.horizontalAccuracy } }
[ -1 ]
e74633c6cf02df97a23a0fdeeb6edab9128cb138
0bc36b7e748a38eeffb94992d9cad11cd0faf6cc
/TMDB/Models/Find/TMDBExternalSource.swift
bff6d7d10432d12b737361f6ddc36302906b4b23
[ "MIT" ]
permissive
okankocyigit/TMDB
f7e6464d841dd9c3e9b945000560751e007f9d71
1a44524bcc644706a7447586f7e548b046d4ea9e
refs/heads/master
2023-01-11T19:29:05.711521
2020-11-20T11:27:32
2020-11-20T11:27:32
256,996,384
0
0
null
null
null
null
UTF-8
Swift
false
false
146
swift
public enum TMDBExternalSource: String { case imdb_id, freebase_mid, freebase_id, tvdb_id, tvrage_id, facebook_id, twitter_id, instagram_id }
[ -1 ]
3b1cfb06dc7c104562b57356a3c68473cdc5722e
748b08f228d22051ede186439d8b32ff9ee0b377
/Library@home/Book.swift
c25afee96a57c20edd0e80ba621cae6816c08e2c
[]
no_license
brentongalien981/P2PBooks-2018
53c65501116e280f3e7a81f164344b96769cdd7f
743ff2f7bd41554d3625f470cb808ac2425271ac
refs/heads/master
2020-03-27T14:49:46.485334
2018-08-30T01:54:50
2018-08-30T01:54:50
146,681,435
0
0
null
null
null
null
UTF-8
Swift
false
false
1,067
swift
// // Book.swift // Library@home // // Created by ops on 2018-06-14. // Copyright © 2018 ops. All rights reserved. // import Foundation import Firebase import SwiftyJSON class Book { var id: String? var pseudoId: Int? var title: String! var author: String! var description: String! // var photoDownloadUrl: String? var photos: [String] var createdAt: Double? var updatedAt: Double? var price: Int? private var image: UIImage! init(image: UIImage, title: String) { self.image = image self.title = title // self.photos = [:] self.photos = [] } init(_ id: String?, _ title: String, _ author: String, _ photos: [String], price: Int?, description: String, createdAt: Double?, updatedAt: Double?) { self.id = id self.title = title self.author = author self.photos = photos self.price = price self.description = description self.createdAt = createdAt self.updatedAt = updatedAt } }
[ -1 ]
943e05562ca07bf7d418c7545ff4525f40afd1ec
a3967d37d9c70c87963f14b487f8edae4ab873cf
/qmapp/QatarMuseum/ReusableComponents/CommonColours/QMColours.swift
96dc412b2baf7d9df893b0eaad7d3a00907bfef0
[]
no_license
Wowdev-repo/QMAIOS
f09e2ee0e7392dd1b364e15f2b0989c99e976676
1cf432631d6a9303ad74652b65c3dd733ee84f50
refs/heads/master
2020-09-15T07:54:32.541382
2019-07-09T04:54:12
2019-07-09T04:54:12
223,382,894
0
0
null
null
null
null
UTF-8
Swift
false
false
2,768
swift
// // QMColours.swift // QatarMuseums // // Created by Exalture on 21/07/18. // Copyright © 2018 Exalture. All rights reserved. // import Foundation extension UIColor { static var whiteColor: UIColor { return UIColor.white } static var blackColor: UIColor { return UIColor.black } static var lightGrayColor: UIColor { return UIColor.lightGray } static var darkGrayColor: UIColor { return UIColor.darkGray } static var eventCellAshColor: UIColor { return UIColor(red: 248/256, green: 248/256, blue: 248/256, alpha: 1) } static var eventlisBlue: UIColor { return UIColor(red: 129/255, green: 166/255, blue: 215/255, alpha: 1) } static var profilePink: UIColor { return UIColor(red: 241/255, green: 60/255, blue: 134/255, alpha: 1) } static var profileLightPink: UIColor { return UIColor(red: 255/255, green: 195/255, blue: 223/255, alpha: 1) } static var viewMyFavDarkPink: UIColor { return UIColor(red: 251/255, green: 50/255, blue: 134/255, alpha: 1) } static var viewMycultureBlue: UIColor { return UIColor(red: 127/255, green: 167/255, blue: 211/255, alpha: 1) } static var viewMycultureLightBlue: UIColor { return UIColor(red: 196/255, green: 238/255, blue: 244/255, alpha: 1) } static var viewMyculTitleBlue: UIColor { return UIColor(red: 63/255, green: 167/255, blue: 238/255, alpha: 1) } static var startTourLightBlue: UIColor { return UIColor(red: 128/255, green: 166/255, blue: 215/255, alpha: 0.6) } static var notificationCellAsh: UIColor { return UIColor(red: 242/255, green: 242/255, blue: 242/255, alpha: 1) } static var popupBackgroundWhite: UIColor { return UIColor(red: 127.5/255, green: 127.5/255, blue: 127.5/255, alpha: 1.0) } static var eventTitlePink: UIColor { return UIColor(red: 236/255, green: 65/255, blue: 137/255, alpha: 1) } static var loadingViewGray: UIColor { return UIColor(red: 233, green: 233, blue: 233, alpha: 1) } static var noDataViewGray: UIColor { return UIColor(red: 243/255, green: 241/255, blue: 238/255, alpha: 1) } static var filterTextSelectedGray: UIColor { return UIColor(red: 230/255, green: 230/255, blue: 229/255, alpha: 1) } static var settingsSwitchOnTint: UIColor { return UIColor(red: 82/255, green: 178/255, blue: 74/255, alpha: 1) } static var mapLevelColor: UIColor { return UIColor(red: 205/255, green: 215/255, blue: 224/255, alpha: 1) } static var numberPadColor: UIColor { return UIColor(red: 178/255, green: 193/255, blue: 201/255, alpha: 1) } }
[ -1 ]
e1b31c34ecd9d48f72f52abcb86a9c584e072c0f
5277ccd89993a6c80c7ceea0dc8cec045df69723
/WLScheduleTableCell/Classes/WLExtensionButton.swift
3455a394626fa6e04b26c33161e8b79cff502797
[ "MIT" ]
permissive
luowanglin/WLScheduleTableCell
d87950c68bf80662c64a08af257519c8f1547300
07b9ce58d3683225e42ed89b3c88b2b409719136
refs/heads/master
2021-04-12T09:07:42.999750
2019-05-21T07:08:38
2019-05-21T07:08:38
126,452,026
2
1
null
null
null
null
UTF-8
Swift
false
false
689
swift
// // WLExtensionButton.swift // WLScheduleTableCellDemo // // Created by luowanglin on 2018/3/23. // Copyright © 2018年 luowanglin. All rights reserved. // import UIKit @objc public extension UIButton { private struct AssociatedKeys { static var indexPath:IndexPath? } @objc var indexPath:IndexPath? { get{ return objc_getAssociatedObject(self, &AssociatedKeys.indexPath) as? IndexPath } set{ if let newValue = newValue { objc_setAssociatedObject(self, &AssociatedKeys.indexPath, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) } } } }
[ -1 ]
d25b833a17372bcbdff1ecb9800924583a535048
69405a44b740c0ad37e7ddaa72504c1de0624de7
/GitOdo.old/GitOdo/SettingViewController.swift
1d8bedff68d8cee210111badf6d88a724ce3d00b
[]
no_license
bonegollira/GitOdo
bf73c8d6033e3aee9bc24f71b62ea6c13ec29dec
06a54f9fcbe785cfceb1964c1736d11f1c379d48
refs/heads/master
2016-09-06T08:22:25.780063
2015-09-23T11:12:18
2015-09-23T11:12:18
31,119,386
6
0
null
2015-09-23T11:03:13
2015-02-21T08:14:17
Swift
UTF-8
Swift
false
false
6,700
swift
// // RepositoryViewController.swift // GitOdo // // Created by daisuke on 2015/03/08. // Copyright (c) 2015年 daisuke. All rights reserved. // import UIKit import Cartography extension SettingViewController: ViewControllerLayout { func configure__self () { self.title = "Setting" } func configure__view () { self.view.backgroundColor = UIColor.whiteColor() } func configure__addRepositoryField () { self.addRepositoryFieldComponent.hidden = true } func configure__addGithubField () { self.addGithubFieldComponent.hidden = true } func autolayout__addRepositoryField () { constrain(self.addRepositoryFieldComponent) { addRepositoryField in addRepositoryField.left == addRepositoryField.superview!.left addRepositoryField.right == addRepositoryField.superview!.right addRepositoryField.top == addRepositoryField.superview!.top addRepositoryField.height == 176 } } func autolayout__addGithubField () { constrain(self.addGithubFieldComponent) { addGithubField in addGithubField.left == addGithubField.superview!.left addGithubField.right == addGithubField.superview!.right addGithubField.top == addGithubField.superview!.top addGithubField.height == 176 } } func autolayout__tableView () { constrain(self.tableViewComponent) { tableView in tableView.edges == tableView.superview!.edges return } } func render () { self.addRepositoryFieldComponent.render(self.view) self.addGithubFieldComponent.render(self.view) self.tableViewComponent.render(self.view) self.configure__self() self.configure__view() self.configure__addRepositoryField() self.configure__addGithubField() self.autolayout__addRepositoryField() self.autolayout__addGithubField() self.autolayout__tableView() } } class SettingViewController: UIViewController, SettingTableViewDelegate, SomeTextFieldViewDelegate { let tableViewComponent = SettingTableViewComponent(frame: CGRectZero) let addRepositoryFieldComponent = SomeTextFieldComponent(configures: [ SomeTextFieldConfigure(id: "ower", placeholder: "user or organization", required: true), SomeTextFieldConfigure(id: "repository", placeholder: "repository", required: true), SomeTextFieldConfigure(id: "enterprise", placeholder: "(https://api.github.com/)", required: false) ]) let addGithubFieldComponent = SomeTextFieldComponent(configures: [ SomeTextFieldConfigure(id: "account", placeholder: "your acoount", required: true), SomeTextFieldConfigure(id: "accessToken", placeholder: "access token", required: true), SomeTextFieldConfigure(id: "host", placeholder: "(github.com)", required: false) ]) var tapGestureForRemoveArchive = UITapGestureRecognizer() var selectingIndexPath: NSIndexPath? { willSet { if let indexPath = selectingIndexPath { self.unbindRemoveButton(indexPath) } } didSet { if let indexPath = selectingIndexPath { self.bindRemoveButton(indexPath) } } } override func viewDidLoad() { super.viewDidLoad() self.tableViewComponent.delegate = self self.addRepositoryFieldComponent.delegate = self self.addGithubFieldComponent.delegate = self self.tapGestureForRemoveArchive = UITapGestureRecognizer(target: self, action: "removeArchive:") self.render() } func beTableViewing () { self.addRepositoryFieldComponent.hidden = true self.addGithubFieldComponent.hidden = true self.tableViewComponent.hidden = false } func beAddingRepository () { self.tableViewComponent.hidden = true self.addRepositoryFieldComponent.hidden = false self.addRepositoryFieldComponent.becomeFirstResponder() } func beAddingGithub () { self.tableViewComponent.hidden = true self.addGithubFieldComponent.hidden = false self.addGithubFieldComponent.becomeFirstResponder() } func bindRemoveButton (indexPath: NSIndexPath) { let cell = self.tableViewComponent.cellForRowAtIndexPath(indexPath) as! SettingTableViewCell UIView.animateWithDuration(0.3, animations: { cell.deleteIcon.alpha = 1.0 }) cell.deleteIcon.addGestureRecognizer(self.tapGestureForRemoveArchive) } func unbindRemoveButton (indexPath: NSIndexPath) { let cell = self.tableViewComponent.cellForRowAtIndexPath(indexPath) as! SettingTableViewCell UIView.animateWithDuration(0.3, animations: { cell.deleteIcon.alpha = 0.0 }) cell.deleteIcon.removeGestureRecognizer(self.tapGestureForRemoveArchive) } func removeArchive (sender: UITapGestureRecognizer) { if let indexPath = self.selectingIndexPath { if indexPath.section == 0 { ArchiveConnection.sharedInstance().removeRepository(index: indexPath.row) } if indexPath.section == 1 { ArchiveConnection.sharedInstance().removeGithub(index: indexPath.row) } self.selectingIndexPath = nil } } // MARK: SomeTextFieldViewDelegate func someTextFieldView(someTextFieldView: SomeTextFieldComponent, didInputedTexts texts: [String : String]) { if someTextFieldView.isEqual(self.addRepositoryFieldComponent) { ArchiveConnection.sharedInstance().addRepository( texts["ower"]!, repo: texts["repository"]!, enterprise: texts["enterprise"]! ) self.addRepositoryFieldComponent.hidden = true self.tableViewComponent.hidden = false } if someTextFieldView.isEqual(self.addGithubFieldComponent) { ArchiveConnection.sharedInstance().addGithub( texts["account"]!, accessToken: texts["accessToken"]!, host: texts["host"]! ) } self.beTableViewing() } func someTextFieldViewDidCanceled(someTextFieldView: SomeTextFieldComponent) { self.beTableViewing() } // MARK: SettingTableViewDelegate func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { self.selectingIndexPath = indexPath.isEqual(self.selectingIndexPath) ? nil : indexPath } func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) { self.selectingIndexPath = nil } func tableView(tableView: UITableView, didEndDisplayingCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { if indexPath.isEqual(self.selectingIndexPath) { self.selectingIndexPath = nil } } func settingTableHeaderView (headerView: SettingTableHeaderView, didSelectSection section: Int) { if section == 0 { self.beAddingRepository() } if section == 1 { self.beAddingGithub() } } }
[ -1 ]
0dac9a4dca53e927cda1abf85f3f9af104f6576c
87e6317795840c392dc407dcdb9c06ac0b6bd720
/Project25-SelfieShare/SelfieShare/SelfieShare/AppDelegate.swift
01a26e71fdd36df900579153b6b2e1d473fb6ff5
[]
no_license
Steven0351/HackingWithSwift
1f56e408b9bfea0a9270bb99a7685729c19c1341
05782e5269ef39f949172e9dbe2518ff6c66fcf9
refs/heads/master
2020-04-05T12:34:58.316347
2017-07-23T06:10:24
2017-07-23T06:10:24
95,162,458
0
0
null
null
null
null
UTF-8
Swift
false
false
2,179
swift
// // AppDelegate.swift // SelfieShare // // Created by Steven Sherry on 7/14/17. // Copyright © 2017 Steven Sherry. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 131278, 278743, 278747, 295133, 155872, 131299, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 230284, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 213902, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 148946, 288214, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 354656, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 330244, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 224151, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 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, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 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, 276052, 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, 127460, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 226185, 234379, 324490, 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, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 234648, 275606, 234650, 275608, 324757, 300189, 324766, 119967, 234653, 308379, 324768, 283805, 242852, 300197, 234661, 283813, 234664, 234657, 275626, 234667, 177318, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276410, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 276464, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 194649, 227418, 350299, 350302, 227423, 350304, 178273, 309346, 194657, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 276579, 227430, 276583, 309354, 301167, 276590, 350321, 350313, 350316, 284786, 350325, 252022, 276595, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 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, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 285831, 253064, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 146765, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 64966, 245191, 163272, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 286312, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 278227, 286420, 229076, 286425, 319194, 278235, 301163, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 280021, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 294803, 40851, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
461035332881625bb97a5ee74522a6ce009694b8
a0f35cdaea1773f53c7b7dac8c6b915337ec8c15
/FlightMap-Demo-iOS/AppDelegate/SceneDelegate.swift
f2752fa0503a2fe31e4aac59a3d9e526d6efff7d
[]
no_license
jungleworks/FlightmapSDKDemo-iOS
4016f75434d5ae7528232d5af245e723a0bf2fbc
6b5e0a66ca02432837fad102aa47ecff3bd9e35e
refs/heads/master
2022-12-07T23:13:03.624110
2020-08-26T05:19:21
2020-08-26T05:19:21
275,734,953
0
0
null
null
null
null
UTF-8
Swift
false
false
2,347
swift
// // SceneDelegate.swift // FlightMap-Demo-iOS // // Created by Intern on 22/06/20. // Copyright © 2020 Intern. All rights reserved. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 344103, 393260, 393269, 213049, 376890, 385082, 16444, 393277, 376906, 327757, 254032, 286804, 368728, 254045, 368736, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 180432, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 336124, 385281, 336129, 262405, 180491, 164107, 336140, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 418145, 262497, 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, 197160, 377384, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 328690, 435188, 328703, 328710, 418822, 328715, 377867, 361490, 386070, 271382, 336922, 345119, 377888, 328747, 345134, 345139, 361525, 361537, 377931, 197708, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 337048, 345247, 361645, 337072, 345268, 337076, 402615, 361657, 402636, 328925, 165086, 165092, 222438, 328942, 386286, 386292, 206084, 115973, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 370208, 419360, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 419404, 353868, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 419518, 403139, 337607, 419528, 419531, 419536, 272083, 394967, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 362274, 378664, 354107, 345916, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 247639, 337751, 370520, 313181, 182110, 354143, 345965, 354157, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 247692, 395148, 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, 256214, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 354728, 338353, 338363, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 330612, 330643, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 330750, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 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, 249215, 175487, 249219, 175491, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 339401, 380364, 339406, 372177, 339414, 413143, 249303, 339418, 339421, 249310, 249313, 339425, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 372354, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 224923, 208539, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 257717, 224949, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 257791, 339711, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 225138, 339827, 257909, 225142, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 438438, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356631, 356638, 356641, 356644, 356647, 266537, 356650, 389417, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 332118, 348503, 430422, 250201, 250203, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 250239, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 340639, 258723, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 357212, 430940, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 340859, 324476, 430973, 119675, 340863, 324479, 324482, 324485, 324488, 381834, 185226, 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, 209904, 201712, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 250915, 250917, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 209996, 431180, 349268, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 160896, 349313, 152704, 210053, 210056, 349320, 373905, 259217, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 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, 358192, 366384, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 325494, 399222, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 399318, 219094, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 211161, 350426, 334047, 350449, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 194942, 391564, 366991, 334224, 342431, 375209, 326059, 375220, 342453, 334263, 326087, 358857, 195041, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 244309, 334425, 326240, 375401, 334466, 334469, 391813, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 326599, 359367, 187335, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 384099, 384102, 384108, 367724, 326764, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 384189, 351424, 384192, 343232, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 261391, 359695, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 171304, 245032, 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, 359984, 400977, 400982, 179803, 155241, 138865, 155255, 155274, 368289, 245410, 245415, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 262006, 327542, 425846, 262009, 147319, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
c47f1a1c906ba0e6d6927ef9083c3ec6729221a5
e2b91b84cdc7848a23d6f9f62d22ee8387dd1d2d
/EasyAttributedString/Supports/Properties/Exts.swift
5780e589bd77b3222ba13646809ea339bf393e07
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
Meniny/EasyAttributedString
2fc22634593b06e9ef5d4f252263d0b41ba29876
e9d8ab4024ec37a130ff7d486da03b8a6089c654
refs/heads/master
2020-03-19T06:10:48.361569
2019-04-11T15:33:39
2019-04-11T15:33:39
135,997,590
2
1
null
null
null
null
UTF-8
Swift
false
false
1,575
swift
// // EasyAttributedString // // Created by Elias Abel // Copyright © 2018 Meniny Lab. All rights reserved. // // Blog: https://meniny.cn // Email: admin@meniny.cn // Twitter: @_Meniny // import Foundation #if os(OSX) import AppKit #else import UIKit #endif extension NSRange { init(_ range: Range<Int>) { self = NSRange(location: range.lowerBound, length: range.count) } init(_ string: NSString) { self = NSRange(location: 0, length: string.length) } } extension NSMutableParagraphStyle { func clone() -> NSMutableParagraphStyle { let clone = NSMutableParagraphStyle() if #available(iOS 9.0, *) { clone.setParagraphStyle(self) } else { clone.cloneParagraphStyle(self) } return clone } fileprivate func cloneParagraphStyle(_ other: NSMutableParagraphStyle) { alignment = other.alignment firstLineHeadIndent = other.firstLineHeadIndent headIndent = other.headIndent tailIndent = other.tailIndent lineBreakMode = other.lineBreakMode maximumLineHeight = other.maximumLineHeight minimumLineHeight = other.minimumLineHeight lineSpacing = other.lineSpacing paragraphSpacing = other.paragraphSpacing paragraphSpacingBefore = other.paragraphSpacingBefore baseWritingDirection = other.baseWritingDirection lineHeightMultiple = other.lineHeightMultiple } }
[ -1 ]
13c5d42cf288f2dc61c0879abe8841636a634ea9
92a876cb2f2a414d9b8c6abe89efa9a2b4d55ca3
/cc_swift/Character.swift
f08c184696bd23ae3e7a0897440ae93b6f0d148b
[]
no_license
rip333/cc_5e
6eac7f39487f316233f282b9d0bacedfced928b5
a319bd6188d27ff0238848cf284ae31adf5ae826
refs/heads/master
2021-01-18T15:22:24.436830
2017-03-07T22:17:13
2017-03-07T22:17:13
null
0
0
null
null
null
null
UTF-8
Swift
false
false
9,161
swift
// // Character.swift // cc_swift // // Created by Andrew Kolb on 1/31/17. // // import UIKit import SwiftyJSON class Character { var character: JSON = [:] var name = "" var classes: JSON = [] var race: JSON = [:] var background: JSON = [:] var alignment = "" var experience = "" var currentHitDice = 0 var currentHP = 0 var maxHP = 0 var AC = 0 var proficiencyBonus = 2 var initiative = 0 var speed = 0 var saveProficiencies: JSON = [] var strScore = 0 var strBonus = 0 var strSave = 0 var dexScore = 0 var dexBonus = 0 var dexSave = 0 var conScore = 0 var conBonus = 0 var conSave = 0 var intScore = 0 var intBonus = 0 var intSave = 0 var wisScore = 0 var wisBonus = 0 var wisSave = 0 var chaScore = 0 var chaBonus = 0 var chaSave = 0 var skills: JSON = [] var weaponProficiencies = "" var armorProficienceies = "" var toolProficiencies = "" var languages = "" var personalityTraits = "" var ideals = "" var bonds = "" var flaws = "" var notes = "" var equipment: JSON = [:] var spellcasting: JSON = [:] var martialResource: JSON = [:] var spellcastingResource: JSON = [:] func loadCharacter(filename: String) { if let path = Bundle.main.path(forResource: filename, ofType: "json") { do { let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .alwaysMapped) let jsonObj = JSON(data: data) if jsonObj != JSON.null { // print("jsonData:\(jsonObj)") character = jsonObj } else { print("Could not get json from file, make sure that file contains valid json.") } } catch let error { print(error.localizedDescription) } } else { print("Invalid filename/path.") } name = character["name"].stringValue classes = character["classes"] race = character["race"] background = character["background"] alignment = character["alignment"].stringValue experience = character["experience"].stringValue speed = character["speed"].intValue weaponProficiencies = character["weapon_proficiencies"].stringValue armorProficienceies = character["armor_proficiencies"].stringValue toolProficiencies = character["tool_proficiencies"].stringValue languages = character["languages"].stringValue personalityTraits = character["personality_traits"].stringValue ideals = character["ideals"].stringValue bonds = character["bonds"].stringValue flaws = character["flaws"].stringValue notes = character["notes"].stringValue let ability_scores = character["ability_scores"].dictionaryValue let str = ability_scores["STR"]?.dictionaryValue strScore = (str?["score"]?.intValue)! strBonus = (str?["bonus"]?.intValue)! strSave = (str?["save"]?.intValue)! let dex = ability_scores["DEX"]?.dictionaryValue dexScore = (dex?["score"]?.intValue)! dexBonus = (dex?["bonus"]?.intValue)! dexSave = (dex?["save"]?.intValue)! let con = ability_scores["CON"]?.dictionaryValue conScore = (con?["score"]?.intValue)! conBonus = (con?["bonus"]?.intValue)! conSave = (con?["save"]?.intValue)! let int = ability_scores["INT"]?.dictionaryValue intScore = (int?["score"]?.intValue)! intBonus = (int?["bonus"]?.intValue)! intSave = (int?["save"]?.intValue)! let wis = ability_scores["WIS"]?.dictionaryValue wisScore = (wis?["score"]?.intValue)! wisBonus = (wis?["bonus"]?.intValue)! wisSave = (wis?["save"]?.intValue)! let cha = ability_scores["CHA"]?.dictionaryValue chaScore = (cha?["score"]?.intValue)! chaBonus = (cha?["bonus"]?.intValue)! chaSave = (cha?["save"]?.intValue)! skills = character["skills"] currentHitDice = character["current_hit_dice"].intValue currentHP = character["current_hp"].intValue maxHP = character["max_hp"].intValue AC = character["ac"].intValue proficiencyBonus = character["proficiency_bonus"].intValue initiative = character["initiative"].intValue saveProficiencies = character["save_proficiencies"] equipment = character["equipment"] spellcasting = character["spellcasting"] let resources = character["resources"] martialResource = (resources["martial"]) spellcastingResource = (resources["spellcasting"]) } func saveCharacter(filename: String) { // Update the character dict based on properties character["name"].string = name character["classes"] = classes character["race"] = race character["background"] = background character["alignment"].string = alignment character["experience"].string = experience character["speed"].int = speed character["weapon_proficiencies"].string = weaponProficiencies character["armor_proficiencies"].string = armorProficienceies character["tool_proficiencies"].string = toolProficiencies character["languages"].string = languages character["personality_traits"].string = personalityTraits character["ideals"].string = ideals character["bonds"].string = bonds character["flaws"].string = flaws character["notes"].string = notes var ability_scores = character["ability_scores"].dictionaryValue var str = ability_scores["STR"]?.dictionaryValue str?["score"]?.int = strScore str?["bonus"]?.int = strBonus str?["save"]?.int = strSave ability_scores["STR"]?.dictionaryObject = str var dex = ability_scores["DEX"]?.dictionaryValue dex?["score"]?.int = dexScore dex?["bonus"]?.int = dexBonus dex?["save"]?.int = dexSave ability_scores["DEX"]?.dictionaryObject = dex var con = ability_scores["CON"]?.dictionaryValue con?["score"]?.int = conScore con?["bonus"]?.int = conBonus con?["save"]?.int = conSave ability_scores["CON"]?.dictionaryObject = con var int = ability_scores["INT"]?.dictionaryValue int?["score"]?.int = intScore int?["bonus"]?.int = intBonus int?["save"]?.int = intSave ability_scores["INT"]?.dictionaryObject = int var wis = ability_scores["WIS"]?.dictionaryValue wis?["score"]?.int = wisScore wis?["bonus"]?.int = wisBonus wis?["save"]?.int = wisSave ability_scores["WIS"]?.dictionaryObject = wis var cha = ability_scores["CHA"]?.dictionaryValue cha?["score"]?.int = chaScore cha?["bonus"]?.int = chaBonus cha?["save"]?.int = chaSave ability_scores["CHA"]?.dictionaryObject = cha character["ability_scores"].dictionaryObject = ability_scores character["skills"] = skills character["current_hit_dice"].int = currentHitDice character["current_hp"].int = currentHP character["max_hp"].int = maxHP character["ac"].int = AC character["proficiency_bonus"].int = proficiencyBonus character["initiative"].int = initiative character["save_proficiencies"] = saveProficiencies character["equipment"] = equipment character["spellcasting"] = spellcasting character["resources"].dictionaryObject = ["martial":martialResource, "spellcasting":spellcastingResource] // Save the character dict as JSON to the file let path = Bundle.main.path(forResource: filename, ofType: "json") let characterStr = character.description let data = characterStr.data(using: String.Encoding.utf8) if let file = FileHandle(forWritingAtPath:path!) { file.write(data!) } } func getBonus(score: Int) -> Int { let bonus = (score/2)-5 return bonus } func getSave(bonus: Int, attribute: JSON) -> Int { var save = bonus let isContained = saveProficiencies.arrayValue.contains(attribute) if isContained { save += proficiencyBonus } return save } func getHpMaximum() { let firstClass = classes[0] let hitDie: Int = firstClass["hitDie"].int! let level: Int = firstClass["level"].int! maxHP = 0 var i = 1 while i < level+1 { if i == 1 { maxHP = hitDie + conBonus } else { maxHP += (hitDie/2) + 1 + conBonus } i += 1 } } }
[ -1 ]
09f44f09f23fb17d594d880179f25c1454456230
82f036b4b3b09854bf1be8c613a6eb96a5b1293d
/BibTheGuyUITests/BibTheGuyUITests.swift
7a822ea5817520926bc47df4ad9bddb9d69061b3
[]
no_license
bc-swift-2020f/bip-the-guy-jzulewski
51dca0c12ec81467f06a8a6fe3936f3feb66ff17
faaf4233a1d654a0f13f3a21acac657db62c5164
refs/heads/main
2022-12-09T14:21:33.621955
2020-09-21T19:47:52
2020-09-21T19:47:52
297,435,296
0
0
null
null
null
null
UTF-8
Swift
false
false
1,420
swift
// // BibTheGuyUITests.swift // BibTheGuyUITests // // Created by John Zulewski on 9/21/20. // import XCTest class BibTheGuyUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } } }
[ 360463, 155665, 376853, 344106, 253996, 385078, 163894, 180279, 319543, 352314, 213051, 376892, 32829, 286787, 352324, 237638, 352327, 385095, 393291, 163916, 368717, 311373, 196687, 278607, 311377, 254039, 426074, 368732, 180317, 32871, 352359, 221292, 278637, 385135, 319599, 376945, 131190, 385147, 131199, 426124, 196758, 49308, 65698, 311459, 49317, 377008, 377010, 180409, 295099, 377025, 377033, 164043, 417996, 254157, 368849, 368850, 139478, 229591, 385240, 254171, 147679, 147680, 311520, 205034, 254189, 286957, 254193, 344312, 336121, 262403, 147716, 368908, 180494, 262419, 368915, 254228, 319764, 278805, 377116, 254250, 311596, 131374, 418095, 336177, 368949, 180534, 155968, 287040, 311622, 270663, 319816, 368969, 254285, 180559, 377168, 344402, 229716, 368982, 270703, 139641, 385407, 385409, 270733, 106893, 385423, 385433, 213402, 385437, 254373, 156069, 385448, 385449, 311723, 115116, 385463, 319931, 278974, 336319, 336323, 188870, 278988, 278992, 262619, 377309, 377310, 369121, 369124, 279014, 270823, 279017, 311787, 213486, 360945, 139766, 393719, 279030, 377337, 279033, 254459, 410108, 410109, 262657, 377346, 279042, 279053, 410126, 262673, 385554, 393745, 303635, 279060, 279061, 254487, 410138, 279066, 188957, 377374, 385569, 385578, 377388, 197166, 393775, 418352, 33339, 352831, 33344, 385603, 377419, 385612, 303693, 426575, 385620, 369236, 115287, 189016, 270938, 287327, 279143, 279150, 287345, 352885, 352886, 344697, 189054, 287359, 385669, 369285, 311944, 344714, 311950, 377487, 311953, 287379, 336531, 180886, 426646, 352921, 377499, 221853, 344737, 295591, 352938, 295598, 279215, 418479, 279218, 164532, 336565, 287418, 377531, 303802, 377534, 377536, 66243, 385737, 287434, 385745, 279249, 303826, 369365, 369366, 385751, 230105, 361178, 352989, 352990, 418529, 295649, 385763, 295653, 369383, 230120, 361194, 312046, 418550, 344829, 279293, 205566, 197377, 434956, 312076, 295698, 418579, 426772, 197398, 426777, 221980, 344864, 197412, 336678, 262952, 189229, 262957, 164655, 197424, 328495, 197428, 336693, 230198, 377656, 426809, 197433, 222017, 295745, 377669, 197451, 369488, 279379, 385878, 385880, 295769, 197467, 435038, 230238, 279393, 303973, 279398, 385895, 197479, 385901, 197489, 295799, 164730, 336765, 254851, 369541, 172936, 320394, 426894, 189327, 377754, 172971, 140203, 377778, 304050, 189362, 189365, 377789, 189373, 345030, 345034, 279499, 418774, 386007, 386009, 418781, 386016, 123880, 418793, 320495, 222193, 435185, 271351, 214009, 312313, 435195, 328701, 312317, 386049, 328705, 418819, 410629, 377863, 189448, 230411, 320526, 361487, 435216, 386068, 254997, 336928, 336930, 410665, 345137, 361522, 312372, 238646, 238650, 320571, 386108, 410687, 336962, 238663, 377927, 361547, 205911, 156763, 361570, 214116, 230500, 214119, 402538, 279659, 173168, 230514, 238706, 279666, 312435, 377974, 66684, 279686, 402568, 222344, 140426, 337037, 386191, 410772, 222364, 418975, 124073, 402618, 148674, 402632, 148687, 402641, 189651, 419028, 279766, 189656, 304353, 279780, 222441, 279789, 386288, 66802, 271607, 369912, 386296, 369913, 419066, 386300, 279803, 386304, 320769, 369929, 419097, 320795, 115997, 222496, 320802, 304422, 369964, 353581, 116014, 66863, 312628, 345397, 345398, 386363, 222523, 345418, 353611, 337226, 337228, 353612, 230730, 296269, 353617, 222542, 238928, 296274, 378201, 230757, 296304, 312688, 337280, 353672, 263561, 296328, 296330, 304523, 370066, 9618, 411028, 279955, 370072, 148899, 148900, 361928, 337359, 329168, 312785, 329170, 222674, 353751, 280025, 239069, 329181, 320997, 361958, 271850, 280042, 280043, 271853, 329198, 411119, 337391, 116209, 296434, 386551, 288252, 312830, 271880, 198155, 329231, 304655, 370200, 222754, 157219, 157220, 394793, 312879, 288305, 288319, 288322, 280131, 288328, 353875, 99937, 345697, 312937, 271980, 206447, 403057, 42616, 337533, 280193, 370307, 419462, 149127, 149128, 288391, 419464, 411275, 214667, 239251, 345753, 198304, 255651, 337590, 370359, 280252, 280253, 321217, 239305, 296649, 403149, 313042, 345813, 370390, 272087, 345817, 337638, 181992, 345832, 345835, 288492, 141037, 313082, 288508, 288515, 173828, 395018, 395019, 116491, 395026, 124691, 116502, 435993, 345882, 411417, 321308, 255781, 362281, 378666, 403248, 378673, 182070, 182071, 345910, 436029, 345918, 337734, 280396, 272207, 272208, 337746, 395092, 362326, 345942, 370526, 345950, 362336, 255844, 296807, 214894, 362351, 214896, 313200, 313204, 124795, 182145, 280451, 67464, 305032, 337816, 124826, 329627, 239515, 354210, 436130, 436135, 10153, 313257, 362411, 370604, 362418, 411587, 280517, 362442, 346066, 231382, 354268, 436189, 403421, 329696, 354273, 403425, 190437, 354279, 436199, 174058, 337899, 354283, 247787, 329707, 296942, 247786, 436209, 313322, 124912, 239610, 182277, 346117, 354310, 43016, 354312, 354311, 403463, 313356, 436235, 419857, 305173, 436248, 223269, 346153, 354346, 313388, 124974, 272432, 403507, 378933, 378934, 436283, 288835, 403524, 436293, 313415, 239689, 436304, 329812, 223317, 411738, 272477, 280676, 313446, 395373, 288878, 346237, 215165, 436372, 329884, 378186, 362658, 436388, 215204, 125108, 133313, 395458, 338118, 436429, 346319, 321744, 379102, 387299, 18661, 379110, 338151, 125166, 149743, 379120, 125170, 436466, 411892, 436471, 395511, 313595, 436480, 125184, 272644, 125192, 338187, 338188, 125197, 395536, 125200, 338196, 272661, 379157, 125204, 157973, 125215, 125216, 338217, 125225, 321839, 125236, 362809, 379193, 395591, 289109, 272730, 436570, 215395, 239973, 280938, 321901, 354671, 362864, 354672, 272755, 354678, 199030, 223611, 248188, 313726, 436609, 240003, 436613, 395653, 395660, 264591, 272784, 420241, 240020, 190870, 43416, 190872, 289185, 436644, 289195, 272815, 436659, 338359, 436677, 289229, 281038, 281039, 256476, 420326, 166403, 322057, 420374, 322077, 289328, 330291, 322119, 191065, 436831, 420461, 313970, 346739, 346741, 420473, 297600, 166533, 363155, 346771, 264855, 363161, 289435, 436897, 248494, 166581, 355006, 363212, 363228, 436957, 322269, 436960, 264929, 338658, 289511, 330473, 346859, 330476, 289517, 215790, 199415, 289534, 322302, 35584, 133889, 322312, 346889, 264971, 322320, 166677, 207639, 363295, 355117, 191285, 273209, 355129, 273211, 355136, 355138, 420680, 355147, 355148, 355153, 281426, 387927, 363353, 363354, 281434, 322396, 420702, 363361, 363362, 412516, 355173, 355174, 281444, 207724, 355182, 207728, 420722, 314240, 158594, 330627, 240517, 265094, 387977, 396171, 355216, 224146, 224149, 256918, 256919, 256920, 240543, 256934, 273336, 289720, 289723, 273341, 330688, 379845, 363462, 19398, 273353, 191445, 207839, 347104, 314343, 134124, 412653, 248815, 257007, 347122, 437245, 257023, 125953, 396292, 330759, 347150, 330766, 412692, 330789, 248871, 281647, 412725, 257093, 404550, 314437, 207954, 339031, 404582, 257126, 265318, 322664, 265323, 396395, 404589, 273523, 363643, 248960, 150656, 363658, 404622, 224400, 265366, 347286, 429209, 339101, 429216, 339106, 380069, 265381, 3243, 208044, 322733, 421050, 339131, 265410, 183492, 273616, 421081, 339167, 298209, 421102, 363769, 52473, 208123, 52476, 412926, 437504, 322826, 388369, 380178, 429332, 126229, 412963, 257323, 437550, 273713, 298290, 208179, 159033, 347451, 216387, 372039, 257353, 257354, 109899, 437585, 331091, 150868, 314708, 372064, 429410, 437602, 281958, 388458, 265579, 306541, 314734, 314740, 314742, 421240, 314745, 224637, 388488, 298378, 306580, 282008, 396697, 314776, 282013, 290206, 396709, 298406, 241067, 380331, 314797, 380335, 355761, 421302, 134586, 380348, 216510, 216511, 380350, 306630, 200136, 273865, 306634, 339403, 372172, 413138, 421338, 437726, 429540, 3557, 3559, 191980, 282097, 191991, 265720, 216575, 290304, 372226, 437766, 323083, 208397, 323088, 413202, 413206, 388630, 175640, 216610, 372261, 347693, 323120, 396850, 200245, 323126, 290359, 134715, 323132, 421437, 396865, 282182, 413255, 273992, 265800, 421452, 265809, 396885, 290391, 265816, 396889, 306777, 388699, 396896, 323171, 388712, 388713, 314997, 290425, 339579, 396927, 282248, 224907, 396942, 405140, 274071, 323226, 208547, 208548, 405157, 388775, 282279, 364202, 421556, 224951, 224952, 306875, 282302, 323262, 323265, 241360, 241366, 224985, 282330, 159462, 372458, 397040, 12017, 323315, 274170, 200444, 175874, 249606, 323335, 282379, 216844, 372497, 397076, 421657, 339746, 216868, 257831, 167720, 241447, 421680, 282418, 421686, 274234, 241471, 339782, 315209, 159563, 241494, 339799, 307038, 274276, 282471, 274288, 372592, 274296, 339840, 315265, 372625, 282517, 298912, 118693, 438186, 126896, 151492, 380874, 372699, 323554, 380910, 380922, 380923, 274432, 372736, 241695, 315431, 430120, 102441, 315433, 430127, 405552, 282671, 241717, 249912, 225347, 307269, 421958, 233548, 176209, 381013, 53334, 315477, 200795, 356446, 323678, 438374, 176231, 438378, 233578, 217194, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 241809, 323730, 430231, 200856, 422044, 192670, 192671, 299166, 258213, 299176, 323761, 184498, 430263, 266427, 299208, 372943, 266447, 258263, 356575, 307431, 438512, 372979, 389364, 381173, 135416, 356603, 184574, 266504, 217352, 61720, 381210, 315674, 282908, 389406, 282912, 233761, 438575, 315698, 266547, 397620, 332084, 438583, 127292, 438592, 332100, 323914, 201037, 397650, 348499, 250196, 348501, 389465, 332128, 110955, 242027, 242028, 160111, 250227, 315768, 291193, 438653, 291200, 266628, 340356, 242059, 225684, 373141, 373144, 291225, 389534, 397732, 373196, 176602, 242138, 184799, 291297, 201195, 324098, 233987, 340489, 397841, 283154, 258584, 397855, 291359, 348709, 348710, 397872, 283185, 234037, 340539, 266812, 438850, 348741, 381515, 348748, 430681, 332379, 242274, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 356990, 291455, 373377, 422529, 201348, 152196, 356998, 348807, 356999, 316044, 316050, 275102, 176805, 340645, 422567, 176810, 160441, 422591, 291529, 225996, 135888, 242385, 234216, 373485, 373486, 21239, 275193, 348921, 234233, 242428, 299777, 430853, 430860, 62222, 430880, 234276, 234290, 152372, 160569, 430909, 160576, 348999, 283466, 439118, 234330, 275294, 381791, 127840, 357219, 439145, 177002, 308075, 242540, 242542, 381811, 201590, 177018, 398205, 340865, 291713, 349066, 316299, 349068, 234382, 308111, 381840, 308113, 390034, 373653, 430999, 209820, 381856, 398244, 185252, 422825, 381872, 177074, 398268, 349122, 398275, 127945, 373705, 340960, 398305, 340967, 398313, 234476, 127990, 349176, 201721, 349179, 234499, 357380, 398370, 357413, 357420, 300087, 21567, 308288, 398405, 349254, 218187, 250955, 300109, 234578, 250965, 439391, 250982, 398444, 62574, 357487, 300147, 119925, 349304, 234626, 349315, 349317, 234635, 373902, 177297, 324761, 234655, 234662, 373937, 373939, 324790, 300215, 218301, 283841, 283846, 259275, 316628, 259285, 357594, 414956, 251124, 316661, 292092, 439550, 439563, 242955, 414989, 259346, 349458, 382243, 382246, 292145, 382257, 382264, 333115, 193853, 193858, 251212, 234830, 406862, 259408, 283990, 357720, 300378, 300379, 316764, 374110, 234864, 259449, 382329, 357758, 243073, 357763, 112019, 398740, 234902, 333224, 374189, 251314, 284086, 259513, 54719, 292291, 300490, 300526, 259569, 251379, 300539, 398844, 210429, 366081, 316951, 374297, 153115, 431646, 349727, 431662, 374327, 210489, 235069, 349764, 292424, 292426, 128589, 333389, 333394, 349780, 128600, 235096, 300643, 300645, 415334, 54895, 366198, 210558, 210559, 415360, 325246, 333438, 415369, 210569, 431754, 267916, 415376, 259741, 153252, 399014, 210601, 202413, 317102, 415419, 259780, 333508, 267978, 333522, 325345, 333543, 325357, 431861, 284410, 161539, 284425, 300812, 284430, 366358, 169751, 431901, 341791, 325411, 186148, 186149, 333609, 284460, 202541, 431918, 399148, 153392, 431935, 415555, 325444, 153416, 325449, 341837, 415566, 431955, 325460, 317268, 341846, 300893, 259937, 382820, 276326, 415592, 292713, 292719, 325491, 341878, 276343, 350072, 333687, 317305, 112510, 325508, 333700, 243590, 325514, 350091, 350092, 350102, 350108, 333727, 219046, 284584, 292783, 300983, 128955, 219102, 292835, 6116, 317416, 432114, 325620, 415740, 268286, 415744, 333827, 243720, 399372, 153618, 358418, 178215, 325675, 243763, 358455, 325695, 399433, 333902, 104534, 194667, 260206, 432241, 284789, 374913, 374914, 415883, 333968, 153752, 333990, 104633, 260285, 227517, 268479, 374984, 301270, 301271, 334049, 325857, 268515, 383208, 317676, 260337, 260338, 432373, 375040, 309504, 432387, 260355, 375052, 194832, 325904, 391448, 334104, 268570, 178459, 186660, 268581, 334121, 358698, 317738, 325930, 260396, 432435, 358707, 178485, 358710, 14654, 268609, 227655, 383309, 383327, 391521, 366948, 416101, 416103, 383338, 432503, 432511, 211327, 227721, 285074, 252309, 39323, 285083, 317851, 285089, 375211, 334259, 129461, 342454, 358844, 293309, 317889, 326083, 416201, 129484, 154061, 416206, 326093, 432608, 285152, 195044, 391654, 432616, 334315, 375281, 293368, 317949, 334345, 432650, 309770, 342537, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 293420, 219694, 219695, 375345, 432694, 244279, 309831, 375369, 375373, 416334, 301647, 416340, 244311, 260705, 416353, 375396, 268901, 244326, 244345, 334473, 375438, 326288, 285348, 293552, 342705, 285362, 383668, 342714, 39616, 383708, 342757, 269036, 432883, 203511, 342775, 383740, 416509, 359166, 162559, 375552, 432894, 228099, 285443, 285450, 383755, 326413, 285467, 326428, 318247, 342827, 391980, 318251, 375610, 301883, 342846, 416577, 416591, 244569, 375644, 252766, 293729, 351078, 342888, 392057, 211835, 269179, 392065, 260995, 400262, 392071, 424842, 236427, 252812, 400271, 392080, 400282, 7070, 211871, 359332, 359333, 293801, 326571, 252848, 326580, 261045, 261046, 326586, 359365, 211913, 326602, 252878, 342990, 433104, 56270, 359380, 433112, 433116, 359391, 343020, 383980, 187372, 203758, 383994, 171009, 384004, 433166, 384015, 433173, 293911, 326684, 252959, 384031, 375848, 318515, 203829, 261191, 375902, 375903, 392288, 253028, 351343, 187505, 138354, 187508, 384120, 302202, 285819, 392317, 343166, 285823, 392320, 384127, 285833, 285834, 318602, 228492, 253074, 326803, 187539, 359574, 285850, 351389, 302239, 253098, 302251, 367791, 367792, 367798, 64699, 294075, 228541, 343230, 367809, 253124, 113863, 351445, 310496, 195809, 253168, 351475, 351489, 367897, 367898, 245018, 130342, 130344, 130347, 261426, 212282, 294210, 359747, 359748, 146760, 146763, 114022, 253288, 425327, 425331, 163190, 327030, 384379, 253316, 294278, 384391, 318860, 253339, 253340, 318876, 343457, 245160, 359860, 359861, 343480, 310714, 228796, 228804, 425417, 310731, 327122, 425434, 310747, 310758, 253431, 359931, 187900, 343552, 245249, 228868, 409095, 359949, 294413, 253456, 302613, 253462, 146976, 245290, 245291, 343606, 163385, 425534, 138817, 147011, 147020, 179800, 196184, 343646, 212574, 204386, 155238, 204394, 138862, 310896, 188021, 294517, 286351, 188049, 425624, 229021, 245413, 286387, 384693, 376502, 286392, 302778, 409277, 286400, 319176, 409289, 425682, 286419, 294621, 245471, 155360, 294629, 212721, 163575, 286457, 286463, 319232, 360194, 409355, 155408, 417556, 294699, 204600, 319289, 384826, 409404, 360253, 409416, 376661, 237397, 368471, 425820, 368486, 409446, 425832, 368489, 40809, 384871, 417648, 417658, 360315, 253828, 327556, 311183, 425875, 294806, 294808, 253851, 376733, 204702, 319393, 294820, 253868, 204722, 188349, 98240, 212947, 212953, 360416, 294887, 253930, 327666, 385011 ]
756a2844233bef8e2a593385a4fc3d357f14999d
60141e65abc9a3038c683cb0e33d0121befafa7e
/DivvyUITests/DivvyUITests.swift
eff87c4f1d466cd793d1b6f2f6ebfa3358370801
[]
no_license
KitsuneNoctus/Divvy-Archived
732f4d99165c4037f074c075bf4022763b336d3f
62c188fb4ca39c994d0fa4ef4b5b21ef0d9352f8
refs/heads/master
2022-04-01T15:45:41.642815
2020-02-05T19:51:45
2020-02-05T19:51:45
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,417
swift
// // DivvyUITests.swift // DivvyUITests // // Created by Bo on 2/4/20. // Copyright © 2020 Jessica Trinh. All rights reserved. // import XCTest class DivvyUITests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { XCUIApplication().launch() } } } }
[ 360463, 155665, 376853, 237599, 229414, 278571, 253996, 229425, 385078, 229431, 180279, 352314, 213051, 32829, 286787, 352324, 237638, 385095, 352327, 163916, 311373, 368717, 196687, 278607, 311377, 254039, 426074, 368732, 180317, 32871, 352359, 278637, 319599, 385135, 131190, 385147, 131199, 426124, 278676, 196758, 327834, 278684, 278690, 311459, 49317, 278698, 377010, 278707, 278713, 180409, 295099, 139459, 131270, 377033, 164043, 417996, 368849, 368850, 139478, 229591, 385240, 254171, 147679, 311520, 147680, 205034, 286957, 254189, 254193, 147716, 368908, 180494, 262419, 319764, 278805, 254228, 377116, 311582, 278817, 311596, 418095, 336177, 98611, 287040, 155968, 319812, 311622, 270663, 368969, 254285, 377168, 344402, 229716, 287089, 139641, 311679, 385407, 385409, 311692, 106893, 270733, 385423, 385437, 156069, 254373, 385449, 311723, 115116, 385463, 311739, 319931, 278974, 336319, 311744, 278979, 336323, 188870, 278988, 278992, 279000, 377309, 377310, 369121, 279009, 369124, 279014, 319976, 279017, 311787, 360945, 319986, 279030, 139766, 311800, 279033, 254459, 410108, 410109, 279042, 377346, 287237, 377352, 279053, 410126, 393745, 303634, 303635, 279060, 279061, 385554, 254487, 279066, 188957, 385578, 197166, 33344, 385603, 377419, 303693, 426575, 369236, 385620, 115287, 189016, 270938, 295518, 287327, 279143, 279150, 287345, 352885, 352886, 344697, 189054, 287359, 303743, 369285, 164487, 311944, 344714, 311950, 377487, 311953, 336531, 287379, 180886, 295575, 352921, 205469, 221853, 344737, 279207, 295591, 352938, 295598, 279215, 418479, 279218, 164532, 287418, 303802, 377531, 377534, 66243, 385737, 287434, 287438, 279249, 303826, 385745, 369365, 369366, 385751, 230105, 361178, 352989, 352990, 295649, 418529, 385763, 295653, 369383, 230120, 361194, 312046, 230133, 279293, 205566, 344829, 197377, 312076, 434956, 295698, 418579, 197398, 426777, 221980, 344864, 197412, 336678, 262952, 279337, 262957, 164655, 328495, 303921, 197424, 197428, 336693, 230198, 377656, 197433, 295745, 222017, 197451, 279379, 385878, 385880, 295769, 197467, 230238, 230239, 435038, 279393, 303973, 279398, 197479, 385895, 385901, 197489, 295797, 295799, 279418, 164730, 336765, 254851, 369541, 279434, 320394, 377754, 189349, 172971, 304050, 377778, 189373, 377789, 345030, 213961, 279499, 304086, 418774, 386007, 386016, 304104, 123880, 418793, 320495, 222193, 287730, 271351, 214009, 312313, 435195, 328701, 312317, 328705, 386049, 418819, 410629, 377863, 230411, 320526, 361487, 238611, 386068, 140311, 238617, 197658, 336930, 410665, 345137, 361522, 312372, 238646, 238650, 320571, 386108, 336962, 238663, 377927, 205911, 296023, 156763, 214116, 230500, 214119, 279659, 279666, 312435, 230514, 238706, 377974, 66684, 279686, 222344, 402568, 140426, 337037, 386191, 296091, 222364, 418975, 124073, 238764, 402618, 148674, 312519, 402632, 148687, 189651, 419028, 279766, 189656, 279775, 304352, 304353, 279780, 222441, 279789, 386288, 66802, 271607, 369912, 369913, 386296, 279803, 386304, 320769, 312588, 320795, 115997, 222496, 320802, 304422, 369964, 353581, 312628, 345397, 345398, 222523, 386363, 279872, 279874, 345418, 230730, 337228, 296269, 222542, 337226, 238928, 296274, 378201, 230757, 296304, 312688, 337280, 296328, 263561, 296330, 9618, 279955, 370066, 411028, 370072, 148899, 361928, 370122, 337359, 329168, 312785, 329170, 222674, 280020, 280025, 239069, 329181, 320997, 280042, 280043, 271850, 271853, 329198, 337391, 411119, 116209, 296434, 386551, 288248, 288252, 312830, 271880, 230922, 304655, 329231, 230933, 370200, 222754, 157219, 157220, 394793, 312879, 230960, 288305, 288319, 288322, 280131, 288328, 353875, 312937, 312941, 206447, 288377, 337533, 280193, 239238, 288391, 419462, 149127, 149128, 419464, 239251, 280217, 198304, 255651, 337590, 280252, 280253, 321217, 321220, 239305, 296649, 403149, 9935, 313042, 345813, 370390, 272087, 18139, 321250, 337638, 181992, 345832, 345835, 288492, 67316, 313082, 288508, 288515, 173828, 280326, 395018, 116491, 395019, 280333, 395026, 116502, 435993, 345882, 321309, 255781, 378666, 403248, 378673, 345910, 321338, 436029, 345918, 337734, 280396, 272207, 272208, 337746, 345942, 18263, 370526, 345950, 362336, 255844, 296807, 214894, 362351, 313200, 214896, 313204, 182142, 182145, 280451, 67464, 305032, 337816, 329627, 239515, 214943, 354210, 436130, 436135, 313257, 10153, 362411, 370604, 362418, 288698, 214978, 280517, 362442, 346066, 231382, 403421, 436189, 329696, 190437, 436199, 313322, 329707, 174058, 337899, 296942, 247786, 436209, 239610, 313338, 182277, 354310, 354311, 43016, 354312, 403463, 436235, 313356, 305173, 436248, 223269, 354342, 354346, 313388, 272432, 403507, 378933, 378934, 436283, 288829, 288835, 403524, 436293, 313415, 239689, 436304, 354386, 329812, 223317, 411738, 272477, 280676, 313446, 215144, 395373, 288878, 288890, 215165, 436372, 329884, 362658, 215204, 280761, 280767, 395458, 338118, 280779, 436429, 346319, 321744, 280792, 379102, 387299, 18661, 379110, 338151, 149743, 379120, 411892, 395511, 436471, 313595, 272644, 338187, 338188, 395536, 338196, 272661, 379157, 338217, 321839, 362809, 379193, 280903, 289109, 272730, 436570, 215395, 239973, 280938, 321901, 354671, 354672, 362864, 272755, 199030, 223611, 248188, 436609, 436613, 158087, 313736, 264591, 420241, 240020, 190870, 190872, 289185, 289195, 272815, 436659, 338359, 436677, 289229, 281038, 281039, 256476, 420326, 281071, 166403, 322057, 420374, 322077, 289328, 330291, 338491, 322119, 281165, 281170, 436831, 420461, 346739, 346741, 420473, 297600, 166533, 363155, 264855, 289435, 248494, 166581, 314043, 355006, 363212, 363228, 322269, 436957, 436960, 264929, 338658, 289511, 330473, 346859, 330476, 289517, 215790, 125683, 199415, 322302, 289534, 35584, 133889, 322312, 346889, 264971, 322320, 166677, 207639, 363295, 281378, 289580, 355117, 191285, 273209, 355129, 273211, 281407, 289599, 355136, 355138, 355147, 355148, 355153, 281426, 363353, 281434, 363354, 322396, 420702, 363361, 363362, 281444, 355173, 207728, 420722, 314240, 158594, 330627, 240517, 355216, 224149, 256918, 256919, 256920, 289691, 240543, 289699, 289720, 273336, 289723, 273341, 330688, 281541, 19398, 379845, 363462, 273353, 191445, 183254, 207839, 347104, 314343, 183276, 412653, 248815, 347122, 240631, 437245, 257023, 125953, 330759, 330766, 347150, 330789, 248871, 281647, 322609, 412725, 404550, 207954, 339031, 314458, 281698, 257126, 322664, 265323, 330867, 363643, 248960, 363658, 224400, 347286, 265366, 339101, 429216, 339106, 265381, 380069, 249003, 208044, 322733, 3243, 421050, 339131, 265410, 290001, 339167, 298209, 290030, 421102, 52473, 208123, 52476, 412926, 437504, 322826, 380178, 429332, 126229, 412963, 257323, 273713, 298290, 208179, 159033, 347451, 216387, 372039, 257353, 257354, 224591, 437585, 331091, 150868, 314708, 314711, 372064, 314721, 429410, 437602, 281958, 265579, 306541, 314740, 421240, 224637, 306558, 314759, 388488, 298378, 306580, 224662, 282008, 314776, 396697, 282013, 290206, 314788, 396709, 298406, 314790, 241067, 314797, 380335, 355761, 380348, 380350, 306630, 200136, 273865, 306634, 339403, 429540, 3557, 3559, 191980, 282097, 306678, 191991, 216575, 290304, 323083, 208397, 323088, 413202, 388630, 175640, 372261, 396850, 200245, 290359, 134715, 323132, 421437, 396865, 282182, 265800, 273992, 421452, 224848, 265809, 224852, 396885, 290391, 306777, 396889, 396896, 388712, 388713, 314997, 290425, 339579, 396927, 282244, 282248, 224907, 405140, 274071, 323226, 282272, 208547, 208548, 282279, 298664, 364202, 224951, 224952, 306875, 282302, 323262, 241366, 224985, 282330, 159462, 397040, 12017, 323315, 274170, 200444, 175874, 249606, 323335, 282379, 216844, 118549, 421657, 339746, 315172, 216868, 241447, 167720, 282418, 274234, 339782, 315209, 159563, 323405, 307024, 241494, 307030, 339799, 307038, 282471, 274288, 372592, 274296, 339840, 315265, 282503, 315272, 315275, 372625, 282517, 298912, 118693, 438186, 126896, 200628, 380874, 282573, 323554, 380910, 380922, 380923, 274432, 372736, 241695, 315433, 102441, 102446, 282671, 430127, 405552, 241717, 249912, 225347, 307269, 315468, 233548, 176209, 315477, 381013, 53334, 200795, 323678, 356446, 315488, 315489, 45154, 438374, 176231, 233578, 438378, 422000, 249976, 266361, 422020, 168069, 381061, 168070, 381071, 241809, 323730, 430231, 422044, 299166, 192670, 192671, 299176, 323761, 184498, 258233, 299208, 266447, 282832, 372943, 356575, 307431, 438512, 372979, 381173, 184574, 217352, 266504, 61720, 381210, 282908, 282912, 233761, 282920, 438575, 315698, 332084, 438583, 282938, 127292, 438592, 332100, 323914, 201037, 348499, 250196, 348501, 168280, 389465, 323934, 332128, 381286, 242027, 242028, 160111, 250227, 315768, 315769, 291194, 291193, 291200, 266628, 340356, 242059, 225684, 373141, 291225, 389534, 397732, 373196, 283088, 283089, 242138, 176602, 184799, 291297, 283138, 233987, 324098, 340489, 397841, 283154, 258584, 291359, 397872, 283185, 234037, 340539, 266812, 348741, 381515, 348748, 430681, 332379, 111197, 242274, 184938, 373357, 184942, 176751, 389744, 356983, 356984, 209529, 291455, 373377, 422529, 152196, 201348, 356998, 356999, 348807, 316044, 316048, 316050, 275102, 340645, 176805, 176810, 299698, 160441, 422591, 291529, 225996, 135888, 242385, 234216, 373485, 373486, 234233, 275193, 242428, 299777, 430853, 430860, 62222, 283418, 430880, 234276, 283431, 234290, 430909, 201534, 160576, 348999, 283466, 234330, 275294, 127840, 349025, 357219, 439145, 177002, 308075, 381811, 201590, 177018, 398205, 291713, 340865, 299912, 349066, 316299, 349068, 234382, 308111, 381840, 308113, 390034, 430999, 209820, 398244, 422825, 177074, 127945, 373705, 340960, 398305, 340967, 324587, 234476, 127990, 349176, 201721, 349179, 234499, 357380, 398370, 357413, 357420, 300087, 21567, 308288, 160834, 349254, 218187, 250955, 300109, 234578, 250965, 439391, 250982, 398444, 62574, 357487, 300145, 300147, 119925, 349304, 234626, 349315, 349317, 234635, 373902, 177297, 324761, 234655, 300192, 234662, 373937, 324790, 300215, 283841, 283846, 259275, 316628, 259285, 357594, 414956, 251124, 316661, 283894, 292092, 439550, 242955, 177420, 439563, 414989, 259346, 292145, 382257, 382264, 333114, 333115, 193853, 193858, 300354, 300355, 234830, 406862, 259408, 283990, 357720, 300378, 300379, 374110, 234864, 243073, 357763, 112019, 398740, 234902, 333224, 374189, 284086, 259513, 54719, 415170, 292291, 300490, 144862, 300526, 259569, 251379, 300539, 398844, 210429, 366081, 316951, 374297, 431646, 431662, 210489, 235069, 349764, 292424, 292426, 333389, 128589, 333394, 349780, 128600, 235096, 300643, 300645, 366198, 325246, 210558, 235136, 210559, 415360, 210569, 415369, 431754, 415376, 259741, 153252, 399014, 210601, 300729, 415419, 333508, 259780, 267978, 333522, 325345, 153318, 333543, 325357, 431861, 284410, 284425, 300810, 300812, 284430, 284436, 366358, 169751, 325403, 431901, 341791, 325411, 186148, 186149, 333609, 284460, 399148, 202541, 431918, 153392, 300849, 431935, 325444, 153416, 325449, 341837, 415566, 431955, 317268, 325460, 341846, 284508, 300893, 259937, 284515, 276326, 415592, 292713, 292719, 325491, 333687, 276343, 350072, 317308, 112510, 325508, 333700, 243590, 325514, 350091, 350092, 350102, 350108, 333727, 219046, 284584, 292783, 300983, 128955, 153553, 219102, 292835, 6116, 292838, 317416, 432114, 325620, 415740, 268286, 415744, 243720, 399372, 358418, 178215, 325675, 243763, 358455, 399433, 333902, 104534, 194667, 432241, 284789, 284790, 374913, 374914, 194692, 415883, 333968, 153752, 284827, 333990, 284840, 284843, 104633, 227517, 260285, 268479, 301255, 374984, 301270, 301271, 334049, 325857, 268515, 383208, 317676, 260337, 260338, 309504, 375040, 260355, 375052, 194832, 227601, 325904, 178459, 334121, 317738, 325930, 358698, 260396, 358707, 268609, 227655, 383309, 383327, 391521, 366948, 285031, 416103, 383338, 227702, 211327, 227721, 227730, 285074, 293275, 285083, 317851, 293281, 285089, 301482, 375211, 334259, 342454, 293309, 317889, 326083, 416201, 129484, 326093, 154061, 285152, 432608, 195044, 432616, 334315, 236020, 293368, 317949, 342537, 309770, 334345, 342549, 342560, 416288, 350758, 350759, 358951, 358952, 293420, 236080, 244279, 301635, 309831, 55880, 375373, 301647, 244311, 309847, 260705, 416353, 375396, 268901, 301688, 244345, 301702, 334473, 375438, 326288, 227991, 285348, 318127, 293552, 342705, 285362, 383668, 154295, 342714, 39616, 383708, 342757, 285419, 269036, 170735, 432883, 342775, 203511, 383740, 432894, 375552, 228099, 285443, 285450, 383755, 326413, 285457, 285467, 326428, 318247, 293673, 318251, 342827, 301872, 285493, 301883, 342846, 416577, 293702, 244569, 252766, 301919, 293729, 351078, 342888, 228214, 269179, 260995, 392071, 416649, 236427, 252812, 400271, 392080, 293780, 310166, 359332, 293801, 326571, 326580, 261045, 261046, 326586, 359365, 211913, 326602, 56270, 252878, 342990, 433104, 359380, 433112, 433116, 187372, 343020, 203758, 383980, 383994, 433166, 384015, 433173, 293911, 326684, 384031, 375848, 113710, 318515, 203829, 375902, 375903, 392288, 285795, 253028, 228457, 351343, 187505, 187508, 302202, 285819, 285823, 384127, 392320, 285833, 318602, 285834, 228492, 162962, 326803, 187539, 359574, 285850, 351389, 302239, 302251, 367791, 367792, 367798, 64699, 294075, 228541, 343230, 253124, 113863, 310496, 302319, 253168, 351475, 228608, 318732, 367897, 245018, 367898, 130342, 130344, 130347, 286012, 294210, 359747, 359748, 114022, 253288, 327030, 163190, 310650, 384379, 253316, 294278, 384391, 318860, 253339, 318876, 253340, 343457, 245160, 359860, 359861, 310714, 228796, 302530, 228804, 425417, 302539, 310731, 327122, 425434, 310747, 286176, 187877, 310758, 40439, 253431, 359931, 245249, 228868, 302602, 294413, 359949, 253456, 302613, 253462, 302620, 146976, 245290, 245291, 343606, 147011, 310853, 147020, 196184, 179800, 212574, 204386, 155238, 204394, 138862, 310896, 294517, 188021, 286344, 286351, 188049, 229011, 425624, 229021, 245413, 212649, 286387, 384693, 286392, 302778, 286400, 425682, 286419, 294621, 245471, 294629, 212721, 286457, 286463, 319232, 360194, 409355, 278292, 278294, 286507, 294699, 319289, 384826, 409404, 237397, 376661, 188250, 237411, 368486, 384871, 409446, 40809, 368489, 425832, 417648, 360315, 327556, 188293, 253828, 311183, 425875, 294806, 294808, 376733, 319393, 294820, 294824, 253868, 343993, 188349, 98240, 294849, 212953, 294887, 253930, 327666, 385011 ]
fe3ada96993eba06295dc52e2a965d091bcbff76
744b90439e98c7bd758a4fa2af2323becfdbc622
/Contacts-Plus/Network Layer/Abstractions/DataType.swift
e4290f9e4cf4d6e08e6b0b995686fceabef59736
[]
no_license
TekEffekt/Contacts-Plus-Solstice
29d4cb21f3ba081d9dc81cbbbc05b197557e585d
64e8aa2343276bea18b35eb2a2c434ad155f41c1
refs/heads/master
2021-06-15T18:59:19.387371
2017-04-24T04:21:52
2017-04-24T04:21:52
null
0
0
null
null
null
null
UTF-8
Swift
false
false
157
swift
// // DataType.swift // Safety Survey // // Created by Kyle Zawacki on 4/15/17. // // import Foundation enum DataType { case json case data }
[ -1 ]
0e4be0614c3f4b0cf6dd2876081aa3392004fcaa
32366ca5d0c0675eb01033854c3d57292abf00ca
/移动医生/LoginUserInfoUtils.swift
d1805f20035143cc6e84be9b05115d36d2469512
[]
no_license
xuehuayouling/DoctorHelper
deba241deb1c17f55f1e2355e394cc98f775adad
9dc8b26559e4ebb687676c71940bf0db9a6c710d
refs/heads/master
2021-01-01T03:47:43.957412
2016-04-18T08:01:46
2016-04-18T08:01:46
57,419,496
0
0
null
null
null
null
UTF-8
Swift
false
false
3,326
swift
// // LoginUserInfoUtils.swift // 移动医生 // // Created by 杨生青 on 16/4/11. // Copyright © 2016年 杨生青. All rights reserved. // import UIKit class LoginUserInfoUtils: NSObject { class func saveUserInfo(user:UserDTO) { let userDefaults:NSUserDefaults = NSUserDefaults.standardUserDefaults(); userDefaults.setObject(user.mobile, forKey: "logined_user_info_mobile"); userDefaults.setObject(user.userId, forKey: "logined_user_info_userId"); userDefaults.setObject(user.userRealName, forKey: "logined_user_info_userRealName"); userDefaults.setObject(user.userCode, forKey: "logined_user_info_userCode"); userDefaults.setObject(user.deptCode, forKey: "logined_user_info_deptCode"); userDefaults.setObject(user.loginTime, forKey: "logined_user_info_loginTime"); userDefaults.setObject(user.token, forKey: "logined_user_info_token"); userDefaults.setObject(user.sex, forKey: "logined_user_info_sex"); userDefaults.setObject(user.pwd, forKey: "logined_user_info_pwd"); userDefaults.synchronize(); } class func getSavedUserInfo() -> UserDTO { let userDefaults:NSUserDefaults = NSUserDefaults.standardUserDefaults(); var dic:Dictionary<String, AnyObject> = Dictionary(); if let value = userDefaults.valueForKey("logined_user_info_mobile") as? String{ dic["mobile"] = value; } if let value = userDefaults.valueForKey("logined_user_info_userId") as? String{ dic["userId"] = value; } if let value = userDefaults.valueForKey("logined_user_info_userRealName") as? String{ dic["userRealName"] = value; } if let value = userDefaults.valueForKey("logined_user_info_userCode") as? String{ dic["userCode"] = value; } if let value = userDefaults.valueForKey("logined_user_info_deptCode") as? String{ dic["deptCode"] = value; } if let value = userDefaults.valueForKey("logined_user_info_loginTime") as? String{ dic["loginTime"] = value; } if let value = userDefaults.valueForKey("logined_user_info_token") as? String{ dic["token"] = value; } if let value = userDefaults.valueForKey("logined_user_info_sex") as? String{ dic["sex"] = value; } if let value = userDefaults.valueForKey("logined_user_info_pwd") as? String{ dic["pwd"] = value; } return UserDTO.init(dic: dic); } class func clearSavedUserInfo() -> Void { let userDefaults:NSUserDefaults = NSUserDefaults.standardUserDefaults(); userDefaults.removeObjectForKey("logined_user_info_mobile"); userDefaults.removeObjectForKey("logined_user_info_userId"); userDefaults.removeObjectForKey("logined_user_info_userRealName"); userDefaults.removeObjectForKey("logined_user_info_userCode"); userDefaults.removeObjectForKey("logined_user_info_deptCode"); userDefaults.removeObjectForKey("logined_user_info_loginTime"); userDefaults.removeObjectForKey("logined_user_info_token"); userDefaults.removeObjectForKey("logined_user_info_sex"); userDefaults.removeObjectForKey("logined_user_info_pwd"); } }
[ -1 ]
21f67a1adeb0f31f16cbe6b0024e0eed888c5a29
bd4817d1d75b556b3161c859620e1c3eed095f56
/Virtual Tourist/Client.swift
ceb34b87be6d93d1bb842f09288369cdb09ec60f
[]
no_license
NaifAlrashed/Virtual-Tourist
ac285db918bcd5618c0adbb58d2aca6078641dc3
5e56ef3f5a599f3da4b939f20ffbd595aa5fddec
refs/heads/master
2021-01-18T07:55:24.802274
2017-04-10T06:58:32
2017-04-10T06:58:32
84,295,603
0
0
null
null
null
null
UTF-8
Swift
false
false
5,237
swift
// // Client.swift // Virtual Tourist // // Created by Naif Alrashed on 3/8/17. // Copyright © 2017 Naif Alrashed. All rights reserved. // import Foundation import UIKit class Client { static let shared = Client() private init () {} func getPhotos(lat: Double, lon: Double, completionHandler: @escaping (_ image: UIImage, _ count: Int) -> Void) -> [Data]? { print(#function) let parameters: [String:String] = [ Constants.FlickrParameterKeys.Method: Constants.FlickrParameterValues.searchMethod, Constants.FlickrParameterKeys.APIKey: Constants.FlickrParameterValues.APIKey, Constants.FlickrParameterKeys.Format: Constants.FlickrParameterValues.ResponseFormat, Constants.FlickrParameterKeys.latitude: "\(lat)", Constants.FlickrParameterKeys.longitude: "\(lon)", Constants.FlickrParameterKeys.NoJSONCallback: Constants.FlickrParameterValues.DisableJSONCallback, Constants.FlickrParameterKeys.NumberOfResultsPerPage: Constants.FlickrParameterValues.NumberOfResultsPerPage, Constants.FlickrParameterKeys.pageNumber: Constants.FlickrParameterValues.pageNumber ] let request = URLRequest(url: URL(string: "\(Constants.Flickr.APIBaseURL)\(escapedParameters(parameters))")!) let task = URLSession.shared.dataTask(with: request) { (data, response, error) in guard let data = data else { print("error: \(error!)") return } let photoRefence: [String:Any]! do { photoRefence = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as! [String:Any] } catch let error { print("could't parse json: \(error)") return } guard let photo = photoRefence["photos"] as? [String:Any] else { print("could'nt get photo from \(photoRefence)") return } guard let photos = photo["photo"] as? [Any] else { print("could'nt get photos from \(photo)") return } if photos.isEmpty { print("no photos") return } print(photos.count) Constants.numberOfPics = photos.count NotificationCenter.default.post(name: Notification.Name(rawValue: Constants.numberOfPicsNotificationName), object: Constants.numberOfPics!) var count = photos.count for somePhoto in photos { guard let photoReference = somePhoto as? [String:Any] else { print("couldn't convert array to dictionary") return } guard let serverID = photoReference["server"] as? String else { print("could'nt get server from \(photoReference)") return } guard let id = photoReference["id"] as? String else { print("could'nt get id from \(photoReference)") return } guard let secret = photoReference["secret"] as? String else { print("could'nt get secret from \(photoReference)") return } guard let farm = photoReference["farm"] as? Int else { print("could'nt get farm from \(photoReference)") return } let photoUrl = "https://farm\(farm).staticflickr.com/\(serverID)/\(id)_\(secret).jpg" print(photoUrl) let imageData: Data do { imageData = try Data(contentsOf: URL(string: photoUrl)!) } catch { print("couldn't convert \(photoUrl)") return } let image = UIImage(data: imageData) print(photoUrl) if let image = image { completionHandler(image, count) } else { print("image is nil!!!!!!!!!!!! \(photoUrl)") } count = count - 1 } } task.resume() return nil } private func escapedParameters(_ parameters: [String:String]) -> String { if parameters.isEmpty { return "" } else { var keyValuePairs = [String]() for (key, value) in parameters { // make sure that it is a string value let stringValue = "\(value)" // escape it let escapedValue = stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) // append it keyValuePairs.append(key + "=" + "\(escapedValue!)") } return "?\(keyValuePairs.joined(separator: "&"))" } } }
[ -1 ]
24224d3fad3a5d9663ad1ade099169515ff2fb49
ed4d093b3e368bedfd5a212b3f79c5f0531685ca
/FireChatTest/FireChatTest/GlobalKeys.swift
b3a3f8eb7161b97889cb14eae5132abe94ff3d24
[]
no_license
jhardy3/XCodeLifeLongLearning
0dc12f4b5abeb9b79f3f638b8cf74653871667c4
eb139017760cd8e3e96b3c9492e6e0261defb74d
refs/heads/master
2016-09-12T09:04:34.626157
2016-04-27T21:51:27
2016-04-27T21:51:27
56,571,587
2
0
null
null
null
null
UTF-8
Swift
false
false
491
swift
// // GlobalKeys.swift // FireChatTest // // Created by Jake Hardy on 4/12/16. // Copyright © 2016 NSDesert. All rights reserved. // import Foundation // Message Model Object Keys let USERNAME_KEY = "username" let MESSAGE_TEXT_KEY = "messageText" let SENDER_ID_KEY = "senderID" // Thread Model Object Keys let THREAD_KEY = "thread" let IDENTIFIER_KEY = "identifier" let THREAD_NAME_KEY = "threadName" // Firebase Endpoints let threadEndPoint = "thread" let messageEndPoint = "feeds"
[ -1 ]
0c882352e7e2134f0609c2b42f2249b87bcb1b00
023eeaaeaf91f6a24bff585d85dfb7eee1341b0d
/Weather/Weather/SubViews/CityDetailSubViews/WeatherDetailHeadView.swift
fe5394bf1e646f89dedb2b1bcd2c63b0c053745c
[]
no_license
MrLizarx/Weather
78d96db8b5fa972a3d65ff0d1086ad0e8ad24b69
1d8f992ed0f5da45e06d5df8c33ebd41a10b1157
refs/heads/main
2023-06-07T17:27:34.711849
2021-06-27T18:28:44
2021-06-27T18:28:44
380,810,152
0
0
null
null
null
null
UTF-8
Swift
false
false
2,298
swift
// // CityDetailHeadView.swift // WatherApp // // Created by Micle on 21.06.2021. // import SwiftUI struct WeatherDetailHeadView: View { @ObservedObject var viewModel:WeatherViewModel private let date = Date().getFormattedDate(format: "d MMM, HH:mm") var body: some View { VStack(){ Text("\(date)") .foregroundColor(.white) .font(.system(size: 30)) HStack { Image(systemName: viewModel.weatherData.dailyIcon[0].getIconName()) .foregroundColor(.white) .font(.system(size: 100)) .padding(.leading, 10) Spacer() SubParametrsView(viewModel: viewModel) .padding(.trailing, 50) } } .frame(maxWidth:.infinity) .background(Color.blue) } } struct WeatherDetailHeadView_Previews: PreviewProvider { static var previews: some View { WeatherDetailHeadView(viewModel: WeatherViewModel(weatherService: WeatherService())) } } private struct SubParametrsView: View { @ObservedObject var viewModel:WeatherViewModel var body: some View { VStack(alignment: .leading) { HStack{ Image(systemName: "thermometer") .foregroundColor(.white) Text("\(viewModel.weatherData.tempMax)"+"℃ / "+"\(viewModel.weatherData.tempMin)" + "℃") .foregroundColor(.white) }.padding(.bottom, 5) .padding(.top, 25) HStack { Image(systemName: "drop") .foregroundColor(.white) Text("\(viewModel.weatherData.humidity)"+"%") .foregroundColor(.white) }.padding(.bottom, 5) HStack { Image(systemName: "wind") .foregroundColor(.white) Text("\(viewModel.weatherData.wind_speed)"+" m/s") .foregroundColor(.white) } } } }
[ -1 ]
fe8a178e48890c21d05cb9748616647038c5f49c
2a91e5ad0e834388a223d5ad24fceafbd430ddc8
/ColorBlindTest/utils/UIUtils.swift
99fb4691834379294cb7325641392e6460a727f4
[]
no_license
ydh0256/color-blind-test-ios
ded17a1a35eaa2df2a6b3658ffec934e4232d16e
8dc66cccddf2a480c230cae7ce3570e4c7f80f49
refs/heads/master
2021-01-23T10:57:47.105654
2017-08-22T11:28:12
2017-08-22T11:28:12
93,113,066
3
0
null
null
null
null
UTF-8
Swift
false
false
945
swift
// // UIUtils.swift // HumanSenceTest // // Created by Yoo Duckhyun on 2017. 5. 22.. // Copyright © 2017년 Yoo Duckhyun. All rights reserved. // import Foundation import UIKit class UIUtils { static func makeBorder(button: UIButton, borderWidth: CGFloat){ self.makeBorder(button: button, borderWidth: borderWidth, borderColor: button.tintColor.cgColor) } static func makeBorder(button: UIButton, borderWidth: CGFloat, borderColor: CGColor){ button.layer.borderWidth = borderWidth button.layer.borderColor = borderColor } static func makeRadius(button: UIButton, cornerRadius: CGFloat){ self.makeRadius(button: button, cornerRadius: cornerRadius, backGroundColor: UIColor.clear) } static func makeRadius(button: UIButton, cornerRadius: CGFloat, backGroundColor: UIColor){ button.layer.cornerRadius = cornerRadius button.backgroundColor = backGroundColor } }
[ -1 ]
9eab6e160c14b9b8c3043f98b49d299dc23a1c30
129b797b82f83d0200151a6296e6de312717e5d6
/SampleApp/LoginViewController2.swift
842b9d0b047789f99b274060d3804b1520508abc
[ "MIT" ]
permissive
robertofrontado/snapshot-testing-sample
17fa4684ce6f72a3d02442d35e0ef696031943b1
bd99a97e845508d8303adbfe9d77354b56e4cb6e
refs/heads/master
2022-12-18T02:03:10.933249
2020-09-17T21:50:09
2020-09-17T21:50:09
296,448,882
3
2
null
null
null
null
UTF-8
Swift
false
false
2,829
swift
// // LoginViewController2.swift // SampleApp // // Created by Roberto Frontado on 17/09/2020. // Copyright © 2020 Roberto Frontado. All rights reserved. // import UIKit class LoginViewController2: UIViewController { private let emailLabel = UILabel() private let emailTextField = TextField() private let passwordLabel = UILabel() private let passwordTextField = TextField() private let loginButton = Button() override func viewDidLoad() { super.viewDidLoad() title = "Sign in".uppercased() view.backgroundColor = .white emailLabel.text = "Email".uppercased() emailLabel.font = UIFont.systemFont(ofSize: 16, weight: .medium) emailTextField.placeholder = "hello@gmail.com" passwordLabel.text = "Password".uppercased() passwordLabel.font = UIFont.systemFont(ofSize: 16, weight: .medium) passwordTextField.placeholder = "123456" passwordTextField.isSecureTextEntry = true loginButton.setTitle("Sign in".uppercased(), for: .normal) [emailTextField, passwordTextField].forEach { $0.layer.borderColor = UIColor.systemGray.cgColor $0.layer.borderWidth = 1 $0.layer.cornerRadius = 8 $0.heightAnchor.constraint(equalToConstant: 48).isActive = true } let emailStackView = UIStackView(arrangedSubviews: [emailLabel, emailTextField]) let passwordStackView = UIStackView(arrangedSubviews: [passwordLabel, passwordTextField]) [emailStackView, passwordStackView].forEach { $0.axis = .vertical $0.spacing = 8 } let stackView = UIStackView(arrangedSubviews: [emailStackView, passwordStackView]) view.addSubview(stackView) stackView.translatesAutoresizingMaskIntoConstraints = false stackView.axis = .vertical stackView.spacing = 32 view.addSubview(loginButton) loginButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ stackView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 16), stackView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16), stackView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16), loginButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16), loginButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16), loginButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -16), loginButton.heightAnchor.constraint(equalToConstant: 48) ]) } }
[ -1 ]
dbcc4205516d212f579ac502b76e8e4a3e723ffe
bcee110e3f4c69ca969bd80a758bd582db7a8b79
/C4Examples/Movies06.swift
59ca0be3a4d926a11b57d8c80cac38915ba8f093
[]
no_license
Ollstar/C4Examples
ef4fa19dadd73ba32f41198a000c57097c55d6f6
892aeb2fca1bd1dea5b6014941c29bd5413c0235
refs/heads/master
2021-01-10T15:55:35.298763
2016-04-29T18:42:24
2016-04-29T18:42:24
43,029,297
0
0
null
2015-09-28T23:32:37
2015-09-23T21:51:30
Swift
UTF-8
Swift
false
false
809
swift
// // Movies06.swift // C4Examples // // Created by Oliver Andrews on 2015-09-08. // Copyright © 2015 Slant. All rights reserved. // import C4 class Movies06: CanvasController { var movie:Movie! override func setup() { //create a movie and play it automatically let movie = Movie("test.mov")! // movie.reachedEnd { // let s = Ellipse(frame: movie.frame) // movie.layer?.mask = s.layer // let a = ViewAnimation(duration: 2) { // s.transform.rotate(M_PI) // } // a.repeats = true // a.animate() // } movie.frame = Rect(0, 0, self.canvas.frame.max.x,self.canvas.frame.max.y) movie.loops = false movie.play() self.canvas.add(movie) } }
[ -1 ]
5b535b600e99f76207059958bbb392224f873aac
95d20b9ad3e4b09159ab194676aec23de4085e0e
/Landmarks/Views/Categories/CategoryRow.swift
748e22b71a6c34d9ff9685aad72d2ca0c91e1448
[]
no_license
wintree86/swift-ui-tutorial
36033ee46af0a4d3400071633311d9e61d572609
a11d5457076adb29aca8cab00b81bd7e88d92da8
refs/heads/main
2023-06-09T16:21:08.111131
2021-06-27T07:40:01
2021-06-27T07:40:01
376,547,701
0
0
null
null
null
null
UTF-8
Swift
false
false
1,104
swift
import SwiftUI struct CategoryRow: View { var categoryName: String var items: [Landmark] var body: some View { VStack(alignment: .leading, spacing: /*@START_MENU_TOKEN@*/nil/*@END_MENU_TOKEN@*/, content: { Text(categoryName).font(.headline) .padding(.leading, 15) .padding(.top, 5) ScrollView(.horizontal, showsIndicators: false, content: { HStack(alignment: .top, spacing: 0) { ForEach(items) { landmark in NavigationLink(destination: LandmarkDetail(landmark: landmark)) { CategoryItem(landmark: landmark) } } } }).frame(height: 185) }) } } struct CategoryRow_Previews: PreviewProvider { static var landmarks = ModelData().landmarks static var previews: some View { CategoryRow( categoryName: landmarks[0].category.rawValue, items: Array(landmarks.prefix(4)) ) } }
[ 386637, 363407, 372817, 372917, 377528, 372888 ]
6de4df1c9e4c9a90ede8fe185197ecf9313fe03a
832b391f177106b8e337dd08343a68610a1c91df
/Flower/Classes/Home/Home/Model/Article.swift
4d60d66d0eae23e90b740a3e9c6b24c2ddeb9000
[]
no_license
narakai/Flower
2e9b373fd5231cab6b7025b67bdf71f0ff405703
5cbc1b09be37840705a34f3b2c37a89c45acd49b
refs/heads/master
2021-09-04T03:22:48.156793
2018-01-15T08:26:03
2018-01-15T08:26:03
115,024,727
3
1
null
null
null
null
UTF-8
Swift
false
false
3,076
swift
// // HomeTableViewController.swift // Flower // // Created by lai leon on 2017/12/31. // Copyright © 2017 clem. All rights reserved. // import UIKit import SwiftyJSON class Article: NSObject { // 创建时间 // var createDate: String? { // didSet { // /*这个方法主要是属性被赋值的时候会被调用 // *如果是对象初始化的时候,是不会调用的,如果想被调用,要使用kvc // */ // print("didset") // if var date = createDate { // if date.contains(".0") { // date = date.replacingOccurrences(of: ".0", with: ""); // } // let time: Date? = Date.dateWithStr(dateStr: date) // if let t = time { // createDateDesc = t.description; // } // } // } // } var createDate: String? // 描述创建时间, 比如昨天, 今天, 去年等 var createDateDesc: String? // 摘要 var desc: String? // 评论数 var fnCommentNum: Int = 0 // 点赞数 var favo: Int = 0 // 文章ID var id: String? // 序号 var order: Int = 0 // 文章的H5地址 var pageUrl: String? // 阅读数 var read: Int = 0 // 分享数 var share: Int = 0 // 用户分享的URL var sharePageUrl: String? // 缩略图 var smallIcon: String? // 文章标题 var title: String? // 是否是首页的, 如果是首页不显示时间 var isNotHomeList: Bool = false // 作者 var author: Author? // 所属分类 var category: Category? init(jsonData: JSON) { createDateDesc = jsonData["createDateDesc"].stringValue desc = jsonData["desc"].stringValue fnCommentNum = jsonData["fnCommentNum"].intValue favo = jsonData["favo"].intValue order = jsonData["order"].intValue read = jsonData["read"].intValue share = jsonData["share"].intValue id = jsonData["id"].stringValue pageUrl = jsonData["pageUrl"].stringValue sharePageUrl = jsonData["sharePageUrl"].stringValue smallIcon = jsonData["smallIcon"].stringValue title = jsonData["title"].stringValue isNotHomeList = jsonData["isNotHomeList"].boolValue author = Author(jsonData: JSON(jsonData["author"].rawValue)) category = Category(jsonData: JSON(jsonData["category"].rawValue)) super.init() } // override func setValue(_ value: Any?, forKey key: String) { // // 单独处理author和category // if key == "author" { // if let valueOfKey = value { // author = Author(dict: valueOfKey as! [String: AnyObject]) // } // return; // } // if key == "category" { // if let valueOfKey = value { // category = Category(dict: valueOfKey as! [String: AnyObject]) // } // return // } // super.setValue(value, forKey: key) // } }
[ -1 ]
87ea17472be522d29e892531d40609c3925151e1
9cfbffa8730ff1e1d9b5be8be438bd2791a9fc5a
/MortgageCalculator/Resources/AppDelegate.swift
8188299168650e750a3ad40efe2d9ae094c2c453
[]
no_license
patelpra337/MortgageCalculator
43ddf77ac565953fd1dc228e89099c9730245c11
8b88401b3857e9ee17fee4397c4eadb0bb90d5b4
refs/heads/main
2023-06-05T05:41:10.172890
2021-06-26T02:56:18
2021-06-26T02:56:18
380,398,477
0
0
null
null
null
null
UTF-8
Swift
false
false
1,429
swift
// // AppDelegate.swift // MortgageCalculator // // Created by Kevin Stewart on 8/18/20. // Copyright © 2020 Kevin Stewart. 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, 286844, 417924, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 336123, 418043, 385280, 336128, 262404, 180490, 368911, 262416, 262422, 262436, 336180, 262454, 393538, 262472, 213332, 65880, 262496, 418144, 262499, 213352, 246123, 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, 197159, 352821, 188987, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 254587, 377472, 336512, 148105, 352918, 98968, 361129, 385713, 164534, 336567, 328378, 328386, 352968, 352971, 418507, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 344835, 336643, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 361288, 328522, 336714, 426841, 254812, 361309, 361315, 361322, 328573, 377729, 222128, 345035, 386003, 345043, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 345199, 361593, 410745, 214149, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 328941, 386285, 345376, 345379, 410917, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 181638, 353673, 181643, 181649, 181654, 181670, 181673, 337329, 181681, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 361960, 329194, 116210, 337398, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 419362, 394786, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 419410, 345701, 394853, 222830, 370297, 353919, 403075, 198280, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419509, 337592, 419512, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 141051, 337659, 337668, 395021, 362255, 321299, 395029, 116509, 345887, 378663, 345905, 354111, 247617, 354117, 370503, 329544, 370509, 354130, 247637, 337750, 313180, 354142, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 247789, 354313, 346139, 436289, 378954, 338004, 100453, 329832, 329855, 329867, 329885, 346272, 362660, 100524, 387249, 379066, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 379152, 395538, 338199, 387352, 182558, 338211, 248111, 362822, 190796, 321879, 379233, 354673, 321910, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 248308, 199164, 330252, 199186, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 273108, 264918, 183005, 338660, 338664, 264941, 363251, 207619, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 355175, 387944, 355179, 330610, 330642, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 330748, 265214, 330760, 330768, 248862, 158761, 199728, 330800, 396336, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 339036, 412764, 257120, 248951, 420984, 330889, 248985, 339097, 44197, 380070, 339112, 249014, 330958, 330965, 265436, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 437620, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 339428, 339434, 69113, 372228, 339461, 208398, 380432, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 372327, 372337, 224884, 224887, 224890, 224894, 224897, 216707, 339588, 126596, 421508, 159374, 11918, 339601, 126610, 224913, 224916, 224919, 126616, 224922, 224929, 224932, 257704, 224936, 224942, 257712, 257716, 257720, 257724, 257732, 339662, 257747, 224981, 224993, 257761, 224999, 339695, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 225043, 167700, 372499, 257819, 225053, 184094, 225058, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 397112, 225082, 397115, 225087, 225092, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 225119, 257896, 274280, 257901, 225137, 257908, 225141, 257912, 257916, 257920, 339844, 225165, 397200, 225170, 380822, 225180, 118691, 184244, 372664, 372702, 356335, 380918, 405533, 430129, 266294, 266297, 217157, 421960, 356439, 430180, 266350, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 192673, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 225470, 381120, 430274, 225475, 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, 356740, 332172, 340379, 389550, 266687, 340451, 160234, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 381512, 324170, 324173, 324176, 389723, 332380, 340627, 184982, 373398, 258721, 332453, 332459, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 152370, 340789, 348982, 398139, 127814, 430939, 201579, 201582, 349040, 340849, 201588, 324472, 398201, 340858, 324475, 119674, 340861, 324478, 324481, 373634, 324484, 324487, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 349180, 439294, 431106, 209943, 250914, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210039, 341113, 210044, 152703, 160895, 349311, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 210084, 251044, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 333009, 210131, 333014, 210138, 218354, 251128, 218360, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 365911, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 136590, 112020, 357792, 259515, 415166, 415185, 366034, 366038, 415193, 415199, 423392, 333284, 415207, 366056, 415216, 210420, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 153227, 333498, 333511, 210631, 259788, 358099, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 210698, 366348, 210706, 399128, 358191, 210739, 366387, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 399199, 399206, 268143, 358255, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 268298, 350224, 333850, 178218, 350256, 243781, 350285, 374864, 342111, 342133, 374902, 333997, 350410, 260298, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 268559, 350480, 350486, 350490, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 391530, 383341, 334203, 268668, 194941, 391563, 268701, 416157, 375208, 326058, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 358961, 383536, 334394, 252482, 219718, 334407, 350822, 334465, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 334528, 260801, 350917, 154328, 416473, 64230, 342766, 375535, 203506, 342776, 326416, 375568, 375571, 162591, 326441, 326451, 326454, 244540, 326460, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 326502, 375656, 326507, 326510, 211825, 211831, 392060, 351104, 342915, 236430, 252822, 392091, 400285, 252836, 359334, 211884, 351168, 359361, 359366, 326598, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 367800, 384188, 351423, 384191, 384198, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 384249, 343306, 261389, 359694, 253200, 261393, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 384314, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 154999, 253303, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 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, 376714, 262027, 155531, 262030, 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 ]
efa72445a8b62f7cf18de2d6b143525068e25a9a
bd8634f6d83cc8762efb8f521938cfaae3d47f1a
/Journal/Resources/Views/EntryAnnotation.swift
c6c41df638be073c5d7919a66be742f5ce97de65
[]
no_license
nelglez/Photo-Journal
9aa9939f3c5d7a4d6da013dd00b29b78e53cd62b
f1a5c1f1c74cea25476b4f5027d0bde0df4a23fc
refs/heads/master
2020-05-01T18:36:45.462992
2019-02-08T01:05:15
2019-02-08T01:05:15
null
0
0
null
null
null
null
UTF-8
Swift
false
false
957
swift
// // EntryAnnotation.swift // Journal // // Created by Cagri Sahan on 4/30/18. // Copyright © 2018 Cagri Sahan. All rights reserved. // import MapKit import JournalEntry class EntryAnnotation: NSObject, MKAnnotation { // MARK: Variables public var title: String? public var subtitle: String? public var coordinate: CLLocationCoordinate2D public var recordName: String public var delegate: AnnotationDelegate? // MARK: Functions public init(title: String?, subtitle: String?, coordinate: CLLocationCoordinate2D, recordName: String) { self.title = title self.subtitle = subtitle self.coordinate = coordinate self.recordName = recordName } public init(from entry: Entry) { self.recordName = entry.recordName self.title = entry.tags.first?.capitalized self.subtitle = entry.weather self.coordinate = entry.location.coordinate } }
[ -1 ]
7746731ded424ca577170dc5944db7b9834537be
df5a31e667dcd6cc98d074547eb181c6b0011b85
/IOS-OpenPose/Sources/Common.swift
edaf35b7b599015822156ff8f5497591d2ebc706
[]
no_license
macro-dadt/IOS-OpenPose
1498df3576a25a8e52e9c975e64d89e3803bbe1d
b0a5bfbbb3b8aa3cd70bdf2b85cec27cdf07c394
refs/heads/master
2020-04-25T20:50:35.701083
2019-02-28T08:17:27
2019-02-28T08:17:27
173,062,014
10
0
null
null
null
null
UTF-8
Swift
false
false
1,619
swift
import UIKit extension UIColor { class func rgb(_ r: Int,_ g: Int,_ b: Int) -> UIColor{ return UIColor(red: CGFloat(r) / 255.0, green: CGFloat(g) / 255.0, blue: CGFloat(b) / 255.0, alpha: 1) } } enum CocoPart: Int { case Nose = 0 case Neck = 1 case RShoulder = 2 case RElbow = 3 case RWrist = 4 case LShoulder = 5 case LElbow = 6 case LWrist = 7 case RHip = 8 case RKnee = 9 case RAnkle = 10 case LHip = 11 case LKnee = 12 case LAnkle = 13 case REye = 14 case LEye = 15 case REar = 16 case LEar = 17 case Background = 18 } let CocoPairs = [ (1, 2), (1, 5), (2, 3), (3, 4), (5, 6), (6, 7), (1, 8), (8, 9), (9, 10), (1, 11), (11, 12), (12, 13), (1, 0), (0, 14), (14, 16), (0, 15), (15, 17), (2, 16), (5, 17) ] let CocoPairsRender = CocoPairs[0..<CocoPairs.count-2] let CocoPairsNetwork = [ (12, 13), (20, 21), (14, 15), (16, 17), (22, 23), (24, 25), (0, 1), (2, 3), (4, 5), (6, 7), (8, 9), (10, 11), (28, 29), (30, 31), (34, 35), (32, 33), (36, 37), (18, 19), (26, 27) ] let CocoColors = [UIColor.rgb(255, 0, 0), UIColor.rgb(255, 85, 0), UIColor.rgb(255, 170, 0),UIColor.rgb(255, 255, 0), UIColor.rgb(170, 255, 0),UIColor.rgb(85, 255, 0), UIColor.rgb(0, 255, 0), UIColor.rgb(0, 255, 85), UIColor.rgb(0, 255, 170),UIColor.rgb(0, 255, 255),UIColor.rgb(0, 170, 255),UIColor.rgb(0, 85, 255), UIColor.rgb(0, 0, 255), UIColor.rgb(85, 0, 255), UIColor.rgb(170, 0, 255),UIColor.rgb(255, 0, 255), UIColor.rgb(255, 0, 170),UIColor.rgb(255, 0, 85)]
[ -1 ]
867b013cbb05423ce630abac5cec0dd42874184f
6156c1bd9484db918ef05c9feb27c915135edc56
/Eye/Eye/Models/EYESelectedModel.swift
7976028c58dc786889d87655e980bdb31b7384ac
[]
no_license
HugSea/Eye
b7d184accc68abad15fced589924310adfb82019
76855aee20cdb56c738d9d7b767e67ad5d700ebe
refs/heads/master
2021-01-13T12:44:11.791938
2016-12-09T01:10:43
2016-12-09T01:10:43
72,531,982
0
2
null
null
null
null
UTF-8
Swift
false
false
4,186
swift
// // EYESelectedModel.swift // Eye // // Created by Jack on 16/11/21. // Copyright © 2016年 Zhang Qingjie. All rights reserved. // import UIKit import ObjectMapper struct EYESelectedModel: Mappable { // 时间 var date: Int? // 下一次发布时间 var nextPublishTime: Int? // 展示的组列表 var sectionList: [SectionModel]? // 组数量 var count: Int? // 下一页地址 var nextPageUrl: String? init?(map: Map) { } mutating func mapping(map: Map) { date <- map["date"] nextPublishTime <- map["nextPublishTime"] sectionList <- map["sectionList"] count <- map["count"] nextPageUrl <- map["nextPageUrl"] } } struct SectionModel: Mappable { // id var id: Int! // 类型 var type: String! // Item列表 var itemList: [ItemModel]? // 数量 var count: Int! // Footer var footer: FooterModel! init?(map: Map) { } mutating func mapping(map: Map) { id <- map["id"] type <- map["type"] itemList <- map["itemList"] count <- map["count"] footer <- map["footer"] } } struct ItemModel: Mappable { // 类型 var type: String! // data // 数据类型 var dataType: String! // TextHeader var text: String? var font: String? // VideoCollection var cover: String? // Banner var image: String? var clickUrl: String? var actionUrl: String? // eyepetizer://webview/?title=它们值得温柔相待,小动物大营救&url=http://www.eyepetizer.net/videos_article.html?nid=89&shareable=true var id : Int? // 标题 var title: String? // 描述 var description: String? // 分类 var category: String? // 背景图 var feed: String? // 模糊背景 var blurred: String? // url var playUrl: String? // 时间 var duration: Int? // 分类时间组合副标题 var cd_SubTitle : String! { get { if let _ = category, let _ = duration { return "#\(category!) / \(Int.durationToTime(duration!))" } else { return "" } } } // 喜欢数 var collectionCount: Int? // 分享数 var shareCount: Int? // 评论数 var replyCount: Int? // ItemCollection var itemList: [ItemModel]? // Header标题 var hTitle: String? // Header副标题 var hSubTitle: String? init?(map: Map) { } mutating func mapping(map: Map) { type <- map["type"] dataType <- map["data.dataType"] text <- map["data.text"] font <- map["data.font"] cover <- map["data.header.cover"] image <- map["data.image"] actionUrl <- map["data.header.actionUrl"] clickUrl <- map["data.adTrack.0.clickUrl"] id <- map["data.id"] title <- map["data.title"] description <- map["data.description"] category <- map["data.category"] feed <- map["data.cover.feed"] blurred <- map["data.cover.blurred"] playUrl <- map["data.playUrl"] duration <- map["data.duration"] collectionCount <- map["data.consumption.collectionCount"] shareCount <- map["data.consumption.shareCount"] replyCount <- map["data.consumption.replyCount"] itemList <- map["data.itemList"] hTitle <- map["data.header.title"] hSubTitle <- map["data.header.subTitle"] } } struct FooterModel: Mappable { // 类型 var type: String! // 内容 var text: String? // 字体 var font: String? // ActionUrl var actionUrl: String? init?(map: Map) { } mutating func mapping(map: Map) { type <- map["type"] text <- map["data.text"] font <- map["data.font"] actionUrl <- map["data.actionUrl"] } }
[ -1 ]
90f33cf28d9ca6802f5de360b4f499cf71936542
3399b0e5e7047db0ba846d6367a5ae54ec1d4555
/GravosRecycler/GravosRecycler/GravosRecycler/Custom Classes/DeliveryAddressCell.swift
bf6baabd2db45b37e31164293cc9f8010e6b75c7
[]
no_license
ETechCentreRepositories/GravoIOS
3cd7642cf2d2deaabd34939c8f41c6d4753e3c0b
7c50b5f28151eec47cb4d97e72d340692b2ec597
refs/heads/master
2021-04-27T05:18:39.142672
2018-10-25T01:16:24
2018-10-25T01:16:24
122,594,719
0
0
null
null
null
null
UTF-8
Swift
false
false
493
swift
// // DeliveryAddressCell.swift // GravosRecycler // // Created by Abhijit on 20/4/18. // Copyright © 2018 Abhijit. All rights reserved. // import UIKit class DeliveryAddressCell: UITableViewCell { 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 } }
[ 168324, 115300, 213105, 115315, 115316, 177014, 213115, 115324, 201727 ]
e32d92dae7097653cc0e847b670797ddde93e1ba
d73d475b1a25e541cfcaf3486733c4cc5a12a33c
/ios-network-module/ios-network-module/DetailView/Cell/DetailItemLabelCell.swift
ff931ee215d4d6f6c75066eb0fb9977d8576f03b
[ "MIT" ]
permissive
TrashIO/green-ios-network
b5b7d2ab4a4a3c6b11984044f2631262f90822bb
aaf810035ea4afee1741d886c6d8eeaea06daeaf
refs/heads/main
2023-06-14T04:57:56.780052
2021-06-13T21:22:30
2021-06-13T21:22:30
376,252,390
0
0
null
null
null
null
UTF-8
Swift
false
false
687
swift
// // DetailItemLabelCell.swift // ios-network-module // // Created by Abhishek on 13/06/21. // import UIKit protocol DetailItemLabelDelegate: class { func onCopyAction(_ content: String) } class DetailItemLabelCell: UITableViewCell { @IBOutlet weak var labelContent: UILabel! @IBOutlet weak var buttonCopy: UIButton! weak var delegate: DetailItemLabelDelegate? func setup(content: String, delegate: DetailItemLabelDelegate?) { self.delegate = delegate self.labelContent.text = content } @IBAction func buttonCopyAction(_ sender: Any) { delegate?.onCopyAction(self.labelContent.text ?? String()) } }
[ -1 ]
14198a93ae028da217120b0c3c711b08672aae46
c6e881f7fd476aef85885e6860c8c940afba94aa
/SimpleCalc-iOS/HistoryViewController.swift
d0b8e7b5ed5ae1b0aecfa51aabcba1eaf385fb69
[]
no_license
Ryanybl/simple-calc-ios2
a21ecdf76043a855cf485e53b8293f14903a2df8
0cfc9937249300a6bb5342a7cfb5aad00c3ba76f
refs/heads/master
2021-07-21T10:58:39.790118
2017-11-01T01:09:21
2017-11-01T01:09:21
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,247
swift
// // HistoryViewController.swift // SimpleCalc-iOS // // Created by Ryan Liang on 10/26/17. // Copyright © 2017 Ryan Liang. All rights reserved. // import UIKit private let reuseIdentifier = "Cell" class HistoryViewController: UIViewController { @IBOutlet weak var scrollView: UIScrollView! @IBOutlet weak var textView: UITextView! var history:[String] = [] override func prepare(for segue: UIStoryboardSegue, sender: Any?) { let destination = segue.destination as! ViewController destination.history = self.history } override func viewDidLoad() { super.viewDidLoad() if history.count > 0 { for i in 0...history.count-1 { /*let label = UILabel(frame: CGRect(x: 20, y: CGFloat(i * 50), width: scrollView.frame.size.width, height: 50)) label.text = history[i] label.font = label.font.withSize(20) scrollView.addSubview(label)*/ textView.text! += history[i] + "\n" + "\n" } } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
18379e2a69501b24a4b0b2de1249216ba18fadd8
2ea85e879f51984494303627b07d6cc46b4718a7
/Phenom/RegexParser.swift
e3cb8cd9c37457c14fd164f973c7220e92ec252f
[]
no_license
isomdurm/phenom-ios
346d83ee06b9fec5d5fe1f5789e5a17488851148
7d5ae181542ac898f5ec0a87b78ff94b985f835b
refs/heads/master
2020-10-02T10:59:52.494440
2019-06-20T20:37:08
2019-06-20T20:37:08
227,761,488
1
0
null
null
null
null
UTF-8
Swift
false
false
1,471
swift
// // RegexParser.swift // ActiveLabel // // Created by Pol Quintana on 06/01/16. // Copyright © 2016 Optonaut. All rights reserved. // import Foundation struct RegexParser { static let urlPattern = "(^|[\\s.:;?\\-\\]<\\(])" + "((https?://|www.|pic.)[-\\w;/?:@&=+$\\|\\_.!~*\\|'()\\[\\]%#,☺]+[\\w/#](\\(\\))?)" + "(?=$|[\\s',\\|\\(\\).:;?\\-\\[\\]>\\)])" static let hashtagRegex = try? NSRegularExpression(pattern: "(?:^|\\s|$)#[\\p{L}0-9_]*", options: [.caseInsensitive]) static let mentionRegex = try? NSRegularExpression(pattern: "(?:^|\\s|$|[.])@[\\p{L}0-9_]*", options: [.caseInsensitive]); static let urlDetector = try? NSRegularExpression(pattern: urlPattern, options: [.caseInsensitive]) static func getMentions(fromText text: String, range: NSRange) -> [NSTextCheckingResult] { guard let mentionRegex = mentionRegex else { return [] } return mentionRegex.matches(in: text, options: [], range: range) } static func getHashtags(fromText text: String, range: NSRange) -> [NSTextCheckingResult] { guard let hashtagRegex = hashtagRegex else { return [] } return hashtagRegex.matches(in: text, options: [], range: range) } static func getURLs(fromText text: String, range: NSRange) -> [NSTextCheckingResult] { guard let urlDetector = urlDetector else { return [] } return urlDetector.matches(in: text, options: [], range: range) } }
[ 168334 ]
b71848153dd8672ce3b85a17453473a4d7408d07
253c62de81395ccb604b67ed0faec79be6d6f59c
/Todoey/DataModels/TodoItem.swift
ca4d53d920ef8eaf6e00aa6d498a0b413bd98ae3
[]
no_license
andrewmikhniuk/Todoey-iOS13
5c46a7e447ca7f1c0160572d5e51135753973a2e
b6db651f3e325b78bd67ff658ac5865a9c76b06a
refs/heads/master
2023-06-10T11:52:40.794977
2021-06-24T15:21:34
2021-06-24T15:21:34
375,944,836
0
0
null
null
null
null
UTF-8
Swift
false
false
297
swift
// // TodoItem.swift // Todoey // // Created by Andrey MIkhniuk on 6/15/21. // Copyright © 2021 App Brewery. All rights reserved. // import Foundation class Item { var title: String = "" var isDone: Bool = true init(title: String) { self.title = title } }
[ -1 ]
5d40910b7563e547f33c83fbfd0870b32bf2addc
b0bbe146bc13b1fa2ef6c27874e8be69aa44da55
/Paint/Paint/Model/MainModel.swift
bf6230879ccdf48db66f522c790b472bef8f537e
[]
no_license
adiletabs/iOSDev
76b250f099ae59dbb94533206b08386b13ebda15
211157cea8323d0d3f930b47b73d20f2bee20356
refs/heads/main
2023-04-02T01:50:25.741715
2021-03-27T18:08:56
2021-03-27T18:08:56
334,817,018
0
0
null
null
null
null
UTF-8
Swift
false
false
3,084
swift
// // MainModel.swift // Paint // // Created by Adilet Absatov on 19.02.2021. // import Foundation import UIKit enum CurrentMode { case Circle case Rectangle case Triangle case Line case Pen } class MainModel { private var shapes: [Shape] = [] private var currentShape: Shape? private var currentMode: CurrentMode = .Circle private var currentColor: UIColor = .black private var fill: Bool = true private var startPoint: CGPoint? func drawShapes() { for shape in shapes { shape.drawPath() } } private func defineCurrentShape(movement: Bool, point: CGPoint) { switch currentMode { case .Circle: let radius = abs(startPoint!.x - point.x) / 2 let center = CGPoint(x: max(startPoint!.x, point.x) - radius, y: max(startPoint!.y, point.y) - radius) currentShape = Circle(radius, center, currentColor, isFilled: fill) case .Rectangle: currentShape = Rectangle(startPoint!, point, currentColor, isFilled: fill) case .Triangle: currentShape = Triangle(startPoint!, point, currentColor, isFilled: fill) case .Line: currentShape = Line(startPoint!, point, currentColor) case .Pen: if movement { (currentShape as! Pen).addPoint(point: point) } else { currentShape = Pen(point, currentColor) } } } func processStarted(point: CGPoint) { startPoint = point defineCurrentShape(movement: false, point: point) shapes.append(currentShape!) } func processMovement(point: CGPoint) { if !shapes.isEmpty { shapes.removeLast() } defineCurrentShape(movement: true, point: point) shapes.append(currentShape!) } func switchMode(tag: Int) { switch tag { case 0: currentMode = .Circle case 1: currentMode = .Rectangle case 2: currentMode = .Triangle case 3: currentMode = .Line case 4: currentMode = .Pen default: break } } func changeColor(tag: Int) { switch tag { case 0: currentColor = .black case 1: currentColor = .red case 2: currentColor = .green case 3: currentColor = .yellow default: break } } func switchFill(_ switchValue: Bool) { fill = switchValue } func removeLast() { if !shapes.isEmpty { let lastShape = shapes.last shapes.removeLast() if let pen = lastShape as? Pen { if !pen.isEmpty() { pen.removeLast() shapes.append(pen) } } } } } extension Double { var cg: CGFloat { return CGFloat(self) } } protocol Shape { func drawPath() }
[ -1 ]
b72366dca0e9f38007c59c5f5d30f80f01e3eced
8616e91a82122a77a42cec7cb2b72942e0f83411
/CombineMVVM/Exts/UITextField.Publisher.swift
32094f545e53155d28cadce0c61db2a5a105bd3f
[]
no_license
fx-studio/combine_mvvm
50740eac4bf478346851e700ae4dc31e5fbb0093
57ca76c0de16245e2ed6ae522a9708350450b073
refs/heads/master
2021-03-17T06:43:17.140284
2020-03-20T04:09:42
2020-03-20T04:09:42
246,971,480
2
0
null
null
null
null
UTF-8
Swift
false
false
487
swift
// // UITextField.Publisher.swift // CombineMVVM // // Created by Le Phuong Tien on 3/13/20. // Copyright © 2020 Fx Studio. All rights reserved. // import Foundation import UIKit import Combine extension UITextField { var publisher: AnyPublisher<String?, Never> { NotificationCenter.default .publisher(for: UITextField.textDidChangeNotification, object: self) .compactMap { $0.object as? UITextField? } .map { $0?.text } .eraseToAnyPublisher() } }
[ -1 ]
1b9edfe457a824167d1680cbce4f794bf948d663
ff4262f73cb5dba86250ef7f957dcda4daa83e89
/Ketsuatsu/Classes/Controllers/ListUserViewController.swift
afd3f7a8da5ce52545d1aa1bdeb650b64b0ef125
[]
no_license
acv-chiennv/Ketsuatsu
9340044507d9b3c1f7d3c6b6f53ab954dba5f684
5dd5e5b71c31429907a94633a3c1c2c7759697ed
refs/heads/master
2020-03-10T06:27:30.925283
2018-04-27T11:03:54
2018-04-27T11:03:54
129,240,344
0
0
null
null
null
null
UTF-8
Swift
false
false
3,297
swift
// // ListUserViewController.swift // Ketsuatsu // // Created by NguyenVanChien on 4/6/18. // Copyright © 2018 NguyenVanChien. All rights reserved. // import UIKit import RealmSwift class ListUserViewController: BaseViewController { @IBOutlet weak var tableView: UITableView! let USER_CELL_NIBNAME = "UserTableViewCell" let USER_CELL_IDENTIFIER = "UserTableViewCell" let HEIGHT_ROW_DEFAULT = 85 var listUser: Results<User>! override func viewDidLoad() { super.viewDidLoad() registerNibFile() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) getDataFromDataBase() } } extension ListUserViewController { func registerNibFile() -> Void { tableView.register(UINib.init(nibName: USER_CELL_NIBNAME, bundle: nil), forCellReuseIdentifier: USER_CELL_IDENTIFIER) tableView.separatorStyle = .none } func getDataFromDataBase() -> Void { listUser = DataStore.sharedInstance.filterUserByCreateDate() tableView.reloadData() } } extension ListUserViewController: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return listUser.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: USER_CELL_IDENTIFIER) as! UserTableViewCell if listUser.count > 0 { let user = listUser[indexPath.row] cell.deleteDelegate = self cell.editDelegate = self cell.indexCell = indexPath.row cell.configUICell(user) } return cell } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return CGFloat(HEIGHT_ROW_DEFAULT) } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let startVC = UIUtils.viewControllerWithIndentifier(identifier: START_VIEWCONTROLLER_IDENTIFIER, storyboardName: "Main") as! StartViewController let user = listUser[indexPath.row] startVC.userExist = user self.navigationController?.pushViewController(startVC, animated: true) } } extension ListUserViewController: DeleteUser { func deleteUser(_ index: Int) { CustomAlertViewController.create() .setMessage(message: MESSAGE_CONFIRM_DELETE_USER) .setIsOneButton(isOne: false) .setTitleOk(title: "削除") .setbtnOKClicked(btnOKClicked: { let userRealmDelete = self.listUser[index] DataStore.sharedInstance.deleteUser(userRealmDelete) self.getDataFromDataBase() }) .show() } } extension ListUserViewController: EditUser { func editUser(_ index: Int) { let editVC = UIUtils.viewControllerWithIndentifier(identifier: EDIT_VIEWCONTROLLER_IDENTIFIER, storyboardName: "Main") as! AddUserViewController editVC.user = listUser[index] editVC.isEdit = true self.navigationController?.pushViewController(editVC, animated: true) } }
[ -1 ]
78bf63941062ce9b33786dbdc74e86025e954369
ed80791e7be5694f41143b96b2b35349a23fe8e3
/CalorieTracker/CalorieTracker/View Controllers/FoodsViewController.swift
beefc632e20898a27e3b1e011ba58b79b20f1409
[ "MIT" ]
permissive
98chimp/calorietracker-ios
29e22a8bb8011a10b721890bc6345894e07e697f
d10a765bea4d0b0e0ed4848a4b1190a213f30b3e
refs/heads/master
2022-04-09T18:36:34.779157
2020-03-05T21:40:42
2020-03-05T21:40:42
242,401,737
0
0
null
null
null
null
UTF-8
Swift
false
false
8,795
swift
// // FoodsViewController.swift // CalorieTracker // // Created by Shahin on 2020-02-27. // Copyright © 2020 98%Chimp. All rights reserved. // import UIKit class FoodsViewController: BaseViewController { // MARK: - Outlets @IBOutlet weak var foodsTableView: UITableView! // MARK: - Properties private var selectedFoods = [Food]() override var foods: [Food] { return displayMode == .presenting ? FoodDataSource.shared.allVisibleFoods : FoodDataSource.shared.allUconsumedFoods } // MARK: - Overrides override func reloadDataSource() { super.reloadDataSource() foodsTableView.reloadData() } override func registerCells() { super.registerCells() foodsTableView.register(UINib(nibName: Constant.Identifier.Cell.foodCellNib, bundle: nil), forCellReuseIdentifier: Constant.Identifier.Cell.foodCell) } override func configureView() { super.configureView() foodsTableView.isHidden = foods.isEmpty foodsTableView.allowsMultipleSelection = displayMode == .presented foodsTableView.rowHeight = UITableView.automaticDimension foods.isEmpty ? addEmptyStateLabel() : removeEmptyStateLabel() } override func configureBarButtons() { switch displayMode { case .presenting: navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addButtonTapped)) case .presented: navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(doneButtonTapped)) navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(cancelButtonTapped)) } } // MARK: - Navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == Constant.Identifier.Segue.toNewFood { let destinationVC = segue.destination as? UINavigationController let newFoodVC = destinationVC?.viewControllers.first as? NewFoodViewController newFoodVC?.newFood = sender as? Food } } // MARK: - Actions @objc func addButtonTapped() { showInputScreen(for: nil) } @objc func cancelButtonTapped() { dismiss() } @objc func doneButtonTapped() { selectedFoods.forEach({ $0.isConsumedToday = true }) PersistenceManager.shared.saveContext() dismiss() } } // MARK: - Helper Functions extension FoodsViewController: FoodRemovable { private func showInputScreen(for food: Food?) { performSegue(withIdentifier: Constant.Identifier.Segue.toNewFood, sender: food) } private func presentActionSheet(for indexPath: IndexPath) { let food = foods[indexPath.row] let alert = AlertsManager.foodLisActionsAlert if !food.isConsumedToday { alert.addAction(withTitle: Constant.Alert.Title.Action.addFoodToToday, style: .default) { [weak self] in self?.addFoodsToToday([food]) } } alert.addAction(withTitle: Constant.Alert.Title.Action.editFood, style: .default) { [weak self] in self?.showInputScreen(for: food) } alert.addAction(withTitle: Constant.Alert.Title.Action.deleteFood, style: .destructive) { [weak self] in self?.delete(food) } alert.show(for: foodsTableView.cellForRow(at: indexPath)) } private func addFoodsToToday(_ foods: [Food]) { foods.forEach({ $0.isConsumedToday = true }) PersistenceManager.shared.saveContext() } private func delete(_ food: Food) { let alert = AlertsManager.deleteFoodAlert alert.addAction(withTitle: Constant.Alert.Title.Action.delete, style: .destructive) { food.isHidden = true PersistenceManager.shared.saveContext() } alert.show() } } // MARK: - Table View Data Source extension FoodsViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return foods.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { guard let foodCell = tableView.dequeueReusableCell(withIdentifier: Constant.Identifier.Cell.foodCell, for: indexPath) as? FoodTableViewCell else { return UITableViewCell() } foodCell.configure(with: foods[indexPath.row]) return foodCell } } // MARK: - Table View Delegate extension FoodsViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { let food = foods[indexPath.row] if !food.isConsumedToday { let addAction = UIContextualAction(style: .normal, title: "Add to\nToday") { [weak self] (_, _, completion) in self?.addFoodsToToday([food]) completion(true) } addAction.backgroundColor = .coreBlue return UISwipeActionsConfiguration(actions: [addAction]) } return nil } func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { let food = foods[indexPath.row] let deleteAction = UIContextualAction(style: .destructive, title: "Delete") { [weak self] (_, _, completion) in self?.delete(food) completion(true) } let editAction = UIContextualAction(style: .destructive, title: "Edit") { [weak self] (_, _, completion) in self?.showInputScreen(for: food) completion(true) } deleteAction.backgroundColor = .coreRed editAction.backgroundColor = .coreGray return UISwipeActionsConfiguration(actions: [deleteAction, editAction]) } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { switch displayMode { case .presenting: tableView.deselectRow(at: indexPath, animated: false) presentActionSheet(for: indexPath) case .presented: guard let cell = tableView.cellForRow(at: indexPath) else { return } cell.accessoryType = .checkmark let selectedFood = foods[indexPath.row] selectedFoods.append(selectedFood) } } func tableView(_ tableView: UITableView, didDeselectRowAt indexPath: IndexPath) { let cell = tableView.cellForRow(at: indexPath) cell?.accessoryType = .none let deselectedFood = foods[indexPath.row] selectedFoods.removeAll(where: { $0 == deselectedFood }) } } // MARK: - Generate mock data on-demand triggered by shake gesture extension FoodsViewController { private(set) var createdMockData: Bool { set { UserDefaults.standard.set(newValue, forKey: "created mock data") UserDefaults.standard.synchronize() } get { return UserDefaults.standard.bool(forKey: "created mock data") } } override func becomeFirstResponder() -> Bool { return true } override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { if motion == .motionShake { if createdMockData { let alert = AlertsManager.destroyMockDataAlert alert.addAction(withTitle: "DELETE", style: .destructive) { [weak self] in MockFoodDataSource.sharedMock.destroyMockData() self?.createdMockData = false } alert.show() } else { let alert = AlertsManager.createMockDataAlert alert.addAction(withTitle: "ADD", style: .default) { [weak self] in MockFoodDataSource().createMockData() self?.createdMockData = true } alert.show() } } } }
[ -1 ]
111fc4fee25af7d3ec3b9fb34ddb7e2a01394d27
7bc8024dd5e1481135dec23cb60b2588706dba98
/Httper/Project/ProjectIntroductionViewController.swift
0b8f5979d685df1bfdb9fe27c743f156abd21f71
[]
no_license
tomaszek1989/Httper-iOS
af69a506e7eb2853bb8b9dc28d474bfa682b8b15
234b65ff19044193247036f57366c19460af906e
refs/heads/master
2020-03-24T19:20:17.966272
2018-07-26T02:46:24
2018-07-26T02:46:24
142,920,283
0
0
null
2018-07-30T19:44:29
2018-07-30T19:39:09
Swift
UTF-8
Swift
false
false
646
swift
// // ProjectIntroductionViewController.swift // Httper // // Created by 李大爷的电脑 on 17/02/2017. // Copyright © 2017 limeng. All rights reserved. // import UIKit class ProjectIntroductionViewController: UIViewController { @IBOutlet weak var introductionTextView: UITextView! @IBOutlet weak var editBarButtonItem: UIBarButtonItem! var project: Project! override func viewDidLoad() { super.viewDidLoad() self.title = project.pname introductionTextView.text = project.introduction } // MARK: - Action @IBAction func editIntroduction(_ sender: Any) { } }
[ -1 ]
cbe51226deb3ab58f358d4a03d8a1898b22ac35c
1486e2c8debb6e2f3df29b90a6141a220d62b709
/code/App3null project code/Chat/CellsType/GeneralCellsType.swift
4405628e9c91f8f16806c03aa4599f0677847631
[]
no_license
Constantine1995/material
1435c75a206062b4a290963d6db2f04b0f331115
3aa511a5efc4749c7928192bca964bb63456b57e
refs/heads/main
2023-08-20T11:22:33.261980
2021-10-06T09:32:08
2021-10-06T09:32:08
414,147,778
0
0
null
null
null
null
UTF-8
Swift
false
false
636
swift
// // GeneralCellsType.swift // Linduu // // Created by Oksana Bolibok on 19.12.2019. // Copyright © 2019 app3null. All rights reserved. // import Foundation protocol GeneralCellsType { var cellType: CellType { get set } var own: Bool { get set } } enum CellType { case message(_ text: String) case image(_ thumbImageURL: URL?) } struct MessageCellVM: GeneralCellsType { var own: Bool let date: String var cellType: CellType let lastMessageCursor: Bool } struct ImageCellVM: GeneralCellsType { var own: Bool let date: String var cellType: CellType let lastMessageCursor: Bool }
[ -1 ]
2d2793f0331a3f8cf11688b2a07f7176cf320e99
081461ac9176b379a78c0ef03c5d7bcb161c9ec4
/MiaoKiit_p/MiaoKitExample/MiaoKitExample/SceneDelegate.swift
27fd9aaf104a20fa6976939503f1a5686aae6f68
[ "MIT" ]
permissive
miaokii/MiaoKiit
2c0330c7cc68e7c37f4d3861ab7ae57a1d8b7b63
605aa77062c221cbd57d0b90acc680ce947ae5c4
refs/heads/master
2023-04-19T21:10:49.925026
2021-05-19T10:00:33
2021-05-19T10:00:33
368,822,368
0
0
null
null
null
null
UTF-8
Swift
false
false
2,293
swift
// // SceneDelegate.swift // MiaoKitExample // // Created by miaokii on 2021/5/19. // import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 393277, 376906, 327757, 254032, 368728, 180314, 254045, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 377047, 418008, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 385281, 336129, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 393613, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 164362, 328207, 410129, 393748, 262679, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 385671, 148106, 213642, 377485, 352919, 98969, 344745, 361130, 336556, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 344777, 418508, 385743, 385749, 139998, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 361490, 386070, 271382, 336922, 345119, 377888, 214060, 345134, 345139, 361525, 386102, 361537, 377931, 345172, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 214150, 345224, 386187, 345247, 361645, 345268, 402615, 361657, 337093, 402636, 328925, 165086, 66783, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 328967, 345377, 345380, 353572, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 419360, 370208, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 214594, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 337601, 403139, 337607, 419528, 419531, 272083, 394967, 419543, 419545, 345819, 419548, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 362274, 378664, 354107, 345916, 354112, 370504, 329545, 345932, 370510, 354132, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 346059, 247760, 346064, 346069, 419810, 329699, 354275, 190440, 354314, 346140, 436290, 395340, 378956, 436307, 338005, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 346317, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 387314, 436474, 321787, 379135, 411905, 411917, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 321911, 420237, 379279, 272787, 354728, 338353, 338382, 272849, 248279, 256474, 182755, 338404, 330225, 248309, 330254, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 346736, 191093, 346743, 346769, 150184, 248505, 363198, 223936, 355025, 273109, 355029, 264919, 256735, 338661, 264942, 363252, 338680, 264965, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 355151, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 347106, 437219, 257009, 265208, 265215, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 248952, 420985, 330886, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 126279, 437576, 437584, 331089, 437588, 331094, 396634, 175451, 437596, 429408, 175458, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 175487, 249215, 175491, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 208399, 380433, 175637, 405017, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 224885, 224888, 224891, 224895, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 339664, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 397089, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 257869, 257872, 225105, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 339818, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 225448, 438441, 356521, 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, 381212, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 201030, 348489, 332107, 151884, 430422, 348503, 250203, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 250239, 389507, 348548, 356741, 332175, 160152, 373146, 340380, 373149, 70048, 356783, 373169, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 258723, 332455, 332460, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 348983, 340792, 398141, 357202, 389971, 357208, 389979, 430940, 357212, 357215, 439138, 201580, 201583, 349041, 340850, 381815, 430967, 324473, 398202, 119675, 340859, 324476, 430973, 324479, 340863, 324482, 373635, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 373672, 324525, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 357411, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 341072, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 210132, 333016, 210139, 210144, 218355, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 210261, 365912, 259423, 374113, 251236, 374118, 333164, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 349762, 333396, 374359, 333400, 366173, 423529, 423533, 210547, 415354, 333440, 267910, 267929, 333512, 259789, 366301, 333535, 153311, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 341877, 399222, 325494, 333690, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 350153, 358348, 333777, 219094, 399318, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 219144, 268299, 333838, 350225, 186388, 350232, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 342113, 252021, 342134, 374904, 268435, 333998, 334012, 260299, 350411, 350417, 350423, 350426, 350449, 375027, 358645, 350459, 350462, 350465, 350469, 268553, 350477, 268560, 350481, 432406, 350487, 325915, 350491, 325918, 350494, 325920, 350500, 194854, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 268702, 342431, 375209, 375220, 334263, 326087, 358857, 195041, 334312, 104940, 375279, 416255, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 334425, 326240, 375401, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 326417, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326463, 326468, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 433001, 400238, 326511, 211826, 211832, 392061, 351102, 359296, 252801, 260993, 351105, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 252838, 359335, 211885, 252846, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 343132, 384099, 384102, 384108, 367724, 187503, 343155, 384115, 212095, 351366, 384136, 384140, 384144, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 367801, 384189, 384192, 351424, 343232, 367817, 244938, 384202, 253132, 326858, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 376111, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 359887, 359891, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 253445, 359948, 359951, 245295, 359984, 343610, 400977, 400982, 179803, 155241, 245358, 155255, 155274, 368289, 245410, 425639, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 384831, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
ef2ebad36c52ece272349016c64a8b3e39aaba7a
db3320f6fbdda276f9dae445c127760ae3ace5cd
/Week11/Mixer/Mixer/SceneDelegate.swift
10402e965e9ec1b9e122de9bca645e06c1f75690
[ "MIT" ]
permissive
byaruhaf/RWiOSBootcamp
1a9d4265d56296b5ac536d9e00c9bf8482bb3690
2056a2f34128bdc5d15908257aa5a49a45baee80
refs/heads/main
2022-11-29T08:05:13.781627
2020-08-13T11:51:27
2020-08-13T11:51:27
266,933,174
7
2
null
null
null
null
UTF-8
Swift
false
false
2,362
swift
// // SceneDelegate.swift // Mixer // // Created by Franklin Byaruhanga on 07/08/2020. // Copyright © 2020 Franklin Byaruhanga. 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, 262417, 368913, 262423, 377118, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 98819, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 385714, 434868, 164535, 336568, 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, 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, 337072, 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, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 403139, 337607, 419528, 419531, 272083, 394967, 419543, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 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, 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, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 256787, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 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, 225071, 225074, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 225138, 339827, 257909, 225142, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 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, 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, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 349268, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 366173, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 267929, 333472, 333512, 259789, 358100, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333593, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 399222, 325494, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 219094, 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, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 252483, 219719, 399957, 244309, 334425, 326240, 375401, 334466, 334469, 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, 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, 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, 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, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
ee50cbdd2a8cdee8769c7ce28d6eb23767248f9f
1b1d97c0645ddfdc1cd53d924dc05054a8b13112
/coffeeLove/ViewController.swift
8cce1091297f5a070b928cbc30d41b002358822d
[]
no_license
valeriefarber/coffeeLove
cd73178a4d91fef32f4f53ef20a6e8062cda963d
c35bef2cd17542771181376b15e7ede0f1c48994
refs/heads/master
2021-05-09T19:46:07.937589
2018-01-23T18:14:03
2018-01-23T18:14:03
118,661,879
0
0
null
null
null
null
UTF-8
Swift
false
false
509
swift
// // ViewController.swift // coffeeLove // // Created by Valerie Farber on 1/23/18. // Copyright © 2018 farbiedoll. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ 278543, 317473, 237616, 360501, 237624, 288827, 286786, 159812, 284740, 243786, 237655, 307288, 200802, 309347, 276580, 309349, 309351, 309353, 356460, 307311, 276597, 303242, 311437, 278675, 299165, 278693, 100521, 307379, 280760, 280770, 227523, 280772, 280775, 280777, 313550, 229585, 307410, 278749, 280797, 301284, 280808, 280810, 280821, 280824, 280826, 276736, 280832, 278786, 287004, 287007, 282917, 233767, 278845, 287055, 289112, 311645, 323933, 289120, 227688, 299374, 199024, 278897, 313733, 233869, 227740, 285087, 289187, 289190, 289191, 305577, 289196, 305582, 278968, 127418, 293308, 278973, 289224, 281042, 276959, 279011, 276965, 236022, 287231, 279041, 279046, 277006, 281107, 236057, 295460, 281142, 279096, 277057, 129604, 158285, 311913, 281202, 277108, 287350, 227984, 117399, 228000, 225955, 287399, 285377, 287437, 226009, 277224, 199402, 234223, 312049, 289524, 226038, 234232, 230147, 226055, 299786, 295696, 281373, 228127, 281380, 234279, 283433, 312107, 293682, 289596, 279360, 289600, 279380, 295766, 279386, 308064, 303977, 293742, 277364, 207738, 291709, 183173, 324491, 234380, 304015, 226196, 277406, 234402, 291755, 297903, 324528, 230323, 234423, 293816, 281530, 291774, 295874, 168936, 289771, 183278, 277487, 293874, 277502, 293888, 277508, 275466, 234511, 300057, 300086, 234551, 300089, 238653, 300107, 203858, 300116, 281701, 281703, 296042, 277612, 164974, 300149, 285837, 226447, 234641, 349332, 302235, 285855, 234665, 283839, 277696, 228548, 228551, 279754, 230604, 298189, 302286, 230608, 290004, 290006, 189655, 302295, 298202, 298204, 298206, 363743, 298207, 298211, 290020, 228585, 120054, 204027, 312586, 296216, 277797, 300358, 238920, 234829, 296272, 306540, 310649, 290175, 275842, 226705, 310673, 306578, 144811, 370093, 279982, 286126, 277935, 292277, 296374, 130487, 306633, 288205, 286158, 280015, 163289, 280030, 286175, 286189, 282095, 308721, 302580, 296436, 310773, 288251, 286204, 282128, 286234, 282145, 284197, 296487, 286249, 296489, 286257, 226878, 228932, 226887, 288331, 288332, 284240, 228945, 280146, 226896, 212561, 284242, 292435, 212573, 292451, 284261, 306791, 286314, 284275, 284277, 284279, 292478, 284289, 284298, 282262, 284315, 280219, 284317, 282275, 284323, 280231, 284328, 313007, 284336, 276150, 286390, 282301, 296638, 276167, 284361, 317137, 284373, 282338, 284391, 294636, 288501, 358137, 358139, 286462, 358147, 278298, 329499, 276256, 278304, 282411, 288579, 276309, 307029, 188253, 292701, 284570, 294812, 284574, 284577, 284586, 282548, 165832, 301012, 294889, 298989, 227315, 237556 ]
dc3a082cdc26eb2288c81b295d77dccd7d128199
ec0eefcab41117dcdee879ec8963e9dbb7526193
/Vanilai/NewVanilaiViewController.swift
41eb7d4cccbfec55a6300d084cde2a4274ed3352
[]
no_license
badrinrs/Vanilai-ios
2b3a033bccaee5c2c73181526161d55541478c99
5328c4dd7b66903a39d26be6e1142f3f07382710
refs/heads/master
2021-01-13T05:15:03.103619
2017-03-13T00:53:42
2017-03-13T00:53:42
81,285,434
0
0
null
null
null
null
UTF-8
Swift
false
false
6,417
swift
// // NewVanilaiViewController.swift // Vanilai // // Created by Ravichandran Ramachandran on 2/5/17. // Copyright © 2017 Ravichandran Ramachandran. All rights reserved. // import UIKit import MapKit import MMDrawerController import GoogleMobileAds class NewVanilaiViewController: UIViewController, CLLocationManagerDelegate { var latitude: Double! var longitude: Double! @IBOutlet weak var weatherImage: UIImageView! @IBOutlet weak var currentWeatherImage: UIImageView! @IBOutlet weak var locationLabel: UILabel! @IBOutlet weak var currentHumidity: UILabel! @IBOutlet weak var currentPrecipitation: UILabel! @IBOutlet weak var currentWeatherLabel: UILabel! @IBOutlet weak var currentTemperature: UILabel! @IBOutlet weak var dailyWeatherButton: UIButton! @IBOutlet weak var hourlyWeatherButton: UIButton! @IBOutlet weak var activityIndicator: UIActivityIndicatorView! @IBOutlet weak var getEarthquakes: UIButton! @IBOutlet weak var bannerAd: GADBannerView! @IBOutlet weak var temperatureType: UISegmentedControl! var centerContainer: MMDrawerController! var forecast: Forecast! let api = Api() override func viewDidLoad() { super.viewDidLoad() bannerAd.adUnitID = VanilaiConstants.MOBILE_ADS_UNIT_ID bannerAd.rootViewController = self bannerAd.load(GADRequest()) let centerViewController = self let rightViewController = self.storyboard?.instantiateViewController(withIdentifier: "DrawerController") as! DrawerController let rightSideNav = UINavigationController(rootViewController: rightViewController) let centerNav = UINavigationController(rootViewController: centerViewController) let appDelegate = UIApplication.shared.delegate! as! AppDelegate centerContainer = MMDrawerController(center: centerNav, rightDrawerViewController: rightSideNav) centerContainer!.openDrawerGestureModeMask = MMOpenDrawerGestureMode.panningCenterView centerContainer!.closeDrawerGestureModeMask = MMCloseDrawerGestureMode.panningCenterView appDelegate.window?.rootViewController = centerContainer appDelegate.window?.makeKeyAndVisible() let geocoder = CLGeocoder() geocoder.reverseGeocodeLocation(CLLocation(latitude: latitude, longitude: longitude)) { (placemarks, error) in if let error = error { print("Error: \(error.localizedDescription)") self.showAlert(title: "Error Geocoding Location", message: "Please Try Again Later") self.locationLabel.text = "" } else { let placemark = placemarks?[0] self.locationLabel.text = placemark?.locality } } activityIndicator.startAnimating() api.getForecast(latitude: latitude, longitude: longitude) { (forecast, error) in self.activityIndicator.stopAnimating() if let error = error { print("Error getting forecast: \(error.localizedDescription)") self.showAlert(title: "Error Getting Forcast!", message: "Please Try Again Later!") } else { if let forecast = forecast { self.currentTemperature.text = "\(Int(forecast.temperature))\u{00B0}F" self.currentWeatherLabel.text = forecast.summary self.currentHumidity.text = "\(Int(forecast.humidity*100))%" self.currentPrecipitation.text = "\(Int(forecast.precipProbability*100))%" self.weatherImage.image = forecast.getIcon() self.currentWeatherImage.image = forecast.getWeatherImage() self.forecast = forecast } } } } @IBAction func hourlyWeather(_ sender: Any) { let viewController = self.storyboard?.instantiateViewController(withIdentifier: "DailyWeatherController") as! DailyWeatherController viewController.forecast = forecast viewController.forecastType = "hourly" viewController.location = self.locationLabel.text self.navigationController?.pushViewController(viewController, animated: true) } @IBAction func dailyWeather(_ sender: Any) { let viewController = self.storyboard?.instantiateViewController(withIdentifier: "DailyWeatherController") as! DailyWeatherController viewController.forecast = forecast viewController.forecastType = "daily" viewController.location = self.locationLabel.text self.navigationController?.pushViewController(viewController, animated: true) } @IBAction func toggleTemperatureType(_ sender: Any) { var temperature = forecast.temperature if temperatureType.selectedSegmentIndex == 1 { temperature = (temperature-32)*5/9 currentTemperature.text = "\(Int(temperature))\u{00B0}C" } else { currentTemperature.text = "\(Int(temperature))\u{00B0}F" } } @IBAction func toggleMenu(_ sender: Any) { centerContainer.toggle(.right, animated: true, completion: nil) } @IBAction func getEarthquakeInformation(_ sender: Any) { api.getEarthquakes(latitude: latitude, longitude: longitude) { (earthquakes, error) in if let error = error { print(error.localizedDescription) self.showAlert(title: "Error!", message: "Please try again later!") } else { if let earthquakes = earthquakes { let viewController = self.storyboard?.instantiateViewController(withIdentifier: "earthquakeVC") as! UITabBarController (viewController.viewControllers?[0] as! EarthquakeMapController).earthquakes = earthquakes (viewController.viewControllers?[0] as! EarthquakeMapController).coordinate = CLLocationCoordinate2D(latitude: self.latitude, longitude: self.longitude) ((viewController.viewControllers?[1] as! UINavigationController).viewControllers[0] as! EarthquakeController).earthquakes = earthquakes self.navigationController?.pushViewController(viewController, animated: true) } } } } }
[ -1 ]
fde4af5157acf93ac6883d920f9940afad9b3373
eefeb3f7588be1fc0dd60919abefd41d539e426f
/List.swift
48b21a6633d6ada787bd96f87697482e0bc22667
[]
no_license
onnyvergiean/Latihan-Swift
3305f3ef16228c2360297e5fbb20216a72dbab26
dbd78400aa7395da0d52d773c25cc29f1290573c
refs/heads/master
2022-12-17T21:07:01.088704
2020-09-14T13:03:14
2020-09-14T13:03:14
295,149,340
0
0
null
null
null
null
UTF-8
Swift
false
false
2,294
swift
var listFruits = [String]() var isRunning = true func getInput(message : String) -> String?{ print(message, terminator : ": "); return readLine() } func getInputInt(message: String) -> Int?{ if let inputString = getInput(message: message){ return Int(inputString) }else{ return nil } } func showAllFruits(){ if listFruits.isEmpty{ print("Belum ada item di daftar") }else{ for (index, value) in listFruits.enumerated(){ print("[\(index + 1)] \(value)") } } } func insertFruits(){ if let name = getInput(message : "Masukkan nama buah"){ listFruits.append(name) }else{ insertFruits() print("Input tidak valid") } } func editFruits(){ showAllFruits() print("-----------------------") if let position = getInputInt(message: "Pilih posisi buah yang ingin diganti"), position<=listFruits.count && position>0, let name = getInput(message: "Masukkan nama buah") { listFruits[position-1] = name }else{ editFruits() print("Input tidak valid") } } func deleteFruits(){ showAllFruits() if let position = getInputInt(message : "Pilih posisis buah yang akan dihapus "), position<=listFruits.count && position>0{ listFruits.remove(at: position-1) }else{ deleteFruits() print("Input tidak valid") } } func showMenu(){ print("Selamat Datang") print("Menu") print("1. Tampil Buah") print("2. Tambah Buah") print("3. Edit Buah") print("4. Hapus Buah") print("5. Keluar") if let position = getInputInt(message: "Silahkan Pilih Menu"), position<=5 && position>0{ switch position{ case 1: showAllFruits() break case 2: insertFruits() break case 3: editFruits() break case 4: deleteFruits() break case 5: isRunning = false print("Terima Kasih") break default: print("Pilihan Salah") } }else{ print("Tidak Valid") } } while isRunning{ showMenu() }
[ -1 ]
d3dbb1a5048086cdc47ce535012985c230aa83d1
53a09683035cc80678ff32ad4dd7ad8d00f23756
/RegisterRequest.swift
8942299918de05a1af5600a9d7c908e6a38feba6
[]
no_license
MotoXakep/GBShop
2883a542525c02d6ad5d404d6f3d5cc890764b60
802d457224800864ee7459377444d03d3b0b5682
refs/heads/master
2020-03-26T00:11:21.352668
2018-08-10T16:35:45
2018-08-10T16:35:45
144,309,541
0
0
null
null
null
null
UTF-8
Swift
false
false
1,093
swift
// // RegisterRequest.swift // COpenSSL // // Created by Алексей Борисов on 11/07/2018. // import Foundation struct RegisterRequest { let idUser: Int let username: String let password: String var email: String = "" var gender: String = "" var creditCard: String = "" var bio: String = "" init?(_ json: [String: AnyObject]) { guard let idUser = json["id_user"] as? Int, let username = json["username"] as? String, let password = json["password"] as? String else { return nil } self.idUser = idUser self.username = username self.password = password if let email = json["email"] as? String { self.email = email } if let gender = json["gender"] as? String { self.gender = gender } if let creditCard = json["credit_card"] as? String { self.creditCard = creditCard } if let bio = json["bio"] as? String { self.bio = bio } } }
[ -1 ]
1090903e03ddefc29970853900863310f836f839
721c051f854d787f31c5887eb3307bee1a34f331
/Sources/MockingbirdTestsHost/MockingbirdIgnore/SecondLevel/Group3/Group/EnclosingDirectoryOverriddenIncludedSource.swift
2e2dd949fb46a17027239f0c6492eb2042050932
[ "MIT" ]
permissive
birdrides/mockingbird
e2cd243024fd6afde0340fd031987d4e14083b98
210ec238b470ac6fd60f7ecfa2218b544519773f
refs/heads/master
2023-07-08T01:24:59.947940
2022-07-28T00:28:37
2022-07-28T00:28:37
200,942,644
633
81
MIT
2023-05-29T04:01:02
2019-08-07T00:27:51
Swift
UTF-8
Swift
false
false
147
swift
import Foundation /// Included in a more specific directory scope than the exclusion rule. protocol EnclosingDirectoryOverriddenIncludedSource {}
[ -1 ]
2826c2c6d88bd5857687bd4c844ad5535262b9a6
4f296f8cd6f0e28b7d36dec9cd88bb7f12a4f8af
/MVP-Simple-App/MVP-Simple-App/Models/Model.swift
b6c509407a8e30ec66c684de872805ec1dfeae29
[]
no_license
taro-ken/MVP-Simple-App
5abd194fca7d603c0207d7bf66f0d52c45c91647
ee9c54aaaab7298309e1855c067d0e4d279c3994
refs/heads/main
2023-08-10T22:15:47.122666
2021-09-26T07:59:09
2021-09-26T07:59:09
410,262,803
1
0
null
null
null
null
UTF-8
Swift
false
false
484
swift
// // Model.swift // MVP-Simple-App // // Created by 木元健太郎 on 2021/09/25. // import Foundation struct SampleItem { let title: String static func createItems() -> [SampleItem] { let items = [ SampleItem(title: "りんご"), SampleItem(title: "バナナ"), SampleItem(title: "オレンジ"), SampleItem(title: "ぶどう"), SampleItem(title: "キウイ") ] return items } }
[ -1 ]
daa5729b03480e0005938653e5122e6bfd54204f
c82c5a5bf1cb98d2c0eb76af6caa8da8f8719ce2
/UIDiscourseApp/Scenes/User/UserViewController.swift
2676aa6b41b5b13b5d5a70cb49c53beda2892fc3
[]
no_license
gustyAdolf/UI_Avanzada_IOS
6d3c1908cc617a8108fbe369f7d68dd865fa4dfd
854da7f7784d75205b97686a617029447f6db56d
refs/heads/main
2023-03-23T05:23:26.341415
2021-03-17T15:33:35
2021-03-17T15:33:35
348,751,188
0
0
null
null
null
null
UTF-8
Swift
false
false
4,868
swift
// // UserViewController.swift // UIDiscourseApp // // Created by Gustavo A Ramírez Franco on 11/3/21. // import UIKit class UserViewController: UIViewController { let viewModel: UserViewModel lazy var userImage: UIImageView = { let userImage = UIImageView() userImage.translatesAutoresizingMaskIntoConstraints = false userImage.layer.masksToBounds = false userImage.widthAnchor.constraint(equalToConstant: 185).isActive = true userImage.heightAnchor.constraint(equalToConstant: 185).isActive = true userImage.frame.size = CGSize(width: 185, height: 185) userImage.layer.cornerRadius = userImage.frame.height/2 userImage.clipsToBounds = true userImage.image = UIImage(data: viewModel.userImageData) return userImage }() lazy var nameLabel: UILabel = { let nameLabel = UILabel() nameLabel.translatesAutoresizingMaskIntoConstraints = false nameLabel.font = .textStyle9 nameLabel.textColor = .tangerine nameLabel.textAlignment = .center return nameLabel }() lazy var usernameLabel: UILabel = { let usernameLabel = UILabel() usernameLabel.translatesAutoresizingMaskIntoConstraints = false usernameLabel.font = .textStyle10 usernameLabel.textColor = .tangerine usernameLabel.textAlignment = .center return usernameLabel }() init(viewModel: UserViewModel) { self.viewModel = viewModel super.init(nibName: nil, bundle: nil) } required init?(coder: NSCoder) { fatalError() } override func loadView() { view = UIView() view.backgroundColor = .white configureConstraints() } private func configureConstraints() { let orangeView = UIView(frame: .zero) orangeView.translatesAutoresizingMaskIntoConstraints = false orangeView.backgroundColor = .tangerine view.addSubview(orangeView) NSLayoutConstraint.activate([ orangeView.heightAnchor.constraint(equalToConstant: 150), orangeView.widthAnchor.constraint(equalTo: view.widthAnchor) ]) let blackView = UIView(frame: .zero) blackView.translatesAutoresizingMaskIntoConstraints = false blackView.backgroundColor = .black view.addSubview(blackView) NSLayoutConstraint.activate([ blackView.heightAnchor.constraint(equalToConstant: 245), blackView.topAnchor.constraint(equalTo: orangeView.bottomAnchor), blackView.leftAnchor.constraint(equalTo: view.leftAnchor), blackView.rightAnchor.constraint(equalTo: view.rightAnchor) ]) view.addSubview(userImage) let topSpacing = 150 - (userImage.frame.height/2) NSLayoutConstraint.activate([ userImage.topAnchor.constraint(equalTo: orangeView.topAnchor, constant: topSpacing), userImage.centerXAnchor.constraint(equalTo: view.centerXAnchor) ]) view.addSubview(nameLabel) NSLayoutConstraint.activate([ nameLabel.topAnchor.constraint(equalTo: userImage.bottomAnchor, constant: 16), nameLabel.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 24), nameLabel.rightAnchor.constraint(equalTo: view.rightAnchor, constant: -24) ]) view.addSubview(usernameLabel) NSLayoutConstraint.activate([ usernameLabel.topAnchor.constraint(equalTo: nameLabel.bottomAnchor), usernameLabel.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 24), usernameLabel.rightAnchor.constraint(equalTo: view.rightAnchor, constant: -24) ]) } override func viewDidLoad() { super.viewDidLoad() viewModel.viewWasLoaded() } fileprivate func updateUI() { nameLabel.text = viewModel.nameLabelText usernameLabel.text = viewModel.usernameLabelText } fileprivate func showErrorFetchingUser() { showAlert("Error fetching user\nPlease try again later") } fileprivate func showSuccessUpdatingUserName() { showAlert("The user name has been successfully updated!", "Success!", "OK") } fileprivate func showErrorUpdatingUserName() { showAlert("Error updating user name\nPlease try again later") } @objc func updateNameButtonTapped() { } } extension UserViewController: UserViewModelViewDelegate { func errorFetchingUser() { showErrorFetchingUser() } func userDataFetched() { updateUI() } func successUpdatingUserName() { showSuccessUpdatingUserName() } func errorUpdatingUserName() { showErrorUpdatingUserName() } }
[ -1 ]
733299268d9290e92a725ff69ece3e74bca8a03a
f7866cfc83418e4d089e89b37a10200dc4224101
/SimpleNetworkingTests/SimpleNetworkingTests.swift
f90631ae5df92595a167fec959b77e73c074d3e7
[]
no_license
michaelversus/NeedleDITest
24b9aed7e69842a2e9d56171241d21a24e2783a3
3e0f06e86d69659e48a3b3f7bace782e2ee683bd
refs/heads/main
2023-06-19T21:04:44.690952
2021-07-22T10:27:12
2021-07-22T10:27:12
387,754,122
0
0
null
null
null
null
UTF-8
Swift
false
false
932
swift
// // SimpleNetworkingTests.swift // SimpleNetworkingTests // // Created by MIC KARAGIORGOS on 7/21/21. // import XCTest @testable import SimpleNetworking class SimpleNetworkingTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() throws { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 257024, 210433, 254465, 366083, 358410, 253451, 354316, 360462, 146448, 398869, 418837, 253463, 182296, 254488, 201755, 252958, 349726, 134686, 207393, 16419, 223268, 355876, 377386, 358954, 344107, 349741, 347694, 197167, 357423, 253999, 346162, 252980, 352315, 348732, 352829, 376894, 132158, 361535, 336960, 248901, 56902, 359495, 348742, 352326, 250954, 361543, 250956, 348749, 340558, 341073, 349781, 338007, 356447, 436832, 354911, 139872, 254048, 253029, 257125, 120427, 54893, 138863, 352368, 351344, 187506, 139892, 370296, 201720, 341115, 363644, 366203, 323196, 337534, 339584, 248961, 356989, 339585, 349316, 224901, 336518, 348806, 152195, 369289, 349318, 344715, 337039, 169104, 354269, 347283, 346772, 352917, 271000, 345752, 342682, 363163, 339100, 346779, 351390, 255649, 344738, 343203, 49316, 139939, 258214, 333991, 333992, 362659, 253099, 287404, 336558, 224946, 367799, 342713, 113850, 224958, 379071, 367810, 346314, 164560, 345814, 351446, 224984, 361176, 254170, 282327, 134366, 359647, 222440, 345834, 346858, 372460, 212716, 212717, 360177, 353523, 351476, 338164, 351478, 348920, 336120, 356602, 363771, 128251, 344827, 344828, 35583, 363263, 162561, 175873, 360195, 261377, 339720, 369930, 353551, 254226, 161554, 272660, 368916, 349462, 345879, 257305, 249626, 169754, 151839, 344865, 341796, 257830, 338218, 362283, 189228, 254251, 66862, 353584, 355121, 345396, 353078, 116026, 259899, 355130, 336702, 355139, 252741, 420677, 360264, 337225, 345929, 337227, 341836, 251213, 348492, 383311, 250192, 353616, 366930, 254286, 348500, 255829, 344401, 341847, 355152, 272729, 159066, 189275, 350044, 377686, 355165, 345951, 362337, 357218, 127841, 342887, 355178, 160110, 207727, 362352, 250226, 314739, 354677, 341879, 361337, 362881, 254850, 359298, 260996, 253829, 340357, 378244, 388487, 337281, 357762, 349067, 359299, 350093, 349072, 355217, 314770, 39324, 350109, 253856, 251298, 354212, 208293, 140204, 340398, 252847, 347055, 362417, 342450, 363438, 334260, 210358, 373687, 188348, 362431, 336320, 349121, 342466, 359364, 380357, 163268, 188871, 211914, 355146, 212942, 212946, 346067, 359381, 353750, 210391, 210392, 210390, 212951, 340955, 210393, 219101, 343005, 366037, 130016, 360417, 354274, 342498, 359387, 340453, 248797, 334309, 337895, 253929, 354280, 361963, 123881, 174057, 247791, 362480, 349175, 254456, 359930 ]
d909a665d429c2adeb8fd6d7404da458b5708744
11dd4cd783cced1670b7865aaaea72d8a2a091f1
/AgraLogicSwift/CoreData/EntityClasses/GenActivityTypeField+CoreDataProperties.swift
8a4e2af4cd9d998613bb424709dfbfcb09bed05b
[]
no_license
ShammiDehmiwal/AgralogicSwift
a6ab9dada72815b51d3895e87ac3e3b377a10ac1
5649b42e4777c5c0b33d926e51a00210f614285a
refs/heads/master
2020-05-18T16:23:00.782531
2019-05-13T13:02:44
2019-05-13T13:02:44
184,523,806
0
0
null
null
null
null
UTF-8
Swift
false
false
2,741
swift
// // GenActivityTypeField+CoreDataProperties.swift // // // Created by Reena on 06/05/19. // // import Foundation import CoreData extension GenActivityTypeField { @nonobjc public class func fetchRequest() -> NSFetchRequest<GenActivityTypeField> { return NSFetchRequest<GenActivityTypeField>(entityName: "GenActivityTypeField") } @NSManaged public var name_field_defaultValue: NSData? @NSManaged public var name_field_enable: NSNumber? @NSManaged public var name_field_is_lock_value: NSNumber? @NSManaged public var name_field_is_scanned: NSNumber? @NSManaged public var name_field_label: String? @NSManaged public var name_field_lock_value_options: NSData? @NSManaged public var name_field_meta: String? @NSManaged public var name_field_modify_at_complete: NSNumber? @NSManaged public var name_field_only_admin_can_update: NSNumber? @NSManaged public var name_field_only_admin_can_view_mobile: NSNumber? @NSManaged public var name_field_required: NSNumber? @NSManaged public var name_field_type: String? @NSManaged public var name_field_value: NSNumber? @NSManaged public var quantity_field_defaultValue: NSData? @NSManaged public var quantity_field_enable: NSNumber? @NSManaged public var quantity_field_is_lock_value: NSNumber? @NSManaged public var quantity_field_is_scanned: NSNumber? @NSManaged public var quantity_field_label: String? @NSManaged public var quantity_field_lock_value_options: NSData? @NSManaged public var quantity_field_meta: String? @NSManaged public var quantity_field_modify_at_complete: NSNumber? @NSManaged public var quantity_field_only_admin_can_update: NSNumber? @NSManaged public var quantity_field_only_admin_can_view_mobile: NSNumber? @NSManaged public var quantity_field_required: NSNumber? @NSManaged public var quantity_field_type: String? @NSManaged public var quantity_field_value: NSNumber? @NSManaged public var unit_field_defaultValue: NSData? @NSManaged public var unit_field_enable: NSNumber? @NSManaged public var unit_field_is_lock_value: NSNumber? @NSManaged public var unit_field_is_scanned: NSNumber? @NSManaged public var unit_field_label: String? @NSManaged public var unit_field_lock_value_options: NSData? @NSManaged public var unit_field_meta: String? @NSManaged public var unit_field_modify_at_complete: NSNumber? @NSManaged public var unit_field_only_admin_can_update: NSNumber? @NSManaged public var unit_field_only_admin_can_view_mobile: NSNumber? @NSManaged public var unit_field_required: NSNumber? @NSManaged public var unit_field_type: String? @NSManaged public var unit_field_value: NSNumber? }
[ -1 ]
35f17fb875c219051fb9a7e784aecd728e611d70
26d1085b44891e6e7374bbc9cdd9b82d5e93b6f3
/Scene/Extensions/MapView+Camera.swift
b388f7325c8d71ae29b58d33d4333d77b195db48
[]
no_license
trevinwisaksana/Timescene
baf47680b1aaf3578fae4cb5e56e73a9d466d0bf
cbc086bfc5fde810ab9f84d7a794ad0b3963a674
refs/heads/master
2021-04-26T23:47:36.842325
2018-05-22T02:14:32
2018-05-22T02:14:32
123,857,262
0
0
null
null
null
null
UTF-8
Swift
false
false
774
swift
// // MapView+Camera.swift // Scene // // Created by Trevin Wisaksana on 25/02/2018. // Copyright © 2018 Trevin Wisaksana. All rights reserved. // import MapKit extension MKMapView { func setMapViewCamera(currentCoordinate: CLLocationCoordinate2D, destinationCoordinate: CLLocationCoordinate2D) { let camera = MKMapCamera(lookingAtCenter: currentCoordinate, fromEyeCoordinate: destinationCoordinate, eyeAltitude: 100.0) self.setCamera(camera, animated: true) } /* func addMapViewDestinationMarker(coordinate: CLLocationCoordinate2D, travelTime: String) { let marker = GMSMarker(position: coordinate) marker.title = travelTime marker.map = self self.selectedMarker = marker } */ }
[ -1 ]
afa83af5807128942c47d13da769185b424fc5d8
8cc60bd0927e4a231e4a42efe716d5b2c0bd9ce8
/CoreDataConcurrencyUITests/CoreDataConcurrencyUITests.swift
665a12c8248c87b0e0bdebc04f53df58c16fafba
[]
no_license
manuelmarcos/CoreDataConcurrency
b4ccdb7c03c8cb630ebdbb7627f91cc4f9de7d11
94b48ff24679f7cb9640d3094321efd360fc0961
refs/heads/master
2020-12-07T03:35:03.920720
2016-10-10T18:24:24
2016-10-10T18:24:24
67,412,541
0
0
null
2016-10-10T18:24:24
2016-09-05T10:44:59
Swift
UTF-8
Swift
false
false
1,305
swift
// // CoreDataConcurrencyUITests.swift // CoreDataConcurrencyUITests // // Created by Manuel Marcos Regalado on 05/09/2016. // Copyright © 2016 Manuel Marcos Regalado. All rights reserved. // import XCTest class CoreDataConcurrencyUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. XCUIApplication().launch() // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 333827, 182277, 243720, 282634, 313356, 155665, 305173, 241695, 237599, 223269, 229414, 354342, 292901, 102441, 315433, 278571, 313388, 325675, 354346, 282671, 102446, 229425, 124974, 243763, 241717, 321589, 229431, 180279, 215095, 319543, 213051, 288829, 325695, 288835, 286787, 307269, 237638, 313415, 239689, 233548, 311373, 315468, 196687, 278607, 311377, 354386, 223317, 315477, 368732, 180317, 323678, 315488, 321632, 45154, 315489, 280676, 313446, 215144, 307306, 233578, 194667, 278637, 288878, 319599, 278642, 284789, 131190, 288890, 292987, 215165, 131199, 194692, 278669, 235661, 333968, 241809, 323730, 278676, 311447, 153752, 327834, 284827, 278684, 329884, 299166, 278690, 311459, 215204, 333990, 299176, 284840, 184489, 284843, 278698, 278703, 323761, 184498, 278707, 125108, 278713, 223418, 280761, 180409, 295099, 227517, 280767, 258233, 299197, 299202, 139459, 309443, 176325, 338118, 227525, 299208, 301255, 131270, 280779, 227536, 282832, 301270, 229591, 301271, 280792, 147679, 147680, 311520, 325857, 356575, 280803, 307431, 338151, 182503, 319719, 295147, 317676, 286957, 125166, 125170, 395511, 313595, 125180, 184574, 309504, 125184, 217352, 125192, 125197, 194832, 227601, 125200, 319764, 278805, 338196, 125204, 334104, 315674, 282908, 299294, 125215, 282912, 233761, 278817, 311582, 211239, 282920, 334121, 317738, 325930, 311596, 338217, 125225, 321839, 336177, 315698, 98611, 125236, 282938, 307514, 127292, 278843, 168251, 287040, 319812, 311622, 280903, 227655, 319816, 323914, 201037, 383309, 282959, 229716, 250196, 289109, 379224, 168280, 323934, 391521, 239973, 381286, 285031, 313703, 416103, 280938, 242027, 242028, 321901, 354671, 278895, 287089, 250227, 199030, 315768, 291193, 139641, 223611, 291194, 248188, 313726, 311679, 211327, 291200, 240003, 158087, 313736, 227721, 242059, 311692, 106893, 227730, 285074, 240020, 190870, 315798, 190872, 291225, 317851, 285083, 293275, 242079, 227743, 289185, 285089, 293281, 305572, 156069, 283039, 289195, 375211, 311723, 377265, 334259, 338359, 299449, 311739, 319931, 293309, 278974, 336319, 311744, 317889, 291266, 336323, 278979, 278988, 129484, 281038, 281039, 278992, 283089, 289229, 326093, 283088, 279000, 176602, 242138, 160224, 279009, 291297, 188899, 285152, 369121, 279014, 195044, 319976, 279017, 242150, 311787, 334315, 281071, 319986, 236020, 279030, 311800, 293368, 279033, 317949, 322396, 279042, 283138, 233987, 324098, 287237, 334345, 309770, 340489, 342537, 279053, 322057, 182802, 283154, 303634, 279060, 279061, 303635, 279066, 188954, 322077, 291359, 342560, 370122, 227881, 293420, 236080, 289328, 283185, 279092, 23093, 234037, 244279, 244280, 338491, 340539, 234044, 301635, 309831, 55880, 322119, 377419, 303693, 281165, 301647, 281170, 326229, 309847, 189016, 115287, 244311, 332379, 111197, 295518, 287327, 242274, 244326, 279143, 279150, 281200, 287345, 301688, 189054, 303743, 297600, 287359, 291455, 301702, 279176, 311944, 334473, 344714, 316044, 311948, 311950, 184974, 326288, 311953, 316048, 287379, 336531, 295575, 227991, 289435, 303772, 205469, 221853, 323335, 285348, 340645, 314020, 279207, 295591, 176810, 295598, 248494, 279215, 293552, 299698, 285362, 164532, 166581, 279218, 342705, 285360, 287412, 287418, 314043, 303802, 154295, 66243, 291529, 287434, 225996, 363212, 287438, 135888, 279249, 242385, 303826, 369365, 369366, 279253, 158424, 230105, 299737, 322269, 338658, 342757, 295653, 289511, 230120, 234216, 330473, 285419, 330476, 289517, 279278, 312046, 215790, 170735, 125683, 230133, 199415, 342775, 234233, 242428, 279293, 289534, 205566, 35584, 299777, 322302, 228099, 285443, 375552, 291584, 291591, 322312, 346889, 285450, 295688, 312076, 326413, 285457, 295698, 291605, 166677, 207639, 283418, 285467, 221980, 281378, 234276, 336678, 318247, 203560, 279337, 262952, 318251, 283431, 262957, 293673, 164655, 301872, 328495, 234290, 303921, 285493, 230198, 285496, 301883, 201534, 289599, 342846, 222017, 295745, 281407, 293702, 318279, 283466, 281426, 279379, 244569, 201562, 234330, 281434, 295769, 230238, 275294, 301919, 279393, 293729, 357219, 281444, 303973, 279398, 351078, 349025, 177002, 308075, 242540, 310132, 295797, 228214, 207735, 201590, 295799, 177018, 279418, 269179, 308093, 336765, 314240, 291713, 158594, 330627, 340865, 240517, 287623, 228232, 416649, 279434, 320394, 316299, 252812, 234382, 308111, 299912, 308113, 189327, 293780, 310166, 289691, 209820, 240543, 283551, 310177, 289699, 189349, 289704, 293801, 279465, 326571, 177074, 304050, 326580, 289720, 326586, 289723, 189373, 213956, 359365, 19398, 345030, 281541, 213961, 127945, 211913, 279499, 56270, 191445, 304086, 183254, 207839, 340960, 234469, 314343, 123880, 340967, 304104, 324587, 320492, 234476, 203758, 320495, 248815, 289773, 287730, 183276, 240631, 320504, 214009, 201721, 312313, 312317, 328705, 234499, 418819, 293894, 330759, 320520, 322571, 230411, 330766, 320526, 234513, 238611, 293911, 238617, 197658, 316441, 326684, 336930, 132140, 113710, 189487, 281647, 322609, 318515, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 318127, 336962, 160834, 314437, 349254, 238663, 300109, 234578, 207954, 250965, 205911, 339031, 296023, 314458, 156763, 281698, 281699, 230500, 285795, 250982, 322664, 228457, 279659, 318571, 234606, 300145, 238706, 230514, 187508, 312435, 279666, 300147, 302202, 285819, 314493, 285823, 150656, 234626, 279686, 222344, 285833, 285834, 234635, 228492, 337037, 318602, 177297, 162962, 187539, 347286, 308375, 324761, 285850, 296091, 119965, 234655, 300192, 302239, 339106, 306339, 234662, 300200, 302251, 208044, 238764, 3243, 322733, 249003, 294069, 324790, 300215, 64699, 294075, 228541, 339131, 343230, 283841, 148674, 283846, 312519, 279752, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 279775, 304352, 339167, 310496, 298209, 304353, 279780, 228587, 279789, 290030, 302319, 234741, 316661, 230239, 283894, 208123, 292092, 279803, 228608, 234756, 322826, 242955, 312588, 177420, 318732, 126229, 318746, 320795, 320802, 130342, 304422, 130344, 130347, 292145, 298290, 208179, 312628, 345398, 300342, 159033, 222523, 286012, 181568, 279872, 279874, 300355, 193858, 294210, 300354, 372039, 304457, 345418, 230730, 337228, 296269, 222542, 224591, 234830, 238928, 296274, 331091, 150868, 314708, 283990, 318804, 357720, 300378, 300379, 316764, 294236, 292194, 230757, 281958, 134504, 306541, 284015, 234864, 296304, 312688, 327023, 316786, 230772, 327030, 314742, 310650, 290170, 224637, 306558, 337280, 306561, 243073, 314752, 179586, 290176, 294278, 296328, 296330, 304523, 368012, 298378, 318860, 9618, 279955, 306580, 112019, 224662, 234902, 282008, 314771, 318876, 282013, 290206, 343457, 148899, 298406, 282023, 245160, 279979, 279980, 241067, 314797, 286128, 173492, 286133, 279988, 284086, 259513, 310714, 302523, 228796, 284090, 54719, 302530, 280003, 228804, 292291, 306630, 310725, 300488, 415170, 306634, 300490, 310731, 339403, 302539, 337359, 329168, 312785, 222674, 329170, 280020, 310735, 234957, 280025, 310747, 239069, 144862, 286176, 187877, 310758, 320997, 280042, 280043, 191980, 300526, 329198, 337391, 282097, 296434, 308722, 191991, 40439, 286201, 300539, 288252, 210429, 359931, 312830, 290304, 245249, 228868, 292359, 218632, 302602, 323083, 230922, 294413, 359949, 304655, 323088, 329231, 282132, 302613, 230933, 282135, 316951, 374297, 175640, 302620, 222754, 313338, 306730, 312879, 230960, 288305, 290359, 239159, 323132, 235069, 157246, 288319, 288322, 280131, 349764, 310853, 282182, 124486, 288328, 292424, 292426, 286281, 194118, 333389, 224848, 349780, 224852, 290391, 128600, 235096, 239192, 196184, 306777, 212574, 345697, 204386, 300643, 300645, 282214, 312937, 204394, 224874, 243306, 312941, 138862, 206447, 310896, 314997, 294517, 290425, 288377, 339579, 337533, 325246, 333438, 235136, 280193, 282244, 239238, 288391, 282248, 286344, 323208, 179853, 286351, 188049, 229011, 239251, 280217, 323226, 179868, 229021, 302751, 198304, 282272, 245413, 282279, 298664, 298666, 317102, 286387, 300725, 286392, 300729, 302778, 306875, 280252, 280253, 282302, 323262, 286400, 321217, 296636, 280259, 323265, 282309, 319176, 239305, 280266, 296649, 306891, 212684, 302798, 9935, 241360, 282321, 313042, 286419, 333522, 241366, 280279, 282330, 18139, 294621, 280285, 282336, 325345, 294629, 153318, 337638, 333543, 12009, 181992, 282347, 288492, 282349, 34547, 67316, 323315, 286457, 284410, 313082, 200444, 288508, 282366, 286463, 319232, 288515, 249606, 280326, 282375, 284425, 300810, 282379, 216844, 116491, 284430, 300812, 280333, 161553, 124691, 284436, 278292, 278294, 282390, 116502, 118549, 321308, 321309, 341791, 282399, 282401, 339746, 241440, 186148, 186149, 216868, 241447, 315172, 333609, 280011, 294699, 284460, 286507, 280367, 300849, 282418, 280373, 282424, 280377, 319289, 321338, 282428, 280381, 345918, 413500, 241471, 280386, 325444, 280391, 153416, 315209, 325449, 159563, 280396, 307024, 325460, 237397, 341846, 18263, 317268, 241494, 188250, 307030, 284508, 300893, 307038, 370526, 237411, 284515, 276326, 282471, 296807, 292713, 282476, 292719, 313200, 296815, 325491, 313204, 317305, 124795, 317308, 339840, 315265, 280451, 325508, 188293, 327556, 282503, 67464, 333700, 305032, 325514, 350091, 350092, 315272, 311183, 315275, 243592, 184207, 124816, 282517, 294806, 350102, 214936, 294808, 337816, 239515, 124826, 333727, 298912, 319393, 214943, 294820, 118693, 219046, 333734, 284584, 294824, 313257, 298921, 292783, 126896, 200628, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 24531, 231382, 323554, 292835, 190437, 292838, 294887, 317416, 262953, 174058, 278507, 313322, 311277, 296942, 298987, 124912, 327666, 278515, 325620, 239610 ]
0ed8f908d7d3e350432f610a0e5d7598e7287c1c
d5a043b591df8adad6351a384f6a4cd78d5c7c77
/NSTrackingArea/ViewController.swift
996dacbb4663a4bd9e0db85072fbd6f360e5f186
[]
no_license
harryworld/HoverTableDemo-Swift
b98ae8a9ac4adc3fcc5d7e0faf3a2716265b2c1b
ca3a421bd60bf2345380ba45ccb1bbad467769c9
refs/heads/master
2021-01-10T11:37:00.754259
2016-01-12T08:58:59
2016-01-12T08:58:59
49,487,724
1
0
null
null
null
null
UTF-8
Swift
false
false
1,263
swift
// // ViewController.swift // NSTrackingArea // // Created by Harry Ng on 12/1/2016. // Copyright © 2016 STAY REAL. All rights reserved. // import Cocoa class ViewController: NSViewController { @IBOutlet weak var tableView: NSTableView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override var representedObject: AnyObject? { didSet { // Update the view, if already loaded. } } } extension ViewController: NSTableViewDelegate { func tableViewSelectionDidChange(notification: NSNotification) { tableView.enumerateAvailableRowViewsUsingBlock { (rowView, row) -> Void in if let cellView = rowView.viewAtColumn(0) as? NSTableCellView { if rowView.selected { cellView.textField?.stringValue = "Icon \(row)" cellView.textField?.font = NSFont.boldSystemFontOfSize((cellView.textField?.font!.pointSize)!) } else { } } } } } extension ViewController: NSTableViewDataSource { func numberOfRowsInTableView(tableView: NSTableView) -> Int { return 10 } }
[ -1 ]
11da908c9eeaad98d4e514dd97ca40875b45cf13
59c4fb9534542078883cab2ecdfbad8fec5a9586
/CustomTransition/CustomTransitionTests/CustomTransitionTests.swift
965b3986b8e701fb6cf2857170b7cb0f18a6f191
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
YukiMorishita/Hierarchical-transitions
ced0fe2ab2b768918e12b8ea01cb3582d205ee7c
8f89f67549ecf5369f85e9c68c013165d762e00e
refs/heads/master
2020-06-25T05:03:22.165290
2019-07-27T20:27:25
2019-07-27T20:27:25
199,209,426
0
0
null
null
null
null
UTF-8
Swift
false
false
929
swift
// // CustomTransitionTests.swift // CustomTransitionTests // // Created by admin on 2019/07/23. // Copyright © 2019 admin. All rights reserved. // import XCTest @testable import CustomTransition class CustomTransitionTests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 145435, 241692, 317467, 239650, 223268, 329765, 292902, 354343, 315432, 325674, 315434, 223274, 243759, 253999, 282672, 241716, 319542, 243767, 288828, 325694, 288833, 288834, 313416, 315465, 254027, 311372, 311374, 354385, 196691, 329814, 338007, 354393, 200794, 309345, 280675, 321637, 329829, 319591, 307301, 280677, 315498, 43110, 131178, 319598, 288879, 204916, 223350, 131191, 233590, 288889, 280694, 131198, 333955, 319629, 235662, 311438, 241808, 323729, 325776, 317587, 333991, 333992, 239793, 241843, 180408, 227513, 295098, 258239, 280768, 301251, 227524, 309444, 338119, 321745, 334042, 280795, 194782, 356576, 317664, 338150, 346346, 321772, 125169, 327929, 12542, 194820, 313608, 321800, 278797, 338197, 334103, 325912, 315673, 237856, 227616, 278816, 305440, 211235, 151847, 282919, 325931, 321840, 332083, 127284, 332085, 336183, 332089, 282939, 287041, 241986, 332101, 182598, 139589, 182597, 280902, 323916, 319821, 325968, 323920, 282960, 366929, 289110, 168281, 332123, 334171, 354655, 391520, 106847, 323935, 332127, 321894, 242023, 242029, 246127, 242033, 250226, 313713, 246136, 139640, 246137, 291192, 317820, 315773, 211326, 313727, 291198, 240002, 332167, 242058, 311691, 227725, 108944, 291224, 317852, 121245, 285084, 242078, 141728, 246178, 315810, 315811, 381347, 289189, 108972, 311727, 377264, 299441, 334260, 283064, 319930, 311738, 336317, 293310, 311745, 291265, 278978, 291267, 127427, 127428, 324039, 283075, 129483, 317901, 278989, 281037, 281040, 278993, 289232, 242139, 369116, 285150, 279008, 160225, 242148, 242149, 279013, 127465, 330218, 279018, 311786, 319981, 109042, 319987, 279029, 233978, 324097, 301571, 342536, 279050, 279062, 289304, 279065, 322078, 291358, 293419, 244269, 234036, 338490, 242237, 115270, 322120, 55881, 377418, 340558, 244310, 332378, 242277, 244327, 344680, 295536, 287346, 313971, 301689, 244347, 279164, 291454, 311941, 330379, 184973, 311949, 326287, 316049, 311954, 334481, 330387, 111253, 330388, 295576, 111258, 111259, 318107, 279206, 295599, 318130, 342706, 299699, 164533, 299700, 289462, 109241, 248517, 363211, 154316, 242386, 334547, 279252, 318173, 289502, 299746, 295652, 330474, 129773, 299759, 322291, 312052, 312053, 199414, 221948, 279294, 299776, 295682, 191235, 336648, 264968, 291592, 322313, 322316, 117517, 326414, 312079, 322319, 295697, 291604, 207640, 291612, 326429, 336671, 293664, 281377, 326433, 279336, 318250, 295724, 353069, 152365, 312108, 285487, 301871, 318252, 328499, 353078, 230199, 293693, 342847, 295746, 353094, 353095, 318278, 201549, 281427, 353109, 244568, 244570, 230234, 322395, 109409, 351077, 275303, 201577, 326505, 177001, 242541, 400239, 246641, 330609, 310131, 174963, 109428, 207732, 209783, 314239, 240518, 109447, 113542, 416646, 316298, 228233, 236428, 58253, 56208, 308112, 326553, 209817, 289690, 318364, 127902, 240544, 310182, 240552, 353195, 316333, 236461, 347055, 293806, 326581, 316343, 289722, 230332, 353215, 353216, 330689, 279498, 248796, 340961, 52200, 203757, 340974, 289774, 287731, 277492, 316405, 240630, 312314, 320507, 328700, 314362, 330754, 328706, 320516, 293893, 134150, 330763, 320527, 324625, 238610, 308243, 316437, 322582, 320536, 197657, 281626, 175132, 326685, 336929, 300068, 345132, 322612, 324666, 238651, 302139, 336960, 21569, 214086, 250956, 296019, 339030, 353367, 156764, 281697, 314467, 230499, 250981, 322663, 228458, 207979, 318572, 281706, 316526, 15471, 312434, 353397, 300150, 300151, 337017, 285820, 300158, 150657, 302213, 228491, 228493, 177296, 347283, 326804, 324760, 119962, 283802, 285851, 296092, 339102, 300188, 300202, 306346, 3246, 318639, 337077, 339130, 228540, 230588, 228542, 353479, 353480, 353481, 244940, 283853, 316627, 189652, 189653, 148696, 333022, 304351, 304356, 290022, 330984, 328940, 234733, 279792, 353523, 353524, 298228, 128251, 216315, 316669, 208124, 292091, 228609, 320770, 322824, 242954, 328971, 292107, 318733, 353551, 251153, 177428, 245019, 126237, 115998, 333090, 208164, 130348, 279854, 298291, 171317, 318775, 312634, 286013, 333117, 216386, 193859, 345415, 312648, 300359, 294218, 296273, 331090, 120148, 314709, 314710, 357719, 134491, 316765, 222559, 314720, 314726, 163175, 314728, 333160, 306542, 296303, 327024, 327025, 243056, 316787, 116084, 314741, 312689, 314739, 327031, 249204, 249205, 181625, 111993, 290169, 314751, 318848, 224640, 306560, 294275, 314758, 298374, 368011, 304524, 296335, 112017, 112018, 9619, 234898, 224661, 318875, 314783, 333220, 310692, 314791, 245161, 316842, 241066, 314798, 286129, 150965, 210358, 279989, 292283, 228795, 280004, 300487, 306631, 284107, 302540, 310732, 312782, 64975, 310736, 327121, 366037, 210392, 310748, 286172, 144867, 103909, 316902, 245223, 191981, 282096, 321009, 329200, 333300, 191990, 280055, 300536, 290301, 286205, 300542, 230913, 292356, 323080, 329225, 323087, 329232, 323089, 316946, 175639, 374296, 282141, 187938, 245287, 245292, 230959, 312880, 288309, 290358, 312889, 194110, 288318, 56902, 282183, 288327, 292423, 243274, 333388, 224847, 228943, 118353, 280147, 290390, 128599, 235095, 196187, 44635, 333408, 157281, 286306, 345700, 243307, 312940, 120427, 204397, 138863, 325231, 224883, 333430, 247416, 323196, 325245, 175741, 337535, 339584, 294529, 312965, 282246, 229001, 290443, 188048, 282259, 302739, 229020, 257699, 245412, 323236, 40613, 40614, 206504, 40615, 298661, 61101, 321199, 337591, 321207, 280251, 327358, 323263, 323264, 282303, 321219, 333509, 319177, 212685, 333517, 333520, 245457, 241361, 313041, 333521, 241365, 9936, 181975, 9937, 302802, 321247, 229088, 298720, 325346, 321249, 333542, 153319, 12010, 280300, 286459, 325371, 194303, 194304, 319233, 323331, 216839, 284431, 243472, 321295, 323346, 161554, 321302, 116505, 169754, 325404, 313120, 241441, 241442, 325410, 339745, 341796, 247590, 315171, 284459, 294700, 317232, 200498, 319292, 325439, 315202, 307011, 325445, 282438, 153415, 280392, 159562, 325457, 413521, 317269, 18262, 284507, 300894, 307039, 245599, 237408, 302946, 345955, 276327, 325484, 296814, 313199, 282480, 292720, 325492, 317304, 333688, 241528, 194429, 325503, 182144, 339841, 315264, 188292, 327557, 247686, 243591, 241540, 67463, 315273, 325515, 315274, 243597, 325518, 329622, 337815, 294807, 118685, 311199, 319392, 292771, 300963, 313254, 333735, 294823, 292782, 317360, 243637, 294843, 214977, 280514, 174019, 214984, 284619, 344013, 231375, 294886, 317415, 174057, 327661, 296941, 362480, 329712, 278512, 311281, 223218, 311282, 333817, 292858, 313339 ]
cb0fbb3b2a12f8c597378dc18ab326434fb89074
5626362fe4862b0056f6a506696de95489c8df6a
/Sources/Graphaello/Processing/Context/ContextElement.swift
eb23d4f40761bbb85565bd8a99b5c2d5c4b9d3d4
[ "MIT" ]
permissive
eliperkins/Graphaello
b37f35b5ef3448fdb8016052edf57b6d2b438165
a74aa71f194b45c6df56d6855649a088f6793523
refs/heads/master
2021-01-14T22:13:33.103836
2020-02-24T08:23:33
2020-02-24T08:23:33
242,776,087
0
0
MIT
2020-02-24T15:47:50
2020-02-24T15:47:49
null
UTF-8
Swift
false
false
462
swift
// // ContextElement.swift // // // Created by Mathias Quintero on 31.12.19. // import Foundation protocol ContextElement: ContextProtocol { static var key: Context.Key<Self> { get } } extension ContextElement { func merge(with context: Context) -> Context { return (Self.key ~> self).merge(with: context) } } extension Context { subscript<T: ContextElement>(type: T.Type) -> T { return self[type.key] } }
[ -1 ]
0dc5196486434db9d0f3502a9e56272898886277
7e875e50bd8e269ff5208d27ee5607d74868c74d
/WhatFlower/ViewController.swift
b225efb7128b20b832e4818f1bec80e717dc06b0
[]
no_license
mantonelli01a/WhatFlower
533304a4ccc2a0651178bb9606269e2cae5ff765
82596768db442955ab83026e900928ea4abb576c
refs/heads/master
2020-04-27T21:49:04.891387
2019-03-09T15:21:16
2019-03-09T15:21:16
174,713,024
0
0
null
null
null
null
UTF-8
Swift
false
false
362
swift
// // ViewController.swift // WhatFlower // // Created by Administrator on 09/03/2019. // Copyright © 2019 DoubleThunder. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } }
[ 374273, 327555, 334467, 350725, 240520, 333177, 316810, 312078, 329235, 317972, 409238, 316825, 318489, 324769, 172578, 326435, 396707, 241069, 241071, 322735, 244411, 294845, 266816, 354113, 219715, 313029, 323016, 353869, 437582, 346065, 146645, 320726, 320728, 328926, 313182, 359390, 316769, 412766, 353635, 315492, 326639, 311284, 343541, 435189, 323575, 316665, 415355, 351486 ]
a3282e24d8a0f4f7af9732e9f7272b393147e626
bcfa09a5462ea42aa8e959bdf68845dd69290482
/Tasheel/View/CollectionView/CategoryCell/CategoryCell.swift
71543dfb0da6d8b11dfea184b2ca506fe59619fc
[]
no_license
AhmedMostafaiOS/Tahseel
4cd06691b5606c868119c8287e54828865415b3e
8c87091dd10f73350a986fca743a7a374e5e8fec
refs/heads/master
2020-09-10T22:33:02.821636
2019-08-06T20:22:31
2019-08-06T20:22:31
null
0
0
null
null
null
null
UTF-8
Swift
false
false
533
swift
// // CategoryCell.swift // Tasheel // // Created by Abed Nayef Qasim on 8/4/19. // Copyright © 2019 Abed Nayef Qasim. All rights reserved. // import UIKit class CategoryCell: UICollectionViewCell { @IBOutlet weak var photoImageView: UIImageView! @IBOutlet weak var innerView: UIView! @IBOutlet weak var nameLabel: UILabel! func setup(image:UIImage , color:UIColor , name:String) { photoImageView.image = image innerView.backgroundColor = color nameLabel.text = name } }
[ -1 ]
d1886ee064853bc023d596f8ae189fc4b626a409
3e6859e2f9731e2a9c237e52a5caad56367d2d97
/Grocery Challenge/GroceryTableViewCell.swift
9ca671e006ea857f94c5df88bf80ed96f8b8d4ed
[]
no_license
Atish-v/QuestionsApp
31277528a12c5d79e3ab6c4a851db19af99a6a93
37c83a0a4b02aa1e9fa04ade02e9959c1c83388e
refs/heads/master
2020-05-17T03:21:26.311514
2019-04-25T17:07:37
2019-04-25T17:07:37
183,476,018
0
0
null
null
null
null
UTF-8
Swift
false
false
607
swift
// // GroceryTableViewCell.swift // Grocery Challenge // // Created by Sachin on 4/23/19. // Copyright © 2019 XYZ. All rights reserved. // import UIKit class GroceryTableViewCell: UITableViewCell { @IBOutlet weak var questionLabel: UILabel! @IBOutlet weak var answerImageView: UIImageView! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }
[ 159072, 317378, 301925, 293670, 217192, 300392, 242571, 249068, 306996, 314425, 322106, 280156 ]
ef1daef68e8f71c5003a5a833acba9044abb32fd
21a521d3f165e87dd9ebceabb9a58ff57569ca19
/procrastiBar.xcodeproj/ContentViewController.swift
5169dba9d1ccbafb2b398a92e02967a6c5aab161
[]
no_license
Gerungofulus/procrastiBar
793c70b6d27a485ca37692289d18e04890d3a03c
5d9982600d3eced49c3824199acb26486409600d
refs/heads/master
2021-01-19T11:08:36.641981
2017-04-11T12:07:15
2017-04-11T12:07:15
87,929,399
0
0
null
null
null
null
UTF-8
Swift
false
false
2,473
swift
import AppKit class ContentViewController : NSViewController { var textField : NSTextField! deinit { NSNotificationCenter.defaultCenter().removeObserver(self) } override func loadView() { view = NSView() view.translatesAutoresizingMaskIntoConstraints = false view.addConstraint(NSLayoutConstraint( item: view, attribute: .Width, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 1.0, constant: 280)) view.addConstraint(NSLayoutConstraint( item: view, attribute: .Height, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 1.0, constant: 70)) textField = NSTextField() textField.translatesAutoresizingMaskIntoConstraints = false textField.focusRingType = .None view.addSubview(textField) view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat( "H:|-(20)-[searchField]-(20)-|", options: NSLayoutFormatOptions(0), metrics: nil, views: ["searchField":textField])) view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat( "V:|-(20)-[searchField(==30)]", options: NSLayoutFormatOptions(0), metrics: nil, views: ["searchField":textField])) } override func viewDidLoad() { super.viewDidLoad() } override func viewWillAppear() { super.viewWillAppear() NSNotificationCenter.defaultCenter().addObserver(self, selector: "onTextChange:", name: NSControlTextDidEndEditingNotification, object: textField) self.textField.becomeFirstResponder() } override func viewDidAppear() { super.viewDidAppear() self.textField.becomeFirstResponder() } override func viewDidDisappear() { NSNotificationCenter.defaultCenter().removeObserver(self, name: NSControlTextDidEndEditingNotification, object: nil) self.textField.stringValue = "" } func onTextChange(note : NSNotification) { var text = textField.stringValue if(self.textField.stringValue != ""){ if let url = NSURL(string:self.textField.stringValue){ println("sending") NetworkHandler.sharedInstance.sendURL(url) } //NSLog("Search for %@", text) self.textField.stringValue = "" } } }
[ -1 ]
1590b899c54e1dd3da456978cb2239499979f7ef
c62336f316db8777078295579efa932087727598
/ORSampleSCorder/ViewControllers/FavoritesViewController.swift
7b33a242e30886e28bd434ebb369432b9f42a28b
[ "Apache-2.0" ]
permissive
samus/chuck_demo
79ac42dda4bc2ca9193e57a4e6b4a35e1f275eb4
598f71ec0af6296cd246cae8a3dbe9eb2c472e59
refs/heads/master
2020-03-25T01:33:41.517819
2018-08-03T03:51:52
2018-08-03T03:51:52
143,243,426
0
0
null
null
null
null
UTF-8
Swift
false
false
2,413
swift
// // FavoritesViewController.swift // ORSampleSCorder // // Created by Sam Corder on 8/2/18. // Copyright © 2018 Synapptic Labs. All rights reserved. // import UIKit import RxCocoa import RxSwift class FavoritesViewController: UIViewController, UICollectionViewDragDelegate { @IBOutlet weak var collectionView: UICollectionView! @IBOutlet weak var collectionViewLayout: UICollectionViewFlowLayout! var viewModel: FavoritesViewModel? let disposeBag = DisposeBag() override func viewDidLoad() { super.viewDidLoad() let vm = FavoritesViewModel() viewModel = vm vm.rows.bind(to: collectionView.rx.items(cellIdentifier: "jokecell", cellType: FavoriteCollectionViewCell.self)) { _, model, cell in cell.jokeLbl.text = model.text }.disposed(by: disposeBag) sizeLayout(size: self.view.frame.size) collectionView.dragDelegate = self } override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { coordinator.animate(alongsideTransition: { _ in self.sizeLayout(size: size) }, completion: nil) } func sizeLayout(size: CGSize) { let contentWidth = size.width - (collectionViewLayout.sectionInset.left - collectionViewLayout.sectionInset.right) let preferredWidth = contentWidth >= 300 ? 300 : contentWidth collectionViewLayout.itemSize = CGSize(width: preferredWidth, height: 300) let itemsPerRow = (size.width - size.width.truncatingRemainder(dividingBy: preferredWidth)) / preferredWidth let spacing = (size.width - (itemsPerRow * preferredWidth)) / (2 + (itemsPerRow - 1)) collectionViewLayout.sectionInset = UIEdgeInsets(top: spacing, left: spacing, bottom: spacing, right: spacing) collectionViewLayout.minimumInteritemSpacing = spacing - itemsPerRow collectionViewLayout.minimumLineSpacing = spacing } func collectionView(_ collectionView: UICollectionView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] { guard let cell = collectionView.cellForItem(at: indexPath) as? FavoriteCollectionViewCell else { return [] } guard let text = cell.jokeLbl.text else { return [] } let provider = NSItemProvider(object: text as NSString) return [UIDragItem(itemProvider: provider)] } }
[ -1 ]
97215c0524b3dd2faa7a571fb2baee7730f4abbe
ad8aab1b1084585e001d304f32ba166389bfa580
/Sources/XCBuildSupport/PIF.swift
6fcb64094e7c14a3e3684ede66001dbe3ac0c206
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference", "Swift-exception" ]
permissive
SDGGiesbrecht/swift-package-manager
0496b9ca70980a60457ec9e72920c4cfa1192868
aaa47e9798271d818cad88179b2b95ac87523b8b
refs/heads/master
2023-04-17T11:51:27.421660
2023-04-03T20:38:13
2023-04-03T20:38:13
182,166,277
3
0
Apache-2.0
2023-03-06T21:33:39
2019-04-18T22:35:46
Swift
UTF-8
Swift
false
false
52,415
swift
//===----------------------------------------------------------------------===// // // This source file is part of the Swift open source project // // Copyright (c) 2014-2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// import Basics import Foundation import TSCBasic import PackageModel /// The Project Interchange Format (PIF) is a structured representation of the /// project model created by clients (Xcode/SwiftPM) to send to XCBuild. /// /// The PIF is a representation of the project model describing the static /// objects which contribute to building products from the project, independent /// of "how" the user has chosen to build those products in any particular /// build. This information can be cached by XCBuild between builds (even /// between builds which use different schemes or configurations), and can be /// incrementally updated by clients when something changes. public enum PIF { /// This is used as part of the signature for the high-level PIF objects, to ensure that changes to the PIF schema /// are represented by the objects which do not use a content-based signature scheme (workspaces and projects, /// currently). static let schemaVersion = 11 /// The type used for identifying PIF objects. public typealias GUID = String /// The top-level PIF object. public struct TopLevelObject: Encodable { public let workspace: PIF.Workspace public init(workspace: PIF.Workspace) { self.workspace = workspace } public func encode(to encoder: Encoder) throws { var container = encoder.unkeyedContainer() // Encode the workspace. try container.encode(workspace) // Encode the projects and their targets. for project in workspace.projects { try container.encode(project) for target in project.targets { try container.encode(target) } } } } public class TypedObject: Codable { class var type: String { fatalError("\(self) missing implementation") } let type: String? fileprivate init() { type = Swift.type(of: self).type } private enum CodingKeys: CodingKey { case type } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(Swift.type(of: self).type, forKey: .type) } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) type = try container.decode(String.self, forKey: .type) } } public final class Workspace: TypedObject { override class var type: String { "workspace" } public let guid: GUID public var name: String public var path: AbsolutePath public var projects: [Project] var signature: String? public init(guid: GUID, name: String, path: AbsolutePath, projects: [Project]) { precondition(!guid.isEmpty) precondition(!name.isEmpty) precondition(Set(projects.map({ $0.guid })).count == projects.count) self.guid = guid self.name = name self.path = path self.projects = projects super.init() } private enum CodingKeys: CodingKey { case guid, name, path, projects, signature } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: StringKey.self) var contents = container.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid) try contents.encode(name, forKey: .name) try contents.encode(path, forKey: .path) if encoder.userInfo.keys.contains(.encodeForXCBuild) { guard let signature else { throw InternalError("Expected to have workspace signature when encoding for XCBuild") } try container.encode(signature, forKey: "signature") try contents.encode(projects.map({ $0.signature }), forKey: .projects) } else { try contents.encode(projects, forKey: .projects) } } public required init(from decoder: Decoder) throws { let superContainer = try decoder.container(keyedBy: StringKey.self) let container = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") let guidString = try container.decode(GUID.self, forKey: .guid) self.guid = String(guidString.dropLast("\(schemaVersion)".count + 1)) self.name = try container.decode(String.self, forKey: .name) self.path = try container.decode(AbsolutePath.self, forKey: .path) self.projects = try container.decode([Project].self, forKey: .projects) try super.init(from: decoder) } } /// A PIF project, consisting of a tree of groups and file references, a list of targets, and some additional /// information. public final class Project: TypedObject { override class var type: String { "project" } public let guid: GUID public var name: String public var path: AbsolutePath public var projectDirectory: AbsolutePath public var developmentRegion: String public var buildConfigurations: [BuildConfiguration] public var targets: [BaseTarget] public var groupTree: Group var signature: String? public init( guid: GUID, name: String, path: AbsolutePath, projectDirectory: AbsolutePath, developmentRegion: String, buildConfigurations: [BuildConfiguration], targets: [BaseTarget], groupTree: Group ) { precondition(!guid.isEmpty) precondition(!name.isEmpty) precondition(!developmentRegion.isEmpty) precondition(Set(targets.map({ $0.guid })).count == targets.count) precondition(Set(buildConfigurations.map({ $0.guid })).count == buildConfigurations.count) self.guid = guid self.name = name self.path = path self.projectDirectory = projectDirectory self.developmentRegion = developmentRegion self.buildConfigurations = buildConfigurations self.targets = targets self.groupTree = groupTree super.init() } private enum CodingKeys: CodingKey { case guid, projectName, projectIsPackage, path, projectDirectory, developmentRegion, defaultConfigurationName, buildConfigurations, targets, groupTree, signature } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: StringKey.self) var contents = container.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid) try contents.encode(name, forKey: .projectName) try contents.encode("true", forKey: .projectIsPackage) try contents.encode(path, forKey: .path) try contents.encode(projectDirectory, forKey: .projectDirectory) try contents.encode(developmentRegion, forKey: .developmentRegion) try contents.encode("Release", forKey: .defaultConfigurationName) try contents.encode(buildConfigurations, forKey: .buildConfigurations) if encoder.userInfo.keys.contains(.encodeForXCBuild) { guard let signature else { throw InternalError("Expected to have project signature when encoding for XCBuild") } try container.encode(signature, forKey: "signature") try contents.encode(targets.map{ $0.signature }, forKey: .targets) } else { try contents.encode(targets, forKey: .targets) } try contents.encode(groupTree, forKey: .groupTree) } public required init(from decoder: Decoder) throws { let superContainer = try decoder.container(keyedBy: StringKey.self) let container = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") let guidString = try container.decode(GUID.self, forKey: .guid) self.guid = String(guidString.dropLast("\(schemaVersion)".count + 1)) self.name = try container.decode(String.self, forKey: .projectName) self.path = try container.decode(AbsolutePath.self, forKey: .path) self.projectDirectory = try container.decode(AbsolutePath.self, forKey: .projectDirectory) self.developmentRegion = try container.decode(String.self, forKey: .developmentRegion) self.buildConfigurations = try container.decode([BuildConfiguration].self, forKey: .buildConfigurations) let untypedTargets = try container.decode([UntypedTarget].self, forKey: .targets) var targetContainer = try container.nestedUnkeyedContainer(forKey: .targets) self.targets = try untypedTargets.map { target in let type = target.contents.type switch type { case "aggregate": return try targetContainer.decode(AggregateTarget.self) case "standard", "packageProduct": return try targetContainer.decode(Target.self) default: throw InternalError("unknown target type \(type)") } } self.groupTree = try container.decode(Group.self, forKey: .groupTree) try super.init(from: decoder) } } /// Abstract base class for all items in the group hierarchy. public class Reference: TypedObject { /// Determines the base path for a reference's relative path. public enum SourceTree: String, Codable { /// Indicates that the path is relative to the source root (i.e. the "project directory"). case sourceRoot = "SOURCE_ROOT" /// Indicates that the path is relative to the path of the parent group. case group = "<group>" /// Indicates that the path is relative to the effective build directory (which varies depending on active /// scheme, active run destination, or even an overridden build setting. case builtProductsDir = "BUILT_PRODUCTS_DIR" /// Indicates that the path is an absolute path. case absolute = "<absolute>" } public let guid: GUID /// Relative path of the reference. It is usually a literal, but may in fact contain build settings. public var path: String /// Determines the base path for the reference's relative path. public var sourceTree: SourceTree /// Name of the reference, if different from the last path component (if not set, the last path component will /// be used as the name). public var name: String? fileprivate init( guid: GUID, path: String, sourceTree: SourceTree, name: String? ) { precondition(!guid.isEmpty) precondition(!(name?.isEmpty ?? false)) self.guid = guid self.path = path self.sourceTree = sourceTree self.name = name super.init() } private enum CodingKeys: CodingKey { case guid, sourceTree, path, name, type } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(guid, forKey: .guid) try container.encode(sourceTree, forKey: .sourceTree) try container.encode(path, forKey: .path) try container.encode(name ?? path, forKey: .name) } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.guid = try container.decode(String.self, forKey: .guid) self.sourceTree = try container.decode(SourceTree.self, forKey: .sourceTree) self.path = try container.decode(String.self, forKey: .path) self.name = try container.decodeIfPresent(String.self, forKey: .name) try super.init(from: decoder) } } /// A reference to a file system entity (a file, folder, etc). public final class FileReference: Reference { override class var type: String { "file" } public var fileType: String public init( guid: GUID, path: String, sourceTree: SourceTree = .group, name: String? = nil, fileType: String? = nil ) { self.fileType = fileType ?? FileReference.fileTypeIdentifier(forPath: path) super.init(guid: guid, path: path, sourceTree: sourceTree, name: name) } private enum CodingKeys: CodingKey { case fileType } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(fileType, forKey: .fileType) } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.fileType = try container.decode(String.self, forKey: .fileType) try super.init(from: decoder) } } /// A group that can contain References (FileReferences and other Groups). The resolved path of a group is used as /// the base path for any child references whose source tree type is GroupRelative. public final class Group: Reference { override class var type: String { "group" } public var children: [Reference] public init( guid: GUID, path: String, sourceTree: SourceTree = .group, name: String? = nil, children: [Reference] ) { precondition( Set(children.map({ $0.guid })).count == children.count, "multiple group children with the same guid: \(children.map({ $0.guid }))" ) self.children = children super.init(guid: guid, path: path, sourceTree: sourceTree, name: name) } private enum CodingKeys: CodingKey { case children, type } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(children, forKey: .children) } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) let untypedChildren = try container.decode([TypedObject].self, forKey: .children) var childrenContainer = try container.nestedUnkeyedContainer(forKey: .children) self.children = try untypedChildren.map { child in switch child.type { case Group.type: return try childrenContainer.decode(Group.self) case FileReference.type: return try childrenContainer.decode(FileReference.self) default: throw InternalError("unknown reference type \(child.type ?? "<nil>")") } } try super.init(from: decoder) } } /// Represents a dependency on another target (identified by its PIF GUID). public struct TargetDependency: Codable { /// Identifier of depended-upon target. public var targetGUID: String /// The platform filters for this target dependency. public var platformFilters: [PlatformFilter] public init(targetGUID: String, platformFilters: [PlatformFilter] = []) { self.targetGUID = targetGUID self.platformFilters = platformFilters } private enum CodingKeys: CodingKey { case guid, platformFilters } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode("\(targetGUID)@\(schemaVersion)", forKey: .guid) if !platformFilters.isEmpty { try container.encode(platformFilters, forKey: .platformFilters) } } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) let targetGUIDString = try container.decode(String.self, forKey: .guid) self.targetGUID = String(targetGUIDString.dropLast("\(schemaVersion)".count + 1)) platformFilters = try container.decodeIfPresent([PlatformFilter].self, forKey: .platformFilters) ?? [] } } public class BaseTarget: TypedObject { class override var type: String { "target" } public let guid: GUID public var name: String public var buildConfigurations: [BuildConfiguration] public var buildPhases: [BuildPhase] public var dependencies: [TargetDependency] public var impartedBuildProperties: ImpartedBuildProperties var signature: String? fileprivate init( guid: GUID, name: String, buildConfigurations: [BuildConfiguration], buildPhases: [BuildPhase], dependencies: [TargetDependency], impartedBuildSettings: PIF.BuildSettings, signature: String? ) { self.guid = guid self.name = name self.buildConfigurations = buildConfigurations self.buildPhases = buildPhases self.dependencies = dependencies impartedBuildProperties = ImpartedBuildProperties(settings: impartedBuildSettings) self.signature = signature super.init() } public required init(from decoder: Decoder) throws { throw InternalError("init(from:) has not been implemented") } } public final class AggregateTarget: BaseTarget { public init( guid: GUID, name: String, buildConfigurations: [BuildConfiguration], buildPhases: [BuildPhase], dependencies: [TargetDependency], impartedBuildSettings: PIF.BuildSettings ) { super.init( guid: guid, name: name, buildConfigurations: buildConfigurations, buildPhases: buildPhases, dependencies: dependencies, impartedBuildSettings: impartedBuildSettings, signature: nil ) } private enum CodingKeys: CodingKey { case type, guid, name, buildConfigurations, buildPhases, dependencies, impartedBuildProperties, signature } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: StringKey.self) var contents = container.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") try contents.encode("aggregate", forKey: .type) try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid) try contents.encode(name, forKey: .name) try contents.encode(buildConfigurations, forKey: .buildConfigurations) try contents.encode(buildPhases, forKey: .buildPhases) try contents.encode(dependencies, forKey: .dependencies) try contents.encode(impartedBuildProperties, forKey: .impartedBuildProperties) if encoder.userInfo.keys.contains(.encodeForXCBuild) { guard let signature else { throw InternalError("Expected to have \(Swift.type(of: self)) signature when encoding for XCBuild") } try container.encode(signature, forKey: "signature") } } public required init(from decoder: Decoder) throws { let superContainer = try decoder.container(keyedBy: StringKey.self) let container = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") let guidString = try container.decode(GUID.self, forKey: .guid) let guid = String(guidString.dropLast("\(schemaVersion)".count + 1)) let name = try container.decode(String.self, forKey: .name) let buildConfigurations = try container.decode([BuildConfiguration].self, forKey: .buildConfigurations) let untypedBuildPhases = try container.decode([TypedObject].self, forKey: .buildPhases) var buildPhasesContainer = try container.nestedUnkeyedContainer(forKey: .buildPhases) let buildPhases: [BuildPhase] = try untypedBuildPhases.map { guard let type = $0.type else { throw InternalError("Expected type in build phase \($0)") } return try BuildPhase.decode(container: &buildPhasesContainer, type: type) } let dependencies = try container.decode([TargetDependency].self, forKey: .dependencies) let impartedBuildProperties = try container.decode(BuildSettings.self, forKey: .impartedBuildProperties) super.init( guid: guid, name: name, buildConfigurations: buildConfigurations, buildPhases: buildPhases, dependencies: dependencies, impartedBuildSettings: impartedBuildProperties, signature: nil ) } } /// An Xcode target, representing a single entity to build. public final class Target: BaseTarget { public enum ProductType: String, Codable { case application = "com.apple.product-type.application" case staticArchive = "com.apple.product-type.library.static" case objectFile = "com.apple.product-type.objfile" case dynamicLibrary = "com.apple.product-type.library.dynamic" case framework = "com.apple.product-type.framework" case executable = "com.apple.product-type.tool" case unitTest = "com.apple.product-type.bundle.unit-test" case bundle = "com.apple.product-type.bundle" case packageProduct = "packageProduct" } public var productName: String public var productType: ProductType public init( guid: GUID, name: String, productType: ProductType, productName: String, buildConfigurations: [BuildConfiguration], buildPhases: [BuildPhase], dependencies: [TargetDependency], impartedBuildSettings: PIF.BuildSettings ) { self.productType = productType self.productName = productName super.init( guid: guid, name: name, buildConfigurations: buildConfigurations, buildPhases: buildPhases, dependencies: dependencies, impartedBuildSettings: impartedBuildSettings, signature: nil ) } private enum CodingKeys: CodingKey { case guid, name, dependencies, buildConfigurations, type, frameworksBuildPhase, productTypeIdentifier, productReference, buildRules, buildPhases, impartedBuildProperties, signature } override public func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: StringKey.self) var contents = container.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid) try contents.encode(name, forKey: .name) try contents.encode(dependencies, forKey: .dependencies) try contents.encode(buildConfigurations, forKey: .buildConfigurations) if encoder.userInfo.keys.contains(.encodeForXCBuild) { guard let signature else { throw InternalError("Expected to have \(Swift.type(of: self)) signature when encoding for XCBuild") } try container.encode(signature, forKey: "signature") } if productType == .packageProduct { try contents.encode("packageProduct", forKey: .type) // Add the framework build phase, if present. if let phase = buildPhases.first as? PIF.FrameworksBuildPhase { try contents.encode(phase, forKey: .frameworksBuildPhase) } } else { try contents.encode("standard", forKey: .type) try contents.encode(productType, forKey: .productTypeIdentifier) let productReference = [ "type": "file", "guid": "PRODUCTREF-\(guid)", "name": productName, ] try contents.encode(productReference, forKey: .productReference) try contents.encode([String](), forKey: .buildRules) try contents.encode(buildPhases, forKey: .buildPhases) try contents.encode(impartedBuildProperties, forKey: .impartedBuildProperties) } } public required init(from decoder: Decoder) throws { let superContainer = try decoder.container(keyedBy: StringKey.self) let container = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: "contents") let guidString = try container.decode(GUID.self, forKey: .guid) let guid = String(guidString.dropLast("\(schemaVersion)".count + 1)) let name = try container.decode(String.self, forKey: .name) let buildConfigurations = try container.decode([BuildConfiguration].self, forKey: .buildConfigurations) let dependencies = try container.decode([TargetDependency].self, forKey: .dependencies) let type = try container.decode(String.self, forKey: .type) let buildPhases: [BuildPhase] let impartedBuildProperties: ImpartedBuildProperties if type == "packageProduct" { self.productType = .packageProduct self.productName = "" let fwkBuildPhase = try container.decodeIfPresent(FrameworksBuildPhase.self, forKey: .frameworksBuildPhase) buildPhases = fwkBuildPhase.map{ [$0] } ?? [] impartedBuildProperties = ImpartedBuildProperties(settings: BuildSettings()) } else if type == "standard" { self.productType = try container.decode(ProductType.self, forKey: .productTypeIdentifier) let productReference = try container.decode([String: String].self, forKey: .productReference) self.productName = productReference["name"]! let untypedBuildPhases = try container.decodeIfPresent([TypedObject].self, forKey: .buildPhases) ?? [] var buildPhasesContainer = try container.nestedUnkeyedContainer(forKey: .buildPhases) buildPhases = try untypedBuildPhases.map { guard let type = $0.type else { throw InternalError("Expected type in build phase \($0)") } return try BuildPhase.decode(container: &buildPhasesContainer, type: type) } impartedBuildProperties = try container.decode(ImpartedBuildProperties.self, forKey: .impartedBuildProperties) } else { throw InternalError("Unhandled target type \(type)") } super.init( guid: guid, name: name, buildConfigurations: buildConfigurations, buildPhases: buildPhases, dependencies: dependencies, impartedBuildSettings: impartedBuildProperties.buildSettings, signature: nil ) } } /// Abstract base class for all build phases in a target. public class BuildPhase: TypedObject { static func decode(container: inout UnkeyedDecodingContainer, type: String) throws -> BuildPhase { switch type { case HeadersBuildPhase.type: return try container.decode(HeadersBuildPhase.self) case SourcesBuildPhase.type: return try container.decode(SourcesBuildPhase.self) case FrameworksBuildPhase.type: return try container.decode(FrameworksBuildPhase.self) case ResourcesBuildPhase.type: return try container.decode(ResourcesBuildPhase.self) default: throw InternalError("unknown build phase \(type)") } } public let guid: GUID public var buildFiles: [BuildFile] public init(guid: GUID, buildFiles: [BuildFile]) { precondition(!guid.isEmpty) self.guid = guid self.buildFiles = buildFiles super.init() } private enum CodingKeys: CodingKey { case guid, buildFiles } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(guid, forKey: .guid) try container.encode(buildFiles, forKey: .buildFiles) } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.guid = try container.decode(GUID.self, forKey: .guid) self.buildFiles = try container.decode([BuildFile].self, forKey: .buildFiles) try super.init(from: decoder) } } /// A "headers" build phase, i.e. one that copies headers into a directory of the product, after suitable /// processing. public final class HeadersBuildPhase: BuildPhase { override class var type: String { "com.apple.buildphase.headers" } } /// A "sources" build phase, i.e. one that compiles sources and provides them to be linked into the executable code /// of the product. public final class SourcesBuildPhase: BuildPhase { override class var type: String { "com.apple.buildphase.sources" } } /// A "frameworks" build phase, i.e. one that links compiled code and libraries into the executable of the product. public final class FrameworksBuildPhase: BuildPhase { override class var type: String { "com.apple.buildphase.frameworks" } } public final class ResourcesBuildPhase: BuildPhase { override class var type: String { "com.apple.buildphase.resources" } } /// A build file, representing the membership of either a file or target product reference in a build phase. public struct BuildFile: Codable { public enum Reference { case file(guid: PIF.GUID) case target(guid: PIF.GUID) } public enum HeaderVisibility: String, Codable { case `public` = "public" case `private` = "private" } public let guid: GUID public var reference: Reference public var headerVisibility: HeaderVisibility? = nil public var platformFilters: [PlatformFilter] public init(guid: GUID, file: FileReference, platformFilters: [PlatformFilter], headerVisibility: HeaderVisibility? = nil) { self.guid = guid self.reference = .file(guid: file.guid) self.platformFilters = platformFilters self.headerVisibility = headerVisibility } public init(guid: GUID, fileGUID: PIF.GUID, platformFilters: [PlatformFilter], headerVisibility: HeaderVisibility? = nil) { self.guid = guid self.reference = .file(guid: fileGUID) self.platformFilters = platformFilters self.headerVisibility = headerVisibility } public init(guid: GUID, target: PIF.BaseTarget, platformFilters: [PlatformFilter], headerVisibility: HeaderVisibility? = nil) { self.guid = guid self.reference = .target(guid: target.guid) self.platformFilters = platformFilters self.headerVisibility = headerVisibility } public init(guid: GUID, targetGUID: PIF.GUID, platformFilters: [PlatformFilter], headerVisibility: HeaderVisibility? = nil) { self.guid = guid self.reference = .target(guid: targetGUID) self.platformFilters = platformFilters self.headerVisibility = headerVisibility } public init(guid: GUID, reference: Reference, platformFilters: [PlatformFilter], headerVisibility: HeaderVisibility? = nil) { self.guid = guid self.reference = reference self.platformFilters = platformFilters self.headerVisibility = headerVisibility } private enum CodingKeys: CodingKey { case guid, platformFilters, fileReference, targetReference, headerVisibility } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(guid, forKey: .guid) try container.encode(platformFilters, forKey: .platformFilters) try container.encodeIfPresent(headerVisibility, forKey: .headerVisibility) switch self.reference { case .file(let fileGUID): try container.encode(fileGUID, forKey: .fileReference) case .target(let targetGUID): try container.encode("\(targetGUID)@\(schemaVersion)", forKey: .targetReference) } } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) guid = try container.decode(GUID.self, forKey: .guid) platformFilters = try container.decode([PlatformFilter].self, forKey: .platformFilters) headerVisibility = try container.decodeIfPresent(HeaderVisibility.self, forKey: .headerVisibility) if container.allKeys.contains(.fileReference) { reference = try .file(guid: container.decode(GUID.self, forKey: .fileReference)) } else if container.allKeys.contains(.targetReference) { let targetGUIDString = try container.decode(GUID.self, forKey: .targetReference) let targetGUID = String(targetGUIDString.dropLast("\(schemaVersion)".count + 1)) reference = .target(guid: targetGUID) } else { throw InternalError("Expected \(CodingKeys.fileReference) or \(CodingKeys.targetReference) in the keys") } } } /// Represents a generic platform filter. public struct PlatformFilter: Codable, Equatable { /// The name of the platform (`LC_BUILD_VERSION`). /// /// Example: macos, ios, watchos, tvos. public var platform: String /// The name of the environment (`LC_BUILD_VERSION`) /// /// Example: simulator, maccatalyst. public var environment: String public init(platform: String, environment: String = "") { self.platform = platform self.environment = environment } } /// A build configuration, which is a named collection of build settings. public struct BuildConfiguration: Codable { public let guid: GUID public var name: String public var buildSettings: BuildSettings public let impartedBuildProperties: ImpartedBuildProperties public init(guid: GUID, name: String, buildSettings: BuildSettings, impartedBuildProperties: ImpartedBuildProperties = ImpartedBuildProperties(settings: BuildSettings())) { precondition(!guid.isEmpty) precondition(!name.isEmpty) self.guid = guid self.name = name self.buildSettings = buildSettings self.impartedBuildProperties = impartedBuildProperties } } public struct ImpartedBuildProperties: Codable { public var buildSettings: BuildSettings public init(settings: BuildSettings) { self.buildSettings = settings } } /// A set of build settings, which is represented as a struct of optional build settings. This is not optimally /// efficient, but it is great for code completion and type-checking. public struct BuildSettings: Codable { public enum SingleValueSetting: String, Codable { case APPLICATION_EXTENSION_API_ONLY case BUILT_PRODUCTS_DIR case CLANG_CXX_LANGUAGE_STANDARD case CLANG_ENABLE_MODULES case CLANG_ENABLE_OBJC_ARC case CODE_SIGNING_REQUIRED case CODE_SIGN_IDENTITY case COMBINE_HIDPI_IMAGES case COPY_PHASE_STRIP case DEBUG_INFORMATION_FORMAT case DEFINES_MODULE case DRIVERKIT_DEPLOYMENT_TARGET case DYLIB_INSTALL_NAME_BASE case EMBEDDED_CONTENT_CONTAINS_SWIFT case ENABLE_NS_ASSERTIONS case ENABLE_TESTABILITY case ENABLE_TESTING_SEARCH_PATHS case ENTITLEMENTS_REQUIRED case EXECUTABLE_NAME case GENERATE_INFOPLIST_FILE case GCC_C_LANGUAGE_STANDARD case GCC_OPTIMIZATION_LEVEL case GENERATE_MASTER_OBJECT_FILE case INFOPLIST_FILE case IPHONEOS_DEPLOYMENT_TARGET case KEEP_PRIVATE_EXTERNS case CLANG_COVERAGE_MAPPING_LINKER_ARGS case MACH_O_TYPE case MACOSX_DEPLOYMENT_TARGET case MODULEMAP_FILE case MODULEMAP_FILE_CONTENTS case MODULEMAP_PATH case MODULE_CACHE_DIR case ONLY_ACTIVE_ARCH case PACKAGE_RESOURCE_BUNDLE_NAME case PACKAGE_RESOURCE_TARGET_KIND case PRODUCT_BUNDLE_IDENTIFIER case PRODUCT_MODULE_NAME case PRODUCT_NAME case PROJECT_NAME case SDKROOT case SDK_VARIANT case SKIP_INSTALL case INSTALL_PATH case SUPPORTS_MACCATALYST case SWIFT_SERIALIZE_DEBUGGING_OPTIONS case SWIFT_FORCE_STATIC_LINK_STDLIB case SWIFT_FORCE_DYNAMIC_LINK_STDLIB case SWIFT_INSTALL_OBJC_HEADER case SWIFT_OBJC_INTERFACE_HEADER_NAME case SWIFT_OBJC_INTERFACE_HEADER_DIR case SWIFT_OPTIMIZATION_LEVEL case SWIFT_VERSION case TARGET_NAME case TARGET_BUILD_DIR case TVOS_DEPLOYMENT_TARGET case USE_HEADERMAP case USES_SWIFTPM_UNSAFE_FLAGS case WATCHOS_DEPLOYMENT_TARGET case MARKETING_VERSION case CURRENT_PROJECT_VERSION case SWIFT_EMIT_MODULE_INTERFACE } public enum MultipleValueSetting: String, Codable { case EMBED_PACKAGE_RESOURCE_BUNDLE_NAMES case FRAMEWORK_SEARCH_PATHS case GCC_PREPROCESSOR_DEFINITIONS case HEADER_SEARCH_PATHS case LD_RUNPATH_SEARCH_PATHS case LIBRARY_SEARCH_PATHS case OTHER_CFLAGS case OTHER_CPLUSPLUSFLAGS case OTHER_LDFLAGS case OTHER_LDRFLAGS case OTHER_SWIFT_FLAGS case PRELINK_FLAGS case SPECIALIZATION_SDK_OPTIONS case SUPPORTED_PLATFORMS case SWIFT_ACTIVE_COMPILATION_CONDITIONS case SWIFT_MODULE_ALIASES } public enum Platform: String, CaseIterable, Codable { case macOS = "macos" case macCatalyst = "maccatalyst" case iOS = "ios" case tvOS = "tvos" case watchOS = "watchos" case driverKit = "driverkit" case linux public var packageModelPlatform: PackageModel.Platform { switch self { case .macOS: return .macOS case .macCatalyst: return .macCatalyst case .iOS: return .iOS case .tvOS: return .tvOS case .watchOS: return .watchOS case .driverKit: return .driverKit case .linux: return .linux } } public var conditions: [String] { let filters = [PlatformsCondition(platforms: [packageModelPlatform])].toPlatformFilters().map { (filter: PIF.PlatformFilter) -> String in if filter.environment.isEmpty { return filter.platform } else { return "\(filter.platform)-\(filter.environment)" } }.sorted() return ["__platform_filter=\(filters.joined(separator: ";"))"] } } public private(set) var platformSpecificSingleValueSettings = [Platform: [SingleValueSetting: String]]() public private(set) var platformSpecificMultipleValueSettings = [Platform: [MultipleValueSetting: [String]]]() public private(set) var singleValueSettings: [SingleValueSetting: String] = [:] public private(set) var multipleValueSettings: [MultipleValueSetting: [String]] = [:] public subscript(_ setting: SingleValueSetting) -> String? { get { singleValueSettings[setting] } set { singleValueSettings[setting] = newValue } } public subscript(_ setting: SingleValueSetting, for platform: Platform) -> String? { get { platformSpecificSingleValueSettings[platform]?[setting] } set { platformSpecificSingleValueSettings[platform, default: [:]][setting] = newValue } } public subscript(_ setting: SingleValueSetting, default defaultValue: @autoclosure () -> String) -> String { get { singleValueSettings[setting, default: defaultValue()] } set { singleValueSettings[setting] = newValue } } public subscript(_ setting: MultipleValueSetting) -> [String]? { get { multipleValueSettings[setting] } set { multipleValueSettings[setting] = newValue } } public subscript(_ setting: MultipleValueSetting, for platform: Platform) -> [String]? { get { platformSpecificMultipleValueSettings[platform]?[setting] } set { platformSpecificMultipleValueSettings[platform, default: [:]][setting] = newValue } } public subscript( _ setting: MultipleValueSetting, default defaultValue: @autoclosure () -> [String] ) -> [String] { get { multipleValueSettings[setting, default: defaultValue()] } set { multipleValueSettings[setting] = newValue } } public subscript( _ setting: MultipleValueSetting, for platform: Platform, default defaultValue: @autoclosure () -> [String] ) -> [String] { get { platformSpecificMultipleValueSettings[platform, default: [:]][setting, default: defaultValue()] } set { platformSpecificMultipleValueSettings[platform, default: [:]][setting] = newValue } } public init() { } private enum CodingKeys: CodingKey { case platformSpecificSingleValueSettings, platformSpecificMultipleValueSettings, singleValueSettings, multipleValueSettings } public func encode(to encoder: Encoder) throws { if encoder.userInfo.keys.contains(.encodeForXCBuild) { return try encodeForXCBuild(to: encoder) } var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(platformSpecificSingleValueSettings, forKey: .platformSpecificSingleValueSettings) try container.encode(platformSpecificMultipleValueSettings, forKey: .platformSpecificMultipleValueSettings) try container.encode(singleValueSettings, forKey: .singleValueSettings) try container.encode(multipleValueSettings, forKey: .multipleValueSettings) } private func encodeForXCBuild(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringKey.self) for (key, value) in singleValueSettings { try container.encode(value, forKey: StringKey(key.rawValue)) } for (key, value) in multipleValueSettings { try container.encode(value, forKey: StringKey(key.rawValue)) } for (platform, values) in platformSpecificSingleValueSettings { for condition in platform.conditions { for (key, value) in values { try container.encode(value, forKey: "\(key.rawValue)[\(condition)]") } } } for (platform, values) in platformSpecificMultipleValueSettings { for condition in platform.conditions { for (key, value) in values { try container.encode(value, forKey: "\(key.rawValue)[\(condition)]") } } } } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) platformSpecificSingleValueSettings = try container.decodeIfPresent([Platform: [SingleValueSetting: String]].self, forKey: .platformSpecificSingleValueSettings) ?? .init() platformSpecificMultipleValueSettings = try container.decodeIfPresent([Platform: [MultipleValueSetting: [String]]].self, forKey: .platformSpecificMultipleValueSettings) ?? .init() singleValueSettings = try container.decodeIfPresent([SingleValueSetting: String].self, forKey: .singleValueSettings) ?? [:] multipleValueSettings = try container.decodeIfPresent([MultipleValueSetting: [String]] .self, forKey: .multipleValueSettings) ?? [:] } } } /// Represents a filetype recognized by the Xcode build system. public struct XCBuildFileType: CaseIterable { public static let xcdatamodeld: XCBuildFileType = XCBuildFileType( fileType: "xcdatamodeld", fileTypeIdentifier: "wrapper.xcdatamodeld" ) public static let xcdatamodel: XCBuildFileType = XCBuildFileType( fileType: "xcdatamodel", fileTypeIdentifier: "wrapper.xcdatamodel" ) public static let xcmappingmodel: XCBuildFileType = XCBuildFileType( fileType: "xcmappingmodel", fileTypeIdentifier: "wrapper.xcmappingmodel" ) public static let allCases: [XCBuildFileType] = [ .xcdatamodeld, .xcdatamodel, .xcmappingmodel, ] public let fileTypes: Set<String> public let fileTypeIdentifier: String private init(fileTypes: Set<String>, fileTypeIdentifier: String) { self.fileTypes = fileTypes self.fileTypeIdentifier = fileTypeIdentifier } private init(fileType: String, fileTypeIdentifier: String) { self.init(fileTypes: [fileType], fileTypeIdentifier: fileTypeIdentifier) } } struct StringKey: CodingKey, ExpressibleByStringInterpolation { var stringValue: String var intValue: Int? init(stringLiteral stringValue: String) { self.stringValue = stringValue } init(stringValue value: String) { self.stringValue = value } init(_ value: String) { self.stringValue = value } init?(intValue: Int) { assertionFailure("does not support integer keys") return nil } } extension PIF.FileReference { fileprivate static func fileTypeIdentifier(forPath path: String) -> String { let pathExtension: String? if let path = try? AbsolutePath(validating: path) { pathExtension = path.extension } else if let path = try? RelativePath(validating: path) { pathExtension = path.extension } else { pathExtension = nil } switch pathExtension { case "a": return "archive.ar" case "s", "S": return "sourcecode.asm" case "c": return "sourcecode.c.c" case "cl": return "sourcecode.opencl" case "cpp", "cp", "cxx", "cc", "c++", "C", "tcc": return "sourcecode.cpp.cpp" case "d": return "sourcecode.dtrace" case "defs", "mig": return "sourcecode.mig" case "m": return "sourcecode.c.objc" case "mm", "M": return "sourcecode.cpp.objcpp" case "metal": return "sourcecode.metal" case "l", "lm", "lmm", "lpp", "lp", "lxx": return "sourcecode.lex" case "swift": return "sourcecode.swift" case "y", "ym", "ymm", "ypp", "yp", "yxx": return "sourcecode.yacc" case "xcassets": return "folder.assetcatalog" case "storyboard": return "file.storyboard" case "xib": return "file.xib" case "xcframework": return "wrapper.xcframework" default: return pathExtension.flatMap({ pathExtension in XCBuildFileType.allCases.first(where:{ $0.fileTypes.contains(pathExtension) }) })?.fileTypeIdentifier ?? "file" } } } extension CodingUserInfoKey { public static let encodingPIFSignature: CodingUserInfoKey = CodingUserInfoKey(rawValue: "encodingPIFSignature")! /// Perform the encoding for XCBuild consumption. public static let encodeForXCBuild: CodingUserInfoKey = CodingUserInfoKey(rawValue: "encodeForXCBuild")! } private struct UntypedTarget: Decodable { struct TargetContents: Decodable { let type: String } let contents: TargetContents } protocol PIFSignableObject: AnyObject { var signature: String? { get set } } extension PIF.Workspace: PIFSignableObject {} extension PIF.Project: PIFSignableObject {} extension PIF.BaseTarget: PIFSignableObject {} extension PIF { /// Add signature to workspace and its subobjects. public static func sign(_ workspace: PIF.Workspace) throws { let encoder = JSONEncoder.makeWithDefaults() func sign<T: PIFSignableObject & Encodable>(_ obj: T) throws { let signatureContent = try encoder.encode(obj) let bytes = ByteString(signatureContent) obj.signature = bytes.sha256Checksum } let projects = workspace.projects try projects.flatMap{ $0.targets }.forEach(sign) try projects.forEach(sign) try sign(workspace) } }
[ -1 ]
cfc0ef7fb9d42d2ef744fc83291889b87aa6f9ed
118090067d14c54de05e0847a160fbfd2fe9b823
/SampleProject/Classes/Models/SampleMessageModel.swift
2f0e853993f2f33ca68ec131ffaf3d5cedfc3067
[]
no_license
mookyjan/street
ca99c1abea1c87e48cc903437e108197d7365434
0d7177bb8cdbfe286c1f1c22072cb048f25fe904
refs/heads/master
2021-01-19T11:17:36.659725
2017-04-11T16:03:13
2017-04-11T16:03:13
87,952,477
0
0
null
null
null
null
UTF-8
Swift
false
false
2,509
swift
// // SampleMessageModel.swift // SwiftSample // // Created by Waris Shams on 05/09/2016. // Copyright © 2016 DevBatch. All rights reserved. // //import UIKit // //class SampleMessageModel: NSObject { // // var message_type : String // var id : Int // var body : String // var sender_id: String // var receiver_id :String // // init(messageType: String, id: Int, body : String, sender_id: String, receiver_id :String) { // self.message_type = messageType // self.id = id // self.body = body // self.sender_id = sender_id // self.receiver_id = receiver_id // } // // class func getModelObjectWithDictionary(dictionary : NSDictionary) -> ZWMessageModel{ // let message_type = dictionary.objectForKey("message_type") as! String // let id = dictionary.objectForKey("id") as! Int // let body = dictionary.objectForKey("body") as! String // let sender_id = dictionary.objectForKey("sender_id") as! String // let receiver_id = dictionary.objectForKey("receiver_id") as! String // // let modelObject = SampleMessageModel.init(messageType: message_type, id: id, body: body, sender_id: sender_id, receiver_id: receiver_id) // return modelObject // } // // required init?(coder aDecoder: NSCoder) { // // super.init(coder:) is optional, see notes below // self.message_type = aDecoder.decodeObjectForKey("message_type") as! String // self.id = aDecoder.decodeIntegerForKey("id") // self.body = aDecoder.decodeObjectForKey("body") as! String // self.sender_id = aDecoder.decodeObjectForKey("sender_id") as! String // self.receiver_id = aDecoder.decodeObjectForKey("receiver_id") as! String // } // // func encodeWithCoder(aCoder: NSCoder) { // // super.encodeWithCoder(aCoder) is optional, see notes below // aCoder.encodeObject(self.message_type, forKey: "message_type") // aCoder.encodeObject(self.body, forKey: "body") // aCoder.encodeObject(self.sender_id, forKey: "sender_id") // aCoder.encodeObject(self.receiver_id, forKey: "receiver_id") // aCoder.encodeInteger(self.id, forKey: "anInt") // // } // // // Provide some debug info // override var description: String { // get { // return ("\(self.message_type), \(self.body), \(self.sender_id), \(self.receiver_id), \(self.id)") // } // } // //}
[ -1 ]
e9f91f2aef85cd1038f2d4a2ca9af1175e4daf37
74e53f8f84ca4790c8432cfc8ccee1edcdff6864
/Example/iOS_Bootstrap/HumanReadableErrorHandler.swift
40aa8aeddc123596f08fb6c7bad68a7996c44dd0
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ashraf-atef/iOS_Bootstrap
28dfd105e0989b35b00f8424d8b4b5d7a60fa628
98b9432a9c09cccace3641392c74b548ba814c1b
refs/heads/master
2020-06-20T17:47:26.709243
2019-06-24T10:31:53
2019-06-24T10:31:53
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,357
swift
// // HumanReadableErrorHandler.swift // PassApp // // Created by Ahmad Mahmoud on 4/14/18. // Copyright © 2018 Robustastudio. All rights reserved. // import iOS_Bootstrap class HumanReadableErrorHandler: BaseNetworkErrorHandler { override func statusCodeError(_ statusCode: Int, errorBody: String?, request: URLRequest?, response: URLResponse?) -> String { // switch statusCode { case 401: errorMessage = "Not authorised ! " + errorBody! case 404: errorMessage = "Not found !" // var errorModel : ErrorModel = ErrorModel() // errorModel.statusCode = statusCode // errorModel.description = errorBody // errorModel.response = response // errorMessage = errorModel.toStringForm() default: errorMessage = errorBody break } return errorMessage! } override func networkingError(_ error: LucidMoyaNetworkingError) -> String { switch error { case .notConnectedToInternet(let networkError): errorMessage = networkError.localizedDescription default: errorMessage = "Unknown error" } return errorMessage!.description } override func moyaError(_ error: MoyaError) -> String { return "" } }
[ -1 ]
8d177b375e1208f2c4cd23a7e999d4c61f629d73
e420bea11a9ae9723b71ad16d62e2fac8ad6f3c6
/TwitterCloneAppTests/SearchTweetsViewModelSpec.swift
ad71111053c3b4763ba47f1508be3455d2c9a442
[]
no_license
IsaacACasanova/TwitterCloneSwiftUI
c62e0c761b277ecfa374e5e2b772c209f37777a5
210ed9bf7d0d39556a0f1bb72a0f75e5c49efa91
refs/heads/master
2022-07-20T09:59:57.159818
2020-05-17T01:54:12
2020-05-17T01:54:12
261,051,211
2
1
null
2020-05-07T01:02:39
2020-05-04T00:56:29
Swift
UTF-8
Swift
false
false
1,799
swift
// // SearchTweetsViewModelSpec.swift // TwitterCloneAppTests // // Created by Isaac Casanova on 5/10/20. // Copyright © 2020 Isaac Casanova. All rights reserved. // import Nimble import Quick @testable import TwitterCloneApp class SearchTweetsViewModelSpec: QuickSpec { var twitterService: MockTwitterService! } extension SearchTweetsViewModelSpec { override func spec() { var subject: SearchTweetsViewModel! describe("fetchTweetContents(for searchText: String)") { context("when the search for tweets is successful") { beforeEach { subject = self.newSubject subject.fetchTweetContents(for: "content") } it("returns the result to the datasource") { let expected: [TweetRowViewModel] = [.preview] expect(subject.dataSource).toEventually(equal(expected)) } } context("when the search for tweets fails") { beforeEach { subject = self.newFailSubject subject.dataSource = [.preview] subject.fetchTweetContents(for: "content") } it("returns an empty array") { expect(subject.dataSource).toEventually(beEmpty()) } } } } } // MARK: - Helpers private extension SearchTweetsViewModelSpec { var newSubject: SearchTweetsViewModel { let service = MockTwitterService() return SearchTweetsViewModel(twitterService: service) } var newFailSubject: SearchTweetsViewModel { let service = MockTwitterService(success: false) return SearchTweetsViewModel(twitterService: service) } }
[ -1 ]
0c15dd2d2e1f077d1488701dc6b05e8f5c23ff6c
a51547e67e83fcad4483a593c69dc62206252142
/QuocCuongProject/QuocCuongProject/MVVM/View/Setting/SettingViewController.swift
b1a40b92635318f4415ac18cd6d04e86015b1a8c
[]
no_license
buicuong/QuocCuongProject
3f1ee562392d626ab59951a6cb7fa90f4b1f1b69
f6ae2335e27b59d2aa06bd3f7a18e4ee66a25b57
refs/heads/master
2022-11-28T00:29:40.662582
2020-08-02T16:46:28
2020-08-02T16:46:28
284,499,544
0
0
null
null
null
null
UTF-8
Swift
false
false
348
swift
// // SettingViewController.swift // QuocCuongProject // // Created by Mojave on 8/2/20. // Copyright © 2020 Mojave. All rights reserved. // import UIKit class SettingViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.navigationController?.isNavigationBarHidden = true } }
[ -1 ]
4fae5e6cb7f1473aeee824d979ee8ee3dec1ccfe
cdef2a23c9e7c80b9f62b02c8d41610f2daedc96
/RiskRoller/AppDelegate.swift
b626faf73fd739a7c668ef44e3caaab4360f8b79
[]
no_license
geno5150/RiskRoller
a74d35b3875589cc6dd23d500b3184ec44d84fb9
e8447e157590a0d5e783ae043cd1adc7ef11b65e
refs/heads/master
2021-01-10T11:15:29.579691
2016-01-22T21:28:47
2016-01-22T21:28:47
50,208,374
0
0
null
null
null
null
UTF-8
Swift
false
false
2,148
swift
// // AppDelegate.swift // RiskRoller // // Created by Geno Erickson on 1/22/16. // Copyright © 2016 SuctionPeach. 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, 278564, 229415, 229417, 327722, 237613, 360496, 229426, 237618, 229428, 286774, 229432, 286776, 286778, 319544, 204856, 286791, 237640, 278605, 311375, 163920, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 278639, 278648, 131192, 237693, 327814, 131209, 417930, 303241, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 327862, 286906, 327866, 180413, 286910, 286916, 286922, 286924, 286926, 286928, 131281, 278743, 278747, 155872, 319716, 278760, 237807, 303345, 286962, 229622, 327930, 278781, 278783, 278785, 237826, 278792, 286987, 319757, 286999, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 278983, 319945, 278986, 278990, 278994, 311767, 279003, 279006, 188895, 279010, 287202, 279015, 172520, 279020, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 172550, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 279084, 172591, 172598, 279095, 172607, 172612, 377413, 172614, 172618, 303690, 33357, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 189039, 189040, 172655, 172656, 295538, 189044, 172660, 287349, 352880, 287355, 287360, 295553, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 164509, 287390, 295583, 303773, 172702, 287394, 230045, 303780, 172705, 287398, 172707, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 328381, 279231, 287423, 328384, 287427, 279241, 107212, 172748, 287436, 172755, 303827, 279255, 279258, 303835, 213724, 189149, 303838, 287450, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 369433, 230169, 295707, 328476, 295710, 303914, 279340, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 279383, 303959, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 279413, 303991, 303997, 295806, 295808, 304005, 320391, 213895, 304007, 304009, 304011, 304013, 213902, 279438, 189329, 304019, 279445, 58262, 279452, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 304063, 238528, 304065, 189378, 213954, 156612, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 197645, 295949, 230413, 320528, 140312, 295961, 238620, 304164, 189479, 304170, 238641, 238652, 238655, 230465, 238658, 296004, 336964, 205895, 320584, 238666, 296021, 336987, 230497, 296036, 296040, 205931, 164973, 205934, 279661, 312432, 279669, 337018, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 350308, 230592, 279750, 312518, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 279788, 320748, 279790, 296189, 320771, 312585, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 230689, 312622, 296243, 312630, 222522, 222525, 296253, 312639, 296255, 296259, 378181, 230727, 238919, 320840, 296264, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 279929, 181626, 304506, 304505, 181631, 312711, 312712, 296331, 288140, 230800, 288144, 337306, 288160, 288162, 288164, 279975, 370092, 279983, 288176, 279985, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 230860, 280014, 312783, 288208, 230865, 288210, 370130, 288212, 280021, 288214, 222676, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 288236, 288238, 288240, 291754, 288242, 296435, 288244, 296439, 288250, 402942, 148990, 296446, 296450, 230916, 230919, 370187, 304651, 304653, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 280158, 403039, 370272, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 313027, 280260, 280264, 206536, 206539, 206541, 206543, 280276, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 280302, 288494, 419570, 321266, 288499, 288502, 280314, 288510, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 345921, 280388, 304968, 280393, 280402, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280458, 280464, 124817, 280468, 280473, 124827, 247709, 214944, 280487, 321458, 296883, 10170, 296890, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 231404, 124913, 165876, 239612, 313340, 239617, 313347, 313358, 321560, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 223303, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 223327, 149599, 321634, 149601, 149603, 280681, 313451, 223341, 280687, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 280919, 354653, 313700, 280937, 280940, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 281084, 240124, 305662, 305664, 240129, 305666, 305668, 240132, 223749, 281095, 338440, 150025, 223752, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 199262, 338532, 281190, 199273, 281196, 158317, 313973, 281210, 297594, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 314029, 314033, 240309, 314047, 314051, 297671, 199367, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207737, 183172, 240519, 322440, 338823, 314249, 289687, 240535, 297883, 289694, 289696, 289700, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 281708, 281711, 289912, 248995, 306341, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 363742, 363745, 298216, 330988, 216303, 322801, 363802, 199976, 199978, 314671, 298292, 298294, 298306, 380226, 281923, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 224641, 281987, 298372, 281990, 298377, 314763, 224657, 306581, 314779, 314785, 282025, 314793, 282027, 241068, 241070, 241072, 282034, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 282101, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 282127, 290321, 282130, 282133, 290325, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 282186, 224849, 282195, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 241260, 257658, 315016, 282249, 290445, 324757, 282261, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 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, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 282410, 241450, 306988, 306991, 315184, 315190, 241464, 282425, 159545, 307009, 307012, 315211, 307027, 315221, 282454, 315223, 241496, 241498, 307035, 307040, 282465, 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, 241581, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 241661, 282623, 315396, 241669, 315397, 282632, 282639, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 307287, 315482, 217179, 315483, 192605, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 184486, 307370, 307372, 307376, 323763, 176311, 299191, 307385, 307386, 258235, 176316, 307388, 307390, 299200, 307394, 307396, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 282881, 282893, 291089, 282906, 291104, 233766, 307508, 315701, 307510, 332086, 151864, 307512, 307515, 282942, 307518, 151874, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299391, 291202, 299398, 242057, 291212, 299405, 283033, 291226, 242075, 315801, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299444, 127413, 283062, 291254, 283069, 127421, 127424, 299457, 283080, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 176620, 127474, 291314, 291317, 135672, 233979, 291330, 283142, 127497, 233994, 135689, 233998, 234003, 234006, 152087, 127511, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 234038, 234041, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299723, 225998, 299726, 226002, 226005, 119509, 226008, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 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, 242511, 234319, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 291711, 234368, 234370, 201603, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 324504, 234393, 209818, 308123, 324508, 234398, 234396, 291742, 234401, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 324522, 226220, 291756, 234414, 324527, 291760, 234417, 201650, 324531, 226230, 234422, 275384, 324536, 234428, 291773, 234431, 242623, 324544, 324546, 226239, 324548, 226245, 234437, 234439, 234434, 234443, 193486, 275406, 193488, 234446, 234449, 316370, 234452, 234455, 234459, 234461, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 234501, 275462, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 234563, 308291, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 275545, 242777, 234585, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 300148, 234614, 398455, 144506, 275579, 234618, 234620, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 275594, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 234647, 275608, 308373, 234650, 234648, 308379, 283805, 234653, 324766, 119967, 234657, 300189, 324768, 283813, 234661, 300197, 234664, 275626, 234667, 316596, 234687, 316610, 300226, 226500, 234692, 300229, 308420, 283844, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 283904, 300289, 292097, 300292, 300294, 275719, 300299, 177419, 283917, 300301, 242957, 177424, 275725, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 284010, 136562, 324978, 275834, 275836, 275840, 316803, 316806, 316811, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 284076, 144812, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 259567, 300527, 308720, 226802, 316917, 308727, 292343, 300537, 316947, 308757, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 284215, 284218, 226877, 284223, 284226, 243268, 292421, 226886, 284231, 128584, 284228, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 284245, 284247, 317015, 284249, 243290, 284251, 300628, 284253, 235097, 284255, 300638, 284258, 292452, 284263, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 276098, 284290, 325250, 284292, 292479, 292485, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 276187, 284379, 284381, 284384, 284386, 358114, 358116, 276197, 358119, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358126, 358128, 358133, 358135, 276216, 358140, 284413, 358142, 284418, 358146, 317187, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 325408, 284449, 300834, 300832, 227109, 317221, 358183, 276268, 194351, 243504, 300850, 284469, 276280, 325436, 276291, 366406, 276295, 153417, 276308, 284502, 317271, 276315, 292700, 284511, 227175, 292715, 284529, 300915, 292729, 317306, 284540, 276365, 284564, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 358326, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 276466, 227314, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 235581, 325692, 276544, 284739, 276553, 243785, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 194657, 227426, 276579, 178273, 194660, 227430, 276583, 309346, 309348, 276586, 309350, 309352, 309354, 276590, 350313, 227440, 350316, 284786, 350321, 276595, 301167, 350325, 350328, 292985, 301178, 292989, 292993, 301185, 350339, 317573, 350342, 227463, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 284837, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 276689, 227540, 309462, 301272, 309468, 301283, 317672, 276713, 317674, 325867, 227571, 276725, 243960, 227583, 276735, 227587, 276739, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 276775, 325937, 276789, 325943, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 285051, 211324, 227709, 285061, 317833, 178572, 285070, 178575, 285077, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 276917, 293304, 293307, 293314, 309707, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 317951, 309764, 121352, 236043, 342541, 113167, 277011, 317971, 309781, 309779, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 277054, 129603, 318020, 301636, 301639, 301643, 277071, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 383658, 285357, 318128, 277170, 342707, 154292, 277173, 285368, 277177, 277181, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 228069, 277223, 342760, 285417, 56043, 277232, 228081, 56059, 285441, 310020, 285448, 310029, 285453, 228113, 285459, 277273, 326430, 228128, 293666, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 301884, 310080, 293696, 277314, 277317, 277322, 277329, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 310134, 277368, 15224, 236408, 416639, 416640, 113538, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293820, 203715, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 285686, 302073, 285690, 244731, 121850, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 277526, 293917, 293939, 277561, 277564, 310336, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 310355, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 277608, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 392326, 285831, 302218, 285835, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 277671, 302248, 64682, 277678, 228526, 294063, 302258, 277687, 294072, 318651, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 113964, 285997, 285999, 113969, 277811, 318773, 318776, 277816, 286010, 417086, 277822, 286016, 294211, 302403, 384328, 277832, 277836, 294221, 326991, 294223, 277839, 277850, 179547, 277853, 277857, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 277888, 310657, 351619, 294276, 310659, 277892, 253320, 310665, 318858, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 277923, 130468, 228776, 277932, 310703, 277937, 310710, 130486, 310712, 310715, 302526, 228799, 277953, 64966, 245191, 163272, 302534, 310727, 277959, 292968, 302541, 277966, 302543, 310737, 277975, 286169, 228825, 163290, 310749, 277981, 310755, 277989, 187880, 286188, 310764, 278003, 310772, 40440, 278009, 40443, 286203, 228864, 40448, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 146977, 187939, 294435, 286246, 294439, 286248, 278057, 294440, 294443, 40486, 294445, 40488, 310831, 40499, 40502, 212538, 40507, 40511, 228933, 40521, 286283, 40525, 40527, 228944, 212560, 400976, 147032, 40537, 40539, 278109, 40541, 40550, 286312, 286313, 40554, 40552, 310892, 40557, 188022, 294521, 343679, 278150, 310925, 286354, 278163, 122517, 278168, 327333, 229030, 278188, 278192, 319153, 278196, 302781, 302789, 294599, 278216, 294601, 343757, 212690, 278227, 229076, 286420, 319187, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 278274, 278277, 302854, 294664, 311048, 319243, 311053, 302862, 319251, 294682, 278306, 294701, 278320, 319290, 229192, 302925, 188247, 237409, 327554, 40851, 294811, 319390, 294817, 319394, 40865, 311209, 180142, 188340, 40886, 294844, 294847, 393177, 294876, 294879, 294883, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
0d948914f05dd907491b1bccefcd3e80cb6a0daa
c5d09f265e534c0837d54a92389039392f839a02
/3.PlayLocalVideo/PlayLocalVideo/PlayLocalVideo/ViewController.swift
d4a674c1132776e969c2ec0c6e13dbfc144e3a3d
[]
no_license
linsyorozuya/30-day-swift
038bb13f9548e7c8b78f85ae1fb8106c6fb2483c
818f6721ef8cabb059028e2b7a7eae690d4c771a
refs/heads/master
2021-01-20T09:59:50.877155
2017-12-25T09:46:47
2017-12-25T09:46:47
101,616,901
0
0
null
null
null
null
UTF-8
Swift
false
false
2,221
swift
// // ViewController.swift // PlayLocalVideo // // Created by linsyorozuya on 2017/8/29. // Copyright © 2017年 linsyorozuya. All rights reserved. // import UIKit import AVKit class ViewController: UIViewController,UITableViewDataSource,UITableViewDelegate { var data = [ video(image: "videoScreenshot01", title: "Introduce 3DS Mario", source: "Youtube - 06:32"), video(image: "videoScreenshot02", title: "Emoji Among Us", source: "Vimeo - 3:34"), video(image: "videoScreenshot03", title: "Seals Documentary", source: "Vine - 00:06"), video(image: "videoScreenshot04", title: "Adventure Time", source: "Youtube - 02:39"), video(image: "videoScreenshot05", title: "Facebook HQ", source: "Facebook - 10:20"), video(image: "videoScreenshot06", title: "Lijiang Lugu Lake", source: "Allen - 20:30") ] var avPlayerVC = AVPlayerViewController() var avPlayer = AVPlayer() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return data.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell:VideoCell = tableView.dequeueReusableCell(withIdentifier: "VideoCell", for: indexPath) as! VideoCell cell.videoScreenShot.image = UIImage.init(named: data[indexPath.row].image) cell.videoTitleLabel.text = data[indexPath.row].title cell.videoSourceLabel.text = data[indexPath.row].source return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let path = Bundle.main.path(forResource: "emoji zone", ofType: "mp4") avPlayer = AVPlayer(url: URL.init(fileURLWithPath: path!)) avPlayerVC.player = avPlayer self.present(avPlayerVC, animated: true) { self.avPlayerVC.player?.play() } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
f0a15c44603ecab18fc48841f24cabc151e6cc3e
5b00dbc6cf0a476a09d5c433ae79b69bd8a8df58
/StyleTransferFun/CustomButton.swift
df3f102bf3cefca4d2d9bedd77ab773421ea4cb5
[ "MIT" ]
permissive
LunarFlash/StyleTransferMachineLearning
4b680dcea60a4aa8583c5585f617180cbd3d3bd7
20e9db7fd46bb2ec837df101bc88fe2201a8b740
refs/heads/master
2020-04-05T12:45:22.717708
2018-11-09T21:05:35
2018-11-09T21:05:35
156,879,109
4
0
null
null
null
null
UTF-8
Swift
false
false
861
swift
// // CustomButton.swift // Style Transfer Starter // // Created by Sai Kambampati on 7/7/18. // Copyright © 2018 AppCoda. All rights reserved. // import UIKit @IBDesignable class CustomButton: UIButton { @IBInspectable var cornerRadius: CGFloat = 0.0 { didSet { layer.cornerRadius = cornerRadius } } @IBInspectable var borderWidth: CGFloat = 0.0 { didSet { layer.borderWidth = borderWidth } } @IBInspectable var borderColor: UIColor = .black { didSet { layer.borderColor = borderColor.cgColor } } @IBInspectable var shadowOpacity: Float = 0.0 { didSet { layer.shadowOpacity = shadowOpacity layer.shadowOffset = CGSize(width: 0, height: 10) layer.shadowRadius = 10 } } }
[ -1 ]
afb6252838f3c7c4b912b7ee8d0c27c5f1bf5e79
8ec492806993bf4534d6099879e92b20d5be9bf3
/Adapter.playground/Contents.swift
a4ff789e2a7f74d1375a512760defdaa91a52b79
[ "MIT" ]
permissive
goldenplan/Pattern-on-Swift
77a42695591e62897398518f74cf7d6245e63738
9d7242e7dfafd92c85f0e650bd4e3a244f8b03c0
refs/heads/master
2021-01-02T22:59:26.075541
2017-08-05T15:57:00
2017-08-05T15:57:00
99,432,003
1
0
null
null
null
null
UTF-8
Swift
false
false
618
swift
// Adapter import Cocoa class Client{ var target: Target! } protocol Target{ func reguest() } class Adaptee{ func spesialRequest(){ print("Adapted at new request") } } // Class Adapter class ClassAdapter: Adaptee, Target{ func reguest() { spesialRequest() } } let client = Client() client.target = ClassAdapter() client.target.reguest() // Object Adapter class ObjectAdapter: Target{ var adaptee = Adaptee() func reguest() { adaptee.spesialRequest() } } client.target = ObjectAdapter() client.target.reguest()
[ -1 ]
5dbe91cb433499af9e8b62771ae603c656545a38
37cb0b9480edb74c467195f43fe05c5574826f5d
/ALILON Z/Events Mood/select time/selectTimeTableViewCell.swift
68fbd3b696b915b467d1e8c3cf5ac359bd6da4a3
[]
no_license
imatchegy/ALILON-Z
d346d44ed7acd9d6d84cf6ed66679e6e3f07a3f2
a601598a8ab6bd16aec60f9ca4b4e198ac3a9ed4
refs/heads/master
2020-03-19T19:03:29.931154
2018-06-10T22:18:56
2018-06-10T22:18:56
136,838,128
0
0
null
null
null
null
UTF-8
Swift
false
false
509
swift
// // selectTimeTableViewCell.swift // ALILON Z // // Created by iMATCH on 5/5/18. // Copyright © 2018 iMATCH. All rights reserved. // import UIKit class selectTimeTableViewCell: UITableViewCell { 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 } }
[ 211843, 225159, 418826, 302475, 131725, 161041, 227219, 123541, 317336, 320793, 131748, 337318, 49959, 276390, 337321, 337324, 311212, 199212, 327344, 276406, 292919, 300986, 299965, 299968, 379078, 239306, 273105, 358870, 302555, 228188, 155614, 336738, 213098, 375532, 217069, 115311, 213105, 222836, 113524, 230522, 213115, 283900 ]
7775bf72a42075709c4d606e2a13f08d06b37ff8
58a2995dd249b73813a4be2c16c552d7f5620bfe
/batchService/resource-manager/Sources/batchService/protocols/JobConstraintsProtocol.swift
919b557b384e3eda61929fdac59ca79e10c50ea6
[ "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
424
swift
// 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. import Foundation // JobConstraintsProtocol is public protocol JobConstraintsProtocol : Codable { var maxWallClockTime: String? { get set } var maxTaskRetryCount: Int32? { get set } }
[ -1 ]
c640fd52fd80007222ece51f9089e71cf3c71615
3d0cc909d57be998c02e1996e50f70738d103db7
/SkyRunner/SkyRunnerTests/LocationManagerTests.swift
1a4d2fc441e05a68d5e8c316fc8de95e7f23455e
[]
no_license
DongquanHuang/iOS
433dee439d966d6e8498571bc8b306a5052c0a84
0ce26bb94d2a85dfb86831ed160fa6c7ca79b096
refs/heads/master
2021-01-15T09:29:41.855249
2016-08-24T14:06:11
2016-08-24T14:06:11
39,985,366
0
0
null
null
null
null
UTF-8
Swift
false
false
3,164
swift
// // LocationManagerTests.swift // SkyRunner // // Created by Peter Huang on 7/27/15. // Copyright (c) 2015 Peter Huang. All rights reserved. // import UIKit import XCTest import CoreLocation class LocationManagerTests: XCTestCase { class MockLocationMgrDelegate: NSObject, LocationManagerDelegate { var delegateMethodGetsCalled = false func locationUpdated() { delegateMethodGetsCalled = true } } var locationMgr: LocationManager? var locations: [CLLocation]? var location = CLLocation(coordinate: CLLocationCoordinate2D(latitude: 10.0, longitude: 20.0), altitude: 30.0, horizontalAccuracy: 5.0, verticalAccuracy: 5.0, course: 5.0, speed: 2.0, timestamp: NSDate()) var inaccurateLocation = CLLocation(coordinate: CLLocationCoordinate2D(latitude: 10.0, longitude: 20.0), altitude: 30.0, horizontalAccuracy: 25.0, verticalAccuracy: 5.0, course: 5.0, speed: 2.0, timestamp: NSDate()) var outOfDateLocation = CLLocation(coordinate: CLLocationCoordinate2D(latitude: 10.0, longitude: 20.0), altitude: 30.0, horizontalAccuracy: 15.0, verticalAccuracy: 5.0, course: 5.0, speed: 2.0, timestamp: NSDate(timeIntervalSince1970: 1000)) var locationMgrDelegate: MockLocationMgrDelegate? override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. locationMgr = LocationManager() locationMgrDelegate = MockLocationMgrDelegate() locationMgr?.delegate = locationMgrDelegate locations = [CLLocation]() } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testLocationManagerHasLocationsProperty() { XCTAssertTrue(locationMgr?.locations != nil) } func testLocationManagerHasEmptyLocationsRightAfterInitialized() { XCTAssertTrue(locationMgr?.locations.count == 0) } func testLocationManagerWillOnlySaveLocationIfItIsARecentUpdate() { locations?.append(location) locationMgr?.locationManager(CLLocationManager(), didUpdateLocations: locations!) XCTAssertTrue(locationMgr?.locations.count == 1) } func testLocationManagerWillNotSaveLocationIfTheUpdateIsNotAccuratyEnough() { locations?.append(inaccurateLocation) locationMgr?.locationManager(CLLocationManager(), didUpdateLocations: locations!) XCTAssertTrue(locationMgr?.locations.count == 0) } func testLocationManagerWillNotSaveLocationIfItIsOutOfDate() { locations?.append(outOfDateLocation) locationMgr?.locationManager(CLLocationManager(), didUpdateLocations: locations!) XCTAssertTrue(locationMgr?.locations.count == 0) } func testDelegateMethodGetsCalledIfGetsValidLocationUpdate() { locations?.append(location) locationMgr?.locationManager(CLLocationManager(), didUpdateLocations: locations!) XCTAssertTrue(locationMgrDelegate?.delegateMethodGetsCalled == true) } }
[ -1 ]
8f38b1dc4e979c1badd125d2f1347922dcb36652
ec79f8214824a183725b801eaa70fe6fb7536da1
/SleepWell/Classes/Model/Entity/Meditations/MeditationSound.swift
9749f8b0d4b967336e8815ba27526247e8625cf9
[]
no_license
AgentChe/SleepWell
95fe4a04948c546c124c39bd95abe87a7dfc7dc0
82d03758055b6b447532bd1da50a9b7f5ab20a5d
refs/heads/master
2021-07-03T08:28:36.066048
2021-01-20T09:35:49
2021-01-20T09:35:49
217,402,990
0
0
null
null
null
null
UTF-8
Swift
false
false
900
swift
// // MeditationSound.swift // SleepWell // // Created by Andrey Chernyshev on 25/10/2019. // Copyright © 2019 Andrey Chernyshev. All rights reserved. // import Foundation.NSURL struct MeditationSound: Sound { let id: Int let soundUrl: URL let soundSecs: Int } extension MeditationSound { private enum CodingKeys: String, CodingKey { case id case soundUrl = "sound_url" case soundSecs = "sound_secs" } init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) let sound = try container.decode(String.self, forKey: .soundUrl).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? "" id = try container.decode(Int.self, forKey: .id) soundUrl = URL(string: sound)! soundSecs = try container.decode(Int.self, forKey: .soundSecs) } }
[ -1 ]
6590ab213fa1c0b56fb07558db939d3a4061db7a
3c00bcd656290fa184993e3d8764b4c35c4fae8d
/Building+CoreDataProperties.swift
4eadeea3d9499555e6b7539c791f8dee6544b02a
[]
no_license
BroncoJosh/Bike-Idaho
29e5fc22ae503b4ad79ce7f707c7ae4f0303e826
e561d9d6232d421d5976ba9f9e6ca8033ec2b5ea
refs/heads/master
2021-04-15T12:52:00.413482
2018-03-24T20:21:09
2018-03-24T20:21:09
126,636,999
0
0
null
null
null
null
UTF-8
Swift
false
false
592
swift
// // Building+CoreDataProperties.swift // Project1 // // Created by Josh White on 11/30/15. // Copyright © 2015 Josh White. All rights reserved. // // Choose "Create NSManagedObject Subclass…" from the Core Data editor menu // to delete and recreate this implementation file for your updated model. // import Foundation import CoreData extension Building { @NSManaged var buildingName: String? @NSManaged var subtitle: String? @NSManaged var longitude: NSNumber? @NSManaged var latitude: NSNumber? @NSManaged var buildingLocation: BuildingLocation? }
[ -1 ]
cde0d44ea468d9acbdc2224f58442c2159630146
61733528bf0ac50cc29ab3af227f4a578d6108da
/Taskee2UITests/Taskee2UITests.swift
c6a74b1393633dce262b8a0f01890886c68f8c10
[ "MIT" ]
permissive
KitsuneNoctus/Taskee2
f1cf8817d421b27ebf9969c618e90b4b8ac3f349
b07d1a86155ab6e3549ea3081366882675d4a61a
refs/heads/master
2023-04-08T06:12:41.030470
2021-04-13T17:48:53
2021-04-13T17:48:53
278,831,565
0
0
null
2021-04-13T17:47:23
2020-07-11T09:39:37
Swift
UTF-8
Swift
false
false
1,483
swift
// // Taskee2UITests.swift // Taskee2UITests // // Created by Henry Calderon on 7/11/20. // Copyright © 2020 Henry Calderon. All rights reserved. // import XCTest class Taskee2UITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { // This measures how long it takes to launch your application. measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { XCUIApplication().launch() } } } }
[ 415744, 274432, 372736, 346117, 182277, 354310, 43016, 354311, 354312, 403463, 399372, 436235, 360463, 419857, 153618, 358418, 376853, 436248, 178215, 346153, 344106, 253996, 102446, 430127, 272432, 405552, 403507, 378933, 163894, 358455, 378934, 249912, 352314, 436283, 385078, 32829, 241717, 376892, 225347, 352324, 403524, 421958, 352327, 385095, 436293, 399433, 163916, 368717, 333902, 436304, 176209, 381013, 53334, 104534, 254039, 411738, 426074, 368732, 272477, 356446, 438374, 32871, 352359, 176231, 438378, 395373, 260206, 385135, 422000, 376945, 432241, 249976, 266361, 385147, 346237, 374913, 374914, 422020, 168069, 381061, 168070, 415883, 426124, 381071, 333968, 436372, 196758, 430231, 200856, 49308, 422044, 192670, 192671, 362658, 436388, 49317, 333990, 258213, 377008, 377010, 104633, 266427, 260285, 268479, 133313, 377025, 395458, 338118, 374984, 377033, 164043, 417996, 436429, 254157, 266447, 346319, 368849, 368850, 372943, 139478, 258263, 385240, 254171, 379102, 147679, 147680, 334049, 356575, 387299, 268515, 18661, 379110, 383208, 205034, 254189, 149743, 438512, 254193, 260337, 260338, 372979, 381173, 389364, 395511, 135416, 336121, 344312, 432373, 411892, 436471, 375040, 436480, 262403, 147716, 272644, 432387, 260355, 266504, 338187, 338188, 368908, 375052, 180494, 395536, 325904, 368915, 338196, 254228, 379157, 262419, 61720, 391448, 268570, 381210, 272661, 178459, 389406, 377116, 186660, 268581, 338217, 358698, 325930, 260396, 254250, 418095, 438575, 336177, 266547, 397620, 368949, 432435, 358710, 438583, 362809, 358707, 332084, 379193, 127292, 14654, 180534, 155968, 268609, 438592, 270663, 395591, 368969, 254285, 383309, 180559, 377168, 397650, 344402, 250196, 348501, 348499, 368982, 389465, 272730, 436570, 383327, 215395, 366948, 416101, 383338, 110955, 160111, 354672, 270703, 362864, 250227, 272755, 354678, 432503, 438653, 385407, 432511, 436609, 385409, 340356, 266628, 395653, 436613, 242059, 395660, 270733, 106893, 264591, 272784, 385423, 420241, 225684, 373141, 315798, 373144, 213402, 39323, 385437, 389534, 397732, 436644, 305572, 254373, 385449, 375211, 115116, 272815, 436659, 342454, 338359, 385463, 358844, 336319, 336323, 326083, 436677, 188870, 416201, 129484, 373196, 154061, 416206, 262619, 256476, 377309, 377310, 184799, 432608, 369121, 369124, 420326, 270823, 432616, 319976, 334315, 360945, 375281, 139766, 377337, 254459, 410108, 410109, 262657, 377346, 166403, 324098, 334345, 340489, 342537, 410126, 393745, 385554, 397841, 342549, 420374, 254487, 258584, 410138, 188954, 188957, 397855, 342560, 416288, 348709, 348710, 350758, 350759, 358951, 358952, 385578, 377388, 197166, 393775, 418352, 397872, 219694, 330291, 219695, 432694, 340539, 33339, 266812, 352831, 33344, 438850, 385603, 348741, 322119, 375369, 381515, 348748, 375373, 416334, 426575, 416340, 369236, 385620, 244311, 326229, 191065, 270938, 332379, 430681, 436831, 260705, 416353, 242274, 375396, 268901, 184938, 373357, 184942, 176751, 389744, 420461, 346739, 346741, 352885, 352886, 356983, 209529, 344697, 356984, 420473, 244345, 356990, 373377, 422529, 152196, 166533, 201348, 348807, 356998, 356999, 344714, 369285, 385669, 375438, 377487, 326288, 346771, 363155, 180886, 264855, 352921, 363161, 377499, 275102, 436897, 344737, 340645, 176805, 422567, 176810, 352938, 248494, 418479, 383668, 336565, 164532, 160441, 342714, 377531, 377534, 422591, 39616, 377536, 355006, 385737, 135888, 385745, 369365, 369366, 385751, 361178, 383708, 436957, 363228, 352989, 436960, 295649, 418529, 338658, 352990, 264929, 385763, 369383, 361194, 346859, 269036, 373485, 373486, 330476, 432883, 418550, 342775, 21239, 275193, 348921, 379120, 383740, 344829, 359166, 162559, 35584, 375552, 133889, 197377, 416509, 430853, 432894, 383755, 430860, 434956, 326413, 62222, 418579, 426772, 197398, 207639, 426777, 363295, 344864, 430880, 197412, 336678, 279337, 342827, 391980, 355117, 189229, 197424, 152372, 336693, 191285, 197428, 377656, 273209, 355129, 273211, 426809, 430909, 197433, 160576, 416577, 355138, 355136, 377669, 348999, 420680, 197451, 355147, 355148, 369488, 355153, 385878, 385880, 363353, 363354, 244569, 197467, 375644, 435038, 381791, 127840, 363361, 363362, 357219, 412516, 252766, 351078, 355174, 385895, 342888, 439145, 355173, 242540, 385901, 355182, 197479, 207728, 197489, 420722, 381811, 207724, 201590, 392057, 164730, 211835, 398205, 308093, 340865, 392065, 330627, 254851, 369541, 260995, 392071, 172936, 387977, 424842, 349066, 252812, 349068, 426894, 400271, 355216, 381840, 224146, 392080, 390034, 224149, 256918, 256919, 430999, 256920, 377754, 400282, 211871, 381856, 185252, 359332, 256934, 398244, 359333, 422825, 172971, 326571, 140203, 381872, 252848, 377778, 326580, 261045, 261046, 273336, 326586, 398268, 273341, 377789, 330688, 349122, 398275, 359365, 379845, 363462, 211913, 273353, 345034, 127945, 373705, 252878, 342990, 433104, 359380, 418774, 386007, 433112, 433116, 418781, 359391, 340960, 347104, 207839, 386016, 398305, 123880, 418793, 134124, 187372, 343020, 248815, 257007, 222193, 383980, 412653, 435185, 183276, 347122, 271351, 127990, 349176, 201721, 435195, 383994, 437245, 349179, 257023, 328701, 125953, 171009, 418819, 357380, 396292, 410629, 330759, 189448, 328705, 386049, 377863, 347150, 361487, 384015, 433166, 435216, 320526, 330766, 386068, 433173, 254997, 252959, 336928, 384031, 336930, 398370, 357413, 330789, 248871, 375848, 410665, 357420, 345137, 420702, 361522, 412725, 386108, 410687, 160834, 257093, 404550, 261191, 377927, 218187, 250955, 361547, 250965, 296023, 339031, 375902, 439391, 392288, 375903, 361570, 214116, 253028, 250982, 257126, 214119, 265318, 404582, 402538, 265323, 396395, 398444, 62574, 351343, 173168, 187505, 138354, 273523, 404589, 119925, 377974, 357487, 349304, 363643, 66684, 392317, 343166, 384127, 248960, 392320, 349315, 349317, 402568, 363658, 140426, 373902, 404622, 386191, 224400, 410772, 347286, 359574, 265366, 222364, 339101, 351389, 418975, 429216, 380069, 265381, 124073, 367791, 367792, 373937, 367798, 324790, 402618, 339131, 421050, 343230, 367809, 265410, 183492, 253124, 113863, 402632, 259275, 273616, 402641, 419028, 259285, 351445, 357594, 339167, 222441, 414956, 421102, 253168, 386288, 66802, 351475, 251124, 271607, 369912, 52473, 363769, 369913, 52476, 419066, 412926, 439550, 386296, 351489, 386304, 437504, 369929, 322826, 439563, 414989, 380178, 259346, 429332, 349458, 367897, 367898, 419097, 115997, 222496, 382243, 412963, 130347, 257323, 369964, 353581, 116014, 273713, 261426, 382257, 345397, 345398, 382264, 212282, 347451, 333115, 193853, 386363, 359747, 359748, 257353, 337226, 109899, 251212, 337228, 257354, 146763, 353611, 353612, 259408, 331091, 437585, 406862, 150868, 353617, 378201, 374110, 372064, 429410, 437602, 114022, 253288, 265579, 425327, 327023, 425331, 163190, 421240, 259449, 382329, 384379, 357758, 337280, 357763, 253316, 384391, 388488, 263561, 353672, 304523, 314765, 9618, 112019, 398740, 411028, 370066, 370072, 396697, 253339, 253340, 343457, 148900, 396709, 333224, 245160, 374189, 380335, 355761, 251314, 359860, 359861, 421302, 343480, 259513, 134586, 380348, 216510, 54719, 216511, 380350, 361928, 425417, 200136, 273865, 339403, 372172, 337359, 329168, 413138, 353751, 425434, 437726, 429540, 3557, 361958, 3559, 271850, 271853, 411119, 116209, 259569, 251379, 253431, 265720, 286201, 386551, 359931, 187900, 210429, 398844, 216575, 343552, 245249, 366081, 372226, 437766, 409095, 271880, 198155, 359949, 208397, 329231, 253456, 413202, 253462, 413206, 175640, 388630, 370200, 153115, 431646, 349727, 146976, 157219, 157220, 372261, 394793, 245290, 245291, 347693, 431662, 323120, 396850, 200245, 323126, 343606, 374327, 163385, 210489, 134715, 421437, 425534, 396865, 147011, 413255, 265800, 273992, 147020, 128589, 421452, 265809, 333394, 353875, 349780, 396885, 179800, 265816, 396889, 388699, 343646, 396896, 415334, 282214, 388712, 388713, 155238, 204394, 271980, 138862, 206447, 54895, 188021, 366198, 339579, 337533, 210558, 210559, 415360, 396927, 370307, 419462, 149127, 149128, 210569, 415369, 214667, 411275, 431754, 396942, 224907, 415376, 419464, 405140, 274071, 425624, 345753, 259741, 208547, 153252, 245413, 208548, 255651, 388775, 399014, 210601, 364202, 405157, 202413, 421556, 384693, 337590, 370359, 376502, 224951, 224952, 415419, 300729, 409277, 333508, 259780, 218823, 409289, 267978, 403149, 425682, 333522, 345813, 370390, 272087, 224985, 345817, 245471, 325345, 159462, 333543, 345832, 181992, 372458, 345835, 141037, 397040, 12017, 212721, 431861, 274170, 175874, 360194, 173828, 249606, 395018, 395019, 409355, 372497, 395026, 397076, 417556, 366358, 169751, 411417, 345882, 421657, 435993, 431901, 341791, 339746, 255781, 257831, 167720, 362281, 378666, 399148, 202541, 431918, 403248, 378673, 421680, 153392, 345910, 182070, 182071, 274234, 384826, 409404, 436029, 360253, 431935, 325444, 339782, 337734, 409416, 325449, 341837, 415566, 272207, 272208, 337746, 431955, 325460, 376661, 341846, 339799, 362326, 368471, 345942, 345950, 362336, 259937, 255844, 368486, 409446, 415592, 40809, 368489, 425832, 384871, 214894, 362351, 274288, 214896, 372592, 325491, 417648, 341878, 276343, 350072, 274296, 333687, 360315, 112510, 182145, 253828, 325508, 243590, 333700, 325514, 350091, 350092, 372625, 425875, 350102, 337816, 329627, 350108, 376733, 253851, 333727, 354210, 436130, 118693, 436135, 10153, 438186, 362411, 253868, 370604, 203511, 362418, 128955, 188349, 151492, 311238, 362442, 380874, 346066, 212947, 212953, 372699, 436189, 219102, 403421, 360416, 354273, 403425, 329696, 6116, 354279, 436199, 174058, 247787, 337899, 253930, 380910, 354283, 436209, 432114, 385011, 380922, 380923, 415740, 268286 ]
4911216d584b5eb3105edd32dced152d0c1fc265
c9f5eb7b61cd06cee03ee12bd4f60c88b366e343
/程序代码/2.2_Basic/2.2_Basic/Basic/Basic/main.swift
c28400aef9225a5cd6cdc5d1f9b79fd0791f05ef
[]
no_license
SSHeRun/LearningWayOfSwift
2199857605a32996d3d0e09d70bf61433a837410
d487d8c8e172abb549eec921e8a592844b282e5a
refs/heads/master
2020-04-28T15:38:26.730263
2019-03-13T08:55:58
2019-03-13T08:55:58
175,382,385
2
0
null
null
null
null
UTF-8
Swift
false
false
2,290
swift
// // main.swift // Basic // // Created by 李巍 on 2018/9/3. // Copyright © 2018年 李巍. All rights reserved. // import Foundation // --------------------------------------- // 课堂演示2.2 Swift基础(1):创建命令行工程。 // 内容:创建一个OS X命令行项目,生成并运行。 print("Hello, My First Swift Project!") // --------------------------------------- // 课堂练习2.2 Swift基础(2):语句与输出。 // 内容:输入字符串“我是xxxx,我喜欢iOS开发”。 print("我是李老师,我喜欢iOS开发") // --------------------------------------- // 课堂演示2.2:Swift基础(3):变量与常量。 // 内容:创建一个常量,常量名为PI,初始值为3.14。创建一个变量,变量名为r,显式指定类型为Double并指定初始值为10。 let PI = 3.14 // let定义常量,自动推断类型为Double var radius:Double = 10 // var定义变量,显式指定数据类型为Double // --------------------------------------- // 课堂演示2.2:Swift基础(4):元组。 // 内容:使用元组存储你的信息,并输出。 // 1) 定义元组 let myInfo1 = ("liwei", 35) // 定义元组 let myInfo2: (String, Int) = ("liwei", 35) var myInfo3 = (name:"liwei", age:35) // 定义元组:指定元素名称 // 2) 修改元组 myInfo3.name = "Yu" myInfo3.age = 60 // 3) 使用元组 print("My name is \(myInfo1.0) and my age is \(myInfo1.1)") print("My name is \(myInfo2.0) and my age is \(myInfo2.1)") print("My name is \(myInfo3.name) and my age is \(myInfo3.age)") // ------------------------------------------ // 课堂演示2.2:Swift基础(5):可选。 // 内容:编写可选代码,理解Swift可选机制。 var possibleInt: Int? = 0 // 定义可选变量 var myString = "7" possibleInt = Int(myString) print(possibleInt) myString = "banana" possibleInt = Int(myString) print(possibleInt) // ---------------------------------------------- // 课堂演示2.2:Swift基础(6):运算符。 // 内容:给定半径,计算圆形面积和球形体积。 var r = 10.0 var area = PI*r*r var volume = 4/3*PI*r*r*r print("The area is \(area), and the volume is \(volume)")
[ -1 ]
14d945663d27997edce51bb123ee153433311203
3e3e5830f69c51e40f4d8dd6f39316b78b14d1fb
/Sources/SQL/Query/Query.swift
24685d4ae58d7c461a2136c9e7778b76d05ff544
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
scottbyrns/SQL
0f26c706b4ffb47e7239979d0225762ab6d70c67
e17249d9eed5d0c917721ee7e3b09d110557d068
refs/heads/master
2021-01-16T21:22:46.429129
2016-04-03T22:48:53
2016-04-03T22:48:53
55,372,823
0
0
null
2016-04-03T22:45:29
2016-04-03T22:45:29
null
UTF-8
Swift
false
false
8,232
swift
// Query.swift // // The MIT License (MIT) // // Copyright (c) 2015 Formbound // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. public protocol Query: QueryComponentsConvertible {} public extension Query { public func execute<T: Connection>(connection: T) throws -> T.ResultType { return try connection.execute(self) } } public protocol TableQuery: Query { var tableName: String { get } } public protocol ModelQuery: TableQuery { associatedtype ModelType: Model } public extension ModelQuery where Self: FetchQuery { public func fetch<T: Connection where T.ResultType.Iterator.Element == Row>(connection: T) throws -> [ModelType] { return try connection.execute(self).map { try ModelType(row: $0) } } public func first<T: Connection where T.ResultType.Iterator.Element == Row>(connection: T) throws -> ModelType? { var new = self new.offset = 0 new.limit = 1 return try connection.execute(new).map { try ModelType(row: $0) }.first } public func orderBy(values: [ModelOrderBy<ModelType>]) -> Self { return orderBy(values.map { $0.normalize }) } public func orderBy(values: ModelOrderBy<ModelType>...) -> Self { return orderBy(values) } } public struct Limit: QueryComponentsConvertible { public let value: Int public init(_ value: Int) { self.value = value } public var queryComponents: QueryComponents { return QueryComponents(strings: ["LIMIT", String(value)]) } } extension Limit: IntegerLiteralConvertible { public init(integerLiteral value: Int) { self.value = value } } public struct Offset: QueryComponentsConvertible { public let value: Int public init(_ value: Int) { self.value = value } public var queryComponents: QueryComponents { return QueryComponents(strings: ["OFFSET", String(value)]) } } extension Offset: IntegerLiteralConvertible { public init(integerLiteral value: Int) { self.value = value } } public enum OrderBy: QueryComponentsConvertible { case Ascending(String) case Descending(String) public var queryComponents: QueryComponents { switch self { case .Ascending(let field): return QueryComponents(strings: [field, "ASC"]) case .Descending(let field): return QueryComponents(strings: [field, "DESC"]) } } } public enum DeclaredFieldOrderBy { case Ascending(DeclaredField) case Descending(DeclaredField) public var normalize: OrderBy { switch self { case .Ascending(let field): return .Ascending(field.qualifiedName) case .Descending(let field): return .Descending(field.qualifiedName) } } } public enum ModelOrderBy<T: Model> { case Ascending(T.Field) case Descending(T.Field) public var normalize: DeclaredFieldOrderBy { switch self { case .Ascending(let field): return .Ascending(T.field(field)) case .Descending(let field): return .Descending(T.field(field)) } } } public extension Sequence where Self.Iterator.Element == OrderBy { public var queryComponents: QueryComponents { return QueryComponents(components: map { $0.queryComponents }) } } public protocol FetchQuery: TableQuery { var offset: Offset? { get set } var limit: Limit? { get set } var orderBy: [OrderBy] { get set } } public extension FetchQuery { public var pageSize: Int? { get { return limit?.value } set { guard let value = newValue else { limit = nil return } limit = Limit(value) } } public func page(value: Int?) -> Self { var new = self new.page = value return new } public func pageSize(value: Int?) -> Self { var new = self new.pageSize = value return new } public var page: Int? { set { guard let value = newValue, limit = limit else { offset = nil return } offset = Offset(value * limit.value) } get { guard let offset = offset, limit = limit else { return nil } return offset.value / limit.value } } public func orderBy(values: [OrderBy]) -> Self { var new = self new.orderBy.append(contentsOf: values) return new } public func orderBy(values: OrderBy...) -> Self { return orderBy(values) } public func orderBy(values: [DeclaredFieldOrderBy]) -> Self { return orderBy(values.map { $0.normalize }) } public func orderBy(values: DeclaredFieldOrderBy...) -> Self { return orderBy(values) } public func limit(value: Int?) -> Self { var new = self if let value = value { new.limit = Limit(value) } else { new.limit = nil } return new } public func offset(value: Int?) -> Self { var new = self if let value = value { new.offset = Offset(value) } else { new.offset = nil } return new } } public protocol FilteredQuery: Query { var condition: Condition? { get set } } extension FilteredQuery { public func filter(condition: Condition) -> Self { let newCondition: Condition if let existing = self.condition { newCondition = .And([existing, condition]) } else { newCondition = condition } var new = self new.condition = newCondition return new } } public struct Join: QueryComponentsConvertible { public enum JoinType: QueryComponentsConvertible { case Inner case Outer case Left case Right public var queryComponents: QueryComponents { switch self { case .Inner: return "INNER" case .Outer: return "OUTER" case .Left: return "LEFT" case .Right: return "RIGHT" } } } public let tableName: String public let types: [JoinType] public let leftKey: String public let rightKey: String public init(_ tableName: String, type: [JoinType], leftKey: String, rightKey: String) { self.tableName = tableName self.types = type self.leftKey = leftKey self.rightKey = rightKey } public var queryComponents: QueryComponents { return QueryComponents(components: [ types.queryComponents, "JOIN", QueryComponents(strings: [ tableName, "ON", leftKey, "=", rightKey ] ) ] ) } }
[ -1 ]
b5ecacadf6a28948581c4f9a55effb731a49649c
39a5853300b5df3e1254a7e94cea011c2beaffb5
/DeepClearStream/oneViewController.swift
03468ded6975c3947463df3e87d7d1828626f45a
[]
no_license
jieunpark247/DeepClearStream
db9519d7205cfe21e6863695e01e31080263cc70
3e9448869ed793ee58c6c73023123f69cc006a83
refs/heads/master
2021-08-02T18:50:04.330458
2021-07-30T13:37:22
2021-07-30T13:37:22
155,527,803
0
0
null
null
null
null
UTF-8
Swift
false
false
2,605
swift
// // oneViewController.swift // DeepClearStream // // Created by PARKHASIK on 2018. 10. 27.. // Copyright © 2018년 Sungwon Lyu. All rights reserved. // import UIKit import fluid_slider class oneViewController: UIViewController { @IBOutlet weak var slider1: UISlider! @IBOutlet weak var label1: UILabel! @IBOutlet weak var slider2: UISlider! @IBOutlet weak var label2: UILabel! @IBOutlet weak var slider3: UISlider! @IBOutlet weak var label3: UILabel! @IBOutlet weak var slider4: UISlider! @IBOutlet weak var label4: UILabel! // var numbers = [1, 2, 3, 4, 5, 6, 7] //Add your values here var oldIndex = 0 var current1: Double = 0 var current2: Double = 0 var current3: Double = 0 var current4: Double = 0 @IBAction func sliderChange1(_ sender: UISlider) { current1 = Double(Int(sender.value)) label1.text = "\(current1)" } @IBAction func sliderChange2(_ sender: UISlider) { current2 = Double(Int(sender.value)) label2.text = "\(current2)" } @IBAction func sliderChange3(_ sender: UISlider) { current3 = Double(Int(sender.value)) label3.text = "\(current3)" } @IBAction func sliderChange4(_ sender: UISlider) { current4 = Double(Int(sender.value)) label4.text = "\(current4)" } override func viewDidLoad() { super.viewDidLoad() slider1.maximumValue = 80 slider2.maximumValue = 80 slider3.maximumValue = 80 slider4.maximumValue = 80 } @IBAction func oneBtn(_ sender: Any) { guard let uvc = self.storyboard?.instantiateViewController(withIdentifier:"ResultVC") as? ResultViewController else{ return } uvc.pcur1 = current1 uvc.pcur2 = current2 uvc.pcur3 = current3 uvc.pcur4 = current4 self.present(uvc,animated: true) //self.navigationController?.pushViewController(uvc, animated: true) } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ @IBAction func back(_ sender: Any) { self.presentingViewController?.dismiss(animated: true) // self.navigationController?.popViewController(animated: true) } }
[ -1 ]
5acc20bdb6a5c927f991ef9267dbf55f104f4c6b
3b9b1cfc2c739341f36398d2fade49a7c2841a09
/ToDo/FirstViewController.swift
9ca703ae53376dfca94e87ae407865700dfd8871
[]
no_license
DashDeipayan/To-Do-list-App-for-iOS
74b6786184796a5d51e7c516f0b7a871785c4098
0130276f1ab94b50efd662198ba17b9dd7b4c4d1
refs/heads/master
2020-03-19T11:11:51.479821
2018-06-07T07:27:12
2018-06-07T07:27:12
136,438,484
0
0
null
null
null
null
UTF-8
Swift
false
false
1,702
swift
// // FirstViewController.swift // ToDo // // Created by Deipayan Dash on 02/06/18. // Copyright © 2018 Deipayan Dash. All rights reserved. // import UIKit class FirstViewController: UIViewController,UITableViewDelegate, UITableViewDataSource { @IBOutlet var table: UITableView! var items:[String] = [] internal func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int{ return items.count } internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ let cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: "Cell") cell.textLabel?.text = (items[indexPath.row] ) return cell } func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == UITableViewCellEditingStyle.delete{ items.remove(at: indexPath.row) table.reloadData() UserDefaults.standard.set(items, forKey: "Items") } } override func viewDidLoad() { table.reloadData() super.viewDidLoad() } override func viewDidAppear(_ animated: Bool) { let ObjectItems = UserDefaults.standard.object(forKey: "Items") if let tempitems = ObjectItems as? [String]{ items = tempitems } table.reloadData() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
8116d3fb196f52dac2629a572711c6135c56e535
fa48f77bbea43ac321d70b0f0c2064d67dccc5dd
/Sources/GiveMeAnOffer/LeetCode/543.二叉树直径.swift
93915c8444ac665cf9a301a6243902f738984371
[]
no_license
AmatsuZero/GiveMeAnOffer
1bf73eca5cfbefe8d924b80777338179a20f8447
1e28b3927535070521407899ea02b3aaab6bd468
refs/heads/master
2020-05-24T22:26:46.675670
2019-08-17T04:07:32
2019-08-17T04:07:32
179,658,277
1
0
null
null
null
null
UTF-8
Swift
false
false
713
swift
// // 543.二叉树直径.swift // GiveMeAnOffer // // Created by 姜振华 on 2019/8/2. // /* 给定一棵二叉树,你需要计算它的直径长度。一棵二叉树的直径长度是任意两个结点路径长度中的最大值。这条路径可能穿过根结点。 示例 : 给定二叉树 1 / \ 2 3 / \ 4 5 返回 3, 它的长度是路径 [4,2,1,3] 或者 [5,2,1,3]。 注意:两结点之间的路径长度是以它们之间边的数目表示。 */ import Foundation extension TreeNode { public func diameter() -> Int { let res = (left?.maxDepth() ?? 0) + (right?.maxDepth() ?? 0) return max(res, max(left?.diameter() ?? 0, right?.diameter() ?? 0)) } }
[ -1 ]
978c9aed7f702c6003163317bb1b450ed4a3f784
47f29a91f63ea6d07564c388e7dc6b2ed8f89109
/mobile/ios/Swift.swift
ab690a9f9d584e0e6432287928c79920b2ccca34
[]
no_license
ascariandrea/BikeChain
bde37fae94f916f78d37c3eb917fac5045984b17
be19b6acfbf75a0435d217109c10fe088e6f277d
refs/heads/master
2020-04-05T20:28:01.587829
2019-04-25T09:58:24
2019-04-25T09:58:24
157,181,445
0
0
null
2019-04-25T09:58:25
2018-11-12T08:37:34
TypeScript
UTF-8
Swift
false
false
155
swift
// // Swift.swift // BikeChain // // Created by Andrea Ascari on 15/10/2018. // Copyright © 2018 Facebook. All rights reserved. // import Foundation
[ -1 ]
5537ac1c0dbe3df5843f43b712c57d7675c7f675
a035a05a7ca09a4fc0cc6506551febef34d366fd
/mes apps iOS 13/CountriesApp/CountriesApp/View/MyTableView.swift
e6a32641ccadb1c8c28e22e94006b1a4db4a154e
[]
no_license
Starkiller75000/SwiftProjects
2884ee204a640f2be34cd4d3a377d8ee5db39059
339049950e66cf2c2a3d1f3d306bcdab38a02abf
refs/heads/master
2022-11-14T18:13:28.155997
2020-07-02T13:40:23
2020-07-02T13:40:23
276,655,498
0
0
null
null
null
null
UTF-8
Swift
false
false
483
swift
// // MyTableView.swift // CountriesApp // // Created by Benoît Bouton on 19/06/2020. // Copyright © 2020 Benoît Bouton. All rights reserved. // import UIKit class MyTableView: UITableView { override init(frame: CGRect, style: UITableView.Style) { super.init(frame: frame, style: style) } required init?(coder: NSCoder) { super.init(coder: coder) setup() } func setup() { backgroundColor = .systemIndigo } }
[ -1 ]
d54a43c665cec12acb40582a4dc87227672a2af5
03a91e79f14ad713f9b51bc1cb56de1015af56e6
/BloodFunding/FinishBloodDonateViewController.swift
9a91ed6f9019660d4d8a88c251802e5d801da9ec
[]
no_license
diogoap/blood-funding
0815685cdd5695d80859fda8ab84639f277b3227
92868be5b539396775c2623cdc79cc6627726378
refs/heads/master
2021-10-11T02:33:20.408873
2019-01-21T12:52:36
2019-01-21T12:52:36
null
0
0
null
null
null
null
UTF-8
Swift
false
false
889
swift
// // FinishBloodDonateViewController.swift // BloodFunding // // Created by Diogo Augusto Pereira on 16/01/19. // Copyright © 2019 Diogo Augusto Pereira. All rights reserved. // import UIKit class FinishBloodDonateViewController: UIViewController { static var amountReceived = NSDecimalNumber(integerLiteral: 0) @IBAction func btnFinish(_ sender: UIButton) { self.navigationController?.popToRootViewController(animated: true); } @IBOutlet weak var lblValue: UILabel! override func viewDidLoad() { FinishBloodDonateViewController.amountReceived = Transactions.getAmoutToRecieve() lblValue.text = Transactions.formatValue(value: FinishBloodDonateViewController.amountReceived) Transactions.updateDonations() Transactions.donate(value: FinishBloodDonateViewController.amountReceived) } }
[ -1 ]
47334c7498bb9bfd716f08b70d2a3d7b791c8162
5892a724dd7bd84b61092f031a423390c106face
/WCEC/Helper/Libraries/TLPhotoPicker/TLPhotoCollectionViewCell.swift
6a0dc52c4e5880d2403883529d4ccccee774b718
[]
no_license
RandySuspis/wcec-ios
08330ea6bc39edb50ae5a789f296b343ac1d95cb
42c71cc8fab640aee17235605bf1cabdac6c6ab8
refs/heads/master
2020-07-10T11:15:33.646696
2019-08-26T02:53:05
2019-08-26T02:53:05
204,250,200
0
0
null
null
null
null
UTF-8
Swift
false
false
5,287
swift
// // TLPhotoCollectionViewCell.swift // TLPhotosPicker // // Created by wade.hawk on 2017. 5. 3.. // Copyright © 2017년 wade.hawk. All rights reserved. // import UIKit import PhotosUI open class TLPlayerView: UIView { @objc open var player: AVPlayer? { get { return playerLayer.player } set { playerLayer.player = newValue } } @objc open var playerLayer: AVPlayerLayer { return layer as! AVPlayerLayer } // Override UIView property override open static var layerClass: AnyClass { return AVPlayerLayer.self } } open class TLPhotoCollectionViewCell: UICollectionViewCell { private var observer: NSObjectProtocol? @IBOutlet open var imageView: UIImageView? @IBOutlet open var playerView: TLPlayerView? @IBOutlet open var livePhotoView: PHLivePhotoView? @IBOutlet open var liveBadgeImageView: UIImageView? @IBOutlet open var durationView: UIView? @IBOutlet open var durationLabel: UILabel? @IBOutlet open var indicator: UIActivityIndicatorView? @IBOutlet open var selectedView: UIView? @IBOutlet weak var selectedIcon: UIImageView! @IBOutlet open var selectedHeight: NSLayoutConstraint? @IBOutlet open var orderLabel: UILabel? @IBOutlet open var orderBgView: UIView? var configure = TLPhotosPickerConfigure() { didSet { self.selectedView?.setGradientColor(colors: [AppColor.colorWhite50().cgColor, AppColor.colorBlack50().cgColor]) } } @objc open var isCameraCell = false open var duration: TimeInterval? { didSet { guard let duration = self.duration else { return } self.selectedHeight?.constant = 10 self.durationLabel?.text = timeFormatted(timeInterval: duration) } } @objc open var player: AVPlayer? = nil { didSet { if self.configure.autoPlay == false { return } if self.player == nil { self.playerView?.playerLayer.player = nil if let oberver = self.observer { NotificationCenter.default.removeObserver(observer) } }else { self.playerView?.playerLayer.player = self.player self.observer = NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: self.player?.currentItem, queue: nil, using: { [weak self] (_) in DispatchQueue.main.async { guard let `self` = self else { return } self.player?.seek(to: kCMTimeZero) self.player?.play() self.player?.isMuted = self.configure.muteAudio } }) } } } @objc open var selectedAsset: Bool = false { willSet(newValue) { self.selectedView?.isHidden = !newValue self.selectedIcon?.isHidden = !newValue self.durationView?.backgroundColor = AppColor.colorBlack54() if !newValue { self.orderLabel?.text = "" } } } @objc open func timeFormatted(timeInterval: TimeInterval) -> String { let seconds: Int = lround(timeInterval) var hour: Int = 0 var minute: Int = Int(seconds/60) let second: Int = seconds % 60 if minute > 59 { hour = minute / 60 minute = minute % 60 return String(format: "%d:%d:%02d", hour, minute, second) } else { return String(format: "%d:%02d", minute, second) } } @objc open func popScaleAnim() { UIView.animate(withDuration: 0.1, animations: { self.transform = CGAffineTransform(scaleX: 1.05, y: 1.05) }) { _ in UIView.animate(withDuration: 0.1, animations: { self.transform = CGAffineTransform(scaleX: 1, y: 1) }) } } @objc open func selectedCell() { } @objc open func willDisplayCell() { } @objc open func endDisplayingCell() { } @objc func stopPlay() { if let player = self.player { player.pause() self.player = nil } self.livePhotoView?.isHidden = true self.livePhotoView?.stopPlayback() self.livePhotoView?.delegate = nil } deinit { // print("deinit TLPhotoCollectionViewCell") } override open func awakeFromNib() { super.awakeFromNib() self.playerView?.playerLayer.videoGravity = AVLayerVideoGravity.resizeAspectFill self.livePhotoView?.isHidden = true self.durationView?.isHidden = true self.selectedView?.isHidden = true self.selectedIcon?.isHidden = true } override open func prepareForReuse() { super.prepareForReuse() stopPlay() self.livePhotoView?.isHidden = true self.livePhotoView?.delegate = nil self.durationView?.isHidden = true self.durationView?.backgroundColor = AppColor.colorBlack54() self.selectedHeight?.constant = 10 self.selectedAsset = false } }
[ 218939, 206012 ]
323ed4c360ac676d8c754c40691dec245de996d6
fb5b1504eb5b24abca61bcce4e8556a912738809
/build/src/Models/ExternalContactsContactChangedTopicContact.swift
2d22d37ab24b81ea0fa84f05513e7e4afdbcefdf
[ "MIT" ]
permissive
MyPureCloud/platform-client-sdk-ios
135f1d124730ecc7e47e68df90a3215ba4ba6880
04ee2b0f5d3f8ad73078eb713427cb6f9e164dda
refs/heads/master
2023-08-17T05:03:39.340378
2023-08-15T06:49:56
2023-08-15T06:49:56
130,367,583
0
2
null
null
null
null
UTF-8
Swift
false
false
4,558
swift
// // ExternalContactsContactChangedTopicContact.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen // import Foundation public class ExternalContactsContactChangedTopicContact: Codable { public enum ModelType: String, Codable { case ephemeral = "Ephemeral" case identified = "Identified" case curated = "Curated" } public var _id: String? public var externalOrganization: ExternalContactsContactChangedTopicExternalOrganization? public var type: ModelType? public var firstName: String? public var middleName: String? public var lastName: String? public var salutation: String? public var title: String? public var workPhone: ExternalContactsContactChangedTopicPhoneNumber? public var cellPhone: ExternalContactsContactChangedTopicPhoneNumber? public var homePhone: ExternalContactsContactChangedTopicPhoneNumber? public var otherPhone: ExternalContactsContactChangedTopicPhoneNumber? public var workEmail: String? public var personalEmail: String? public var otherEmail: String? public var address: ExternalContactsContactChangedTopicContactAddress? public var surveyOptOut: Bool? public var externalSystemUrl: String? public var twitterId: ExternalContactsContactChangedTopicTwitterId? public var lineId: ExternalContactsContactChangedTopicLineId? public var whatsAppId: ExternalContactsContactChangedTopicWhatsAppId? public var facebookId: ExternalContactsContactChangedTopicFacebookId? public var instagramId: ExternalContactsContactChangedTopicInstagramId? public var schema: ExternalContactsContactChangedTopicDataSchema? public var customFields: [String:JSON]? public var createDate: Date? public var modifyDate: Date? public init(_id: String?, externalOrganization: ExternalContactsContactChangedTopicExternalOrganization?, type: ModelType?, firstName: String?, middleName: String?, lastName: String?, salutation: String?, title: String?, workPhone: ExternalContactsContactChangedTopicPhoneNumber?, cellPhone: ExternalContactsContactChangedTopicPhoneNumber?, homePhone: ExternalContactsContactChangedTopicPhoneNumber?, otherPhone: ExternalContactsContactChangedTopicPhoneNumber?, workEmail: String?, personalEmail: String?, otherEmail: String?, address: ExternalContactsContactChangedTopicContactAddress?, surveyOptOut: Bool?, externalSystemUrl: String?, twitterId: ExternalContactsContactChangedTopicTwitterId?, lineId: ExternalContactsContactChangedTopicLineId?, whatsAppId: ExternalContactsContactChangedTopicWhatsAppId?, facebookId: ExternalContactsContactChangedTopicFacebookId?, instagramId: ExternalContactsContactChangedTopicInstagramId?, schema: ExternalContactsContactChangedTopicDataSchema?, customFields: [String:JSON]?, createDate: Date?, modifyDate: Date?) { self._id = _id self.externalOrganization = externalOrganization self.type = type self.firstName = firstName self.middleName = middleName self.lastName = lastName self.salutation = salutation self.title = title self.workPhone = workPhone self.cellPhone = cellPhone self.homePhone = homePhone self.otherPhone = otherPhone self.workEmail = workEmail self.personalEmail = personalEmail self.otherEmail = otherEmail self.address = address self.surveyOptOut = surveyOptOut self.externalSystemUrl = externalSystemUrl self.twitterId = twitterId self.lineId = lineId self.whatsAppId = whatsAppId self.facebookId = facebookId self.instagramId = instagramId self.schema = schema self.customFields = customFields self.createDate = createDate self.modifyDate = modifyDate } public enum CodingKeys: String, CodingKey { case _id = "id" case externalOrganization case type case firstName case middleName case lastName case salutation case title case workPhone case cellPhone case homePhone case otherPhone case workEmail case personalEmail case otherEmail case address case surveyOptOut case externalSystemUrl case twitterId case lineId case whatsAppId case facebookId case instagramId case schema case customFields case createDate case modifyDate } }
[ -1 ]
e3a37aecb735a9fbdb4f6d2b52be243b301e67ab
6112d64ccf1619a73b2310cb5f51eb5475b256a1
/Super Indie Runner/Helper Files/ParticleHelper.swift
e456713aabe3b43be40b8be7230dd71d6a85e46c
[]
no_license
ShaneBeee/Super-Indie-Runner
7fcbbd9c4cee7c1a411d660d33875e3b0cc4e39c
bf2fd064b92f2c6def7f9e84cd3d90a3d36cf6d4
refs/heads/master
2020-11-24T20:34:43.120366
2019-12-16T11:01:57
2019-12-16T11:01:57
228,331,917
0
0
null
null
null
null
UTF-8
Swift
false
false
779
swift
// // ParticleHelper.swift // Super Indie Runner // // Created by ShaneBee on 2019-12-06. // Copyright © 2019 ShaneBee. All rights reserved. // import SpriteKit class ParticleHelper { static func addParticleEffect(name: String, particlePositionRage: CGVector, position: CGPoint) -> SKEmitterNode? { if let emitter = SKEmitterNode(fileNamed: name) { emitter.particlePositionRange = particlePositionRage emitter.position = position emitter.name = name return emitter } return nil } static func removeParticleEffect(name: String, from node: SKNode) { let emitters = node[name] for emitter in emitters { emitter.removeFromParent() } } }
[ -1 ]
551c31fbdfaea531412513b332fdfbbfcbc1ddcb
a9217afcd59a05afe35b0ae24339abac1b375709
/ideaPods/Views/ScheduleView.swift
267ff4ffa02973b3cf5eaa27da0f84f3200f4140
[]
no_license
hujewelz/IdeaPod-SwiftUI
9a1edbd23fb100708de019a48e3d0cb9229f2018
4c24601383de2e29b1fc5c77f757ce47ac3127d1
refs/heads/master
2023-05-31T05:38:40.840204
2021-06-29T08:16:01
2021-06-29T08:16:01
375,991,077
0
0
null
null
null
null
UTF-8
Swift
false
false
1,970
swift
// // ScheduleView.swift // ideaPods // // Created by huluobo on 2021/6/8. // import SwiftUI struct ScheduleView: View { var body: some View { NavigationView { ScrollView { LazyVStack { ForEach(1...10, id: \.self) { count in NavigationLink(destination: ScheduleDetail()) { ScheduleCell() } } } .padding() } .navigationBarItems(trailing: Button(action: {}) { Image(systemName: "plus").foregroundColor(.primary) }) .navigationTitle("2021年6月") } } } struct ScheduleCell: View { var body: some View { HStack(alignment: .top) { VStack { Text("周三").font(.caption) Text("09") .font(.title3.bold()) .padding(.vertical, 1) } .padding(.trailing, 16) ZStack(alignment: .topLeading) { Text("我的预订") .font(.system(size: 10)) .padding(.vertical, 2) .padding(.horizontal, 4) .background(Color.blue.opacity(0.4)) .offset(x: -12, y: -12) HStack { VStack(alignment: .leading, spacing: 4) { Text("空中会议室") .font(.headline) Label("14:30-15:30 60分钟", systemImage: "clock") .font(.footnote) Label("ideaPod guomao", systemImage: "building.2.crop.circle") .font(.footnote) } Spacer() Color.yellow .frame(width: 99, height: 69) .cornerRadius(6) } .padding(.top, 8) } .padding(12) .background(Color.green.opacity(0.1)) .cornerRadius(6) } .foregroundColor(Color.primary) .padding(.bottom, 8) } } struct ScheduleView_Previews: PreviewProvider { static var previews: some View { ScheduleView().preferredColorScheme(.dark) ScheduleView().preferredColorScheme(.light) } }
[ -1 ]
ea0fc1a233dc055f1b9f57f82007200e43d38720
724ff72f34d611647925ce989e52c70179ebb6c4
/secure-ios-app/home/HomeBuilder.swift
2c1d528bf20bcfa303957d929d3f1e5be1ae34a9
[]
no_license
jhellar/mobile-security-ios-template
05af47531948c515904a47dd18e1f8cb8d328cda
03e7b16fe6a736646cd66681392f178dc1372e1f
refs/heads/master
2020-03-16T21:38:49.872124
2018-04-18T14:07:43
2018-04-18T14:07:43
133,008,202
0
0
null
2018-05-11T07:54:19
2018-05-11T07:54:19
null
UTF-8
Swift
false
false
711
swift
// // HomeBuilder.swift // secure-ios-app // // Created by Wei Li on 08/11/2017. // Copyright © 2017 Wei Li. All rights reserved. // import Foundation import UIKit /* Builder class for the home module. This class should be used to build the home module, and the caller should be able to pass the required dependencies to it. */ class HomeBuilder { func build() -> HomeRouter { let mainStoryboard = UIStoryboard(name: "Main", bundle: nil) let viewController = mainStoryboard.instantiateViewController(withIdentifier: "HomeViewController") as! HomeViewController let homeRouter = HomeRouterImpl(viewController: viewController) return homeRouter } }
[ -1 ]
3a38a66da31ffc741d2c905ed4fe51414c26ea26
142f07ca6c5d812dd6c8094349ceea17ff37a103
/iOS/Daily Care Records/Daily Care Records/MVC/Controller/SearchVC.swift
c02d031223030c42ff0b0c28724c6b8c3606ee65
[]
no_license
techwinlabs1/Medicode
f5f328a6475e422126e927855b679d377464a95f
1097ee58241ce9919b1ac40a584cde8c97a8b629
refs/heads/master
2020-03-31T09:20:20.078080
2018-10-08T14:22:01
2018-10-08T14:22:01
null
0
0
null
null
null
null
UTF-8
Swift
false
false
11,487
swift
// // SearchVC.swift // Medication // // Created by Techwin Labs on 4/5/18. // Copyright © 2018 techwin labs. All rights reserved. // import UIKit import CoreLocation class SearchVC: UIViewController, UITableViewDataSource,UITableViewDelegate, LocationProtocol, UISearchBarDelegate,SWRevealViewControllerDelegate , UIScrollViewDelegate { @IBOutlet weak var tblSearch: UITableView! @IBOutlet weak var searchBar: UISearchBar! private var clientArray : [Client] = [Client]() // MARK:- Life cycles override func viewDidLoad() { super.viewDidLoad() searchBarDummy = self.searchBar let revealViewController = self.revealViewController() revealViewController?.delegate = self utilityMgr.addNavigationBar(leftImage: UIImage(named:"menu-button") , rightImage: nil,titleText: "Search", controller: self, isReveal : true) // tblSearch.register(UINib.init(nibName: "SearchCell", bundle: nil), forCellReuseIdentifier: "SearchCell") tblSearch.register(UINib.init(nibName: "ClientCell", bundle: nil), forCellReuseIdentifier: "ClientCell") LocationManager.sharedMgr.request() LocationManager.sharedMgr.locDelegate = self // Do any additional setup after loading the view. } override func viewWillAppear(_ animated: Bool) { searchBarDummy?.isUserInteractionEnabled = true self.searchBar.isUserInteractionEnabled = true } override func viewWillDisappear(_ animated: Bool) { self.view.endEditing(true) super.viewWillDisappear(true) LocationManager.sharedMgr.locDelegate = nil } // MARK:- Server calls private func webserviceCall(param:[String:Any]?,link:String){ if param != nil { apiMgr.PostApi(param!, webserviceURL: link, success: { (response) in utilityMgr.hideIndicator() let methodName = response["method"] as! String if methodName == "search_clients" { print(response) DispatchQueue.main.async { self.clientArray.removeAll() for i in 0..<(response["data"] as! NSArray).count { let dict = (response["data"] as! NSArray)[i] as! NSDictionary let d = Client() d.client_id = dict["client_id"] as? String d.firstname = dict["firstname"] as? String d.lastname = dict["lastname"] as? String d.dob = dict["dob"] as? String d.gender = dict["gender"] as? String d.address = dict["address"] as? String d.postcode = dict["postcode"] as? String d.client_picture = dict["client_picture"] as? String d.emergency_contact = dict["emergency_contact"] as? String d.personal_information = dict["personal_information"] as? String d.latitude = dict["latitude"] as? String d.longitude = dict["longitude"] as? String d.distance = dict["distance"] as? String self.clientArray.append(d) } self.tblSearch.reloadData() DispatchQueue.main.asyncAfter(deadline: .now()+0.1, execute: { // let cell : SearchCell = self.tblSearch.cellForRow(at: IndexPath(row: 0, section: 0)) as! SearchCell // cell.searchField.becomeFirstResponder() self.searchBar.becomeFirstResponder() }) } } }, failure: { (error) in utilityMgr.hideIndicator() print(error ?? 0) self.kAlertView(title: APPNAME, message: Constants.Register.ERROR_MESSAGE) }) } else { apiMgr.GetApi(webserviceURL: link, success: { (response) in utilityMgr.hideIndicator() let methodName = response["method"] as! String if methodName == "get_suggestedClients" { DispatchQueue.main.async { self.clientArray.removeAll() for i in 0..<(response["data"] as! NSArray).count { let dict = (response["data"] as! NSArray)[i] as! NSDictionary let d = Client() d.client_id = dict["client_id"] as? String d.firstname = dict["firstname"] as? String d.lastname = dict["lastname"] as? String d.dob = dict["dob"] as? String d.gender = dict["gender"] as? String d.address = dict["address"] as? String d.postcode = dict["postcode"] as? String d.client_picture = dict["client_picture"] as? String d.emergency_contact = dict["emergency_contact"] as? String d.personal_information = dict["personal_information"] as? String d.latitude = dict["latitude"] as? String d.longitude = dict["longitude"] as? String d.distance = dict["distance"] as? String self.clientArray.append(d) } self.tblSearch.reloadData() } } }, failure: { (error) in utilityMgr.hideIndicator() print(error ?? 0) self.kAlertView(title: APPNAME, message: Constants.Register.ERROR_MESSAGE) }) } } private func getSuggestedClients(){ DispatchQueue.global(qos: .background).async { utilityMgr.showIndicator() self.webserviceCall(param: nil, link: UrlConstants.BASE_URL+UrlConstants.get_suggestedClients+"/\(currentLatitude)"+"/"+"/\(currentLongitude)") } } private func searchClients(key:String){ DispatchQueue.global(qos: .background).async { self.webserviceCall(param: ["search_keyword":key], link: UrlConstants.BASE_URL+UrlConstants.search_clients) } } // MARK:- Scrollview delegate func scrollViewDidScroll(_ scrollView: UIScrollView) { DispatchQueue.main.async { self.dismissKeyboard() } } // MARK:- Searchbar callback func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { if searchText != "" { searchClients(key: searchText) } } func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { dismissKeyboard() if searchBar.text != ""{ searchClients(key: searchBar.text!) } } // MARK:- Location callbacks func success(locations: [CLLocation], manager: CLLocationManager) { if locations.count > 0 { manager.stopUpdatingLocation() currentLatitude = (locations.last?.coordinate.latitude)! currentLongitude = (locations.last?.coordinate.longitude)! getSuggestedClients() } } func failed(error: Error, manager: CLLocationManager) { print("failed to get location") if Platform.isSimulator { currentLatitude = 30.708622499999997 // 30.7312 // 33.9249 currentLongitude = 76.69200769999999 getSuggestedClients() // 76.7182 // 18.4241 } } // MARK:- SWRevealViewController Delegates func revealController(_ revealController: SWRevealViewController!, willMoveTo position: FrontViewPosition) { if position == .right { self.dismissKeyboard() } } // MARK:- Tableview delegate and datasource methods func numberOfSections(in tableView: UITableView) -> Int { return 1 //2 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return clientArray.count //section == 0 ? 1 : clientArray.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { // if indexPath.section == 0 { // let cell : SearchCell! = tableView.dequeueReusableCell(withIdentifier: "SearchCell") as! SearchCell! // cell.searchField.becomeFirstResponder() // cell.searchField.delegate = self // return cell // } else { let cell : ClientCell! = tableView.dequeueReusableCell(withIdentifier: "ClientCell") as! ClientCell! cell.imgProfile.sd_setImage(with: URL(string: clientArray[indexPath.row].client_picture!), placeholderImage: profilePlaceholderImage, options: [], completed: nil) cell.lblName.text = clientArray[indexPath.row].firstname! + " " + clientArray[indexPath.row].lastname! cell.lblAddress.text = clientArray[indexPath.row].address! return cell // } } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 80 //indexPath.section == 0 ? 44 : 80 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: false) let vc = self.storyboard?.instantiateViewController(withIdentifier: "CarerDetailVC") as! CarerDetailVC vc.client_id = clientArray[indexPath.row].client_id! vc.titleString = clientArray[indexPath.row].firstname! + " " + clientArray[indexPath.row].lastname! vc.postCode = clientArray[indexPath.row].postcode! self.pushview(objtype: vc) } func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { return "Suggested Clients" //section == 1 ? "Suggested Clients" : nil } func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) { if let headerView = view as? UITableViewHeaderFooterView { headerView.textLabel?.textAlignment = .center } } func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 44 //section == 1 ? 44 : .leastNormalMagnitude } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func getCurrentLocation(_ sender: UIButton) { let geocoder = CLGeocoder() let userLocation :CLLocation = CLLocation(latitude: currentLatitude, longitude: currentLongitude) geocoder.reverseGeocodeLocation(userLocation) { (placemarks, error) in utilityMgr.hideIndicator() if (error != nil){ print("error in reverseGeocode") } let placemark = placemarks! as [CLPlacemark] if placemark.count>0{ let placemark = placemarks![0] print(placemark.postalCode!) print(placemark.subLocality!) self.searchBar.text = "\(placemark.postalCode!)"+" "+"\(placemark.subLocality!)" } } } }
[ -1 ]
9ad6836e50fd8462690fd62ebb09b3dd027b215d
f3805b68207d8b3102b1c4815d8528bcb8bf8263
/Spotagory/controllers/signin, signup, whatsnew/SignupTutorialViewController.swift
e8c79cb5983fc52cc3537d3e37bce238701bf806
[]
no_license
yoshidaalex/Spotagory
b2f7c8c0cdbe730a83db65dfc9ecf928e836f9ec
504fe47c5b1e03169fccab331e9e94ffb2d27b66
refs/heads/master
2021-01-19T22:26:13.306511
2017-04-20T03:02:22
2017-04-20T03:02:22
88,814,093
0
0
null
null
null
null
UTF-8
Swift
false
false
5,520
swift
// // SignupTutorialViewController.swift // Spotagory // // Created by Messia Engineer on 8/24/16. // Copyright © 2016 Spotagory. All rights reserved. // import UIKit import iCarousel class SignupTutorialViewController: UIViewController, iCarouselDataSource, iCarouselDelegate { @IBOutlet weak var labelTitle: UILabel! @IBOutlet weak var iCarouselMain: iCarousel! @IBOutlet weak var buttonGetStarted: UIButton! @IBOutlet weak var pageControl: UIPageControl! let welcomeImages = ["img_welcome_01", "img_welcome_02", "img_welcome_03", "img_welcome_04"] let welcomeTitles = ["Explore New Places", "The Science Of Superstitions", "The Amazing Hubble", "How To Build A PC"] let welcomeDescriptions = ["Well, ma, we talked about this, we're not gonna go to the lake, the car's wrecked. Believe me, Marty, you're better off not having to worry.", "Well, ma, we talked about this, we're not gonna go to the lake, the car's wrecked. Believe me, Marty, you're better off not having to worry.", "Well, ma, we talked about this, we're not gonna go to the lake, the car's wrecked. Believe me, Marty, you're better off not having to worry.", "Well, ma, we talked about this, we're not gonna go to the lake, the car's wrecked. Believe me, Marty, you're better off not having to worry."] override func viewDidLoad() { super.viewDidLoad() self.iCarouselMain.pagingEnabled = true self.pageControl.currentPage = 1 } override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) self.navigationController?.navigationBarHidden = true self.navigationController?.interactivePopGestureRecognizer?.enabled = false } override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) self.buttonGetStarted.layer.borderColor = UIColor.whiteColor().CGColor self.buttonGetStarted.layer.borderWidth = 1 self.buttonGetStarted.layer.cornerRadius = self.buttonGetStarted.frame.size.height / 2 } func numberOfItemsInCarousel(carousel: iCarousel) -> Int { return 4 } func carousel(carousel: iCarousel, viewForItemAtIndex index: Int, reusingView view: UIView?) -> UIView { let view = UIView(frame: CGRectMake(0, 0, self.iCarouselMain.frame.size.width - 60, self.iCarouselMain.frame.size.height)) view.layer.cornerRadius = 10 view.backgroundColor = UIColor.whiteColor() view.layer.masksToBounds = true let imageView = UIImageView(frame: CGRectMake(0, 0, self.iCarouselMain.frame.size.width - 60, self.iCarouselMain.frame.size.width - 60)) imageView.image = UIImage(named: welcomeImages[index]) view.addSubview(imageView) let titleLabel = UILabel(frame: CGRectMake(0, self.iCarouselMain.frame.size.width - 60, self.iCarouselMain.frame.size.width - 60, (self.iCarouselMain.frame.size.height - self.iCarouselMain.frame.size.width + 60) * 0.4)) titleLabel.textColor = UIColor.blackColor() titleLabel.font = UIFont(name: "BrandonGrotesque-Regular", size: 20) titleLabel.textAlignment = .Center titleLabel.text = self.welcomeTitles[index] view.addSubview(titleLabel) let descriptionLabel = UILabel(frame: CGRectMake(20, self.iCarouselMain.frame.size.width - 60 + (self.iCarouselMain.frame.size.height - self.iCarouselMain.frame.size.width + 60) * 0.4, self.iCarouselMain.frame.size.width - 60 - 40, (self.iCarouselMain.frame.size.height - self.iCarouselMain.frame.size.width + 60) * 0.55)) descriptionLabel.textColor = UIColor.blackColor() descriptionLabel.font = UIFont(name: "BrandonGrotesque-Regular", size: 12.5) descriptionLabel.textAlignment = .Center descriptionLabel.numberOfLines = 0 descriptionLabel.text = self.welcomeDescriptions[index] view.addSubview(descriptionLabel) return view } func carouselItemWidth(carousel: iCarousel) -> CGFloat { return self.iCarouselMain.frame.size.width - 40 } func carousel(carousel: iCarousel, valueForOption option: iCarouselOption, withDefault value: CGFloat) -> CGFloat { switch option { case .FadeMin: return 0 case .FadeMax: return 0 case .FadeRange: return 2 default: return value } } func carouselCurrentItemIndexDidChange(carousel: iCarousel) { self.pageControl.currentPage = carousel.currentItemIndex + 1 } func carouselDidScroll(carousel: iCarousel) { if carousel.scrollOffset < -0.5 { self.performSelector(#selector(goBack), withObject: nil, afterDelay: 0.1) } else if carousel.scrollOffset > 3.5 { self.performSelector(#selector(goSignUp), withObject: nil, afterDelay: 0.1) } } func goBack() { if self.pageControl.currentPage == 1 { self.pageControl.currentPage = 0 self.navigationController?.popViewControllerAnimated(true) } } func goSignUp() { if self.pageControl.currentPage == 4 { self.pageControl.currentPage = 5 self.performSegueWithIdentifier("sid_signup", sender: nil) } } }
[ -1 ]
431be7ebe205ec01ea4276d4ed2478526e267d14
80d434c16d2d0aa16279fc8bef724a857493c27e
/algorithms/swift/345-reverse-vowels-of-a-string.swift
82b0f8848f7883e02eb31a9faa8f573db76dc8c8
[]
no_license
tabassumtamanna/leet-code-solutions
0531d230c85cd8474270be37d9e783959bf01e90
765bf5b1c73e0aa5794cf9c4c8ffb9407807087e
refs/heads/main
2023-06-09T18:01:38.692251
2021-06-24T19:40:43
2021-06-24T19:40:43
335,829,951
0
0
null
null
null
null
UTF-8
Swift
false
false
1,417
swift
// 345. Reverse Vowels of a String // Source : https://leetcode.com/problems/reverse-vowels-of-a-string/ /************************************************************************************************** Given a string s, reverse only all the vowels in the string and return it. The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both cases. Example 1: Input: s = "hello" Output: "holle" Example 2: Input: s = "leetcode" Output: "leotcede" Constraints: 1 <= s.length <= 3 * 105 s consist of printable ASCII characters. **************************************************************************************************/ import Foundation class Solution { func reverseVowels(_ s: String) -> String { let vowels = ["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"] var list = Array(s) var j = list.count-1 for i in 0..<list.count { if vowels.contains(String(list[i])){ while j>i { if vowels.contains(String(list[j])){ (list[i], list[j]) = (list[j], list[i]) j = j - 1 break } j = j - 1 } } } return String(list) } }
[ -1 ]
01a5a2c0350e451002fc6e8a4909d393a9f79a76
83f5ec964599d903e85598399d241f33a8136f39
/Sources/AnotherTheMovieDB/Genre/GenreServiceProtocol.swift
c270563426c7c7590ec54bde6f0a79d6d935868a
[]
no_license
rexcosta/AnotherTheMovieDB
adec71647b9124a2afcb4a8ad26c1ddbdea2a97f
c4e9634092efad233d537460c8cebdfd56a42f2d
refs/heads/master
2022-09-23T09:53:39.968724
2020-06-06T20:07:36
2020-06-06T20:07:36
265,675,821
0
0
null
null
null
null
UTF-8
Swift
false
false
1,436
swift
// // The MIT License (MIT) // // Copyright (c) 2020 Effective Like ABoss, David Costa Gonçalves // // 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 AnotherSwiftCommonLib import Combine public protocol GenreServiceProtocol { func genres() -> AnyPublisher<[GenreModel], AnotherTheMovieDbError> func findGenre(with id: Int) -> AnyPublisher<GenreModel?, AnotherTheMovieDbError> }
[ 194560, 407569, 407578, 61478, 98344, 98345, 98347, 174135, 354359, 174139, 124988, 354367, 229441, 229443, 174148, 229444, 395334, 378951, 174152, 229449, 106580, 106584, 106586, 106587, 112730, 125048, 229504, 125057, 125064, 125065, 125066, 235658, 125087, 125089, 215205, 215206, 215208, 215211, 215212, 215215, 193, 241862, 317638, 317640, 241868, 241873, 262353, 241878, 262359, 241879, 106713, 106714, 262366, 106720, 106725, 241904, 176370, 241907, 176373, 260342, 106742, 176378, 141566, 141569, 141576, 241928, 241931, 141583, 241937, 141588, 12565, 227607, 227608, 141593, 141594, 227609, 227610, 227612, 141598, 141599, 141600, 227613, 241952, 241955, 227614, 141606, 141607, 141609, 241961, 241963, 141612, 289068, 12592, 215356, 141629, 141632, 141634, 213319, 213320, 141641, 141642, 262475, 141646, 241998, 141650, 141655, 282967, 282969, 141661, 168285, 172391, 141674, 141677, 141679, 141681, 375154, 190842, 430458, 190844, 375165, 375168, 375172, 141701, 430471, 430475, 141711, 197016, 197018, 197019, 197021, 223649, 197029, 168358, 303550, 160208, 305638, 272872, 223741, 191007, 272931, 57893, 272934, 57896, 420394, 57899, 57900, 57903, 57904, 324145, 57905, 57906, 158257, 336445, 336450, 336451, 336453, 55890, 336466, 336470, 336472, 336473, 55899, 336480, 336481, 111202, 272994, 336482, 336488, 273003, 273021, 273023, 297615, 297625, 135854, 135861, 242361, 297664, 244421, 244430, 66256, 66257, 66261, 62174, 127727, 127729, 244469, 244470, 164601, 316155, 142076, 334590, 334591, 142083, 142087, 318218, 334602, 318220, 334604, 334606, 334607, 142095, 318223, 318228, 318233, 318234, 318239, 187173, 318246, 187175, 187178, 396095, 396098, 396104, 396114, 396118, 396119, 396120, 396123, 396126, 396127, 299880, 60304, 60318, 60322, 60323, 60331, 23469, 23470, 213935, 23472, 185265, 23473, 23474, 23475, 60337, 185280, 281538, 185286, 242658, 23531, 203755, 242675, 437256, 437258, 437269, 437273, 437277, 437281, 3119, 437298, 187442, 187444, 144435, 437305, 97339, 341054, 341055, 437310, 341057, 341058, 97347, 341060, 437314, 222278, 341062, 341063, 341066, 437326, 185428, 285781, 312407, 312413, 437349, 185446, 312423, 115817, 115819, 242796, 312427, 437356, 115825, 437364, 437371, 294012, 294016, 437390, 437392, 437396, 312473, 312474, 40089, 312476, 40092, 312478, 312479, 228510, 40095, 40096, 312483, 228512, 40098, 40101, 312480, 437415, 312489, 437416, 40105, 189612, 40109, 40110, 437424, 437426, 437428, 312501, 312502, 437430, 312504, 437432, 189621, 437431, 437433, 437436, 322751, 437440, 38081, 437443, 437445, 437446, 292041, 437450, 292042, 437451, 38092, 437453, 437458, 203990, 203991, 203993, 152795, 204000, 204003, 339176, 339177, 208117, 152821, 294138, 279818, 206094, 279823, 294162, 206108, 206109, 425247, 27948, 181559, 173368, 173379, 173394, 378206, 222566, 222573, 173425, 222577, 222579, 222581, 222582, 222587, 54655, 222591, 222597, 222601, 54666, 222604, 222605, 222606, 54673, 54678, 54680, 279969, 54698, 153009, 157118, 298431, 212420, 370118, 153037, 153049, 153051, 112111, 112115, 112117, 112120, 40451, 112131, 40453, 280068, 40455, 40457, 40458, 40459, 40460, 40463, 112144, 112145, 40466, 40469, 40471, 40474, 40475, 40477, 40479, 40482, 316993, 173634, 173635, 173639, 319085, 319088, 319089, 319094, 52857, 319098, 319101, 319103, 175746, 394899, 52886, 52887, 52889, 394908, 394910, 104095, 52896, 52897, 52899, 52900, 151218, 394935, 321210, 292544, 108234, 34516, 108245, 212694, 296660, 34522, 34531, 296679, 34538, 296682, 296687, 296691, 151285, 296694, 108279, 108281, 216826, 216828, 296700, 296701, 296703, 296704, 216834, 296708, 296710, 276232, 313099, 276236, 313102, 313108, 313111, 159518, 321342, 120655, 120656, 218959, 218962, 223064, 223065, 223069, 292705, 223075, 223076, 237413, 180070, 292709, 128874, 169835, 128875, 227180, 223087, 227183, 128881, 128884, 227188, 141188, 141189, 141202, 169879, 141208, 141220, 108460, 108462, 141246, 319426, 141253, 319432, 59349, 141272, 141273, 174063, 174066, 174067, 174074, 395259, 194559 ]
ce1884a5cefd93e8a378732c5aa1221f50408792
0a3025a2ac9373a99ae9afeca782a9c9bb8c2d40
/Sources/SwiftLibtcod/Sys.swift
f7219dec7c82c90c284bb9eb108c07c0aaa40ae9
[]
no_license
jrappeneker/SwiftLibtcod
bc30090603c8236fc422d2f1ea25dda346d60bd6
162e7fcaabc3ca87085326449415438a79ab888c
refs/heads/master
2022-10-19T15:43:42.365988
2020-06-12T12:05:40
2020-06-12T12:05:40
271,702,925
0
0
null
null
null
null
UTF-8
Swift
false
false
1,243
swift
// // Sys.swift // // // Created by Joshua Rappeneker on 2020/06/12. // import Foundation import libtcod public struct Sys { public struct EventType : OptionSet { public let rawValue: Int32 public init(rawValue:Int32) { self.rawValue = rawValue } public static let none = EventType([]) public static let keyPress = EventType(rawValue: 1) public static let keyRelease = EventType(rawValue: 2) public static let key : EventType = [.keyPress, .keyRelease] public static let mouseMove = EventType(rawValue: 4) public static let mousePress = EventType(rawValue: 8) public static let mouseRelease = EventType(rawValue: 16) public static let mouse : EventType = [.mouseMove, .mousePress, .mouseRelease] } public static func checkForEvent(eventType:EventType = EventType.none, key keyCallBack:((TCOD_key_t)->())?=nil, mouse mouseCallback:((TCOD_mouse_t)->())?=nil) { var key : TCOD_key_t = TCOD_key_t() var mouse : TCOD_mouse_t = TCOD_mouse_t() TCOD_sys_check_for_event(eventType.rawValue, &key, &mouse) keyCallBack?(key) mouseCallback?(mouse) } }
[ -1 ]
3ceb3421362e13d0ceb3c1df4add3b5718bcbaa6
b0676ad160449a7a9f09bb2e5a7cca5dc6406e5a
/Game/Game/Weapons/Hammer.swift
593c75070e48e11f4e7c781b8b1af5020bf5614c
[]
no_license
Inchul87/P3-Game
377f25d96f366f155d58dff5e7845801bbf5db6a
40fd481bc9b5c84c1e31e30b5fd5d07b492dce3c
refs/heads/master
2020-04-17T01:18:21.225621
2019-03-21T15:05:53
2019-03-21T15:05:53
166,086,377
0
0
null
null
null
null
UTF-8
Swift
false
false
96
swift
class Hammer: Weapon { init() { super.init(weaponType: "hammer", damage: 5) } }
[ -1 ]