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
190a382a19b9efb5930e49f592fc681aff34c780
45fd9702861a673d59dca094882ab9b33ed964f1
/PintrestImageLoader/PintrestImageLoader/Models/Response.swift
e40955de518ef0ccc0e64bda18f915f8fd7f2c5c
[]
no_license
DaRkViRuS2012/NAsyncLoader
3444924d96168999affde93987b05cc23c971c61
c58427a96d2d5ab236188be66b6cd2690e92118a
refs/heads/master
2020-05-27T04:29:09.540207
2019-05-25T09:53:54
2019-05-25T09:53:54
188,426,304
0
0
null
null
null
null
UTF-8
Swift
false
false
2,449
swift
// // Response.swift // PinterestImageLoader // // Created by Nour on 5/19/19. // Copyright © 2019 Nour . All rights reserved. // import Foundation import NAsyncLoader /* "id": "0", "author": "Alejandro Escamilla", "width": 5616, "height": 3744, "url": "https://unsplash.com/...", "download_url": "https://picsum.photos/..." */ class Response : BaseModel { let id : String? let created_at : String? let width : Int? let height : Int? let color : String? let likes : Int? let liked_by_user : Bool? let user : User? let current_user_collections : [String]? let urls : Urls? let categories : [Categories]? let links : Links? let author: String? let url : String? let download_url : String? enum CodingKeys: String, CodingKey { case id = "id" case created_at = "created_at" case width = "width" case height = "height" case color = "color" case likes = "likes" case liked_by_user = "liked_by_user" case user = "user" case current_user_collections = "current_user_collections" case urls = "urls" case categories = "categories" case links = "links" case author = "author" case url = "url" case download_url = "download_url" } required init(from decoder: Decoder) throws { let values = try decoder.container(keyedBy: CodingKeys.self) id = try values.decodeIfPresent(String.self, forKey: .id) created_at = try values.decodeIfPresent(String.self, forKey: .created_at) width = try values.decodeIfPresent(Int.self, forKey: .width) height = try values.decodeIfPresent(Int.self, forKey: .height) color = try values.decodeIfPresent(String.self, forKey: .color) likes = try values.decodeIfPresent(Int.self, forKey: .likes) liked_by_user = try values.decodeIfPresent(Bool.self, forKey: .liked_by_user) user = try values.decodeIfPresent(User.self, forKey: .user) current_user_collections = try values.decodeIfPresent([String].self, forKey: .current_user_collections) urls = try values.decodeIfPresent(Urls.self, forKey: .urls) categories = try values.decodeIfPresent([Categories].self, forKey: .categories) links = try values.decodeIfPresent(Links.self, forKey: .links) author = try values.decodeIfPresent(String.self, forKey: .author) url = try values.decodeIfPresent(String.self, forKey: .url) download_url = try values.decodeIfPresent(String.self, forKey: .download_url) try super.init(from: decoder) } }
[ -1 ]
64f2f04873c94cbc8c9ffa09d2fad50d4ba342d3
480310b668cfe835534a4be8d8e3cac912e6f149
/the-blue-alliance-ios/View Controllers/Match/MatchesViewController.swift
ba1574f0a41e83e34e959b5ca1128481f73eab9e
[ "MIT" ]
permissive
the-blue-alliance/the-blue-alliance-ios
6a882ddcb9f3509fc335fdcf5e8273946e60442c
5a5a60bf6b6f11ec72401e17172d2b682a34c793
refs/heads/master
2023-06-08T08:40:03.817861
2022-04-06T05:16:04
2022-04-06T05:16:04
18,974,950
77
42
MIT
2023-06-01T04:45:17
2014-04-20T22:07:09
Swift
UTF-8
Swift
false
false
8,002
swift
import CoreData import Foundation import TBAData import TBAKit import MyTBAKit import UIKit protocol MatchesViewControllerDelegate: AnyObject { func showFilter() func matchSelected(_ match: Match) } class MatchesViewController: TBATableViewController { weak var delegate: MatchesViewControllerDelegate? var query: MatchQueryOptions = MatchQueryOptions.defaultQuery() private let event: Event private let team: Team? private var myTBA: MyTBA private var dataSource: TableViewDataSource<String, Match>! private var fetchedResultsController: TableViewDataSourceFetchedResultsController<Match>! private var favoriteTeamKeys: [String] = [] lazy var matchQueryBarButtonItem: UIBarButtonItem = { return UIBarButtonItem(image: UIImage.sortFilterIcon, style: .plain, target: self, action: #selector(showFilter)) }() override var additionalRightBarButtonItems: [UIBarButtonItem] { return [matchQueryBarButtonItem] } // MARK: - Init init(event: Event, team: Team? = nil, myTBA: MyTBA, dependencies: Dependencies) { self.event = event self.team = team self.myTBA = myTBA super.init(dependencies: dependencies) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } // MARK: View Lifecycle override func viewDidLoad() { super.viewDidLoad() tableView.registerReusableCell(MatchTableViewCell.self) setupDataSource() tableView.dataSource = dataSource updateInterface() } private func updateInterface() { if query.isDefault { matchQueryBarButtonItem.image = UIImage.sortFilterIcon } else { matchQueryBarButtonItem.image = UIImage.sortFilterIconActive } } // MARK: Table View Data Source private func setupDataSource() { dataSource = TableViewDataSource<String, Match>(tableView: tableView) { [weak self] (tableView, indexPath, match) -> UITableViewCell? in let cell = tableView.dequeueReusableCell(indexPath: indexPath) as MatchTableViewCell var baseTeamKeys: Set<String> = Set() if let team = self?.team { baseTeamKeys.insert(team.key) } if let query = self?.query, query.filter.favorites, let favoriteTeamKeys = self?.favoriteTeamKeys { baseTeamKeys.formUnion(favoriteTeamKeys) } cell.viewModel = MatchViewModel(match: match, baseTeamKeys: Array(baseTeamKeys)) return cell } dataSource.statefulDelegate = self let fetchRequest: NSFetchRequest<Match> = Match.fetchRequest() setupFetchRequest(fetchRequest) let frc = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: persistentContainer.viewContext, sectionNameKeyPath: Match.compLevelSortOrderKeyPath(), cacheName: nil) fetchedResultsController = TableViewDataSourceFetchedResultsController(dataSource: dataSource, fetchedResultsController: frc) // Keep this LOC down here - or else we'll end up crashing with the fetchedResultsController init dataSource.delegate = self } private func updateDataSource() { fetchedResultsController.reconfigureFetchRequest(setupFetchRequest(_:)) } private func setupFetchRequest(_ request: NSFetchRequest<Match>) { let ascending = !query.sort.reverse request.sortDescriptors = Match.sortDescriptors(ascending: ascending) let matchPredicate: NSPredicate = { if let team = team { return Match.eventTeamPredicate(eventKey: event.key, teamKey: team.key) } else { return Match.eventPredicate(eventKey: event.key) } }() // Filter for only Matches with myTBA Favorites let myTBAFavoritesPredicate: NSPredicate? = { guard query.filter.favorites else { return nil } return Match.teamKeysPredicate(teamKeys: favoriteTeamKeys) }() request.predicate = NSCompoundPredicate(andPredicateWithSubpredicates: [matchPredicate, myTBAFavoritesPredicate].compactMap({ $0 })) } // MARK: TableViewDataSourceDelegate override func title(forSection section: Int) -> String? { guard let firstMatch = fetchedResultsController.dataSource.itemIdentifier(for: IndexPath(row: 0, section: section)) else { return "Matches" } return "\(firstMatch.compLevel?.level ?? firstMatch.compLevelString) Matches" } // MARK: UITableView Delegate override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { guard let match = fetchedResultsController.dataSource.itemIdentifier(for: indexPath) else { return } delegate?.matchSelected(match) } override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 30.0 } // MARK: - Public Methods func updateWithQuery(query: MatchQueryOptions) { self.query = query // Save favoriteTeamKeys when query changes - since this can be expensive favoriteTeamKeys = Favorite.favoriteTeamKeys(in: persistentContainer.viewContext) updateInterface() updateDataSource() } // MARK: - Interface Methods @objc func showFilter(_ sender: UIBarButtonItem) { delegate?.showFilter() } } extension MatchesViewController: Refreshable { // MARK: - Refreshable var refreshKey: String? { return "\(event.key)_matches" } var automaticRefreshInterval: DateComponents? { return DateComponents(hour: 1) } var automaticRefreshEndDate: Date? { // Automatically refresh event matches until the event is over return event.endDate?.endOfDay() } var isDataSourceEmpty: Bool { // If we've changed our `filter` query option, an empty list is a valid state if !query.filter.isDefault { return false } return fetchedResultsController.isDataSourceEmpty } @objc func refresh() { var operation: TBAKitOperation! operation = tbaKit.fetchEventMatches(key: event.key) { [self] (result, notModified) in guard case .success(let matches) = result, !notModified else { return } let context = persistentContainer.newBackgroundContext() context.performChangesAndWait({ let event = context.object(with: self.event.objectID) as! Event event.insert(matches) }, saved: { [unowned self] in markTBARefreshSuccessful(self.tbaKit, operation: operation) }, errorRecorder: errorRecorder) } addRefreshOperations([operation]) } } extension MatchesViewController: Stateful { var noDataText: String? { if query.isDefault { return "No matches for event" } else { return "No matches matching filter options" } } } protocol MatchesViewControllerQueryable: ContainerViewController, MatchQueryOptionsDelegate { var myTBA: MyTBA { get } var matchesViewController: MatchesViewController { get } func showFilter() } extension MatchesViewControllerQueryable { func showFilter() { let queryViewController = MatchQueryOptionsViewController(query: matchesViewController.query, myTBA: myTBA, dependencies: dependencies) queryViewController.delegate = self let nav = UINavigationController(rootViewController: queryViewController) nav.modalPresentationStyle = .formSheet navigationController?.present(nav, animated: true, completion: nil) } func updateQuery(query: MatchQueryOptions) { matchesViewController.updateWithQuery(query: query) } }
[ -1 ]
416212458dbf46f108c4355a5f7e48047c22acf7
e25f95e88096a4fb3125286daaab0470398e4361
/Tests/UnitTests/TableViewController/TableViewControllerTestCase.swift
434e726c8e36be653b9a56bbb78bb71915763c9f
[ "MIT" ]
permissive
jkereako/InlinePicker
1935be26111e978b1b31913b38cd58f361af085e
98dbb71c0869b7e1fd148e6963232d18840209c4
refs/heads/master
2021-01-17T06:39:35.978487
2016-04-29T18:12:15
2016-04-29T18:12:15
52,370,776
0
0
null
null
null
null
UTF-8
Swift
false
false
1,672
swift
// // TableViewControllerTestCase.swift // InlinePicker // // Created by Jeffrey Kereakoglow on 4/28/16. // Copyright © 2016 Alexis Digital. All rights reserved. // import XCTest @testable import InlinePicker class TableViewControllerTestCase: XCTestCase { var storyboard: UIStoryboard! var sut: TableViewController! let dataSource: [[CellModelType]] = [[ SubtitleCellModel(rowIndex: 0, title: "Row 1", subTitle: "subtitle 1"), SubtitleCellModel(rowIndex: 1, title: "Row 2", subTitle: "subtitle 2"), PickerViewCellModel(rowIndex: 2), SubtitleCellModel(rowIndex: 3, title: "Row 4", subTitle: "subtitle 4"), SubtitleCellModel(rowIndex: 4, title: "Row 5", subTitle: "subtitle 5"), SubtitleCellModel(rowIndex: 5, title: "Row 5", subTitle: "subtitle 6") ]] enum Identifier: String { case Storyboard = "Main" case ViewController = "tableViewController" } override func setUp() { super.setUp() storyboard = UIStoryboard(name: Identifier.Storyboard.rawValue, bundle: NSBundle.mainBundle()) sut = storyboard.instantiateViewControllerWithIdentifier(Identifier.ViewController.rawValue) as! TableViewController sut.setUpWithDataSource( TableViewDataSource( dataSource: dataSource, pickerCellIndexPath: NSIndexPath(forRow: 2, inSection: 0) ) ) // This line gurantees that the initial view controller is the TableViewController UIApplication.sharedApplication().keyWindow!.rootViewController = sut } override func tearDown() { storyboard = nil sut = nil UIApplication.sharedApplication().keyWindow!.rootViewController = nil super.tearDown() } }
[ -1 ]
2f320ec744ebc04cfb0cbfe5e45f8f1737cc6beb
eae74e0c0ef51e11619e32383fc0870d80bfcb8d
/Fitness/Helpers/Extensions.swift
ef09ce0873ef457f864661f1bd0d4a79dd12b463
[]
no_license
ShubhGar/Fitness
29c343095924c700946284673979a65280f717d0
22dc4c9703313c5474d4798d71493752f3285093
refs/heads/master
2021-07-25T13:33:18.341404
2020-12-26T11:45:47
2020-12-26T11:45:47
233,331,907
2
0
null
null
null
null
UTF-8
Swift
false
false
1,078
swift
// // Extensions.swift // Fitness // // Created by Shubham Garg on 09/01/20. // Copyright © 2020 Shubham Garg. All rights reserved. // import UIKit extension UIColor { func toColor(_ color: UIColor, percentage: CGFloat) -> UIColor { let percentage = max(min(percentage, 100), 0) / 100 switch percentage { case 0: return self case 1: return color default: var (r1, g1, b1, a1): (CGFloat, CGFloat, CGFloat, CGFloat) = (0, 0, 0, 0) var (r2, g2, b2, a2): (CGFloat, CGFloat, CGFloat, CGFloat) = (0, 0, 0, 0) guard self.getRed(&r1, green: &g1, blue: &b1, alpha: &a1) else { return self } guard color.getRed(&r2, green: &g2, blue: &b2, alpha: &a2) else { return self } return UIColor(red: CGFloat(r1 + (r2 - r1) * percentage), green: CGFloat(g1 + (g2 - g1) * percentage), blue: CGFloat(b1 + (b2 - b1) * percentage), alpha: CGFloat(a1 + (a2 - a1) * percentage)) } } }
[ -1 ]
8b904d373f96eedca02707cd794f7f3628ec37d4
96f2870640b7169ab4b140cdbd464afac5cf8ea6
/Sources/Utils/geom/svg/path/utils/SVGPathUtils.swift
d9c68c9888ae3479f0ba7e86cc1ec3e13d713109
[ "MIT" ]
permissive
ZuopanYao/swift-utils
cb85ce0ada6a8fd5ed5d7baa77948dd8627a3ef5
6556001b15683b6310ede5b25e29cc1059777738
refs/heads/master
2020-05-19T06:16:29.836641
2019-05-02T07:13:04
2019-05-02T07:13:04
184,870,414
0
1
MIT
2019-05-04T08:31:36
2019-05-04T08:31:36
null
UTF-8
Swift
false
false
10,433
swift
import Foundation /** * NOTE: Info about CATransform: https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPath/#//apple_ref/c/func/CGPathAddCurveToPoint */ class SVGPathUtils { static func drawPath(_ path:CGMutablePath, _ commands:[String],_ params:[CGFloat])->CGMutablePath{//TODO: rename to compilePath? var i:Int = 0/*parameterIndex*/ var prevP:CGPoint = CGPoint() var prevM:CGPoint!/*previous MoveTo pos*/ var prevC:CGPoint!/*previous ControlPoint*/ for e in 0..<commands.count{ let command:String = commands[e] let isLowerCase:Bool = StringAsserter.lowerCase(command) var pos:CGPoint = isLowerCase ? prevP.copy() : CGPoint()/*the current end pos*/ switch SVGPathCommand(rawValue:Character(command.lowercased())) { case .some(.m):/*moveTo*/ pos += CGPoint(params[i],params[i+1]) prevM = pos.copy() path.move(to:pos) i += 2 break; case .some(.l):/*lineTo*/ pos += CGPoint(params[i],params[i+1]) path.addLine(to:pos)//swift 3 was: CGPathAddLineToPoint i += 2 break; case .some(.h):/*horizontalLineTo*/ pos += CGPoint(params[i],isLowerCase ? 0 : prevP.y) path.addLine(to: pos)//swift3-> was: CGPathAddLineToPoint i += 1 break; case .some(.v):/*verticalLineTo*/ pos += CGPoint(isLowerCase ? 0 : prevP.x,params[i]) path.addLine(to: pos) i += 1 break; case .some(.c):/*curveTo*/ pos += CGPoint(params[i+4],params[i+5]) let controlP1:CGPoint = isLowerCase ? CGPoint(prevP.x + params[i],prevP.y+params[i+1]) : CGPoint(params[i],params[i+1]) prevC = isLowerCase ? CGPoint(prevP.x + params[i+2],prevP.y+params[i+3]) : CGPoint(params[i+2],params[i+3])/*aka controlP2*/ path.addCurve(to: pos, control1: controlP1, control2: prevC)//swift 3, was-> CGPathAddCurveToPoint(path, nil, controlP1.x, controlP1.y, prevC.x, prevC.y, pos.x, pos.y)//CubicCurveModifier.cubicCurveTo(graphics, prevP, controlP1, prevC, pos); i += 6 break; case .some(.s):/*smoothCurveTo*/ pos += CGPoint(params[i+2],params[i+3]) let cP1:CGPoint = CGPoint(2 * prevP.x - prevC.x,2 * prevP.y - prevC.y);/*x2 = 2 * x - x1 and y2 = 2 * y - y1*/ prevC = isLowerCase ? CGPoint(CGFloat(params[i])+prevP.x,CGFloat(params[i+1])+prevP.y) : CGPoint(params[i],params[i+1]) path.addCurve(to: pos, control1: cP1, control2: prevC)//swift 3, was->CGPathAddCurveToPoint(path, nil, cP1.x, cP1.y, prevC.x, prevC.y, pos.x, pos.y)//CubicCurveModifier.cubicCurveTo(graphics, prevP, cP1, prevC, pos); i += 4//<---shouldn't this also be 6, maybe not actually, there is no i+4 or i+5!?! break; case .some(.q):/*quadCurveTo*/ pos += CGPoint(params[i+2],params[i+3]) prevC = isLowerCase ? CGPoint(prevP.x+params[i],prevP.y+params[i+1]) : CGPoint(params[i],params[i+1]) path.addQuadCurve(to: pos, control: prevC)//swift 3, was->CGPathAddQuadCurveToPoint(path, nil, prevC.x, prevC.y, pos.x, pos.y) i += 4 break; case .some(.t):/*smoothQuadCurveTo*/ /*the new control point x2, y2 is calculated from the curve's starting point x, y and the previous control point x1, y1 with these formulas:*/ pos += CGPoint(params[i],params[i+1]) prevC = CGPoint(2 * prevP.x - prevC.x,2 * prevP.y - prevC.y)/*x2 = 2 * x - x1 and y2 = 2 * y - y1*/ path.addQuadCurve(to: pos, control: prevC)//swift 3, was->CGPathAddQuadCurveToPoint(path, nil, prevC.x, prevC.y, pos.x, pos.y) i += 2 break; case .some(.z): path.closeSubpath() path.move(to: prevM)/*<--unsure if this is needed?*///CGPathMoveToPoint(path, nil, .x, prevM.y) break;/*closes it self to the prev MT pos*/ case .some(.a): fatalError("arc is not supported yet, contact maintainer") //you need the ellipse from point and center formula to get this working, if you need this to work contact the author and the author will add support /* let arc:IArc = PathParser.arcAt(path,i)//you also need to convert the svg arc data of 7 pieces to an arc DisplayArcUtils.arcTo(cgPath,arc) DisplayArcUtils.arc(graphics, path.params[i], path.params[i+1], path.params[i+2], path.params[i+3],path.params[i+4], path.params[i+5],path.params[i+6]); i += 7 break */ default: break;//or use case .none: fatalErr } if(e < commands.count-1 /*&& StringAsserter.lowerCase(commands[i+1])*/) {// :TODO: check for z? prevP = pos.copy() } } return path } /** * Returns a Path instance with data derived from commands and PARAM: params (which contains numbers, as in pathData) * TODO: may not work 100% */ static func path(_ commands:[String],_ params:[CGFloat])->PathKind { var path:PathKind = Path() var i:Int = 0;/*parameterIndex*/ var prevP:CGPoint = CGPoint() var prevC:CGPoint!/*previous ControlPoint*/ for e in 0..<commands.count{ let command:String = commands[e] let isLowerCase:Bool = StringAsserter.lowerCase(command) var pos:CGPoint = isLowerCase ? prevP.copy() : CGPoint()/*the current end pos*/ switch SVGPathCommand(rawValue:Character(command.lowercased())) { case .m?: /*moveTo*/ pos += CGPoint(params[i],params[i+1]) path.commands.append(PathCommand.moveTo.rawValue) path.pathData += [pos.x,pos.y]/*<-- used to be path.pathData.append(pos.x,pos.y);*/ i += 2 break; case .l?:/*lineTo*/ pos += CGPoint(params[i],params[i+1]) path.commands.append(PathCommand.lineTo.rawValue) path.pathData += [pos.x,pos.y] i += 2 break; case .h?:/*horizontalLineTo*/ pos += CGPoint(params[i],isLowerCase ? 0 : prevP.y) path.commands.append(PathCommand.lineTo.rawValue) path.pathData += [pos.x,pos.y] i += 1 break; case .v?:/*verticalLineTo*/ pos += CGPoint(isLowerCase ? 0 : prevP.x,params[i]) path.commands.append(PathCommand.lineTo.rawValue) path.pathData += [pos.x,pos.y] i += 1 break; case .c?:/*cubicCurveTo*/ pos += CGPoint(params[i+4],params[i+5]) let controlP1:CGPoint = isLowerCase ? CGPoint(prevP.x + CGFloat(params[i]),prevP.y+CGFloat(params[i+1])) : CGPoint(params[i],params[i+1]) prevC = isLowerCase ? CGPoint(prevP.x+CGFloat(params[i+2]),prevP.y+CGFloat(params[i+3])) : CGPoint(params[i+2],params[i+3])/*aka controlP2*/ path.commands.append(PathCommand.cubicCurveTo.rawValue) path.pathData += [controlP1.x,controlP1.y, prevC.x,prevC.y, pos.x,pos.y] i += 6 break; case .s?:/*smoothCubicCurveTo*/ pos += CGPoint(params[i+2],params[i+3]) let cP1:CGPoint = CGPoint(2 * prevP.x - prevC.x,2 * prevP.y - prevC.y)/*x2 = 2 * x - x1 and y2 = 2 * y - y1*/ prevC = isLowerCase ? CGPoint(CGFloat(params[i])+prevP.x,CGFloat(params[i+1])+prevP.y) : CGPoint(params[i],params[i+1]) path.commands.append(PathCommand.cubicCurveTo.rawValue) path.pathData += [cP1.x,cP1.y, prevC.x,prevC.y, pos.x,pos.y] i += 4 break; case .q?:/*quadCurveTo*/ pos += CGPoint(params[i+2],params[i+3]) prevC = isLowerCase ? CGPoint(prevP.x+params[i],prevP.y+params[i+1]) : CGPoint(params[i],params[i+1]) path.commands.append(PathCommand.curveTo.rawValue) path.pathData += [prevC.x,prevC.y, pos.x,pos.y] i += 4 break; case .t?://smoothCubicCurveTo/*the new control point x2, y2 is calculated from the curve's starting point x, y and the previous control point x1, y1 with these formulas:*/ pos += CGPoint(params[i],params[i+1]) prevC = CGPoint(2 * prevP.x - prevC.x,2 * prevP.y - prevC.y)/*x2 = 2 * x - x1 and y2 = 2 * y - y1*/ path.commands.append(PathCommand.curveTo.rawValue) path.pathData += [prevC.x,prevC.y, pos.x,pos.y] i += 2 break; case .z?: path.commands.append(PathCommand.close.rawValue); break;/*closes it self to the prev MT pos*/ /*case PathCommand.ARC_TO: DisplayArc4Modifier.arcTo(graphics, path.params[i], path.params[i+1], path.params[i+2], path.params[i+3],path.params[i+4], path.params[i+5],path.params[i+6]); i += 7; break;*/ default: fatalError("type not supported: " + "\(command)") } if e < commands.count-1 /*&& StringAsserter.lowerCase(commands[i+1])*/ {// :TODO: check for z? prevP = pos.copy() } } return path } /** * Returns an Rectangle instance with data derived from a svgRect * NOTE: if the svgRect x and or y is of the value NaN, then these are transfered as 0 */ static func rectangle(_ svgRect:SVGRect) -> CGRect { return CGRect(!svgRect.radius.x.isNaN ? svgRect.radius.x : 0, !svgRect.rect.y.isNaN ? svgRect.rect.y : 0, svgRect.rect.w, svgRect.rect.h) } }
[ -1 ]
c0d9e25d04353c725efd15f38f54e158906c7a28
dea3f62413d6c703228c82a995e0cc8e2e2acb2a
/Down/Shared/Views/ViewStyling/Styles/UITextFieldStyle.swift
f698db9e566f210ecef7fd16ce61c0e7103b78d4
[]
no_license
RuudPuts/Down
e5c4c8fad24c9492ebf54a3aaab4012712794168
917744adbe22aa9c02c395246557682863fbf539
refs/heads/rebuild
2022-10-19T01:53:30.889416
2019-07-20T19:42:26
2019-07-20T19:42:26
133,563,380
1
0
null
2022-10-06T03:09:26
2018-05-15T19:26:33
Swift
UTF-8
Swift
false
false
477
swift
// // UITextFieldStyle.swift // Down // // Created by Ruud Puts on 17/07/2018. // Copyright © 2018 Ruud Puts. All rights reserved. // import DownKit extension ViewStyling where ViewType == UITextField { static var defaultTextField = ViewStyling { $0.textColor = Stylesheet.Colors.white } static func textField(for type: DownApplicationType) -> ViewStyling { return ViewStyling { $0.style(as: .defaultTextField) } } }
[ -1 ]
facaa0c79a7e1cad3520bfd4624fef160039f87f
77465e1225f3a83859b963ccfeca18b9a0faac4c
/MVVMChatDemo/Redux/AppAction.swift
4f3d69ea3bd9994e4c2aaf15333faa2f722392dc
[]
no_license
Ashwini1Sapre/MVVMChatDemo
36fd6a39c9b9788f2467515decf6c50c37ba19d9
1369a82e8552dc78db8ca659dcbe5880fb274d98
refs/heads/main
2023-04-19T02:07:59.727314
2021-04-19T08:32:32
2021-04-19T08:32:32
358,824,367
0
0
null
null
null
null
UTF-8
Swift
false
false
332
swift
// // AppAction.swift // MVVMChatDemo // // Created by Knoxpo MacBook Pro on 19/04/21. // import Foundation enum AppAction { case chatList(ChatListAction) case chatDetail(ChatDetailAction) } enum ChatListAction { case reload } enum ChatDetailAction { case reload case add(String, to: Chat) }
[ -1 ]
28b5a93eb435c93123b25ef0b7de0ec28a7e9d62
14e3fec0c94cecf64577899db71507fe56bca5a6
/Taskin/AppDelegate.swift
83d38095fa968da59ed7abba1f10600890c37220
[]
no_license
mbcassy/Taskin
f1e68a231883cb483154761965a25010f0257142
5744a2ccc42809f9e11ddaff82588f32ac366d00
refs/heads/master
2022-08-23T17:04:50.918325
2020-05-23T12:47:27
2020-05-23T12:47:27
266,334,434
0
0
null
null
null
null
UTF-8
Swift
false
false
1,683
swift
// // AppDelegate.swift // Taskin // // Created by Cassy on 5/19/20. // Copyright © 2020 Cassy. All rights reserved. // import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { } // MARK: - Core Data stack lazy var persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: "DataModel") container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }() // MARK: - Core Data Saving support func saveContext () { let context = persistentContainer.viewContext if context.hasChanges { do { try context.save() } catch { let nserror = error as NSError fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } } }
[ 339552, 264481, 142211, 360901, 431179, 121548, 377420, 380877, 337970, 394872, 378847 ]
766bd7005791de91b9d014c8646d9b5474623b63
4414a3f11b95eaf5bf487a788900f9e2430ef2f5
/YumaApp/Controllers/ExpandMapViewController.swift
7cb3924af632f8431e45032172c7c5031be941ae
[]
no_license
matt-matt1/YumaApp_full_ios
cf2295b9c3f101d8b84936c627f8ba8d526627d8
f7ff52453f877bdfb0aa0cbeebf7a9fa8cd0f22b
refs/heads/master
2021-04-03T01:08:59.145938
2018-08-14T21:46:07
2018-08-14T21:46:07
125,073,917
1
0
null
null
null
null
UTF-8
Swift
false
false
6,090
swift
// // ExpandMapViewController.swift // YumaApp // // Created by Yuma Usa on 2018-02-20. // Copyright © 2018 Yuma Usa. All rights reserved. // import UIKit import MapKit class ExpandMapViewController: UIViewController, CLLocationManagerDelegate { @IBOutlet weak var navBar: UINavigationBar! @IBOutlet weak var navTitle: UINavigationItem! @IBOutlet weak var navClose: UIBarButtonItem! @IBOutlet weak var navHelp: UIBarButtonItem! @IBOutlet weak var myMap: MKMapView! @IBOutlet weak var mapZoomSlider: UISlider! var pin: AnnotationPin! var myZoomLevel: Double = 11 let location = CLLocationManager() override func viewDidLoad() { super.viewDidLoad() // navTitle.title = R.string.contact // navBar.applyNavigationGradient(colors: [R.color.YumaDRed, R.color.YumaRed], isVertical: true) // navClose.title = FontAwesome.close.rawValue // navBar.translatesAutoresizingMaskIntoConstraints = false // navHelp.title = FontAwesome.questionCircle.rawValue // navHelp.setTitleTextAttributes([NSAttributedStringKey.font : R.font.FontAwesomeOfSize(pointSize: 21)], for: .normal) // navHelp.setTitleTextAttributes([ // NSAttributedStringKey.font : R.font.FontAwesomeOfSize(pointSize: 21) // ], for: UIControlState.highlighted) // if #available(iOS 11.0, *) // { // navBar.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true // } // else // { // navBar.topAnchor.constraint(equalTo: view.topAnchor, constant: 20).isActive = true // navBar.superview?.constraints.forEach( // { (constraint) in // if constraint.firstItem === navBar && constraint.firstAttribute == .top // { // navBar.topAnchor.constraint(equalTo: view.topAnchor, constant: 20).isActive = true // }}) // } myMap.showsScale = true myMap.showsPointsOfInterest = true myMap.showsUserLocation = true mapZoomSlider.minimumValue = 1 mapZoomSlider.maximumValue = 16 mapZoomSlider.setValue(Float(myZoomLevel), animated: false) let coords = CLLocationCoordinate2D(latitude: CLLocationDegrees(R.string.real_lat)!, longitude: CLLocationDegrees(R.string.real_long)!) // myMap.setCenterCoordinate(centerCoordinate: CLLocationCoordinate2D(latitude: CLLocationDegrees(R.string.real_lat)!, longitude: CLLocationDegrees(R.string.real_long)!), zoomLevel: myZoomLevel, animated: false) myMap.setCenterCoordinate(centerCoordinate: coords, zoomLevel: myZoomLevel, animated: false) pin = AnnotationPin(title: R.string.our_bus, subtitle: "Printers, Cartridges, Laptops ...", coord: coords) myMap.addAnnotation(pin) if CLLocationManager.locationServicesEnabled() { location.delegate = self location.desiredAccuracy = kCLLocationAccuracyBest location.startUpdatingLocation() myMap.showsUserLocation = true // labelMyLocation.setTitle(R.string.plotMe, for: .normal) let userLocation = location.location?.coordinate let ourPlace: MKPlacemark let userPlace: MKPlacemark if userLocation != nil { if #available(iOS 10.0, *) { ourPlace = MKPlacemark(coordinate: coords) userPlace = MKPlacemark(coordinate: userLocation!) //Fatal error: Unexpectedly found nil while unwrapping an Optional value } else { ourPlace = MKPlacemark(coordinate: coords, addressDictionary: nil) userPlace = MKPlacemark(coordinate: userLocation!, addressDictionary: nil) } let ourItem = MKMapItem(placemark: ourPlace) let userItem = MKMapItem(placemark: userPlace) let directionRequest = MKDirectionsRequest() directionRequest.source = userItem directionRequest.destination = ourItem directionRequest.transportType = .any let directions = MKDirections(request: directionRequest) directions.calculate(completionHandler: { (response, error) in guard let response = response else { if let error = error { print("\(R.string.err) \(error)") } return } let route = response.routes[0] self.myMap.add(route.polyline, level: .aboveRoads) self.myMap.setRegion(MKCoordinateRegionForMapRect(route.polyline.boundingMapRect), animated: true) }) } } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func navCloseAct(_ sender: Any) { self.dismiss(animated: false, completion: nil) } @IBAction func navHelpAct(_ sender: Any) { let viewC = Assistance() viewC.array = R.array.help_contact_us_guide viewC.title = "\(R.string.map_big.capitalized) \(R.string.help.capitalized)" viewC.modalTransitionStyle = .crossDissolve viewC.modalPresentationStyle = .overCurrentContext self.present(viewC, animated: true, completion: nil) } @IBAction func mapZoomMinusAct(_ sender: Any) { if myZoomLevel > Double(mapZoomSlider.minimumValue) { myZoomLevel -= 1 mapZoomSlider.setValue(Float(myZoomLevel), animated: false) mapZoomTo(myZoomLevel) } } @IBAction func mapZoomPlusAct(_ sender: Any) { if myZoomLevel < Double(mapZoomSlider.maximumValue) { myZoomLevel += 1 mapZoomSlider.setValue(Float(myZoomLevel), animated: false) mapZoomTo(myZoomLevel) } } @IBAction func mapZoomSliderAct(_ sender: Any) { myZoomLevel = Double(mapZoomSlider.value) mapZoomTo(Double(mapZoomSlider.value)) } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ func mapZoomTo(_ zoomLevel: Double) { let currentRegion = self.myMap.region // tempLabel.text = "myZoom=\(myZoomLevel) : slider=\(mapZoomSlider.value)" myMap.setCenterCoordinate(centerCoordinate: CLLocationCoordinate2D(latitude: currentRegion.center.latitude, longitude: currentRegion.center.longitude), zoomLevel: zoomLevel, animated: true) } }
[ -1 ]
9bb6c070bffa0c4b3fb620997a3ac3890880ce8f
cc600590dbee84b916b21edc01908102d5128753
/Flare/dependency_sorter.swift
77745653da2d7e29c0a51633d4820e3aa77e750b
[ "BSD-2-Clause", "MIT" ]
permissive
felipebaltazar/Flare-Swift
dabddefb28aa1c2f57d6d3e630873fbce5ce008f
0d5a23cb1b9183d9448dedc0841bdd843364d1ac
refs/heads/master
2022-03-13T12:32:32.948253
2019-11-22T14:53:28
2019-11-22T14:53:28
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,076
swift
// // dependency_sorter.swift // Flare // // Created by Umberto Sonnino on 2/13/19. // Copyright © 2019 2Dimensions. All rights reserved. // import Foundation class DependencySorter { var _perm: Set<ActorComponent> var _temp: Set<ActorComponent> var _order: [ActorComponent]? init() { _perm = [] _temp = [] } func sort(_ root: ActorComponent) -> [ActorComponent]? { _order = [ActorComponent]() if (!visit(root)) { return nil } return _order } func visit(_ n: ActorComponent) -> Bool { if (_perm.contains(n)) { return true } if (_temp.contains(n)) { print("Dependency cycle!") return false } _temp.insert(n) if let dependents = n.dependents { for d in dependents { if !visit(d) { return false } } } _perm.insert(n) _order?.insert(n, at: 0) return true } }
[ -1 ]
e71cb3ff77cee78b2707ca671b4c61b27e9f189b
db1c602f9f9406dbec01d70c8dbb3df439034d3b
/DPCore/Network/Encodings/ParameterEncoding.swift
3cb82b608a262082581ba1b286623c858ef37f44
[]
no_license
aliiizzz/DPCore
8269dfbcd0a1708e303e19f04f2d277486f8c168
15f8c3be7dc4bd90d8779ff962dc4077dc4a871c
refs/heads/master
2020-08-14T00:07:45.304779
2019-10-14T14:51:08
2019-10-14T14:51:08
215,061,115
1
0
null
null
null
null
UTF-8
Swift
false
false
1,729
swift
// // ParameterEncoding.swift // DPCore // // Created by Amirhesam Rayatnia on 2018-10-09. // Copyright © 2018 DigiPay. All rights reserved. // import Foundation internal typealias Parameters = [String: Any] internal protocol ParameterEncoder { func encode(urlRequest: inout URLRequest, with parameters: Parameters) throws } internal enum ParameterEncoding { case urlEncoding case jsonEncoding case urlAndJsonEncoding func encode(urlRequest: inout URLRequest, bodyParameters: Parameters?, urlParameters: Parameters?) throws { do { switch self { case .urlEncoding: guard let urlParameters = urlParameters else { return } try URLParameterEncoder().encode(urlRequest: &urlRequest, with: urlParameters) case .jsonEncoding: guard let bodyParameters = bodyParameters else { return } try JSONParameterEncoder().encode(urlRequest: &urlRequest, with: bodyParameters) case .urlAndJsonEncoding: guard let bodyParameters = bodyParameters, let urlParameters = urlParameters else { return } try URLParameterEncoder().encode(urlRequest: &urlRequest, with: urlParameters) try JSONParameterEncoder().encode(urlRequest: &urlRequest, with: bodyParameters) } } catch { throw error } } } internal enum NetworkError: String, Error { case parametersNil = "Parameters were nil." case encodingFailed = "Parameter encoding failed." case missingURL = "URL is nil." }
[ -1 ]
3219de315d277ddf42be6e1d00028434d6cfeda4
b8a6e2f894f9b001aaf362d6c8c9e54f3a1e92fb
/QiangGuoPlugs/QiangGuoPlugs/ModelAddImgVC.swift
7e332e5c7fcb416d862416683188f30df34c5c5c
[]
no_license
ZankZang/QiangGuoPlugs
4f057e91af47ac8d982d8467ed1e5f57fa1abf9a
1bd70fc17f7aca8eac7e5af7a08bfd7e73e52c86
refs/heads/master
2023-05-04T04:29:29.982021
2021-05-25T00:13:02
2021-05-25T00:13:02
370,516,471
0
0
null
null
null
null
UTF-8
Swift
false
false
1,325
swift
// // ModelAddImgVC.swift // QiangGuoPlugs // // Created by 张贺 on 2021/3/11. // import UIKit class ModelAddImgVC: BaseVC, UIImagePickerControllerDelegate, UINavigationControllerDelegate { var model: ModelM? var name: String? override func viewDidLoad() { super.viewDidLoad() } @IBAction func selectAct(_ sender: Any) { let vc: UIImagePickerController = UIImagePickerController() vc.sourceType = UIImagePickerController.SourceType.photoLibrary vc.delegate = self vc.modalPresentationStyle = UIModalPresentationStyle.fullScreen present(vc, animated: true, completion: nil) } func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { picker.dismiss(animated: true) { [self] in let img: UIImage = info[UIImagePickerController.InfoKey.originalImage] as! UIImage let vc: ModelAddAreaVC = ModelAddAreaVC.init(nibName: "ModelAddAreaVC", bundle: nil) vc.img = img vc.name = self.name vc.model = self.model self.navigationController?.pushViewController(vc, animated: true) } } @IBAction func closeAct(_ sender: Any) { closeAct() } }
[ -1 ]
9f7a6a1ae03047c6f79c879a9365882397fef6c9
66a82ef4350bf44f0f7891f080ef734f8cd370b1
/AstronomyUITests/AstronomyUITests.swift
551b28d1e19bbe451d1ea074b7c09169e399b619
[]
no_license
RobVanceII/ios-astronomy-uitesting
112bbc302af1ef3c30403b84322fc2c280d13d58
9348ad78d76772a880379aa6fde1bdf289022b61
refs/heads/master
2022-12-28T16:38:43.174845
2020-09-25T03:18:50
2020-09-25T03:18:50
298,431,005
0
0
null
2020-09-25T00:57:01
2020-09-25T00:57:01
null
UTF-8
Swift
false
false
3,009
swift
// // AstronomyUITests.swift // AstronomyUITests // // Created by Rob Vance on 9/24/20. // Copyright © 2020 Lambda School. All rights reserved. // import XCTest @testable import Astronomy class AstronomyUITests: XCTestCase { var app: XCUIApplication { return XCUIApplication() } private var saveButton: XCUIElement { return app.buttons["PhotoDetailViewController.SaveButton"] } func testSavingPhoto() { // Provides an opportunity to reset the state and to throw errors before call each test method try! setUpWithError() let app = XCUIApplication() app.launch() app.collectionViews.children(matching:.cell).element(boundBy:0).otherElements.containing(.image,identifier:"imageCell").element.tap() saveButton.tap() let photoSavedAlert = app.alerts["Photo Saved!"].scrollViews.otherElements.buttons["Okay"] XCTAssertEqual(photoSavedAlert.label, "Okay") } func testChangingSols() { try! setUpWithError() app.launch() let app = XCUIApplication() app.navigationBars["Sol 1"]/*@START_MENU_TOKEN@*/.buttons["PhotosCollectionViewController.NextSolButton"]/*[[".buttons[\">\"]",".buttons[\"PhotosCollectionViewController.NextSolButton\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap() app.navigationBars["Sol 2"]/*@START_MENU_TOKEN@*/.buttons["PhotosCollectionViewController.NextSolButton"]/*[[".buttons[\">\"]",".buttons[\"PhotosCollectionViewController.NextSolButton\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap() app.navigationBars["Sol 3"]/*@START_MENU_TOKEN@*/.buttons["PhotosCollectionViewController.NextSolButton"]/*[[".buttons[\">\"]",".buttons[\"PhotosCollectionViewController.NextSolButton\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap() let newSol = app.navigationBars["Sol 10"]/*@START_MENU_TOKEN@*/.buttons["PhotosCollectionViewController.PreviousSolButton"]/*[[".buttons[\"<\"]",".buttons[\"PhotosCollectionViewController.PreviousSolButton\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/ XCTAssertEqual(newSol.label, "\(newSol.label)") } func testViewImageDetails() { try! setUpWithError() app.launch() let app = XCUIApplication() app.collectionViews.children(matching: .cell).element(boundBy: 2).children(matching: .other).element.tap() let imageDetail = app.images["PhotoDetailViewController.ImageView"].waitForExistence(timeout: 2) XCTAssertTrue(imageDetail) } func testLeavePhotoDetail() { try! setUpWithError() app.launch() let app = XCUIApplication() app.collectionViews.children(matching: .cell).element(boundBy: 0).children(matching: .other).element.tap() let solLabel = app.navigationBars["Title"].buttons["Sol 1"] XCTAssertEqual(solLabel.label, "Sol 1") } }
[ -1 ]
d68066897443644b25b3ef56a42124daa925ebdf
e4be124ff915623ef05ec568eeb1689d0def0ef3
/MyMusic/ViewController.swift
9ba0d9031cac6d94df8c862ae2edbb18d81a5524
[]
no_license
babyaced/CSC690FinalProjectSongsOnlyVersion
e51402014737bad4ae6ea27a7550d909180eb956
54f8b1e9102e9028c1cd3473cd6e996148b1dd4c
refs/heads/main
2023-01-31T16:43:57.454397
2020-12-10T20:34:25
2020-12-10T20:34:25
320,383,025
0
0
null
null
null
null
UTF-8
Swift
false
false
1,954
swift
// // ViewController.swift // MyMusic // // Created by Daniel Simpson on 11/24/20. // import UIKit import UIImageColors let updatePlayerViewsToPlayingStatesKey = "dsimpson.sfsu.edu.updatePlayerViewsToPlayingStatesKey" let updatePlayerViewsToPausedStatesKey = "dsimpson.sfsu.edu.updatePlayerViewsToPausedStatesKey" class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet var table: UITableView! override func viewDidLoad() { super.viewDidLoad() table.delegate = self table.dataSource = self } //Table func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int{ return SongCollection.shared.songs.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) let song = SongCollection.shared.songs[indexPath.row] //configure cell.textLabel?.text = song.trackName //cell.textLabel?.textColor = song.colors?.primary cell.detailTextLabel?.text = song.albumName //cell.detailTextLabel?.textColor = song.colors?.secondary cell.imageView?.image = song.art //cell.backgroundColor = colors?.background cell.textLabel?.font = UIFont(name: "Helvetica-Bold", size: 18) cell.detailTextLabel?.font = UIFont(name: "Helvetica", size: 17) return cell } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 100 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath){ tableView.deselectRow(at: indexPath, animated: true) //present the player SongCollection.shared.position = indexPath.row SongPlayer.shared.startSong() } }
[ -1 ]
bcc5c9605b34ad4d702a55738521fad248ccb9fe
8627dc74f85cccf32ff88cc8b568a9b3fc360d9b
/Aura1/Placeviewcontroller.swift
480b55669dc382c6a90c036e4e76c8dd1c4d0554
[]
no_license
pikachu94/AURA
254bd842ddd48194f9b294b72b2c9d155fc00764
857618159eb06d91dbb6e6e1dcc1c8ff132cc118
refs/heads/master
2021-01-10T06:17:55.972161
2016-04-04T22:13:10
2016-04-04T22:13:10
52,976,202
0
0
null
null
null
null
UTF-8
Swift
false
false
550
swift
// // placeviewcontroller.swift // Aura1 // // Created by Barbosa, Jamie L on 3/22/16. // Copyright © 2016 Apple Inc. All rights reserved. // import Foundation import UIKit class Placeviewcontroller: UIViewController { @IBOutlet weak var Placenamelabel: UILabel! var placename = "" override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) Placenamelabel.text = placename } override func viewDidLoad() { super.viewDidLoad() } }
[ -1 ]
0d9ce066235ec3608cd2f4e1b8ad8b6290a3fbdd
c4dbebeff11164ac1f6e6fa99161209caa860b0d
/CirculerAnimationSwift/ViewController.swift
d215d1a10552045a208be1209bac573d5c818d9a
[]
no_license
gurunglaxman0/circuler-animation-swift
29ef91cce9f2e7886e672477f53ccfcb0d30e0fa
f42d8724a7ad339f49288e6f965712c0abaaf76d
refs/heads/master
2021-08-31T07:33:48.193051
2017-12-20T16:34:40
2017-12-20T16:34:40
114,806,097
0
0
null
null
null
null
UTF-8
Swift
false
false
2,263
swift
// // ViewController.swift // CirculerAnimationSwift // // Created by Lakshman Gurung on 20/12/17. // Copyright © 2017 Lakshman Gurung. All rights reserved. // import UIKit import QuartzCore class ViewController: UIViewController { let animationLayer = CAShapeLayer() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let layer = CAShapeLayer() layer.path = UIBezierPath(arcCenter: .zero, radius: 125, startAngle: 0, endAngle: CGFloat.pi*2, clockwise: true).cgPath layer.strokeColor = UIColor.gray.cgColor layer.lineWidth = 15 layer.position = view.center layer.fillColor = UIColor.clear.cgColor view.layer.addSublayer(layer) animationLayer.path = UIBezierPath(arcCenter: .zero, radius: 125, startAngle: 0, endAngle: CGFloat.pi*2, clockwise: true).cgPath animationLayer.fillColor = UIColor.clear.cgColor animationLayer.strokeColor = UIColor(red: 248/255.0, green: 173/255.0, blue: 0/255.0, alpha: 1.0).cgColor animationLayer.lineWidth = 15 animationLayer.strokeEnd = 0 animationLayer.position = view.center animationLayer.lineCap = kCALineCapRound animationLayer.transform = CATransform3DRotate(animationLayer.transform, -CGFloat.pi/2, 0, 0, 1) view.layer.addSublayer(animationLayer) let tapGesture = UITapGestureRecognizer() tapGesture.numberOfTapsRequired = 1 tapGesture.addTarget(self, action: #selector(startAnimation)) view.addGestureRecognizer(tapGesture) } @objc func startAnimation(){ animationLayer.strokeEnd = 0 let animation = CABasicAnimation() animation.fillMode = kCAFillModeForwards animation.duration = 3 animation.fromValue = 0 animation.toValue = 1 animation.keyPath = "strokeEnd" animation.isRemovedOnCompletion = false animationLayer.add(animation, forKey: "drawCircle") } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ -1 ]
27bd969bd49ba6c45cde323e127683a8f7d37329
792c6dcef6a5e8aefca111533a11c319866fcaad
/Pods/SwiftySensors/Sources/SensorManager.swift
036a82b0d137ef106a01d4915441496e151f6bec
[ "MIT" ]
permissive
sssssuper1/SensorsTrainerTest
6bd80533b88ce0a6fbfc428226f03ad83cb440d9
7c63a09cd6e4bada12e8759e93eadcbe5c53ecc6
refs/heads/master
2020-04-01T00:39:09.258295
2018-10-16T09:18:55
2018-10-16T09:18:55
148,574,604
0
0
null
null
null
null
UTF-8
Swift
false
false
11,614
swift
// // SensorManager.swift // SwiftySensors // // https://github.com/kinetic-fit/sensors-swift // // Copyright © 2017 Kinetic. All rights reserved. // import CoreBluetooth import Signals /** An extensible Bluetooth LE Sensor Manager with concrete Service and Characteristic types, hierarchy, forwarding and observation to simplify BLE. */ public class SensorManager: NSObject { /** This is a lazy instance. You can opt to NOT call it and control the lifecycle of the SensorManager yourself if desired. No internal reference is made to this instance. */ public static let instance = SensorManager() /** All SensorManager logging is directed through this closure. Set it to nil to turn logging off or set your own closure at the project level to direct all logging to your logger of choice. */ public static var logSensorMessage: ((_: String) -> ())? = { message in print(message) } /** Initializes the Sensor Manager. - parameter powerAlert: Whether the system should display a warning dialog if Bluetooth is powered off when the central manager is instantiated. - returns: Sensor Manager instance */ public init(powerAlert: Bool = false) { super.init() let options: [String: AnyObject] = [ CBCentralManagerOptionShowPowerAlertKey: NSNumber(booleanLiteral: powerAlert) ] centralManager = CBCentralManager(delegate: self, queue: nil, options: options) } /// Sensor Manager State public enum ManagerState { /// Off case off /// On, Scanning Disabled case idle /// Passive Scan for BLE sensors case passiveScan /// Aggressive Scan for BLE sensors case aggressiveScan } /// Current Sensor Manager State public var state: ManagerState = .off { didSet { if oldValue != state { stateUpdated() } } } /// Customizable Sensor Class Type public var SensorType: Sensor.Type = Sensor.self /** All Discovered Sensors. Note: sensors may no longer be connectable. Call `removeInactiveSensors` to trim. */ public var sensors: [Sensor] { return Array(sensorsById.values) } /** Set the Service Types to scan for. Will also create the Services when discovered. - parameter serviceTypes: Service Types Array */ public func setServicesToScanFor(_ serviceTypes: [ServiceProtocol.Type]) { addServiceTypes(serviceTypes) serviceFactory.servicesToDiscover = serviceTypes.map { type in return CBUUID(string: type.uuid) } } /** Add Service Types to Create when discovered after connecting to a Sensor. - parameter serviceTypes: Service Types Array */ public func addServiceTypes(_ serviceTypes: [ServiceProtocol.Type]) { for type in serviceTypes { serviceFactory.serviceTypes[type.uuid] = type.serviceType } } /** Attempt to connect to a sensor. - parameter sensor: The sensor to connect to. */ public func connectToSensor(_ sensor: Sensor) { SensorManager.logSensorMessage?("SensorManager: Connecting to sensor ...") centralManager.connect(sensor.peripheral, options: nil) } /** Disconnect from a sensor. - parameter sensor: The sensor to disconnect from. */ public func disconnectFromSensor(_ sensor: Sensor) { SensorManager.logSensorMessage?("SensorManager: Disconnecting from sensor ...") centralManager.cancelPeripheralConnection(sensor.peripheral) } /** Removes inactive sensors from the Sensor Manager. - parameter inactiveTime: Trim sensors that have not communicated with the Sensor Manager with the last `inactiveTime` TimeInterval */ public func removeInactiveSensors(_ inactiveTime: TimeInterval) { let now = Date.timeIntervalSinceReferenceDate for sensor in sensors { if now - sensor.lastSensorActivity > inactiveTime { if let sensor = sensorsById.removeValue(forKey: sensor.peripheral.identifier.uuidString) { onSensorRemoved => sensor } } } } /// Bluetooth State Change Signal public let onBluetoothStateChange = Signal<CBCentralManagerState>() /// Sensor Discovered Signal public let onSensorDiscovered = Signal<Sensor>() /// Sensor Connected Signal public let onSensorConnected = Signal<Sensor>() /// Sensor Connection Failed Signal public let onSensorConnectionFailed = Signal<Sensor>() /// Sensor Disconnected Signal public let onSensorDisconnected = Signal<(Sensor, NSError?)>() /// Sensor Removed Signal public let onSensorRemoved = Signal<Sensor>() ////////////////////////////////////////////////////////////////// // Private / Internal Classes, Properties and Constants ////////////////////////////////////////////////////////////////// fileprivate(set) var centralManager: CBCentralManager! internal class ServiceFactory { fileprivate(set) var serviceTypes = Dictionary<String, Service.Type>() var serviceUUIDs: [CBUUID] { return serviceTypes.keys.map { uuid in return CBUUID(string: uuid) } } var servicesToDiscover: [CBUUID] = [] } fileprivate let serviceFactory = ServiceFactory() fileprivate var sensorsById = Dictionary<String, Sensor>() fileprivate var activityUpdateTimer: Timer? static internal let RSSIPingInterval: TimeInterval = 2 static internal let ActivityInterval: TimeInterval = 5 static internal let InactiveInterval: TimeInterval = 4 } // Private Funtions extension SensorManager { fileprivate func stateUpdated() { if centralManager.state != .poweredOn { return } activityUpdateTimer?.invalidate() activityUpdateTimer = nil switch state { case .off: stopScan() for sensor in sensors { disconnectFromSensor(sensor) } SensorManager.logSensorMessage?("Shutting Down SensorManager") case .idle: stopScan() startActivityTimer() case .passiveScan: scan(false) startActivityTimer() case .aggressiveScan: scan(true) startActivityTimer() } } fileprivate func stopScan() { centralManager.stopScan() } fileprivate func startActivityTimer() { activityUpdateTimer?.invalidate() activityUpdateTimer = Timer.scheduledTimer(timeInterval: SensorManager.ActivityInterval, target: self, selector: #selector(SensorManager.rssiUpateTimerHandler(_:)), userInfo: nil, repeats: true) } fileprivate func scan(_ aggressive: Bool) { let options: [String: AnyObject] = [ CBCentralManagerScanOptionAllowDuplicatesKey: aggressive as AnyObject ] let serviceUUIDs = serviceFactory.servicesToDiscover centralManager.scanForPeripherals(withServices: serviceUUIDs, options: options) SensorManager.logSensorMessage?("SensorManager: Scanning for Services") for peripheral in centralManager.retrieveConnectedPeripherals(withServices: serviceUUIDs) { let _ = sensorForPeripheral(peripheral, create: true) } } @objc func rssiUpateTimerHandler(_ timer: Timer) { let now = Date.timeIntervalSinceReferenceDate for sensor in sensors { if now - sensor.lastSensorActivity > SensorManager.InactiveInterval { sensor.rssi = Int.min } } } fileprivate func sensorForPeripheral(_ peripheral: CBPeripheral, create: Bool, advertisements: [CBUUID] = []) -> Sensor? { if let sensor = sensorsById[peripheral.identifier.uuidString] { return sensor } if !create { return nil } let sensor = SensorType.init(peripheral: peripheral, advertisements: advertisements) sensor.serviceFactory = serviceFactory sensorsById[peripheral.identifier.uuidString] = sensor onSensorDiscovered => sensor SensorManager.logSensorMessage?("SensorManager: Created Sensor for Peripheral: \(peripheral)") return sensor } } extension SensorManager: CBCentralManagerDelegate { /// :nodoc: public func centralManager(_ manager: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) { SensorManager.logSensorMessage?("CBCentralManager: didFailToConnectPeripheral: \(peripheral)") if let sensor = sensorForPeripheral(peripheral, create: false) { onSensorConnectionFailed => sensor } } /// :nodoc: public func centralManager(_ manager: CBCentralManager, didConnect peripheral: CBPeripheral) { SensorManager.logSensorMessage?("CBCentralManager: didConnectPeripheral: \(peripheral)") if let sensor = sensorForPeripheral(peripheral, create: true) { peripheral.discoverServices(serviceFactory.serviceUUIDs) onSensorConnected => sensor } } /// :nodoc: public func centralManager(_ manager: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) { SensorManager.logSensorMessage?("CBCentralManager: didDisconnectPeripheral: \(peripheral)") // Error Codes: // 0 = Unknown error. possibly a major crash? // 6 = Connection timed out unexpectedly (pulled the battery out, lost connection due to distance) // 10 = The connection has failed unexpectedly. if let sensor = sensorForPeripheral(peripheral, create: false) { onSensorDisconnected => (sensor, error as NSError?) if error != nil { sensorsById.removeValue(forKey: sensor.peripheral.identifier.uuidString) onSensorRemoved => sensor } } } /// :nodoc: public func centralManager(_ manager: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) { if let uuids = advertisementData[CBAdvertisementDataServiceUUIDsKey] as? [CBUUID] { if let sensor = sensorForPeripheral(peripheral, create: true, advertisements: uuids) { if RSSI.intValue < 0 { sensor.rssi = RSSI.intValue sensor.markSensorActivity() } } } } /// :nodoc: public func centralManagerDidUpdateState(_ central: CBCentralManager) { SensorManager.logSensorMessage?("centralManagerDidUpdateState: \(central.state.rawValue)") switch central.state { case .unknown: break case .resetting: break case .unsupported: break case .unauthorized: break case .poweredOff: break case .poweredOn: stateUpdated() } onBluetoothStateChange => CBCentralManagerState(rawValue: central.state.rawValue)! } }
[ -1 ]
82076a3da40fee91c8551744b6cd3b846d78cbfe
8ab40bc0ae12c6a151a756aecfee67feff0c5a52
/Source/Controller/ListDataProvider.swift
05fd94f9c46422676b1e3acb83ff59a569ad8ae0
[]
no_license
lostw/LostwKit
937b49d16b92d2fb50c1f162ea1026a730bedbb4
5971abea1fe2c31b84dc7947e6c53603cee069ed
refs/heads/master
2021-08-01T11:57:43.090668
2021-06-15T13:35:53
2021-06-15T13:35:53
230,384,699
1
0
null
null
null
null
UTF-8
Swift
false
false
1,638
swift
// // ListDataProvider.swift // Alamofire // // Created by William on 2020/10/9. // import Foundation public typealias DataProviderResult<Model> = ([Model], Bool, Error?) -> Void public protocol ListDataProvider { associatedtype ProviderModel func loadData(at page: Int, onResult: @escaping DataProviderResult<ProviderModel>) } public typealias DataProviderAnyAction<Model> = (_ page: Int, _ completion: @escaping ([Model], Bool, Error?) -> Void) -> Void public class AnyDataProvider<Model>: ListDataProvider { public typealias Model = ProviderModel let action: DataProviderAnyAction<Model> public init(action: @escaping DataProviderAnyAction<Model>) { self.action = action } public func loadData(at page: Int, onResult: @escaping DataProviderResult<Model>) { self.action(page, onResult) } } public typealias DataProviderResultAction<Model> = (_ page: Int, _ completion: @escaping (Swift.Result<[Model], Error>, _ hasMore: (Int) -> Bool) -> Void) -> Void public class ResultDataProvider<Model>: ListDataProvider { public typealias Model = ProviderModel let action: DataProviderResultAction<Model> public init(action: @escaping DataProviderResultAction<Model>) { self.action = action } public func loadData(at page: Int, onResult: @escaping DataProviderResult<Model>) { self.action(page) { result, hasMore in switch result { case .success(let list): onResult(list, hasMore(list.count), nil) case .failure(let error): onResult([], false, error) } } } }
[ -1 ]
c18b6cbdeb09c0a3d8e09045c64d5157b13574cb
e98c1400ebc9c9363bada5fcdd43006b52eeea65
/TZVideoSwift/UI/Follow/Views/FollowVideoCell.swift
37aed97f5e5795f825fa5b6a1106d69eb8891866
[ "MIT" ]
permissive
Khala1986/TZVideo_Swift_Ver
5240cba9a95fd7311b052e95b2c8807d2f4f3382
1b3764520a00e7e66c48507bd3a052523e853c6a
refs/heads/master
2020-03-31T13:39:18.556991
2018-11-05T12:06:51
2018-11-05T12:06:51
152,263,686
0
0
null
null
null
null
UTF-8
Swift
false
false
1,000
swift
// // FollowVideoCell.swift // TZVideoSwift // // Created by 陈学明 on 2018/11/2. // import UIKit class FollowVideoCell: FollowBaseCell { @IBOutlet weak var coverImageView: UIImageView! @IBOutlet weak var coverImageHeight: NSLayoutConstraint! override func awakeFromNib() { super.awakeFromNib() coverImageView.backgroundColor = UIColor.lightGray coverImageHeight.constant = (UIScreen.main.bounds.width - 20) * 9 / 16 // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } override func configWithData(data: AnyObject) { super.configWithData(data: data) if data is FollowListItem { let item = data as! FollowListItem coverImageView.setImageWith(URL(string: item.video.cover)!) self.updateConstraints() } } }
[ -1 ]
9d95401884eb71745f6f6f31ed57e5d01d546ac5
1cbb1ef9440a78384d3e1c02a0bdb41088755cd6
/SwiftUIDemo/Others/Drag/CircleView.swift
6493984e15ff1204a5d8d3bbde46ab032aa50370
[]
no_license
ChiaoteNi/SwiftUIDemo
9e054fbaf2916b20f31b5c0296ae52825c502edc
287be56460a0ce773b41d3d347326e805e1ca623
refs/heads/master
2020-06-06T14:16:39.413707
2019-06-19T15:42:31
2019-06-19T15:42:31
192,761,437
1
1
null
null
null
null
UTF-8
Swift
false
false
1,098
swift
// // CircleView.swift // SwiftUIDemo // // Created by admin on 2019/6/17. // Copyright © 2019 aaronni. All rights reserved. // import SwiftUI struct CircleView : View { @State private var isOpen: Bool = false var body: some View { ZStack { Circle() .fill(Color.green) .frame(width: 80, height: 80) .offset(x: 0, y: self.isOpen ? -80 : 0) Circle() .fill(Color.black) .frame(width: 80, height: 80) .offset(x: 0, y: self.isOpen ? 80 : 0) Circle() .fill(Color.red) .frame(width: 80, height: 80) .gesture( TapGesture() .onEnded({ withAnimation(.spring()) { self.isOpen.toggle() } })) } } } #if DEBUG struct CircleView_Previews : PreviewProvider { static var previews: some View { CircleView() } } #endif
[ -1 ]
13ae8a26e5e031bdf14562df9a61fc2b4efca348
61d484ae68e40b89432f66f98164c811692ee612
/Circle/TeamDetailDataSource.swift
2220e39007f27c5a5c15ae87ce896c3a645009b3
[ "MIT" ]
permissive
getcircle/luno-ios
2a29192c130c48415e55b50850e77a1a37f22ad1
d18260abb537496d86cf607c170dd5e91c406f0f
refs/heads/master
2021-05-01T04:01:52.647661
2016-12-05T04:54:08
2016-12-05T04:54:08
27,101,758
0
0
null
null
null
null
UTF-8
Swift
false
false
9,767
swift
// // TeamDetailDataSource.swift // Circle // // Created by Ravi Rani on 1/17/15. // Copyright (c) 2015 RH Labs Inc. All rights reserved. // import UIKit import ProtobufRegistry class TeamDetailDataSource: CardDataSource { var team: Services.Organization.Containers.TeamV1! var textDataDelegate: TextValueCollectionViewDelegate? private(set) var profileHeaderView: ProfileHeaderCollectionReusableView? private(set) var managerProfile: Services.Profile.Containers.ProfileV1! private(set) var profiles = Array<Services.Profile.Containers.ProfileV1>() private(set) var profilesNextRequest: Soa.ServiceRequestV1? private(set) var teams = Array<Services.Organization.Containers.TeamV1>() private let sectionHeaderClass = ProfileSectionHeaderCollectionReusableView.self override class var cardSeparatorInset: UIEdgeInsets { return UIEdgeInsetsMake(0.0, 60.0, 0.0, 0.0) } override func getTitle() -> String { return team.getName() } // MARK: - Load Data override func loadData(completionHandler: (error: NSError?) -> Void) { resetCards() if cards.count == 0 { addPlaceholderCard() } if AuthenticationViewController.getLoggedInUserProfile() != nil { var storedError: NSError! let actionsGroup = dispatch_group_create() // Fetch extended team details dispatch_group_enter(actionsGroup) Services.Organization.Actions.getTeam(team.id) { (team, error) -> Void in if let error = error { storedError = error } else { self.team = team } dispatch_group_leave(actionsGroup) } // Fetch reporting info dispatch_group_enter(actionsGroup) Services.Organization.Actions.getTeamReportingDetails(team.id) { (members, childTeams, manager, error) -> Void in if let error = error { storedError = error } else { if let childTeams = childTeams { self.teams = childTeams } if let manager = manager { self.managerProfile = manager } } dispatch_group_leave(actionsGroup) } // Fetch members dispatch_group_enter(actionsGroup) Services.Profile.Actions.getProfiles(team.id) { (profiles, nextRequest, error) -> Void in if let error = error { storedError = error } else { if let profiles = profiles { // TODO update whatever counts there are of this self.profiles = profiles } if let nextRequest = nextRequest { self.profilesNextRequest = nextRequest } } dispatch_group_leave(actionsGroup) } dispatch_group_notify(actionsGroup, GlobalMainQueue) { () -> Void in self.profiles = self.profiles.filter({ (profile) -> Bool in return self.managerProfile.id != profile.id }) self.populateData() completionHandler(error: storedError) } } } override func canEdit() -> Bool { if let permissions = self.team.permissions where permissions.canEdit { return true } return super.canEdit() } private func addPlaceholderCard() { // Add a placeholder card for header view let placeholderHeaderCard = Card(cardType: .Placeholder, title: "") placeholderHeaderCard.addHeader( headerClass: ProfileHeaderCollectionReusableView.self, headerSize: CGSizeMake( ProfileHeaderCollectionReusableView.width, ProfileHeaderCollectionReusableView.heightWithoutSecondaryInfo ) ) appendCard(placeholderHeaderCard) } private func addDescriptionCard() { var description = "" if let value = team.description_?.value where value.trimWhitespace() != "" { description = value } let descriptionCard = Card(cardType: .TextValue, title: "Description") descriptionCard.addHeader(headerClass: sectionHeaderClass) descriptionCard.showContentCount = false descriptionCard.addContent(content: [ TextData( type: .TeamDescription, andValue: description, andTimestamp: team.description_?.changed, andPlaceholder: NSLocalizedString( "Ask me!", comment: "Generic text indicating a person should be asked about this info" ), andAuthor: team.description_?.byProfile, andCanEdit: canEdit() ) ]) appendCard(descriptionCard) } private func addManagerCard() { if let manager = self.managerProfile { let managerCard = Card(cardType: .Profiles, title: "Manager") managerCard.showContentCount = false managerCard.addHeader(headerClass: sectionHeaderClass) managerCard.addContent(content: [manager]) self.appendCard(managerCard) } } private func addSubTeamsCard() { if teams.count > 0 { let teamsCard = Card( cardType: .Profiles, subType: .Teams, title: AppStrings.TeamSubTeamsSectionTitle + " (" + String(teams.count) + ")" ) teamsCard.showContentCount = false teamsCard.addHeader(headerClass: sectionHeaderClass) teamsCard.addContent(content: teams, maxVisibleItems: Card.MaxListEntries) if teams.count > Card.MaxListEntries { teamsCard.addDefaultFooter() } appendCard(teamsCard) } } private func addMembersCard() { if profiles.count > 0 { let membersCardTitle = AppStrings.CardTitlePeople.localizedUppercaseString() let membersCard = Card( cardType: .Profiles, subType: .Members, title: membersCardTitle + " (" + String(team.profileCount - 1) + ")" ) membersCard.showContentCount = false membersCard.addHeader(headerClass: sectionHeaderClass) membersCard.addContent(content: profiles, maxVisibleItems: Card.MaxListEntries) if profiles.count > Card.MaxListEntries { membersCard.addDefaultFooter() } appendCard(membersCard) } } private func populateData() { resetCards() addPlaceholderCard() addDescriptionCard() addManagerCard() addSubTeamsCard() addMembersCard() } // MARK: - UICollectionViewDataSource override func configureHeader( header: CircleCollectionReusableView, atIndexPath indexPath: NSIndexPath ) { super.configureHeader(header, atIndexPath: indexPath) if let teamHeader = header as? ProfileHeaderCollectionReusableView { teamHeader.setTeam(team) profileHeaderView = teamHeader } else if let cardHeader = header as? ProfileSectionHeaderCollectionReusableView { cardHeader.addBottomBorder = true } } override func configureFooter(footer: CircleCollectionReusableView, atIndexPath indexPath: NSIndexPath) { if let footerView = footer as? CardFooterCollectionReusableView, card = cardAtSection(indexPath.section) { switch card.subType { case .Members: footerView.setButtonTitle( NSString( format: NSLocalizedString( "View all %d People", comment: "Title of the button to see all the people" ), team.profileCount - 1 ) as String ) case .Teams: footerView.setButtonTitle( NSString( format: NSLocalizedString( "View all %d Teams", comment: "Title of the button to see all the teams" ), teams.count ) as String ) default: break } } } override func configureCell(cell: CircleCollectionViewCell, atIndexPath indexPath: NSIndexPath) { let cellIsBottomOfSection = cellAtIndexPathIsBottomOfSection(indexPath) if cellIsBottomOfSection { cell.addRoundCorners([.BottomLeft, .BottomRight], radius: 4.0) } else { cell.removeRoundedCorners() } if (isLastCellAtIndexPath(indexPath)) { cell.separatorInset = UIEdgeInsetsZero } cell.showSeparator = !cellIsBottomOfSection if let textValueCell = cell as? TextValueCollectionViewCell { textValueCell.delegate = textDataDelegate } } }
[ -1 ]
3c66b960ee817f3355e4b4d1e6944bcd681a2cc1
e795a2cb6368d3f75f0231db85bdc2a6812055a5
/Calculator/CalculatorRow.swift
ba4a8b4ae27679975532817ad68925ebbfffe345
[]
no_license
arshmeets/CalculatorApp
fcb8d3483baa2a1fc634f8ac205eb0a1869c2898
ed6a82910e836154dc407c3a1cc1a7bfc6ba58a7
refs/heads/main
2023-03-26T06:14:24.572474
2021-04-01T01:28:55
2021-04-01T01:28:55
344,145,348
0
0
null
null
null
null
UTF-8
Swift
false
false
793
swift
// // CalculatorRow.swift // Calculator // // Created by Arshmeet Sodhi on 2020-10-01. // import SwiftUI struct CalculatorRow: View { @EnvironmentObject var calculator: Calculator var labels = ["", "", "", ""] var colors: [Color] = [.gray, .gray, .gray, .orange] var body: some View { // Display a button for each column, selecting from the labels and colors given HStack(spacing: 10) { ForEach(0..<columnCount) { index in CalculatorButton(label: labels[index], color: colors[index]) } } } } struct CalculatorRow_Previews: PreviewProvider { static var previews: some View { CalculatorRow(labels: ["1", "2", "3", "+"]) .previewLayout(.fixed(width: 300, height: 100)) } }
[ -1 ]
8dd26bb3cc6658202e3d84cfacea17f4c3de3f83
e1bd2553cefb589721bcd4a529e97ce578b67958
/Patri/PatriApp.swift
afe7f520856c30e303d6127f524de7a70f0c6915
[]
no_license
avnish015/Patri
6346afd2873a6e5677370e50058c9e59e089c927
bc2e98334505824f5b11b75f3870297ac003bbe4
refs/heads/main
2023-05-31T03:56:15.482469
2021-06-16T21:14:27
2021-06-16T21:14:27
377,604,483
0
0
null
null
null
null
UTF-8
Swift
false
false
261
swift
// // PatriApp.swift // Patri // // Created by Avnish on 26/05/21. // import SwiftUI @main struct PatriApp: App { var body: some Scene { WindowGroup { HomeView() .environmentObject(HomeViewModel()) } } }
[ 352896, 360961, 416512, 360963, 416516, 416520, 418569, 262672, 375441, 270738, 381458, 383636, 425873, 435226, 430235, 434973, 386462, 432288, 186913, 344610, 411042, 398372, 375590, 156460, 254895, 372655, 375601, 393905, 375603, 265397, 383610, 261943, 260919, 397881, 372031, 352323, 207812, 388164, 404552, 337865, 415051, 225228, 208333, 272205, 372940, 393168, 394960, 383954, 272211, 178132, 351443, 409423, 417998, 420817, 421334, 351067, 173919, 149473, 355044, 223975, 367722, 266348, 380652, 385908, 359285, 380917, 381050, 374140, 415357, 274174, 426879 ]
62b6a248ca4e0d2a0f230f4ad88e97e6fd41bab0
fb11d0e804ad114730b7bae17638baa3ceb05e07
/sui_pizza/sui_pizzaApp.swift
026ff0b40f4863b77c91c9a82bf0caddc4583b09
[]
no_license
FaberDS/sui_pizza
bc38aebd66affdd45e1da8f01fe6c8c66c26701b
be351a54d98112c88a402e9eccae6eaa4113235b
refs/heads/main
2023-08-27T10:16:24.411241
2021-10-26T14:29:44
2021-10-26T14:29:44
null
0
0
null
null
null
null
UTF-8
Swift
false
false
231
swift
// // sui_pizzaApp.swift // sui_pizza // // Created by Denis Schüle on 26.10.21. // import SwiftUI @main struct sui_pizzaApp: App { var body: some Scene { WindowGroup { ContentView() } } }
[ -1 ]
9a737b28eec057c4f9ef26f60885d93cae7822bc
65f5aef1ef18c6e7612deac51f53b539fa9bb4eb
/GHFollowers/GHFollowers/CustomViews/BodyLabel.swift
4adc7fb12b11033a80b01d0ee843d2075f87fc9a
[]
no_license
scannillo/github-followers-app
2659304c2e79cc889f7530f8ebe4002037d97e9b
7fd40a935343973c3584c7dfd0f8ddd3085fdeb6
refs/heads/main
2023-07-26T09:33:12.353065
2021-08-29T18:07:59
2021-08-29T18:07:59
395,164,291
0
0
null
null
null
null
UTF-8
Swift
false
false
870
swift
// // BodyLabel.swift // GHFollowers // // Created by Samantha Cannillo on 8/15/21. // import UIKit class BodyLabel: UILabel { override init(frame: CGRect) { super.init(frame: frame) configureStyling() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } init(textAlignment: NSTextAlignment) { super.init(frame: .zero) self.textAlignment = textAlignment configureStyling() } private func configureStyling() { textColor = .secondaryLabel font = UIFont.preferredFont(forTextStyle: .body) adjustsFontSizeToFitWidth = true minimumScaleFactor = 0.75 // minimum possible font size as % of original lineBreakMode = .byWordWrapping translatesAutoresizingMaskIntoConstraints = false } }
[ 345896 ]
880ed69ef4797fce44daa42b39efb5fb360b08a9
17b45ba8e217e5d4ddbf7597b83cf8bc6e89ec29
/MovieInfo/Cells/MovieTopRatedViewCell.swift
94bf2c27eed4418629489be0e35ed3641ee61733
[]
no_license
cristofor98/MovieAppIos
7554b9cd35b46f9b16092c9dbd4539b6c48625e3
6dfff95866bd43f0c9ce2abcc7f4fd00bfa593f0
refs/heads/master
2022-11-07T00:43:00.823312
2020-06-11T18:57:44
2020-06-11T18:57:44
271,623,632
0
0
null
null
null
null
UTF-8
Swift
false
false
573
swift
// // MovieTopRatedViewCell.swift // MovieInfo // // Created by tekwill on 6/5/20. // Copyright © 2020 Alfian Losari. All rights reserved. // import UIKit import Kingfisher class MovieTopRatedViewCell: UICollectionViewCell { var movie: Movie? { didSet{ if let movie = movie { movieImagine.kf.setImage(with: movie.posterURL) } } } @IBOutlet private weak var movieImagine: UIImageView! } //extension String{ // var url: URL? { // return URL(string: "\(posterUrl)\(self)") // } //}
[ -1 ]
678e3318e34e99ad3f5c9e51859db063897b3786
8303a05ef4a7c9eadb1955b0103bd4bbb090ae95
/AppWatch Extension/InterfaceController.swift
aa07d0d5bf6e9fabcdcd435e5dafc1c2882c8c66
[]
no_license
jolam168/cloudvision
c267b0d84dd69b1fe48d51ed89b42f4a40aceadb
1c35785a7891882ada77827936bdf4ab7d2ead78
refs/heads/master
2020-04-24T10:12:32.213577
2019-03-24T07:47:03
2019-03-24T07:47:03
171,885,636
0
0
null
null
null
null
UTF-8
Swift
false
false
729
swift
// // InterfaceController.swift // AppWatch Extension // // Created by 林 耀祖 on 2018/09/06. // Copyright © 2018 林 耀祖. All rights reserved. // import WatchKit import Foundation class InterfaceController: WKInterfaceController { override func awake(withContext context: Any?) { super.awake(withContext: context) // Configure interface objects here. } override func willActivate() { // This method is called when watch view controller is about to be visible to user super.willActivate() } override func didDeactivate() { // This method is called when watch view controller is no longer visible super.didDeactivate() } }
[ 286342, 108913, 196690, 238649, 324765 ]
c0eff1d839782a8d0f143355635a6059a8777d5c
7a374f550c3473c7f2b278d20a3e53c76c880e4f
/StajTakip/AppDelegate.swift
af604c0064daed90982a5ce47a523372a4da8375
[]
no_license
serhanakyol/internship-project-iOS
33b7fbe02c070a243e45a94f6085e692d8f40d32
a99dae958198e477c71693f51d3c9d64565d90ed
refs/heads/master
2020-03-22T16:36:22.984441
2018-07-09T20:39:00
2018-07-09T20:39:00
140,338,421
3
0
null
null
null
null
UTF-8
Swift
false
false
2,177
swift
// // AppDelegate.swift // StajTakip // // Created by Serhan Akyol on 8.05.2018. // Copyright © 2018 Serhan Akyol. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 294924, 229388, 327695, 229391, 229394, 229397, 229399, 229402, 229405, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 237618, 229426, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 237646, 311375, 163920, 196692, 319573, 311383, 319590, 311400, 303212, 131192, 237693, 303230, 327814, 303241, 131209, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 98756, 278980, 319945, 278986, 319947, 278990, 278994, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 311804, 287230, 279040, 303617, 287234, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 295533, 172655, 172656, 352880, 295538, 172660, 287349, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 303773, 164509, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 189169, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 230241, 279394, 303976, 336744, 303981, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 304009, 213895, 304011, 230284, 304013, 295822, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 304065, 213954, 295873, 156612, 189378, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 164973, 312432, 279669, 337018, 304258, 66690, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 337067, 165035, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 230718, 296255, 312639, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 148946, 370130, 222676, 288210, 280021, 288212, 288214, 329177, 239064, 288217, 288218, 288220, 239070, 288224, 370146, 280034, 288226, 288229, 280036, 280038, 288232, 288230, 320998, 288234, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 181854, 280158, 370272, 403039, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 288499, 419570, 288502, 288510, 124671, 67330, 280324, 198405, 288519, 198416, 280337, 296723, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 321336, 296767, 288576, 345921, 304968, 280393, 280402, 173907, 313171, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 247688, 280464, 124817, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 215123, 354390, 288859, 280669, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 275608, 100520, 288936, 280747, 288940, 288947, 321717, 280764, 280769, 280771, 280774, 313548, 321740, 280783, 280786, 313557, 280793, 280796, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 182517, 280825, 280827, 280830, 280831, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 305480, 239944, 239947, 305485, 305489, 379218, 289111, 280919, 248153, 354653, 354656, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 281095, 223752, 150025, 338440, 223757, 281102, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281372, 322341, 215850, 281388, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 265604, 224647, 281990, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282144, 290344, 306731, 290349, 290351, 290356, 224849, 282195, 282199, 282201, 306778, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 323330, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 241560, 241563, 241565, 241567, 241569, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 307385, 176311, 258235, 307388, 307386, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 127417, 291260, 127421, 127424, 299457, 127429, 127434, 315856, 127440, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127494, 283142, 135689, 233994, 127497, 127500, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 242431, 209665, 299778, 234242, 242436, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 201496, 234264, 234266, 234269, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 234364, 291711, 234368, 291714, 201603, 291716, 234373, 234370, 226182, 234375, 308105, 324490, 226185, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 324522, 291754, 291756, 226220, 234414, 324527, 291760, 201650, 324531, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 234437, 226239, 226245, 234439, 234443, 291788, 193486, 234446, 193488, 234449, 316370, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 234493, 316416, 234496, 308226, 234501, 308231, 234504, 234507, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234593, 234595, 234597, 300133, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 234647, 234648, 226453, 234650, 308379, 275606, 300189, 324766, 119967, 324768, 234653, 283805, 234657, 242852, 300197, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 275725, 177424, 349451, 283917, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 136562, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 300433, 234899, 300436, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 243268, 284231, 226886, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 284249, 235097, 243290, 276053, 284253, 300638, 243293, 284255, 284258, 292452, 292454, 177766, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 358114, 358116, 276197, 317158, 358119, 325353, 358122, 358126, 276206, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 178006, 317271, 284502, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 317332, 358292, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276411, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 153568, 292839, 292843, 178161, 227314, 325624, 317435, 317446, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 243779, 325700, 292934, 243785, 350293, 350295, 309337, 227418, 350299, 350302, 227423, 350304, 178273, 309346, 227426, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 350313, 301163, 350316, 227430, 301167, 276586, 350321, 227440, 284786, 276595, 350325, 252022, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 309494, 243960, 227583, 276735, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 211241, 325937, 325943, 211260, 260421, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 366983, 317833, 178572, 285070, 178583, 227738, 317853, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 55837, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 301636, 318020, 301639, 301643, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 154292, 277173, 342707, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 56041, 285417, 56043, 277232, 228081, 56059, 310015, 310020, 310029, 228113, 285459, 277273, 293659, 326430, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 293706, 277329, 162643, 310100, 301911, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 310179, 277411, 293798, 293802, 236460, 293811, 276579, 293817, 293820, 203715, 326603, 342994, 293849, 293861, 228327, 228328, 318442, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 244731, 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, 392326, 294026, 285835, 302218, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277801, 277804, 285997, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 277857, 277860, 302436, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 310780, 286203, 40448, 228864, 286214, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 245288, 310831, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286313, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 278168, 179870, 327333, 229030, 212648, 302764, 278188, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 229076, 286425, 319194, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 237562 ]
d9acd12b21a392462f9f1c78bcc8d3c6921f445a
22af60508ce3ff70972416ec8c3245baef7b3cc8
/Test2/Test2/ViewController.swift
1d88794fbe2fd1725e791972381cffed3cb434fe
[]
no_license
jungjuhwan/A
d3d64b628af64719f03c61358755e2fa3c6ecd17
fca35d1a4cd3c1aa264274a00a8cecd31ed43a49
refs/heads/master
2021-01-19T21:18:50.807828
2015-11-23T08:23:49
2015-11-23T08:23:49
46,699,388
0
0
null
null
null
null
UTF-8
Swift
false
false
511
swift
// // ViewController.swift // Test2 // // Created by oenmac on 2015. 11. 23.. // Copyright © 2015년 oenmac. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ 307212, 278543, 317473, 237616, 292915, 360501, 286775, 237624, 288827, 290875, 286786, 284740, 159812, 243786, 286796, 278606, 237655, 307288, 200802, 309347, 276580, 309349, 309351, 309353, 356460, 307311, 276597, 278657, 276612, 280710, 303242, 311437, 278675, 307353, 299165, 278693, 100521, 307379, 280760, 184504, 280770, 227523, 280772, 280775, 313550, 276686, 229585, 307410, 278749, 280797, 301284, 280808, 280810, 286963, 280821, 286965, 280826, 280832, 276736, 309506, 278786, 278791, 287004, 287007, 282917, 233767, 307516, 278845, 289088, 311624, 287055, 289112, 311645, 323933, 289120, 289121, 227688, 313706, 299374, 199024, 276849, 278897, 280947, 313733, 233869, 227740, 285087, 289187, 289190, 289191, 305577, 289196, 305582, 285103, 278968, 127418, 293308, 278973, 289224, 276959, 279011, 276965, 281078, 236022, 233980, 287231, 279041, 279046, 215562, 281107, 279064, 236057, 281118, 289318, 309807, 281142, 279096, 234043, 277057, 129604, 301637, 158285, 311913, 281202, 277108, 287350, 117399, 228000, 295586, 225955, 287399, 277171, 285377, 285378, 287437, 299727, 226009, 277224, 199402, 234223, 312049, 289524, 226038, 234232, 230147, 226055, 299786, 295696, 295699, 281373, 228127, 281380, 234279, 283433, 312107, 293682, 285495, 289596, 283453, 279360, 289600, 293700, 283461, 279380, 295766, 279386, 308064, 303977, 293742, 162672, 277364, 207738, 291709, 303998, 183173, 304008, 324491, 304012, 234380, 304015, 226196, 277406, 234402, 291755, 297903, 324528, 230323, 234423, 230328, 277432, 293816, 281530, 291774, 295874, 299973, 234465, 168936, 289771, 183278, 277487, 293874, 293875, 293888, 277508, 277512, 275466, 234511, 277527, 300057, 197664, 304174, 300086, 234551, 300089, 238653, 293961, 300107, 203858, 300116, 277602, 281701, 281703, 296042, 277612, 164974, 312433, 300149, 189557, 234619, 285837, 226447, 234641, 349332, 302235, 285855, 234665, 283839, 277696, 228548, 228551, 279751, 279754, 230604, 298189, 302286, 230608, 290004, 290006, 189655, 302295, 298202, 298206, 363743, 298211, 290020, 228585, 120054, 204027, 292102, 312586, 296216, 277796, 130346, 300358, 238920, 234829, 296272, 230737, 230745, 306540, 300400, 310649, 333179, 290175, 275842, 224643, 298375, 300432, 226705, 310673, 304531, 306578, 304536, 304540, 288165, 304550, 304551, 144811, 370093, 286126, 277935, 279982, 282035, 292277, 296374, 130487, 144822, 292280, 306633, 288205, 286158, 280015, 310734, 286162, 163289, 280030, 280031, 286175, 286189, 282095, 308721, 302580, 310773, 296436, 290299, 288251, 286204, 290303, 294411, 286234, 284192, 294433, 282145, 284197, 296487, 286249, 296489, 226878, 288321, 228932, 226887, 284235, 284236, 288331, 284239, 284240, 226896, 284242, 292435, 212561, 300629, 276054, 228945, 280146, 212573, 40545, 284261, 306791, 286314, 284275, 314996, 284277, 294518, 276087, 284279, 292478, 284287, 284289, 284298, 278157, 282262, 280219, 284315, 284317, 282270, 282275, 284323, 280231, 284328, 198315, 313007, 284336, 302767, 284341, 286390, 300727, 276150, 282301, 296638, 302788, 282311, 294600, 284361, 276167, 239310, 282320, 317137, 239314, 284373, 282329, 282338, 284391, 282346, 358127, 282357, 288501, 286456, 358139, 282365, 286462, 282368, 358147, 282377, 300817, 282389, 282393, 278298, 329499, 276256, 278304, 315170, 282403, 304933, 282411, 159541, 282426, 288579, 307029, 276309, 241499, 188253, 292701, 296811, 315250, 284534, 292730, 313222, 284570, 294812, 284574, 284576, 284577, 284580, 284586, 276396, 282548, 296901, 165832, 301012, 301016, 292824, 294877, 294889, 298989, 231405, 227315, 237556 ]
6139f94dec1059e0913c4a6dc88c37d1c9349694
0b7fbe38023c38e27a18352e68247c658dae73a1
/voiceRecorder2/AppDelegate.swift
0391630260a199bd0630e4ce91390018ba38390f
[]
no_license
kazaman97/voiceRecoeder2
958b8ca615353b52635418f2252a6f77a0618672
4ff9ed5c879016ce55ed5e90da74117a5379bf5c
refs/heads/master
2021-06-13T08:21:22.984484
2017-03-08T11:20:54
2017-03-08T11:20:54
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,181
swift
// // AppDelegate.swift // voiceRecorder2 // // Created by Kazama Ryusei on 2017/03/08. // Copyright © 2017年 Malfoy. 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, 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, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 278983, 319945, 278986, 278990, 278994, 311767, 279003, 279006, 188895, 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, 213575, 172618, 303690, 33357, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 328563, 303987, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 213902, 189331, 58262, 304023, 304027, 279452, 234648, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 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, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 148946, 288214, 239064, 288217, 329177, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 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, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 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, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 281095, 223752, 150025, 338440, 240132, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 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, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 338823, 183184, 142226, 289687, 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, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 216376, 380226, 298306, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 298377, 314763, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 290325, 282133, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 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, 298822, 315211, 307027, 315221, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 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, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 299225, 233701, 307432, 282881, 282893, 323854, 291089, 282906, 291104, 233766, 295583, 307508, 315701, 332086, 307510, 307512, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 276052, 315739, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 176592, 127440, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 283142, 127494, 127497, 233994, 135689, 127500, 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, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 292433, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 201603, 226182, 234375, 308105, 226185, 234379, 324490, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 226220, 291754, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 275384, 324536, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 226245, 234437, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 324757, 308379, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 226500, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 283917, 177424, 349451, 275725, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 316811, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 227440, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 284258, 292452, 292454, 284263, 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, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 292681, 153417, 358224, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 292729, 317306, 284540, 292734, 325512, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292784, 358326, 161718, 358330, 276410, 276411, 276418, 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, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 309491, 227571, 309494, 243960, 276735, 227583, 227587, 276739, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 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, 113167, 309779, 317971, 309781, 277011, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 23094, 277054, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170619, 309885, 309888, 277122, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 318132, 277173, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 228069, 277223, 342760, 285417, 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, 301884, 310080, 293696, 277317, 277322, 293706, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 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, 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, 64768, 310531, 285958, 138505, 228617, 318742, 277798, 130345, 113964, 285997, 384302, 285999, 113969, 318773, 318776, 286010, 417086, 286016, 302403, 294211, 384328, 294221, 146765, 294223, 326991, 179547, 146784, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 351619, 294276, 310659, 327046, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 228776, 277932, 310703, 310710, 130486, 310712, 310715, 302526, 228799, 302534, 310727, 64966, 245191, 163272, 302541, 302543, 310737, 228825, 163290, 310749, 310755, 187880, 310764, 286188, 310772, 40440, 212472, 40443, 286203, 310780, 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, 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, 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, 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, 40851, 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 ]
91b5fe6de4e1d8fd1a37ac9ab8f4cb6cb7f7fdec
a82f26020cae5cb51fb2bc83b7e096744f2b4997
/Tests/AlicerceTests/UIKit/TableViewCellTestCase.swift
9e8f52ef8cb90d5d6f4f197640b8ec74473386fe
[ "MIT" ]
permissive
colla2me/Alicerce
b2989eae9d60aea9d7af7fe628200dcb5f0d569d
d382d18c27a6ec6dd4b9b0171995ef811f90b9f0
refs/heads/master
2020-03-16T20:46:18.705469
2018-05-10T09:53:30
2018-05-10T09:53:30
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,193
swift
// // TableViewCellTestCase.swift // Alicerce // // Created by André Pacheco Neves on 16/05/2017. // Copyright © 2017 Mindera. All rights reserved. // import XCTest @testable import Alicerce final class MockTableViewCell: TableViewCell { private(set) var setUpSubviewsCallCount = 0 private(set) var setUpConstraintsCallCount = 0 override func setUpSubviews() { super.setUpSubviews() setUpSubviewsCallCount += 1 } override func setUpConstraints() { super.setUpConstraints() setUpConstraintsCallCount += 1 } } class TableViewCellTestCase: XCTestCase { func testInit_WithFrame_ShouldInvokeSetUpMethods() { let cell = MockTableViewCell(frame: .zero) XCTAssertEqual(cell.setUpSubviewsCallCount, 1) XCTAssertEqual(cell.setUpConstraintsCallCount, 1) } func testInit_WithCoder_ShouldInvokeSetUpMethods() { guard let cell: MockTableViewCell = UIView.instantiateFromNib(withOwner: self) else { return XCTFail("failed to load view from nib!") } XCTAssertEqual(cell.setUpSubviewsCallCount, 1) XCTAssertEqual(cell.setUpConstraintsCallCount, 1) } }
[ -1 ]
934f647a8e36c8faf0dd0e0713ef95681812d010
a745e2aa597a986012916f37b477a8c55689d949
/smoothies/Model/OrderModel.swift
8be9834776c0e65dbb3fe2f5a1aac10fb3b787e6
[ "MIT" ]
permissive
ztanruan/Smoothies-Boost
859299522a5ad5fc2fb21af65aa639af8a2bc1ff
91a925a92adad268095b4a327256d031375e3a23
refs/heads/main
2023-06-06T00:21:09.810566
2021-06-27T23:57:21
2021-06-27T23:57:21
380,855,135
0
0
null
null
null
null
UTF-8
Swift
false
false
2,603
swift
// // OrderModel.swift // smoothies // // Created by zhen xin tan ruan on 4/27/19. // Copyright © 2019 zhen xin tan ruan. All rights reserved. // // Extend class for the order view controller // Define the case/option for user order status SHIPPED, DELIVERED, CANCELED AND PROCESSED import Foundation enum OrderStatus: String { case Processed = "Processed" case Shipped = "Shipped" case Delivered = "Delivered" case Canceled = "Canceled" } class OrderModel: Codable { var orderID: String = "" var productID: String = "" var image: String = "" var name: String = "" var arrived: String = "" var serving: Int = 10 var price: Int = 0 var unit: String = "" var status: String = "" var customerInfo: CustomerInfoModel = CustomerInfoModel() var userID: String = "" // Define the variables and object tha are required for the order class enum CodingKeys: String, CodingKey { case orderID = "order_id" case productID = "product_id" case image case name case arrived case serving case price case unit case status case customerInfo case userID = "user_id" } // Define function to store order information about their order // ProductID, Image, Arrived, Serving, Status and Customer Information func initCustomer(orderID: String, productID: String, image: String, name: String, arrived: String, serving: Int, price: Int, unit: String, status: String, customerInfo: CustomerInfoModel, userID: String) { self.orderID = orderID self.productID = productID self.image = image self.arrived = arrived self.serving = serving self.price = price self.unit = unit self.status = status self.customerInfo = customerInfo self.userID = userID } } class CustomerInfoModel: Codable { var address: String = "" var apt: String? = "" var state: String = "" var city: String = "" var postalCode: String = "" var phone: String = "" // 10 so // Define and initiazlize the case statement for the shipping form enum CodingsKeys: String, CodingKey { case address case apt case state case city case postalCode case phone } // Define func to initialze the variables and object in the class // Initialize the variables for the shipping form func initCustomer(address: String, apt: String, state: String, city: String, postalCode: String, phone: String) { self.address = address self.apt = apt self.state = state self.city = city self.postalCode = postalCode self.phone = phone } }
[ -1 ]
3bf0a774001c53e1455def35b4adad82bba746e0
d03188fb647288c90a1d52321d5f402e29e423e8
/WebServicesFunS2/InterestingPhoto.swift
41f67fca65d9916fef9686e2ac40d5568c6c6114
[]
no_license
GonzagaCPSC315/WebServicesFunS2
17dbe62bd3231dfcfde307eb3b79e75a5f0638d1
d9081b5f40984bd822d0cbfadc290c5228cf15f1
refs/heads/main
2023-01-13T15:54:06.143680
2020-11-18T19:42:07
2020-11-18T19:42:07
311,817,761
1
0
null
null
null
null
UTF-8
Swift
false
false
335
swift
// // InterestingPhoto.swift // WebServicesFunS2 // // Created by Gina Sprint on 11/11/20. // import Foundation struct InterestingPhoto { // struct to represent a single interesting photo from the Flickr API interestingness method var id: String var title: String var dateTaken: String var photoURL: String }
[ -1 ]
672a85f16a76da88cd593464a26784054a5ee32d
a2ec55508e311093614f6a62c4753ab81ae89593
/exer2Tests/exer2Tests.swift
e1ff09d8c33efd17ce3d60350957f088388452f3
[]
no_license
raymunfil/swifttraining.exer2
d924858b113222356b1700c6746b8254f0038199
f4f3c91e724911fb3a614af01ca2f015ac6d7f5e
refs/heads/master
2021-01-02T09:26:51.592541
2014-11-18T10:41:35
2014-11-18T10:41:35
null
0
0
null
null
null
null
UTF-8
Swift
false
false
891
swift
// // exer2Tests.swift // exer2Tests // // Created by Raymunfil Anxa on 11/18/14. // Copyright (c) 2014 Anxa. All rights reserved. // import UIKit import XCTest class exer2Tests: 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, 276484, 276489, 276492, 278541, 276509, 276543, 159807, 280649, 276555, 223318, 288857, 227417, 194652, 194653, 276577, 43109, 276582, 276585, 223340, 276589, 227439, 276592, 227446, 276603, 276606, 276613, 141450, 311435, 276627, 184475, 227492, 196773, 227495, 129203, 176314, 227528, 276684, 278742, 278746, 278753, 196834, 276709, 276710, 276715, 157944, 211193, 227576, 276744, 276748, 276753, 157970, 129301, 276760, 278810, 276764, 276774, 262450, 276787, 278846, 164162, 276813, 278862, 278863, 276821, 276822, 276831, 276835, 276847, 278898, 280961, 178571, 278954, 278965, 276919, 276920, 278969, 278985, 279002, 276958, 227813, 279022, 276998, 186893, 279054, 223767, 223769, 277017, 277029, 277048, 301634, 369220, 277066, 166507, 189036, 189037, 277101, 189042, 189043, 277118, 184962, 225933, 133774, 277133, 225936, 277138, 277141, 277142, 225943, 164512, 225956, 225962, 209581, 154291, 154294, 199366, 225997, 226001, 164563, 277204, 203477, 277203, 226007, 119513, 201442, 226019, 226033, 226035, 226043, 209660, 234241, 226051, 277254, 209670, 203529, 234256, 285463, 234268, 105246, 228129, 234280, 234283, 277294, 277295, 234286, 226097, 162621, 234301, 234304, 162626, 277316, 234311, 234312, 234317, 277327, 234323, 234326, 277339, 297822, 234335, 297826, 234340, 174949, 234343, 277354, 234346, 234349, 277360, 213876, 277366, 234361, 277370, 234367, 234372, 226181, 213894, 226184, 234377, 226189, 234381, 226194, 234387, 234392, 279456, 277410, 234404, 226214, 256937, 234409, 234412, 226222, 234419, 277435, 287677, 234430, 275397, 234438, 226249, 275410, 234450, 234451, 234454, 234457, 275418, 234463, 234466, 277480, 179176, 234482, 234492, 277505, 234498, 277510, 234503, 234506, 277517, 234509, 197647, 277518, 295953, 277523, 234517, 281625, 234530, 234534, 275495, 234539, 275500, 310317, 277550, 275505, 234548, 277563, 7229, 277566, 230463, 7230, 7231, 207938, 156733, 234560, 234565, 277574, 234569, 207953, 277585, 296018, 234583, 234584, 275547, 277596, 234594, 234603, 281707, 275571, 234612, 398457, 234622, 275590, 275591, 234631, 253063, 277640, 302217, 226451, 226452, 275607, 119963, 234652, 277665, 275625, 208043, 275628, 226476, 226479, 277686, 277690, 277694, 203989, 195811, 285929, 204022, 120055, 120056, 204041, 277792, 199971, 277800, 113962, 277803, 277806, 113966, 226608, 277809, 226609, 277814, 277815, 277821, 277824, 277825, 15686, 277831, 226632, 142669, 277838, 277841, 222548, 277845, 277844, 224605, 218462, 224606, 277856, 179552, 142689, 302438, 277862, 281962, 173420, 277868, 277871, 279919, 277878, 275831, 275832, 277882, 142716, 275838, 275839, 277890, 277891, 226694, 275847, 277896, 277897, 277900, 230799, 296338, 277907, 206228, 226711, 226712, 277911, 277919, 277920, 277925, 277927, 277936, 277939, 277940, 296375, 277943, 277946, 277949, 277952, 296387, 163269, 277957, 296391, 277962, 282060, 277965, 277969, 277974, 228823, 228824, 277977, 277980, 277983, 277988, 277993, 296425, 277994, 277997, 278002, 278005, 278008, 153095, 175625, 192010, 280077, 149007, 65041, 204313, 278056, 278060, 226875, 128583, 226888, 276046, 276050, 226906, 243292, 226910, 276084, 276085, 276088, 278140, 276097, 276100, 276101, 278160, 276116, 276117, 276120, 278170, 280220, 276126, 278191, 278195, 296628, 276148, 278201, 276156, 276165, 278214, 276172, 323276, 276179, 276180, 216795, 216796, 276195, 313065, 276210, 276219, 278285, 227091, 184086, 278299, 276253, 276257, 278307, 288547, 165677, 159533, 276279, 276282, 276283, 276287, 276311, 276325, 276332, 173936, 110452, 276344, 276350, 227199, 1923, 40850, 40853, 44952, 247712, 276394, 276401, 276408, 161722, 276413, 276421, 276422, 276430, 153552, 276444, 153566, 276450, 276451, 276454, 276459, 276462, 276463, 276468, 276469, 278518, 276475, 276478 ]
2db8d4452a2af1b57c09872e4f5ff7f7f380e3e7
c2cf15094667b413a440e55d0d45b566522386fe
/MyTeamRSS/ViewModel.swift
6dfce3dabc3823f57159bfa3c4ddad8221590168
[]
no_license
LionKing2303/MyTeamRSS
6ba9e73a906fd10d710380f0e613e0c92ad3a131
88996dc2cb70892ce05466dc93654e11f6ee2caf
refs/heads/master
2023-02-13T21:36:44.917373
2021-01-03T16:24:15
2021-01-03T16:24:15
326,449,295
0
0
null
null
null
null
UTF-8
Swift
false
false
764
swift
// // ViewModel.swift // MyTeamRSS // // Created by Arie Peretz on 02/01/2021. // Copyright © 2021 Arie Peretz. All rights reserved. // import Combine class ViewModel: ObservableObject { @Published var feed: [Model] = [] @Published var url: String = "" var repository: Repository private var cancellables = Set<AnyCancellable>() init(repository: Repository) { self.repository = repository self.repository.feedPublisher .sink { (_) in } receiveValue: { (model) in self.feed.append(model) }.store(in: &cancellables) self.repository.fetchFeed() } func refresh() { self.feed = [] self.repository.fetchFeed() } }
[ -1 ]
502ce85c5bad6f961048dec4cab352f2b6998a23
b6d0a928d4facd0343bd6b7340ee697e8079a473
/PrimeiroApp/AppDelegate.swift
3b185a1b64b42cf9cff0637941a6ea299172b39c
[]
no_license
dcomd/IOS_curso_basico
03c115c913b69104b2b3f6eaf860b8f4bbeaba79
3573b1d7ce115342fdb56f0400c83977aaff365a
refs/heads/master
2022-04-22T01:57:10.055149
2020-04-21T14:26:09
2020-04-21T14:26:09
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,219
swift
// // AppDelegate.swift // PrimeiroApp // // Created by Alexandre de Oliveira Nepomuceno on 15/04/20. // Copyright © 2020 Alexandre de Oliveira Nepomuceno. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 286916, 286922, 286924, 286926, 319694, 131281, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 286987, 319757, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 155966, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 311728, 180668, 311741, 278975, 319938, 278980, 278983, 319945, 278986, 278990, 278994, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 279178, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 287390, 303773, 172705, 287394, 172707, 303780, 164509, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 287427, 312005, 312006, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 303987, 328563, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 213895, 304009, 304011, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 234648, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 304065, 213954, 189378, 156612, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 132165, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 279661, 205934, 164973, 312432, 279669, 337018, 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, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 288162, 288164, 304555, 370092, 279983, 173488, 288176, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 288212, 222676, 288214, 148946, 239064, 329177, 288217, 280027, 288220, 288218, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 157236, 288320, 288325, 124489, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 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, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 305028, 280454, 247688, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 288909, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 182517, 280823, 280825, 280830, 280831, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 280919, 248153, 215387, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 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, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 281095, 223752, 150025, 338440, 240132, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 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, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 289687, 240535, 224151, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 322642, 314456, 281691, 314461, 281702, 314474, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 216376, 380226, 298306, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 298365, 290174, 224641, 281987, 298372, 314756, 281990, 224647, 298377, 314763, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 306694, 192008, 323084, 257550, 290321, 282130, 290325, 282133, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 298714, 52959, 216801, 282337, 241380, 323304, 282345, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 323345, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 298822, 315211, 307027, 315221, 315223, 241496, 241498, 307035, 307040, 110433, 241509, 110438, 298860, 110445, 315249, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 241581, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 307374, 307376, 299185, 323763, 184503, 176311, 299191, 307386, 258235, 307388, 307385, 307390, 176316, 299200, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 299225, 233701, 307432, 282893, 323854, 291089, 282906, 291104, 233766, 307508, 315701, 332086, 307510, 307512, 307515, 307518, 282942, 282947, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 194654, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 127434, 315856, 176592, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 283142, 127494, 127497, 233994, 135689, 127500, 233998, 127506, 234003, 234006, 127511, 152087, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 201444, 299750, 283368, 234219, 283372, 185074, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 316294, 201603, 226182, 308105, 234375, 324490, 226185, 234379, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 324508, 234396, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 291754, 226220, 324527, 291760, 234417, 201650, 324531, 234422, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 234437, 226245, 234439, 226239, 234443, 291788, 234446, 275406, 193486, 234449, 316370, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 308226, 234501, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 226453, 234647, 275606, 275608, 234650, 308379, 324757, 300189, 324766, 119967, 234653, 324768, 234657, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 226500, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 300263, 300265, 300267, 161003, 300270, 300272, 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, 243003, 283963, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 292197, 316774, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 316811, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 144814, 227426, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 300527, 308720, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 276053, 284249, 284251, 300638, 284253, 284255, 284258, 292452, 292454, 284263, 284265, 292458, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 276095, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 276187, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 276206, 358128, 284399, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 292681, 153417, 358224, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 292729, 317306, 284540, 292734, 325512, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292784, 358326, 358330, 276410, 276411, 276418, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276452, 292839, 276455, 350186, 292843, 276460, 276464, 178161, 227314, 325624, 350200, 276472, 317435, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 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, 309354, 301163, 350313, 350316, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 252022, 350328, 292985, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 309491, 309494, 243960, 276735, 227583, 227587, 276739, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 285070, 285077, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 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, 113167, 309779, 317971, 309781, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 23094, 277054, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170619, 309885, 309888, 277122, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 285368, 277177, 277181, 318144, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 228069, 277223, 342760, 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, 301884, 310080, 293696, 277317, 277322, 293706, 162643, 310100, 301911, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 15224, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 276579, 293811, 293817, 293820, 203715, 326603, 342994, 293849, 293861, 228327, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 285686, 302073, 121850, 293882, 302075, 285690, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 310336, 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, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 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, 204026, 228606, 64768, 310531, 285958, 138505, 228617, 318742, 277798, 130345, 113964, 384302, 285999, 113969, 318773, 318776, 286010, 417086, 286016, 302403, 294211, 384328, 294221, 146765, 294223, 326991, 179547, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 351619, 294276, 310659, 327046, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 277932, 310703, 310710, 130486, 310712, 310715, 302526, 228799, 302534, 310727, 245191, 64966, 163272, 302541, 302543, 310737, 228825, 310749, 310755, 187880, 310764, 286188, 310772, 40440, 212472, 40443, 286203, 310780, 40448, 228864, 286214, 302603, 65038, 302614, 302617, 286233, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 278057, 310831, 245288, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 278188, 302764, 278192, 319153, 278196, 302781, 302789, 294599, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 286425, 319194, 278235, 278238, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 294776, 360317, 294785, 327554, 360322, 40851, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 188340, 40886, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
78f24e8d0d9674a02ab7dbb1290049836e534431
d69338b3fb16e6b8f79ffc7db6d4ac7fd24cf5b5
/02_ejemplos/07_ciclo_vida/03_arc/05_unowned_opcional_implicito.playground/Contents.swift
4f1be4346bb79fe236d9680994cdb17e58ef141f
[ "Apache-2.0" ]
permissive
TeHenua/swift
f8aed4aac7d9d80b634616c485bf05e4c75d1de9
b4a0a3ed467df3beeff486ea60f8c6cb8160688d
refs/heads/master
2021-07-07T23:45:52.206212
2017-09-28T19:45:38
2017-09-28T19:45:38
103,569,415
0
0
null
2017-09-14T19:05:48
2017-09-14T18:49:25
Swift
UTF-8
Swift
false
false
643
swift
//: Playground - noun: a place where people can play import UIKit class Country { let name: String var capitalCity: City! init(name: String, capitalName: String) { self.name = name self.capitalCity = City(name: capitalName, country: self) } } class City { let name: String unowned let country: Country init(name: String, country: Country) { self.name = name self.country = country } } var country = Country(name: "Canada", capitalName: "Ottawa") print("\(country.name)'s capital city is called \(country.capitalCity.name)") // Prints "Canada's capital city is called Ottawa"
[ -1 ]
237f7bef56ff8158f108528fe7411450872dfb7d
357ed5f33f2848ea57371f44b739a4e2e154b26c
/iMuseum/Museum.swift
9e551aa5ba9320dccf783228e10df82518dc504d
[]
no_license
robots4dancing/iMuseum
9725abff160a0f164dee1d0240f04154a181db8d
51fcd578e2fd9dc1ff5a502c92a81feaa0147386
refs/heads/master
2021-01-22T08:28:45.717984
2017-02-14T06:41:26
2017-02-14T06:41:26
81,904,437
0
0
null
null
null
null
UTF-8
Swift
false
false
808
swift
// // Museum.swift // iMuseum // // Created by Valerie Greer on 2/13/17. // Copyright © 2017 Shane Empie. All rights reserved. // import UIKit class Museum: NSObject { var museumName :String! var museumStreet :String! var museumCity :String! var museumState :String! var museumZip :String! var museumFullAddress :String! { return "\(museumStreet!), \(museumCity!), \(museumState!) \(museumZip!)" } init(museumName: String, museumStreet: String, museumCity: String, museumState: String, museumZip: String) { self.museumName = museumName self.museumStreet = museumStreet self.museumCity = museumCity self.museumState = museumState self.museumZip = museumZip } }
[ -1 ]
4b04e0848cfdeb176ef007d2ec88fe39f93a83a9
9bd6e03bb086e5620991af5b77877a06e23ff777
/AlzStudy/AlzStudy/Components/Activities/Views/ActivityCell.swift
a487c14ba6e6258cdd011b2fe6ca65a278c632fa
[]
no_license
andideh/Mobile-Licenta
b422d20f50efa9458e5fe520e465a9baa78d6180
bbd43f0387a7495db845244f905f05314129c5eb
refs/heads/master
2021-03-27T10:21:02.657527
2018-04-30T06:30:16
2018-04-30T06:30:16
110,245,593
0
0
null
2018-04-30T06:41:10
2017-11-10T12:39:41
Swift
UTF-8
Swift
false
false
4,696
swift
// // ActivityCell.swift // AlzStudy // // Created by Andi Dehelean on 4/8/18. // Copyright © 2018 Dehelean Andrei. All rights reserved. // import UIKit private enum LayoutValues { static let iconSize: CGFloat = 40.0 } final class ActivityCell: UICollectionViewCell, ValueCell { typealias Value = Activity // MARK: - Public properties // MARK: - Private properties private var titleLabel: UILabel! private var descriptionLabel: UILabel! private var iconView: UIImageView! private let viewModel: ActivityCellViewModelType = ActivityCellViewModel() // MARK: - Lifecycle override init(frame: CGRect) { super.init(frame: frame) configureUI() configureLayout() bindViewModel() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func layoutSubviews() { super.layoutSubviews() layer.shadowPath = UIBezierPath(rect: bounds).cgPath } // MARK: - Public methods func configure(with value: Activity) { viewModel.inputs.configure(with: value) } // MARK: - Private methods private func configureUI() { titleLabel = UILabel() ~ { $0.font = Font.futuraBold(of: .mediumSmall) $0.textColor = UIColor.black $0.textAlignment = .center $0.translatesAutoresizingMaskIntoConstraints = false } descriptionLabel = UILabel() ~ { $0.font = Font.futuraMedium(of: .small) $0.textColor = AppStyle.Colors.lightGray $0.numberOfLines = 0 $0.translatesAutoresizingMaskIntoConstraints = false } iconView = UIImageView() ~ { $0.translatesAutoresizingMaskIntoConstraints = false $0.contentMode = .scaleAspectFit } layer.cornerRadius = 8.0 layer.shadowColor = AppStyle.Colors.lightGray.cgColor layer.shadowOffset = CGSize(width: 0, height: 2) layer.shadowRadius = 10.0 layer.shadowOpacity = 0.2 backgroundColor = .white // let tap = UILongPressGestureRecognizer(target: self, action: #selector(tapped(_:))) // tap.minimumPressDuration = 0.02 // self.addGestureRecognizer(tap) } @objc func tapped(_ gesture: UIGestureRecognizer) { switch gesture.state { case .began: shrink() case .ended: unshrink() default: break } } private func configureLayout() { addSubview(titleLabel) addSubview(descriptionLabel) addSubview(iconView) let constraints = [ titleLabel.topAnchor.constraint(equalTo: topAnchor, constant: AppStyle.Layout.smallPadding), titleLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: AppStyle.Layout.mediumPadding), titleLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -AppStyle.Layout.mediumPadding), iconView.centerYAnchor.constraint(equalTo: descriptionLabel.centerYAnchor), iconView.widthAnchor.constraint(equalToConstant: LayoutValues.iconSize), iconView.heightAnchor.constraint(equalTo: iconView.widthAnchor), iconView.leadingAnchor.constraint(equalTo: leadingAnchor, constant: AppStyle.Layout.mediumPadding), descriptionLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: AppStyle.Layout.smallPadding), descriptionLabel.leadingAnchor.constraint(equalTo: iconView.trailingAnchor, constant: AppStyle.Layout.smallPadding), descriptionLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -AppStyle.Layout.mediumPadding), descriptionLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -AppStyle.Layout.smallPadding) ] titleLabel.setContentHuggingPriority(.defaultHigh, for: .vertical) NSLayoutConstraint.activate(constraints) } private func bindViewModel() { self.viewModel.outputs.titleText .observeForUI() .observeValues { [weak self] in self?.titleLabel.text = $0 } self.viewModel.outputs.icon .observeForUI() .observeValues { [weak self] in self?.iconView.image = $0 } self.viewModel.outputs.detailText .observeForUI() .observeValues { [weak self] in self?.descriptionLabel.text = $0 } self.viewModel.outputs.alpha .observeForUI() .observeValues { [weak self] in self?.alpha = $0 } } }
[ -1 ]
638557b41822d4c5c9ce4458cf33e4c10b3aca9b
691a1b0c7cfe8f48606a23372260f6789dd60433
/Packages/RuuviReactor/Sources/RuuviReactor/RuuviReactorError.swift
19d3faa42cb951b4a01b1336a4cc99b8bde0e1d4
[ "BSD-3-Clause" ]
permissive
ruuvi/com.ruuvi.station.ios
79cc9703b2cad4261e3dac5d8c74d9dfee6eb184
69a9f2e91b816330ddae5acf4de16af65093d7d9
refs/heads/master
2023-09-01T05:02:40.876214
2023-08-26T17:41:30
2023-08-26T17:41:30
135,691,786
31
24
BSD-3-Clause
2023-09-08T15:50:46
2018-06-01T08:41:58
Swift
UTF-8
Swift
false
false
133
swift
import Foundation import RuuviPersistence public enum RuuviReactorError: Error { case ruuviPersistence(RuuviPersistenceError) }
[ -1 ]
be6e778f26f3835ac48af42d83049626a7c40903
9c6d651c171fc5d19784284e36dd3c6a42e05d28
/collectionview/SceneDelegate.swift
ef1a68475a7528e0659a8dc969b1ec940de7eb86
[]
no_license
reshmaruksana786/collectionviewpractice
b1701e5c38f6b4467ced3c1b719fabc7ee2b3497
2e3fbe73cdab04c60c4c255fa306bb76e8aa1f4b
refs/heads/master
2021-01-03T21:21:58.652559
2020-02-13T11:11:43
2020-02-13T11:11:43
240,241,293
0
0
null
null
null
null
UTF-8
Swift
false
false
2,368
swift
// // SceneDelegate.swift // collectionview // // Created by Syed.Reshma Ruksana on 2/13/20. // Copyright © 2020 Syed.Reshma Ruksana. 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, 393277, 376906, 327757, 254032, 368728, 254045, 180322, 376932, 286845, 286851, 417925, 262284, 360598, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 377047, 418008, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 385281, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 360917, 369119, 328180, 328183, 328190, 254463, 328193, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 385671, 148106, 377485, 352919, 98969, 344745, 361130, 336556, 385714, 434868, 164535, 328379, 164539, 328387, 352969, 385743, 385749, 189154, 369382, 361196, 418555, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 328690, 435188, 328703, 328710, 418822, 328715, 377867, 361490, 386070, 271382, 336922, 345119, 377888, 345134, 345139, 361525, 361537, 377931, 189525, 402523, 361568, 148580, 345200, 361591, 386168, 410746, 361594, 214150, 345224, 386187, 345247, 361645, 337072, 345268, 402615, 361657, 402636, 328925, 165086, 165092, 222438, 386286, 328942, 386292, 206084, 328967, 345377, 353572, 345380, 345383, 337207, 345400, 378170, 369979, 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, 370208, 419360, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 214594, 419401, 419404, 353868, 419408, 214611, 419412, 403040, 345702, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 403139, 337607, 419528, 419531, 272083, 394967, 419545, 345819, 419548, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 378664, 354107, 345916, 354112, 370504, 329545, 345932, 370510, 337751, 247639, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 403321, 1914, 354173, 247692, 395148, 337809, 247701, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 346064, 247760, 346069, 329699, 354275, 190440, 354314, 346140, 436290, 378956, 395340, 436307, 338005, 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, 379135, 411905, 411917, 379154, 395539, 387350, 387353, 338201, 338212, 395567, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 321911, 420237, 379279, 354728, 338353, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 248332, 330254, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 338544, 191093, 346743, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 338665, 264942, 363252, 338680, 264965, 338701, 256787, 363294, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 330612, 412600, 207809, 379849, 396246, 330711, 248794, 248799, 437219, 257009, 265208, 199681, 338951, 330761, 330769, 330775, 248863, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 248905, 330827, 248915, 183384, 339037, 412765, 257121, 265321, 248952, 420985, 330890, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 437588, 396634, 175451, 437596, 429408, 175458, 175461, 175464, 265581, 331124, 175478, 249215, 175487, 249219, 175491, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 380353, 216518, 380364, 339406, 372177, 339414, 413143, 249303, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 208399, 380433, 175637, 405017, 134689, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 224885, 224888, 224891, 224895, 372354, 421509, 126597, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 339664, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 257869, 257872, 225105, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 225128, 257897, 225138, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 380919, 372739, 405534, 266295, 266298, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 225442, 192674, 438434, 225445, 438438, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356638, 356641, 356644, 356647, 266537, 356650, 389417, 356656, 332081, 340276, 356662, 397623, 332091, 225599, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 250203, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 332162, 389507, 348548, 356741, 332175, 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, 381513, 348745, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 340628, 184983, 373399, 258723, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 340724, 332534, 155647, 373499, 348926, 389927, 348979, 398141, 357202, 389971, 357208, 389979, 430940, 357212, 357215, 349041, 340850, 381815, 430967, 324473, 398202, 119675, 324476, 430973, 340859, 340863, 324479, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 431100, 349181, 431107, 209944, 209948, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 209996, 431180, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 160896, 349313, 210053, 210056, 349320, 373905, 259217, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 349460, 349486, 349492, 415034, 210261, 365912, 259423, 374113, 251236, 374118, 390518, 357756, 374161, 112021, 349591, 333222, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333396, 333400, 423529, 423533, 210547, 415354, 333440, 267910, 267929, 333472, 259789, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 210707, 399129, 333595, 210720, 358192, 366384, 366388, 210740, 358201, 325441, 366403, 325447, 341831, 341839, 341844, 415574, 358235, 350046, 399200, 399208, 358256, 268144, 358260, 399222, 325494, 333690, 325505, 399244, 333709, 333725, 333737, 382891, 382898, 358348, 333777, 219094, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333998, 334012, 260299, 211161, 358645, 268553, 268560, 432406, 325920, 358701, 391469, 358705, 358714, 358717, 383307, 358738, 383331, 383334, 391531, 383342, 334204, 194942, 391564, 366991, 334224, 342431, 375209, 375220, 334263, 326087, 358857, 195041, 334306, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 342551, 342555, 416294, 350762, 252463, 358962, 334397, 358973, 252483, 219719, 399957, 334425, 326240, 375401, 334466, 334469, 162446, 342680, 342685, 260767, 342711, 244410, 260798, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 375613, 244542, 260925, 375616, 342857, 416599, 342875, 433001, 400238, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 400279, 252823, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 359367, 326599, 359383, 359389, 383968, 343018, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 384099, 384102, 384108, 367724, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 384189, 351424, 384192, 343232, 367817, 244938, 384202, 253132, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 384247, 351480, 384250, 351483, 351492, 384270, 261391, 359695, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 245042, 326970, 384324, 212296, 212304, 367966, 343394, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 245152, 245155, 155045, 245158, 114093, 327090, 343478, 359867, 384444, 327108, 327112, 384457, 359887, 359891, 368093, 155103, 343535, 343540, 368120, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 155241, 155255, 155274, 368289, 245410, 425652, 425663, 155328, 245463, 155352, 155356, 155364, 245477, 155372, 245487, 212723, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 376672, 155488, 155492, 327532, 261997, 376686, 262000, 262003, 327542, 147319, 262006, 262009, 425846, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 393170, 155604, 155620, 253924, 155622, 327655, 253927, 360432, 393204, 360439, 253944, 393209, 393215 ]
6acb922f6efa24b371cca09dbe47720c82575a7f
2f51381f112a658b78aadd34563c68aed2d30101
/TimeTable/Coordinators/TimeTable/RemoteWork/RegisterRemoteWorkCoordinator.swift
2baf7c9c7dabfab3f376775c329dbbd1772f18b9
[]
no_license
railwaymen/timetable-ios
176127669593f89912e58cb24d94b2267d4598ae
2fc93e7116193f3eb30a665126fbe00ddc58b955
refs/heads/develop
2021-07-13T16:35:31.702901
2020-06-15T07:23:22
2020-06-15T07:23:22
153,419,495
2
2
null
2020-06-15T11:53:27
2018-10-17T08:08:09
Swift
UTF-8
Swift
false
false
3,347
swift
// // RegisterRemoteWorkCoordinator.swift // TimeTable // // Created by Bartłomiej Świerad on 06/05/2020. // Copyright © 2020 Railwaymen. All rights reserved. // import UIKit protocol RegisterRemoteWorkCoordinatorType: class { func registerRemoteWorkDidFinish(response: [RemoteWork]) } extension RegisterRemoteWorkCoordinatorType { func registerRemoteWorkDidFinish() { self.registerRemoteWorkDidFinish(response: []) } } class RegisterRemoteWorkCoordinator: NavigationCoordinator { private weak var parentViewController: UIViewController? private let dependencyContainer: DependencyContainerType private let mode: RegisterRemoteWorkViewModel.Mode private var customFinishCompletion: (([RemoteWork]) -> Void)? // MARK: - Initialization init( dependencyContainer: DependencyContainerType, parentViewController: UIViewController, mode: RegisterRemoteWorkViewModel.Mode ) { self.dependencyContainer = dependencyContainer self.parentViewController = parentViewController self.mode = mode super.init(window: dependencyContainer.window) self.setUpNavigationController() } deinit { self.navigationController.setViewControllers([], animated: false) } // MARK: - Overridden override func finish() { self.customFinishCompletion?([]) super.finish() } // MARK: - Internal func start(finishHandler: @escaping ([RemoteWork]) -> Void) { self.customFinishCompletion = finishHandler super.start() self.runMainFlow() } func finish(response: [RemoteWork]) { self.customFinishCompletion?(response) super.finish() } } // MARK: - RegisterRemoteWorkCoordinatorType extension RegisterRemoteWorkCoordinator: RegisterRemoteWorkCoordinatorType { func registerRemoteWorkDidFinish(response: [RemoteWork]) { self.navigationController.dismiss(animated: true) { [weak self] in self?.finish(response: response) } } } // MARK: - Private extension RegisterRemoteWorkCoordinator { private func setUpNavigationController() { self.navigationController.setNavigationBarHidden(false, animated: false) self.navigationController.navigationBar.prefersLargeTitles = false self.navigationController.navigationBar.tintColor = .tint } private func runMainFlow() { guard let apiClient = self.dependencyContainer.requireApiClient() else { return } do { let controller = try self.dependencyContainer.viewControllerBuilder.registerRemoteWork() let viewModel = RegisterRemoteWorkViewModel( userInterface: controller, coordinator: self, apiClient: apiClient, errorHandler: self.dependencyContainer.errorHandler, keyboardManager: self.dependencyContainer.keyboardManager, mode: self.mode) controller.configure(viewModel: viewModel) self.navigationController.setViewControllers([controller], animated: false) self.parentViewController?.present(self.navigationController, animated: true) } catch { self.dependencyContainer.errorHandler.stopInDebug("\(error)") } } }
[ -1 ]
37f10e9f70189c8ef54f6b0899e899dec6fd0bcf
7f5f9797e945f71a3417efa7135ea0036d89bd23
/ViewMapper/MappedTableView.swift
a11880865233f33e3af28bc2e2c7c6339a374c01
[]
no_license
4ftech/ViewMapper
37d69edd3784beea76978becea9958563690c186
184876cdc2bdfb691446c0b9036212a9d2c28192
refs/heads/master
2023-05-10T01:10:53.350434
2021-02-21T21:02:40
2021-02-21T21:02:40
null
0
0
null
null
null
null
UTF-8
Swift
false
false
392
swift
// // MappedTableView.swift // ViewMapper // // Created by Nick Kuyakanon on 6/22/17. // Copyright © 2017 Oinkist. All rights reserved. // import Foundation import UIKit public class MappedTableView<T: CellMapperAdapter>: UITableView { public var adapter: StaticTableAdapter<T>! } public class NibMappedTableView<T: ViewMappable>: MappedTableView<NibCellMapperAdapter<T>> { }
[ -1 ]
ef985e314c31763e076c07a2df76fc6eb86a63ef
9b00b82e97739cf64122a0afd78dd6b64c605dc6
/WeatherApp/Views/WeatherView.swift
b60f6434fb00db37f9e675bfd23b27e545d98c31
[]
no_license
mohamedFalah/Weather-APP
3f10952df81ec95146ade9b85867aa5714873073
6cd60ba67c33245ca1b080277099587cd8b61fc2
refs/heads/main
2023-01-10T12:18:27.500905
2020-11-13T07:40:11
2020-11-13T07:40:11
312,429,991
0
0
null
null
null
null
UTF-8
Swift
false
false
3,564
swift
// // ContentView.swift // WeatherApp // // Created by Mohammed Alshulah on 07/11/2020. // import SwiftUI import SDWebImageSwiftUI struct WeatherView: View { @ObservedObject var weatherVM = WeatherViewModel() @State private var isLoaded = false @State private var currentWeatherTapped = false @State private var todayWeather = TodayWeather() @Binding var isLocationAvailable: Bool @Binding var searchCancelled: Bool var body: some View { VStack(spacing: 0) { CurrentWeatherView(isLoaded: $isLoaded, currentWeatherTapped: $currentWeatherTapped, todayWeather: $todayWeather) .onAppear(perform: { if isLocationAvailable { weatherVM.downloadTodayWeather { print("hi") self.isLoaded = true self.todayWeather = weatherVM.todayWeather } } }) .onChange(of: isLocationAvailable, perform: { _ in if isLocationAvailable { weatherVM.downloadTodayWeather { print("hi2") self.isLoaded = true self.todayWeather = weatherVM.todayWeather } } }) .onTapGesture { currentWeatherTapped.toggle() } VStack { ScrollView(.vertical, showsIndicators: false){ ForEach(weatherVM.fiveDaysforcast, id: \.self ) { day in DaysWeatherCard(day: day) //.animation(.easeOut(duration:0.1 )) } .padding(.top, 5) .padding(.bottom, 10) } } .frame(height: SCREEN.height/2) .transition(.move(edge: .bottom)) .animation(.spring(response: 0.5, dampingFraction: 0.9, blendDuration: 0)) .onAppear { if isLoaded { weatherVM.download5DaysForcast { //getting data to list //nothing here for now print("forcast ") } } } .onChange(of: isLoaded, perform: { _ in if isLocationAvailable { weatherVM.download5DaysForcast { //getting data to list //nothing here for now print("forcast ") } } }) .offset(y: currentWeatherTapped ? SCREEN.height/2 : 0) } .background(Color.black.opacity(0.1)) .edgesIgnoringSafeArea(.all) .blur(radius: searchCancelled ? withAnimation {0} : withAnimation{5}) .scaleEffect(searchCancelled ? withAnimation{1} : withAnimation{0.6}) } } struct WeatherView_Previews: PreviewProvider { static var previews: some View { Group { WeatherView(isLocationAvailable: .constant(false), searchCancelled: .constant(true)) .previewDevice(PreviewDevice(rawValue: "iPhone 8")) WeatherView(isLocationAvailable: .constant(false), searchCancelled: .constant(true)) .previewDevice(PreviewDevice(rawValue: "iPhone 12 mini")) } } }
[ -1 ]
a46177ca3c5d2bd910cb8c1dcdcfd174dab1579c
c250fa108766da25961c18f1d01674107d812eeb
/UIViewAnimations/AppDelegate.swift
02ccbf3883bceb46d9e97e44426fb27ebec0b5dd
[]
no_license
Donkemezuo/UIViewAnimationsAssignment
c3c6ed0ed246777541032d0052e7e1a2ce8e9357
b35eae3d2bf99ba77d1c4e67d00a0ea743532191
refs/heads/master
2020-04-19T05:55:09.501556
2019-01-28T18:25:57
2019-01-28T18:25:57
168,002,837
0
0
null
null
null
null
UTF-8
Swift
false
false
2,202
swift
// // AppDelegate.swift // UIViewAnimations // // Created by Donkemezuo Raymond Tariladou on 1/28/19. // Copyright © 2019 EnProTech Group. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 327695, 229391, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189040, 172660, 287349, 189044, 189039, 287355, 287360, 295553, 172675, 295557, 311942, 303751, 287365, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 287390, 303773, 172705, 287394, 172707, 303780, 164509, 287398, 205479, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 304009, 213895, 304011, 230284, 304013, 295822, 189325, 213902, 189329, 295825, 304019, 189331, 279438, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 132165, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 230679, 320792, 230681, 296215, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 148946, 370130, 222676, 288210, 288212, 288214, 280021, 329177, 288217, 288218, 280027, 288220, 239070, 239064, 288224, 370146, 280034, 288226, 288229, 280036, 280038, 288232, 288230, 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, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 337732, 280388, 304968, 280393, 280402, 173907, 313171, 313176, 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, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 275606, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 280819, 157940, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 354656, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 240132, 223752, 150025, 338440, 281095, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 142226, 289687, 240535, 224151, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 298365, 290174, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 28219, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 307385, 307386, 258235, 307388, 176311, 307390, 176316, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 127440, 176592, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 283161, 242202, 135707, 234010, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 234242, 299778, 242436, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 201496, 234264, 234266, 234269, 283421, 234272, 234274, 152355, 299814, 234278, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 316294, 226182, 234375, 308105, 226185, 234379, 201603, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324504, 291742, 324508, 234398, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 324522, 234410, 291756, 291754, 226220, 324527, 234414, 234417, 201650, 324531, 291760, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 324548, 234437, 226239, 226245, 234439, 234443, 291788, 234446, 193486, 193488, 234449, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 316416, 234496, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 234647, 226453, 234648, 234650, 308379, 275608, 300189, 324766, 119967, 234653, 324768, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 349451, 177424, 275725, 283917, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 136562, 324978, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 284076, 144814, 227426, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 243268, 292421, 284231, 226886, 128584, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 292433, 284247, 317015, 235097, 243290, 284249, 276052, 276053, 300638, 284251, 284253, 284255, 284258, 243293, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 325251, 276095, 276098, 284297, 317066, 284299, 317068, 284301, 276109, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 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, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 292839, 276455, 350186, 292843, 276460, 292845, 178161, 227314, 276466, 325624, 350200, 276472, 317435, 276476, 276479, 350210, 276482, 178181, 317446, 276485, 350218, 276490, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 178224, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 194649, 350302, 194654, 350304, 178273, 309346, 227423, 194660, 350308, 309350, 309348, 292968, 309352, 309354, 301163, 350313, 350316, 227430, 301167, 276583, 350321, 276590, 284786, 276595, 350325, 252022, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 227810, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 277011, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 277173, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 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, 276579, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 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, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 146765, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187936, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 245288, 310831, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 302764, 278188, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 294831, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
3e1fe1dc8c2b3bf7e86a4a180796a895eb2fdfad
603a83d17b07f672358eada6ccdb535243ff59a7
/JobInterviewHW2.0/ViewControllers/IHUViewController.swift
fa4c94eec83ab0a0ebb1a77cae60ca8d88b4f168
[]
no_license
PerrchicK/iOS-JobInterviewHW2.0
0ba32876d37f92e8cd63ceecec9d74c55445f18e
cc78f810c490177778a8967e3a9a0d8a73660a2e
refs/heads/master
2021-10-10T10:16:42.765292
2019-01-09T13:14:49
2019-01-09T13:14:49
112,750,265
5
0
null
null
null
null
UTF-8
Swift
false
false
2,699
swift
// // IHUViewController.swift // JobInterviewHW2.0 // // Created by Perry on 01/12/2017. // Copyright © 2017 perrchick. All rights reserved. // import UIKit import CoreLocation class IHUViewController: UIViewController, LocationHelperDelegate { var applicationDidBecomeActiveNotificationObserver: NotificationObserver? var reachabilityNotificationObserver: NotificationObserver? var currentLocation: CLLocation? var shouldForceLocationPermissions: Bool { return true } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) applicationDidBecomeActiveNotificationObserver = NotificationObserver.newObserverForNotificationWithName(name: Notification.Name.UIApplicationDidBecomeActive, object: nil, usingBlock: { [weak self] (notification) in self?.applicationDidBecomeActive(notification: notification) }) reachabilityNotificationObserver = NotificationObserver.newObserverForNotificationWithName(name: Notification.Name.ReachabilityDidChange, object: nil, usingBlock: { [weak self] (notification) in self?.reachabilityDidChange(notification: notification) }) presentPermissionsScreenIfNeeded() LocationHelper.shared.delegate = self } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) NotificationCenter.default.post(name: Notification.Name.CloseDrawer, object: nil) } override func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated) applicationDidBecomeActiveNotificationObserver = nil reachabilityNotificationObserver = nil } func presentPermissionsScreenIfNeeded() { if shouldForceLocationPermissions && !LocationHelper.shared.isPermissionGranted { present(PermissionRequestViewController(), animated: true, completion: nil) } } func applicationDidBecomeActive(notification: Notification) { presentPermissionsScreenIfNeeded() } func reachabilityDidChange(notification: Notification) { guard let status = Reachability.shared?.currentReachabilityStatus else { return } 📗("Network reachability status changed: \(status)") switch status { case .notReachable: navigationController?.navigationBar.barTintColor = UIColor.red case .reachableViaWiFi: fallthrough case .reachableViaWWAN: navigationController?.navigationBar.barTintColor = nil } } func onLocationUpdated(updatedLocation: CLLocation) { currentLocation = updatedLocation } }
[ -1 ]
bac61d41f43737d2a57b30103330ebd0c1123c2a
ec5a265ee8b7e974804093e6f0e3537ab3a4b686
/GTHalfSheet/GTSheet/Animators/DismissalAnimator.swift
50b629b1627e444e3cf10a2a6bbe8947c25b82fc
[ "MIT" ]
permissive
yberdnikov/GTSheet
5004939500cf02d6f534b87f5f5687035de920cc
92fb842f7630b70516ef9dc915c40516aa375279
refs/heads/master
2020-04-18T19:15:46.396367
2018-08-13T06:04:34
2018-08-13T06:04:34
167,707,877
0
1
MIT
2019-01-26T16:02:06
2019-01-26T16:02:06
null
UTF-8
Swift
false
false
3,638
swift
// // DismissalAnimator.swift // Gametime // // Created by Matt Banach on 3/24/16. // // import Foundation public class DismissalAnimator: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, AnimatorConvenience { weak var manager: HalfSheetPresentationManager? var isFromGesture: Bool = false var animator: UIViewPropertyAnimator? public init(manager: HalfSheetPresentationManager) { super.init() self.manager = manager } public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { return isFromGesture ? TransitionConfiguration.Dismissal.durationAfterGesture : TransitionConfiguration.Dismissal.duration } public func interruptibleAnimator(using transitionContext: UIViewControllerContextTransitioning) -> UIViewImplicitlyAnimating { return transition(using: transitionContext) } public func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { transition(using: transitionContext) } @discardableResult private func transition(using transitionContext: UIViewControllerContextTransitioning) -> UIViewImplicitlyAnimating { let presentedControllerView = transitionContext.view(forKey: UITransitionContextViewKey.from)! weak var weakManager = manager let finalTransform = CGAffineTransform(translationX: 0, y: shouldSlideAuxilery ? containerHeight : presentedContentHeight ) func animate() { presentedControllerView.layer.transform = finalTransform.as3D weakManager?.presentationController?.presentingViewContainer.layer.transform = .identity weakManager?.presentationController?.backgroundView.alpha = 0.0 weakManager?.auxileryView?.alpha = self.shouldFadeAuxilery ? 0.0 : 1.0 weakManager?.auxileryView?.layer.transform = self.shouldSlideAuxilery ? finalTransform.as3D : .identity } func complete(completed: Bool) { let finished = completed && !transitionContext.transitionWasCancelled if finished { weakManager?.dismissComplete() } transitionContext.completeTransition(finished) } let duration = transitionDuration(using: transitionContext) let timing = UISpringTimingParameters(dampingRatio: 1.3) animator = UIViewPropertyAnimator( duration: duration * 2.5, timingParameters: timing ) animator?.addAnimations(animate) animator?.addCompletion { complete(completed: $0 == .end) } animator?.startAnimation() return animator! } override public func cancel() { super.cancel() animator?.pauseAnimation() let duration: CGFloat = CGFloat(TransitionConfiguration.Dismissal.duration) let timing = UISpringTimingParameters(dampingRatio: 0.7) animator?.continueAnimation( withTimingParameters: timing, durationFactor: duration ) } override public func finish() { super.finish() animator?.pauseAnimation() let duration: CGFloat = CGFloat(TransitionConfiguration.Dismissal.duration) let timing = UISpringTimingParameters(dampingRatio: 1.2) animator?.continueAnimation( withTimingParameters: timing, durationFactor: duration ) } override public func update(_ percentComplete: CGFloat) { super.update(percentComplete) animator?.fractionComplete = percentComplete } }
[ 148449 ]
7277cf31e1deb541aa62e6487df3d22fa57b9e26
6e22cc663b2c6157dabb7f6e5f82a6496641d093
/WelikadaarachchiDMS-CO-BSCCOMP191P-041/Services/Service.swift
8716906d7d65e10cf00a2b64a817d0bfde4f5545
[]
no_license
mahimasithuruwan/WelikadaarachchiDMS-CO-BSCCOMP191P-041
fe79305372e4620e538bc595fa386d6c6b5bb05f
9cdfd70e0c6b2bfe2edd82ca92e5c25e59f9d00e
refs/heads/master
2022-12-08T16:13:05.981194
2020-09-21T06:59:56
2020-09-21T06:59:56
294,488,559
0
0
null
null
null
null
UTF-8
Swift
false
false
1,799
swift
// // Service.swift // WelikadaarachchiDMS-CO-BSCCOMP191P-041 // // Created by Mahima Sithuruwan on 9/20/20. // Copyright © 2020 Mahima Sithuruwan. All rights reserved. // import Firebase import CoreLocation import GeoFire let DB_REF = Database.database().reference() let REF_USERS = DB_REF.child("users") let REF_USER_LOCATIONS = DB_REF.child("user-locations") let REF_NOTIFICATIONS = DB_REF.child("notifications") // MARK: - SharedService struct Service { static let shared = Service() func fetchUserData(uid: String, completion: @escaping(User) -> Void) { REF_USERS.child(uid).observeSingleEvent(of: .value) { (snapshot) in guard let dictionary = snapshot.value as? [String: Any] else { return } let uid = snapshot.key let user = User(uid: uid, dictionary: dictionary) completion(user) } } func fetchUsersLocation(location: CLLocation, completion: @escaping(User) -> Void) { let geoFire = GeoFire(firebaseRef: REF_USER_LOCATIONS) REF_USER_LOCATIONS.observe(.value) { (snapshot) in geoFire.query(at: location, withRadius: 50).observe(.keyEntered, with: { (uid, location) in self.fetchUserData(uid: uid) { (user) in var driver = user driver.location = location completion(driver) } }) } } func fetchNotifications(completion: @escaping(Notification) -> Void) { REF_NOTIFICATIONS.observe(.childAdded) { (snapshot) in guard let dictionary = snapshot.value as? [String: Any] else { return } let notific = Notification(id: snapshot.key, dictionary: dictionary) completion(notific) } } }
[ 343283 ]
c509d6b198c6de9e6d19409fbe5129f4838c331d
449d00e8c4482021b6220a0db993b06822023cf3
/SwiftHub/Extensions/RxSwift/Kingfisher+Rx.swift
ee0d94cff36d7ca6ef0205daf6d6c179cfdee8b5
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
pokurivijay/SwiftHub
e5967cbdb649ec1b710d6fe81554db4ac81c56d7
f31983c902951e8c74de37a957a8f51b55b04b02
refs/heads/master
2021-10-11T11:47:50.049748
2021-10-06T22:08:25
2021-10-06T22:08:25
204,049,399
1
0
MIT
2019-08-23T18:20:31
2019-08-23T18:20:30
null
UTF-8
Swift
false
false
1,682
swift
// // Kingfisher+Rx.swift // SwiftHub // // Created by Khoren Markosyan on 6/30/18. // Copyright © 2018 Khoren Markosyan. All rights reserved. // import UIKit import RxCocoa import RxSwift import Kingfisher extension Reactive where Base: UIImageView { public var imageURL: Binder<URL?> { return self.imageURL(withPlaceholder: nil) } public func imageURL(withPlaceholder placeholderImage: UIImage?, options: KingfisherOptionsInfo? = []) -> Binder<URL?> { return Binder(self.base, binding: { (imageView, url) in imageView.kf.setImage(with: url, placeholder: placeholderImage, options: options, progressBlock: nil, completionHandler: { (result) in }) }) } } extension ImageCache: ReactiveCompatible {} extension Reactive where Base: ImageCache { func retrieveCacheSize() -> Observable<Int> { return Single.create { single in self.base.calculateDiskStorageSize { (result) in do { single(.success(Int(try result.get()))) } catch { single(.error(ContactsError.accessDenied)) } } return Disposables.create { } }.asObservable() } public func clearCache() -> Observable<Void> { return Single.create { single in self.base.clearMemoryCache() self.base.clearDiskCache(completion: { single(.success(())) }) return Disposables.create { } }.asObservable() } }
[ -1 ]
89d38138269b28c0baf00164b89d41a362ce5ea9
ec53e489a6c1621b66b8ab52b6fe4507abea2792
/Trapezoid/AppDelegate.swift
cb98f53c06ae2d48adad734d9ee9b4180972f3d8
[]
no_license
Julia1032003/Trapezoid
a290c8b5186f6e496ccc364e1a3614b7f0a06e52
cb00547973758ed4093ff48b002cbd6ca5a4f038
refs/heads/master
2020-07-16T21:10:12.622687
2019-09-03T12:06:16
2019-09-03T12:06:16
205,869,551
0
0
null
null
null
null
UTF-8
Swift
false
false
1,416
swift
// // AppDelegate.swift // Trapezoid // // Created by Julia Wang on 2019/8/31. // Copyright © 2019 Julia Wang. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 163891, 213048, 376889, 385081, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 336123, 418043, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 393538, 262472, 344403, 213332, 65880, 262496, 418144, 262499, 213352, 246123, 262507, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 328206, 410128, 393747, 254490, 188958, 385570, 33316, 377383, 197159, 352821, 188987, 418363, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 336512, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 164538, 328378, 328386, 352968, 344776, 352971, 418507, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 361288, 328522, 336714, 426841, 197468, 361309, 254812, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 345267, 386258, 328924, 66782, 222437, 328941, 386285, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181649, 181654, 230809, 181670, 181673, 337329, 181681, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 419362, 394786, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 214610, 419410, 345701, 394853, 222830, 370297, 403070, 353919, 403075, 198280, 345736, 403091, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 337592, 419512, 419517, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 141051, 337659, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329867, 329885, 411805, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 321879, 379233, 354673, 321910, 248186, 420236, 379278, 272786, 354727, 338352, 330189, 338381, 338386, 256472, 338403, 338409, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 436962, 338660, 338664, 264941, 363251, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 355175, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 396328, 158761, 199728, 330800, 396336, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 339036, 412764, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 330958, 330965, 265432, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 44342, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 249214, 175486, 175489, 249218, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 372353, 224897, 216707, 339588, 126596, 421508, 224904, 224909, 159374, 11918, 339601, 126610, 224913, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 257704, 224936, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 224993, 257761, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 167700, 372499, 225048, 257819, 225053, 184094, 225058, 339747, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 257916, 225148, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 266294, 266297, 217157, 421960, 356439, 430180, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 225493, 266453, 225496, 225499, 225502, 225505, 356578, 217318, 225510, 225514, 225518, 372976, 381176, 389380, 61722, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348525, 332152, 250238, 389502, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 340451, 160234, 127471, 340472, 324094, 266754, 324099, 324102, 324111, 340500, 324117, 324131, 332324, 381481, 324139, 356907, 324142, 356916, 324149, 324155, 348733, 324160, 324164, 356934, 348743, 381512, 324170, 324173, 324176, 389723, 332380, 381545, 340627, 184982, 373398, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 119674, 324475, 430972, 340861, 324478, 340858, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 201637, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 381946, 349180, 439294, 431106, 209943, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210036, 210039, 341113, 210044, 349308, 152703, 160895, 349311, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 210084, 251044, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 251128, 218360, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 349491, 251189, 415033, 251210, 357708, 210260, 365911, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 251271, 136590, 112020, 349590, 357792, 259515, 415166, 415185, 366034, 366038, 415191, 415193, 415196, 415199, 423392, 333284, 415207, 366056, 366061, 415216, 210420, 415224, 423423, 415257, 415263, 366117, 415270, 144939, 415278, 415281, 415285, 210487, 415290, 415293, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 153227, 333498, 333511, 210631, 259788, 358099, 153302, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 333594, 358191, 210739, 366387, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 333818, 350202, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 350410, 260298, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 375053, 268559, 350480, 432405, 350486, 350490, 325914, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 268701, 342430, 416157, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 358941, 350761, 252461, 334384, 358961, 383536, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 375535, 203506, 342776, 391937, 391948, 326416, 375568, 375571, 162591, 326441, 326451, 326454, 244540, 326460, 260924, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 342874, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 367800, 384188, 351423, 384191, 384198, 326855, 244937, 384201, 253130, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 384249, 343306, 261389, 359694, 253200, 261393, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 384314, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 154999, 253303, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 368288, 245409, 425638, 425649, 155322, 425662, 155327, 245460, 155351, 155354, 212699, 245475, 155363, 245483, 155371, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 425845, 262005, 147317, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 262027, 155531, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 384977, 393169, 155611, 155619, 253923, 155621, 327654, 253926, 393203, 360438, 253943, 393206, 393212, 155646 ]
614e4c7d1e6da70342b93121a15b824ab698647b
d3f03a06d6063c50e4b3f4b08d752c712d5ef070
/ProjectManager/ProjectManager/Model/TaskDataSource.swift
36ca89650ecc42ad990df71dc5fb3c06b3c92dcc
[]
no_license
inwoodev/ios-projectmanager-app
3808a080a5f1703b326024e34ee4abc359ad38ed
517a7b518cb3e189cd41614dcb8d4950e0683d20
refs/heads/main
2023-07-17T02:43:41.401488
2021-08-25T03:50:49
2021-08-25T03:50:49
399,679,185
0
1
null
null
null
null
UTF-8
Swift
false
false
7,283
swift
// // MockJSONData.swift // ProjectManager // // Created by Jay, Ian, James on 2021/07/05. // import UIKit // MARK: - enum ProjectTaskType enum ProjectTaskType: String { case todo, doing, done var description: String { switch self { case .todo: return "todo" case .doing: return "doing" case .done: return "done" } } var model: [Task] { switch self { case .todo: return self.taskArrayFromAsset() case .doing: return self.taskArrayFromAsset() case .done: return self.taskArrayFromAsset() } } private func taskArrayFromAsset() -> [Task] { let decoder = JSONDecoder() decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full) guard let dataAsset = NSDataAsset.init(name: self.description), let model = try? decoder.decode([Task].self, from: dataAsset.data) else { return [] } return model } } final class TaskDataSource: NSObject, TaskTableViewDataSource { private weak var toDoTableView: UITableView! private weak var doingTableView: UITableView! private weak var doneTableView: UITableView! private var toDoList: [Task] private var doingList: [Task] private var doneList: [Task] init(toDoTableView: UITableView, doingTableView: UITableView, doneTableView: UITableView) { self.toDoList = ProjectTaskType.todo.model self.doingList = ProjectTaskType.doing.model self.doneList = ProjectTaskType.done.model self.toDoTableView = toDoTableView self.doingTableView = doingTableView self.doneTableView = doneTableView } func canHandle(_ session: UIDropSession) -> Bool { return session.canLoadObjects(ofClass: Task.self) } func fetchToDoList() -> [Task] { return toDoList } func fetchDoingList() -> [Task] { return doingList } func fetchDoneList() -> [Task] { return doneList } func dragItem(taskType: ProjectTaskType, for indexPath: IndexPath) -> [UIDragItem] { switch taskType { case .todo: return createDragItem(tasks: toDoList, for: indexPath) case .doing: return createDragItem(tasks: doingList, for: indexPath) case .done: return createDragItem(tasks: doneList, for: indexPath) } } private func createDragItem(tasks: [Task], for indexPath: IndexPath) -> [UIDragItem] { let task = tasks[indexPath.row] let dragItem = UIDragItem(itemProvider: NSItemProvider(object: task)) dragItem.localObject = task return [dragItem] } func moveTask(from sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath, in tableView: UITableView) { tableView.performBatchUpdates({ switch tableView { case toDoTableView: let todoTask = toDoList[sourceIndexPath.item] toDoList.remove(at: sourceIndexPath.item) toDoList.insert(todoTask, at: destinationIndexPath.item) case doingTableView: let doingTask = doingList[sourceIndexPath.item] doingList.remove(at: sourceIndexPath.item) doingList.insert(doingTask, at: destinationIndexPath.item) case doneTableView: let doneTask = doneList[sourceIndexPath.item] doneList.remove(at: sourceIndexPath.item) doneList.insert(doneTask, at: destinationIndexPath.item) default: break } tableView.deleteRows(at: [sourceIndexPath], with: .automatic) tableView.insertRows(at: [destinationIndexPath], with: .automatic) }) } func addTask(task: Task, destinationIndexPath: IndexPath, tableView: UITableView) { tableView.performBatchUpdates({ switch tableView { case toDoTableView: toDoList.insert(task, at: destinationIndexPath.item) case doingTableView: doingList.insert(task, at: destinationIndexPath.item) case doneTableView: doneList.insert(task, at: destinationIndexPath.item) default: break } tableView.insertRows(at: [destinationIndexPath], with: .automatic) }) } func deleteTask(at indexPath: IndexPath, in tableView: UITableView) { tableView.performBatchUpdates({ switch tableView { case toDoTableView: toDoList.remove(at: indexPath.item) case doingTableView: doingList.remove(at: indexPath.item) case doneTableView: doneList.remove(at: indexPath.item) default: break } tableView.deleteRows(at: [indexPath], with: .automatic) }) } func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { deleteTask(at: indexPath, in: tableView) } } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { switch tableView { case toDoTableView: return self.toDoList.count case doingTableView: return self.doingList.count case doneTableView: return self.doneList.count default: return 0 } } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { switch tableView { case toDoTableView: guard let toDoCell = tableView.dequeueReusableCell(withIdentifier: "toDoCell", for: indexPath) as? ToDoTableViewCell else { return UITableViewCell() } toDoCell.configure(tasks: self.toDoList, rowAt: indexPath.row) return toDoCell case doingTableView: guard let doingCell = tableView.dequeueReusableCell(withIdentifier: "doingCell", for: indexPath) as? DoingTableViewCell else { return UITableViewCell() } doingCell.configure(tasks: self.doingList, rowAt: indexPath.row) return doingCell case doneTableView: guard let doneCell = tableView.dequeueReusableCell(withIdentifier: "doneCell", for: indexPath) as? DoneTableViewCell else { return UITableViewCell() } doneCell.configure(tasks: self.doneList, rowAt: indexPath.row) return doneCell default: return UITableViewCell() } } func appendToDoList(task: Task) { toDoList.append(task) } func fetchDoingTask(index: Int) { } func fetchDoneTask(index: Int) { } func modifyList(target: [Task], title: String, deadlineDate: Date, content: String, index: Int) { target[index].title = title target[index].deadlineDate = deadlineDate target[index].content = content } }
[ -1 ]
c83b3951e63803324dc246a3350d80d04559d4b3
bcdd0c767f0e3f968888e251c72fe641153dfc35
/TestServer/Sources/App/PageRequest.swift
88372b07e73f0488a60d61cf897329a0ade1d1e1
[ "MIT" ]
permissive
EmilioPelaez/RESTClient
d1316e6d35bc8f19fded0045c425411ef0b141ca
36d6cbe4bc0a780ae472ccc793612fac642ff6fb
refs/heads/main
2023-06-01T16:51:12.153550
2021-04-05T22:04:59
2021-04-05T22:04:59
307,717,915
0
0
null
null
null
null
UTF-8
Swift
false
false
196
swift
// // PageRequest.swift // Created by Emilio Peláez on 5/4/21. // import Foundation struct PageRequest: Decodable { let page: Int let pageSize: Int var start: Int { page * pageSize } }
[ -1 ]
54ac1933fad096124cecb60d3984fef1dbbf3deb
1c171196323f3ce6726407e94aca4dd09962a9e2
/AppleAcademy_testing/MyGroceryList/MyGroceryList/AppDelegate.swift
61baa4a108f6699437054422fba70a9a1034d5e6
[]
no_license
andrea-claro/Coding-and-exploring
44b260b8a77b69c0e5b53317ca056f14ebf47590
d2e3ab350ae065e0285b7e3c1bb64cd6325d2cdf
refs/heads/master
2021-12-15T00:57:05.912577
2021-06-14T12:25:34
2021-06-14T12:25:34
234,073,231
0
0
null
null
null
null
UTF-8
Swift
false
false
1,425
swift
// // AppDelegate.swift // MyGroceryList // // Created by Andrea Claro on 05/02/2020. // Copyright © 2020 Andrea Claro. 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. } }
[ 350213, 393222, 393224, 268298, 393230, 350224, 350231, 333850, 346139, 350237, 405533, 350240, 393250, 350244, 178218, 350251, 393261, 350256, 430129, 393266, 350259, 213048, 376889, 385081, 393275, 350271, 436289, 243781, 421960, 376905, 378954, 395339, 350285, 254030, 374864, 338004, 356439, 368727, 180313, 342111, 368735, 180320, 376931, 100453, 421990, 329832, 266350, 368752, 342133, 329867, 262283, 225423, 250002, 250004, 225429, 329885, 225437, 286879, 346272, 192673, 225441, 438433, 225444, 438436, 225447, 286888, 225450, 333997, 225455, 430256, 225458, 225466, 334011, 379066, 387260, 225470, 327871, 180416, 256191, 260289, 372929, 225475, 381120, 225141, 389320, 350410, 346316, 225484, 180431, 350416, 225487, 225490, 225493, 350422, 266453, 377046, 350425, 225496, 268507, 225499, 334045, 225502, 356578, 379107, 377060, 387301, 217318, 346343, 338152, 225148, 327914, 225514, 387306, 350445, 225518, 387312, 393456, 375026, 346355, 358644, 393460, 381176, 350458, 336123, 350461, 379134, 336128, 350464, 385280, 350467, 325891, 262404, 389380, 180490, 350475, 375053, 368911, 350480, 268559, 395538, 387349, 350486, 338199, 262422, 432405, 350490, 325914, 377117, 325917, 182558, 350493, 356640, 350498, 338211, 356643, 262436, 350504, 356649, 358700, 350509, 391468, 248111, 332080, 356655, 340275, 356660, 336180, 397622, 262454, 358713, 332090, 358716, 332097, 201028, 362822, 262472, 348488, 332106, 383306, 190796, 436555, 334161, 344403, 332117, 250199, 65880, 250202, 332125, 262496, 379233, 250210, 383330, 262499, 383333, 246123, 262507, 262510, 354673, 332152, 248186, 334203, 268668, 213372, 250238, 194941, 389502, 332161, 391563, 332172, 420236, 366990, 379278, 262550, 262552, 373145, 340379, 342430, 385440, 385443, 354727, 375208, 326058, 262573, 393647, 338352, 375216, 385458, 262586, 324030, 266687, 344511, 334275, 326084, 330189, 338381, 338386, 360916, 369118, 195039, 334304, 338403, 340451, 334311, 338409, 375277, 127471, 328177, 334321, 328179, 248308, 328182, 340472, 199164, 328189, 324094, 328192, 266754, 324099, 350723, 324102, 164361, 330252, 324111, 186897, 342545, 393747, 340500, 324117, 334358, 342550, 342554, 330267, 334363, 254490, 385570, 324131, 332324, 354855, 377383, 350761, 381481, 356907, 324139, 252461, 324142, 334384, 383536, 324149, 334394, 188987, 324155, 348733, 418363, 324160, 324164, 219718, 334407, 348743, 369223, 324170, 381512, 385609, 324173, 324176, 385616, 334420, 352856, 332380, 352864, 369253, 350822, 174695, 262760, 248425, 375400, 352874, 191084, 338543, 191092, 346742, 254587, 336512, 334465, 334468, 148105, 377484, 162445, 330383, 326290, 340627, 184982, 373398, 342679, 98968, 352918, 342683, 354974, 260766, 258721, 332453, 150183, 344744, 332459, 389805, 332463, 385713, 381617, 434867, 164534, 336567, 248504, 332471, 328378, 244409, 342710, 164538, 223934, 260797, 260801, 328386, 332483, 350917, 332486, 344776, 373449, 418507, 332493, 357069, 355024, 357073, 273108, 385748, 355028, 264918, 391894, 416473, 376671, 361179, 139997, 183005, 332511, 189153, 436962, 338660, 369381, 64230, 338664, 332520, 264941, 342766, 340718, 332533, 155646, 342776, 348924, 344831, 391937, 207619, 344835, 336643, 373510, 344841, 338700, 391948, 361230, 336659, 418580, 375571, 418585, 199452, 418589, 363293, 162591, 262942, 418593, 396066, 336675, 346916, 328484, 418598, 396069, 389926, 326441, 418605, 215853, 152370, 326451, 340789, 326454, 336696, 361273, 398139, 375612, 244540, 326460, 326467, 336708, 328515, 127814, 244551, 336711, 326473, 328522, 361288, 328519, 326477, 336714, 338763, 330580, 326485, 426841, 326490, 430939, 357211, 197468, 357214, 265055, 361315, 326502, 375656, 387944, 361322, 201579, 326507, 355179, 201582, 326510, 433000, 211825, 330610, 340849, 201588, 349040, 430965, 324472, 398201, 340858, 324475, 392060, 340861, 328573, 324478, 119674, 324481, 377729, 342915, 324484, 400259, 398211, 324487, 381833, 324492, 236430, 324495, 342930, 324498, 330642, 324501, 252822, 355218, 430995, 392091, 324510, 324513, 252836, 201637, 398245, 324524, 211884, 400306, 324533, 324538, 324541, 326598, 359366, 398279, 340939, 345035, 340941, 209873, 345043, 386003, 396245, 359382, 330710, 248792, 386011, 359388, 340957, 248798, 383967, 431072, 398306, 340963, 386018, 386022, 209895, 359407, 257008, 201711, 183282, 435187, 261108, 349172, 244726, 261111, 265207, 330748, 383997, 265214, 439294, 330760, 261129, 328714, 330768, 209943, 386073, 336921, 261147, 359451, 336925, 345118, 248862, 261153, 250914, 357410, 185380, 261159, 396328, 158761, 357418, 209965, 359470, 209968, 199728, 345138, 209971, 330800, 359476, 396339, 209975, 339001, 388154, 209979, 361536, 209987, 209990, 330826, 197707, 341071, 345169, 250967, 156761, 210010, 343131, 412764, 339036, 361567, 257120, 148578, 341091, 265320, 210025, 210027, 367723, 384107, 210030, 345199, 384114, 210036, 210039, 248951, 341113, 386167, 410745, 210044, 420984, 212094, 160895, 152703, 349311, 210052, 214149, 345222, 351364, 210055, 330889, 384135, 386186, 384139, 384143, 210067, 210071, 337047, 248985, 339097, 210077, 345246, 214175, 210080, 384160, 210084, 44197, 251044, 339112, 210088, 384168, 337071, 210095, 210098, 337075, 384181, 249014, 367800, 257908, 210115, 332997, 326855, 244937, 253130, 343244, 210127, 333009, 146642, 210131, 386258, 330965, 333014, 210138, 265436, 328924, 210143, 388319, 359649, 222437, 343270, 351466, 328941, 386285, 351479, 251128, 275706, 388347, 275712, 275715, 275721, 343306, 359694, 384275, 333078, 251160, 245020, 159005, 345376, 345379, 245029, 171302, 345382, 208166, 273708, 349484, 245040, 347441, 372018, 349491, 199988, 337205, 251189, 345399, 175415, 378169, 369978, 262002, 425276, 437566, 437570, 212291, 384323, 343365, 337222, 437575, 262005, 251210, 357708, 337229, 212303, 331088, 437583, 337234, 437587, 263508, 210260, 331093, 396633, 367965, 343393, 175457, 208227, 251235, 175460, 343398, 175463, 345448, 333154, 333162, 402791, 367980, 343409, 234866, 378227, 390516, 175477, 437620, 333175, 249208, 154999, 253303, 175483, 357755, 249214, 249218, 181638, 245127, 353673, 181643, 249227, 384397, 136590, 245136, 112020, 245142, 181654, 399199, 245145, 175513, 343450, 245148, 230809, 245151, 357792, 396705, 245154, 355748, 245157, 181673, 245162, 327084, 337329, 181681, 396722, 181684, 359865, 384443, 146876, 361917, 415166, 181696, 327107, 216517, 337349, 327110, 384453, 380360, 216522, 327115, 339404, 327117, 359886, 208337, 366034, 343507, 359890, 337365, 339412, 413141, 415185, 339417, 415191, 415193, 249308, 415196, 271839, 339424, 415199, 423392, 333284, 339428, 329191, 366056, 361960, 339434, 329194, 366061, 249328, 343539, 210420, 337398, 368119, 343544, 69113, 368122, 415224, 423423, 409091, 339461, 337415, 430972, 329226, 359947, 345964, 419343, 175635, 419349, 345625, 415257, 370205, 415263, 419359, 394786, 419362, 366117, 370213, 415270, 419368, 415278, 339503, 415281, 265778, 415285, 415290, 206395, 415293, 349761, 214593, 265795, 396872, 419400, 333386, 353867, 265805, 343630, 214610, 224853, 333399, 224857, 366172, 333413, 224870, 345701, 423528, 327275, 423532, 245357, 222830, 257646, 138864, 210544, 155254, 224887, 370297, 224890, 415353, 333439, 224897, 372353, 403075, 126596, 216707, 267909, 415361, 198280, 345736, 155273, 224904, 11918, 159374, 126610, 345749, 126616, 224926, 368288, 345762, 419491, 345765, 425638, 419497, 419501, 419506, 224947, 337592, 419512, 333498, 155322, 419517, 425662, 337599, 155327, 333511, 419527, 224969, 419530, 339662, 419535, 272081, 358099, 253943, 224981, 394966, 155351, 419542, 181977, 345818, 212699, 224986, 419544, 333534, 419547, 419550, 224993, 366307, 155363, 366311, 224999, 419559, 337642, 155371, 245483, 337645, 366318, 370415, 339695, 366321, 431851, 210672, 225012, 366325, 409335, 257787, 337659, 225020, 339710, 257790, 225025, 155393, 257794, 210695, 339721, 257801, 155403, 257804, 268041, 366348, 257807, 225038, 362255, 210706, 395021, 225043, 245525, 395029, 399128, 225048, 333594, 257819, 116509, 225053, 345887, 225058, 339747, 339749, 378663, 257833, 225066, 257836, 225070, 358191, 155438, 225073, 155442, 366387, 372532, 257845, 399159, 397112, 358200, 155447, 225082, 354106, 397115, 225087, 325440, 247617, 354111, 366401, 354117, 325446, 360261, 370503, 46920, 341834, 341829, 257868, 370509, 341838, 257871, 329544, 323402, 225103, 397139, 341843, 247637, 337750, 155461, 354130, 225108, 225112, 257883, 313180, 341851, 261981, 155482, 425822, 257886, 257890, 259938, 155487, 225119, 155490, 155491, 257896, 225127, 274280, 327531, 399206, 257901, 261996, 345967, 358255, 399215, 345970, 358259, 341876, 327539, 345974, 261999, 257912, 333689, 225137, 243579, 257916, 354172, 403320, 262008, 257920, 325504, 333698, 262011, 339844, 155516, 155521, 225155, 155525, 360326, 376714, 247691, 333708, 225165, 155531, 262027, 337808, 365921, 262030, 262033, 247700, 225170, 397200, 329623, 262036, 225175, 262039, 262042, 225180, 333724, 436126, 155549, 262045, 262048, 118691, 436132, 262051, 327589, 337833, 382890, 155562, 155565, 184244, 337844, 372664, 393150, 358339, 346057, 333774, 247759, 346063, 393169, 155611, 372702, 329697, 372706, 358371, 155619, 354277, 253923, 155621, 253926, 190439, 350189, 247789, 356335, 350193, 393203, 360438, 393206, 380918, 333818, 393212, 350206 ]
624b8b3248185d67fb35590310cccca0ebed1d36
f017c2b3083fa509b9110f332dc1ee51f58f3bd4
/NexmoBankingApp/AppDelegate.swift
227e599c73e7090337ff2d2732b6167664f66a1c
[]
no_license
sidsharma27/nexmo-verify-2fa-ios-example
d33f909dde6370c95e8ce81cb2343a7d4ba55134
4024e23c466e1e0349675859589ce8f129eb6369
refs/heads/master
2021-01-19T04:50:39.583147
2016-07-05T05:13:36
2016-07-05T05:13:36
62,606,533
0
0
null
null
null
null
UTF-8
Swift
false
false
2,650
swift
// // AppDelegate.swift // NexmoBankingApp // // THIS IS YOUR STARTING POINT! :-) // // If you have any questions please feel free to ask me directly via e-mail. // [email protected] // // Created by Sidharth Sharma on 5/22/16. // Copyright © 2016 Sidharth Sharma. All rights reserved. // import UIKit import Parse @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let configuration = ParseClientConfiguration { $0.applicationId = "YOUR_BACK4APP_APP_ID" $0.clientKey = "YOUR_BACK4APP_CLIENT_KEY" $0.server = "https://parseapi.back4app.com" } Parse.initializeWithConfiguration(configuration) // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 294950, 229415, 229417, 237613, 229422, 229426, 237618, 229428, 286774, 229432, 286776, 319544, 286791, 237640, 278605, 237646, 311375, 163920, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 327814, 131209, 303241, 311436, 319633, 286873, 286876, 311460, 32944, 327862, 286906, 180413, 286910, 131264, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 131314, 286962, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 287003, 287006, 287009, 287012, 287014, 287019, 311598, 262448, 287032, 155966, 278849, 319809, 319810, 319814, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 65943, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 98756, 278980, 278983, 319945, 278986, 319947, 278990, 278994, 279003, 279006, 172512, 279010, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 320007, 172550, 172552, 303623, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 311911, 189034, 295533, 189039, 189040, 172655, 172656, 352880, 189044, 295538, 172660, 287349, 287355, 287360, 295553, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 287377, 311957, 221850, 287386, 303773, 287390, 295583, 164509, 172702, 230045, 172705, 287394, 172707, 303780, 287398, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 287427, 312006, 107212, 172748, 287436, 172751, 295633, 172755, 303827, 279255, 172760, 279258, 287450, 213724, 189149, 303835, 303838, 279267, 312035, 295654, 279272, 312048, 312050, 230131, 205564, 295685, 230154, 33548, 312077, 295695, 369433, 295707, 328476, 295710, 303914, 279340, 205613, 279353, 230202, 222018, 295755, 377676, 287569, 279383, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 213895, 304007, 304009, 320391, 304011, 230284, 304013, 213902, 279438, 295822, 189329, 189331, 279445, 58262, 279452, 410526, 279461, 304042, 213931, 230327, 304055, 304063, 238528, 295873, 189378, 213954, 304065, 213963, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 312321, 295945, 197645, 230413, 295949, 140312, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 230465, 238658, 296004, 336964, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 164973, 205934, 279669, 337018, 279683, 222340, 296084, 238745, 304285, 238756, 205991, 165035, 337067, 165038, 238766, 304311, 230592, 279750, 230600, 230607, 148690, 279769, 304348, 279777, 304354, 296163, 279781, 304360, 279788, 320748, 279790, 320771, 312585, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 173350, 312622, 296243, 312630, 222522, 222525, 230718, 296255, 378181, 230727, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 230763, 230768, 296305, 230773, 304505, 181626, 304506, 181631, 312711, 288140, 230800, 288144, 304533, 288154, 337306, 288160, 288162, 279975, 304555, 370092, 279983, 173488, 312755, 296373, 279991, 312759, 337335, 173507, 296389, 222665, 230860, 230865, 288210, 370130, 222676, 288212, 280021, 288214, 148946, 239064, 288217, 280027, 288218, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 320998, 280038, 288230, 288232, 288234, 280034, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 296446, 206336, 321022, 296450, 402942, 230916, 214535, 230919, 370187, 304651, 222752, 108066, 296488, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 181854, 280158, 370272, 403039, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 321200, 296634, 280260, 280264, 280276, 313044, 321239, 280283, 288478, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 321336, 296767, 345921, 304968, 280393, 280402, 313176, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 280473, 124827, 214940, 247709, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 288764, 239612, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 313386, 354348, 124978, 215090, 124980, 288826, 313406, 288831, 67654, 280651, 354382, 288848, 354390, 288855, 280669, 280671, 223327, 321634, 149603, 329830, 280681, 313451, 280687, 215154, 280691, 313458, 313464, 321659, 280702, 288895, 141446, 215175, 321670, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 321717, 280759, 280764, 280769, 280771, 280774, 280783, 280786, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280825, 280827, 280830, 280831, 280835, 125187, 125191, 125207, 125209, 321817, 321842, 223539, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 240017, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 305668, 281095, 338440, 150025, 223752, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 281190, 281196, 19053, 158317, 313973, 281210, 297594, 158347, 133776, 117398, 314007, 289436, 174754, 330404, 174764, 240309, 133817, 314045, 314047, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322318, 281361, 281372, 322341, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 240519, 322440, 314249, 240535, 289687, 289694, 289696, 289724, 52163, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 289991, 306377, 249045, 363745, 298216, 126190, 216303, 322801, 257302, 363802, 199976, 199978, 298292, 257334, 298306, 224584, 224587, 224594, 216404, 150870, 224603, 159068, 265568, 281960, 306539, 290161, 216436, 306549, 298358, 306552, 290171, 298365, 290174, 224641, 281987, 265604, 298372, 281990, 298377, 142733, 298381, 224657, 306581, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 339431, 282089, 191985, 282098, 290291, 282101, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 282337, 216801, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 282402, 315174, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 307009, 241475, 307012, 315211, 282446, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 241556, 298901, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 241640, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299006, 282623, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 192605, 233567, 200801, 217188, 299109, 307303, 45163, 307307, 315502, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 307352, 299164, 184479, 315557, 184486, 307370, 184492, 307372, 307374, 307376, 176311, 184503, 307386, 258235, 176316, 307388, 307390, 184512, 307394, 299204, 184518, 323784, 307409, 176343, 299225, 233701, 184572, 282881, 184579, 282893, 291089, 282906, 233766, 176435, 168245, 307510, 315701, 151864, 307512, 332086, 307515, 282942, 307518, 151874, 282947, 282957, 110926, 323917, 233808, 323921, 315733, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 299388, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 291254, 127417, 291260, 127421, 127429, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 242152, 291305, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 234003, 234006, 283161, 234010, 135707, 242206, 135710, 291361, 242220, 291378, 152118, 234038, 70213, 111193, 242275, 299620, 168562, 184952, 135805, 291456, 135808, 299655, 373383, 316051, 225941, 316054, 299672, 135834, 225948, 299677, 373404, 135839, 299680, 225954, 299684, 242343, 209576, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 226002, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 234231, 234236, 226045, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 242445, 234254, 234258, 242450, 242452, 201496, 283421, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 283452, 160572, 234302, 234307, 242499, 234309, 234313, 316235, 283468, 234316, 234319, 242511, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234344, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234384, 234388, 234390, 226200, 234393, 308123, 234396, 324508, 291742, 234401, 291748, 234405, 291750, 234407, 324518, 324520, 291754, 226220, 291756, 234414, 291760, 201650, 226230, 234422, 275384, 234428, 291773, 226239, 234431, 242623, 234434, 324548, 226245, 234437, 234439, 234443, 291788, 193486, 234446, 193488, 234449, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234478, 234481, 234484, 234485, 234487, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234515, 300054, 234519, 234520, 316439, 234523, 234528, 300066, 234532, 234535, 234537, 234540, 234543, 275508, 234549, 300085, 300088, 234558, 316479, 234561, 234563, 316483, 234568, 234570, 316491, 234572, 300108, 300115, 234580, 234581, 234585, 242777, 275545, 234595, 234597, 300133, 300139, 234605, 160879, 234607, 275569, 234610, 234614, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234634, 234636, 234640, 275602, 234643, 226453, 324757, 275606, 275608, 234647, 234648, 234650, 308373, 283805, 308379, 234653, 119967, 300189, 234657, 324766, 242852, 283813, 300197, 275626, 316596, 234687, 316610, 300226, 226500, 234692, 283844, 300229, 308420, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 300284, 275710, 300287, 300289, 300292, 300294, 275719, 177419, 300299, 283917, 242957, 275725, 177424, 349464, 283939, 259367, 283951, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 316768, 292197, 243046, 316774, 218473, 136562, 275834, 333178, 275836, 275840, 316806, 226696, 226699, 316811, 226703, 300433, 234899, 226709, 357783, 316826, 300448, 144810, 144812, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 292329, 300523, 259565, 259567, 300527, 226802, 316917, 308727, 300537, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284206, 284209, 284211, 194101, 284213, 194103, 284215, 284218, 226877, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 284253, 243293, 284255, 300638, 284258, 292452, 177766, 284263, 292454, 284265, 292458, 284267, 292461, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 292479, 284288, 276098, 284290, 284292, 292485, 325250, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 276187, 284379, 284381, 284384, 284386, 358116, 276197, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317191, 284428, 300816, 317207, 284440, 186139, 300828, 300830, 276255, 300832, 300834, 227109, 317221, 186151, 358183, 276268, 194351, 243504, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 178006, 317271, 276315, 292700, 284511, 227175, 292715, 284529, 292721, 300915, 284533, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 292776, 284585, 358312, 276395, 276402, 161718, 358326, 276410, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 301015, 358360, 301017, 292828, 276446, 153568, 276448, 276452, 276455, 292843, 276460, 276464, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 325692, 178238, 276544, 284739, 276553, 194649, 309337, 227418, 194654, 227423, 178273, 227426, 276579, 194660, 227430, 276583, 292968, 309352, 276586, 301163, 309354, 276590, 227440, 284786, 276595, 292985, 301178, 292989, 292993, 301185, 301199, 350354, 350359, 276638, 284837, 153765, 227520, 227522, 301252, 227529, 301258, 276685, 276689, 301272, 276699, 194780, 309468, 301283, 317672, 243948, 194801, 227571, 309494, 243960, 227583, 276735, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 276766, 211232, 276775, 211241, 325937, 276789, 325943, 260421, 285002, 276811, 276816, 235858, 276829, 276833, 276836, 276843, 293227, 276848, 293232, 186744, 211324, 227709, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 285098, 276907, 276917, 293304, 293314, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 317951, 309764, 121352, 236043, 317963, 342541, 55822, 113167, 317971, 309781, 55837, 227877, 227879, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 285265, 277080, 309849, 285277, 285282, 326244, 277100, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 285357, 318128, 277170, 293555, 154292, 277173, 342707, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 277232, 228081, 56059, 310015, 285441, 310020, 310029, 228113, 285459, 277273, 326430, 228128, 228135, 318248, 277291, 318253, 285489, 293685, 285494, 285499, 301884, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 277368, 15224, 236408, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293877, 285686, 302073, 285690, 244731, 121850, 293882, 302075, 293887, 277504, 277507, 277511, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 7232, 310336, 293956, 277573, 228422, 310344, 293960, 277577, 277583, 203857, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 203872, 277601, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285831, 294026, 285835, 302218, 162964, 384148, 187542, 302231, 302233, 285852, 302237, 285854, 285862, 277671, 302248, 64682, 228526, 277678, 294063, 294065, 302258, 294072, 318651, 277695, 318657, 302275, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 228617, 138505, 318742, 204067, 277798, 277801, 113964, 277804, 285997, 277807, 285999, 113969, 277811, 318773, 277816, 318776, 286010, 277819, 294204, 277822, 417086, 286016, 294211, 302403, 277832, 277836, 277839, 326991, 277842, 277847, 277850, 179547, 277853, 277857, 302436, 277860, 294246, 327015, 277864, 310632, 327017, 351594, 277869, 277872, 351607, 277880, 310648, 310651, 277884, 277888, 310657, 310659, 277892, 294276, 277894, 327046, 253320, 310665, 277898, 318858, 351619, 277903, 310672, 277905, 351633, 277908, 277917, 277921, 310689, 130468, 277928, 277932, 310703, 277937, 130486, 310710, 277944, 310712, 277947, 310715, 277950, 277953, 64966, 245191, 163272, 277959, 302534, 310727, 277963, 277966, 302543, 277971, 286169, 228825, 277978, 277981, 310749, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 228864, 286214, 228871, 302603, 302614, 286233, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 286248, 40488, 294439, 40491, 294440, 294443, 294445, 310831, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 228944, 400976, 40533, 40537, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40552, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 319171, 302789, 294599, 278216, 294601, 278227, 319187, 229076, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 302852, 302854, 294664, 311048, 319243, 311053, 294682, 278306, 294701, 278320, 319280, 319290, 229192, 302925, 237409, 360317, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 40865, 294817, 319394, 294821, 180142, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 278519, 237562 ]
bb8eefd1799c258b4f81a8ba651ae6f4acc22eba
3ee3d8118a9b9ad0c9985ee1935e41a7312c4d16
/30DaysOfSwift/Day23/DayTwentyThreeViewController.swift
1068f127e64c8845ed82f38f3ebd46b8086da327
[]
no_license
yazzy4/30DaysOfSwift
319a6b5d40aab080c6c7b0fa271d5d13ac06bba3
eb37acc811fd9f4b0417d285d04e24018b2e9405
refs/heads/master
2021-04-21T16:39:34.374995
2020-05-26T15:17:08
2020-05-26T15:17:08
249,796,449
2
0
null
null
null
null
UTF-8
Swift
false
false
1,260
swift
// // DayTwentyThreeViewController.swift // 30DaysOfSwift // // Created by Yaz Burrell on 5/1/20. // Copyright © 2020 Yaz Burrell. All rights reserved. // import UIKit class DayTwentyThreeViewController: UIViewController { @IBOutlet weak var imageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() title = "CIFilter & GCD" } @IBAction func didTapProcessImage(_ sender: UIButton){ let image = CIImage(cgImage: imageView.image!.cgImage!) self.applyFilter(image) } func applyFilter(_ image: CIImage){ DispatchQueue.global().async { //delay by 5 for testing // sleep(5) let filter = CIFilter(name: "CISepiaTone")! filter.setDefaults() filter.setValue(image, forKey: kCIInputImageKey) // filter.setValue(0.5, forKey: kCIInputIntensityKey) let context = CIContext(options: nil) let imageRefrence = context.createCGImage(filter.outputImage!, from: image.extent) DispatchQueue.main.async { self.imageView.image = UIImage(cgImage: imageRefrence!) } } } }
[ -1 ]
c3f780d58a64847642e1a7acd73d4acdbeed2095
1fb29a4418ca0b89f78078fcf43d627c80d92f2f
/NasaChallenge/ViewModel/NasaDetailViewModel.swift
4581a34c5a51fefe49e2dfee5f96c68a8965fa3c
[ "MIT" ]
permissive
zakhiadamaree/nasa-challenge
711ed63260b3825b87ef60701f327126b9350340
6a8c108009198caef06295366256a4c024b555dc
refs/heads/main
2023-07-13T03:13:43.058239
2021-08-25T14:50:55
2021-08-25T14:50:55
399,851,315
0
1
null
2021-08-25T14:50:56
2021-08-25T14:36:08
Swift
UTF-8
Swift
false
false
1,484
swift
// // NasaDetailViewModel.swift // NasaChallenge // // Created by Zakhia Damaree on 20/08/2021. // Copyright © 2021 Zakhia Damaree. All rights reserved. // import Foundation import Combine class NasaDetailViewModel: NSObject { let networkManager = NetworkManager() let imageDownloader = ImageDownloader() private var cancellable: AnyCancellable? @Published private(set) var originalImageUrl: String? = nil func fetchOriginalImageUrl(imageCollectionUrl: String) { cancellable = networkManager.fetchData([String].self, urlString: imageCollectionUrl) .sink(receiveCompletion: { completion in switch completion { case .failure(let error): let _ = NetworkError.getMessageForError(error) switch error { case .invalidUrl: Util.saveToUserDefault(imageCollectionUrl, value: 0) default: () } case .finished: Util.log("Original image url received") } }, receiveValue: { [weak self] imageCollection in let filteredOriginalImage = imageCollection.filter { $0.contains("orig.") } if let originalImageUrl = filteredOriginalImage.first { self?.originalImageUrl = originalImageUrl } }) } }
[ -1 ]
2f998d561d335f9a568463d64ad069a7bc0089cc
2bcd90daaf21a4fa496482cd9c996407df4f94ea
/Animations/Animations/AppDelegate.swift
881c2f7d4258560171b57ba14342d79ab5ef220d
[]
no_license
clxrinf/iOS_Development
33dd416276faefdb1975ffbafd6c20c8bad26ffe
181b9a184660df7b2e2d36632929c9d27135174a
refs/heads/master
2021-07-15T18:29:04.620199
2017-10-12T21:02:43
2017-10-12T21:02:43
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,171
swift
// // AppDelegate.swift // Animations // // Created by Beat Rupp on 03.10.17. // Copyright © 2017 Beat Rupp. 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, 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, 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, 286987, 319757, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 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, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 278983, 319945, 278986, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172612, 377413, 172614, 172618, 303690, 33357, 303696, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 287349, 189040, 189044, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 164509, 303773, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 328381, 287423, 328384, 172737, 287427, 312005, 312006, 172748, 287436, 172751, 287440, 295633, 172755, 303827, 279255, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 213895, 304007, 304009, 304011, 304013, 295822, 279438, 189325, 189329, 295825, 304019, 213902, 58262, 304023, 304027, 279452, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 304065, 213954, 189378, 156612, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 295945, 230413, 295949, 197645, 320528, 140312, 295961, 238620, 304164, 304170, 304175, 238641, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 279661, 205934, 164973, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 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, 337306, 288154, 288160, 288162, 288164, 279975, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 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, 230916, 230919, 230923, 304651, 304653, 370187, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 198310, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 321252, 313066, 288494, 280302, 321266, 288499, 419570, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 337732, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 305028, 280454, 247688, 124817, 280468, 239510, 280473, 124827, 247709, 214944, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 288895, 321670, 215175, 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, 280919, 248153, 215387, 354653, 354656, 313700, 280937, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281047, 215526, 166378, 305647, 281075, 174580, 240124, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 281095, 223752, 150025, 338440, 240132, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 289317, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 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, 314045, 314047, 314051, 199364, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 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, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 216376, 380226, 298306, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 298377, 314763, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 290305, 306694, 192008, 257550, 282127, 290321, 282130, 290325, 282133, 241175, 290328, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 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, 307027, 315221, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 241581, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315552, 184479, 184481, 184486, 307370, 307372, 307374, 307376, 299185, 323763, 184503, 299191, 176311, 307385, 307386, 307388, 258235, 307390, 176316, 299200, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 299225, 233701, 307432, 282881, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 307508, 315701, 332086, 307510, 307512, 307515, 307518, 282942, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 276052, 315739, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 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, 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, 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, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 201444, 299750, 283368, 234219, 283372, 185074, 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, 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, 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, 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, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 292197, 316774, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 316811, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 144814, 144820, 374196, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 300527, 308720, 292338, 226802, 316917, 308727, 292343, 300537, 316933, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 292421, 226886, 284231, 128584, 243268, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 235097, 284253, 300638, 284255, 284258, 292452, 292454, 284263, 284265, 292458, 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, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 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, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 292681, 153417, 358224, 276308, 284502, 317271, 276315, 292700, 317279, 284511, 227175, 292715, 292721, 284529, 300915, 292729, 317306, 284540, 292734, 325512, 276365, 317332, 358292, 284564, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 358326, 358330, 276410, 276411, 276418, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 276464, 178161, 227314, 325624, 350200, 276472, 317435, 276479, 276482, 350210, 276485, 317446, 178181, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 178224, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 243779, 325700, 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, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 309494, 243960, 276735, 227583, 227587, 276739, 276742, 227593, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276811, 235853, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 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, 113167, 309779, 317971, 309781, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 23094, 277054, 219714, 129603, 301636, 318020, 301639, 301643, 277071, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 121458, 277106, 170619, 309885, 309888, 277122, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 228069, 277223, 342760, 285417, 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, 301884, 293696, 310080, 277317, 277322, 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, 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, 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, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 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, 64768, 310531, 285958, 138505, 228617, 318742, 277798, 130345, 113964, 384302, 285999, 113969, 318773, 318776, 286010, 417086, 286016, 302403, 294211, 384328, 294221, 146765, 294223, 326991, 179547, 302436, 294246, 327015, 310632, 327017, 351594, 351607, 310648, 310651, 310657, 351619, 294276, 310659, 253320, 310665, 318858, 310672, 351633, 310689, 130468, 277932, 310703, 310710, 130486, 310712, 310715, 302526, 228799, 302534, 310727, 64966, 245191, 163272, 302541, 302543, 310737, 228825, 310749, 310755, 187880, 310764, 286188, 310772, 40440, 212472, 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, 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, 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, 286425, 319194, 278235, 301163, 278238, 229086, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 294785, 327554, 360322, 294803, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
030aab47192ea4ed74cf7e28685bcd2f581c4ee6
3d8bd0331b836a9ca944c8841c4c46973dc9683f
/Sources/AarKayPlugin/Core/Template.swift
785c85454b91797e30d65c95d8b3d40f05ead3eb
[ "MIT" ]
permissive
mjasa/AarKay
1b825864c782a7d5c45ee91a85d284a54e64ad6c
881d76d3a8012b858396d0dbdd62ceaf4351f3e7
refs/heads/master
2020-04-15T18:31:19.980288
2019-01-08T16:18:47
2019-01-08T16:18:47
null
0
0
null
null
null
null
UTF-8
Swift
false
false
8,639
swift
// _____ ____ __. // / _ \ _____ _______ | |/ _|____ ___.__. // / /_\ \\__ \\_ __ \ | < \__ \< | | // / | \/ __ \| | \/ | | \ / __ \\___ | // \____|__ (____ /__| |____|__ (____ / ____| // \/ \/ \/ \/\/ // import AarKayKit import Foundation public class Template: NSObject, Templatable { private let datafile: Datafile private var model: TemplateModel public var generatedfile: Generatedfile public required init?(datafile: Datafile, generatedfile: Generatedfile) throws { guard let contents = generatedfile.contents else { return nil } self.datafile = datafile self.model = try contents.decode(type: TemplateModel.self) var generatedfile = generatedfile generatedfile.contents = try Dictionary.encode(data: model) self.generatedfile = generatedfile } public static func resource() -> String { return #file } } public class TemplateModel: Codable { public var isTemplate: Bool! public var isPlugin: Bool! public var name: String public var module: String! public var base: String? public var dir: String? public var templates: [TemplateStringModel]? public var subs: [TemplateModel]? public var inputSerializer: String? public var customDecoder: Bool! public var properties: [ArgModel]! public var baseProperties: [ArgModel]! public var computedProperties: [ArgModel]? public var allProperties: [ArgModel]? { /// <aarkay allProperties> let props = properties ?? [] let cProps = computedProperties ?? [] let allProperties = props + cProps return allProperties.isEmpty ? nil : allProperties /// </aarkay> } public var requiredProperties: [ArgModel]? { /// <aarkay requiredProperties> return self.properties.filter { !$0.isOptionalOrWrapped } /// </aarkay> } public var requiredBaseProperties: [ArgModel]? { /// <aarkay requiredBaseProperties> return self.baseProperties.filter { !$0.isOptionalOrWrapped } /// </aarkay> } public var requiredAllProperties: [ArgModel]? { /// <aarkay requiredAllProperties> return (self.baseProperties + self.properties).filter { !$0.isOptionalOrWrapped } /// </aarkay> } private enum CodingKeys: String, CodingKey { case isTemplate case isPlugin case name case module case base case dir case templates case subs case inputSerializer case customDecoder case properties case baseProperties case computedProperties case allProperties case requiredProperties case requiredBaseProperties case requiredAllProperties } public init(name: String) { self.name = name } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.isTemplate = try container.decodeIfPresent(Bool.self, forKey: .isTemplate) ?? true self.isPlugin = try container.decodeIfPresent(Bool.self, forKey: .isPlugin) ?? true self.name = try container.decode(String.self, forKey: .name) self.module = try container.decodeIfPresent(String.self, forKey: .module) ?? self.name self.base = try container.decodeIfPresent(String.self, forKey: .base) self.dir = try container.decodeIfPresent(String.self, forKey: .dir) self.templates = try container.decodeIfPresent([TemplateStringModel].self, forKey: .templates) self.subs = try container.decodeIfPresent([TemplateModel].self, forKey: .subs) self.inputSerializer = try container.decodeIfPresent(String.self, forKey: .inputSerializer) self.customDecoder = try container.decodeIfPresent(Bool.self, forKey: .customDecoder) ?? false self.properties = try container.decodeIfPresent([ArgModel].self, forKey: .properties) ?? [] self.baseProperties = try container.decodeIfPresent([ArgModel].self, forKey: .baseProperties) ?? [] self.computedProperties = try container.decodeIfPresent([ArgModel].self, forKey: .computedProperties) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(isTemplate, forKey: .isTemplate) try container.encode(isPlugin, forKey: .isPlugin) try container.encode(name, forKey: .name) try container.encode(module, forKey: .module) try container.encodeIfPresent(base, forKey: .base) try container.encodeIfPresent(dir, forKey: .dir) try container.encodeIfPresent(templates, forKey: .templates) try container.encodeIfPresent(subs, forKey: .subs) try container.encodeIfPresent(inputSerializer, forKey: .inputSerializer) try container.encode(customDecoder, forKey: .customDecoder) try container.encode(properties, forKey: .properties) try container.encode(baseProperties, forKey: .baseProperties) try container.encodeIfPresent(computedProperties, forKey: .computedProperties) try container.encodeIfPresent(allProperties, forKey: .allProperties) try container.encodeIfPresent(requiredProperties, forKey: .requiredProperties) try container.encodeIfPresent(requiredBaseProperties, forKey: .requiredBaseProperties) try container.encodeIfPresent(requiredAllProperties, forKey: .requiredAllProperties) } } // MARK: - AarKayEnd extension Template { public func generatedfiles() -> [Generatedfile] { var all = [Generatedfile]() var templatesDir = "AarKay/AarKayTemplates" let directoryComponents = datafile.directory.components(separatedBy: "/") directoryComponents.forEach { _ in templatesDir = "../" + templatesDir } templateFiles( generatedFile: rk_generatedfile(), templatesDir: templatesDir, model: model, all: &all ) modelFiles(generatedFile: rk_generatedfile(), model: model, all: &all) return all } func templateFiles(generatedFile: Generatedfile, templatesDir: String, model: TemplateModel, all: inout [Generatedfile]) { let templateFilename = model.name var templatesDir = templatesDir if let dir = model.dir { templatesDir = templatesDir + "/" + dir } model.templates?.forEach { let fileName = templateFilename + ($0.suffix ?? "") let templateString = $0.string.replacingOccurrences( of: "{{self.name}}", with: model.name ) var gfile = generatedFile gfile.directory = templatesDir gfile.templateString = templateString gfile.name = fileName gfile.ext = "\($0.ext).stencil" all.append(gfile) } guard let subs = model.subs else { return } subs.forEach { let sub = $0 sub.dir = model.name templatesDir = "../" + templatesDir if sub.templates == nil && model.templates != nil { sub.templates = model.templates!.map { t in if let substring = t.subString { let template = t template.string = substring return template } else { return t } } } templateFiles( generatedFile: generatedFile, templatesDir: templatesDir, model: sub, all: &all ) } } func modelFiles(generatedFile: Generatedfile, model: TemplateModel, all: inout [Generatedfile]) { var gFile = generatedFile gFile.name = model.name all.append(gFile) guard let subs = model.subs else { return } subs.forEach { sub in sub.base = (model.properties.isEmpty) ? model.base : model.name sub.baseProperties = model.baseProperties + model.properties let subDir = generatedFile.directory != nil ? generatedFile.directory! + "/" + model.name : model.name var subFile = generatedFile subFile.directory = subDir subFile.contents = try! Dictionary.encode(data: sub) modelFiles(generatedFile: subFile, model: sub, all: &all) } } }
[ -1 ]
55c5c6937135a9a7fb7b50fed920106561ddbd7f
cd5cdbd9c3bd393758e97afeab78b7b7a17bc0d2
/TabBar/TabBar/Mian/ViewController.swift
267d5c36a1248403afaa1d0d665e73c95f0d5daa
[]
no_license
KerryTong/swift_My_TabBarController
1bad8330d195479b2b08193e2fb129db06b12116
0b751f5a9f5728be28cc5b3d865fc453b5a2b76f
refs/heads/master
2021-03-16T09:23:52.579514
2017-08-21T09:05:25
2017-08-21T09:05:25
null
0
0
null
null
null
null
UTF-8
Swift
false
false
504
swift
// // ViewController.swift // TabBar // // Created by 仝兴伟 on 2017/8/15. // Copyright © 2017年 仝兴伟. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
[ 293888, 279041, 279046, 215562, 275466, 294411, 281107, 293909, 300057, 281118, 284192, 197664, 317473, 284197, 296487, 286249, 296489, 304174, 281142, 286775, 300086, 300089, 238653, 286786, 129604, 228932, 226887, 300107, 284236, 278606, 284239, 226896, 284240, 284242, 292435, 228945, 203858, 280146, 307288, 212573, 309347, 281701, 309349, 306791, 309351, 309353, 286314, 311913, 277612, 296042, 164974, 307311, 284275, 314996, 277108, 284277, 284279, 292478, 284287, 284289, 285321, 284298, 278675, 349332, 284315, 299165, 284317, 295586, 282275, 284323, 284328, 313007, 284336, 286390, 276150, 280760, 282301, 296638, 283839, 277696, 285377, 280770, 280772, 280775, 294600, 284361, 230604, 298189, 302286, 313550, 230608, 229585, 282320, 317137, 290004, 284373, 290006, 302295, 189655, 298202, 278749, 280797, 298206, 363743, 282338, 298211, 290020, 301284, 284391, 277224, 280808, 199402, 280810, 234223, 289524, 282357, 120054, 226038, 280826, 282368, 276736, 280832, 230147, 358147, 282377, 312586, 288251, 282393, 278298, 329499, 287004, 281373, 295711, 228127, 287007, 282403, 281380, 304933, 233767, 283433, 159541, 285495, 282426, 307516, 283453, 278845, 279360, 288577, 288579, 238920, 287055, 296272, 307029, 289112, 188253, 292701, 311645, 308064, 227688, 293742, 280947, 277364, 292730, 207738, 290175, 183173, 324491, 233869, 304015, 300432, 226196, 284570, 284574, 284577, 289187, 283556, 284580, 288165, 289190, 289191, 305577, 144811, 291755, 289196, 370093, 279982, 324528, 286126, 297903, 282035, 230323, 282548, 305582, 278968, 230328, 293816, 127418, 293308, 278973, 291774, 288205, 286158, 280015, 301012, 294877, 280030, 280031, 279011, 289771, 231405, 298989, 183278, 277487, 282095, 227315, 302580, 310773, 236022, 292344, 290299, 287231 ]
0d5a9d1f225c9a27aa5b0403a5dcef501708e0f5
db595bf8047cf56ebad733ca7fa369913862d5a4
/2019.11.25(월)-UIViewController/191125/viewControlLifecycle/viewControlLifecycle/SceneDelegate.swift
efa80267b5e3c9a9dba974a0ff1966af6e969f6d
[]
no_license
hongkimin1126/iOS-FastCampus
c3f0b446ebea82717741897b60fd3c253cd1e3bc
2d4cc32317949ef9fe661adf5668d546d0955a0f
refs/heads/master
2022-06-13T16:51:29.011068
2020-05-05T09:10:08
2020-05-05T09:10:08
260,648,498
0
0
null
null
null
null
UTF-8
Swift
false
false
2,592
swift
// // SceneDelegate.swift // viewControlLifecycle // // Created by 홍기민 on 2019/11/25. // Copyright © 2019 hongkimin. 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 windowScene = (scene as? UIWindowScene) else { return } window = UIWindow(windowScene: windowScene) window?.backgroundColor = .systemBackground window?.rootViewController = ViewController() window?.makeKeyAndVisible()// 도화지를 세팅 } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not 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, 254020, 376906, 327757, 254032, 286804, 368728, 180314, 254045, 368736, 180322, 376932, 286833, 368753, 286845, 286851, 417925, 262284, 286880, 286889, 377003, 327872, 180418, 377030, 377037, 180432, 368854, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 336124, 418044, 385281, 336129, 262405, 180491, 262417, 368913, 262423, 377118, 377121, 262437, 336181, 262455, 262473, 344404, 213333, 418135, 418145, 262497, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 393613, 262551, 262553, 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, 270905, 197178, 418364, 188990, 369224, 270922, 385610, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 271018, 336556, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 418508, 385743, 385749, 139998, 189154, 361196, 418540, 418555, 344832, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 369436, 262943, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 213848, 361307, 197469, 361310, 361318, 344936, 361323, 361335, 328574, 369544, 361361, 345036, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 328715, 377867, 361490, 386070, 336922, 345119, 377888, 328747, 345134, 345139, 386102, 361537, 377931, 197708, 345172, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 361594, 410746, 361599, 345224, 386187, 337048, 345247, 361645, 337072, 345268, 337076, 402615, 361657, 337093, 402636, 328925, 66783, 328933, 222438, 328942, 386286, 386292, 206084, 115973, 345377, 345380, 345383, 263464, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 181644, 361869, 181650, 181655, 230810, 263585, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 329192, 361961, 329195, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 370208, 419360, 394787, 419363, 370214, 419369, 419377, 206397, 214594, 419404, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403076, 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, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 116512, 345888, 362274, 378664, 354107, 345916, 354112, 247618, 370504, 329545, 354124, 345932, 370510, 337743, 354132, 247639, 337751, 370520, 313181, 345965, 354157, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 247692, 395148, 337809, 247701, 329625, 436127, 436133, 362414, 337845, 190393, 346059, 247760, 346064, 419810, 329699, 354275, 190440, 247790, 354314, 346140, 337980, 395340, 378956, 338005, 329816, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 387250, 379067, 387261, 395467, 346317, 256214, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 338154, 387307, 346350, 338161, 387314, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 395567, 248112, 362823, 436556, 190797, 321880, 362844, 379234, 182642, 354674, 321911, 420237, 379279, 354728, 338353, 338363, 338382, 338387, 248279, 256474, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 346736, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 355029, 264919, 183006, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 191240, 338701, 256787, 338712, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 355151, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 330612, 330643, 412600, 207809, 347082, 396246, 330711, 248794, 248799, 257009, 265208, 330750, 265215, 199681, 330761, 330769, 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, 248986, 44199, 380071, 339118, 339133, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 388348, 339199, 396552, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 126279, 437576, 437584, 331089, 437588, 331094, 396634, 175451, 437596, 175458, 208228, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 249215, 175487, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 380353, 339401, 380364, 339406, 372177, 208338, 249303, 413143, 339418, 339421, 249310, 249313, 339425, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 175637, 405017, 134689, 339504, 265779, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 339572, 224885, 224888, 224891, 224895, 372354, 126597, 421509, 224905, 11919, 159375, 224914, 126611, 224917, 224920, 126618, 224923, 208539, 224927, 224930, 224933, 224939, 224943, 257713, 257717, 224949, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 224976, 257745, 339664, 257748, 224982, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 257791, 339711, 225027, 257796, 339722, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 257825, 225059, 339748, 225068, 257837, 225071, 225074, 257843, 225077, 257846, 372533, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 413539, 257891, 225128, 257897, 339818, 274281, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 372698, 372704, 372707, 356336, 393215, 372739, 405534, 266295, 266298, 217158, 200786, 356440, 217180, 266351, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 225439, 135328, 192674, 225442, 225445, 225448, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 389322, 225485, 225488, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356631, 381212, 258333, 356644, 356647, 266537, 356650, 389417, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 332118, 348503, 430422, 250201, 332126, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 332158, 250239, 438657, 332162, 389507, 348548, 356741, 389503, 332175, 160152, 373146, 340380, 373169, 266688, 324032, 201158, 127473, 217590, 340473, 324095, 324100, 266757, 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, 381546, 119432, 340628, 184983, 340639, 258723, 332455, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 373450, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 348926, 389927, 152371, 348983, 340792, 398141, 127815, 357202, 389971, 136024, 357208, 389979, 357212, 430940, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 340859, 324476, 430973, 119675, 340863, 324479, 324482, 373635, 324485, 324488, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 398246, 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, 357411, 250917, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 209996, 341072, 349268, 250968, 210011, 373853, 341094, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 373905, 210072, 210078, 210081, 251045, 210085, 210089, 210096, 210100, 324792, 210108, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 275713, 242947, 275717, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 357710, 210261, 365912, 259423, 374113, 251236, 374118, 333164, 234867, 390518, 357756, 136591, 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, 349739, 144940, 415279, 415282, 349748, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 366173, 333415, 423533, 333423, 210547, 415354, 333440, 267910, 333472, 333499, 210632, 333512, 259789, 358100, 366301, 333535, 153311, 366308, 366312, 399086, 366319, 210673, 366322, 399092, 366326, 268042, 210700, 366349, 210707, 399129, 333593, 333595, 210720, 358192, 366384, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 341877, 325494, 399222, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382898, 333767, 350153, 358348, 333777, 219094, 399318, 358372, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 333851, 350238, 350241, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 342113, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 350411, 260299, 350417, 350423, 211161, 350426, 334047, 350449, 375027, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 325915, 325918, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 334162, 358738, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 383375, 268702, 342431, 416159, 375209, 326059, 375220, 342453, 334263, 358857, 195041, 334312, 104940, 375279, 162289, 350724, 186898, 342546, 350740, 334359, 342551, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 358973, 219719, 399957, 244309, 334425, 326240, 375401, 268922, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 326417, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 326463, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 326494, 326503, 433001, 375657, 326508, 400238, 326511, 211826, 392061, 359296, 252801, 351105, 260993, 400260, 211846, 342921, 236432, 342931, 252823, 400279, 392092, 400286, 252838, 359335, 211885, 400307, 351169, 359362, 326599, 359367, 187335, 359383, 359389, 383968, 343018, 359411, 244728, 383999, 326669, 359452, 211999, 359471, 375868, 343132, 384099, 384108, 326764, 367724, 187503, 326767, 343155, 384115, 212095, 384136, 384140, 384144, 351382, 384152, 384158, 384161, 384169, 367795, 367801, 384189, 351424, 384192, 343232, 244934, 367817, 244938, 384202, 326858, 343246, 384209, 146644, 351450, 384225, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 171304, 245032, 376111, 245042, 326970, 384324, 343366, 212296, 212304, 343394, 343399, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 343453, 245149, 245152, 245155, 155045, 40358, 245158, 245163, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 327116, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 253445, 359948, 245295, 359984, 400977, 400982, 245358, 138865, 155255, 155274, 368289, 245410, 425639, 245415, 425652, 155323, 425663, 155328, 245463, 155352, 212700, 155356, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 384829, 384831, 360262, 155463, 155477, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 327542, 262006, 147319, 262009, 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, 204785, 393204, 360439, 253944, 393209, 155647 ]
ff574972b4aace242d63220812e2feced29cb448
0af417f10b194df424fb7197a899aac1dd6148c6
/SampleChatApp/LoginInteractor.swift
ba717808faf6f3219f713aaa86aaa65c0991e0d7
[ "MIT" ]
permissive
wifizone/ChatApp
eea89a31e93e78b147e6c2f6d2a082c33871eb3f
0f66c26bff97abaf4131e70724d3057b1868d261
refs/heads/master
2022-12-14T13:15:02.799711
2020-07-19T19:37:00
2020-07-19T19:37:00
280,155,070
0
0
MIT
2020-09-14T16:54:00
2020-07-16T13:00:01
Swift
UTF-8
Swift
false
false
2,754
swift
// // LoginInteractor.swift // SampleChatApp // // Created by Anton Poluianov on 20/06/2020. // Copyright © 2020 anton.poluianov. All rights reserved. // protocol LoginInteracting: AnyObject { func didTapRegister(email: String?, password: String?) func didTapLogin(email: String?, password: String?) func didFinishLogin() } final class LoginInteractor { private let presenter: LoginPresentable private let router: LoginRouting? private let validationService: UserInputValidatorProtocol private let authenticationService: AuthenticationLogic init(router: LoginRouting?, presenter: LoginPresentable, validationService: UserInputValidatorProtocol, authenticationService: AuthenticationLogic) { self.router = router self.presenter = presenter self.validationService = validationService self.authenticationService = authenticationService } } extension LoginInteractor: LoginInteracting { func didTapRegister(email: String?, password: String?) { guard let email = email, let password = password else { return } do { try validationService.validate(email, type: .requiredField(field: "Name")) try validationService.validate(password, type: .requiredField(field: "Password")) try validationService.validate(email, type: .email) try validationService.validate(password, type: .password) } catch let error { if let error = error as? ValidationError { presenter.didFinishRegistration(isRegistered: .failure(.validationError(message: error.message))) } return } authenticationService.signUp(email: email, password: password) { [weak self] result in switch result { case let .success(model): self?.presenter.didFinishRegistration(isRegistered: .success(model)) case .failure: self?.presenter.didFinishRegistration(isRegistered: .failure(.serverError)) } } } func didTapLogin(email: String?, password: String?) { guard let email = email, let password = password else { return } do { try validationService.validate(email, type: .requiredField(field: "Name")) try validationService.validate(password, type: .requiredField(field: "Password")) try validationService.validate(email, type: .email) } catch let error { if let error = error as? ValidationError { presenter.didFinishLogin(isLoggedIn: .failure(.validationError(message: error.message))) } return } authenticationService.signIn(email: email, password: password) { [weak self] result in switch result { case let .success(model): self?.presenter.didFinishLogin(isLoggedIn: .success(model)) case .failure: self?.presenter.didFinishLogin(isLoggedIn: .failure(.serverError)) } } } func didFinishLogin() { router?.routeToProfileInitSetup() } }
[ -1 ]
d136fa24946f5bdabef630dc1cee885514520d00
7664a9ed29d47f211464e3f398cec2c8cc4330d5
/MyPortfolio/MyPortfolio/Model/ProjectsFactory.swift
66534cee8c4996b2466fe8b3f9721f50826a0911
[]
no_license
DanteCV2/Portfolio-Scraping
5cbd20e6c64f138a372b26c51773ae15ce298473
eac07150d827c003d6b5e302f3abb342c154af79
refs/heads/master
2020-12-14T14:09:44.318408
2020-01-18T17:25:41
2020-01-18T17:25:41
234,768,374
0
0
null
null
null
null
UTF-8
Swift
false
false
2,644
swift
// // ProjectsFactory.swift // MyPortfolio // // Created by Dante Cervantes Vega on 17/01/20. // Copyright © 2020 Dante Cervantes Vega. All rights reserved. // import Foundation import Alamofire import Kanna class ProjectsFactory { var projects = [Project]() var pageUrl : String init(pageUrl : String) { self.pageUrl = pageUrl scrapeUrl() } func scrapeUrl() { Alamofire.request(self.pageUrl).responseString { (response) in if response.result.isSuccess{ if let htmlString = response.result.value{ self.parseHTML(htmlString) } } } } func parseHTML(_ html : String){ do{ let doc = try Kanna.HTML(html: html, encoding: .utf8) for sections in doc.css("section"){ if sections["class"] == "posts"{ for articles in sections.css("article"){ var title = "" var imageUrl = "" var description = "" var gitUrl = "" for headers in articles.css("header"){ for a in headers.css("a"){ title = a.content!.replacingOccurrences(of: "\r\n\t\t\t\t\t\t\t\t\t\t", with: " ") } } for a in articles.css("a"){ if a["class"] == "image fit"{ imageUrl = a["href"]! } } for p in articles.css("p"){ description = p.content! } for ul in articles.css("ul"){ if ul["class"] == "actions special"{ for a in ul.css("a"){ gitUrl = a["href"]! } } } let project = Project(title: title, description: description, imageUrl: imageUrl, gitUrl: gitUrl) self.projects.append(project) NotificationCenter.default.post(name: NSNotification.Name("articleUpdated"), object: nil) } } } }catch{ print(error) } } }
[ -1 ]
de99e1d4c4343d892f05adab1d4310d856823150
50f0cda786976c219c8af6a08dcca6992cf06637
/Field.swift
f5ce7444f5d9621ef4ec72cd28adde630066745c
[ "MIT" ]
permissive
RostislavGG/Demons-0.5-swift
c8a41836cbfe97ee1e4ab86afa4d9c022bcf4c46
4ffa9bc9dd2c659435705f4f650a2de3d5dac7df
refs/heads/master
2020-03-17T13:45:28.539049
2018-05-19T13:10:33
2018-05-19T13:10:33
133,643,308
0
0
null
null
null
null
UTF-8
Swift
false
false
1,049
swift
struct Field { let xCoordinate: Int let yCoordinate: Int var occupant: Any? var canStepHere: Bool = true init(xCoordinate: Int, yCoordinate: Int) { self.xCoordinate = xCoordinate self.yCoordinate = yCoordinate occupant = nil } init(xCoordinate: Int, yCoordinate: Int, occupant: Any) { self.xCoordinate = xCoordinate self.yCoordinate = yCoordinate self.occupant = occupant } mutating func removeOccupant() { occupant = nil } func checkForOccupant() -> Bool { if occupant != nil { return true } else { return false } } func getOccupantType() -> Any { return type(of: occupant) } mutating func addOccupant(who newOcc: Any) -> Bool { if occupant == nil { occupant = newOcc return true } return false } mutating func makeUnreachable() { canStepHere = false } }
[ -1 ]
9f12f26ab669d31371a3b6e8cac975155be6ea46
da17dcd537d1d418922a0442d9904648ad90a801
/PageViewControllerDemo/PageViewControllerDemo/UIView+Extension.swift
8b06dd4129b0be4cd57ea558515423c016f7f50d
[]
no_license
BasThomas/PageViewControllerDemo
a03d24c8153b7cee5b599c2630739612a835fe7a
2d5a5cb89ea32861efae7b31b0ce77d3efa7a701
refs/heads/master
2021-01-13T00:57:04.146307
2015-12-09T13:18:17
2015-12-09T13:18:17
47,272,717
0
0
null
null
null
null
UTF-8
Swift
false
false
525
swift
// // UIView+Extension.swift // PageViewControllerDemo // // Created by Bas Broek on 12/2/15. // Copyright © 2015 Bas Broek. All rights reserved. // import UIKit extension UIView { var parentViewController: UIViewController? { var parentResponder: UIResponder? = self while parentResponder != nil { parentResponder = parentResponder?.nextResponder() guard let viewController = parentResponder as? RootViewController else { continue } return viewController } return nil } }
[ -1 ]
636649e4bc03b19de3c08815b57352e9484a2985
6ec45b587fc5b885ba5b6882079241e5a6339504
/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift
eeb6a1250ab3f0bcbed9dcc343384c9e75f3f224
[ "MIT" ]
permissive
deepakven/GifApp
a927c9f51112e33e9c042a507b8d132a103965ac
a5d1f7299cc3cd481c774ce70876ad72938432ea
refs/heads/master
2021-08-31T00:52:53.441388
2017-12-20T02:30:09
2017-12-20T02:30:09
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,304
swift
// // RxTextStorageDelegateProxy.swift // RxCocoa // // Created by Segii Shulga on 12/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // #if os(iOS) || os(tvOS) #if !RX_NO_MODULE import RxSwift #endif import UIKit open class RxTextStorageDelegateProxy : DelegateProxy , DelegateProxyType , NSTextStorageDelegate { /// For more information take a look at `DelegateProxyType`. open override class func createProxyForObject(_ object: AnyObject) -> AnyObject { let pickerView: NSTextStorage = castOrFatalError(object) return pickerView.createRxDelegateProxy() } /// For more information take a look at `DelegateProxyType`. open class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { let textStorage: NSTextStorage = castOrFatalError(object) textStorage.delegate = castOptionalOrFatalError(delegate) } /// For more information take a look at `DelegateProxyType`. open class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { let textStorage: NSTextStorage = castOrFatalError(object) return textStorage.delegate } } #endif
[ 61956, 158492 ]
a80376bef4e187e47484ce4d98e3f391b7708ccc
9261eea7985048e5a0dfce4a0e9dd685891d7f90
/AEONTest/Payments.swift
7491cbfe9f0c5a29e229d3633ba0ec54ec53c794
[]
no_license
vkhomatov/AEONTest
e4c5baff905eeed456fef410808f154d2398bc60
c6c702910e8e70dfe0840208190bd444c2391b77
refs/heads/master
2023-03-07T21:07:14.846614
2021-02-25T13:57:44
2021-02-25T13:57:44
341,369,154
0
0
null
null
null
null
UTF-8
Swift
false
false
1,836
swift
// // Payments.swift // AEONTest // // Created by Vitaly Khomatov on 21.02.2021. // import Foundation /* // Структура для Codable struct Payments: Codable { var success = String() var response = [PaymentsResponse]() } struct PaymentsResponse: Codable { let desc: String let amount: Amount let currency: String? let created: Int } enum Amount: Codable { case double(Double) case string(String) init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() if let x = try? container.decode(Double.self) { self = .double(x) return } if let x = try? container.decode(String.self) { self = .string(x) return } throw DecodingError.typeMismatch(Amount.self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Wrong type for Amount")) } func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() switch self { case .double(let x): try container.encode(x) case .string(let x): try container.encode(x) } } } */ // Сктура для JSONSerialization struct PaymentsJson { var desc = String() var amount1: Double? var amount2: String? var amount = String() var currency = String() var created1: Int? var created2: String? var created = String() } // Структура для ошибки при авторизации struct TokenError: Codable { let success: String let error: ErrorClass } struct ErrorClass: Codable { let errorCode: Int let errorMsg: String enum CodingKeys: String, CodingKey { case errorCode = "error_code" case errorMsg = "error_msg" } }
[ -1 ]
53d4969f45b211b546a00765b7c3e5ce8c2a4c0e
e2aa3cfae6c2225028847e3d005376e98e878f52
/ZRLoginModule/ZRLoginModule/ViewControllers/RegisterSelectCountryViewController.swift
ac636f2c53d15b1e3a2b7fb3c3ef104084ac6139
[]
no_license
fushilin/SwiftChannel
23d40936c6ed5abd57914d80076869bb23dfa9db
0314681f7f98d61149054fe268a09b3eba4a00d7
refs/heads/master
2020-07-23T12:04:21.780858
2019-10-15T08:52:47
2019-10-15T08:52:47
207,550,938
0
0
null
null
null
null
UTF-8
Swift
false
false
10,310
swift
// // RegisterSelectCountryViewController.swift // ZRLoginModule // // Created by 1230 on 2019/8/16. // Copyright © 2019 Zhuorui. All rights reserved. // import UIKit import ZRCoreKit import ObjectMapper import ZRModel import ZRBase protocol RegisterSelectCountryDelegate { func selectCountrySendName(name: String) } /// 定义传值变量 typealias block = (_ str: CountryModel) -> Void public class RegisterSelectCountryViewController: BaseViewController { var callBackBlock: block? /// var searchBar private lazy var searchBar : UISearchBar = { var searchBar = UISearchBar.init(frame: .zero) searchBar.delegate = self return searchBar }() /// 右侧添加一个button private lazy var searBtn : UIButton = { var btn = UIButton.init(frame: .zero) btn.setTitle("搜索", for: .normal) btn.setTitleColor(.red, for: .normal) btn.addTarget(self , action: #selector(pressSearchBtn), for: .touchUpInside) return btn }() var dataSourceArray:[Any] = [Any]() var searchDataSource:[Any] = [Any]() var delegage: RegisterSelectCountryDelegate? var searchBool: Bool = false let sortArray = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] /// 设置属性 private lazy var tableView: UITableView = { let tableView = UITableView.init(frame: CGRect.zero, style: .plain) tableView.dataSource = self tableView.delegate = self tableView.showsVerticalScrollIndicator = false tableView.showsHorizontalScrollIndicator = false //设置索引条的文字颜色 tableView.sectionIndexColor = UIColor.blue // [UIColor orangeColor]; //设置索引条的背景颜色 tableView.sectionIndexBackgroundColor = .white // [UIColor redColor]; return tableView }() override public func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = .white self.view.addSubview(tableView) self.view.addSubview(searchBar) self.view.addSubview(searBtn) // let language = LanguageManager.default.serverLanuage switch languageM.current { case .cn_hk: print("香港") break case .english: print("meiyu") break default: print("qita") break } searchBar.snp.makeConstraints { (make) in make.left.equalTo(self.view.snp_left).offset(0) make.right.equalTo(self.view.snp_right).offset(-80) make.top.equalTo(self.view.snp_top).offset(0) make.height.equalTo(50) } searBtn.snp.makeConstraints { (make) in make.left.equalTo(searchBar.snp_right).offset(0) make.right.equalTo(self.view.snp_right).offset(0) make.top.equalTo(self.view.snp_top).offset(0) make.height.equalTo(50) } tableView.snp.makeConstraints { (make) in make.left.equalTo(self.view.snp_left).offset(0) make.right.equalTo(self.view.snp_right).offset(0) make.top.equalTo(searchBar.snp_bottom).offset(0) make.bottom.equalTo(self.view.snp_bottom).offset(0) } /// 读取数据库操作 let pathString = "/Users/woyanshi/Desktop/测试代码/ZRLoginModule/Pods/ZRModel/ZRModelModule/ZRModelModule/Resources/Countrys" // SandBoxType.documents.filePath("/ZRModelModule/Resources/Countrys") // "/Users/woyanshi/Desktop/测试代码/ZRLoginModule/Pods/ZRModel/ZRModelModule/ZRModelModule/Resources/Countrys" let url = URL(fileURLWithPath: pathString) let data = (try? Data(contentsOf: url)) ?? Data() let jsonData:Any = try? JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions.mutableContainers) let jsonArr = jsonData as! NSArray for charTmp in self.sortArray { var array = [CountryModel]() for item in jsonArr { let model = Mapper<CountryModel>().map(JSONObject: item) /// 全部转化为大写 // model?.cn_py let firstString = model?.cn_py.uppercased() // print(firstString) /// 截取字符串首字母 let first = firstString?.prefix(1) if first == charTmp.prefix(1) { array.append(model! ) } } var dict:[String: Any] = [String:Any]() dict["sectionArray"] = array dict["sectionTitle"] = charTmp self.dataSourceArray.append(dict) } /// 转化为model tableView.reloadData() } func callBackFunction(block:@escaping (_ str: CountryModel) -> Void) { callBackBlock = block } } extension RegisterSelectCountryViewController: UITableViewDelegate , UITableViewDataSource { public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { var dict:NSDictionary? = NSDictionary() if searchBool == false { dict = self.dataSourceArray[section] as? NSDictionary }else{ dict = self.searchDataSource[section] as? NSDictionary } let array = dict?.object(forKey:"sectionArray") as! NSArray return array.count } public func numberOfSections(in tableView: UITableView) -> Int { if searchBool == false { return dataSourceArray.count }else { return self.searchDataSource.count } } public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let string = "string" var dict: NSDictionary = NSDictionary() if searchBool == false { dict = self.dataSourceArray[indexPath.section] as! NSDictionary }else{ dict = self.searchDataSource[indexPath.section] as! NSDictionary } var cell = tableView.dequeueReusableCell(withIdentifier: string) if cell == nil { cell = UITableViewCell.init(style: .default, reuseIdentifier: string) } let array:NSArray! = dict.object(forKey: "sectionArray") as? NSArray let model = array.object(at: indexPath.row) as? CountryModel switch languageM.current { case .cn_hk: cell?.textLabel!.text = model?.cn break case .english: cell?.textLabel!.text = model?.en break default: break } return cell ?? UITableViewCell() } /// 数量 func numberOfSectionsInTableView(tableView: UITableView) -> Int { return self.sortArray.count } /// 设置索引 public func sectionIndexTitles(for tableView: UITableView) -> [String]? { return sortArray } public func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { var dict: NSDictionary? = NSDictionary() if searchBool == false { dict = self.dataSourceArray[section] as? NSDictionary }else{ dict = self.searchDataSource[section] as? NSDictionary } let text:String! = dict?.object(forKey: "sectionTitle") as? String return text } public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { /// 传值信息 var dict: NSDictionary = NSDictionary() if searchBool == false { dict = self.dataSourceArray[indexPath.section] as! NSDictionary }else{ dict = self.searchDataSource[indexPath.section] as! NSDictionary } if callBackBlock != nil { let array:NSArray! = dict.object(forKey: "sectionArray") as? NSArray guard let model = array.object(at: indexPath.row) as? CountryModel else { return } callBackBlock!(model) } self.navigationController?.popViewController(animated: true) } } extension RegisterSelectCountryViewController:UISearchBarDelegate { } extension RegisterSelectCountryViewController { @objc private func pressSearchBtn() { /// 开启搜索数据s znSimpleLaguage() } /// 转化为汉语 private func znSimpleLaguage() { self.searchDataSource.removeAll() for item in self.dataSourceArray{ let dict = item as? NSDictionary let sourceArray = dict?.object(forKey: "sectionArray") as! NSArray searchBool = true var dict3:[String: Any] = [String:Any]() var searchArray = [CountryModel]() for searchItem in sourceArray { let searchModel = searchItem as! CountryModel var upString: String = "" let showString: String = "" switch languageM.current { case .cn_hk: upString = searchModel.cn.uppercased() break case .english: upString = searchModel.en.uppercased() break default: break } if (upString.range(of: "\(searchBar.text?.uppercased() ?? "")") != nil) { searchArray.append(searchModel) } } dict3["sectionArray"] = searchArray dict3["sectionTitle"] = "" self.searchDataSource.append(dict3) } tableView.reloadData() } }
[ -1 ]
1edca8125cb11b8154d7e877034a1c446df1eded
cf6eed3b55fde9741383509ed43d9bc92caadc91
/FinalProject-JustScheduleIt/FinalProject-JustScheduleIt/Class/ToDoList.swift
b14aef2957f36e64f44c71a19479a75283f05dda
[]
no_license
ekiehuang/SmartphoneCourse_SWIFT
40d9a238677995c876279327a5f065c2f0b7a913
af8e2fb01071f7044be861e237ba334cdd100882
refs/heads/main
2023-04-18T20:50:22.996065
2021-04-29T19:56:57
2021-04-29T19:56:57
338,170,415
0
0
null
null
null
null
UTF-8
Swift
false
false
578
swift
// // ToDoList.swift // FinalProject-JustScheduleIt // // Created by Huang Ekie on 3/22/21. // import Foundation class ToDoList{ var title : String var priority : String var durationPerTime : Float var location : String var minCondition : String init(title : String, priority : String, durationPerTime : Float, location : String, minCondition : String) { self.title = title self.priority = priority self.durationPerTime = durationPerTime self.location = location self.minCondition = minCondition } }
[ -1 ]
f42ee9cfd85f0a51a2f74fe860aed3a7b4791c5c
310fb6397d209c587e06686ad8f8cf70a978404c
/Tests/NIOTests/ByteBufferTest+XCTest.swift
9201b3d181652c8f860bedc94a8d0ad23ab9511c
[ "BSD-3-Clause", "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Yasumoto/swift-nio
13b58ce936d873917d269733d97927621c504727
86f41d8d40e0d36f0eded40a144072a31a1c48c0
refs/heads/master
2020-09-12T19:46:31.129189
2019-11-18T15:10:34
2019-11-18T15:10:34
222,531,570
0
0
Apache-2.0
2019-11-18T19:51:11
2019-11-18T19:51:10
null
UTF-8
Swift
false
false
12,626
swift
//===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIBUTORS.txt for the list of SwiftNIO project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// // // ByteBufferTest+XCTest.swift // import XCTest /// /// NOTE: This file was generated by generate_linux_tests.rb /// /// Do NOT edit this file directly as it will be regenerated automatically when needed. /// extension ByteBufferTest { static var allTests : [(String, (ByteBufferTest) -> () throws -> Void)] { return [ ("testAllocateAndCount", testAllocateAndCount), ("testEqualsComparesReadBuffersOnly", testEqualsComparesReadBuffersOnly), ("testSimpleReadTest", testSimpleReadTest), ("testSimpleWrites", testSimpleWrites), ("testMakeSureUniquelyOwnedSliceDoesNotGetReallocatedOnWrite", testMakeSureUniquelyOwnedSliceDoesNotGetReallocatedOnWrite), ("testWriteToUniquelyOwnedSliceWhichTriggersAReallocation", testWriteToUniquelyOwnedSliceWhichTriggersAReallocation), ("testReadWrite", testReadWrite), ("testStaticStringReadTests", testStaticStringReadTests), ("testString", testString), ("testSliceEasy", testSliceEasy), ("testWriteStringMovesWriterIndex", testWriteStringMovesWriterIndex), ("testSetExpandsBufferOnUpperBoundsCheckFailure", testSetExpandsBufferOnUpperBoundsCheckFailure), ("testCoWWorks", testCoWWorks), ("testWithMutableReadPointerMovesReaderIndexAndReturnsNumBytesConsumed", testWithMutableReadPointerMovesReaderIndexAndReturnsNumBytesConsumed), ("testWithMutableWritePointerMovesWriterIndexAndReturnsNumBytesWritten", testWithMutableWritePointerMovesWriterIndexAndReturnsNumBytesWritten), ("testWithMutableWritePointerWithMinimumSpecifiedAdjustsCapacity", testWithMutableWritePointerWithMinimumSpecifiedAdjustsCapacity), ("testWithMutableWritePointerWithMinimumSpecifiedWhileAtMaxCapacity", testWithMutableWritePointerWithMinimumSpecifiedWhileAtMaxCapacity), ("testSetGetInt8", testSetGetInt8), ("testSetGetInt16", testSetGetInt16), ("testSetGetInt32", testSetGetInt32), ("testSetGetInt64", testSetGetInt64), ("testSetGetUInt8", testSetGetUInt8), ("testSetGetUInt16", testSetGetUInt16), ("testSetGetUInt32", testSetGetUInt32), ("testSetGetUInt64", testSetGetUInt64), ("testWriteReadInt8", testWriteReadInt8), ("testWriteReadInt16", testWriteReadInt16), ("testWriteReadInt32", testWriteReadInt32), ("testWriteReadInt64", testWriteReadInt64), ("testWriteReadUInt8", testWriteReadUInt8), ("testWriteReadUInt16", testWriteReadUInt16), ("testWriteReadUInt32", testWriteReadUInt32), ("testWriteReadUInt64", testWriteReadUInt64), ("testSlice", testSlice), ("testSliceWithParams", testSliceWithParams), ("testReadSlice", testReadSlice), ("testSliceNoCopy", testSliceNoCopy), ("testSetGetData", testSetGetData), ("testWriteReadData", testWriteReadData), ("testDiscardReadBytes", testDiscardReadBytes), ("testDiscardReadBytesCoW", testDiscardReadBytesCoW), ("testDiscardReadBytesSlice", testDiscardReadBytesSlice), ("testWithDataSlices", testWithDataSlices), ("testEndianness", testEndianness), ("testExpansion", testExpansion), ("testExpansion2", testExpansion2), ("testNotEnoughBytesToReadForIntegers", testNotEnoughBytesToReadForIntegers), ("testNotEnoughBytesToReadForData", testNotEnoughBytesToReadForData), ("testSlicesThatAreOutOfBands", testSlicesThatAreOutOfBands), ("testMutableBytesCoW", testMutableBytesCoW), ("testWritableBytesTriggersCoW", testWritableBytesTriggersCoW), ("testBufferWithZeroBytes", testBufferWithZeroBytes), ("testPastEnd", testPastEnd), ("testReadDataNotEnoughAvailable", testReadDataNotEnoughAvailable), ("testReadSliceNotEnoughAvailable", testReadSliceNotEnoughAvailable), ("testSetBuffer", testSetBuffer), ("testWriteBuffer", testWriteBuffer), ("testMisalignedIntegerRead", testMisalignedIntegerRead), ("testSetAndWriteBytes", testSetAndWriteBytes), ("testWriteABunchOfCollections", testWriteABunchOfCollections), ("testSetABunchOfCollections", testSetABunchOfCollections), ("testTryStringTooLong", testTryStringTooLong), ("testSetGetBytesAllFine", testSetGetBytesAllFine), ("testGetBytesTooLong", testGetBytesTooLong), ("testReadWriteBytesOkay", testReadWriteBytesOkay), ("testReadTooLong", testReadTooLong), ("testReadWithUnsafeReadableBytesVariantsNothingToRead", testReadWithUnsafeReadableBytesVariantsNothingToRead), ("testReadWithUnsafeReadableBytesVariantsSomethingToRead", testReadWithUnsafeReadableBytesVariantsSomethingToRead), ("testSomePotentialIntegerUnderOrOverflows", testSomePotentialIntegerUnderOrOverflows), ("testWriteForContiguousCollections", testWriteForContiguousCollections), ("testWriteForNonContiguousCollections", testWriteForNonContiguousCollections), ("testReadStringOkay", testReadStringOkay), ("testReadStringTooMuch", testReadStringTooMuch), ("testSetIntegerBeyondCapacity", testSetIntegerBeyondCapacity), ("testGetIntegerBeyondCapacity", testGetIntegerBeyondCapacity), ("testSetStringBeyondCapacity", testSetStringBeyondCapacity), ("testGetStringBeyondCapacity", testGetStringBeyondCapacity), ("testAllocationOfReallyBigByteBuffer", testAllocationOfReallyBigByteBuffer), ("testWritableBytesAccountsForSlicing", testWritableBytesAccountsForSlicing), ("testClearDupesStorageIfTheresTwoBuffersSharingStorage", testClearDupesStorageIfTheresTwoBuffersSharingStorage), ("testClearDoesNotDupeStorageIfTheresOnlyOneBuffer", testClearDoesNotDupeStorageIfTheresOnlyOneBuffer), ("testClearWithBiggerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage", testClearWithBiggerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage), ("testClearWithSmallerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage", testClearWithSmallerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage), ("testClearWithBiggerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer", testClearWithBiggerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer), ("testClearWithSmallerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer", testClearWithSmallerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer), ("testClearWithBiggerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer", testClearWithBiggerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer), ("testClearWithSmallerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer", testClearWithSmallerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer), ("testClearDoesAllocateStorageCorrectlyIfTheresTwoBuffersSharingStorage", testClearDoesAllocateStorageCorrectlyIfTheresTwoBuffersSharingStorage), ("testClearResetsTheSliceCapacityIfTheresOnlyOneBuffer", testClearResetsTheSliceCapacityIfTheresOnlyOneBuffer), ("testClearResetsTheSliceCapacityIfTheresTwoSlicesSharingStorage", testClearResetsTheSliceCapacityIfTheresTwoSlicesSharingStorage), ("testWeUseFastWriteForContiguousCollections", testWeUseFastWriteForContiguousCollections), ("testUnderestimatingSequenceWorks", testUnderestimatingSequenceWorks), ("testZeroSizeByteBufferResizes", testZeroSizeByteBufferResizes), ("testSpecifyTypesAndEndiannessForIntegerMethods", testSpecifyTypesAndEndiannessForIntegerMethods), ("testByteBufferFitsInACoupleOfEnums", testByteBufferFitsInACoupleOfEnums), ("testLargeSliceBegin16MBIsOkayAndDoesNotCopy", testLargeSliceBegin16MBIsOkayAndDoesNotCopy), ("testLargeSliceBeginMoreThan16MBIsOkay", testLargeSliceBeginMoreThan16MBIsOkay), ("testDiscardReadBytesOnConsumedBuffer", testDiscardReadBytesOnConsumedBuffer), ("testDumpBytesFormat", testDumpBytesFormat), ("testReadableBytesView", testReadableBytesView), ("testReadableBytesViewNoReadableBytes", testReadableBytesViewNoReadableBytes), ("testBytesView", testBytesView), ("testViewsStartIndexIsStable", testViewsStartIndexIsStable), ("testSlicesOfByteBufferViewsAreByteBufferViews", testSlicesOfByteBufferViewsAreByteBufferViews), ("testReadableBufferViewRangeEqualCapacity", testReadableBufferViewRangeEqualCapacity), ("testByteBuffersCanBeInitializedFromByteBufferViews", testByteBuffersCanBeInitializedFromByteBufferViews), ("testReserveCapacityWhenOversize", testReserveCapacityWhenOversize), ("testReserveCapacitySameCapacity", testReserveCapacitySameCapacity), ("testReserveCapacityLargerUniquelyReferencedCallsRealloc", testReserveCapacityLargerUniquelyReferencedCallsRealloc), ("testReserveCapacityLargerMultipleReferenceCallsMalloc", testReserveCapacityLargerMultipleReferenceCallsMalloc), ("testReadWithFunctionsThatReturnNumberOfReadBytesAreDiscardable", testReadWithFunctionsThatReturnNumberOfReadBytesAreDiscardable), ("testWriteAndSetAndGetAndReadEncoding", testWriteAndSetAndGetAndReadEncoding), ("testPossiblyLazilyBridgedString", testPossiblyLazilyBridgedString), ("testWithVeryUnsafeMutableBytesWorksOnEmptyByteBuffer", testWithVeryUnsafeMutableBytesWorksOnEmptyByteBuffer), ("testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorage", testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorage), ("testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorageAndCanBeWritenTo", testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorageAndCanBeWritenTo), ("testWithVeryUnsafeMutableBytesDoesCoW", testWithVeryUnsafeMutableBytesDoesCoW), ("testWithVeryUnsafeMutableBytesDoesCoWonSlices", testWithVeryUnsafeMutableBytesDoesCoWonSlices), ("testGetDispatchDataWorks", testGetDispatchDataWorks), ("testGetDispatchDataReadWrite", testGetDispatchDataReadWrite), ("testVariousContiguousStorageAccessors", testVariousContiguousStorageAccessors), ("testGetBytesThatAreNotReadable", testGetBytesThatAreNotReadable), ("testByteBufferViewAsDataProtocol", testByteBufferViewAsDataProtocol), ("testDataByteTransferStrategyNoCopy", testDataByteTransferStrategyNoCopy), ("testDataByteTransferStrategyCopy", testDataByteTransferStrategyCopy), ("testDataByteTransferStrategyAutomaticMayNotCopy", testDataByteTransferStrategyAutomaticMayNotCopy), ("testDataByteTransferStrategyAutomaticMayCopy", testDataByteTransferStrategyAutomaticMayCopy), ("testViewBytesIsHappyWithNegativeValues", testViewBytesIsHappyWithNegativeValues), ("testByteBufferAllocatorSize1Capacity", testByteBufferAllocatorSize1Capacity), ("testByteBufferModifiedWithoutAllocationLogic", testByteBufferModifiedWithoutAllocationLogic), ("testByteBufferModifyIfUniquelyOwnedMayThrow", testByteBufferModifyIfUniquelyOwnedMayThrow), ] } }
[ -1 ]
60115c735dbb9867bb53b4060fb61db8679c59b6
d93c19cf9ab35516a470c57550480826c821149f
/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsService.swift
3eb4e31eef21e5f48bc71a5de4f843f5e4abc5af
[ "MIT" ]
permissive
Zeeging/unstoppable-wallet-ios
d866d99cd77a8f80c5520aea644e98f4cd3e7a1d
40731384aa0dedb7d01d1cfd1caa69d7b91fe435
refs/heads/master
2023-04-10T14:03:44.704969
2021-04-22T13:31:18
2021-04-22T15:28:22
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,824
swift
import RxSwift import LanguageKit import ThemeKit import CurrencyKit import PinKit import WalletConnect class MainSettingsService { private let backupManager: IBackupManager private let pinKit: IPinKit private let termsManager: ITermsManager private let themeManager: ThemeManager private let systemInfoManager: ISystemInfoManager private let currencyKit: ICurrencyKit private let appConfigProvider: IAppConfigProvider private let walletConnectSessionManager: WalletConnectSessionManager init(backupManager: IBackupManager, pinKit: IPinKit, termsManager: ITermsManager, themeManager: ThemeManager, systemInfoManager: ISystemInfoManager, currencyKit: ICurrencyKit, appConfigProvider: IAppConfigProvider, walletConnectSessionManager: WalletConnectSessionManager) { self.backupManager = backupManager self.pinKit = pinKit self.termsManager = termsManager self.themeManager = themeManager self.systemInfoManager = systemInfoManager self.currencyKit = currencyKit self.appConfigProvider = appConfigProvider self.walletConnectSessionManager = walletConnectSessionManager } } extension MainSettingsService { var companyWebPageLink: String { appConfigProvider.companyWebPageLink } var allBackedUp: Bool { backupManager.allBackedUp } var allBackedUpObservable: Observable<Bool> { backupManager.allBackedUpObservable } var isPinSet: Bool { pinKit.isPinSet } var isPinSetObservable: Observable<Bool> { pinKit.isPinSetObservable } var termsAccepted: Bool { termsManager.termsAccepted } var termsAcceptedObservable: Observable<Bool> { termsManager.termsAcceptedObservable } var walletConnectSessionCount: Int { walletConnectSessionManager.sessions.count } var walletConnectSessionCountObservable: Observable<Int> { walletConnectSessionManager.sessionsObservable.map { $0.count } } var currentLanguageDisplayName: String? { LanguageManager.shared.currentLanguageDisplayName } var baseCurrency: Currency { currencyKit.baseCurrency } var baseCurrencyObservable: Observable<Currency> { currencyKit.baseCurrencyUpdatedObservable } var lightMode: Bool { get { themeManager.lightMode } set { themeManager.lightMode = newValue } } var telegramAccount: String { appConfigProvider.telegramAccount } var twitterAccount: String { appConfigProvider.twitterAccount } var redditAccount: String { appConfigProvider.redditAccount } var appVersion: String { systemInfoManager.appVersion } }
[ -1 ]
0672d54dde2934aa62b6be35c2708a35631bf241
d8498cce9bdf59befba4782c17af164d99da0e3c
/WhatToEat/DiscoveredBarCodeView.swift
57bfd1be1ad9338d68d27ecb20fa5c648471c1d5
[]
no_license
SpencerMKSmith/WhatToEatiOS
73902555c85fefcd32086098001cb44f025c87ed
ae18311c25becc9c21dc241df1f151ef9ff05284
refs/heads/master
2021-01-14T08:27:37.237139
2015-12-01T00:28:23
2015-12-01T00:28:23
null
0
0
null
null
null
null
UTF-8
Swift
false
false
887
swift
// // DiscoveredBarCodeView.swift // BarcodeInventory // // Created by Shrikar Archak on 1/22/15. // Copyright (c) 2015 Shrikar Archak. All rights reserved. // import UIKit class DiscoveredBarCodeView: UIView { var borderLayer : CAShapeLayer? var corners : [CGPoint]? var mLabel : UILabel! override init(frame: CGRect) { super.init(frame: frame) //self.setMyView() } required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder)! } func drawBorder(points : [CGPoint]) { self.corners = points let path = UIBezierPath() print(points) path.moveToPoint(points.first!) for (var i = 1; i < points.count; i++) { path.addLineToPoint(points[i]) } path.addLineToPoint(points.first!) borderLayer?.path = path.CGPath } }
[ -1 ]
e4292e3f28a705ee27bd403a7843d3ce361e9685
773bd64a73c0510e648df44d32bb46d8c59c601e
/Modify/AppDelegate.swift
b1a2efc13ad8d25c58fab2a2396c5f17518ee3ac
[]
no_license
sanchosrancho/blocks-ar-ios
e181376d2d7a8b1dbead7aecdb4f49d81377ae15
e67b5217007b20b311fe1d007b08e2372c5389ee
refs/heads/master
2020-03-22T12:20:42.667603
2017-08-23T09:44:22
2017-08-23T09:44:22
140,034,348
1
1
null
null
null
null
UTF-8
Swift
false
false
2,170
swift
// // AppDelegate.swift // Modify // // Created by Alex Shevlyakov on 22.08.17. // Copyright © 2017 Envent. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 229394, 278548, 229397, 229399, 229402, 352284, 229405, 278556, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 311349, 286774, 229432, 204856, 286776, 319544, 286778, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 327814, 131209, 303241, 417930, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 319694, 286926, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 311601, 295220, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 287238, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 172655, 189040, 352880, 295538, 172656, 172660, 189044, 287349, 189039, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 287386, 221850, 230045, 172702, 287390, 164509, 172705, 287394, 172707, 303780, 303773, 287398, 205479, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 279231, 287427, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 279258, 303835, 189149, 303838, 213724, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 304007, 320391, 304009, 213895, 304011, 230284, 304013, 189325, 213902, 279438, 189329, 295822, 304019, 295825, 189331, 58262, 304023, 279452, 410526, 279461, 279462, 304042, 213931, 304055, 230327, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 66690, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 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, 230679, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 296264, 320840, 238919, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 148843, 230763, 230768, 296305, 312692, 230773, 279929, 181626, 304505, 304506, 181631, 148865, 312711, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 280021, 239064, 329177, 288217, 288218, 280027, 288220, 239070, 288224, 280034, 288226, 280036, 288229, 280038, 288230, 288232, 370146, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 402942, 148990, 206336, 296450, 321022, 230916, 230919, 214535, 304651, 370187, 230923, 304653, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 370279, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 280276, 313044, 321239, 280283, 313052, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 419570, 288499, 321266, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 337732, 280388, 304968, 280393, 280402, 173907, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 288764, 313340, 239612, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 149599, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 215154, 313458, 280691, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 275606, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 280755, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 321740, 313548, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 125171, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 321817, 125209, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 280937, 313705, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 240132, 305668, 330244, 223749, 223752, 150025, 338440, 281095, 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, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 142226, 289687, 224151, 240535, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 420829, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 314773, 306581, 314779, 314785, 282025, 314793, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 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, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 307009, 413506, 241475, 307012, 148946, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 298898, 282514, 44948, 241556, 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, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 176311, 184503, 307385, 307386, 258235, 307388, 176316, 307390, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 295583, 176435, 307508, 315701, 307510, 332086, 307512, 168245, 307515, 282942, 307518, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 315801, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299440, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127431, 315856, 176592, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 291314, 127474, 291317, 127480, 135672, 291323, 233979, 291330, 127494, 283142, 127497, 135689, 233994, 127500, 291341, 233998, 127506, 234003, 234006, 152087, 127511, 283161, 234010, 242202, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 299778, 242436, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 234264, 201496, 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, 201557, 234329, 234333, 308063, 234336, 242530, 234338, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 177011, 234356, 152435, 234358, 234362, 226171, 291711, 234368, 234370, 201603, 291714, 234373, 226182, 234375, 291716, 226185, 308105, 234379, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324504, 291742, 324508, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 234410, 324522, 291754, 226220, 234414, 324527, 291760, 234417, 201650, 324531, 291756, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 226239, 242623, 234434, 324544, 324546, 226245, 234437, 234439, 324548, 234443, 291788, 193486, 234446, 193488, 234449, 275406, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 324599, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 234520, 316439, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 160835, 234563, 308291, 316483, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 226453, 234648, 234647, 234650, 308379, 275608, 234653, 300189, 119967, 283805, 324766, 234657, 324768, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300226, 308418, 234692, 283844, 300229, 308420, 308422, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 300299, 177419, 300301, 349451, 242957, 177424, 275725, 283917, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 136562, 324978, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 284076, 144814, 284084, 144820, 292279, 284087, 144826, 144828, 144830, 144832, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 300507, 103899, 333280, 226787, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 226802, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284191, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 316983, 194103, 284218, 226877, 292414, 284223, 284226, 243268, 284228, 292421, 284231, 226886, 128584, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276052, 276053, 284247, 235097, 243290, 284249, 284251, 317015, 300638, 284253, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 292470, 276086, 284278, 292473, 284283, 276093, 284286, 292479, 276095, 292481, 284290, 325250, 284292, 292485, 276098, 284288, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 317098, 284329, 284331, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 276166, 358089, 284362, 276170, 276175, 284368, 276177, 317138, 284370, 358098, 284372, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 358292, 399252, 284564, 284566, 317332, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 358360, 301017, 292828, 276446, 153568, 276448, 292839, 276455, 350186, 292843, 276460, 292845, 178161, 227314, 276466, 350200, 325624, 276472, 317435, 276476, 276479, 350210, 276482, 178181, 276485, 350218, 276490, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 178224, 276528, 243762, 309298, 325685, 325689, 235579, 276539, 235581, 178238, 325692, 276544, 243779, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 194649, 350302, 194654, 227423, 178273, 227426, 309346, 194660, 350308, 309348, 227430, 292968, 350313, 309354, 276583, 350316, 309350, 309352, 301167, 276590, 350321, 284786, 276595, 301163, 350325, 227440, 350328, 292985, 301178, 350332, 292989, 292993, 301185, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 227571, 309491, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 342434, 317858, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 227810, 276964, 293352, 236013, 293364, 293370, 301562, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 309779, 317971, 277011, 309781, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 334476, 326285, 318094, 318092, 277136, 277139, 227992, 334488, 285340, 318108, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 285474, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 277368, 15224, 416639, 416640, 113538, 310147, 416648, 277385, 39817, 187274, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 276579, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 302075, 293882, 285690, 244731, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 293960, 310344, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 277601, 285792, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 302205, 285821, 392326, 285831, 253064, 302218, 285835, 294026, 162964, 384148, 187542, 302231, 302233, 285849, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 384302, 285999, 277804, 113969, 277807, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 384328, 277832, 277836, 146765, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 310659, 294276, 351619, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 245191, 310727, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 286203, 40443, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 187936, 146977, 286240, 187939, 40484, 294435, 40486, 286246, 294440, 245288, 294439, 294443, 40488, 294445, 40491, 310831, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 147032, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 327333, 229030, 212648, 302764, 278188, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 319390, 40865, 294817, 319394, 294821, 311209, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
6efc90748d28bc8f6a2dd7b28ace9f68622c03e3
91acf383a9e94ad3b27b81a9f5d8e7304700959f
/ChatbotSample/ChatbotSample/ViewController.swift
9378d5c9f8ac71f91fa21c9462bfa1f80ccf5a2d
[]
no_license
vinaypodiliBB/ChatbotSample
1fffc8c99067268d62cf3a937a6dab271e12e654
39d3e2148035f735ac059d8bb4c3e0a8b5171b69
refs/heads/master
2020-04-17T21:36:34.879517
2019-01-24T17:36:29
2019-01-24T17:36:29
166,957,941
0
0
null
null
null
null
UTF-8
Swift
false
false
11,426
swift
// // ViewController.swift // ChatbotSample // // Created by Vinay Podili on 22/01/19. // Copyright © 2019 Brighterbee. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var bottomViewHeightContraint: NSLayoutConstraint! @IBOutlet weak var msgTextView: UITextView! let outCellId = "outCellId" @IBOutlet weak var tblView: UITableView! let incomingCellId = "incomingCellId" var mesgsArray = [["text" : "Hi", "msgType" : "user", "timestamp" : "7:34 pm"], ["text" : "Hello", "msgType" : "agent", "timestamp" : "7:34 pm"], ["text" : "Who are you?", "msgType" : "user", "timestamp" : "7:35 pm"], ["text" : "Who are you?", "msgType" : "agent", "timestamp" : "7:35 pm"]] override func viewDidLoad() { super.viewDidLoad() tblView.estimatedRowHeight = 100 self.msgTextView.delegate = self self.msgTextView.layer.borderWidth = 0.3 self.msgTextView.layer.borderColor = UIColor.lightGray.cgColor self.msgTextView.layer.cornerRadius = 5 self.tblView.tableFooterView = UIView() //tblView.rowHeight = // Do any additional setup after loading the view, typically from a nib. } func heightForView(text:String, font:UIFont, width:CGFloat) -> CGFloat{ let label: UILabel = UILabel(frame: CGRect(x: 0, y: 0, width: width, height: CGFloat.greatestFiniteMagnitude)) label.numberOfLines = 0 label.lineBreakMode = NSLineBreakMode.byWordWrapping label.font = font label.text = text label.sizeToFit() return label.frame.height } @IBAction func sendAction(_ sender: Any) { if msgTextView.text != "" { let timeStamp = Date().currentLocaleDate let dict = ["text" : self.msgTextView.text ?? "", "msgType" : "user", "timestamp" : timeStamp] self.mesgsArray.append(dict) DispatchQueue.main.async { self.tblView.reloadData() self.msgTextView.text = "" self.bottomViewHeightContraint.constant = 50 } } } } extension ViewController: UITextViewDelegate { func textViewDidChange(_ textView: UITextView) { // Your code here let height = heightForView(text: textView.text, font: UIFont(name: "Helvetica", size: 16)!, width: textView.bounds.width) if height < 140 { bottomViewHeightContraint.constant = ((textView.text) == "" || (height < 50)) ? 50 : height } } } extension ViewController : UITableViewDataSource, UITableViewDelegate { func numberOfSections(in tableView: UITableView) -> Int { return mesgsArray.count } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 1 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let obj = mesgsArray[indexPath.section] let mesgType = obj["msgType"] if mesgType == "user" { let cell = tableView.dequeueReusableCell(withIdentifier: incomingCellId, for: indexPath) as! IncomingTVCell cell.userTextLabel.text = obj["text"] ?? "" cell.userIconView.layer.cornerRadius = 25 cell.userIconView.image = UIImage(named: "avatar_m1") cell.timeLabel.text = obj["timestamp"] ?? "" cell.selectionStyle = .none return cell//self.showIncomingMessage(text: obj["text"] ?? "", cell: cell) }else { let cell = tableView.dequeueReusableCell(withIdentifier: outCellId, for: indexPath) as! OutgoingTVCell cell.userTextLabel.text = obj["text"] ?? "" //cell.userTextLabel.text = obj["text"] ?? "" cell.userIconView.layer.cornerRadius = 25 cell.userIconView.image = UIImage(named: "agent") cell.selectionStyle = .none return cell//self.showOutgoingMessage(text: obj["text"] ?? "", cell: cell) } } } extension ViewController { func showOutgoingMessage(text: String, cell: OutgoingTVCell) -> OutgoingTVCell { let label = UILabel() label.numberOfLines = 0 label.font = UIFont.systemFont(ofSize: 18) label.textColor = .white label.text = text let constraintRect = CGSize(width: 0.66 * view.frame.width, height: .greatestFiniteMagnitude) let boundingBox = text.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [.font: label.font], context: nil) label.frame.size = CGSize(width: ceil(boundingBox.width), height: ceil(boundingBox.height)) let bubbleSize = CGSize(width: label.frame.width + 28, height: label.frame.height + 20) let width = bubbleSize.width let height = bubbleSize.height let bezierPath = UIBezierPath() bezierPath.move(to: CGPoint(x: width - 22, y: height)) bezierPath.addLine(to: CGPoint(x: 17, y: height)) bezierPath.addCurve(to: CGPoint(x: 0, y: height - 17), controlPoint1: CGPoint(x: 7.61, y: height), controlPoint2: CGPoint(x: 0, y: height - 7.61)) bezierPath.addLine(to: CGPoint(x: 0, y: 17)) bezierPath.addCurve(to: CGPoint(x: 17, y: 0), controlPoint1: CGPoint(x: 0, y: 7.61), controlPoint2: CGPoint(x: 7.61, y: 0)) bezierPath.addLine(to: CGPoint(x: width - 21, y: 0)) bezierPath.addCurve(to: CGPoint(x: width - 4, y: 17), controlPoint1: CGPoint(x: width - 11.61, y: 0), controlPoint2: CGPoint(x: width - 4, y: 7.61)) bezierPath.addLine(to: CGPoint(x: width - 4, y: height - 11)) bezierPath.addCurve(to: CGPoint(x: width, y: height), controlPoint1: CGPoint(x: width - 4, y: height - 1), controlPoint2: CGPoint(x: width, y: height)) bezierPath.addLine(to: CGPoint(x: width + 0.05, y: height - 0.01)) bezierPath.addCurve(to: CGPoint(x: width - 11.04, y: height - 4.04), controlPoint1: CGPoint(x: width - 4.07, y: height + 0.43), controlPoint2: CGPoint(x: width - 8.16, y: height - 1.06)) bezierPath.addCurve(to: CGPoint(x: width - 22, y: height), controlPoint1: CGPoint(x: width - 16, y: height), controlPoint2: CGPoint(x: width - 19, y: height)) bezierPath.close() let outgoingMessageLayer = CAShapeLayer() outgoingMessageLayer.path = bezierPath.cgPath outgoingMessageLayer.frame = CGRect(x: 20, y: view.frame.height/2 - height/2, width: width, height: height) outgoingMessageLayer.fillColor = UIColor(red: 0.09, green: 0.54, blue: 1, alpha: 1).cgColor cell.outgoingCellView.layer.addSublayer(outgoingMessageLayer) label.center = view.center cell.addSubview(label) return cell } func showIncomingMessage(text: String, cell: IncomingTVCell) -> IncomingTVCell { let label = UILabel() label.numberOfLines = 0 label.font = UIFont.systemFont(ofSize: 18) label.textColor = .white label.text = text let constraintRect = CGSize(width: 0.66 * view.frame.width, height: .greatestFiniteMagnitude) let boundingBox = text.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [.font: label.font], context: nil) label.frame.size = CGSize(width: ceil(boundingBox.width), height: ceil(boundingBox.height)) let bubbleSize = CGSize(width: label.frame.width + 28, height: label.frame.height + 20) let width = bubbleSize.width let height = bubbleSize.height let bezierPath = UIBezierPath() bezierPath.move(to: CGPoint(x: width - 22, y: height)) bezierPath.addLine(to: CGPoint(x: 17, y: height)) bezierPath.addCurve(to: CGPoint(x: 0, y: height - 17), controlPoint1: CGPoint(x: 7.61, y: height), controlPoint2: CGPoint(x: 0, y: height - 7.61)) bezierPath.addLine(to: CGPoint(x: 0, y: 17)) bezierPath.addCurve(to: CGPoint(x: 17, y: 0), controlPoint1: CGPoint(x: 0, y: 7.61), controlPoint2: CGPoint(x: 7.61, y: 0)) bezierPath.addLine(to: CGPoint(x: width - 21, y: 0)) bezierPath.addCurve(to: CGPoint(x: width - 4, y: 17), controlPoint1: CGPoint(x: width - 11.61, y: 0), controlPoint2: CGPoint(x: width - 4, y: 7.61)) bezierPath.addLine(to: CGPoint(x: width - 4, y: height - 11)) bezierPath.addCurve(to: CGPoint(x: width, y: height), controlPoint1: CGPoint(x: width - 4, y: height - 1), controlPoint2: CGPoint(x: width, y: height)) bezierPath.addLine(to: CGPoint(x: width + 0.05, y: height - 0.01)) bezierPath.addCurve(to: CGPoint(x: width - 11.04, y: height - 4.04), controlPoint1: CGPoint(x: width - 4.07, y: height + 0.43), controlPoint2: CGPoint(x: width - 8.16, y: height - 1.06)) bezierPath.addCurve(to: CGPoint(x: width - 22, y: height), controlPoint1: CGPoint(x: width - 16, y: height), controlPoint2: CGPoint(x: width - 19, y: height)) bezierPath.close() let incomingMessageLayer = CAShapeLayer() incomingMessageLayer.path = bezierPath.cgPath incomingMessageLayer.frame = CGRect(x: width - 20, y: view.frame.height/2 - height/2, width: width, height: height) incomingMessageLayer.fillColor = UIColor(red: 0.09, green: 0.54, blue: 1, alpha: 1).cgColor cell.contentView.layer.addSublayer(incomingMessageLayer) label.center = view.center cell.addSubview(label) return cell } } class IncomingTVCell: UITableViewCell { @IBOutlet weak var userTextLabel: UILabel! @IBOutlet weak var userIconView: UIImageView! @IBOutlet weak var timeLabel: UILabel! @IBOutlet weak var incomingCellView: UIView! override func awakeFromNib() { super.awakeFromNib() incomingCellView.layer.borderWidth = 0.5 incomingCellView.layer.borderColor = UIColor.blue.cgColor } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) } } class OutgoingTVCell: UITableViewCell { @IBOutlet weak var outgoingCellView: UIView! @IBOutlet weak var userTextLabel: UILabel! @IBOutlet weak var userIconView: UIImageView! @IBOutlet weak var timeLabel: UILabel! override func awakeFromNib() { super.awakeFromNib() outgoingCellView.layer.borderWidth = 0.5 outgoingCellView.layer.borderColor = UIColor.orange.cgColor } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) } }
[ -1 ]
04345bd4f67d6d5bb5d8543dd9374e287ca7f6aa
044a69650162bb48b5eef25a113ce404377b7477
/ConnectmedicaChallenge/Application/FormField/DateFormFieldViewModel.swift
4f93eb098002a5e057298d3dd79e31db6078af05
[]
no_license
konradzdunczyk/Challenge-3
3c635d05def5a988e1d1e2e31dfb22b8b74c6dd0
d21c1ec8a6512119a0f923394cc709039a5b0d17
refs/heads/master
2021-06-11T15:50:50.299408
2017-01-19T14:14:20
2017-01-19T14:14:20
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,397
swift
// // DateFormFieldViewModel.swift // ConnectmedicaChallenge // // Created by Konrad Zdunczyk on 19/01/17. // Copyright © 2017 Konrad Zdunczyk. All rights reserved. // import Foundation import RxSwift import RxCocoa class DateFormFieldViewModel: ValueFormFieldViewModel, ValueFormField { let value: Variable<Date?> let modelKey: String private(set) var rx_formattedDate: Driver<String?>! private let dateFormatter: DateFormatter var modelValue: Any { get { return value.value ?? Date(timeIntervalSince1970: 0) } set { guard let newValue = newValue as? Date else { return } self.value.value = newValue } } init(name: String, placeholder: String, date: Date?, dateFormatter: DateFormatter, fullWidthField: Bool, modelKey: String) { self.value = Variable<Date?>(date) self.dateFormatter = dateFormatter self.modelKey = modelKey super.init(name: name, placeholder: placeholder, type: .date, fullWidthField: fullWidthField) self.rx_formattedDate = self.value .asObservable() .map({ [weak self] (date) -> String? in guard let weakSelf = self, let date = date else { return nil } return weakSelf.dateFormatter.string(from: date) }) .asDriver(onErrorJustReturn: nil) } }
[ -1 ]
350c0960513adf3ecc899b04bb3a734fca1ebbce
54b32d8c7fb997131e30a36dc99541f9bdfe1e5f
/Fooder/Recipe.swift
f360f8ac25ad1ecf6aa5250bded02860b01aa252
[]
no_license
chetan3460/Fooder
733e69bec590236422045995bb35ed1f66255c92
ab617ed45d9f5bc4e3390990224ffd549b5882ff
refs/heads/master
2020-03-22T20:12:49.873241
2017-02-21T19:44:30
2017-02-21T19:44:30
140,581,775
1
0
null
2018-07-11T13:49:59
2018-07-11T13:49:59
null
UTF-8
Swift
false
false
1,927
swift
// // Recipe.swift // Fooder // // Created by Vladimir on 28.12.16. // Copyright © 2016 Vladimir Ageev. All rights reserved. // import SwiftyJSON class Recipe{ let id: Int let vegeterian: Bool let vegan: Bool let title: String let imageURL: String var ingridients :[Ingridient] let instructions: String? let readyInMinutes: Double let servings: Int var extendedInstructions = [String]() init(data: JSON){ var gotIngridients = [Ingridient]() for ingridient in data["extendedIngredients"].arrayValue{ gotIngridients.append(Ingridient(data: ingridient)) } if let goodInstructions = data["analyzedInstructions"].array{ if goodInstructions.count > 0{ for step in goodInstructions[0]["steps"].arrayValue{ let stepDescription = step["step"].stringValue as NSString if stepDescription.length > 1{ self.extendedInstructions.append(step["step"].stringValue) } } } } self.id = data["id"].intValue self.vegeterian = data["vegeterian"].boolValue self.vegan = data["vegan"].boolValue self.title = data["title"].stringValue self.imageURL = data["image"].stringValue self.ingridients = gotIngridients self.instructions = data["instructions"].stringValue self.readyInMinutes = data["readyInMinutes"].doubleValue self.servings = data["servings"].intValue } init(id: Int, title: String, imageURL: String){ self.id = id self.vegeterian = false self.vegan = false self.title = title self.imageURL = imageURL self.ingridients = [Ingridient]() self.instructions = "" self.readyInMinutes = 0 self.servings = 0 } }
[ -1 ]
f15ea548fcf4a8f3c68a85792ca4ae3630c1efc7
f1edf632c34337504c9fd63b7b450e6e7eb1ae81
/test1/question/Fuseikai.swift
5a80973df5d25f127875489d8f0360e8620924c3
[]
no_license
ie-ModelingAndDesign/2014-J
4a34251c7d3378f2ec0f8890d726077daf9a42da
64dc7b46addf127be35f9c25b693099bc246578d
refs/heads/master
2016-09-05T19:44:06.718180
2015-02-23T02:13:29
2015-02-23T02:13:29
25,949,734
0
0
null
null
null
null
UTF-8
Swift
false
false
15,413
swift
// // Fuseikai.swift // test1 // // Created by Yusuke Onna on 2015/02/20. // Copyright (c) 2015年 x. All rights reserved. // import Foundation import UIKit class Fuseikai1: UIViewController { let myButtonX: UIButton = UIButton() //let myButton0: UIButton = UIButton() //let myButton1: UIButton = UIButton() //let myButton2: UIButton = UIButton() //let myButton3: UIButton = UIButton() let myButton4: UIButton = UIButton() //let myWindow = UIWindow() //let myWindowButton = UIButton() override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor() // 背景に画像を設定する. let myImage = UIImage(named: "8.png")! var myImageView = UIImageView() myImageView.image = myImage myImageView.frame = CGRectMake(-130, -150, myImage.size.width, myImage.size.height) self.view.addSubview(myImageView) // Labelを作成 let myLabel: UILabel = UILabel(frame: CGRectMake(0,0,200,50)) // 背景をオレンジ色にする myLabel.backgroundColor = UIColor.redColor() // 枠を丸くする myLabel.layer.masksToBounds = true // コーナーの半径 myLabel.layer.cornerRadius = 20.0 // Labelに文字を代入 myLabel.text = "正解 : A" // 文字の色を白にする myLabel.textColor = UIColor.whiteColor() // 文字の影の色をグレーにする myLabel.shadowColor = UIColor.grayColor() // Textを中央寄せにする myLabel.textAlignment = NSTextAlignment.Center // 配置する座標を設定する myLabel.layer.position = CGPoint(x: 500,y: 200) // Viewの背景色を青にする //self.view.backgroundColor = UIColor.cyanColor() // ViewにLabelを追加 self.view.addSubview(myLabel) // サイズを設定する. myButtonX.frame = CGRectMake(0,0,400,40) //myButton0.frame = CGRectMake(0,0,100,40) //myButton1.frame = CGRectMake(0,0,100,40) //myButton2.frame = CGRectMake(0,0,100,40) //myButton3.frame = CGRectMake(0,0,100,40) myButton4.frame = CGRectMake(0,0,100,40) // 背景色を設定する. myButtonX.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton0.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton1.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton2.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton3.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) myButton4.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) // 枠を丸くする. myButtonX.layer.masksToBounds = true //myButton0.layer.masksToBounds = true //myButton1.layer.masksToBounds = true //myButton2.layer.masksToBounds = true //myButton3.layer.masksToBounds = true myButton4.layer.masksToBounds = true // タイトルを設定する(通常時). myButtonX.setTitle("不正解!", forState: UIControlState.Normal) myButtonX.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal) //myButton0.setTitle("不正解", forState: UIControlState.Normal) //myButton0.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) //myButton1.setTitle("正解", forState: UIControlState.Normal) //myButton1.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) //myButton2.setTitle("不正解", forState: UIControlState.Normal) //myButton2.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) //myButton3.setTitle("不正解", forState: UIControlState.Normal) //myButton3.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) myButton4.setTitle("NEXT", forState: UIControlState.Normal) myButton4.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal) // タイトルを設定する(ボタンがハイライトされた時). //myButton0.setTitle("不正解", forState: UIControlState.Highlighted) //myButton0.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) //myButton1.setTitle("正解", forState: UIControlState.Highlighted) //myButton1.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) //myButton2.setTitle("不正解", forState: UIControlState.Highlighted) //myButton2.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) //myButton3.setTitle("不正解", forState: UIControlState.Highlighted) //myButton3.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) myButton4.setTitle("NEXT", forState: UIControlState.Highlighted) myButton4.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Highlighted) // コーナーの半径を設定する. myButtonX.layer.cornerRadius = 20.0 //myButton0.layer.cornerRadius = 20.0 //myButton1.layer.cornerRadius = 20.0 //myButton2.layer.cornerRadius = 20.0 //myButton3.layer.cornerRadius = 20.0 myButton4.layer.cornerRadius = 20.0 // ボタンの位置を指定する. myButtonX.layer.position = CGPoint(x: 200, y:30) //myButton0.layer.position = CGPoint(x: 100, y:300) //myButton1.layer.position = CGPoint(x: 250, y:300) //myButton2.layer.position = CGPoint(x: 400, y:300) //myButton3.layer.position = CGPoint(x: 550, y:300) myButton4.layer.position = CGPoint(x: self.view.frame.width/2+280, y:350) // タグを設定する. //myButton0.tag = 0 //myButton1.tag = 1 //myButton2.tag = 2 //myButton3.tag = 3 myButton4.tag = 4 // イベントを追加する. //myButton0.addTarget(self, action: "onClickMyButton:", forControlEvents: .TouchUpInside) myButton4.addTarget(self, action: "onClickNextButton:", forControlEvents: .TouchUpInside) // ボタンをViewに追加する. self.view.addSubview(myButtonX) //self.view.addSubview(myButton0) //self.view.addSubview(myButton1) //self.view.addSubview(myButton2) //self.view.addSubview(myButton3) self.view.addSubview(myButton4) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } /* ボタンイベント. */ func onClickNextButton(sender: UIButton){ println("onClickNextButton:") println("sender.currentTitile: \(sender.currentTitle)") println("sender.tag:\(sender.tag)") // 遷移するViewを定義する. let myNController: UIViewController = RandomEventNight1() self.presentViewController(myNController, animated: false, completion: nil) } } class Fuseikai2: UIViewController { let myButtonX: UIButton = UIButton() //let myButton0: UIButton = UIButton() //let myButton1: UIButton = UIButton() //let myButton2: UIButton = UIButton() //let myButton3: UIButton = UIButton() let myButton4: UIButton = UIButton() //let myWindow = UIWindow() //let myWindowButton = UIButton() override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor() // 背景に画像を設定する. let myImage = UIImage(named: "9.png")! var myImageView = UIImageView() myImageView.image = myImage myImageView.frame = CGRectMake(-130, -150, myImage.size.width, myImage.size.height) self.view.addSubview(myImageView) // Labelを作成 let myLabel: UILabel = UILabel(frame: CGRectMake(0,0,200,50)) // 背景をオレンジ色にする myLabel.backgroundColor = UIColor.redColor() // 枠を丸くする myLabel.layer.masksToBounds = true // コーナーの半径 myLabel.layer.cornerRadius = 20.0 // Labelに文字を代入 myLabel.text = "正解 : A" // 文字の色を白にする myLabel.textColor = UIColor.whiteColor() // 文字の影の色をグレーにする myLabel.shadowColor = UIColor.grayColor() // Textを中央寄せにする myLabel.textAlignment = NSTextAlignment.Center // 配置する座標を設定する myLabel.layer.position = CGPoint(x: 500,y: 200) // Viewの背景色を青にする //self.view.backgroundColor = UIColor.cyanColor() // ViewにLabelを追加 self.view.addSubview(myLabel) // サイズを設定する. myButtonX.frame = CGRectMake(0,0,400,40) //myButton0.frame = CGRectMake(0,0,100,40) //myButton1.frame = CGRectMake(0,0,100,40) //myButton2.frame = CGRectMake(0,0,100,40) //myButton3.frame = CGRectMake(0,0,100,40) myButton4.frame = CGRectMake(0,0,100,40) // 背景色を設定する. myButtonX.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton0.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton1.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton2.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) //myButton3.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) myButton4.backgroundColor = UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 0.75) // 枠を丸くする. myButtonX.layer.masksToBounds = true //myButton0.layer.masksToBounds = true //myButton1.layer.masksToBounds = true //myButton2.layer.masksToBounds = true //myButton3.layer.masksToBounds = true myButton4.layer.masksToBounds = true // タイトルを設定する(通常時). myButtonX.setTitle("不正解!", forState: UIControlState.Normal) myButtonX.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal) //myButton0.setTitle("不正解", forState: UIControlState.Normal) //myButton0.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) //myButton1.setTitle("正解", forState: UIControlState.Normal) //myButton1.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) //myButton2.setTitle("不正解", forState: UIControlState.Normal) //myButton2.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) //myButton3.setTitle("不正解", forState: UIControlState.Normal) //myButton3.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal) myButton4.setTitle("NEXT", forState: UIControlState.Normal) myButton4.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal) // タイトルを設定する(ボタンがハイライトされた時). //myButton0.setTitle("不正解", forState: UIControlState.Highlighted) //myButton0.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) //myButton1.setTitle("正解", forState: UIControlState.Highlighted) //myButton1.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) //myButton2.setTitle("不正解", forState: UIControlState.Highlighted) //myButton2.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) //myButton3.setTitle("不正解", forState: UIControlState.Highlighted) //myButton3.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted) myButton4.setTitle("NEXT", forState: UIControlState.Highlighted) myButton4.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Highlighted) // コーナーの半径を設定する. myButtonX.layer.cornerRadius = 20.0 //myButton0.layer.cornerRadius = 20.0 //myButton1.layer.cornerRadius = 20.0 //myButton2.layer.cornerRadius = 20.0 //myButton3.layer.cornerRadius = 20.0 myButton4.layer.cornerRadius = 20.0 // ボタンの位置を指定する. myButtonX.layer.position = CGPoint(x: 200, y:30) //myButton0.layer.position = CGPoint(x: 100, y:300) //myButton1.layer.position = CGPoint(x: 250, y:300) //myButton2.layer.position = CGPoint(x: 400, y:300) //myButton3.layer.position = CGPoint(x: 550, y:300) myButton4.layer.position = CGPoint(x: self.view.frame.width/2+280, y:350) // タグを設定する. //myButton0.tag = 0 //myButton1.tag = 1 //myButton2.tag = 2 //myButton3.tag = 3 myButton4.tag = 4 // イベントを追加する. //myButton0.addTarget(self, action: "onClickMyButton:", forControlEvents: .TouchUpInside) myButton4.addTarget(self, action: "onClickNextButton:", forControlEvents: .TouchUpInside) // ボタンをViewに追加する. self.view.addSubview(myButtonX) //self.view.addSubview(myButton0) //self.view.addSubview(myButton1) //self.view.addSubview(myButton2) //self.view.addSubview(myButton3) self.view.addSubview(myButton4) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } /* ボタンイベント. */ func onClickNextButton(sender: UIButton){ println("onClickNextButton:") println("sender.currentTitile: \(sender.currentTitle)") println("sender.tag:\(sender.tag)") // 遷移するViewを定義する. let myNController: UIViewController = RandomEventNight2() self.presentViewController(myNController, animated: false, completion: nil) } }
[ -1 ]
f21f2c09c10d93064daba701079250a377e221a8
0096fcdd9af6f10321f6a0c1e71b24f91a61c8c6
/Yatzee/AppDelegate.swift
55b788aced495e7adeed5ef1627e44f760e80d60
[]
no_license
KristinaSkovsgaard/Yatzee
fb21ea684fc873cf72b281555914780b64504734
c31e1b9a5d16d51ab143b7e8a9489262c9249bf7
refs/heads/main
2023-04-01T16:10:20.927611
2021-04-15T14:11:36
2021-04-15T14:11:36
336,279,392
0
0
null
null
null
null
UTF-8
Swift
false
false
3,644
swift
// // AppDelegate.swift // Yatzee // // Created by Kristina Skovsgaard on 05/02/2021. // // import UIKit import CoreData @main 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. } // MARK: - Core Data stack lazy var persistentContainer: NSPersistentContainer = { /* The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail. */ let container = NSPersistentContainer(name: "Yatzee") container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. /* Typical reasons for an error here include: * The parent directory does not exist, cannot be created, or disallows writing. * The persistent store is not accessible, due to permissions or data protection when the device is locked. * The device is out of space. * The store could not be migrated to the current model version. Check the error message to determine what the actual problem was. */ fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }() // MARK: - Core Data Saving support func saveContext () { let context = persistentContainer.viewContext if context.hasChanges { do { try context.save() } catch { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. let nserror = error as NSError fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } } }
[ 199680, 379906, 253443, 418820, 328199, 384007, 249351, 377866, 372747, 326668, 379914, 199180, 329233, 349202, 186387, 350738, 262677, 330774, 324121, 245274, 377371, 345630, 340511, 384032, 362529, 349738, 394795, 404523, 245293, 262701, 349744, 361524, 337975, 343609, 375867, 333373, 418366, 152127, 339009, 413250, 214087, 352840, 337994, 377930, 370253, 330319, 200784, 173647, 436306, 333395, 244308, 374358, 329815, 254042, 402522, 326239, 322658, 340579, 244329, 333422, 349295, 204400, 173169, 339571, 330868, 344693, 268921, 343167, 192639, 344707, 330884, 336516, 266374, 385670, 346768, 268434, 409236, 333988, 336548, 356520, 377001, 379048, 361644, 402614, 361655, 339132, 325308, 343231, 403138, 337092, 244933, 322758, 337606, 367816, 257738, 342736, 257751, 385242, 366300, 350433, 345826, 328931, 395495, 363755, 343276, 346348, 338158, 325358, 212722, 251122, 350453, 338679, 393465, 351482, 264961, 115972, 268552, 346890, 362251, 328460, 336139, 333074, 356628, 257814, 333592, 397084, 342813, 257824, 362272, 377120, 334631, 336680, 389416, 384298, 254252, 204589, 271150, 366383, 328497, 257842, 339768, 326969, 257852, 384828, 204606, 386365, 375615, 339792, 358737, 389970, 361299, 155476, 257880, 330584, 361305, 362843, 429406, 374112, 353633, 439137, 355184, 361333, 332156, 337277, 260992, 245120, 380802, 389506, 264583, 337290, 155020, 348565, 250262, 337813, 155044, 333221, 373671, 333736, 252845, 356781, 268210, 370610, 210356, 342452, 370102, 338362, 327612, 358335, 380352, 201157, 187334, 333766, 336325, 339400, 349128, 358347, 393670, 347081, 272848, 379856, 155603, 219091, 399317, 249302, 379863, 372697, 155102, 182754, 360429, 338927, 330224, 379895, 201723, 257020, 254461 ]
00688a7cd86b969264baf4f1fbafe5439eed539d
b1ea7c85fcd4a310b778fd02aa22d8896ba135d8
/bachelor/Models/News/NewsArticle.swift
cc6669933b2ae6f95d60f7ebf3c92a235bc11cc8
[]
no_license
PhilippeWeidmann/pilights-ios
065b0fb4167c22f7fc829c45ba9f9246adfb7cd3
867943527add87bb291f5040fb888987ddc00be8
refs/heads/master
2022-12-08T09:34:28.343778
2020-09-01T19:09:22
2020-09-01T19:09:22
null
0
0
null
null
null
null
UTF-8
Swift
false
false
324
swift
// // NewsArticle.swift // bachelor // // Created by Philippe Weidmann on 16.08.20. // Copyright © 2020 Philippe Weidmann. All rights reserved. // import Foundation class NewsArticle: Codable { let author: String? let title: String let description: String let url: String let urlToImage: String }
[ -1 ]
bd9f286ea37c70f008aff3953a4d460b3befc8f0
e5b667381f003d5c5bb864892d9f85affecb1f93
/SevenPeaksCarFeedTest/SevenPeaksCarFeedTest/Modules/View/ViewController.swift
6390240198f6e4971ac602efab8f16eddc1785c4
[]
no_license
RONAKSANKHALA/SevenPeaks
70b7509dccb96af8628e3afa640f1465384c92a7
acb07ed65f1dbfd4c33e176f08ac2cd1571e4503
refs/heads/main
2023-07-04T13:20:04.963254
2021-08-02T10:31:16
2021-08-02T10:31:16
391,023,078
0
0
null
null
null
null
UTF-8
Swift
false
false
1,894
swift
// // ViewController.swift // SevenPeaksCarFeedTest // // Created by Ronak Sankhala on 30/07/21. // import UIKit import RxSwift import RxCocoa class ViewController: UIViewController { @IBOutlet var tblCarArticles: UITableView! @IBOutlet var viewNoDataFound: UIView! private var bag = DisposeBag() private var carsViewModel = CarsViewModel() override func viewDidLoad() { super.viewDidLoad() //Check Article Data is available on Local databse and API or not if carsViewModel.isArticleAvailabe { self.viewNoDataFound.isHidden = true self.loadArticleDataOnTableView() } else { self.viewNoDataFound.isHidden = false } } @IBAction func onRetryButtonClicked(_ sender: Any) { //Retry to call API Again and try to load New Data if internet is available otherwise data will be load from Local Data Base self.loadArticleDataOnTableView() } //Load Data from API and Bind Data on TableView private func loadArticleDataOnTableView() { tblCarArticles.rx.setDelegate(self).disposed(by: bag) carsViewModel.fetchArticlesList() self.bindTableViewforArticles() } } extension ViewController: UITableViewDelegate { //Bind Tableview to Display Data private func bindTableViewforArticles() { //Reusable Tableview cell carsViewModel.articles.bind(to: tblCarArticles.rx.items(cellIdentifier: "CarsFeedTableViewCell", cellType: CarsFeedTableViewCell.self)) {(row, item, cell) in cell.articles = item }.disposed(by: bag) //Select Item Information on tap Tableview cell or model selection tblCarArticles.rx.modelSelected(Article.self).subscribe(onNext: { item in print("SelectedItem: \(item.ingress ?? "")") }).disposed(by: bag) } }
[ -1 ]
eaea56ae8a58d45519925ca6895dbaf8ef4bb34e
eaee4f39c58c5074572e6bd7fb40eddf203ddcf9
/Glance/Controller/AddTaskViewController.swift
872ae58c07c47430948f74895b153af7eb0b1f92
[]
no_license
woodward4422/Glance
2b360dc6c83996f12c6a2228f0de026aa1de3627
0e24c55dfd3aae61a63948c1d8be40ecc209ba48
refs/heads/master
2020-04-04T14:59:51.549341
2018-12-13T00:19:33
2018-12-13T00:19:33
156,021,061
1
1
null
null
null
null
UTF-8
Swift
false
false
1,949
swift
// // AddTaskViewController.swift // Glance // // Created by Jacob Haff on 11/5/18. // Copyright © 2018 Noah Woodward. All rights reserved. // import UIKit class AddTaskViewController: UIViewController, UITextFieldDelegate { @IBOutlet weak var taskTitleInput: UITextField! @IBOutlet weak var durationLabel: UILabel! @IBOutlet weak var durationSlider: UISlider! @IBOutlet weak var estimatedTimeStaticLabel: UILabel! @IBOutlet weak var dueDatePicker: UIDatePicker! var actualHours: Float = 0.0 override func viewDidLoad() { super.viewDidLoad() taskTitleInput.delegate = self // Do any additional setup after loading the view. } override func viewWillAppear(_ animated: Bool) { let startDate = Date() let endDate = Date(timeInterval: 7*86400, since: startDate) dueDatePicker.minimumDate = startDate dueDatePicker.maximumDate = endDate } @IBAction func createTaskButton(_ sender: Any) { guard let taskTitle = taskTitleInput.text else { fatalError("User did not input task title")} CoreDataHelper.createNewTask(title: taskTitle, duration: actualHours, dueDate: dueDatePicker.date, colorIndex: UIColor.getRandomColorIndex()) navigationController?.popViewController(animated: true) dismiss(animated: true, completion: nil) } @IBAction func durationValueChanged(_ sender: UISlider) { let currentValue = sender.value let maxHours = 10.0 actualHours = Float(currentValue * Float(maxHours)).rounded(toPlaces: 1) durationLabel.text = String(actualHours) + " hrs" } } extension AddTaskViewController { func textFieldShouldReturn(_ textField: UITextField) -> Bool { textField.resignFirstResponder() return true } }
[ -1 ]
cee452a53b4b3079cf3a097f50d192bb5f3d2702
eb3170779585f95934f524789500a57c0d63a40b
/SeizeTheMuse/Song.swift
b9b342f548745f8cb8caf84758303f82cc8cac44
[]
no_license
Slade0290/SeizeTheMuse
12e2b7b4dcbd47c608172e774074620ceefeda5b
953be9fda3c6fa49255727b9e1a981f6a19eb16d
refs/heads/master
2020-04-07T08:14:42.401881
2018-12-18T07:57:24
2018-12-18T07:57:24
158,206,067
0
1
null
null
null
null
UTF-8
Swift
false
false
418
swift
// // Song.swift // SeizeTheMuse // // Created by LY David on 20/11/2018. // Copyright © 2018 LY David. All rights reserved. // import Foundation struct Song { let title : String let author : String let listOfNotes : [Note] init(_ title : String, _ author : String, _ list : [Note]){ self.title = title self.author = author self.listOfNotes = list } }
[ -1 ]
35a8f2753bcbc31307149902795b9ea1acdbc9b6
a0f209f968335c2411c861e0fbde0ad1233cd218
/AugustaFramework/AUWebService.swift
dee265e6c176e3006ea9b14a7fb85793b688de5c
[]
no_license
augustasoftware/iOS_Framework
cd8e453a422da64ed79b038e94e76392626ea8fb
ca82ae52d93bfeb250fdcb59331592878f2af6ec
refs/heads/master
2021-06-21T01:26:53.782231
2019-07-31T05:42:39
2019-07-31T05:42:39
141,288,856
0
0
null
null
null
null
UTF-8
Swift
false
false
9,485
swift
// // AUWebService.swift // AugustaFramework // // Created by augusta on 17/07/18. // Copyright © 2018 augusta. All rights reserved. // import Foundation import Alamofire import SwiftyJSON public typealias kModelSuccessBlock = (_ success : Bool, _ message : String, _ responseObject:AnyObject) ->() public typealias kModelErrorBlock = (_ errorMesssage: String) -> () public enum AUWebServiceType { case put case get case delete case post } public protocol AUWebServiceDelegate{ func webServiceGotExpiryMessage(errorMessage: String) } public class AUWebService{ var delegate:AUWebServiceDelegate? var sessionExpiryMessage: String = "" var sessionManager: SessionManager! /// initing the AUWebService class /// /// - Parameters: /// - delegate: mandatory delegate to be assigned /// - sessionExpiryMessage: session expiry message/code which server is sending. Leave it empty if there is no session expiry to be handled public init(delegate: AUWebServiceDelegate, sessionExpiryMessage: String = ""){ self.delegate = delegate self.sessionExpiryMessage = sessionExpiryMessage } /// Call this method to get data/ error message in web service. Need not print anything, method prints all params in debug mode. Failure block will be called if Rechability fails /// /// - Parameters: /// - url: String Url. In case of get|put|delete full url with params /// - type: AUWebServiceType(get|post|delete|put) /// - userData: in case of post send [String:any], others nil should be suffice /// - headers: accessToken - default header details and other headers /// - successBlock: success block /// - failureBlock: failure block /// - Returns: Success/Failure block. If session expiry message is set, and if service get the message, delegate will be called to handle the session expiry public func callServiceAndGetData(url: String, type: AUWebServiceType, userData: [String: Any]?, headers: [String:String]?, isCacheEnable:Bool? = false, successBlock: @escaping kModelSuccessBlock, failureBlock : @escaping kModelErrorBlock){ //**************************************************** How to use? Start ****************************************************// // func getDefaultHeaderDetails() -> [String:String] // { // //AUTHORIZATION = Session.sharedInstance.getAccessToken() // let headers = ["Authorization": ""] // return headers // } // // func callWebServiceAndTest(){ // // let data = NSMutableDictionary() // data.setObject(0, forKey: "id" as NSCopying) // data.setObject(0 , forKey: "id" as NSCopying) // // let service: AUWebService = AUWebService.init(delegate: self, sessionExpiryMessage: "") // provide session expiry message or code to handle session expiry // // service.callServiceAndGetData(url: url, type: .post, userData: data as! [String : Any], headers: getDefaultHeaderDetails(), successBlock: {[unowned self] (success, message, reponseObject) in // if success { // // } // else // { // // }}, // failureBlock: {[unowned self] (errorMesssage) in // print(errorMesssage) // } // ); // // } // // func webServiceGotExpiryMessage(errorMessage: String) { // handle session expiry here // } //**************************************************** How to use? end ****************************************************// var httpMethod: HTTPMethod? // type switch type { case .put: httpMethod = .put case .get: httpMethod = .get case .delete: httpMethod = .delete case .post: httpMethod = .post } //if Reachability.isConnectedToNetwork() == true { let request = URLRequest(url: NSURL(string: url)! as URL, cachePolicy: .returnCacheDataElseLoad, timeoutInterval: 60) if (isCacheEnable)!{ sessionManager = Alamofire.SessionManager(configuration: AUCacheeManager.shared.configuration(apiName: (request.url?.absoluteString)!)) sessionManager.request(url, method: httpMethod!, parameters: userData, encoding: JSONEncoding.default, headers: headers).responseJSON { (response:DataResponse<Any>) in switch(response.result) { case .success(_): if response.result.value != nil{ debugPrint(url) debugPrint(type) debugPrint(userData ?? "") debugPrint(headers ?? "") debugPrint(response.result.value ?? "") if(!self.checkForSessionExpiryAndPop(result: response.result.value ?? "")) { if response.result.value != nil{ self.getWedData(response: response, successBlock: successBlock, failureBlock: failureBlock) AUCacheeManager.shared.clearCacheWith(request: request, isForceClear: false) } } } break case .failure(let error): failureBlock(error.localizedDescription as String) break } } }else { Alamofire.request(url, method: httpMethod!, parameters: userData, encoding: JSONEncoding.default, headers: headers).responseJSON { (response:DataResponse<Any>) in debugPrint(url) debugPrint(type) debugPrint(userData ?? "") debugPrint(headers ?? "") if response.result.value != nil{ self.getWedData(response: response, successBlock: successBlock, failureBlock: failureBlock) } else{ let requestQueue = DispatchQueue(label: "alamofire.queue") requestQueue.asyncAfter(deadline: DispatchTime.now() + 2.0) { //Do your Alamofire request here //After it complete his task return response in main queue if needed DispatchQueue.main.async { Alamofire.request(url, method: httpMethod!, parameters: userData, encoding: JSONEncoding.default, headers: headers).responseJSON { (response:DataResponse<Any>) in debugPrint(url) debugPrint(type) debugPrint(userData ?? "") debugPrint(headers ?? "") if response.result.value != nil{ self.getWedData(response: response, successBlock: successBlock, failureBlock: failureBlock) } } } } // 1004 some time in http get , so retyring the request } } } // } // else{ // failureBlock("Please check your internet connection" as String) // } } func getWedData(response:DataResponse<Any>,successBlock: @escaping kModelSuccessBlock, failureBlock : @escaping kModelErrorBlock) { switch(response.result) { case .success(_): if response.result.value != nil{ debugPrint(response.result.value ?? "") if(!self.checkForSessionExpiryAndPop(result: response.result.value ?? "")) { if response.result.value != nil{ successBlock(true, "Success",response.result.value as AnyObject) } } } break case .failure(let error): failureBlock(error.localizedDescription as String) break } } func checkForSessionExpiryAndPop(result: Any)-> Bool { var data : JSON = JSON(result as AnyObject) if(self.sessionExpiryMessage != "" && data["message"].stringValue.range(of:self.sessionExpiryMessage) != nil) { debugPrint("Augusta Framework: Session expiry message matches with the web service message, Calling session expiry delegate...") self.delegate?.webServiceGotExpiryMessage(errorMessage: data["Message"].stringValue) return true } return false } }
[ -1 ]
0572f50af3805cfdf03821976f5f298ccf407cc7
ccf19cdc27ab8c00db621bb8d77bef3af9a524e6
/FlappyBird/FlappyBird/Ground.swift
7d7aee32e827b03e2ff7e05e600c12c9c96b4181
[ "MIT" ]
permissive
shimizu123/FlappyBird
04ff7a6b46e7902194b59f6068e3ab70f69ac0ac
33278a3a89e5409de3f1fc55d70b981b2db2b24c
refs/heads/master
2020-09-02T02:26:00.991574
2019-11-02T12:08:13
2019-11-02T12:08:13
219,112,110
0
0
null
null
null
null
UTF-8
Swift
false
false
2,016
swift
// // Ground.swift // FlappyBird // // Created by 邓康大 on 2017/6/23. // Copyright © 2017年 邓康大. All rights reserved. // import SpriteKit class Ground: SKSpriteNode { // MARK: - Init required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } override init(texture: SKTexture?, color: UIColor, size: CGSize) { super.init(texture: texture, color: color, size: size) } convenience init() { let texture = Textures.sharedInstance.textureWith(name: SpriteName.ground) self.init(texture: texture, color: SKColor.white, size: texture.size()) setup() setupPhysics() } // MARK: - Setup private func setup() { // Set the anchorPoint to be in the bottom left corner, (0,0) self.anchorPoint = CGPoint.zero // Set the position to be in the bottom left corner (0,0) self.position = CGPoint.zero //在右边增加第二块地面 let childSprite = Textures.sharedInstance.spriteWith(name: SpriteName.ground) childSprite.anchorPoint = CGPoint.zero childSprite.position = CGPoint(x: self.size.width, y: 0) self.addChild(childSprite) } private func setupPhysics() { self.physicsBody = SKPhysicsBody(edgeLoopFrom: self.frame) self.physicsBody?.affectedByGravity = false self.physicsBody?.categoryBitMask = Contact.scene self.physicsBody?.collisionBitMask = 0 self.physicsBody?.contactTestBitMask = 0 } // MARK: - Update func update(delta: TimeInterval) { let moveAmount = CGFloat(delta) * 60 * 2 if self.position.x < 0 - self.size.width / 2 { self.position = CGPoint.zero } else { let newX = self.position.x - moveAmount self.position = CGPoint(x: newX, y: self.position.y) } } // MARK: - Actions private func animate() { } }
[ -1 ]
8d195c6d3985ff9ad74118a8f59ed2495aadfd42
7c83953d8f211913806d45c53604e5eb03dd8dab
/Core/Sources/Extensions/NSAttributedString.swift
673937eab82ea6e772f57183c65634746dda3078
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
malachaifrazier/Tropos
bf37fd10918e91a2b20a15d025296aaea9868ae4
f2ed0c286efc879668efa9a7a1a65ae3392fe693
refs/heads/master
2021-08-04T17:04:47.926746
2016-05-27T15:14:22
2016-05-27T15:14:22
60,137,438
0
0
MIT
2021-07-29T10:18:40
2016-06-01T01:59:55
Objective-C
UTF-8
Swift
false
false
1,495
swift
import UIKit extension NSAttributedString { var entireRange: NSRange { return NSRange(location: 0, length: length) } } extension NSAttributedString { var font: UIFont? { return attribute(NSFontAttributeName, atIndex: 0, effectiveRange: nil) as? UIFont } var textColor: UIColor? { return attribute(NSForegroundColorAttributeName, atIndex: 0, effectiveRange: nil) as? UIColor } } extension NSMutableAttributedString { override var font: UIFont? { get { return super.font } set { if let font = newValue { setAttributes([NSFontAttributeName: font], range: entireRange) } else { removeAttribute(NSFontAttributeName, range: entireRange) } } } override var textColor: UIColor? { get { return super.textColor } set { if let color = newValue { setTextColor(color, forRange: entireRange) } else { removeAttribute(NSForegroundColorAttributeName, range: entireRange) } } } func setTextColor(color: UIColor, forRange range: NSRange) { setAttributes([NSForegroundColorAttributeName: color], range: range) } func setTextColor(color: UIColor, forSubstring substring: String) { let range = (string as NSString).rangeOfString(substring) setTextColor(color, forRange: range) } }
[ -1 ]
87f6b2898a018c548bbc146ddccd21118257ce1b
4998e9a07538f7929bae4be147e78d22084cd2c5
/Hive2D/Hive2D/Networking/LobbyFinderDelegate.swift
c536669735fe7a09d4fafee8c68d9583963d1241
[]
no_license
travellingsalesmanco/hive2d
3cce49e6d4a4fb9b063f1e401447f7cec85fcfca
ec06496db5e29db8d89b1712508a42b6fa5a2c4e
refs/heads/master
2022-12-08T03:47:21.880146
2020-05-02T12:56:28
2020-05-02T12:56:28
291,895,093
0
0
null
null
null
null
UTF-8
Swift
false
false
371
swift
// // LobbyFinderDelegate.swift // Hive2D // // Created by John Phua on 18/03/2020. // Copyright © 2020 TSCO. All rights reserved. // protocol LobbyFinderDelegate: AnyObject { func lobbyCreated(lobby: Lobby, networking: LobbyNetworking) func lobbyCreationFailed() func lobbyJoined(lobby: Lobby, networking: LobbyNetworking) func lobbyJoinFailed() }
[ -1 ]
04e7190da76149f285b9aaa27bde7a52156d9ce2
7ce8608725c643a18636b413735a79f2366ad223
/LiveBait/ViewController/OTPVC/OTPVC.swift
896aee3abe29c686c4dc3b8cbf1ef4a9d3e61577
[]
no_license
ThePowerOfSwift/Livebait
f8961b9b1acba40f68380e22554973b48d22a783
0f42981ccbfb5aa56fa2adaaff75a5eae749d9e6
refs/heads/master
2020-05-25T02:24:42.701970
2018-10-09T13:38:46
2018-10-09T13:38:46
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,709
swift
// // OTPVC.swift // LiveBait // // Created by maninder on 12/12/17. // Copyright © 2017 Maninderjit Singh. All rights reserved. // import UIKit import Firebase import FirebaseAuth class OTPVC: UIViewController { @IBOutlet var btnSubmit: UIButton! @IBOutlet var btnResend: UIButton! var code = String() var mobileNo = String() @IBOutlet var txtVerificationCode: UITextField! override func viewDidLoad() { super.viewDidLoad() self.view.layoutIfNeeded() self.navigationController?.navigationBar.barTintColor = APPThemeColor self.navigationController?.navigationBar.isTranslucent = false let btnLeftBar:UIBarButtonItem = UIBarButtonItem.init(image:UIImage(named: "BackWhite"), style: UIBarButtonItemStyle.plain, target: self, action: #selector(OTPVC.actionBtnBackPressed)) self.navigationItem.leftBarButtonItem = btnLeftBar self.navigationController?.navigationBar.tintColor = UIColor.white; self.navTitle(title: "Verification", color: UIColor.white , font: FontBold(size: 18)) btnSubmit.cornerRadius(value: 4) self.btnResend.underlineButton(text: "Resend verification code", font: FontRegular(size: 15)) // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @objc func actionBtnBackPressed() { self.navigationController?.popViewController(animated: true) } @IBAction func actionBtnSubmit(_ sender: UIButton) { if txtVerificationCode.text!.checkIsEmpty() { showCustomAlert(message: ErrorMessage.OTPMissing.rawValue, controller: self) return } else if txtVerificationCode.text!.count != 6 { showCustomAlert(message: ErrorMessage.OTPLengthMissing.rawValue , controller: self) return } let crdential = PhoneAuthProvider.provider().credential( withVerificationID: verificationCodeReceived, verificationCode: txtVerificationCode.text!) SwiftLoader.show(true) Auth.auth().signIn(with: crdential) { (user, error) in SwiftLoader.hide() if let error = error { print(error.localizedDescription) // self.showMessagePrompt(error.localizedDescription) return } LoginManager.getMe.countryCode = self.code LoginManager.getMe.mobileVerified = true LoginManager.getMe.phoneNumber = self.mobileNo DispatchQueue.main.async { let viewControllers: [UIViewController] = self.navigationController!.viewControllers as [UIViewController] self.navigationController!.popToViewController(viewControllers[viewControllers.count - 3], animated: true) } } } @IBAction func actionResendVerificationCode(_ sender: UIButton) { let strPhoneNumber = code + mobileNo SwiftLoader.show(true) PhoneAuthProvider.provider().verifyPhoneNumber(strPhoneNumber, uiDelegate: nil) { (verificationID, error) in SwiftLoader.hide() if let error = error { print(error.localizedDescription) // self.showMessagePrompt(error.localizedDescription) return } if let verificationId = verificationID as? String { verificationCodeReceived = verificationId // userDefaults.set(verificationId, forKey: LocalKeys.VerificationID.rawValue) DispatchQueue.main.async { showCustomAlert(message: ErrorMessage.CodeResent.rawValue, controller: self) } } // Sign in using the verificationID and the code sent to the user // ... } } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
161704c59c2cd0ee7cd3b7321dc504fe01de4cab
ff994668c3e5239cb6768bc036d8875ed1b87c94
/platforms/ios/src/FBConnect.swift
b369f2042313a1f2bc85b7f14b18b4c175294d71
[ "MIT" ]
permissive
fathens/Cordova-Plugin-FBConnect
5534ea35f2979c64bb8b38b81adaa7466e2cdbcd
f314849c2521f3a92040addbc56f24ca47debf59
refs/heads/master
2021-01-10T12:09:28.642123
2016-10-26T04:09:16
2016-10-26T04:09:16
44,779,913
0
0
null
null
null
null
UTF-8
Swift
false
false
8,436
swift
import Foundation import Cordova import FBSDKCoreKit import FBSDKLoginKit private func log(_ msg: String) { print(msg) } @objc(FBConnect) class FBConnect: CDVPlugin { // MARK: - Plugin Commands func login(_ command: CDVInvokedUrlCommand) { fork { var perms = command.arguments.map { $0 as! String } if perms.count < 1 { perms.append("public_profile") } var reads: [String] = [] var pubs: [String] = [] perms.forEach { perm in if self.isPublishPermission(perm) { pubs.append(perm) } else { reads.append(perm) } } if !reads.isEmpty && !pubs.isEmpty { self.finish_error(command, msg: "Cannot ask for both read and publish permissions") } else { assert(!reads.isEmpty || !pubs.isEmpty) func finish(_ ac: FBSDKAccessToken?) { self.finish_ok(command, result: ac?.tokenString as AnyObject?) } if !reads.isEmpty { self.accessToken.getCurrent({ self.permRead(command, permissions: reads) }, taker: finish) } if !pubs.isEmpty { self.accessToken.getCurrent({ self.permPublish(command, permissions: pubs) }, taker: finish) } } } } func logout(_ command: CDVInvokedUrlCommand) { fork { log("Logout now!") FBSDKLoginManager.init().logOut() self.finish_ok(command) } } func getName(_ command: CDVInvokedUrlCommand) { fork { self.profile.getCurrent({ self.permRead(command, permissions: ["public_profile"]) }) { self.finish_ok(command, result: $0?.name as AnyObject?) } } } func getToken(_ command: CDVInvokedUrlCommand) { fork { var result: [String: AnyObject]? = nil if let ac = FBSDKAccessToken.current() { result = [ "token": ac.tokenString as AnyObject, "permissions": ac.permissions.map { String(describing: $0) } as AnyObject ] } self.finish_ok(command, result: result as AnyObject?) } } // MARK: - Override Methods override func handleOpenURL(_ notification: Notification) { let url = notification.object! as! URL let source = url.absoluteString.hasPrefix("fb") ? "com.facebook.Facebook": "" FBSDKApplicationDelegate.sharedInstance().application(UIApplication.shared, open: url, sourceApplication: source, annotation: nil) } override func pluginInitialize() { func observe(_ name: String, selector: Selector) { NotificationCenter.default.addObserver(self, selector: selector, name: NSNotification.Name(rawValue: name), object: nil) } observe(NSNotification.Name.UIApplicationDidFinishLaunching.rawValue, selector: #selector(FBConnect.finishLaunching(_:))) observe(NSNotification.Name.UIApplicationDidBecomeActive.rawValue, selector: #selector(FBConnect.becomeActive(_:))) observe(NSNotification.Name.FBSDKAccessTokenDidChange.rawValue, selector: #selector(FBConnect.changeAccessToken(_:))) observe(NSNotification.Name.FBSDKProfileDidChange.rawValue, selector: #selector(FBConnect.changeProfile(_:))) } // MARK: - Event Listeners func finishLaunching(_ notification: Notification) { let options = (notification as NSNotification).userInfo != nil ? (notification as NSNotification).userInfo : [:] FBSDKApplicationDelegate.sharedInstance().application(UIApplication.shared, didFinishLaunchingWithOptions: options) FBSDKProfile.enableUpdates(onAccessTokenChange: true) renewCredentials() } func becomeActive(_ notification: Notification) { FBSDKAppEvents.activateApp() } func changeProfile(_ notification: Notification) { profile.setCurrent(FBSDKProfile.current()) } func changeAccessToken(_ notification: Notification) { accessToken.setCurrent(FBSDKAccessToken.current()) } // MARK: - Private Utillities fileprivate func fork(_ proc: @escaping () -> Void) { DispatchQueue.global(qos: DispatchQoS.QoSClass.utility).async(execute: proc) } fileprivate func finish_error(_ command: CDVInvokedUrlCommand, msg: String!) { commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_ERROR, messageAs: msg), callbackId: command.callbackId) } fileprivate func finish_ok(_ command: CDVInvokedUrlCommand, result: AnyObject? = nil) { log("Command Result: \(result)") if let msg = result as? String { commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_OK, messageAs: msg), callbackId: command.callbackId) } else if let dict = result as? [String: AnyObject] { commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_OK, messageAs: dict), callbackId: command.callbackId) } else if result == nil { commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_OK), callbackId: command.callbackId) } } fileprivate func renewCredentials() { FBSDKLoginManager.renewSystemCredentials { (result: ACAccountCredentialRenewResult, err: Error?) -> Void in if err == nil { func readMsg() -> String { switch result { case .failed: return "Failed" case .rejected: return "Rejected" case .renewed: return "Renewed" } } log("Result of renewSystemCredentials \(readMsg())") } else { log("Error on renewSystemCredentials \(err)") } } } fileprivate func permRead(_ command: CDVInvokedUrlCommand, permissions: [String], finish: (() -> Void)? = nil) { FBSDKLoginManager.init().logIn(withReadPermissions: permissions) { (result, err) -> Void in log("Result of logInWithReadPermissions: \(result), Error: \(err)") if err != nil { self.finish_error(command, msg: String(describing: err)) } else if result!.isCancelled { self.finish_error(command, msg: "Cancelled") } else { if let fin = finish { fin() } } } } fileprivate func permPublish(_ command: CDVInvokedUrlCommand, permissions: [String], finish: (() -> Void)? = nil) { FBSDKLoginManager.init().logIn(withPublishPermissions: permissions) { (result, err) -> Void in log("Result of logInWithPublishPermissions: \(result), Error: \(err)") if err != nil { self.finish_error(command, msg: String(describing: err)) } else if result!.isCancelled { self.finish_error(command, msg: "Cancelled") } else { if let fin = finish { fin() } } } } fileprivate func isPublishPermission(_ perm: String) -> Bool { return perm.hasPrefix("publish") || perm.hasPrefix("manage") || perm == "ads_management" || perm == "create_event" || perm == "rsvp_event" } fileprivate let profile = ChangeKeeper<FBSDKProfile>() fileprivate let accessToken = ChangeKeeper<FBSDKAccessToken>() } // MARK: - Helper class ChangeKeeper<T> { fileprivate var current: T? = nil fileprivate var listenersSet: [(T?) -> Void] = [] func getCurrent(_ refresher: () -> Void, taker: @escaping (T?) -> Void) { log("Get current(\(self)): \(current)") if let v = current { taker(v) } else { listenOnSet(taker) refresher() } } func setCurrent(_ given: T?) { log("Set current(\(self)): \(given)") current = given if let v = given { listenersSet.forEach { $0(v) } listenersSet = [] } } func listenOnSet(_ proc: @escaping (T?) -> Void) { listenersSet.append(proc) } }
[ -1 ]
4779e3b8a1ea8f4b97dcd03dae5011086cb15a9a
ab5a24d536b92d90a985e83a0489ba98b1c15715
/Tests/Unit/ZooNavigationServiceTests.swift
5174521406d9664ba272d2345b06c3e39719681f
[]
no_license
budikpet/MastersThesis_IOS
1bbb4bbae019b7e56c6325a323fa015d581c6075
5849777d3d99493be021132aaf61c2e0d27f7b5f
refs/heads/master
2023-05-12T14:21:01.573551
2021-06-02T11:29:27
2021-06-02T11:29:27
349,095,633
0
0
null
2021-05-05T19:25:29
2021-03-18T14:02:53
Swift
UTF-8
Swift
false
false
15,986
swift
// // UnitTests.swift // UnitTests // // Created by Petr Budík on 21/04/2021. // import XCTest import ReactiveSwift import RealmSwift @testable import MastersThesisIOS class FindShortestPathTests: XCTestCase { let realm: Realm = testDependencies.realm lazy var zooNavigationService: ZooNavigationService = ZooNavigationService(dependencies: testDependencies) lazy var roadNodes: Results<RoadNode> = { return realm.objects(RoadNode.self) }() lazy var roads: Results<Road> = { return realm.objects(Road.self) }() override class func setUp() { super.setUp() testDependencies.testRealmInitializer.updateRealm() // Put setup code here. This method is called before the invocation of each test method in the class. } override func setUp() { super.setUp() self.continueAfterFailure = false } override class func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } //swiftlint:disable trailing_whitespace //swiftlint:disable force_unwrapping func testSameRoad() { // Prepare let origin = (14.40461, 50.11837) let dest = (14.40217, 50.11876) // Do let result = zooNavigationService.findShortestPath(betweenOrigin: origin, andDestination: dest) // Assert XCTAssertNotNil(result) let expectedResults: [(Double, Double)] = [360405165, 664050358, 678731707, 154637248, 941428227, 594941651, 969285398, 254636480, 933734346, 295169626, 151508718, 746480045, 871118945] .map { [weak self] id in guard let self = self else { fatalError("Self is nil") } guard let node = self.roadNodes.first(where: {$0._id == id}) else { fatalError("Test node not found.") } return (node.lon, node.lat) } // Remove first and last point since these are difficult to predict let preparedResult = Array(result![1..<(result!.endIndex)-1]) XCTAssertEqual(preparedResult.count, expectedResults.count) XCTAssertTrue(coordinatesEqual(preparedResult, expectedResults)) } //swiftlint:disable trailing_whitespace //swiftlint:disable force_unwrapping func testNoNewNodes() { // Prepare let origin = (14.40966, 50.11594) let dest = (14.40849, 50.11531) // Do let result = zooNavigationService.findShortestPath(betweenOrigin: origin, andDestination: dest) // Assert XCTAssertNotNil(result) let expectedResults: [(Double, Double)] = [531401381, 382975826, 436123425, 168300856, 520661986, 999606680, 703121452, 971219131, 957693158, 501460275, 900690472, 141267973, 281647716] .map { [weak self] id in guard let self = self else { fatalError("Self is nil") } guard let node = self.roadNodes.first(where: {$0._id == id}) else { fatalError("Test node not found.") } return (node.lon, node.lat) } // Remove first and last point since these are difficult to predict let preparedResult = Array(result![1..<(result!.endIndex)-1]) XCTAssertEqual(preparedResult.count, expectedResults.count) XCTAssertTrue(coordinatesEqual(preparedResult, expectedResults)) } //swiftlint:disable trailing_whitespace //swiftlint:disable force_unwrapping func testOneAdditionalNodePerPoint() { // Prepare let origin = (14.40954, 50.11596) let dest = (14.40844, 50.11523) // Do let result = zooNavigationService.findShortestPath(betweenOrigin: origin, andDestination: dest) // Assert XCTAssertNotNil(result) var expectedResults: [(Double, Double)] = [531401381, 382975826, 436123425, 168300856, 520661986, 999606680, 703121452, 971219131, 957693158, 501460275, 900690472, 141267973, 281647716] .map { [weak self] id in guard let self = self else { fatalError("Self is nil") } guard let node = self.roadNodes.first(where: {$0._id == id}) else { fatalError("Test node not found.") } return (node.lon, node.lat) } expectedResults = [(14.4095969, 50.11595227)] + expectedResults + [(14.40845542, 50.11526707)] // Remove first and last point since these are difficult to predict let preparedResult = Array(result![1..<(result!.endIndex)-1]) XCTAssertEqual(preparedResult.count, expectedResults.count) XCTAssertTrue(coordinatesEqual(preparedResult, expectedResults)) } //swiftlint:disable trailing_whitespace //swiftlint:disable force_unwrapping func testPointsCloseToWrongNode() { // Prepare let origin = (14.40962, 50.11595) let dest = (14.40848, 50.11528) // Do let result = zooNavigationService.findShortestPath(betweenOrigin: origin, andDestination: dest) // Assert XCTAssertNotNil(result) let expectedResults: [(Double, Double)] = [531401381, 382975826, 436123425, 168300856, 520661986, 999606680, 703121452, 971219131, 957693158, 501460275, 900690472, 141267973, 281647716] .map { [weak self] id in guard let self = self else { fatalError("Self is nil") } guard let node = self.roadNodes.first(where: {$0._id == id}) else { fatalError("Test node not found.") } return (node.lon, node.lat) } // Remove first and last point since these are difficult to predict let preparedResult = Array(result![1..<(result!.endIndex)-1]) XCTAssertEqual(preparedResult.count, expectedResults.count) XCTAssertTrue(coordinatesEqual(preparedResult, expectedResults)) } } class PopulateShortestPathTests: XCTestCase { let realm: Realm = testDependencies.realm lazy var zooNavigationService: ZooNavigationService = ZooNavigationService(dependencies: testDependencies) lazy var roadNodes: Results<RoadNode> = { return realm.objects(RoadNode.self) }() lazy var roads: Results<Road> = { return realm.objects(Road.self) }() override class func setUp() { super.setUp() testDependencies.testRealmInitializer.updateRealm() // Put setup code here. This method is called before the invocation of each test method in the class. } override func setUp() { super.setUp() self.continueAfterFailure = false } override class func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } //swiftlint:disable trailing_whitespace func testShortPath() { // Prepare let connectorNodesPath: [GraphNode] = [531401381, 999606680, 281647716] .map { [weak self] id in guard let self = self else { fatalError("Self is nil") } guard let node = self.roadNodes.first(where: {$0._id == id}) else { fatalError("Test node not found.") } return DetachedRoadNode(using: node) } .map { GraphNode(roadNode: $0) } // let destination = GraphNode(roadNode: destinationNode) // let origin = GraphNode(roadNode: originNode, destination: destinationNode) // Do let result = zooNavigationService.populateShortestPath(connectorsPath: connectorNodesPath) // Assert let resultPathIds: [Int64] = result.map { $0._id } let expectedResults: [Int64] = [531401381, 382975826, 436123425, 168300856, 520661986, 999606680, 703121452, 971219131, 957693158, 501460275, 900690472, 141267973, 281647716] XCTAssertEqual(resultPathIds.count, expectedResults.count) XCTAssertTrue(expectedResults.elementsEqual(resultPathIds)) } //swiftlint:disable trailing_whitespace func testMediumPath() { // Prepare let connectorNodesPath: [GraphNode] = [784448524, 590844987, 524226363, 269005178, 739676219, 190907276] .map { [weak self] id in guard let self = self else { fatalError("Self is nil") } guard let node = self.roadNodes.first(where: {$0._id == id}) else { fatalError("Test node not found.") } return DetachedRoadNode(using: node) } .map { GraphNode(roadNode: $0) } // let destination = GraphNode(roadNode: destinationNode) // let origin = GraphNode(roadNode: originNode, destination: destinationNode) // Do let result = zooNavigationService.populateShortestPath(connectorsPath: connectorNodesPath) // Assert let resultPathIds: [Int64] = result.map { $0._id } let expectedResults: [Int64] = [784448524, 520984713, 893256765, 887511548, 590844987, 223488993, 843346703, 329154370, 336872439, 524226363, 269005178, 739676219, 669070785, 35708408, 190907276] XCTAssertEqual(resultPathIds.count, expectedResults.count) XCTAssertTrue(expectedResults.elementsEqual(resultPathIds)) } // func testPerformanceExample() { // // This is an example of a performance test case. // self.measure { // // Put the code you want to measure the time of here. // } // } } class ComputeShortestPathTests: XCTestCase { let realm: Realm = testDependencies.realm lazy var zooNavigationService: ZooNavigationService = ZooNavigationService(dependencies: testDependencies) lazy var roadNodes: Results<RoadNode> = { return realm.objects(RoadNode.self) }() lazy var roads: Results<Road> = { return realm.objects(Road.self) }() override class func setUp() { super.setUp() testDependencies.testRealmInitializer.updateRealm() // Put setup code here. This method is called before the invocation of each test method in the class. } override func setUp() { super.setUp() self.continueAfterFailure = false } override class func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } //swiftlint:disable trailing_whitespace func testShortPath() { // Prepare guard let destinationNode = roadNodes.first(where: {$0._id == 281647716}) else { XCTAssert(false, "Destination node not found in the Realm DB.") return } guard let originNode = roadNodes.first(where: {$0._id == 531401381}) else { XCTAssert(false, "Origin node not found in the Realm DB.") return } // let destination = GraphNode(roadNode: destinationNode) // let origin = GraphNode(roadNode: originNode, destination: destinationNode) // Do let result = zooNavigationService.computeShortestPath(origins: [DetachedRoadNode(using: originNode)], destinations: [DetachedRoadNode(using: destinationNode)], destinationPoint: (14.40813, 50.11502)) // Assert XCTAssertNotNil(result) // swiftlint:disable force_unwrapping let resultPathIds: [Int64] = result!.map { $0.node._id } let expectedResults: [Int64] = [531401381, 999606680, 281647716] XCTAssertEqual(resultPathIds.count, expectedResults.count) XCTAssertTrue(expectedResults.elementsEqual(resultPathIds)) } //swiftlint:disable trailing_whitespace func testMediumPath() { // Prepare guard let destinationNode = roadNodes.first(where: {$0._id == 190907276}) else { XCTAssert(false, "Destination node not found in the Realm DB.") return } guard let originNode = roadNodes.first(where: {$0._id == 784448524}) else { XCTAssert(false, "Origin node not found in the Realm DB.") return } // let destination = GraphNode(roadNode: destinationNode) // let origin = GraphNode(roadNode: originNode, destination: destinationNode) // Do let result = zooNavigationService.computeShortestPath(origins: [DetachedRoadNode(using: originNode)], destinations: [DetachedRoadNode(using: destinationNode)], destinationPoint: (14.40362, 50.11675)) // Assert XCTAssertNotNil(result) // swiftlint:disable force_unwrapping let resultPathIds: [Int64] = result!.map { $0.node._id } let expectedResults: [Int64] = [784448524, 590844987, 524226363, 269005178, 739676219, 190907276] XCTAssertEqual(resultPathIds.count, expectedResults.count) XCTAssertTrue(expectedResults.elementsEqual(resultPathIds)) } //swiftlint:disable trailing_whitespace func testMultipleOriginsDestinations() { // From (14.40265, 50.11817) to (14.40323, 50.11667) // Prepare let destinationConnectors: [Int64] = [204519474, 771864649] let destinations = Array(roadNodes.filter({ (node: RoadNode) in destinationConnectors.contains(node._id) })) .map { DetachedRoadNode(using: $0) } let originConnectors: [Int64] = [986638646, 24689895, 2374223, 292562085] let origins = Array(roadNodes) .filter({ (node: RoadNode) in originConnectors.contains(node._id) }) .map { DetachedRoadNode(using: $0) } // let destination = GraphNode(roadNode: destinationNode) // let origin = GraphNode(roadNode: originNode, destination: destinationNode) // Do let result = zooNavigationService.computeShortestPath(origins: origins, destinations: destinations, destinationPoint: (14.40323, 50.11667)) // Assert XCTAssertNotNil(result) // swiftlint:disable force_unwrapping let resultPathIds: [Int64] = result!.map { $0.node._id } let expectedResults: [Int64] = [292562085, 763606006, 190907276, 204519474] XCTAssertEqual(resultPathIds.count, expectedResults.count) XCTAssertTrue(expectedResults.elementsEqual(resultPathIds)) } func testNotFound() { // Trying to navigate to the other side of Vltava which is not possible // Prepare let destinationConnectors: [Int64] = [420903310] let destinations = Array(roadNodes) .filter({ (node: RoadNode) in destinationConnectors.contains(node._id) }) .map { DetachedRoadNode(using: $0) } let originConnectors: [Int64] = [986638646, 24689895, 2374223, 292562085] let origins = Array(roadNodes) .filter({ (node: RoadNode) in originConnectors.contains(node._id) }) .map { DetachedRoadNode(using: $0) } // let destination = GraphNode(roadNode: destinationNode) // let origin = GraphNode(roadNode: originNode, destination: destinationNode) // Do let result = zooNavigationService.computeShortestPath(origins: origins, destinations: destinations, destinationPoint: (14.39537, 50.11171)) // Assert XCTAssertNil(result) } // func testPerformanceExample() { // // This is an example of a performance test case. // self.measure { // // Put the code you want to measure the time of here. // } // } } private func coordinatesEqual(_ a: [(Double, Double)], _ b: [(Double, Double)]) -> Bool { if(a.count != b.count) { return false } for index in 0..<a.count { if(a[index].0 != b[index].0 || a[index].1 != b[index].1) { return false } } return true }
[ -1 ]
03a86dafff2d23c5cb151b7576e3dc886a9c9c13
c559590e200513c486fbd87e5d3db8c3c58a7848
/iPhoneCalculatorDemo/CalculatorViewController.swift
a4000357518f8357fe1f35ad879ab7ee4aead323
[]
no_license
johnny90347/iPhoneCalculatorDemo
0113884d793d9af969216b23afa317c3dc40641b
39a4a16169f3823fa99a882c68e0897a9d6c54ae
refs/heads/master
2022-02-22T11:33:55.258946
2019-09-17T07:12:34
2019-09-17T07:12:34
208,983,977
0
0
null
null
null
null
UTF-8
Swift
false
false
12,605
swift
// // CalculatorViewController.swift // iPhoneCalculatorDemo // // Created by 梁鑫文 on 2019/9/13. // Copyright © 2019 Johhny. All rights reserved. // import UIKit enum OperationType{ //計算種類 case add //+ case subtract //- case multiply //x case divide //÷ case none //沒有 } class CalculatorViewController: UIViewController { var numberOnScreen:Double = 0 //計算機螢幕上的數字 var previousNumber:Double = 0 //將數字儲存準備下回合的運算 var performingMath = false //是否開始計數 var isPointCalulate = false //小數點的使用,一次畫面只有一個. var isNegative = false //是負數 var operation:OperationType = .none var operationCurrentTitle:String = "" //目前正在使用的運算符號 ""代表沒有運算 @IBOutlet weak var showLabel: UILabel! //顯示畫面 @IBOutlet var calculateButtons: [UIButton]! //全部的數字按鈕和計算按鈕 @IBOutlet weak var equalButton: UIButton! override func viewDidLoad() { super.viewDidLoad() for button in calculateButtons{ button.layer.cornerRadius = button.frame.height / 2 } } //計算按鈕群 @IBAction func CalculateButtonPressed(_ sender: UIButton) { if sender.tag == 10{ //小數點 numberButtonBackgroundColorAnimate(sender) } if sender.tag == 10 && isPointCalulate == false { //小數點符號使用 if performingMath == false { showLabel.text = "0" + "." }else{ showLabel.text = showLabel.text! + "." } isPointCalulate = true performingMath = true } if sender.tag == 11 { // = if performingMath == true{ calculation() previousNumber = 0 performingMath = false } } if sender.tag == 12 { // + if operationCurrentTitle != "+" { calculationSymbolBackgroundColorAnimate(sender, int: sender.tag) checkAnyCalculateSymbolIsExist() operationCurrentTitle = "+" } if performingMath == true { calculation() } previousNumber = numberOnScreen performingMath = false isPointCalulate = false isNegative = false operation = .add print("+") } if sender.tag == 13 { // - if operationCurrentTitle != "-" { calculationSymbolBackgroundColorAnimate(sender, int: sender.tag) checkAnyCalculateSymbolIsExist() operationCurrentTitle = "-" } if performingMath == true { calculation() } previousNumber = numberOnScreen performingMath = false isPointCalulate = false isNegative = false operation = .subtract print("-") } if sender.tag == 14 { // x if operationCurrentTitle != "x" { calculationSymbolBackgroundColorAnimate(sender, int: sender.tag) checkAnyCalculateSymbolIsExist() operationCurrentTitle = "x" isNegative = false } if performingMath == true { calculation() } previousNumber = numberOnScreen performingMath = false isPointCalulate = false isNegative = false operation = .multiply print("x") } if sender.tag == 15 { // ÷ if operationCurrentTitle != "÷" { calculationSymbolBackgroundColorAnimate(sender, int: sender.tag) checkAnyCalculateSymbolIsExist() operationCurrentTitle = "÷" } if performingMath == true { calculation() } previousNumber = numberOnScreen performingMath = false isPointCalulate = false isNegative = false operation = .divide print("÷") } if sender.tag == 16 { // % print("%") numberOnScreen = (Double(showLabel.text!)!)/100 transferNumberToString(form: numberOnScreen) specialSymbolBackgroundColorAnimate(sender) } if sender.tag == 17 { // +/- 轉換 if isNegative == false{ numberOnScreen = -Double(showLabel.text!)! if numberOnScreen == 0{ showLabel.text = "-" + "0" }else{ transferNumberToString(form: numberOnScreen) } isNegative = true }else{ numberOnScreen = -Double(showLabel.text!)! transferNumberToString(form: numberOnScreen) isNegative = false } specialSymbolBackgroundColorAnimate(sender) print("+/-") } if sender.tag == 18 { //AC showLabel.text = "0" numberOnScreen = 0 previousNumber = 0 operation = .none isPointCalulate = false performingMath = false isNegative = false specialSymbolBackgroundColorAnimate(sender) equalButton.setTitle("AC", for: .normal) checkAnyCalculateSymbolIsExist() } //數字按鈕群 switch sender.tag { case 0...9: if operationCurrentTitle != "" { changeCalculateBackgroundColor( ChagecurrentitleTo: "") } numberButtonBackgroundColorAnimate(sender) equalButton.setTitle("C", for: .normal) if performingMath == false{ showLabel.text = String(sender.tag) if isNegative == true { showLabel.text = "-\(sender.tag)" } performingMath = true numberOnScreen = Double(showLabel.text!)! }else{ if showLabel.text!.count >= 9 { //能輸入的數字只能小於9位數 break } showLabel.text = (showLabel.text)! + String(sender.tag) numberOnScreen = Double(showLabel.text!)! } print(numberOnScreen) default: break } } func checkAnyCalculateSymbolIsExist(){ if operationCurrentTitle != ""{ for button in calculateButtons { if button.currentTitle == operationCurrentTitle{ calculationSymbolOriginColorAnimate(button: button) } } } } //判斷是不是要恢復 + - x ÷ 的背景顏色 func changeCalculateBackgroundColor(ChagecurrentitleTo title:String){ for button in calculateButtons { if button.currentTitle == "+" || button.currentTitle == "-" || button.currentTitle == "x" || button.currentTitle == "÷" { calculationSymbolOriginColorAnimate(button: button) operationCurrentTitle = title } } } func transferNumberToString(form number:Double){ //如果沒有小數點則呈現整數 var okString:String if floor(number) == number { okString = "\(Int(number))" }else{ okString = "\(number)" } if okString.count >= 9 { okString = String(okString.prefix(9)) } showLabel.text = okString } func calculation(){ //計算結果 switch operation{ case .add: //+ numberOnScreen = previousNumber + numberOnScreen transferNumberToString(form: numberOnScreen) performingMath = false isPointCalulate = false case .subtract: //- numberOnScreen = previousNumber - numberOnScreen transferNumberToString(form: numberOnScreen) performingMath = false isPointCalulate = false case .multiply: //x numberOnScreen = previousNumber * numberOnScreen transferNumberToString(form: numberOnScreen) performingMath = false isPointCalulate = false case .divide: //÷ numberOnScreen = previousNumber / numberOnScreen transferNumberToString(form: numberOnScreen) performingMath = false isPointCalulate = false case .none: break } } //按下數字鍵 0~9 . 的動畫 func numberButtonBackgroundColorAnimate(_ sender: UIButton){ let animator = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { sender.backgroundColor = #colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1) } let animatorTwo = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { sender.backgroundColor = #colorLiteral(red: 0.3179988265, green: 0.3179988265, blue: 0.3179988265, alpha: 1) } animator.addCompletion { _ in animatorTwo.startAnimation() } animator.startAnimation() } //按下特殊符號 AC % +/- 的動畫 func specialSymbolBackgroundColorAnimate(_ sender: UIButton){ let otherAnimator = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { sender.backgroundColor = #colorLiteral(red: 0.9096873403, green: 0.9096873403, blue: 0.9096873403, alpha: 1) } otherAnimator.startAnimation() let otherAnimatorTwo = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { sender.backgroundColor = #colorLiteral(red: 0.5723067522, green: 0.5723067522, blue: 0.5723067522, alpha: 1) } otherAnimator.addCompletion { _ in otherAnimatorTwo.startAnimation() } } //按下計算符號 閃一下 的動畫 (用在已經 func calculationSymbolFlashAnimate(_ sender: UIButton){ let otherAnimator = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { sender.backgroundColor = #colorLiteral(red: 0.9686274529, green: 0.78039217, blue: 0.3450980484, alpha: 1) } otherAnimator.startAnimation() let otherAnimatorTwo = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { sender.backgroundColor = #colorLiteral(red: 1, green: 0.5764705882, blue: 0, alpha: 1) } otherAnimator.addCompletion { _ in otherAnimatorTwo.startAnimation() } } // + - x ÷ 的背景色變白色 func calculationSymbolBackgroundColorAnimate(_ sender: UIButton, int:Int){ let animator = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { sender.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1) } animator.addAnimations({ let button = sender.viewWithTag(int) as! UIButton button.setTitleColor(#colorLiteral(red: 1, green: 0.5764705882, blue: 0, alpha: 1), for: .normal) }, delayFactor: 0) animator.startAnimation() } //+ - x ÷ 的背景色變橘色 func calculationSymbolOriginColorAnimate(button: UIButton){ let animator = UIViewPropertyAnimator(duration: 0.3, curve: .linear) { button.backgroundColor = #colorLiteral(red: 1, green: 0.5764705882, blue: 0, alpha: 1) } animator.addAnimations({ button.setTitleColor(#colorLiteral(red: 1, green: 1, blue: 1, alpha: 1), for: .normal) }, delayFactor: 0) animator.startAnimation() } }
[ -1 ]
aefac824ea39e908a4b8503c71e19b8f46e62a02
353e81bfed1703d482de054f9914e5cafdbb44a3
/DrawingTaggingPad/DrawingTaggingPadTests/DrawingTaggingPadTests.swift
9490f6ee6b9d060027797c43114ac529ad39cb19
[ "MIT" ]
permissive
Pypy233/DrawingTaggingPad
81035c87f8122e58bd87e00a13bf36fcdfeaacad
6d7a22327ae51d98bc0cfc49fb3063116963a1a4
refs/heads/master
2020-03-27T23:40:28.190266
2018-10-11T14:10:11
2018-10-11T14:10:11
147,337,557
3
1
null
null
null
null
UTF-8
Swift
false
false
1,007
swift
// // SwiftOneStrokeTests.swift // SwiftOneStrokeTests // // Created by Daniele Margutti on 02/10/15. // Copyright © 2015 danielemargutti. All rights reserved. // import XCTest @testable import SwiftOneStroke class SwiftOneStrokeTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 360462, 229413, 204840, 344107, 155694, 229424, 229430, 163896, 180280, 376894, 286788, 352326, 196691, 385116, 237663, 254048, 319591, 278634, 221290, 278638, 204916, 131191, 131198, 311438, 278677, 196760, 426138, 278691, 377009, 278708, 278714, 295098, 139479, 229597, 311519, 205035, 286958, 327929, 344313, 147717, 368905, 254226, 319763, 368916, 262421, 377114, 278816, 237856, 237857, 311597, 98610, 180535, 336183, 278842, 287041, 139589, 319813, 344401, 377169, 368981, 155990, 368984, 106847, 98657, 270701, 270706, 246136, 139640, 311681, 311685, 106888, 385417, 385422, 213403, 246178, 385454, 311727, 377264, 278970, 319930, 311738, 33211, 336320, 311745, 254406, 188871, 278989, 278993, 278999, 328152, 369116, 188894, 287198, 279008, 279018, 319981, 319987, 279029, 254456, 377338, 279039, 377343, 254465, 287241, 279050, 139792, 303636, 393751, 279065, 377376, 180771, 377386, 197167, 385588, 279094, 115270, 385615, 426576, 369235, 295519, 139872, 66150, 344680, 279146, 295536, 139892, 287352, 344696, 279164, 311941, 336518, 311945, 369289, 344715, 311949, 287374, 377489, 311954, 352917, 230040, 271000, 377497, 303771, 377500, 205471, 344738, 139939, 295590, 295599, 205487, 303793, 336564, 230072, 287417, 287422, 377539, 287439, 164560, 385747, 279252, 361176, 418520, 287452, 279269, 246503, 369385, 279280, 312052, 230134, 172792, 344827, 221948, 205568, 295682, 197386, 434957, 426774, 197399, 426775, 197411, 279336, 262954, 295724, 197422, 353070, 164656, 303920, 262962, 295729, 197431, 336702, 279362, 353109, 377686, 230234, 189275, 435039, 295776, 303972, 385893, 230248, 246641, 246643, 295798, 246648, 279417, 361337, 254850, 369538, 287622, 58253, 295824, 279464, 140204, 377772, 304051, 230332, 189374, 377790, 353215, 213957, 213960, 345033, 279498, 386006, 418776, 50143, 123881, 287731, 271350, 295927, 304122, 320507, 328700, 328706, 410627, 320516, 295942, 386056, 353290, 377869, 238610, 418837, 140310, 197657, 369701, 238639, 312373, 238651, 377926, 238664, 296019, 304222, 279660, 173166, 377972, 337017, 377983, 279685, 402565, 222343, 386189, 296086, 238743, 296092, 238765, 279728, 238769, 402613, 230588, 279747, 353479, 402634, 279760, 189652, 279765, 189653, 419029, 148696, 296153, 279774, 304351, 304356, 222440, 279785, 328940, 386294, 386301, 320770, 386306, 369930, 312587, 328971, 353551, 173334, 320796, 222494, 353584, 345396, 386359, 378172, 279875, 312648, 337225, 304456, 230729, 296270, 238927, 353616, 378209, 386412, 296307, 116084, 337281, 148867, 296329, 296335, 9619, 370071, 173491, 304564, 279989, 353719, 361927, 296392, 280010, 280013, 239068, 280032, 271843, 280041, 329197, 329200, 296433, 280055, 288249, 230921, 329225, 296461, 304656, 329232, 370197, 402985, 394794, 312880, 288309, 312889, 288318, 280130, 288327, 239198, 99938, 312940, 222832, 288378, 337534, 337535, 263809, 239237, 288392, 239250, 419478, 206504, 321199, 337591, 280251, 280257, 280267, 403148, 9936, 313041, 9937, 370388, 272085, 345814, 18138, 67292, 345821, 321247, 321249, 345833, 345834, 280300, 239341, 67315, 173814, 313081, 288512, 288516, 280327, 280329, 321302, 345879, 321310, 255776, 362283, 378668, 296755, 321337, 345919, 436031, 403267, 345929, 304977, 18262, 362327, 280410, 345951, 362337, 345955, 296806, 288620, 280430, 214895, 313199, 362352, 313203, 182144, 305026, 329622, 337815, 214937, 214938, 436131, 436137, 362417, 362431, 280514, 280519, 214984, 362443, 329695, 436191, 313319, 296941, 436205, 329712, 43014, 354316, 313357, 239650, 354343, 354345, 223274, 346162, 288828, 436285, 288833, 288834, 436292, 403525, 313416, 436301, 354385, 338001, 338003, 223316, 280661, 329814, 354393, 280675, 280677, 43110, 313447, 321637, 436329, 288879, 223350, 280694, 288889, 215164, 313469, 215166, 280712, 215178, 346271, 436383, 362659, 239793, 182456, 280762, 223419, 379071, 280768, 149703, 280778, 346314, 321745, 280795, 387296, 280802, 379106, 346346, 321772, 436470, 149760, 411906, 313608, 272658, 338218, 321840, 379186, 321860, 280902, 182598, 289110, 215385, 354655, 313713, 354676, 436608, 362881, 248194, 240002, 436611, 240016, 108944, 190871, 149916, 420253, 141728, 289189, 108972, 272813, 338356, 436661, 281040, 289232, 256477, 281072, 174593, 420369, 207393, 289332, 174648, 338489, 338490, 281171, 297560, 436832, 436834, 281199, 420463, 346737, 313971, 346740, 420471, 330379, 117396, 346772, 264856, 289434, 346779, 166582, 314040, 158394, 363211, 363230, 264928, 330474, 289518, 199414, 191235, 322316, 117517, 322319, 166676, 207640, 281377, 289576, 191283, 273207, 289598, 281408, 322395, 330609, 207732, 158593, 224145, 355217, 256922, 289690, 289698, 420773, 289703, 363438, 347055, 289727, 273344, 330689, 363458, 379844, 19399, 248796, 347103, 289774, 183279, 347123, 240630, 257024, 330754, 134150, 322570, 330763, 322582, 248872, 322612, 314448, 339030, 281697, 281700, 257125, 273515, 404593, 363641, 363644, 150657, 248961, 330888, 363669, 339100, 380061, 339102, 199839, 429214, 306338, 265379, 249002, 306346, 3246, 421048, 208058, 265412, 290000, 298208, 298212, 298213, 290022, 330984, 298221, 298228, 216315, 388349, 437505, 322824, 257305, 339234, 372009, 412971, 306494, 216386, 224586, 331090, 314710, 372054, 159066, 314720, 380271, 208244, 249204, 290173, 306559, 224640, 314751, 298374, 314758, 314760, 142729, 388487, 314766, 306579, 282007, 290207, 314783, 314789, 282022, 314791, 282024, 396711, 396712, 314798, 380337, 380338, 150965, 380357, 339398, 306631, 306639, 413137, 429542, 282096, 306673, 306677, 191990, 290300, 282114, 372227, 306692, 306693, 323080, 323087, 282129, 175639, 282136, 388632, 396827, 282141, 134686, 347694, 265798, 282183, 265804, 396882, 290390, 44635, 396895, 323172, 282213, 323178, 224883, 314998, 323196, 175741, 339584, 282245, 290443, 323217, 282271, 282273, 282276, 298661, 290471, 282280, 298667, 224946, 110268, 224958, 282303, 323263, 274115, 306890, 241361, 298720, 323331, 323332, 339715, 216839, 339720, 372496, 323346, 339745, 257830, 421672, 315202, 307025, 413521, 216918, 307031, 241495, 282480, 241528, 315264, 339841, 282504, 315273, 315274, 110480, 184208, 372626, 380821, 282519, 298909, 118685, 298920, 200627, 323507, 290745, 274371, 151497, 372701, 298980, 380908, 282612, 315432, 233517, 102445, 176175, 241716, 225351, 315465, 315476, 307289, 315487, 356447, 315497, 315498, 438377, 233589, 233590, 266357, 422019, 241808, 323729, 381073, 233636, 299174, 233642, 405687, 299198, 258239, 389313, 299203, 299209, 372941, 282831, 266449, 307435, 438511, 381172, 184575, 381208, 151839, 233762, 217380, 282919, 332083, 332085, 332089, 315706, 307517, 438596, 332101, 323913, 348492, 323920, 348500, 168281, 332123, 323935, 332127, 242023, 160110, 242033, 291192, 340357, 225670, 242058, 373134, 291224, 242078, 61857, 315810, 61859, 315811, 381347, 340398, 299441, 283064, 127427, 127428, 324039, 373197, 176601, 160225, 291311, 291333, 340490, 283153, 258581, 291358, 283182, 234036, 315960, 348732, 242237, 70209, 348742, 70215, 348749, 381517, 332378, 201308, 111208, 184940, 373358, 389745, 209530, 373375, 152195, 348806, 152203, 316049, 111253, 316053, 111258, 111259, 176808, 299699, 422596, 422599, 291530, 225995, 242386, 422617, 422626, 234217, 299759, 299770, 299776, 242433, 291585, 430849, 291592, 62220, 422673, 430865, 291604, 422680, 283419, 234277, 283430, 152365, 422703, 422709, 152374, 160571, 430910, 160575, 160580, 381773, 201551, 242529, 349026, 357218, 177001, 201577, 308076, 242541, 209783, 209785, 177019, 185211, 308092, 398206, 291712, 381829, 316298, 308112, 349072, 234386, 324507, 390045, 185250, 283558, 185254, 373687, 373706, 316364, 324586, 349171, 349175, 201720, 127992, 357379, 234500, 234514, 308243, 357414, 300084, 308287, 218186, 234577, 341073, 439384, 234587, 300135, 300136, 316520, 357486, 144496, 300150, 300151, 291959, 160891, 300158, 349316, 349318, 373903, 169104, 177296, 185493, 119962, 300187, 300188, 300201, 300202, 373945, 283840, 259268, 283852, 283853, 259280, 316627, 333011, 234733, 234742, 292091, 128251, 439562, 292107, 414990, 251153, 177428, 349462, 382258, 300343, 382269, 300359, 234827, 177484, 406861, 259406, 234831, 283991, 374109, 292195, 333160, 284014, 316787, 382330, 357762, 112017, 234898, 259475, 275859, 357786, 251298, 333220, 374191, 292292, 300487, 300489, 210390, 210391, 210393, 144867, 251378, 308723, 300535, 300536, 259599, 316946, 308756, 398869, 374296, 374299, 308764, 431649, 169518, 431663, 194110, 349763, 218696, 292425, 128587, 333388, 300630, 128599, 333408, 300644, 317032, 415338, 243307, 54893, 325231, 325245, 235135, 194180, 415375, 153251, 300714, 210603, 415420, 333503, 259781, 333517, 333520, 325346, 153319, 325352, 284401, 325371, 194304, 300811, 243472, 366360, 284442, 325404, 399147, 431916, 300848, 259899, 325439, 153415, 341836, 415567, 325457, 317269, 341847, 284507, 350044, 128862, 284512, 284514, 276327, 292712, 423789, 292720, 325492, 276341, 300918, 341879, 317304, 333688, 194429, 112509, 55167, 325503, 333701, 243591, 325518, 333722, 350109, 300963, 292771, 415655, 284587, 292782, 243637, 301008, 153554, 194515, 292836, 292837, 317415, 325619, 432116, 292858, 415741, 333828, 358410, 399373, 317467, 145435, 227370, 325674, 309295, 129076, 243767, 358456, 309345, 227428, 194666, 260207, 432240, 284788, 333940, 292988, 292992, 194691, 227460, 415881, 104587, 235662, 284826, 333991, 284842, 227548, 194782, 301279, 317664, 243962, 375039, 194820, 325905, 325912, 309529, 211235, 432421, 211238, 358703, 358709, 325968, 6481, 366930, 6489, 383332, 383336, 285040, 317820, 211326, 317831, 227725, 252308, 293274, 121245, 285090, 342450, 293303, 293310, 416197, 129483, 342476, 326100, 358882, 342498, 334309, 391655, 432618, 375276, 301571, 342536, 416286, 375333, 244269, 375343, 236081, 23092, 375351, 244281, 301638, 309830, 293448, 55881, 416341, 309846, 244310, 416351, 268899, 39530, 301689, 244347, 326287, 375440, 334481, 318106, 318107, 342682, 285361, 342706, 318130, 293556, 383667, 285373, 39614, 154316, 334547, 96984, 375526, 342762, 342763, 293612, 129773, 154359, 228088, 432893, 162561, 383754, 310036, 285466, 326429, 293664, 326433, 342820, 400166, 293672, 318250, 318252, 301871, 375609, 293693, 252741, 318278, 293711, 244568, 244570, 301918, 293730, 342887, 400239, 228215, 400252, 359298, 359299, 260996, 113542, 228233, 228234, 392074, 56208, 293781, 318364, 310176, 310178, 293800, 236461, 293806, 326581, 326587, 326601, 359381, 433115, 343005, 326635, 187374, 383983, 318461, 293886, 293893, 433165, 384016, 433174, 252958, 203830, 359478, 277597, 113760, 392290, 253029, 285798, 228458, 15471, 351344, 285814, 285820, 392318, 384131, 302216, 326804, 187544, 351390, 253099, 253100, 318639, 367799, 113850, 294074, 302274, 367810, 244940, 195808, 310497, 228588, 302325, 228600, 228609, 261377, 253216, 130338, 261425, 351537, 286013, 294218, 146762, 294219, 318805, 425304, 294243, 163175, 327024, 327025, 318848, 179587, 253317, 384393, 368011, 318864, 318868, 318875, 212382, 310692, 245161, 286129, 286132, 228795, 425405, 302531, 425418, 310732, 64975, 228827, 286172, 187878, 286202, 359930, 286205, 302590, 294400, 253451, 359950, 146964, 253463, 286244, 245287, 245292, 196164, 228943, 286288, 179801, 196187, 343647, 310889, 204397, 138863, 188016, 294529, 286343, 229001, 188048, 425626, 229020, 302754, 40613, 40614, 40615, 229029, 286388, 286391, 384695, 327358, 286399, 212685, 384720, 302802, 278233, 278234, 278240, 212716, 212717, 360177, 229113, 286458, 278272, 319233, 360195, 286494, 294700, 409394, 319292, 360252, 360264, 188251, 376669, 245599, 237408, 425825, 425833, 417654, 188292, 294807, 294809, 376732, 294814, 311199, 319392, 294823, 327596, 294843, 188348, 98239, 237504, 294850, 384964, 344013, 212942, 24532, 294886, 311281, 311282 ]
a086af7ec2b7fa7040bc96c7ee119b9a1f348f9e
09f5e2bb873f526aef4122d13582d5569280abc1
/CarRentalApp/CarRentalApp/ViewController.swift
38c78ec139b28c93be5a1cb0a5ef390afe1496ce
[]
no_license
raymondHong07/CarRentalApplication
0a9206d9a907e85a4de68d749763ccca008c40e2
d36cc054aa49cae8ef4e8fdcadaebb43b7abd7c5
refs/heads/master
2020-12-09T13:59:56.476682
2020-02-13T14:36:19
2020-02-13T14:36:19
233,326,634
1
0
null
null
null
null
UTF-8
Swift
false
false
353
swift
// // ViewController.swift // CarRentalApp // // Created by Raymond Hong on 2019-10-10. // Copyright © 2019 R&R. 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, 323334, 240520, 330762, 328459, 249229, 189326, 162447, 319888, 342547, 317972, 358293, 340502, 316949, 314774, 291223, 188950, 342300, 318109, 342301, 314780, 324512, 316317, 135840, 135842, 172578, 245024, 349478, 340649, 172586, 242346, 215852, 337836, 337068, 336557, 241071, 318129, 243505, 172722, 190391, 334205, 314048, 339520, 219715, 323268, 313029, 320583, 322759, 319815, 326600, 315467, 182474, 337231, 312273, 146645, 196693, 314748, 172513, 250212, 315492, 333798, 247652, 327656, 247653, 247655, 56044, 215408, 324465, 319990, 327033, 56058, 340988, 313341 ]
c6a5147794b78e8f6a23d9db26a3f1ad67f7741f
85ef6ccce475c7001fcf57ac51d19b39d66ab42c
/Notes/Note.swift
abc5bc2bb11afb7f9576ddbd53056024443893f1
[]
no_license
farhanleo23/NotesAWSApp
ebc0ebed3254fd6d57cb666900e65f983c6186ef
0a3d875726f0d31aac1a9125364febb154062348
refs/heads/master
2020-04-06T16:28:23.056213
2019-08-14T21:47:37
2019-08-14T21:47:37
157,621,141
0
0
null
null
null
null
UTF-8
Swift
false
false
1,166
swift
// // Note.swift // MySampleApp // // // Copyright 2018 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved. // // Code generated by AWS Mobile Hub. Amazon gives unlimited permission to // copy, distribute and modify it. // // Source code generated from template: aws-my-sample-app-ios-swift v0.21 // import Foundation import UIKit import AWSDynamoDB @objcMembers class Note: AWSDynamoDBObjectModel, AWSDynamoDBModeling { var _userId: String? var _noteId: String? var _content: String? var _creationDate: NSNumber? var _title: String? class func dynamoDBTableName() -> String { return "notes-mobilehub-1461630165-Note" } class func hashKeyAttribute() -> String { return "_userId" } class func rangeKeyAttribute() -> String { return "_noteId" } override class func jsonKeyPathsByPropertyKey() -> [AnyHashable: Any] { return [ "_userId" : "userId", "_noteId" : "noteId", "_content" : "content", "_creationDate" : "creationDate", "_title" : "title", ] } }
[ -1 ]
48ef2d40dbec0d727f1993091613aac2da700db6
351f37f1ea1c8f5636565903fac12ff0d2c2426d
/naggr/AppDelegate.swift
6bc2d7f4e17dedba5b8dc4bc8016bca57b999cb1
[]
no_license
naggr/naggr-ios
29a0c499a23f8abe8448e2b3df516c5814589bb0
be71e5e97de108e05eff30ebc867645600ec675b
refs/heads/master
2020-03-22T12:57:23.725602
2018-07-08T07:00:19
2018-07-08T07:00:19
140,073,102
0
0
null
null
null
null
UTF-8
Swift
false
false
2,167
swift
// // AppDelegate.swift // naggr // // Created by Jonathan Moallem on 7/7/18. // Copyright © 2018 naggr. 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, 327695, 229391, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 278556, 229405, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 237618, 229426, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 303347, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 98756, 278980, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 320007, 287238, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 213575, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 189039, 172656, 352880, 295538, 189040, 172660, 287349, 189044, 172655, 287355, 287360, 295553, 172675, 295557, 287365, 311942, 303751, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 172702, 303773, 164509, 172705, 287394, 172707, 303780, 287390, 287398, 205479, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 172737, 279231, 287427, 312005, 312006, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303981, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 213895, 304009, 304011, 230284, 304013, 295822, 213902, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 230334, 304063, 304065, 189378, 213954, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 304258, 279683, 66690, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 337067, 165035, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 230763, 410987, 230768, 296305, 312692, 230773, 304505, 304506, 279929, 181626, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 148946, 370130, 222676, 288210, 288212, 288214, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 370146, 280034, 288226, 288229, 280036, 280038, 288232, 288230, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 296446, 321022, 402942, 148990, 296450, 206336, 230916, 230919, 214535, 230923, 304651, 304653, 370187, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 181854, 370272, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 313027, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 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, 321336, 296767, 288576, 345921, 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, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 275606, 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, 280819, 157940, 182517, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 305464, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 354653, 354656, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 240021, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 289210, 305594, 281024, 289218, 289221, 289227, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 240132, 330244, 223752, 150025, 338440, 281095, 223757, 281102, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 19053, 158317, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 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, 281401, 289593, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 142226, 289687, 240535, 297883, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 322550, 134142, 322563, 314372, 330764, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 323260, 282300, 323266, 282310, 323273, 282319, 306897, 241362, 306904, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 298811, 118593, 307009, 413506, 307012, 241475, 298822, 315211, 282446, 307027, 315221, 323414, 315223, 241496, 241498, 307035, 307040, 110433, 282465, 241509, 110438, 298860, 110445, 282478, 315249, 282481, 110450, 315251, 315253, 315255, 339838, 315267, 282499, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 241556, 298901, 44948, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 307211, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 315524, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 176311, 307385, 258235, 307388, 176316, 307390, 307386, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 323854, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 283033, 242075, 291226, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127434, 315856, 127440, 315860, 176597, 283095, 127447, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 135689, 233994, 127497, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 152118, 234038, 234041, 315961, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 373383, 299655, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 234239, 209665, 299778, 234242, 242436, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 201496, 234264, 234266, 234269, 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, 234364, 291711, 234368, 291714, 234370, 291716, 234373, 226182, 234375, 201603, 308105, 226185, 234379, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 324504, 234396, 291742, 324508, 234398, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 324522, 291754, 291756, 234410, 226220, 324527, 234414, 291760, 201650, 324531, 234417, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 226239, 234434, 324546, 324548, 234431, 226245, 234437, 234439, 234443, 291788, 193486, 234446, 193488, 275406, 234449, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 234487, 234490, 234493, 316416, 234496, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 316439, 234520, 234519, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 234543, 234546, 275508, 300085, 234549, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 160835, 234563, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 275545, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 316530, 300148, 234614, 398455, 144506, 234618, 234620, 275579, 234623, 226433, 234627, 275588, 234629, 234634, 234636, 177293, 234640, 275602, 234643, 308373, 324757, 234647, 226453, 234648, 234650, 308379, 275608, 300189, 324766, 119967, 324768, 234653, 283805, 234657, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300223, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 275725, 177424, 283917, 349451, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 300436, 226709, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 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, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 316959, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 194101, 284213, 316983, 194103, 284215, 308790, 284218, 226877, 292414, 284223, 284226, 284228, 243268, 292421, 284231, 226886, 128584, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276052, 284247, 276053, 235097, 243290, 284249, 284251, 317015, 284253, 300638, 243293, 284255, 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, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 358089, 284362, 276170, 284365, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 284379, 284381, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 284399, 358128, 276206, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 325408, 300834, 317221, 227109, 358183, 186151, 276268, 300845, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 292681, 153417, 358224, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 317279, 284511, 227175, 292715, 300912, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 317332, 358292, 284564, 284566, 399252, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 284585, 276395, 292776, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276452, 292839, 276455, 292843, 276460, 292845, 178161, 227314, 325624, 276472, 317435, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 350299, 194654, 227423, 350304, 178273, 309346, 350302, 194660, 350308, 309350, 309348, 292968, 309352, 227426, 227430, 276583, 350313, 350316, 301167, 276590, 350321, 284786, 276595, 301163, 350325, 252022, 227440, 350328, 292985, 301178, 350332, 292989, 301185, 292993, 350339, 317570, 317573, 350342, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 153765, 284837, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 309455, 276689, 309462, 301272, 276699, 194780, 309468, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309491, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227596, 325910, 309530, 342298, 211232, 317729, 276775, 211241, 325937, 325943, 211260, 260421, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 293227, 276843, 293232, 276848, 186744, 211324, 227709, 285061, 366983, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 227810, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 293387, 236043, 342541, 317963, 113167, 55822, 309779, 317971, 309781, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 301636, 318020, 301639, 301643, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 318132, 277173, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 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, 293706, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 277368, 15224, 416639, 416640, 113538, 310147, 416648, 277385, 187274, 39817, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 276579, 293817, 293820, 203715, 326603, 342994, 276586, 293849, 293861, 228327, 228328, 318442, 228330, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 302075, 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, 294026, 302218, 285835, 162964, 384148, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 310486, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 228601, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 277804, 285997, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 310780, 286203, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 146977, 187939, 40484, 294435, 40486, 286246, 294440, 40488, 294439, 294443, 40491, 294445, 196133, 310831, 245288, 286248, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 212560, 400976, 228944, 40533, 40537, 40539, 40541, 278109, 40544, 40548, 40550, 40552, 286312, 40554, 286313, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 294537, 310925, 286354, 278163, 302740, 122517, 278168, 179870, 327333, 229030, 212648, 278188, 302764, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 343757, 212690, 319187, 286420, 278227, 229076, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 319251, 294682, 278306, 188199, 294701, 319280, 278320, 319290, 229192, 302925, 188247, 280021, 188252, 237409, 229233, 294776, 360317, 294785, 327554, 360322, 40840, 40851, 294803, 188312, 294811, 237470, 319390, 40865, 319394, 294817, 294821, 311209, 180142, 343983, 188340, 40886, 319419, 294844, 294847, 309354, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
8e9834429b43296dfaa8dcf860e3a40da0b5990d
1a88d49043f1d0e94c9c596d614109b5e059a330
/iOS/Ordinem/Ordinem/Controller/UserController.swift
14feeddfaf91aef3cd983fecd83365e3a6c1bfa9
[]
no_license
thoma287/Ordinem
8e1cf1235c8b813698653b25e7c1b39a9bfc394e
be9e2054c45cc2c0357ef9eac195a821387847c7
refs/heads/master
2021-01-12T15:19:07.446149
2016-12-04T23:41:04
2016-12-04T23:41:04
71,756,181
0
1
null
2016-11-28T05:08:16
2016-10-24T05:54:58
HTML
UTF-8
Swift
false
false
1,490
swift
// // UserController.swift // Ordinem // // Created by Drew Thomas on 11/22/16. // Copyright © 2016 Ordinem. All rights reserved. // import UIKit class UserController: UIViewController { private var _name = "" private var _lastName = "" private var _id = Int(0) private var _school = "" private var _email = "" private var _password = "" private var _vPassword = "" var name: String{ get{ return _name } set{ _name = newValue } } var lastName: String{ get{ return _lastName } set{ _lastName = newValue } } var id : Int{ get{ return _id } set{ _id = newValue } } var school : String{ get{ return _school } set{ _school = newValue } } var email : String{ get{ return _email } set{ _email = newValue } } var password : String{ get{ return _password } set{ _password = newValue } } var vPassword : String{ get{ return _vPassword } set{ _vPassword = newValue } } func getAllInfo() -> String { return "\(name) \(lastName) \(school) \(email) \(password) \(id)" } }
[ -1 ]
baf6d6842f5d1d3eaff869ae7d2d7aea06a931a9
8482710f4f87ecc2166bd331e3d136d52e969a41
/AutoLayoutAnimations/SpringAnimationsViewController.swift
4d07710bc69100a6abcc2bec647425c4ed7ed61b
[ "MIT" ]
permissive
DigitalLeaves/AutoLayoutAnimations
e4dcd6e89e673890c7e793fb035f5552f92254c6
7ac762d65b47a426bd458231556022e981ca2c34
refs/heads/master
2021-01-20T04:04:27.656386
2017-04-27T19:36:26
2017-04-27T19:36:26
89,633,097
0
0
null
null
null
null
UTF-8
Swift
false
false
1,518
swift
// // SpringAnimationsViewController.swift // AutoLayoutAnimations // // Created by Ignacio Nieto Carvajal on 27/4/17. // Copyright © 2017 Digital Leaves. All rights reserved. // import UIKit class SpringAnimationsViewController: UIViewController { // outlets @IBOutlet weak var boxView: UIView! @IBOutlet weak var leadingConstraint: NSLayoutConstraint! // data var animating = false let initialValue: CGFloat = 16.0 func startAnimations() { if animating { return } animating = true self.switchConstraintForBoxView() UIView.animate(withDuration: 0.6, delay: 0.0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.9, options: [.curveEaseInOut], animations: { self.view.layoutIfNeeded() // NOTE: it needs to be called for the superview "Use this method to force the layout of subviews before drawing" }) { (success) in self.animating = false } } func switchConstraintForBoxView() { if leadingConstraint.constant == initialValue { leadingConstraint.constant = UIScreen.main.bounds.width - 64 - 16 } else { leadingConstraint.constant = initialValue } } // MARK: - Button actions @IBAction func animate(_ sender: Any) { startAnimations() } @IBAction func cancelAndLeave(_ sender: Any) { self.presentingViewController?.dismiss(animated: true, completion: nil) } }
[ -1 ]
3a7b44ac92c0e695345cf1712af01dae3b6d3ee8
6939f2365b2ec19cebd5e92bc5bc55c433e79f75
/Source/FritzVision/ObjectDetection/Helpers/FritzVisionObject.swift
d3c76292ca90d341432b3a4cf140a442857c0e14
[ "Apache-2.0" ]
permissive
sadaks-me/fritz-ai-ios-sdk
20cc7ac2d9b348001b11b9e4fe3e11738d5a52c1
cdf09625d449e8f4152d7ab628b01288616d998b
refs/heads/master
2023-06-18T20:09:28.599155
2021-07-22T19:59:30
2021-07-22T19:59:30
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,648
swift
// // FritzVisionObject.swift // FritzVision // // Created by Christopher Kelly on 4/8/19. // Copyright © 2019 Fritz Labs Incorporated. All rights reserved. // import Foundation @objc(FritzVisionObject) @available(iOS 11.0, *) /// Object identified in object detection model. Contains the label and corresponding BoundingBox of identified model. public class FritzVisionObject: NSObject, FritzPredictionResult { @objc public let detectedLabel: FritzVisionLabel /// BoundingBox of detected object. @objc public let boundingBox: BoundingBox public let bounds: CGSize @objc public var label: String { return self.detectedLabel.label } @objc public var confidence: Double { return self.detectedLabel.confidence } public override var description: String { return String( format: "(%@: %.2f [%.2f, %.2f, %.2f %.2f])", label, confidence, boundingBox.xMax, boundingBox.xMin, boundingBox.yMin, boundingBox.yMax ) } /// Initialize detected object. /// - Parameters: /// - label: Label /// - boundingBox: Bounding box of object /// - bounds: Range of prediction coordinates @objc(initWithLabel:boundingBox:bounds:) public init(label: FritzVisionLabel, boundingBox: BoundingBox, bounds: CGSize) { self.bounds = bounds self.detectedLabel = label self.boundingBox = boundingBox } public func scaled(to dimensions: CGSize) -> FritzVisionObject { let bbox = boundingBox.scaledBy(dimensions) return FritzVisionObject( label: detectedLabel, boundingBox: BoundingBox(from: bbox), bounds: dimensions ) } }
[ -1 ]
041ad180578c91f61bf69ca7366c2f8f505a27ca
5f975169aeb67c7cd0a08683e6b9eee253f84183
/algorithms/easy/1176. Diet Plan Performance.swift
053967de203e897e6b8b1ad0c3cc61762ed0b5a0
[ "MIT" ]
permissive
MultivacX/leetcode2020
6b743ffb0d731eea436d203ccb221be14f2346d3
83bfd675052de169ae9612d88378a704c80a50f1
refs/heads/master
2023-03-17T23:19:45.996836
2023-03-16T07:54:45
2023-03-16T07:54:45
231,091,990
0
0
null
null
null
null
UTF-8
Swift
false
false
710
swift
// 1176. Diet Plan Performance // https://leetcode.com/problems/diet-plan-performance/ // Runtime: 292 ms, faster than 50.00% of Swift online submissions for Diet Plan Performance. // Memory Usage: 17.1 MB, less than 66.67% of Swift online submissions for Diet Plan Performance. class Solution { func dietPlanPerformance(_ calories: [Int], _ k: Int, _ lower: Int, _ upper: Int) -> Int { var ans = 0 var sum = 0 for i in 0..<calories.count { sum += calories[i] if i + 1 < k { continue } if i >= k { sum -= calories[i - k] } if sum < lower { ans -= 1 } else if sum > upper { ans += 1 } } return ans } }
[ -1 ]
0985a04af1376c0118d55071040f5f766c0eff64
e7a6bf16ba90d5abdf9c0a9c09b2cd15a8421749
/Carthage/Checkouts/swift-sdk/Source/DiscoveryV1/Models/QueryPassages.swift
3cb96c283ce7879eb4c3ee704a49fbbf59fc8108
[ "Apache-2.0" ]
permissive
CassioMG/Detektor
7191e72f0527701b29389b166b15188c7ba375a4
f6fd92a9e58c942901e987c78f3ab1bada97d5a4
refs/heads/master
2020-06-03T04:31:08.980634
2019-06-16T02:39:41
2019-06-16T02:39:41
191,437,663
1
0
null
null
null
null
UTF-8
Swift
false
false
1,852
swift
/** * Copyright IBM Corporation 2019 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **/ import Foundation /** QueryPassages. */ public struct QueryPassages: Codable, Equatable { /** The unique identifier of the document from which the passage has been extracted. */ public var documentID: String? /** The confidence score of the passages's analysis. A higher score indicates greater confidence. */ public var passageScore: Double? /** The content of the extracted passage. */ public var passageText: String? /** The position of the first character of the extracted passage in the originating field. */ public var startOffset: Int? /** The position of the last character of the extracted passage in the originating field. */ public var endOffset: Int? /** The label of the field from which the passage has been extracted. */ public var field: String? // Map each property name to the key that shall be used for encoding/decoding. private enum CodingKeys: String, CodingKey { case documentID = "document_id" case passageScore = "passage_score" case passageText = "passage_text" case startOffset = "start_offset" case endOffset = "end_offset" case field = "field" } }
[ -1 ]
4d902d90237b11bc93a85b253907e9cb3f407733
50e33cf896d2d560144216049fe07e400406dda0
/Tests/HTTPBin.swift
b1b63f67648c2fca191cf5a201592caa9543737f
[ "MIT" ]
permissive
propellerlabs/PropellerKit
1c952fd61cd519d9b7a3765040ae2ca52b5ccba5
4fd4c79dbf028d2f0f1e98df9807dc3a56535ac6
refs/heads/master
2021-01-18T19:15:50.941373
2018-10-17T05:04:40
2018-10-17T05:04:40
80,877,312
5
0
null
2017-10-19T17:04:54
2017-02-03T23:10:52
Swift
UTF-8
Swift
false
false
1,052
swift
// // HTTPBin.swift // PropellerKit // // Created by Roy McKenzie on 2/8/17. // Copyright © 2017 Propeller. All rights reserved. // import Foundation import JSONCodable import PropellerNetwork struct HTTPBin { let user: User } extension HTTPBin { public static func createUser(name: String) -> Resource<HTTPBin> { let params = [ "name": name ] return HTTPBin.resource(configuration: ResourceConfiguration.default, urlPath: "/post", method: .post, parameters: params) } } extension HTTPBin: JSONCodable { init(object: JSONObject) throws { let decoder = JSONDecoder(object: object) self.user = try decoder.decode("json") } } struct User { let name: String } extension User: JSONCodable { init(object: JSONObject) throws { let decoder = JSONDecoder(object: object) self.name = try decoder.decode("name") } }
[ -1 ]
7f2c8578b7399fcd37ba94b45fb32760cf8fc120
3fe81cfe82d716f2ce1c28959c301df96625e9fb
/Traktv/PosterItemViewModel.swift
cb1384b9911f473c072388ce5103f0b438c7df48
[]
no_license
stefanomondino/trakt
f35f5338b5f49629c564fb0386a29012fba91091
badc6cef54cd8ebd3ec5cff964d8b04b8a1ec780
refs/heads/master
2021-06-27T02:21:28.079899
2018-05-04T07:41:27
2018-05-04T07:41:27
96,633,433
0
0
null
null
null
null
UTF-8
Swift
false
false
631
swift
// // PosterItemViewModel.swift // Maze // // Created by Stefano Mondino on 25/06/17. // Copyright © 2017 Cristian Bellomo. All rights reserved. // import Foundation import RxSwift import Boomerang final class PosterItemViewModel : ItemViewModelType { var model:ItemViewModelType.Model var itemIdentifier:ListIdentifier = View.poster var poster : ObservableImage init(model: Image) { self.model = model poster = model.getImage() } init (with posterable: Posterable) { self.model = posterable self.poster = posterable.poster?.getImage() ?? UIImage().getImage() } }
[ -1 ]