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
2f2c785a7bc64a96095fa9fa3caa4d40a7d80d68
14fdb060b872917fb83b84a0525817a192815eaf
/Unilib/Sources/Persistence.swift
3cab553d531442633cd4cb646c1a4e698c6d96d1
[ "MIT" ]
permissive
davidbjames/Unilib
e7058233f0441237150941d3b43de6b0cdb722b1
1d572cff81d54240953ad9170310b478dd0b276f
refs/heads/master
2022-07-21T04:23:17.831487
2022-07-14T18:46:47
2022-07-14T18:46:47
69,879,759
0
0
null
2017-07-26T15:07:16
2016-10-03T14:39:53
Swift
UTF-8
Swift
false
false
1,081
swift
// // Persistence.swift // Unilib // // Created by David James on 6/10/22. // Copyright © 2022 David B James. All rights reserved. // import Foundation public extension UserDefaults { /// Given a Codable type, decode and retreive it from user defaults. func codable<T:Codable>(_:T.Type, forKey key:String, debug:Bool = false) -> T? { guard let data = object(forKey:key) as? Data else { if debug { print("No Codable item of type \(T.self) for key \(key) exists in UserDefaults.") } return nil } do { let object = try JSONDecoder().decode(T.self, from:data) return object } catch { if debug { print(error) } return nil } } /// Given a Codable type, encode and store it in user defaults. func setCodable<T:Codable>(_ object:T, forKey key:String, debug:Bool = false) { do { let data = try JSONEncoder().encode(object) set(data, forKey:key) } catch { if debug { print(error) } } } }
[ -1 ]
da1ad8b8536d6aca037c4c054214c8318ebdbba6
994802439d088799842c0a742c17f59b0c3df034
/Phi6 Alpha/PhysicsCategory.swift
bdc15a7d0b993b493075eb36fdf126df37e1fb18
[]
no_license
SalvatoreCapuozzo/Phi6-Final
7d29777f71fe4b31870d6eb3a912ad75447a4fd0
ed0a16f68d39b77e35fb10a7e5ff36d094e805d3
refs/heads/master
2021-01-21T10:29:51.762622
2017-03-01T09:03:21
2017-03-01T09:03:21
83,440,090
0
0
null
null
null
null
UTF-8
Swift
false
false
448
swift
// // PhysicsCategory.swift // Phi6 Alpha // // Created by Giuseppe Sannino on 03/02/2017. // Copyright © 2017 Salvatore Capuozzo. All rights reserved. // import Foundation struct PhysicsCategory{ static let None : UInt32 = 0 static let Phisphere : UInt32 = 0b0001 static let Sensor : UInt32 = 0b0010 static let Fulcrum : UInt32 = 2 static let Sphere : UInt32 = 8 static let Rope : UInt32 = 0 }
[ -1 ]
1fe2e4ce46be286e01fe6303668cfbdfbdd54750
324535dac7670c473cd7d1d95c527ae7fd769478
/Anagram copy/Anagram/ViewController + GameLogic.swift
f6c533a101dd4bb7701b8b4c4c3eec5325f9f4ce
[]
no_license
FuzzyBuckBeak/SampleApps
8266a57657569c753acde848485836d7d6dc3fc6
0a6a8df20b1678f05f8f125eb8ae4ada71cf4c76
refs/heads/master
2020-05-04T14:47:30.992913
2019-05-09T07:16:23
2019-05-09T07:16:23
179,210,853
0
0
null
null
null
null
UTF-8
Swift
false
false
1,571
swift
// // ViewController + GameLogic.swift // Anagram // // Created by Apo on 4/14/19. // Copyright © 2019 Apo. All rights reserved. // import UIKit extension ViewController { func startGame() { gameView.chosenWordLabel.text = allWords.randomElement() usedWords.removeAll(keepingCapacity: true) } func isValid(word: String, mainWord: String) -> Bool { let mainWord = mainWord.lowercased() let subWord = word.lowercased() if isPossible(mainWord: mainWord, subWord: subWord), !isOriginal(word: subWord), isReal(word: word) { return true } return false } private func isPossible(mainWord: String, subWord: String) -> Bool { var tempWord = mainWord.lowercased() for letter in subWord { guard let position = tempWord.firstIndex(of: letter) else { return false } tempWord.remove(at: position) } return true } private func isOriginal(word: String) -> Bool { return usedWords.contains(word) } private func isReal(word: String) -> Bool { // if word == title { return .startWord(ScramblerConstants.startWordError.title, ScramblerConstants.startWordError.message) } let checker = UITextChecker() let range = NSRange(location: 0, length: word.utf16.count) let value = checker.rangeOfMisspelledWord(in: word, range: range, startingAt: 0, wrap: false, language: "en").location return value == NSNotFound ? true : false } }
[ -1 ]
f972fe85c235c69f7bd4d7168c96904966e5642d
64565e5898dfd2c7eb9f42ab7a1b3399bc9bbb3a
/PrincessGuide/Toolbox/BoxManager/View/CharasCell.swift
551a9fadcf055ddbaa65b8e60149d92ed3ee20b4
[ "Apache-2.0" ]
permissive
HeeSeopKim/PrincessGuide
ecfad52f4de3c28b86db8234c749a6cd98606926
ca7052086fdf039d3256d17c170f185533d87cf1
refs/heads/master
2020-06-16T01:24:29.728011
2019-06-30T11:26:55
2019-06-30T11:30:43
null
0
0
null
null
null
null
UTF-8
Swift
false
false
4,914
swift
// // CharasCell.swift // PrincessGuide // // Created by zzk on 2018/7/5. // Copyright © 2018 zzk. All rights reserved. // import UIKit import Eureka import Gestalt protocol CharasCellDelegate: class { func charasCell(_ charasCell: CharasCell, didSelect chara: Chara) func charasCell(_ charasCell: CharasCell, move fromIndex: Int, to toIndex: Int) } class CharasCell: Cell<[Chara]>, CellType, UICollectionViewDelegate, UICollectionViewDataSource { weak var delegate: CharasCellDelegate? let layout = UICollectionViewFlowLayout() private(set) lazy var collectionView = UICollectionView(frame: .zero, collectionViewLayout: self.layout) let charaView = CharaView() override func setup() { super.setup() selectedBackgroundView = UIView() // preservesSuperviewLayoutMargins = true ThemeManager.default.apply(theme: Theme.self, to: self) { (themeable, theme) in themeable.selectedBackgroundView?.backgroundColor = theme.color.tableViewCell.selectedBackground themeable.backgroundColor = theme.color.tableViewCell.background } contentView.addSubview(collectionView) collectionView.delegate = self collectionView.dataSource = self collectionView.register(CharaCollectionViewCell.self, forCellWithReuseIdentifier: CharaCollectionViewCell.description()) collectionView.snp.makeConstraints { (make) in make.left.equalTo(readableContentGuide) make.right.equalTo(readableContentGuide) make.top.bottom.equalToSuperview() } layout.itemSize = CGSize(width: 64, height: 83) collectionView.contentInset = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0) collectionView.scrollsToTop = false collectionView.isScrollEnabled = false collectionView.backgroundColor = .clear let longPress = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(_:))) collectionView.addGestureRecognizer(longPress) selectionStyle = .none height = { [unowned self] in self.layout.invalidateLayout() self.collectionView.layoutIfNeeded() return max(44, self.collectionView.contentSize.height + self.collectionView.contentInset.top + self.collectionView.contentInset.bottom) } } @objc private func handleLongPress(_ gesture: UILongPressGestureRecognizer) { switch gesture.state { case .began: guard let selectedIndexPath = collectionView.indexPathForItem(at: gesture.location(in: collectionView)) else { break } collectionView.beginInteractiveMovementForItem(at: selectedIndexPath) case .changed: collectionView.updateInteractiveMovementTargetPosition(gesture.location(in: gesture.view!)) case .ended: collectionView.endInteractiveMovement() default: collectionView.cancelInteractiveMovement() } } private var charas = [Chara]() func configure(for box: Box) { if let set = box.charas, let charas = set.array as? [Chara] { self.charas = charas } collectionView.reloadData() } func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return charas.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CharaCollectionViewCell.description(), for: indexPath) as! CharaCollectionViewCell let chara = charas[indexPath.item] cell.configure(for: chara) return cell } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { delegate?.charasCell(self, didSelect: charas[indexPath.item]) } func collectionView(_ collectionView: UICollectionView, canMoveItemAt indexPath: IndexPath) -> Bool { return true } func collectionView(_ collectionView: UICollectionView, moveItemAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { let source = charas.remove(at: sourceIndexPath.item) charas.insert(source, at: destinationIndexPath.item) delegate?.charasCell(self, move: sourceIndexPath.item, to: destinationIndexPath.item) } override func update() { super.update() detailTextLabel?.text = nil } } final class CharasRow: Row<CharasCell>, RowType { required public init(tag: String?) { super.init(tag: tag) } }
[ -1 ]
4a91ab7162cf95dc1287502a93607824cafe1635
9f7f9a160bb21ace7ae866542a907fa722592b7b
/TRETJapanNFCReader/FeliCa/Octopus/OctopusCardData.swift
5f5b16d3ee33d80ec715d0a3e1eb4866690cde58
[ "MIT", "LicenseRef-scancode-unicode" ]
permissive
sakiwei/TRETJapanNFCReader
b9a7c5e463bb4bbdb4cc1938053b58508e3ba639
54a7bbe057f36706b9733c6760599be766d87351
refs/heads/master
2020-08-06T00:44:07.451531
2019-10-04T09:36:01
2019-10-04T09:36:01
212,774,820
1
0
MIT
2019-10-04T08:59:13
2019-10-04T08:59:10
null
UTF-8
Swift
false
false
1,447
swift
// // OctopusCardData.swift // TRETJapanNFCReader // // Created by treastrain on 2019/09/20. // Copyright © 2019 treastrain / Tanaka Ryoga. All rights reserved. // import Foundation /// Octopus Card Data public struct OctopusCardData: FeliCaCardData { public var type: FeliCaCardType = .octopus public var idm: String public var systemCode: FeliCaSystemCode public var data: [FeliCaServiceCode : [Data]] = [:] { didSet { self.convert() } } /// The real balance is (`balance` - Offset) / 10 /// (e.g. (4557 - 350) / 10 = HK$420.7 ) public var balance: Int? @available(iOS 13.0, *) public init(idm: String, systemCode: FeliCaSystemCode) { self.idm = idm self.systemCode = systemCode } public mutating func convert() { for (key, value) in self.data { let blockData = value switch OctopusCardItemType(key) { case .balance: self.convertToBalance(blockData) case .none: break } } } private mutating func convertToBalance(_ blockData: [Data]) { let data = blockData.first! var balance = 0 balance += Int(UInt32(data[0]) << 24) balance += Int(UInt32(data[1]) << 16) balance += Int(UInt32(data[2]) << 8) balance += Int(data[3]) self.balance = balance } }
[ -1 ]
b778697d1e80f33fca9b0f858e87409a47527fd6
f82fabe72ad54dc64dc262146298c27ca063bc08
/AnimalsApp/View/MapView.swift
42b2c0faf6a8680bfe0a920cb84603d9efbb459d
[]
no_license
amrhesham95/SwiftUI_AnimalsApp
3f32cb8c241ad8fbf4c462c44e41e4d9706ca488
cb229016069056832cc30fc87251bce006842b1a
refs/heads/main
2023-06-01T18:26:37.464045
2021-06-22T10:28:41
2021-06-22T10:28:41
377,485,285
0
0
null
null
null
null
UTF-8
Swift
false
false
2,794
swift
// // MapView.swift // AnimalsApp // // Created by Amr Hesham on 16/06/2021. // import SwiftUI import MapKit struct MapView: View { // MARK: - Properties @State private var region: MKCoordinateRegion = { var mapCoordinates = CLLocationCoordinate2D(latitude: 6.600286, longitude: 16.4377599) var mapZoomLevel = MKCoordinateSpan(latitudeDelta: 70.0, longitudeDelta: 70.0) var mapRegion = MKCoordinateRegion(center: mapCoordinates, span: mapZoomLevel) return mapRegion }() let locations: [NationalParkLocation] = Bundle.main.decode("locations.json")! // MARK: - Body var body: some View { Map(coordinateRegion: $region, annotationItems: locations, annotationContent: { item in // MapPin(coordinate: item.location, tint: .accentColor) // MapMarker(coordinate: item.location, tint: .accentColor) // MapAnnotation(coordinate: item.location) { // Image("logo") // .resizable() // .scaledToFit() // .frame(width:32, height: 32, alignment: .center) // } // Annotation MapAnnotation(coordinate: item.location) { MapAnnotationView(location: item) } // Annotation }) // Map .overlay( HStack(alignment: .center, spacing: 12) { Image("compass") .resizable() .scaledToFit() .frame(width: 48, height: 48, alignment: .center) VStack(alignment: .leading, spacing: 4) { HStack { Text("Latitude") .font(.footnote) .fontWeight(.bold) .foregroundColor(.accentColor) Spacer() Text("\(region.center.latitude)") } Divider() HStack { Text("Longitude") .font(.footnote) .fontWeight(.bold) .foregroundColor(.accentColor) Spacer() Text("\(region.center.longitude)") } } } // HStack .padding(.vertical, 12) .padding(.horizontal, 12) .background(Color.black .cornerRadius(8) .opacity(0.6) ) .padding(), alignment: .top ) } } struct MapVIew_Previews: PreviewProvider { static var previews: some View { MapView() } }
[ 358599, 358498, 358527 ]
12c57f0823f778c8e72598e4d1300e08dde0297b
9390828bd76e91a34f2e3f73138af8d90e19a42d
/Account/Tests/AccountTests/Feedly/FeedlyRefreshAccessTokenOperationTests.swift
6058b5888ba2ae83782aace5f9d5be36a3baefe7
[ "MIT" ]
permissive
kavon/NetNewsWire
aca7b95f6806ef43a0b3b87b6db5ea31531148e4
ed64d47268aae9f499d6829c3f767aabae557632
refs/heads/concur
2023-01-27T15:43:26.623985
2020-12-09T01:06:52
2020-12-09T01:06:52
304,703,435
6
0
MIT
2020-10-29T23:22:21
2020-10-16T18:05:45
Swift
UTF-8
Swift
false
false
7,469
swift
// // FeedlyRefreshAccessTokenOperationTests.swift // AccountTests // // Created by Kiel Gillard on 4/11/19. // Copyright © 2019 Ranchero Software, LLC. All rights reserved. // import XCTest @testable import Account import RSWeb import RSCore import Secrets class FeedlyRefreshAccessTokenOperationTests: XCTestCase { private var account: Account! private let support = FeedlyTestSupport() override func setUp() { super.setUp() account = support.makeTestAccount() } override func tearDown() { if let account = account { support.destroy(account) } super.tearDown() } class TestRefreshTokenService: OAuthAccessTokenRefreshing { var mockResult: Result<OAuthAuthorizationGrant, Error>? var refreshAccessTokenExpectation: XCTestExpectation? var parameterTester: ((String, OAuthAuthorizationClient) -> ())? func refreshAccessToken(with refreshToken: String, client: OAuthAuthorizationClient, completion: @escaping (Result<OAuthAuthorizationGrant, Error>) -> ()) { guard let result = mockResult else { XCTFail("Missing mock result. Test may time out because the completion will not be called.") return } parameterTester?(refreshToken, client) DispatchQueue.main.async { completion(result) self.refreshAccessTokenExpectation?.fulfill() } } } func testCancel() { let service = TestRefreshTokenService() service.refreshAccessTokenExpectation = expectation(description: "Did Call Refresh") service.refreshAccessTokenExpectation?.isInverted = true let client = support.makeMockOAuthClient() let refresh = FeedlyRefreshAccessTokenOperation(account: account, service: service, oauthClient: client, log: support.log) // If this expectation is not fulfilled, the operation is not calling `didFinish`. let completionExpectation = expectation(description: "Did Finish") refresh.completionBlock = { _ in completionExpectation.fulfill() } MainThreadOperationQueue.shared.add(refresh) MainThreadOperationQueue.shared.cancelOperations([refresh]) waitForExpectations(timeout: 1) XCTAssertTrue(refresh.isCanceled) } class TestRefreshTokenDelegate: FeedlyOperationDelegate { var error: Error? var didFailExpectation: XCTestExpectation? func feedlyOperation(_ operation: FeedlyOperation, didFailWith error: Error) { self.error = error didFailExpectation?.fulfill() } } func testMissingRefreshToken() { support.removeCredentials(matching: .oauthRefreshToken, from: account) let service = TestRefreshTokenService() service.refreshAccessTokenExpectation = expectation(description: "Did Call Refresh") service.refreshAccessTokenExpectation?.isInverted = true let client = support.makeMockOAuthClient() let refresh = FeedlyRefreshAccessTokenOperation(account: account, service: service, oauthClient: client, log: support.log) let delegate = TestRefreshTokenDelegate() delegate.didFailExpectation = expectation(description: "Did Fail") refresh.delegate = delegate // If this expectation is not fulfilled, the operation is not calling `didFinish`. let completionExpectation = expectation(description: "Did Finish") refresh.completionBlock = { _ in completionExpectation.fulfill() } MainThreadOperationQueue.shared.add(refresh) waitForExpectations(timeout: 1) XCTAssertNotNil(delegate.error, "Should have failed with error.") if let error = delegate.error { switch error { case let error as TransportError: switch error { case .httpError(status: let status): XCTAssertEqual(status, 403, "Expected 403 Forbidden.") default: XCTFail("Expected 403 Forbidden") } default: XCTFail("Expected \(TransportError.httpError(status: 403))") } } } func testRefreshTokenSuccess() { let service = TestRefreshTokenService() service.refreshAccessTokenExpectation = expectation(description: "Did Call Refresh") let mockAccessToken = Credentials(type: .oauthAccessToken, username: "Test", secret: UUID().uuidString) let mockRefreshToken = Credentials(type: .oauthRefreshToken, username: "Test", secret: UUID().uuidString) let grant = OAuthAuthorizationGrant(accessToken: mockAccessToken, refreshToken: mockRefreshToken) service.mockResult = .success(grant) let client = support.makeMockOAuthClient() service.parameterTester = { serviceRefreshToken, serviceClient in if let accountRefreshToken = try! self.account.retrieveCredentials(type: .oauthRefreshToken) { XCTAssertEqual(serviceRefreshToken, accountRefreshToken.secret) } else { XCTFail("Could not verify correct refresh token used.") } XCTAssertEqual(serviceClient, client) } let refresh = FeedlyRefreshAccessTokenOperation(account: account, service: service, oauthClient: client, log: support.log) // If this expectation is not fulfilled, the operation is not calling `didFinish`. let completionExpectation = expectation(description: "Did Finish") refresh.completionBlock = { _ in completionExpectation.fulfill() } MainThreadOperationQueue.shared.add(refresh) waitForExpectations(timeout: 1) do { let accessToken = try account.retrieveCredentials(type: .oauthAccessToken) XCTAssertEqual(accessToken, mockAccessToken) let refreshToken = try account.retrieveCredentials(type: .oauthRefreshToken) XCTAssertEqual(refreshToken, mockRefreshToken) } catch { XCTFail("Could not verify refresh and access tokens because \(error).") } } func testRefreshTokenFailure() { let accessTokenBefore: Credentials let refreshTokenBefore: Credentials do { guard let accessToken = try account.retrieveCredentials(type: .oauthAccessToken), let refreshToken = try account.retrieveCredentials(type: .oauthRefreshToken) else { XCTFail("Initial refresh and/or access token does not exist.") return } accessTokenBefore = accessToken refreshTokenBefore = refreshToken } catch { XCTFail("Caught error getting initial refresh and access tokens because \(error).") return } let service = TestRefreshTokenService() service.refreshAccessTokenExpectation = expectation(description: "Did Call Refresh") service.mockResult = .failure(URLError(.timedOut)) let client = support.makeMockOAuthClient() service.parameterTester = { serviceRefreshToken, serviceClient in if let accountRefreshToken = try! self.account.retrieveCredentials(type: .oauthRefreshToken) { XCTAssertEqual(serviceRefreshToken, accountRefreshToken.secret) } else { XCTFail("Could not verify correct refresh token used.") } XCTAssertEqual(serviceClient, client) } let refresh = FeedlyRefreshAccessTokenOperation(account: account, service: service, oauthClient: client, log: support.log) // If this expectation is not fulfilled, the operation is not calling `didFinish`. let completionExpectation = expectation(description: "Did Finish") refresh.completionBlock = { _ in completionExpectation.fulfill() } MainThreadOperationQueue.shared.add(refresh) waitForExpectations(timeout: 1) do { let accessToken = try account.retrieveCredentials(type: .oauthAccessToken) XCTAssertEqual(accessToken, accessTokenBefore) let refreshToken = try account.retrieveCredentials(type: .oauthRefreshToken) XCTAssertEqual(refreshToken, refreshTokenBefore) } catch { XCTFail("Could not verify refresh and access tokens because \(error).") } } }
[ -1 ]
27b2990973cab72e773bc40aa3dc119616422dd5
da4b23148fdc3c7432ebd503a77f35e4ce1a21ac
/Reto2Velocimetro.playground/Contents.swift
b63d561504ba4a2b4630c81e63ac46635a82c413
[]
no_license
GonzaloiOS/swiftClass
e3b9527869d66914dddf897a86d385b3ff80fe19
c97f5d55cf678800c397ad5927af4e87a8b19bae
refs/heads/master
2021-01-10T16:42:27.361592
2016-04-26T21:08:50
2016-04-26T21:08:50
48,618,256
0
0
null
null
null
null
UTF-8
Swift
false
false
1,578
swift
//: Reto 2, por Gonzalo Linares Navarro import UIKit //Creando enum enum Velocidades : Int { case Apagado = 0, VelocidadBaja = 20, VelocidadMedia = 50, VelocidadAlta = 120 init(velocidadInicial: Velocidades){//init del enum puesto en self self = velocidadInicial } } //creando clase class Auto { var velocidad : Velocidades init (){ //init de la clase que hace init en el enum self.velocidad = Velocidades(velocidadInicial: .Apagado) } func cambioDeVelocidad ( ) -> (actual:Int, velocidadEnCadena:String){ let tuplaResponse :(Int,String) = (velocidad.rawValue,String(velocidad))//también podría evaluar cada caso y enviar un String de velocidad diferente switch velocidad{ case .Apagado: velocidad = .VelocidadBaja return tuplaResponse case .VelocidadBaja: velocidad = .VelocidadMedia return tuplaResponse case .VelocidadMedia: velocidad = .VelocidadAlta return tuplaResponse case .VelocidadAlta: velocidad = .VelocidadMedia return tuplaResponse } } } //Llamado clase var auto = Auto() //itera for count in 0...20 { let tuplaDeRespuesta = auto.cambioDeVelocidad() print("\(tuplaDeRespuesta.actual),"+tuplaDeRespuesta.velocidadEnCadena) }
[ -1 ]
9ad3b081e450d0446b0bed678c15c0e7d0bf60a5
616f6d93cbcdb822ae0d5a352c453eae832addc8
/Hello Swift/HelloSwift_050.playground/Pages/Swift 嵌套类型.xcplaygroundpage/Contents.swift
07461d925d27ca814fb994653cbca6a790a3d711
[]
no_license
summertian4/iOS-Swift
27b2f21801f358e320ffb1907b7487e8ab05e746
33dc916feeb138da74d158ab199ba140ea1ade34
refs/heads/master
2020-05-21T10:11:38.644581
2017-08-16T07:13:39
2017-08-16T07:13:39
69,441,768
0
1
null
null
null
null
UTF-8
Swift
false
false
235
swift
//: [Previous](@previous) import Foundation import UIKit class UI { enum Theme { case DayMode case NightMode } var fontColor: UIColor! var backgourndColor: UIColor! } //: [Next](@next)
[ -1 ]
0397644d05de9f4df87907586b3fa2d0dafddff3
ca12ebf24c73ae7333548ae0747e4d84a90bb47d
/Sources/Parser/Errors.swift
096cedf0136d75a85e23c457686881f5208cbd86
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
qq565999484/SwiftMark
482d0c8f3b80d95152e046d12f8690ba6c79786a
da8774e8abc02202567ede11a8e9162035b28922
refs/heads/master
2020-03-30T03:10:21.745588
2017-09-14T14:28:50
2017-09-14T14:28:50
150,673,318
1
0
NOASSERTION
2018-09-28T02:16:05
2018-09-28T02:16:05
null
UTF-8
Swift
false
false
1,527
swift
//The MIT License (MIT) // //Copyright (c) 2017 Caleb Kleveter // //Permission is hereby granted, free of charge, to any person obtaining a copy //of this software and associated documentation files (the "Software"), to deal //in the Software without restriction, including without limitation the rights //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //copies of the Software, and to permit persons to whom the Software is //furnished to do so, subject to the following conditions: // //The above copyright notice and this permission notice shall be included in all //copies or substantial portions of the Software. // //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE //SOFTWARE. public enum ParserError: Error { case expectedText case expectedHeader1 case expectedHeader2 case expectedHeader3 case expectedHeader4 case expectedHeader5 case expectedHeader6 case expectedBold case expectedItalic case expectedLink case expectedImage case expectedHorizontalRule case expectedBreak case expectedCode case expectedBlockquote }
[ 395267, 196612, 395271, 395274, 395278, 395280, 395281, 395282, 395283, 395286, 395287, 395289, 395290, 196638, 395295, 395296, 196641, 98341, 61478, 98344, 98345, 98349, 124987, 174139, 174141, 354364, 229438, 229440, 229441, 395328, 174148, 229444, 395332, 327751, 174152, 395333, 395334, 174159, 229456, 174161, 112721, 106580, 106582, 106585, 112730, 106586, 174170, 174171, 106587, 235658, 229524, 303255, 303256, 125087, 215205, 215211, 215212, 241846, 241852, 241859, 241862, 241864, 317640, 241866, 241870, 262357, 241878, 262359, 241880, 241877, 241894, 241897, 241901, 241903, 241904, 241907, 241908, 241910, 260342, 241916, 141565, 141569, 241923, 241928, 241929, 141577, 141578, 241930, 97339, 241934, 241936, 241937, 141586, 141588, 12565, 227604, 227607, 241944, 227608, 12569, 141593, 227612, 141597, 141598, 141599, 141600, 227614, 141594, 141595, 141596, 141603, 241952, 241957, 141606, 141607, 141608, 241962, 289068, 289067, 141612, 289062, 12592, 289074, 289078, 141627, 141629, 141632, 241989, 213319, 213320, 241993, 241992, 227610, 141640, 141642, 241998, 241999, 141643, 241996, 242002, 141651, 242006, 282967, 141655, 215384, 141660, 168285, 141663, 141664, 141670, 141677, 141681, 334196, 190840, 190841, 430456, 190843, 190844, 430458, 375168, 287106, 141700, 141702, 430475, 141707, 430476, 141711, 430483, 217492, 217494, 197018, 197019, 197021, 295330, 295331, 197029, 430502, 168359, 303550, 160205, 381398, 305638, 223741, 61971, 191006, 191007, 57893, 57896, 328232, 57899, 57900, 295467, 57905, 57906, 336445, 336446, 336450, 336451, 336453, 336454, 336455, 336457, 336460, 336464, 336465, 336467, 336469, 336470, 336471, 336472, 336473, 336474, 336478, 336479, 336480, 336482, 336483, 336489, 297620, 297634, 297636, 135861, 242361, 244419, 66247, 244427, 248524, 127693, 244430, 127695, 66261, 127702, 127703, 248541, 127714, 334563, 334564, 334562, 127716, 62183, 127727, 127729, 318199, 318200, 142073, 164601, 334590, 318207, 244480, 334591, 334596, 228512, 334600, 318218, 334603, 318220, 318221, 334602, 318223, 334606, 334607, 318231, 318233, 318234, 318236, 318237, 318241, 318246, 187175, 187176, 187174, 187177, 187179, 187180, 314165, 314167, 316216, 396088, 314170, 396089, 396091, 396092, 396094, 148287, 316224, 396098, 314179, 279367, 396104, 396110, 396112, 299858, 396114, 396115, 396118, 396119, 396120, 396122, 396123, 396125, 396126, 396127, 396128, 396129, 299880, 396137, 162668, 299884, 187248, 396147, 396151, 248696, 396153, 187258, 187259, 322430, 60304, 60319, 60321, 60323, 60324, 185258, 60331, 185259, 23469, 185262, 23470, 23472, 60337, 23473, 23474, 23475, 23476, 185267, 23479, 287674, 185275, 23483, 23487, 281539, 23492, 23494, 23499, 228306, 23508, 23515, 23517, 23523, 203755, 23531, 23533, 152560, 23552, 171008, 23559, 23561, 23572, 23574, 23575, 23580, 23581, 23585, 23590, 23591, 23594, 23596, 23599, 189488, 97327, 187442, 189491, 189490, 187444, 189492, 189493, 187447, 23601, 97329, 144435, 23607, 144437, 341054, 341055, 144441, 341057, 341058, 341059, 341060, 23612, 341062, 341063, 23616, 222278, 341066, 341068, 185428, 203862, 285782, 285785, 115805, 115806, 115807, 293982, 115809, 115810, 185446, 115817, 242794, 312427, 115819, 115820, 185452, 185454, 115823, 185455, 115825, 115827, 242803, 115829, 242807, 142459, 294016, 205959, 40088, 312473, 189594, 208026, 40092, 208027, 312478, 312479, 312480, 312481, 189598, 40095, 208029, 40101, 208033, 208039, 27810, 312489, 228513, 189607, 312492, 189609, 40110, 189610, 189612, 312493, 189617, 312497, 189619, 312498, 189621, 312501, 312504, 189623, 189626, 322751, 38081, 292041, 292042, 181455, 292049, 152789, 152821, 152825, 294138, 294137, 206094, 206097, 294162, 206098, 206102, 206104, 206108, 206109, 181533, 294181, 27943, 27944, 181544, 294183, 27948, 312476, 181553, 173368, 206138, 173379, 152906, 152907, 152908, 152909, 152910, 290123, 312482, 290125, 290126, 290127, 290130, 312483, 290135, 290136, 245081, 290137, 290139, 378208, 64865, 222562, 222563, 222566, 228717, 173425, 228721, 222579, 222587, 222590, 222591, 222596, 177543, 222600, 363913, 222599, 222603, 222604, 222605, 222601, 54669, 222606, 222607, 279954, 54673, 54692, 152998, 54698, 54701, 54703, 298431, 370118, 157151, 222689, 222692, 157157, 222693, 112111, 112115, 112120, 112131, 112145, 355859, 362020, 362022, 116267, 282156, 34359, 34362, 34365, 173631, 316993, 173634, 173635, 316995, 173637, 316997, 317001, 173646, 106085, 319081, 319085, 319088, 300660, 300661, 300662, 319094, 300663, 319103, 175760, 175763, 394905, 394908, 394910, 394912, 339622, 147113, 286378, 147115, 147118, 144438, 292544, 144442, 108230, 144443, 144444, 341052, 108240, 144445, 34516, 108245, 212694, 34531, 192230, 192231, 192232, 296681, 34538, 34540, 296685, 34541, 216812, 216814, 216815, 216816, 216818, 216819, 296684, 296687, 216822, 296688, 296691, 296692, 216826, 296698, 216828, 216829, 296699, 296700, 216832, 216833, 216834, 296703, 216836, 216837, 216838, 296707, 296708, 296710, 296712, 296713, 313101, 313104, 313108, 313111, 313112, 149274, 149275, 149280, 159523, 321342, 210755, 210756, 210757, 210758, 321353, 218959, 218960, 218963, 218964, 223065, 180058, 229209, 223069, 229213, 169824, 229217, 169826, 292709, 237413, 169830, 128873, 128875, 169835, 223085, 128876, 169837, 128878, 223086, 223087, 128881, 128884, 128882, 128883, 141181, 327550, 108419, 169860, 108421, 141198, 108431, 108432, 108436, 219033, 108446, 108448, 219040, 141219, 219043, 219044, 141223, 141228, 141229, 108460, 108462, 229294, 229295, 141235, 141641, 319426, 141264, 40931, 40932, 141284, 141290, 40940, 40941, 141293, 395247, 141295, 174063, 231406, 174066, 174067, 237559, 174074 ]
0361881e3e6f27510b07903733e9d0a2e546c2c2
9ecd65ee0acf6b1b3ff750f4dabe1f746df0cea7
/TodoList/Third-Parties/SATextField.swift
6c0f0c3f277d0fff012844e027fac5f69535fb14
[]
no_license
FlodCoding/IOS-TodoListDemo
5650fde3860a53dbab5a37a2c09fbf442b6cdf14
4c49088bd5156bc40f69d4f54086bbdef4af4e3c
refs/heads/master
2022-06-18T22:37:53.842051
2020-05-08T08:03:10
2020-05-08T08:03:10
262,263,191
0
0
null
null
null
null
UTF-8
Swift
false
false
2,357
swift
// // SATextField.swift // // Created by valvoline on 26/06/2019. // Modified by David Chen // Copyright © 2019 Costantino Pistagna. All rights reserved. // import SwiftUI class WrappableTextField: UITextField, UITextFieldDelegate { var textFieldChangedHandler: ((String)->Void)? var onCommitHandler: (()->Void)? func textFieldShouldReturn(_ textField: UITextField) -> Bool { if let nextField = textField.superview?.superview?.viewWithTag(textField.tag + 1) as? UITextField { nextField.becomeFirstResponder() } else { textField.resignFirstResponder() } return false } func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { if let currentValue = textField.text as NSString? { let proposedValue = currentValue.replacingCharacters(in: range, with: string) textFieldChangedHandler?(proposedValue as String) } return true } func textFieldDidEndEditing(_ textField: UITextField) { onCommitHandler?() } } struct SATextField: UIViewRepresentable { private let tmpView = WrappableTextField() var tag:Int = 0 var text:String? var placeholder:String? var textColor: Color? var changeHandler:((String)->Void)? var onCommitHandler:(()->Void)? func makeUIView(context: UIViewRepresentableContext<SATextField>) -> WrappableTextField { tmpView.tag = tag tmpView.delegate = tmpView tmpView.font = UIFont.systemFont(ofSize: 24) tmpView.text = text tmpView.placeholder = placeholder tmpView.onCommitHandler = onCommitHandler tmpView.textFieldChangedHandler = changeHandler return tmpView } func updateUIView(_ uiView: WrappableTextField, context: UIViewRepresentableContext<SATextField>) { if detailsShouldUpdateTitle{ uiView.becomeFirstResponder() if editingMode { uiView.text = editingTodo.title }else{ uiView.text = "" } detailsShouldUpdateTitle = false } uiView.setContentHuggingPriority(.defaultHigh, for: .vertical) uiView.setContentHuggingPriority(.defaultLow, for: .horizontal) } }
[ 336136, 375082 ]
9c82d10568b540442f19e3cd396c3f46836563b4
6f896dd6af6ed2d9d3424bb7f9af0a884b9db76c
/iOSPruebaCeiba/Modules/User/Presenter/UserPresenterProtocol.swift
50dd3dbc4b0b10bf05b0b2176126e0f41d9b9592
[ "MIT" ]
permissive
xkiRox/iOSPruebaCeiba
8978332e80ba570d5df42eb53c054a5259a63f7a
f85320f8c81fe0e3531a01ae60b09adf42b171c3
refs/heads/main
2023-07-15T17:06:57.167628
2021-08-29T21:24:00
2021-08-29T21:24:00
null
0
0
null
null
null
null
UTF-8
Swift
false
false
322
swift
// // UserPresenterProtocol.swift // iOSPruebaCeiba // // Created by Hector Satizabal on 27/08/21. // import Foundation protocol UserPresenterProtocol: AnyObject { var view: UserViewHelperProtocol? { get set } var interactor: UserInteractorInputProtocol? { get set } var router: UserRouter? { get set } }
[ -1 ]
6b1b0279ff66ee4e7e24dc82bff2daf98fdde315
1221558ec2eff2dabb140a05e21ec2cfa41ea1e7
/Facebook_window/ViewControllers/AboutViewController.swift
6b7f198874d36e113ad2767582b5f3f5ad333f33
[]
no_license
KateUlasik/loginForm
ff47f256f8a4379255740c6a82cfb28782b5f9f0
a3d9a2ef62f273011ee0d5d4ab8a60a70a7225ae
refs/heads/main
2023-07-25T23:16:09.108163
2021-09-09T15:11:16
2021-09-09T15:11:16
397,207,876
0
0
null
2021-09-09T15:11:17
2021-08-17T10:22:10
Swift
UTF-8
Swift
false
false
3,719
swift
// // AboutViewController.swift // Facebook_window // // Created by Katerina Ulasik on 15.08.2021. // import UIKit class AboutViewController: UIViewController { @IBOutlet weak var activityButton: UIActivityIndicatorView! static let url = URL(string: "https://www.wolframcloud.com/obj/mby2007/katesobject")! @IBAction func closeLogIn(_ sender: Any) { dismiss(animated: true, completion: nil) } @IBOutlet weak var tableView: UITableView! var items: [MyMetaData] = [] override func viewDidLoad() { super.viewDidLoad() tableView.dataSource = self tableView.delegate = self print("DEBUG: Loading started...") reloadFromServer() } // // @IBAction func reloadLocalButton(_ sender: Any) { reloadLokal() } @IBAction func reloadRemoteButton(_ sender: Any) { reloadFromServer() } func reloadFromServer() { self.tableView.isHidden = true self.activityButton.startAnimating() DispatchQueue.main.asyncAfter(deadline: .now() + 2) { URLSession .shared .dataTask(with: AboutViewController.url, completionHandler: { data, response, error in if let data = data { do { let decoder = JSONDecoder() let objects = try decoder.decode([MyMetaData].self, from: data) DispatchQueue.main.async { self.items = objects self.tableView.reloadData() print("DEBUG: Loading ended...") self.tableView.isHidden = false self.activityButton.stopAnimating() } } catch { print("Can't load data...") } } }) .resume() } } func reloadLokal() { if let url = Bundle.main.url(forResource: "data", withExtension: "json") { do { let data = try Data(contentsOf: url) let decoder = JSONDecoder() let objects = try decoder.decode([MyMetaData].self, from: data) self.items = objects self.tableView.reloadData() } catch { print("Cant't load data...") } } else { print("CURL doesn't exist...") } } } extension AboutViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return items.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "AboutViewCellID", for: indexPath) as! AboutViewCell let item = items[indexPath.row] cell.configure(item: item) return cell } } extension AboutViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 152 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { print("\(indexPath.row) did select...") } }
[ -1 ]
4a3ed5f734fbe4ca0f7aa9f543ca24aaa8c01254
d3efb30bf6cb798fefb8032e5b4bf6dcd3ee8952
/FinalAizhanYerimbetova/AppDelegate.swift
6549d98d64602932c1ebd84ff1fa5c6f66ecbc4d
[]
no_license
amusinger/iOS-final
e92225a3999e8885d46955514a0297dc1609c803
59e5405ce074f0d49448f14405b2fed84ca8b8c4
refs/heads/master
2021-08-23T14:46:13.722672
2017-12-05T08:45:03
2017-12-05T08:45:03
113,156,276
0
0
null
null
null
null
UTF-8
Swift
false
false
2,200
swift
// // AppDelegate.swift // FinalAizhanYerimbetova // // Created by Aizhan Yerimbetova on 12/5/17. // Copyright © 2017 Aizhan Yerimbetova. 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, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 229432, 204856, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 295220, 287032, 155966, 319809, 319810, 278849, 319814, 311623, 319818, 311628, 229709, 319822, 287054, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 172534, 180727, 164343, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 172552, 287238, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 303696, 279124, 172634, 262752, 254563, 172644, 311911, 189034, 295533, 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, 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, 172737, 279231, 287427, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 312035, 279267, 295654, 279272, 230128, 312048, 312050, 230131, 189169, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 295701, 230169, 369433, 295707, 328476, 295710, 230175, 295720, 303914, 279340, 205613, 279353, 230202, 312124, 328508, 222018, 295755, 377676, 148302, 287569, 303959, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 320391, 304007, 304009, 213895, 304011, 230284, 304013, 295822, 189325, 213902, 189329, 295825, 304019, 279438, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 304065, 213954, 189378, 156612, 295873, 213963, 197580, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 230413, 197645, 295949, 320528, 140312, 295961, 238620, 197663, 304164, 304170, 304175, 238641, 312374, 238652, 238655, 230465, 238658, 336964, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 66690, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 148865, 312711, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 279985, 312755, 296373, 312759, 279991, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 280021, 239064, 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, 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, 263888, 313044, 280276, 321239, 280283, 313052, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 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, 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, 305464, 280888, 280891, 289087, 108865, 280897, 280900, 305480, 239944, 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, 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, 240132, 330244, 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, 158596, 183172, 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, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 322734, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 380226, 298306, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 298365, 290174, 306555, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 314768, 224657, 306581, 314773, 314779, 314785, 314793, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 306694, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282255, 282261, 175770, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 196133, 282295, 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, 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, 241556, 44948, 298901, 241560, 282520, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 290739, 241588, 282547, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299003, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 307385, 176311, 258235, 307388, 176316, 307390, 307386, 299200, 184512, 307394, 299204, 307396, 184518, 307399, 323784, 233679, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 184586, 282893, 291089, 282906, 291104, 233766, 299304, 295583, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 282947, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 61855, 291231, 283042, 291238, 291241, 127403, 127405, 291247, 299440, 127407, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 127431, 127434, 315856, 127440, 176592, 315860, 176597, 127447, 283095, 299481, 127449, 176605, 242143, 127455, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 127474, 291314, 291317, 127480, 135672, 291323, 233979, 127485, 291330, 127490, 127494, 283142, 127497, 233994, 135689, 127500, 291341, 233998, 127506, 234003, 127509, 234006, 127511, 152087, 283161, 242202, 234010, 135707, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 315961, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 135808, 291456, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 135844, 242343, 209576, 242345, 373421, 299706, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 299740, 242396, 201444, 299750, 283368, 234219, 283372, 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, 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, 226185, 308105, 234379, 324490, 234384, 234388, 234390, 226200, 234393, 209818, 308123, 234396, 324504, 291742, 324508, 234398, 234401, 291747, 291748, 234405, 291750, 234407, 324520, 324518, 324522, 234410, 291756, 291754, 226220, 324527, 291760, 234417, 234414, 324531, 201650, 234422, 226230, 324536, 275384, 234428, 291773, 242623, 324544, 234431, 234434, 324546, 226239, 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, 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, 234648, 226453, 234650, 308379, 275608, 300189, 324766, 119967, 234653, 283805, 234657, 324768, 242852, 300197, 234661, 283813, 234664, 177318, 275626, 234667, 316596, 308414, 234687, 300226, 308418, 234692, 300229, 308420, 308422, 283844, 300234, 283850, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 234760, 177419, 300299, 242957, 300301, 349451, 177424, 275725, 283917, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 300357, 283973, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 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, 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, 128584, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 300628, 284245, 276052, 284247, 276053, 235097, 243290, 284249, 284251, 317015, 300638, 284253, 284255, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 276095, 292481, 284290, 325250, 284292, 292485, 276098, 284288, 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, 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, 399252, 284564, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 284585, 276395, 292784, 276402, 358326, 161718, 358330, 276411, 276418, 276425, 301009, 301011, 301013, 292823, 358360, 301017, 301015, 292828, 276446, 153568, 276448, 276452, 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, 276539, 178238, 235581, 276544, 243779, 325700, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 194649, 350302, 194654, 350304, 178273, 309346, 227423, 194660, 350308, 309350, 309348, 292968, 309352, 350313, 309354, 350316, 227430, 276583, 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, 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, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 334488, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 342707, 154292, 277173, 318132, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 342749, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 56045, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 236408, 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, 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, 40448, 228864, 286214, 228871, 302603, 302614, 302617, 286233, 302621, 286240, 187936, 146977, 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, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
c4bc7f21e85d664a06861b0d959f73edfc11c659
638b2706d09a88a80669477ec21f220c38bcccc5
/todoru2/aboutmeViewController.swift
8ad47688ad5cf57250795b82b13c52c691da6168
[]
no_license
tachun77/Todo-2
867986886738cf7a6b270d5521589a480d6be7c2
24f8e319b9a69879110ce070fd8719bf57f8bad0
refs/heads/master
2021-01-22T10:26:21.116343
2017-08-08T14:33:08
2017-08-08T14:33:08
92,643,763
0
0
null
null
null
null
UTF-8
Swift
false
false
3,818
swift
// // aboutmeViewController.swift // todoru2 // // Created by 福島達也 on 2017/07/31. // Copyright © 2017年 Tatsuya Fukushima. All rights reserved. // import UIKit import AVKit import AVFoundation class aboutmeViewController: UIViewController { let saveData = UserDefaults.standard var exp = Int() var videoURL: NSURL? // 再生用のアイテム. var playerItem : AVPlayerItem! // AVPlayer. var videoPlayer : AVPlayer! var playerLayer : AVPlayerLayer? override func viewDidLoad() { super.viewDidLoad() exp = saveData.integer(forKey:"exp") print(exp) // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func magic(){ exp = 10000000000000 saveData.set(exp,forKey:"exp") let alert = UIAlertController( title : "魔法を使った!", message : "経験値が10000000000000になった!!", preferredStyle : UIAlertControllerStyle.alert) alert.addAction( UIAlertAction( title: "OK", style: UIAlertActionStyle.default, handler : nil ) ) self.present(alert, animated : true, completion : nil) } @IBAction func time(){ exp = 0 saveData.set(exp,forKey:"exp") let alert = UIAlertController( title : "時間を戻した!", message : "経験値が0になった!!", preferredStyle : UIAlertControllerStyle.alert) alert.addAction( UIAlertAction( title: "OK", style: UIAlertActionStyle.default, handler : nil ) ) self.present(alert, animated : true, completion : nil) } @IBAction func nice(){ // アプリ内に組み込んだ動画ファイルを再生 if let bundlePath = Bundle.main.path(forResource: "nice", ofType: "mp4") { let videoPlayer = AVPlayer(url: URL(fileURLWithPath: bundlePath)) // 動画プレイヤーの用意 let playerController = AVPlayerViewController() playerController.player = videoPlayer self.present(playerController, animated: true, completion: { videoPlayer.play() }) } else { print("no such file") } } override func viewDidAppear(_ animated: Bool) { var avPlayer: AVPlayer! let bundlePath = Bundle.main.path(forResource: "nice", ofType: "mp4") avPlayer = AVPlayer(url: URL(fileURLWithPath: bundlePath!)) let playerLayer = AVPlayerLayer(player: avPlayer) playerLayer.frame = CGRect(x: 0, y: 160, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.width * 3.0 / 4.0) self.view.layer.addSublayer(playerLayer) avPlayer.play() DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { // 0.5秒後に実行したい処理 playerLayer.isHidden = true print("二秒後") } } /* // 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 ]
b0517b9859329304560308399d5489635399129d
7bb29e9cec47106a67a6552984f525e1476882bd
/SequoiaMiddleMemory/AppDelegate.swift
4fe54790773224612bfb2f95a2abfb9c99f8478a
[]
no_license
ogkent/SequoiaMiddleMemory
8c3b088835a44e172161c2b4fda8386195ff4d08
ab1e4da3bc1752e4f22e282259a4e935286f8936
refs/heads/master
2022-07-16T07:44:12.098267
2020-05-13T04:45:40
2020-05-13T04:45:40
263,525,109
0
0
null
null
null
null
UTF-8
Swift
false
false
2,120
swift
// // AppDelegate.swift // SequoiaMiddleMemory // // Created by Ogden Kent on 3/16/19. // Copyright © 2019 Ogden Kent. 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, 229388, 294924, 278542, 327695, 229391, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 327814, 131209, 303241, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 295110, 286922, 286924, 286926, 319694, 131281, 278743, 278747, 295133, 155872, 319716, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 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, 279003, 279006, 188895, 172512, 287202, 279010, 279015, 172520, 319978, 279020, 172526, 311791, 279023, 172529, 279027, 319989, 180727, 164343, 311804, 287230, 279040, 303617, 287234, 279045, 172550, 303623, 320007, 172552, 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, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 172655, 172656, 352880, 295538, 189039, 172660, 189044, 287349, 287355, 287360, 295553, 295557, 311942, 303751, 287365, 352905, 311946, 287371, 279178, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 230045, 287390, 303773, 172702, 172705, 287394, 172707, 303780, 164509, 287398, 205479, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 287423, 328384, 279231, 287427, 312006, 107212, 172748, 287436, 172751, 295633, 172755, 303827, 279255, 172760, 287450, 303835, 279258, 189149, 303838, 213724, 279267, 312035, 295654, 279272, 312048, 230128, 312050, 230131, 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, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 304007, 320391, 304009, 213895, 304011, 230284, 189325, 304013, 279438, 295822, 189329, 189331, 304019, 58262, 304023, 279452, 410526, 279461, 304042, 213931, 304055, 230327, 287675, 230334, 304063, 304065, 213954, 295873, 156612, 189378, 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, 296004, 132165, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 361576, 296040, 205931, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 304258, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296205, 230674, 320786, 230677, 296213, 230679, 320792, 230681, 296215, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 230718, 296255, 312639, 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, 304505, 181626, 304506, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 288154, 337306, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 173488, 288176, 312755, 296373, 312759, 337335, 288185, 279991, 222652, 312766, 173507, 296389, 222665, 230860, 312783, 288208, 230865, 288210, 370130, 222676, 288212, 288214, 148946, 239064, 329177, 288218, 280021, 288220, 288217, 239070, 288224, 288226, 370146, 280034, 288229, 280038, 288230, 288232, 320998, 280036, 288234, 288236, 288238, 288240, 288242, 296435, 288244, 288250, 148990, 321022, 206336, 402942, 296446, 296450, 230916, 230919, 214535, 304651, 230923, 304653, 402969, 230940, 222752, 108066, 296486, 296488, 157229, 239152, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 181854, 403039, 280158, 370272, 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, 280276, 313044, 321239, 280283, 18140, 313052, 288478, 313055, 321252, 313066, 288494, 280302, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 67330, 280324, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 321336, 296767, 288576, 345921, 337732, 304968, 280393, 194130, 280402, 173907, 313176, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 313340, 288764, 239612, 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, 215154, 313458, 280691, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 141459, 275606, 280725, 313498, 100520, 288936, 280747, 288940, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 321740, 313548, 280783, 280786, 313557, 280793, 280796, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280825, 280827, 280830, 280831, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 248153, 215387, 354653, 313700, 313705, 280937, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 240011, 199051, 289166, 240017, 297363, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 436684, 281045, 281047, 166378, 305647, 281075, 174580, 240124, 281084, 305662, 305664, 240129, 305666, 305668, 223749, 330244, 240132, 223752, 338440, 150025, 281095, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 297594, 281210, 158347, 264845, 182926, 133776, 182929, 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, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 142226, 240535, 224151, 289687, 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, 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, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 306555, 314747, 298365, 290171, 290174, 224641, 281987, 314756, 298372, 281990, 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, 192008, 323084, 257550, 290321, 282130, 323090, 290325, 282133, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 290349, 290351, 290356, 28219, 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, 307009, 413506, 241475, 307012, 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, 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, 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, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 299167, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 176311, 184503, 307385, 307386, 258235, 307388, 176316, 307390, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 184579, 282893, 291089, 282906, 291104, 233766, 176435, 307508, 315701, 332086, 307510, 307512, 168245, 307515, 307518, 282942, 323917, 282957, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 315771, 242043, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 315801, 291226, 242075, 283033, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 127407, 291247, 299444, 127413, 291254, 283062, 127417, 291260, 127421, 127424, 299457, 127429, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 127457, 291299, 340454, 127463, 242152, 291305, 127466, 176620, 127469, 291314, 127474, 291317, 135672, 233979, 291323, 291330, 127494, 283142, 127497, 233994, 135689, 291341, 233998, 127506, 234003, 234006, 127511, 152087, 234010, 242202, 135707, 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, 135844, 299684, 242343, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 299726, 225998, 226002, 119509, 226005, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 185074, 226037, 283382, 316151, 234231, 234236, 226045, 242431, 209665, 234242, 299778, 242436, 234246, 226056, 291593, 234248, 242443, 234252, 242445, 234254, 291601, 242450, 234258, 242452, 234261, 201496, 234264, 234266, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 160572, 283452, 234302, 234307, 242499, 234309, 316233, 234313, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 242530, 349027, 234338, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 234364, 291711, 234368, 234370, 201603, 291714, 234373, 316294, 234375, 291716, 308105, 324490, 226185, 234379, 226182, 234384, 234388, 234390, 324504, 234393, 209818, 308123, 234396, 324508, 291742, 226200, 234398, 234401, 291747, 291748, 234405, 291750, 324518, 324520, 234407, 234410, 291754, 291756, 324522, 226220, 324527, 291760, 234417, 201650, 324531, 234414, 234422, 226230, 324536, 275384, 234428, 291773, 234431, 242623, 324544, 324546, 234434, 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, 324599, 234487, 234490, 234493, 234496, 316416, 234501, 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, 234558, 316479, 234561, 308291, 316483, 234563, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 234585, 242777, 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, 324757, 234647, 226453, 275608, 234650, 308379, 234648, 234653, 300189, 119967, 324766, 324768, 234657, 283805, 242852, 234661, 300197, 234664, 275626, 234667, 316596, 300223, 234687, 300226, 283844, 300229, 308420, 308422, 234692, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 300267, 161003, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 292097, 300289, 161027, 300292, 300294, 275719, 177419, 300299, 242957, 300301, 349451, 177424, 275725, 283917, 349464, 415009, 283939, 259367, 292143, 283951, 300344, 226617, 243003, 283963, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 316768, 292192, 218464, 292197, 316774, 243046, 218473, 284010, 324978, 136562, 333178, 275834, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 357783, 316824, 316826, 300448, 144807, 144810, 144812, 144814, 144820, 284084, 292279, 284087, 144826, 144828, 144830, 144832, 227430, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 218597, 292329, 300523, 259565, 300527, 308720, 259567, 292338, 316917, 292343, 308727, 300537, 316933, 316947, 308757, 308762, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 316983, 194103, 284218, 226877, 292414, 284223, 284226, 284228, 243268, 292421, 284231, 226886, 284234, 366155, 317004, 276043, 284238, 226895, 284241, 292433, 284243, 300628, 284245, 276053, 284247, 317015, 235097, 243290, 284249, 284253, 300638, 243293, 284255, 284258, 292452, 292454, 284263, 177766, 292458, 284267, 292461, 284272, 284274, 284278, 292470, 276086, 292473, 284283, 276093, 284286, 292479, 284288, 292481, 284290, 325250, 284292, 292485, 276095, 276098, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 284306, 276114, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 284329, 317098, 284331, 276137, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 358080, 276160, 284354, 358083, 284358, 358089, 284362, 276170, 276175, 284368, 276177, 284370, 358098, 284372, 317138, 284377, 284379, 284384, 358114, 284386, 358116, 276197, 317158, 358119, 284392, 325353, 358122, 284394, 284397, 358126, 276206, 358128, 284399, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 358146, 317187, 284418, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 325408, 300832, 300834, 317221, 227109, 358183, 186151, 276268, 243504, 300850, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 292681, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 292721, 284529, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 358292, 284564, 317332, 399252, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 317353, 292776, 276395, 284585, 292784, 276402, 358326, 161718, 358330, 276411, 276425, 301009, 301011, 301013, 292823, 358360, 301015, 301017, 292828, 276446, 153568, 276452, 292839, 276455, 350186, 292843, 276460, 292845, 227314, 350200, 276472, 325624, 317435, 276479, 350210, 276482, 178181, 276485, 350218, 276490, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 317468, 243740, 317472, 325666, 243751, 292904, 178224, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 243779, 284739, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 350302, 194654, 227423, 178273, 309346, 227426, 309348, 350308, 309350, 194660, 309352, 350313, 309354, 301163, 350316, 292968, 276583, 301167, 276586, 350321, 227440, 284786, 276595, 350325, 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, 309468, 194780, 309471, 301283, 317672, 317674, 325867, 243948, 194801, 309494, 243960, 227583, 276735, 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, 129486, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 293346, 276964, 293352, 236013, 293364, 301562, 293370, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 309779, 317971, 309781, 55837, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 219714, 129603, 318020, 301636, 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, 318132, 342707, 154292, 277173, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 342745, 137946, 342747, 113378, 203491, 228069, 277223, 342760, 56041, 285417, 56043, 56045, 277232, 228081, 56059, 310015, 310020, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 293666, 228135, 318248, 277291, 318253, 293677, 285489, 301876, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277317, 277329, 162643, 310100, 301911, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 15224, 236408, 277368, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 276579, 293817, 293820, 203715, 326603, 342994, 293849, 293861, 228327, 228328, 318442, 228332, 326638, 277486, 351217, 318450, 293876, 293877, 285686, 302073, 121850, 293882, 285690, 302075, 293887, 277504, 277507, 277511, 293899, 277519, 293908, 302105, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 293960, 277577, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 203872, 285792, 277601, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 367737, 285817, 302205, 285821, 392326, 302218, 285835, 294026, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 302241, 285862, 277671, 302248, 64682, 277678, 294063, 294065, 302258, 277687, 294072, 318651, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 228592, 294132, 138485, 204026, 228606, 204031, 64768, 310531, 138505, 228617, 318742, 204067, 277798, 130345, 277801, 277804, 285997, 384302, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 302403, 294211, 384328, 277832, 277836, 146765, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 277880, 310648, 310651, 277884, 277888, 310657, 310659, 351619, 294276, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 245191, 310727, 64966, 277959, 277963, 302541, 277966, 302543, 310737, 277971, 228825, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 228851, 310772, 278003, 278006, 40440, 212472, 278009, 40443, 286203, 310780, 40448, 228864, 286214, 302603, 302614, 302617, 286233, 302621, 187936, 146977, 286240, 187939, 40484, 294435, 40486, 286246, 40488, 245288, 294439, 40491, 294440, 294443, 294445, 286248, 310831, 40499, 40502, 212538, 40507, 40511, 40513, 228933, 327240, 40521, 286283, 40525, 40527, 400976, 212560, 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, 302764, 278188, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 302793, 294601, 212690, 319187, 286420, 229076, 286425, 319194, 278235, 278238, 229086, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 311048, 294664, 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, 319394, 294817, 294821, 311209, 180142, 188340, 40886, 319419, 294844, 294847, 237508, 393177, 294876, 294879, 294883, 393190, 294890, 311279, 278513, 237555, 311283, 278516, 278519, 237562 ]
3bddf0c6971995bdc2ec1165ae133a30093ccaea
4ccbfa8df1701369ab9ac1217d56d033e9b5ce87
/Moya-ExampleUITests/Moya_ExampleUITests.swift
73f434c4e7db75b7e12676a3aaaa48db070fd39e
[ "MIT" ]
permissive
SalehAlDhobaie/Moya-Example
7ecafd73ef896095ca2a4dcb0f7ad6ee3826fa5b
2c78a98ed62923f83cdcb03896bc06f335b285fb
refs/heads/master
2020-05-22T23:17:57.068447
2019-07-15T08:31:24
2019-07-15T08:31:24
84,732,720
0
0
null
null
null
null
UTF-8
Swift
false
false
1,267
swift
// // Moya_ExampleUITests.swift // Moya-ExampleUITests // // Created by Saleh AlDhobaie on 3/12/17. // Copyright © 2017 Saleh AlDhobaie. All rights reserved. // import XCTest class Moya_ExampleUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. continueAfterFailure = false // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. XCUIApplication().launch() // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
[ 333827, 182277, 243720, 282634, 313356, 155665, 305173, 237599, 241695, 292901, 223269, 229414, 354342, 315433, 102441, 325675, 313388, 354346, 124974, 282671, 278571, 229425, 102446, 243763, 241717, 180279, 229431, 215095, 319543, 213051, 288829, 325695, 286787, 288835, 307269, 237638, 313415, 239689, 233548, 311373, 315468, 278607, 196687, 311377, 354386, 315477, 223317, 354394, 368732, 180317, 323678, 315488, 321632, 315489, 45154, 280676, 313446, 227432, 215144, 307306, 194667, 233578, 278637, 288878, 319599, 278642, 284789, 131190, 288890, 292987, 215165, 131199, 227459, 194692, 235661, 333968, 241809, 323730, 278676, 311447, 153752, 327834, 284827, 329884, 299166, 278690, 311459, 215204, 233635, 333990, 299176, 284840, 278698, 284843, 184489, 278703, 323761, 184498, 278707, 125108, 278713, 180409, 295099, 223418, 299197, 227517, 280767, 258233, 299202, 139459, 309443, 176325, 131270, 301255, 338118, 299208, 227525, 280779, 233678, 282832, 227536, 301270, 229591, 301271, 280792, 147679, 311520, 147680, 325857, 356575, 182503, 319719, 307431, 338151, 295147, 317676, 286957, 125166, 125170, 395511, 313595, 125180, 184574, 125184, 309504, 217352, 125192, 125197, 194832, 227601, 125200, 125204, 319764, 278805, 338196, 334104, 282908, 311582, 299294, 125215, 282912, 233761, 278817, 211239, 282920, 125225, 317738, 334121, 325930, 311596, 338217, 321839, 336177, 315698, 98611, 125236, 307514, 278843, 127292, 282938, 168251, 287040, 319812, 311622, 280903, 227655, 319816, 323914, 201037, 383309, 282959, 229716, 250196, 289109, 168280, 379224, 323934, 391521, 239973, 381286, 313703, 416103, 285031, 280938, 242027, 242028, 321901, 354671, 278895, 287089, 250227, 199030, 315768, 139641, 291194, 291193, 248188, 223611, 313726, 311679, 211327, 291200, 240003, 158087, 227721, 242059, 311692, 106893, 285074, 227730, 240020, 190870, 315798, 190872, 291225, 317851, 285083, 293275, 242079, 227743, 289185, 285089, 293281, 305572, 156069, 283039, 289195, 375211, 377265, 334259, 338359, 299449, 311739, 319931, 293309, 278974, 336319, 311744, 317889, 291266, 278979, 336323, 278988, 289229, 281038, 326093, 129484, 281039, 278992, 283088, 283089, 279000, 176602, 242138, 285152, 279009, 291297, 369121, 195044, 188899, 279014, 242150, 319976, 279017, 311787, 334315, 281071, 319986, 279030, 293368, 279033, 311800, 317949, 322396, 283138, 279042, 233987, 287237, 324098, 322057, 309770, 334345, 340489, 279053, 342537, 283154, 303634, 182802, 279061, 303635, 279060, 188954, 279066, 322077, 291359, 342560, 227881, 293420, 289328, 283185, 279092, 234037, 23093, 244279, 244280, 340539, 338491, 301635, 309831, 322119, 55880, 377419, 303693, 281165, 301647, 281170, 326229, 309847, 189016, 115287, 244311, 332379, 111197, 295518, 287327, 242274, 244326, 279143, 279150, 281200, 287345, 313970, 287348, 301688, 189054, 287359, 297600, 303743, 291455, 301702, 311944, 334473, 344714, 279176, 316044, 311948, 184974, 311950, 316048, 326288, 311953, 287379, 336531, 227991, 295575, 289435, 303772, 221853, 205469, 323335, 285348, 340645, 295591, 279207, 176810, 295598, 279215, 285360, 318127, 299698, 248494, 287412, 166581, 293552, 154295, 279218, 285362, 303802, 314043, 287418, 164532, 66243, 291529, 287434, 225996, 363212, 287438, 135888, 242385, 303826, 279249, 279253, 369365, 369366, 158424, 230105, 299737, 322269, 338658, 342757, 295653, 289511, 230120, 330473, 234216, 285419, 330476, 289517, 279278, 312046, 215790, 170735, 125683, 230133, 199415, 342775, 234233, 242428, 279293, 205566, 322302, 289534, 299777, 35584, 228099, 285443, 375552, 291584, 291591, 295688, 322312, 285450, 346889, 312076, 326413, 295698, 166677, 291605, 207639, 283418, 285467, 221980, 281378, 234276, 336678, 283431, 262952, 262953, 279337, 293673, 289580, 262957, 318247, 164655, 301872, 242481, 234290, 303921, 318251, 285493, 230198, 328495, 285496, 301883, 201534, 281407, 342846, 295745, 222017, 293702, 318279, 283466, 281426, 279379, 295769, 201562, 244569, 234330, 281434, 230238, 230239, 301919, 279393, 293729, 275294, 357219, 281444, 279398, 303973, 351078, 349025, 177002, 308075, 242540, 310132, 295797, 201590, 207735, 295799, 279418, 269179, 177018, 336765, 314240, 291713, 158594, 330627, 340865, 240517, 287623, 228232, 416649, 279434, 320394, 316299, 252812, 234382, 308111, 299912, 308113, 293780, 310166, 289691, 209820, 277404, 240543, 283551, 310177, 289699, 189349, 289704, 279465, 293801, 326571, 304050, 177074, 326580, 289720, 326586, 289723, 189373, 213956, 359365, 19398, 345030, 213961, 127945, 279499, 211913, 56270, 191445, 183254, 304086, 183258, 207839, 340960, 314343, 304104, 123880, 340967, 324587, 183276, 289773, 320492, 203758, 320495, 234476, 287730, 248815, 277493, 320504, 214009, 201721, 312313, 312317, 234499, 418819, 293894, 330759, 320520, 230411, 330766, 320526, 234513, 238611, 140311, 293911, 316441, 197658, 326684, 336930, 315272, 132140, 113710, 189487, 281647, 322609, 318515, 312372, 203829, 238646, 300087, 238650, 320571, 21567, 308288, 336962, 160834, 314437, 349254, 238663, 300109, 207954, 234578, 250965, 296023, 205911, 339031, 314458, 156763, 277600, 281699, 230500, 285795, 250982, 322664, 228457, 279659, 318571, 234606, 300145, 238706, 279666, 312435, 187508, 300147, 230514, 302202, 285819, 314493, 285823, 150656, 234626, 279686, 222344, 285833, 285834, 318602, 234635, 337037, 228492, 177297, 162962, 187539, 347286, 308375, 324761, 285850, 296091, 119965, 302239, 234655, 330912, 300192, 306339, 339106, 234662, 300200, 249003, 238764, 322733, 3243, 208044, 302251, 279729, 294069, 324790, 300215, 294075, 64699, 228541, 339131, 343230, 283841, 148674, 283846, 312519, 279752, 283849, 148687, 290001, 189651, 316628, 279766, 189656, 279775, 304352, 298209, 304353, 339167, 279780, 310496, 228587, 279789, 290030, 302319, 316661, 283894, 234741, 208123, 292092, 279803, 228608, 234756, 322826, 242955, 177420, 312588, 318732, 126229, 318746, 320795, 320802, 130342, 304422, 130344, 130347, 292145, 298290, 208179, 312628, 345398, 300342, 159033, 222523, 286012, 279872, 181568, 279874, 300355, 294210, 216387, 286019, 193858, 372039, 304457, 230730, 345418, 337228, 296269, 222542, 234830, 238928, 224591, 296274, 331091, 314708, 150868, 283990, 318804, 357720, 300378, 300379, 316764, 294236, 292194, 230757, 281958, 134504, 306541, 327023, 296304, 234864, 312688, 284015, 230772, 327030, 314742, 310650, 290170, 224637, 306558, 290176, 243073, 179586, 306561, 337280, 314752, 294278, 314759, 296328, 296330, 298378, 368012, 318860, 304523, 9618, 112019, 306580, 279955, 224662, 234902, 282008, 314771, 318876, 282013, 290206, 343457, 148899, 298406, 282023, 245160, 314790, 241067, 279979, 314797, 279980, 286128, 279988, 173492, 284086, 286133, 259513, 284090, 302523, 310714, 228796, 54719, 302530, 280003, 228804, 310725, 306630, 292291, 300488, 370122, 310731, 306634, 280011, 302539, 310735, 234957, 300490, 222674, 339403, 280020, 337359, 329168, 312785, 329170, 280025, 310747, 239069, 144862, 286176, 187877, 310758, 320997, 280042, 280043, 191980, 300526, 329198, 337391, 282097, 308722, 296434, 306678, 40439, 288248, 191991, 286201, 300539, 288252, 210429, 312830, 359931, 290304, 286208, 245249, 228868, 292359, 218632, 302602, 230922, 323083, 294413, 359949, 304655, 323088, 329231, 282132, 230933, 302613, 282135, 316951, 374297, 175640, 313338, 282147, 222754, 306730, 312879, 230960, 288305, 239159, 290359, 323132, 235069, 157246, 288319, 138817, 288322, 280131, 349764, 310853, 282182, 124486, 288328, 292424, 292426, 194118, 333389, 224848, 349780, 224852, 290391, 128600, 306777, 196184, 235096, 230999, 239192, 212574, 345697, 204386, 300643, 300645, 282214, 312937, 224874, 243306, 204394, 312941, 138862, 206447, 310896, 294517, 314997, 288377, 290425, 339579, 337533, 325246, 333438, 235136, 280193, 282244, 239238, 288391, 282248, 286344, 323208, 179853, 286351, 188049, 229011, 239251, 323226, 179868, 229021, 302751, 282272, 198304, 245413, 282279, 298664, 212649, 298666, 317102, 286387, 286392, 302778, 306875, 280252, 280253, 282302, 296636, 286400, 323265, 323262, 280259, 321217, 282309, 239305, 280266, 306891, 296649, 212684, 302798, 241360, 282321, 313042, 286419, 333522, 241366, 282330, 18139, 280285, 294621, 282336, 325345, 294629, 337638, 333543, 181992, 12009, 153318, 282347, 288492, 282349, 323315, 67316, 34547, 300354, 286457, 284410, 313082, 288508, 200444, 282366, 286463, 319232, 278273, 288515, 280326, 282375, 249606, 284425, 300810, 116491, 282379, 280333, 216844, 284430, 300812, 161553, 124691, 284436, 278292, 116502, 118549, 282390, 278294, 325403, 321308, 321309, 282399, 241440, 282401, 341791, 339746, 315172, 186148, 186149, 216868, 241447, 333609, 286507, 294699, 284460, 280367, 300849, 282418, 280373, 282424, 280377, 319289, 321338, 282428, 280381, 345918, 413500, 241471, 280386, 325444, 280391, 153416, 315209, 325449, 342705, 280396, 159563, 307024, 325460, 237397, 307030, 18263, 341846, 317268, 188250, 241494, 284508, 300893, 307038, 370526, 237411, 284515, 276326, 282471, 296807, 292713, 282476, 292719, 296815, 313200, 325491, 313204, 317305, 124795, 317308, 339840, 315265, 280451, 327556, 188293, 325508, 282503, 333700, 67464, 325514, 305032, 350091, 350092, 243592, 184207, 311183, 124816, 315275, 282517, 294806, 350102, 214936, 294808, 337816, 239515, 124826, 333727, 298912, 319393, 214943, 294820, 118693, 333734, 219046, 284584, 294824, 298921, 313257, 292783, 126896, 200628, 300983, 343993, 288698, 98240, 294849, 214978, 280517, 280518, 214983, 282572, 282573, 153553, 24531, 231382, 323554, 292835, 190437, 292838, 294887, 317416, 313322, 278507, 298987, 311277, 296942, 174058, 124912, 327666, 278515, 325620, 239610 ]
04e71d28b5b008ba4b279497be746cdbf0f8ba0f
1f2a845288753ddbc55a31e37da9033dc958c0a8
/Lab5/Lab5Tests/Lab5Tests.swift
26b35363d5608cc180d37acae299c9522549573b
[]
no_license
bigfirestart/OOP
043eac250f8f0841be56d0a4acaec6ef3a186a6d
2da3bbc9a719587c812a8ac7696c272011d2a491
refs/heads/master
2023-02-04T17:58:07.773755
2020-12-25T14:43:58
2020-12-25T14:43:58
298,660,419
0
1
null
2020-10-30T13:36:45
2020-09-25T19:17:49
C#
UTF-8
Swift
false
false
1,936
swift
// // Lab5Tests.swift // Lab5Tests // // Created by Кирилл Лукьянов on 07.12.2020. // import XCTest @testable import Lab5 class Lab5Tests: XCTestCase { func testTransactions(){ let client = Client(firstName: "Mark", secondName: "Karshtain") let accountFrom = Account(client: client) let accountTo = Account(client: client) let gts = GTS() let bd = GTSBackdoor() bd.accountAddMoney(account: accountFrom, amount: 200) XCTAssertEqual(accountFrom.amount, 200) let transaction = Transaction(fromAccount: accountFrom, toAccount: accountTo, amount: 10) XCTAssertNoThrow(try gts.commitTransaction(transaction: transaction)) XCTAssertEqual(accountFrom.amount, 190) XCTAssertEqual(accountTo.amount, 10) XCTAssertTrue(gts.rollbackTransaction(transactionUUID: transaction.uuid)) XCTAssertEqual(gts.transactionsHistory.count, 0) XCTAssertEqual(accountFrom.amount, 200) XCTAssertEqual(accountTo.amount, 0) } func testAccounts(){ let bankClient = Client(firstName: "Mark", secondName: "1") let master = Account(client: bankClient) let bank = AbstractBank(masterAccount: master) let hack = GTSBackdoor() hack.accountAddMoney(account: master, amount: 1000.0) let userClient = Client(firstName: "User", secondName: "2") let userDebit = bank.createDebitAccount(client: userClient, procent: 3.2) let userCredit = bank.createCreditAccount(client: userClient, masterAccount: master, creditLimit: 500, comission: 100 ) XCTAssertEqual(userCredit.amount, 0) XCTAssertTrue(bank.pay(fromAccount: userCredit, toAccount: userDebit, amount: 100)) XCTAssertEqual(userDebit.amount, 100) XCTAssertEqual(master.amount, 900) XCTAssertEqual(userCredit.amount, 0) } }
[ -1 ]
0d50a36ef9e1d38e641ec8980f8255ff91a60887
d703c697c6d6b5e62e9e8d3bba4cab625818d538
/Algorithms/Swift/simple-array-sum.swift
1f16f69af4133ebbf4fc4e959162fc519684ff77
[]
no_license
giselasu17/HackerRank
b70563c16b03528bb0017b495f45fa42fd505586
421971754b5e262463b6194b58aa8f99eeff4da7
refs/heads/master
2021-01-22T02:33:54.759062
2019-09-12T21:55:49
2019-09-12T21:55:49
81,053,914
0
0
null
null
null
null
UTF-8
Swift
false
false
171
swift
import Foundation let n = Int(readLine()!)! let arr = readLine()!.components(separatedBy: " ").map{ Int($0)! } var sum = 0 for i in 0..<n { sum += arr[i] } print(sum)
[ -1 ]
07076b5706374d1f83da688be2c0b92548374d90
bfbefcb6dcdd24df731c4b35490c73829d1c88b0
/TvoyaApteka/Coordinator/FavoriteCoordinator.swift
caa44b44c84157a32a167cdc9cf088a4fc594a46
[]
no_license
tjslash/semeynayaapteka_ios
dcd3c0ca5414af211fcdbcc9088023eaad5f0bc3
4003aa730382d8d6652eeafa7be64a92f12a144e
refs/heads/master
2022-06-10T14:23:06.503192
2020-05-06T01:34:56
2020-05-06T01:34:56
261,623,141
0
0
null
null
null
null
UTF-8
Swift
false
false
2,905
swift
// // FavoriteCoordinator.swift // TvoyaApteka // // Created by BuidMac on 29.05.2018. // Copyright © 2018 Tematika. All rights reserved. // import Foundation protocol FavoriteCoordinatorDelegate: class { func finishFlow(coordinator: FavoriteCoordinator) } class FavoriteCoordinator: BaseCoordinator { public weak var delegate: FavoriteCoordinatorDelegate? override func start() { showFavoritePage() } private func showFavoritePage() { let page = getFavoritePage() page.delegate = self router.push(page, animated: true, completion: { [unowned self] in self.delegate?.finishFlow(coordinator: self) }) } private func getFavoritePage() -> ListFavoriteDrugsViewController { let localStorage = UserDefaultsFavoriteStorage(storeKey: Const.localFavoriteStorageKey) let favoriteRepository = FavoriteRepository(localStorage: localStorage, authManager: AuthManager.shared) let viewModel = ListFavoriteDrugsViewModel(favoriteRepository: favoriteRepository, drugStoreRepository: DrugStoreRepository()) return ListFavoriteDrugsViewController(viewModel: viewModel) } private func startAuthenticationCoordinator() { let coordinator = AuthenticationCoordinator(router: router) coordinator.delegate = self appendChild(coordinator) coordinator.start() } private func startDrugDetailsCoordinator(drug: Drug) { let coordinator = DrugDetailsCoordinator(drugId: drug.id, router: router) coordinator.delegate = self appendChild(coordinator) coordinator.start() } } // MARK: FavoriteDrugsPageDelegate extension FavoriteCoordinator: ListFavoriteDrugsViewControllerDelegate { func authorizationRequired() { router.visibleViewController?.showAuthorizationAlert(doneAction: { [unowned self] in self.startAuthenticationCoordinator() }) } func didSelected(drug: Drug) { startDrugDetailsCoordinator(drug: drug) } } // MARK: AuthenticationCoordinatorDelegate extension FavoriteCoordinator: AuthenticationCoordinatorDelegate { func successLogin(user: AuthUserType, coordinator: AuthenticationCoordinator) { router.dismissModule(animated: true, completion: nil) removeChild(coordinator) } func cancelLogint(coordinator: AuthenticationCoordinator) { router.dismissModule(animated: true, completion: nil) removeChild(coordinator) } } // MARK: DrugDetailsCoordinatorDelegate extension FavoriteCoordinator: DrugDetailsCoordinatorDelegate { func finishFlow(coordinator: DrugDetailsCoordinator) { removeChild(coordinator) } }
[ -1 ]
5849ce2df5a32d96a30898726b90822065bd727b
8733e20463b6c89cc64a20cd6a02773b96fbc74b
/Sources/App/Settings/Notifications/NotificationRateLimitsAPI.swift
d0d064290210afa77eb8d038622b7574900f7e5c
[ "Apache-2.0" ]
permissive
laposheureux/iOS
95f56fefdcadd8dd96c1eb050c7664e20590d25e
ed6c1c8c1c1b8a4a1d52f964c84831c879e199b3
refs/heads/master
2023-01-29T00:31:04.553679
2020-12-14T08:52:40
2020-12-14T08:52:40
301,354,166
0
0
NOASSERTION
2020-12-14T08:52:41
2020-10-05T09:20:11
null
UTF-8
Swift
false
false
3,336
swift
import PromiseKit import Foundation import Shared import Eureka struct RateLimitResponse: Decodable { var target: String struct RateLimits: Decodable { var attempts: Int var successful: Int var errors: Int var total: Int var maximum: Int var remaining: Int var resetsAt: Date } var rateLimits: RateLimits } class NotificationRateLimitsAPI { class func rateLimits(pushID: String) -> Promise<RateLimitResponse> { firstly { () -> Promise<URLRequest> in do { var urlRequest = URLRequest(url: URL( string: "https://mobile-apps.home-assistant.io/api/checkRateLimits" )!) urlRequest.httpMethod = "POST" urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") urlRequest.httpBody = try JSONSerialization.data(withJSONObject: [ "push_token": pushID ], options: []) return .value(urlRequest) } catch { return .init(error: error) } }.then { return URLSession.shared.dataTask(.promise, with: $0) }.map { data, _ throws -> RateLimitResponse in let decoder = with(JSONDecoder()) { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.sss'Z'" dateFormatter.locale = Locale(identifier: "en_US_POSIX") dateFormatter.timeZone = TimeZone(identifier: "UTC") $0.dateDecodingStrategy = .formatted(dateFormatter) } return try decoder.decode(RateLimitResponse.self, from: data) } } } extension RateLimitResponse.RateLimits { func row(for keyPath: KeyPath<Self, Int>) -> BaseRow { return LabelRow { $0.value = NumberFormatter.localizedString( from: NSNumber(value: self[keyPath: keyPath]), number: .none ) $0.title = { () -> String in switch keyPath { case \.attempts: return L10n.SettingsDetails.Notifications.RateLimits.attempts case \.successful: return L10n.SettingsDetails.Notifications.RateLimits.delivered case \.errors: return L10n.SettingsDetails.Notifications.RateLimits.errors case \.total: return L10n.SettingsDetails.Notifications.RateLimits.total case \.maximum: return "" default: fatalError("missing key: \(keyPath)") } }() } } func row(for keyPath: KeyPath<Self, Date>) -> BaseRow { return LabelRow { row in row.value = DateFormatter.localizedString( from: self[keyPath: keyPath], dateStyle: .none, timeStyle: .medium ) switch keyPath { case \.resetsAt: row.title = L10n.SettingsDetails.Notifications.RateLimits.resetsIn row.tag = "resetsIn" default: fatalError("missing key: \(keyPath)") } } } }
[ -1 ]
7ae393e5b120a04676b99ac9469ed0d43afbb30f
b54233c37f993469ec8a36af90738f32b38e8ffa
/raywenderlich-practice-project/AppDelegate.swift
1e28fdd5228dd519a3daa3267ce110a53e0ee6a0
[]
no_license
griffinstorback/raywenderlich-practice-project
04002151ae984b00f3216c295d68798feace0487
5faadb884720a4dcf4ebac908eea5265ea2bda09
refs/heads/main
2023-04-12T01:36:20.466236
2021-05-13T18:51:49
2021-05-13T18:51:49
367,145,731
0
0
null
null
null
null
UTF-8
Swift
false
false
1,376
swift
// // AppDelegate.swift // raywenderlich-practice-project // // Created by Griffin Storback on 2021-05-04. // import UIKit @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. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 213048, 385081, 376889, 393275, 376905, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 368752, 286844, 417924, 262283, 286879, 286888, 377012, 164028, 327871, 377036, 180431, 377046, 418007, 418010, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 385280, 336128, 262404, 164106, 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, 262566, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 410128, 393747, 254490, 188958, 385570, 33316, 377383, 197159, 352821, 197177, 418363, 188987, 369223, 385609, 385616, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 148105, 377484, 352918, 98968, 344744, 361129, 385713, 434867, 164534, 336567, 328378, 164538, 328386, 344776, 352968, 352971, 418507, 352973, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 344835, 336643, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 262942, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 361288, 336711, 328522, 336714, 426841, 197468, 254812, 361309, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 386003, 345043, 386011, 386018, 386022, 435187, 328714, 361489, 386069, 386073, 336921, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 386258, 328924, 66782, 222437, 386285, 328941, 386291, 345376, 353570, 345379, 410917, 345382, 337205, 345399, 378169, 369978, 337222, 337229, 337234, 263508, 402791, 345448, 271730, 378227, 271745, 181638, 353673, 181643, 181654, 230809, 181670, 181673, 181678, 181681, 181684, 181690, 361917, 181696, 337349, 181703, 271839, 329191, 361960, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 419410, 394853, 345701, 222830, 370297, 403070, 403075, 345736, 198280, 403091, 345749, 419483, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 419517, 337599, 419527, 419530, 419535, 272081, 394966, 419542, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 370415, 337659, 337668, 362247, 395021, 362255, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 354150, 354156, 345964, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 362413, 337844, 346057, 346063, 247759, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329885, 346272, 100524, 387249, 379066, 387260, 256191, 395466, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 411916, 379152, 395538, 387349, 338199, 387352, 182558, 338211, 248111, 362822, 436555, 190796, 379233, 354673, 248186, 420236, 379278, 272786, 354727, 338352, 338381, 330189, 338386, 338403, 338409, 248308, 199164, 330252, 420376, 330267, 354855, 10828, 199249, 346721, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 248504, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 436962, 338660, 338664, 264941, 363251, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 396069, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 265058, 355175, 387944, 355179, 330610, 355218, 330642, 412599, 207808, 379848, 396245, 330710, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 265214, 330760, 330768, 248862, 347176, 396328, 158761, 199728, 396336, 330800, 396339, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 412764, 339036, 257120, 265320, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265432, 265436, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 347437, 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, 249224, 249227, 249234, 175516, 396705, 175522, 355748, 380332, 396722, 208311, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 339420, 249308, 339424, 249312, 339428, 339434, 249328, 69113, 372228, 208398, 380432, 175635, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 372353, 224897, 216707, 421508, 126596, 224904, 11918, 159374, 224913, 126610, 224916, 224919, 126616, 208538, 224922, 224926, 224929, 224932, 257704, 224936, 224942, 257712, 224947, 257716, 257720, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 257787, 225020, 257790, 339710, 225025, 257794, 339721, 257801, 257804, 225038, 257807, 225043, 372499, 167700, 225048, 257819, 225053, 184094, 225058, 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, 225127, 274280, 257896, 257901, 225137, 257908, 225141, 257912, 225148, 257916, 257920, 225155, 339844, 225165, 397200, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 372738, 405533, 430129, 266294, 266297, 421960, 356439, 421990, 266350, 356466, 266362, 381068, 225423, 250002, 250004, 225429, 356506, 225437, 135327, 225441, 438433, 225444, 438436, 225447, 438440, 225450, 258222, 225455, 430256, 225458, 225461, 225466, 389307, 225470, 381120, 372929, 430274, 225475, 389320, 225484, 225487, 225490, 225493, 266453, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 397571, 389380, 356637, 356640, 356643, 356646, 266536, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348522, 348525, 348527, 332152, 389502, 250238, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 266687, 160234, 127471, 340472, 381436, 324094, 266754, 324111, 340500, 381481, 356907, 324142, 356916, 324149, 324155, 348733, 324164, 356934, 348743, 381512, 324173, 324176, 389723, 332380, 373343, 381545, 340627, 373398, 184982, 258721, 332453, 332459, 389805, 332463, 381617, 332471, 332483, 332486, 373449, 357069, 332493, 357073, 332511, 332520, 340718, 332533, 348924, 373510, 389926, 348978, 152370, 340789, 348982, 398139, 127814, 357201, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 430965, 381813, 324472, 398201, 119674, 324475, 430972, 340858, 340861, 324478, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 398245, 324524, 340909, 324533, 324538, 324541, 398279, 340939, 340941, 209873, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 381946, 349180, 439294, 431106, 209943, 357410, 250914, 185380, 357418, 209965, 209971, 209975, 209979, 209987, 209990, 209995, 341071, 349267, 250967, 210010, 341091, 210025, 210030, 210036, 210039, 349308, 210044, 349311, 160895, 152703, 210052, 210055, 349319, 218247, 210067, 210077, 210080, 251044, 210084, 185511, 210095, 210098, 210107, 210115, 332997, 210127, 333009, 210131, 333014, 210138, 210143, 218354, 218360, 251128, 275706, 275712, 275715, 275721, 349459, 333078, 251160, 349484, 349491, 415033, 251210, 357708, 210260, 365911, 259421, 365921, 333154, 251235, 374117, 333162, 234866, 390516, 333175, 357755, 136590, 374160, 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, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 333498, 210631, 333511, 358099, 153302, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 268041, 210698, 366348, 210706, 399128, 210719, 358191, 366387, 210739, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 358255, 268143, 399215, 358259, 341876, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358371, 350189, 350193, 350202, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 374902, 432271, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 350467, 350475, 375053, 268559, 350480, 432405, 350486, 325914, 350490, 325917, 350493, 325919, 350498, 194852, 350504, 358700, 391468, 350509, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 416157, 268701, 342430, 375208, 375216, 334262, 334275, 326084, 358856, 195039, 334304, 334311, 375277, 334321, 350723, 391690, 186897, 334358, 342550, 342554, 334363, 350761, 252461, 334384, 358961, 383536, 334394, 252482, 219718, 334407, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 260801, 350917, 391894, 154328, 416473, 64230, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 375574, 162591, 326441, 383793, 326451, 326454, 260924, 375612, 244540, 326460, 326467, 244551, 326473, 326477, 416597, 326485, 326490, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 342915, 400259, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 359366, 326598, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 261147, 359451, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 367723, 384107, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384160, 384168, 367794, 384181, 367800, 351423, 326855, 244937, 253130, 343244, 146642, 359649, 343270, 351466, 351479, 343306, 261389, 359694, 384269, 253200, 384275, 245020, 245029, 171302, 351534, 376110, 245040, 425276, 212291, 384323, 343365, 212303, 367965, 343393, 343398, 367980, 425328, 343409, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 179802, 155239, 327275, 245357, 138864, 155254, 155273, 368288, 425638, 425649, 155322, 425662, 155327, 155351, 155354, 212699, 155363, 245475, 155371, 245483, 409335, 155393, 155403, 155422, 360223, 155438, 155442, 155447, 417595, 360261, 155461, 376663, 155482, 261981, 425822, 376671, 155487, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 147317, 262005, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 393169, 384977, 155611, 155619, 253923, 155621, 253926, 204784, 393203, 360438, 253943, 393206, 393212, 155646 ]
c99bf9cf756c67e30f730ddd3a939e5e172cfbff
9b7380cd677c2d87669858cbcf05fee0758b6bae
/Google-Maps-Direction-master 4/Pods/GooglePlacesAPI/Source/Core/ObjectMapperTransformers/LocationCoordinate2DTransform.swift
4725fe7b4a43717c436af2f80c3be1406235c221
[ "MIT" ]
permissive
polankivarun1729/Tech_Task_Round
e62112caad9b5187418e5ebdfce5c0eb34294511
390b73145ca3c62995665e873684196c00993475
refs/heads/master
2020-03-18T11:24:29.716868
2018-05-24T06:15:18
2018-05-24T06:15:18
134,669,331
0
0
null
null
null
null
UTF-8
Swift
false
false
1,084
swift
// // LocationCoordinate2DTransform.swift // GoogleMapsDirections // // Created by varun.polanki // Copyright varun.polanki. All rights reserved. // import Foundation import ObjectMapper class LocationCoordinate2DTransform: TransformType { typealias LocationCoordinate2D = GoogleMapsService.LocationCoordinate2D typealias Object = LocationCoordinate2D typealias JSON = [String : Any] func transformFromJSON(_ value: Any?) -> Object? { if let value = value as? JSON { guard let latitude = value["lat"] as? Double, let longitude = value["lng"] as? Double else { NSLog("Error: lat/lng is not Double") return nil } return LocationCoordinate2D(latitude: latitude, longitude: longitude) } return nil } func transformToJSON(_ value: Object?) -> JSON? { if let value = value { return [ "lat" : "\(value.latitude)", "lng" : "\(value.longitude)" ] } return nil } }
[ -1 ]
f5c55e84bea5fdb6e4119a125a5fc9a3085cf1fe
127025fc0cf3c4092d948a08138d0c31ca334561
/Dota 2 Directories/Features/List Heroes/ListHeroesViewModel.swift
c46dc675e534dc9e1e7b68b3474573201859ef49
[]
no_license
verreliocr/dota-2-directories
d8a129010d7c6cd2a3cf94f4f217177e2722be7c
12ba97c4ab337f8000397e83cead703908870b10
refs/heads/master
2023-07-08T22:50:36.153032
2021-01-31T17:05:29
2021-01-31T17:05:29
333,814,633
0
0
null
null
null
null
UTF-8
Swift
false
false
311
swift
// // ListHeroesViewModel.swift // Dota 2 Directories // // Created by Verrelio C. Rizky on 29/01/21. // import Foundation class ListHeroesViewModel { var listHeroes: [HeroesModel] = [] var listRoles: [String] = [] var selectedRoles: String = "All" var recommendation: [HeroesModel] = [] }
[ -1 ]
7ba8f338596cc830a03bafa0cf0f1717cc181bf2
b22b86993224683fdddc7226dfa81062977c676d
/Shared/Components/Drink/DrinkAvailablePriceView.swift
16fdea14d13d92bd9bfcee89d08fa2537ec239ab
[]
no_license
miladgolchinpour/Foodio
4b90888556961ba7757fb0709f85c85ec37cba11
882105ec89dc7371f2aea1353b9fc81c8a1413fb
refs/heads/main
2023-06-29T18:49:57.068178
2021-08-08T17:40:06
2021-08-08T17:40:06
393,191,404
3
0
null
null
null
null
UTF-8
Swift
false
false
835
swift
// // DrinkAvailablePriceView.swift // Foodio // // Created by Milad Golchinpour on 7/27/21. // Copyright © 2021 Milad Golchinpour. All rights reserved. // import SwiftUI struct DrinkAvailablePriceView: View { var drink: Drink @Environment(\.locale) var locale var body: some View { HStack(spacing: 10) { Text(locale.identifier == "en" ? "$\(drink.price)" : "\(drink.price) دلار") .font(.title) .bold() .foregroundColor(.white) Text(drink.isAvailable ? "Available" : "Unavailable") .italic() .padding(14) .background(.black.opacity(0.3)) .cornerRadius(30) .foregroundColor(.white) } .padding(.bottom, 25) } }
[ -1 ]
93b6ac905b316dac3e59f209d24b0b0091f4bf3e
875d29f08c8dfdf2fb6dcb7a67ba447e3dbd28be
/Shared/dataobject/item/Item.swift
62fb1ba3e5393f8e82cd4df4f0144811282f62e7
[]
no_license
sirily11/dota2_info
25555f238a644a99dcd698f5621976e2cfdadada
6d92b3d47c4c82281654d461acd3d87ff39a01a0
refs/heads/main
2023-03-11T22:04:58.357291
2021-02-27T09:38:58
2021-02-27T09:38:58
342,554,542
0
0
null
null
null
null
UTF-8
Swift
false
false
1,150
swift
// This file was generated from JSON Schema using quicktype, do not modify it directly. // To parse the JSON, add this file to your project and do: // // let item = try? newJSONDecoder().decode(Item.self, from: jsonData) import Foundation // MARK: - Item struct Item: Codable { let hint: [String]? let id: Int? let img, dname, qual: String? let cost: Int? let notes: String? let cd: Int? let lore: String? let charges: Int? } extension Item{ static func load(_ filename: String) -> [String: Item] { let data: Data guard let file = Bundle.main.url(forResource: filename, withExtension: nil) else { fatalError("Couldn't find \(filename) in main bundle.") } do { data = try Data(contentsOf: file) } catch { fatalError("Couldn't load \(filename) from main bundle:\n\(error)") } do { let decoder = JSONDecoder() return try decoder.decode([String:Item].self, from: data) } catch { fatalError("Couldn't parse \(filename) as \(Item.self):\n\(error)") } } }
[ -1 ]
d5a585ae5e5df1b12382248eaea09960f995e896
0ceeca171f486648d75c4c75e9c109583c115731
/interview/ViewController.swift
1fd23c4623b86baa110d537f05ed890dad4458c7
[]
no_license
atyrcp/InterviewGotFailed
2c09e147b3f3737672df6897facdf44c02529668
d0cb5fb31d4a0c80ce510f2e0f6dcda8f5dc3ac7
refs/heads/master
2020-05-30T12:51:56.882969
2019-06-01T15:03:28
2019-06-01T15:03:28
189,745,636
0
0
null
null
null
null
UTF-8
Swift
false
false
3,102
swift
// // ViewController.swift // interview // // Created by 壯兔 on 2018/2/8. // Copyright © 2018年 Playsport Inc. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var APItableview: UITableView! var users = [User]() override func viewDidLoad() { super.viewDidLoad() // APIservice.shared.getAPI { (users) in // self.users = users // DispatchQueue.main.async { // self.APItableview.reloadData() // } // } let user1 = User(id: 1, name: "asd", sex: "m", age: 20, avatar: "https://cc.tvbs.com.tw/img/upload/2019/04/15/20190415134832-86f24c9d.jpg", description: "sofhwoeifhwiehfoiwehflkwefhlkwe") let user2 = User(id: 2, name: "fwf", sex: "b", age: 3, avatar: "https://image.cache.storm.mg/styles/smg-800x533-fp-wm/s3/media/image/2019/05/24/20190524-102142_U13925_M522252_d93d.jpg", description: "hlhfjhwefjwehttps://image.cache.storm.mg/styles/smg-800x533-fp-wm/s3/media/image/2019/05/24/20190524-102142_U13925_M522252_d93d.jpghljhlqwfkhqwhfiqwfhqwhfoqhwf;kjhqkwf") let user3 = User(id: 3, name: "fwf", sex: "b", age: 3, avatar: "https://ichef.bbci.co.uk/news/624/cpsprodpb/12A64/production/_101688367_hi046097004_2014.jpg", description: "hlhfjhwefjwehttps://image.cache.storm.mg/styles/smg-800xwefk;wnef;nwefe/2019/05/24/20190524-102142_U13925_M522252_d93d.jpghljhlqwfkhqwhfiqwfhqwhfoqhwf;kjhqkwf") let user4 = User(id: 4, name: "fwf", sex: "b", age: 3, avatar: "https://images.chinatimes.com/newsphoto/2019-05-28/900/20190528003301.jpg", description: "hlhfjhwefjwehttps://image.cache.storm.mg/styles/smg-800xwefk;wnef;nwefe/2019/05/225_M522252_d93d.jpghljhlqwfkhqwhfiqwasdasdwwfhqwhfoqhwf;kjhqkaasdasdaswf") let user5 = User(id: 5, name: "aswwwwd", sex: "mwewewe", age: 20, avatar: nil, description: "sofhwoeifhwiehfoiwehflkwefhlkwe") let user6 = User(id: 6, name: "fwf", sex: "b", age: 3, avatar: "https://s.newtalk.tw/album/news/246/5cd8f65820102.JPG", description: "hlhfjhwefjwehttps://image.cache.storm.mg/styles/smg-800xwefk;wnef;nwefe/2019/05/225_M522252_d93d.jpghljhlqwfkhqwhfiqwasdasdwwfhqwhfoqhwf;kjhqkaasdasdaswf") users.append(user1) users.append(user2) users.append(user3) users.append(user4) users.append(user5) users.append(user6) } } extension ViewController: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return users.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! CustomTableViewCell cell.user = users[indexPath.row] return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { print(users[indexPath.row].id) tableView.reloadData() } }
[ -1 ]
6f9e65bc70c1a526b3cc86fcaec0119a4acbf773
d098f65298807ceded17a956c550b6c5513bccb0
/Calculator/ViewController.swift
f9e75bbe3e9b9113f53002356cff634112d724c6
[]
no_license
smaldd14/CalculatorApp
dbeb88f35d814724b3a0f784c44293a6d2348836
31c9277aa96cdeb93b8ca24039a25530940b5bea
refs/heads/master
2021-01-23T04:44:55.219958
2017-03-13T17:00:03
2017-03-13T17:00:03
80,379,005
0
0
null
null
null
null
UTF-8
Swift
false
false
2,149
swift
// Name: Devin Smaldore // Date: 1-27-17 // Class: csc2310 // Comments: Calculator App // ViewController.swift // Calculator import UIKit //create stack of any element type struct Stack<Element> { var items = [Element]() mutating func push(_ newItem: Element) { items.append(newItem) } mutating func pop() -> Element? { guard !items.isEmpty else { return nil } return items.removeLast() } func top() -> Element? { guard !items.isEmpty else { return nil } return items.last } func isEmpty() -> Bool? { return items.isEmpty } } class ViewController: UIViewController { @IBAction func addToNumStack(_ newOp: Int, sender: UIButton) { var numStack = Stack<Int>() numStack.push(newOp) } func addToOpStack(_ newOp: Character) { var opStack = Stack<Character>() if opStack.isEmpty()! { opStack.push(newOp) } else if opStack.top() == "+" || opStack.top() == "-" { opStack.push(newOp) } else if opStack.top() == "*" || opStack.top() == "/" { if newOp == "*" || newOp == "/" { opStack.push(newOp) } else { } } //opStack.push(newOp) } func doMath(_ operand1: Int, operand2: Int, operator1: Character) -> Int { var result = 0 if operator1 == "+" { result = operand1 + operand2 } else if operator1 == "-" { result = operand1 - operand2 } else if operator1 == "*" { result = operand1 * operand2 } else if operator1 == "/" { result = operand1 / operand2 } return result } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } //this is the right way to do it, not what is above @IBAction func handleNumButtonPress(_ sender: UIButton) { } }
[ -1 ]
f549500bff363660922c04bfb2460f9a26dfc71f
950b6fb097ae93f1899795d6661ebdd67b8c231c
/TouchID/TouchID/NextViewController.swift
7b0aaebd4c1df8459fa057cdcfc8f1a736f84286
[]
no_license
dipankarghosh28/TouchID-implementation
bc93285c3c4d7b51d63058f5ee2c963b9d13bc6d
7cc2eec53dc2a76485898f428a8ba12aee7f2ee1
refs/heads/master
2020-03-18T14:59:40.062928
2018-05-25T16:29:40
2018-05-25T16:29:40
134,880,071
0
0
null
null
null
null
UTF-8
Swift
false
false
944
swift
// // NextViewController.swift // TouchID // // Created by Dipankar Ghosh on 5/25/18. // Copyright © 2018 Dipankar Ghosh. All rights reserved. // import UIKit class NextViewController: UIViewController { override func viewDidLoad() { // self.view.backgroundColor = UIColor(patternImage: UIImage(named: "background.jpg")!) // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
[ -1 ]
158226d1fb4614b89955eb199e53b4df627cd6ad
a633c34164818089fa9777b5ae1873150577f4b3
/AutoGraph/Errors.swift
eb1b9cacfdb233a49ffbf8304b6434501db0fd48
[ "MIT" ]
permissive
farshadmb/AutoGraph
d228a5468730c6821a546a68ce30b05f75f3e134
fb63aa9f4fe1145866da9a0b115876916ab9bca8
refs/heads/master
2022-11-06T02:35:50.214986
2020-06-20T06:09:27
2020-06-20T06:09:27
273,649,456
0
0
null
2020-06-20T06:08:55
2020-06-20T06:08:54
null
UTF-8
Swift
false
false
4,303
swift
import Foundation import JSONValueRX /* GraphQL errors have the following base shape: { "errors": [ { "message": "Cannot query field \"d\" on type \"Planet\".", "locations": [ { "line": 18, "column": 7 } ] }, { "message": "Fragment \"planet\" is never used.", "locations": [ { "line": 23, "column": 1 } ] } ] } */ public protocol NetworkError: Error { var statusCode: Int { get } var underlyingError: GraphQLError { get } } public typealias NetworkErrorParser = (_ graphQLError: GraphQLError) -> NetworkError? public indirect enum AutoGraphError: LocalizedError { case graphQL(errors: [GraphQLError], response: HTTPURLResponse?) case network(error: Error, statusCode: Int, response: HTTPURLResponse?, underlying: AutoGraphError?) case mapping(error: Error, response: HTTPURLResponse?) case invalidResponse(response: HTTPURLResponse?) public init?(graphQLResponseJSON: JSONValue, response: HTTPURLResponse?, networkErrorParser: NetworkErrorParser?) { guard let errorsJSON = graphQLResponseJSON["errors"] else { return nil } guard case .array(let errorsArray) = errorsJSON else { self = .invalidResponse(response: response) return } let errors = errorsArray.compactMap { GraphQLError(json: $0) } let graphQLError = AutoGraphError.graphQL(errors: errors, response: response) if let networkError: NetworkError = networkErrorParser.flatMap({ for error in errors { if let networkError = $0(error) { return networkError } } return nil }) { self = .network(error: networkError, statusCode: networkError.statusCode, response: nil, underlying: graphQLError) } else { self = .graphQL(errors: errorsArray.compactMap { GraphQLError(json: $0) }, response: response) } } public var errorDescription: String? { switch self { case .graphQL(let errors, _): return errors.compactMap { $0.localizedDescription }.joined(separator: "\n") case .network(let error, let statusCode, _, let underlying): return "Network Failure - \(statusCode): " + error.localizedDescription + "\n" + (underlying?.localizedDescription ?? "") case .mapping(let error, _): return "Mapping Failure: " + error.localizedDescription case .invalidResponse: return "Invalid Response" } } } public struct GraphQLError: LocalizedError, Equatable { public struct Location: CustomStringConvertible, Equatable { public let line: Int public let column: Int public var description: String { return "line: \(line), column: \(column)" } init?(json: JSONValue) { guard case .some(.number(let line)) = json["line"] else { return nil } guard case .some(.number(let column)) = json["column"] else { return nil } self.line = line.asNSNumber.intValue self.column = column.asNSNumber.intValue } } public let message: String public let locations: [Location] public let jsonPayload: JSONValue public var errorDescription: String? { return self.message } init(json: JSONValue) { self.jsonPayload = json self.message = { guard case .some(.string(let message)) = json["message"] else { return "" } return message }() self.locations = { guard case .some(.array(let locations)) = json["locations"] else { return [] } return locations.compactMap { Location(json: $0) } }() } public static func == (lhs: GraphQLError, rhs: GraphQLError) -> Bool { return lhs.message == rhs.message && lhs.locations == rhs.locations } }
[ -1 ]
6fd270f88d4ccca604784d0f0459984fc0bdcf2e
1ecc431cd2c280561ea201529689ea229351c7b3
/SwiftUISignUp/SwiftUISignUp/ContentView.swift
b1e972808b6e89f95f8af7e0898d20ed897dcab9
[ "MIT" ]
permissive
LawrenceHan/SwiftUI-Sign-Up
f604493645f9cecf766c248739ef74c64b48e2e1
dd81d5917ec2e36a459698cc858d91bb8055bd15
refs/heads/master
2020-07-30T13:24:35.821023
2019-09-26T02:27:43
2019-09-26T02:27:43
210,249,457
5
0
null
null
null
null
UTF-8
Swift
false
false
1,518
swift
// // ContentView.swift // SwiftUISignUp // // Created by Hanguang on 2019/9/23. // Copyright © 2019 hanguang. All rights reserved. // import SwiftUI struct ContentView: View { @ObservedObject var user: User var body: some View { NavigationView { KeyboardObservingView { ScrollView(showsIndicators: false) { RegisterTopView() .padding(.top, 100) PYTextFieldView(type: .lastname, text: $user.lastName) Divider().padding(.leading).padding(.trailing) PYTextFieldView(type: .firstname, text: $user.firstName) Divider().padding(.leading).padding(.trailing) PYTextFieldView(type: .email, text: $user.email) Divider().padding(.leading).padding(.trailing) PYTextFieldView(type: .pincode, text: $user.pinCode) Divider().padding(.leading).padding(.trailing).padding(.bottom) } }.navigationBarTitle("SignUpUI.Title") } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { Group { ContentView(user: User()) .environmentObject(Keyboard()) ContentView(user: User()) .environmentObject(Keyboard()) .environment(\.locale, Locale(identifier: "zh-Hans")) .environment(\.colorScheme, .dark) } } }
[ -1 ]
dc09e641aa005200380309570779c38c04d0f981
4a87579032ecba6eb2e2c78c8d373db67b142342
/David Marro/Network/Network.swift
3b6f79f6a9d61bd4ced5c38df7b0e30567760c24
[]
no_license
davidmarro1234/esame
e2065184b828ae1e5458e893828b52556f75f1cb
91dc3398f3421b391d940d8021c17520ad761f0a
refs/heads/master
2021-01-08T04:31:11.152157
2020-02-20T16:33:03
2020-02-20T16:33:03
241,913,296
0
0
null
null
null
null
UTF-8
Swift
false
false
10,277
swift
// // Network.swift // David Marro // // Created by David Marro on 10/06/2019. // Copyright © 2019 David Marro. All rights reserved. // import UIKit /** Classe che si occupa di gestire tutte le chiamate ai servizi web esterni dall'app. */ class Network { // chiedi al server il meteo di roma static func richiestaMeteoRoma(){ let url = "http://ied.apptoyou.it/app/meteoroma.php" IEDNetworking.jsonGet(url: url, authToken: nil, parameters: nil) { // viene eseguita quando riceve risp dal server (risposta) in if risposta.success{ // controllo se i dati ricevuti sono del tipo che mi aspettavo if let temperatura = risposta.data as? Int{ print("La temperatura a Roma è di \(temperatura) °C") } } } } typealias CompletionMeteo = ((Meteo?) -> Void) static func richiestaMeteoEvento(_ evento: Evento?, completion: CompletionMeteo?) { // check validità dei dati guard let coordinate = evento?.coordinate else{ // dati non validi return } // indirizzo del servizio web da richiamare let url = "http://ied.apptoyou.it/app/weather.php" // parametri da passare al servizio var parametri=IEDDictionary() parametri["appid"]="7854e283b3c65ba9943d850e002019b4" parametri["units"]="metric" parametri["lang"]="it" parametri["lat"] = coordinate.latitude parametri["lon"] = coordinate.longitude // richiamo il servizio IEDNetworking.jsonGet(url: url, authToken: nil, parameters: parametri) { // eseguita quando riceve risposta dal server (risposta) in if risposta.success{ if let dictionary = risposta.data as? IEDDictionary{ // parse della risposta let meteo = NetworkParser.parseMeteo(conData: dictionary) completion?(meteo) print("la temperatura è: \(meteo?.temperatura ?? 0)") print("la descrizione è: \(meteo?.descrizione ?? "")") } } } } typealias CompletionLogin = ((Utente?) -> Void) static func richiestaLogin(conEmail email: String?, password: String?, completion: CompletionLogin?){ // controllo la validita dei dati guard let email = email, let password = password else { // Dati non validi completion?(nil) return } // indirizzo del servizio web da richiamare let url = "http://ied.apptoyou.it/app/login.php" // parametri da passare al servizio var parametri = IEDDictionary() parametri["email"]=email parametri["password"]=password IEDNetworking.jsonPost(url: url, authToken: nil, parameters: parametri) { (risposta) in if risposta.success{ // controllo se il server ha inviato i dati che mi aspettavo if let data = risposta.data as? IEDDictionary{ if let datiUtente = data["data"] as? IEDDictionary{ // login Riuscito let utente = NetworkParser.parseUtente(conData: datiUtente) // restituisco l oggetto alla funzione chiamante completion?(utente) return } } } // login fallito completion?(nil) } } // typealias CompletionLogin = utente -> Void // MARK: - Modifica Avatar typealias CompletionModificaAvatar = ((Bool) -> Void) static func richiestaModificaAvatarUtenteConnesso(nuovoAvatar: UIImage, completion: CompletionModificaAvatar?){ let url = "http://ied.apptoyou.it/app/modifica_avatar.php" let dataAvatar = nuovoAvatar.jpegData(compressionQuality: 1.0)! let fileAvatar = IEDNetworkingMultipartFile.init(parameter: "avatar", name: "avatar.jpg", mimeType: "image/jpg", data: dataAvatar) // prendo il token dell utente connesso let authToken = LoginUtility.utenteConnesso?.authToken IEDNetworking.jsonMultipartPost(url: url, authToken: authToken , parameters: nil, multipartFiles: [fileAvatar]) { (response) in // controllo se la richiesta è andata a buon fine if response.success { completion?(true) }else{ completion?(false) } } } // MARK- Utente connesso typealias CompletionUtente = ((Utente?) -> Void) static func richiestaUtenteConnesso(completion: CompletionUtente?){ // Fare in modo che all apertura della schermata del profilo dell utente connesso, venga stampato l indirizzo corretto avatar_url sulla console let url = "http://ied.apptoyou.it/app/utente.php" let authToken = LoginUtility.utenteConnesso?.authToken IEDNetworking.jsonGet(url: url, authToken: authToken, parameters: nil) { (response) in print(response) if let data = response.data as? IEDDictionary{ if let datiUtente = data["data"] as? IEDDictionary{ // login Riuscito let utente = NetworkParser.parseUtente(conData: datiUtente) // restituisco l oggetto alla funzione chiamante completion?(utente) return } } } // Richiesta fallita completion?(nil) } static func richiestaModificaUtente(_ utente: Utente, completion: CompletionUtente?){ // codice // la richiesta è una json put su questo indirizzo // let url = "http://ied.apptoyou.it/app/modifica_utente.php" let authToken = LoginUtility.utenteConnesso?.authToken var parameters = IEDDictionary() // parameters["_method"] = "PUT" parameters["nome"]=utente.nome parameters["cognome"]=utente.cognome parameters["citta"]=utente.citta parameters["data_nascita"]=utente.dataNascita // let dataImage = foto.jpegData(compressionQuality: 1.00) IEDNetworking.jsonPost(url: url, authToken: authToken, parameters: parameters) { (response) in if response.success { completion?(utente) }else{ // completion?(false) } // vanno passati al servere i parametri dei campi da modificare } } typealias CompletionListaEventi = (([Evento]?) -> Void) static func richiestaListaEventi (completion: CompletionListaEventi?){ // indirizzo del servizio web da richiamare let url = "http://ied.apptoyou.it/app/api/eventi.php" // parametri da passare al servizio IEDNetworking.jsonGet(url: url, authToken: nil, parameters: nil) { (response) in print(response) if response.success{ if let data = response.data as? IEDDictionary{ if let datiEventi = data["data"] as? IEDArray{ let listaEventi = NetworkParser.parseListaEventi(con: datiEventi) completion?(listaEventi) // print(datiEventi) return } } } // Richiesta fallita completion?(nil) } } typealias CompletionCreaEvento = ((Bool) -> Void) static func richiestaCreaEvento(_ eventoDaCreare: CreaEvento?, completion: CompletionCreaEvento? ){ // prendere immagine copertina dell'evento // inviarla come parametro al server: il nome del parametro è "cover" (modifica avatar immagine) let url = "http://ied.apptoyou.it/app/api/evento.php" let authToken = LoginUtility.utenteConnesso?.authToken var parameters = IEDDictionary() // parameters["_method"] = "PUT" parameters["nome"] = eventoDaCreare?.nome parameters["descrizione"]=eventoDaCreare?.descrizione parameters["prezzo"]=eventoDaCreare?.prezzo parameters["indirizzo"]=eventoDaCreare?.indirizzio parameters["lat"]=eventoDaCreare?.latitude parameters["lng"]=eventoDaCreare?.longitude if let cover = eventoDaCreare?.copertina{ let dataImage = cover.jpegData(compressionQuality: 1.00) let fileImage = IEDNetworkingMultipartFile.init(parameter: "cover", name: "copertina.jpg", mimeType: "image/jpg", data: dataImage!) IEDNetworking.jsonMultipartPost(url: url, authToken: authToken, parameters: parameters, multipartFiles: [fileImage]) { (response) in if response.success { completion?(true) } else { completion?(false) } } }else{ IEDNetworking.jsonPost(url: url, authToken: authToken, parameters: parameters) { (response) in if response.success { // completion?(true) }else{ completion?(false) } } } } }
[ -1 ]
f06541b5eb10b0ed0634a3d776baf7399a1d6e7f
1617355e9277051dca308e302def7c42cc0ac72b
/ReelBox/Model/SearchMovie.swift
49df48f26993311a343fc92ce7897d48a42d6510
[]
no_license
Shar-gul/ReelBox
057da0ac8fefbacebb5315acb98750541641254e
b4bfb999079c0c726e66f7506c614fe1f20b3a81
refs/heads/master
2020-04-23T02:04:14.462847
2019-05-02T23:26:21
2019-05-02T23:26:21
170,833,879
0
0
null
null
null
null
UTF-8
Swift
false
false
1,375
swift
// // SearchMovie.swift // ReelBox // // Created by Tiago Valente on 10/03/2019. // Copyright © 2019 Tiago Valente. All rights reserved. // import Foundation class SearchMovie : Decodable { var page : Int var totalResults : Int var totalPages : Int var results : [MovieObject] } extension SearchMovie { static let QUERY_KEY = "query" class func requestSearchMovie(query: String, success: @escaping (_ success: SearchMovie) -> Void, failure: @escaping (String) -> Void) { guard let urlComp = URLComponents(string: Configurations.server + "search/movie?") else { failure("") return } let params = [QUERY_KEY : query, Configurations.API_KEY : Configurations.API_KEY_VALUE] NetworkManager.requestURL(url: urlComp, parameters: params, success: { (response) in do { let decoder = JSONDecoder() decoder.keyDecodingStrategy = .convertFromSnakeCase let resultObject = try decoder.decode(SearchMovie.self, from: response as! Data) success(resultObject) } catch let jsonErr { print("Error", jsonErr) failure("Error \(jsonErr)") } }) { (error) in print(error) } } }
[ -1 ]
1939c29a1c0cb121c982e80e283d5aa4b10d447d
c31eff7fab04ff78f5bda687c05c1ce0982b9464
/eContact Collect/Code/UI/Wizards/WizOrgDefine1ViewController.swift
64689e1e70fe1dd856fe1162180f645b35716ce1
[]
no_license
TheCyberMike/eContactCollect-iOS
c740ce5c66633cf82fa92c56d0efca24cd57e0fa
782ae1bb5a38e30319636edfaa79319aaf56bb14
refs/heads/master
2020-04-11T16:22:03.861450
2019-09-17T08:51:13
2019-09-17T08:51:13
161,921,855
0
0
null
null
null
null
UTF-8
Swift
false
false
8,424
swift
// // WizOrgDefine1ViewController.swift // eContact Collect // // Created by Yo on 11/30/18. // import UIKit import Eureka class WizOrgDefine1ViewController: FormViewController, UIDocumentPickerDelegate, CIVC_Delegate { // member variables private var mSelections:SelectableSection<ListCheckRow<String>>? = nil // member constants and other static content private let mCTAG:String = "VCW2-1" private weak var mRootVC:WizMenuViewController? = nil // outlets to screen controls @IBAction func button_cancel_pressed(_ sender: UIBarButtonItem) { self.mRootVC?.mWorking_Org_Rec = nil self.clearVC() if !self.navigationController!.popToViewController(ofKind: WizMenuViewController.self) { self.navigationController!.popToRootViewController(animated: true) } } // called when the object instance is being destroyed deinit { //debugPrint("\(mCTAG).deinit STARTED") } // called by the framework after the view has been setup from Storyboard or NIB, but NOT called during a fully programmatic startup; // only children (no parents) will be available but not yet initialized (not yet viewDidLoad) override func viewDidLoad() { //debugPrint("\(self.mCTAG).viewDidLoad STARTED") super.viewDidLoad() self.mRootVC = self.navigationController!.findViewController(ofKind: WizMenuViewController.self) as? WizMenuViewController assert(self.mRootVC != nil, "\(self.mCTAG).viewDidLoad self.mRootVC == nil") // build the form self.buildForm() } // called by the framework when the view will *re-appear* (first time, from popovers, etc) // parent and all children are now available override func viewWillAppear(_ animated:Bool) { //debugPrint("\(self.mCTAG).viewWillAppear STARTED") super.viewWillAppear(animated) } // called by the framework when the view has disappeared from the UI framework; // remember this does NOT necessarily mean the view is being dismissed since viewDidDisappear() will be called if this VC opens another VC; // need to forceably clear the form else this VC will not deinit() override func viewDidDisappear(_ animated:Bool) { if self.isBeingDismissed || self.isMovingFromParent || (self.navigationController?.isBeingDismissed ?? false) || (self.navigationController?.isMovingFromParent ?? false) { //debugPrint("\(self.mCTAG).viewDidDisappear STARTED AND VC IS DISMISSED") self.clearVC() } else { //debugPrint("\(self.mCTAG).viewDidDisappear STARTED BUT VC is not being dismissed") } super.viewDidDisappear(animated) } // called by the framework when memory needs to be freed override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } // intercept the Next segue override open func shouldPerformSegue(withIdentifier identifier:String, sender:Any?) -> Bool { if identifier != "Segue Next_W_ORG_1_3" { return true } let selected:String = self.mSelections!.selectedRow()!.selectableValue! switch selected { case "Create": // create a default Org do { let orgRec:RecOrganizationDefs = try DatabaseHandler.shared.createDefaultOrg() self.mRootVC!.mWorking_Org_Rec = orgRec (UIApplication.shared.delegate as! AppDelegate).checkCurrentOrg(withOrgRec: orgRec) } catch { AppDelegate.postToErrorLogAndAlert(method: "\(self.mCTAG).shouldPerformSegue", errorStruct: error, extra: nil) AppDelegate.showAlertDialog(vc: self, title: NSLocalizedString("Database Error", comment:""), errorStruct: error, buttonText: NSLocalizedString("Okay", comment:"")) } self.clearVC() if !self.navigationController!.popToViewController(ofKind: WizMenuViewController.self) { self.navigationController!.popToRootViewController(animated: true) } return false case "Import": let documentPicker:UIDocumentPickerViewController = UIDocumentPickerViewController(documentTypes: ["opensource.theCyberMike.eContactCollect.eContactCollectConfig"], in: UIDocumentPickerMode.import) documentPicker.delegate = self documentPicker.modalPresentationStyle = UIModalPresentationStyle.fullScreen self.present(documentPicker, animated: true, completion: nil) return false case "Wizard": break default: break } return true } // clear out the Form so this VC will deinit private func clearVC() { form.removeAll() tableView.reloadData() self.mSelections = nil } // build the form private func buildForm() { form.removeAll() tableView.reloadData() let section1 = Section() form +++ section1 section1 <<< TextAreaRow() { $0.tag = "info" $0.textAreaHeight = .dynamic(initialTextViewHeight: 100.0) $0.title = NSLocalizedString("Info", comment:"") $0.value = NSLocalizedString("%info%_WizOrgDefine1", comment:"") $0.disabled = true }.cellUpdate { cell, row in cell.textView.font = .systemFont(ofSize: 17.0) cell.textView.textColor = UIColor.black } // show the allowed selections self.mSelections = SelectableSection<ListCheckRow<String>>(NSLocalizedString("Please Choose Below then Press Next", comment:""), selectionType: .singleSelection(enableDeselection: false)) form +++ self.mSelections! form.last! <<< ListCheckRow<String>("option_Create"){ listRow in listRow.title = NSLocalizedString("Create a simple default Organization you can edit later", comment:"") listRow.selectableValue = "Create" listRow.value = "Create" }.cellUpdate { cell, row in cell.textLabel?.font = .systemFont(ofSize: 15.0) cell.textLabel?.numberOfLines = 0 } form.last! <<< ListCheckRow<String>("option_import"){ listRow in listRow.title = NSLocalizedString("Import an Organization Definitions file you have already been given", comment:"") listRow.selectableValue = "Import" listRow.value = nil }.cellUpdate { cell, row in cell.textLabel?.font = .systemFont(ofSize: 15.0) cell.textLabel?.numberOfLines = 0 } form.last! <<< ListCheckRow<String>("option_wizard"){ listRow in listRow.title = NSLocalizedString("Use a Wizard to create and customize an Organization in detail", comment:"") listRow.selectableValue = "Wizard" listRow.value = nil }.cellUpdate { cell, row in cell.textLabel?.font = .systemFont(ofSize: 15.0) cell.textLabel?.numberOfLines = 0 } } // return from the document picker func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { //debugPrint("\(self.mCTAG).documentPicker.didPickDocumentsAt STARTED URL=\(urls[0].path)") let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil) let newViewController = storyBoard.instantiateViewController(withIdentifier: "VC PopupImport") as! PopupImportViewController newViewController.mCIVCdelegate = self newViewController.mFromExternal = false newViewController.mFileURL = urls[0] newViewController.modalPresentationStyle = .custom self.present(newViewController, animated: true, completion: nil) } // return from a successful import func completed_CIVC_ImportSuccess(fromVC:PopupImportViewController, orgWasImported:String, formWasImported:String?) { //debugPrint("\(self.mCTAG).completed_CIVC_ImportSuccess STARTED") (UIApplication.shared.delegate as! AppDelegate).setCurrentOrg(toOrgShortName: orgWasImported) self.mRootVC!.mWorking_Org_Rec = nil self.navigationController?.popToRootViewController(animated: true) } }
[ -1 ]
3de00e55ab8a8bc41758d6c271a30d34424b7e6a
cd628b3ef1f6cf0d15a498e98bfcb3afe258e2a2
/MovieDB-NBS/Module/Home/ComingSoonCell/ComingSoonCollectionViewCell.swift
25ff7df46cd68a3fcd11692cdf56cf0a4b94bd2d
[]
no_license
zakywisnu/MovieDB
11a119ece5304ed07c365674b774e43729c4c448
be16d5dbd9bffac147f59bb8d84caddc9e5e45e9
refs/heads/main
2023-06-06T21:55:30.565038
2021-06-27T16:17:41
2021-06-27T16:17:41
378,585,060
0
0
null
null
null
null
UTF-8
Swift
false
false
900
swift
// // ComingSoonCollectionViewCell.swift // MovieDB-NBS // // Created by Ahmad Zaky on 20/06/21. // import UIKit import SDWebImage protocol ComingSoonCollectionViewCellDelegate: AnyObject { func listComingSoonDidTap(movie: MovieModel) } class ComingSoonCollectionViewCell: UICollectionViewCell { @IBOutlet weak var comingSoonImage: UIImageView! weak var delegate: ComingSoonCollectionViewCellDelegate? override func awakeFromNib() { super.awakeFromNib() // Initialization code } var movie: MovieModel? { didSet { guard let url = movie?.posterPath else {return} let imageUrl = MovieConstant.imageUrl + url comingSoonImage.sd_setImage(with: URL(string: imageUrl)) } } @IBAction func listComingSoonTouched(_ sender: Any) { delegate?.listComingSoonDidTap(movie: movie!) } }
[ -1 ]
02068f454713796ae218cfd03abe832f6e214ac5
73954ec31fcac469bd007c4221dc7b7db8257062
/runTimeLanguageChange/Localize/LocalizedManager.swift
c8fc5e3d6d16f1130fe98893b6b47005a80302f1
[]
no_license
jupiter1992/runTimeLanguageChange
cf856cbf17c7de9cc1949a9d46ab6addc5858b3b
47602de784c6afeb7062b37b3ab895b5e31b192d
refs/heads/master
2020-09-12T16:42:53.434459
2019-11-18T10:00:52
2019-11-18T10:09:06
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,879
swift
// // LocalizedManager.swift // runTimeLanguageChange // // Created by 游宗諭 on 2019/11/18. // Copyright © 2019 游宗諭. All rights reserved. // import Foundation import UIKit.UILabel import UIKit.UITextField import UIKit.UIButton protocol Localizable: AnyObject { var localizedKey:String? {get set} } class LocalizedManager { static var shared = LocalizedManager() private(set) var setting: LocalizedSetting = .en func change(setting newsetting: LocalizedSetting) { self.setting = newsetting bSet.forEach{ guard let v = $0.value else {return} self.update(v) } fSet.forEach{ guard let v = $0.value else {return} self.update(v) } lSet.forEach { l in guard let v = l.value else {return} self.update(v) } } private var bSet = Set<Weak<UIButton>>() private var fSet = Set<Weak<UITextField>>() private var lSet = Set<Weak<UILabel>>() private func add(_ button:UIButton) { bSet.insert(Weak(button)) } private func add(_ label:UILabel) { lSet.insert(Weak(label)) } private func add(_ textField:UITextField) { fSet.insert(Weak(textField)) } func apply(_ label: UILabel) { update(label) add(label) } func apply(_ button: UIButton, state:UIButton.State) { button.setTitle( setting.cache[button.accessibilityIdentifier!], for: state) add(button) } func apply(_ textField: UITextField) { textField.placeholder = setting.cache[textField.accessibilityIdentifier!] add(textField) } func update(_ label:UILabel) { label.text = setting.cache[label.accessibilityIdentifier!] } func update(_ button:UIButton) { UIView.performWithoutAnimation { button.setTitle(setting.cache[(button.accessibilityIdentifier!)], for: .normal) button.layoutIfNeeded() } } func update(_ textField:UITextField) { textField.placeholder = setting.cache[textField.accessibilityIdentifier!] } }
[ -1 ]
50f4d58157b853946102204dd60697f2bb533b93
1c00a5f6c58e042b7f16020ebe30c7770e2845f0
/ios/KotlinQuizIOS/Sources/AppDelegate.swift
f4ae60e35f240fc89ebbbbef2b0841b5092e0b9f
[]
no_license
kharchenkovitaliypt/KotlinQuiz
40cec62804f1c0d18b5bb2d9014d89d554572cee
d3104284096ac29d9b3c684714c61405c10beb36
refs/heads/master
2020-05-07T08:16:58.573988
2019-06-06T12:01:52
2019-06-06T12:01:52
180,318,022
1
0
null
null
null
null
UTF-8
Swift
false
false
2,166
swift
// // AppDelegate.swift // KotlinQuizIOS // // Created by Vitaliy on 4/9/19. // Copyright © 2019 Test. 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, 278545, 229394, 278548, 229397, 229399, 229402, 352284, 278556, 229405, 278559, 229408, 294950, 229415, 229417, 327722, 237613, 229422, 360496, 229426, 237618, 229428, 311349, 286774, 286776, 319544, 286778, 204856, 229432, 352318, 286791, 237640, 286797, 278605, 311375, 163920, 237646, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 278648, 237693, 303230, 327814, 303241, 131209, 417930, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 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, 254563, 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, 189169, 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, 213895, 304009, 304011, 230284, 304013, 295822, 213902, 279438, 189329, 295825, 304019, 189331, 58262, 304023, 304027, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 230334, 304063, 238528, 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, 132165, 296004, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 205934, 279661, 312432, 279669, 337018, 189562, 279679, 304258, 279683, 222340, 66690, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 238770, 304311, 230592, 312518, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230679, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 296253, 222525, 296255, 312639, 230718, 296259, 378181, 296262, 230727, 238919, 296264, 320840, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 148843, 410987, 230763, 230768, 296305, 312692, 230773, 304505, 304506, 181626, 279929, 181631, 148865, 312711, 312712, 296331, 288140, 288144, 230800, 304533, 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, 239064, 329177, 288217, 288218, 280027, 288220, 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, 230961, 157236, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 116354, 280194, 280208, 280211, 288408, 280218, 280222, 419489, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 419522, 280260, 419525, 206536, 280264, 206539, 206541, 206543, 263888, 313044, 280276, 321239, 280283, 313052, 18140, 288478, 313055, 419555, 321252, 313066, 288494, 280302, 280304, 313073, 321266, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 304968, 280393, 280402, 173907, 313171, 313176, 42842, 280419, 321381, 296809, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 190403, 296900, 280515, 337862, 165831, 280521, 231379, 296921, 354265, 354270, 239586, 313320, 354281, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 305176, 321560, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 149599, 280671, 149601, 321634, 149603, 223327, 329830, 280681, 313451, 223341, 280687, 149618, 215154, 313458, 280691, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 288909, 141455, 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, 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, 281095, 223752, 150025, 338440, 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, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 158409, 256716, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 158596, 183172, 338823, 322440, 314249, 240519, 183184, 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, 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, 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, 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, 307211, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 307290, 217179, 315482, 192605, 315483, 233567, 299105, 200801, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 241821, 299167, 315552, 184479, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 299185, 323763, 184503, 299191, 176311, 307386, 258235, 307388, 176316, 307390, 307385, 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, 283033, 242075, 291226, 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, 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, 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, 324504, 234396, 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, 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, 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, 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, 316959, 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, 276052, 276053, 284249, 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, 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, 276448, 276452, 292839, 276455, 292843, 276460, 178161, 227314, 276466, 325624, 276472, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 350218, 292876, 350222, 317456, 276496, 317458, 178195, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 325692, 235581, 178238, 276539, 276544, 284739, 325700, 243779, 292934, 243785, 276553, 350293, 350295, 309337, 227418, 350299, 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, 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, 129603, 301636, 318020, 301639, 301643, 285265, 399955, 309844, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 309871, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 318092, 326285, 334476, 318094, 277136, 277139, 227992, 318108, 285340, 318110, 227998, 137889, 383658, 285357, 318128, 277170, 293555, 318132, 342707, 154292, 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, 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, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 302403, 294211, 384328, 277832, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 327046, 277892, 253320, 310665, 318858, 277894, 277898, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 302534, 310727, 245191, 64966, 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, 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, 278188, 302764, 278192, 319153, 278196, 319163, 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, 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 ]
b52c30f844f2ff712c877e65da349e003ba63309
1daa4757c14c4d99c74496c80d538b0859246324
/WorkoutHelper/BaseViewController.swift
55087df47768dd889201709ad32e7eaed5aec74a
[ "MIT" ]
permissive
v-nanov/WorkHelper
8bed1b254238e9200469cb6c36c020093adec76d
7e282e7c51b7d37abd2da2c15f3562fe94e3212c
refs/heads/master
2021-01-24T08:08:21.226634
2017-06-05T07:14:59
2017-06-05T07:14:59
93,372,773
0
0
null
2017-06-05T06:35:00
2017-06-05T06:35:00
null
UTF-8
Swift
false
false
806
swift
// // BaseViewController.swift // WorkoutHelper // // Created by George on 2016/12/13. // Copyright © 2016年 George. All rights reserved. // import UIKit import Toaster class BaseViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor.white // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } 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 ]
a5e9b287c6a35815618ae0ef41be7f5a00992b74
c3e8475e544258ec74c7e685947d8d4c4ea5084a
/AlgosDS.playgroundbook/Edits/UserEdits.diffpack/UserModules/Trees.playgroundmodule/Sources/Successor.swift
cb70561fe47805a66118c6b82c05112515ecf011
[ "MIT" ]
permissive
GokulKatragadda9/AlgosDS
701089d0b9ddb0a5ca8aed0e7aa55e51a1ecded7
dfb0090a51a01a62cfb47b4831fa07f3eb04ea0f
refs/heads/main
2023-08-24T21:03:14.480492
2021-10-13T19:48:32
2021-10-13T19:48:32
393,813,330
0
0
MIT
2021-10-08T03:27:56
2021-08-07T23:28:56
null
UTF-8
Swift
false
false
1,252
swift
// Successor: Write an algorithm to find the "next" node (i.e., in-order successor) of a given node in a binary search tree. You may assume that each node has a link to its parent. public class BinaryTreeNodeWithParent { let value: Int public var left: BinaryTreeNodeWithParent? public var right: BinaryTreeNodeWithParent? public var parentNode: BinaryTreeNodeWithParent? public init(_ value: Int) { self.value = value } } //BigO: time: O(n) space: O(H) public func successor(of node: BinaryTreeNodeWithParent?) { if node == nil { return } let rootNode = findRoot(of: node) inOrderTraverse(rootNode, node) } func findRoot(of node: BinaryTreeNodeWithParent?) -> BinaryTreeNodeWithParent? { var node = node while node?.parentNode != nil { node = node?.parentNode } return node } var printNext = false func inOrderTraverse(_ root: BinaryTreeNodeWithParent?, _ givenNode: BinaryTreeNodeWithParent?) { if root == nil || givenNode == nil { return } inOrderTraverse(root?.left, givenNode) if printNext { print(root?.value) printNext = false } if root === givenNode { printNext = true } inOrderTraverse(root?.right, givenNode) }
[ -1 ]
c173fe5611c454916a28a84b50d4176fed70db2a
6c0c5868a5dc1b650b17ac3c3f82c5585249f676
/Memoria/Cronometro.swift
19deaf1ed1d6f84c286bc73ee9bfaa4290814afe
[]
no_license
natanaeldiego/jogo-de-cartas-ios
48eb7e1cc7ab7f87e979ce54ceca116634ee01da
f98b47d50aa38ce6708f7d4a82c9d4dc637f055f
refs/heads/master
2023-03-31T00:18:59.728288
2021-04-07T23:47:56
2021-04-07T23:47:56
355,710,725
0
0
null
null
null
null
UTF-8
Swift
false
false
1,523
swift
// // Cronometro.swift // Memoria // // Created by Natanael Diego on 07/04/21. // import SwiftUI struct Cronometro: Shape { var anguloInicial: Angle var anguloFinal: Angle var sentidoHorario: Bool = false var animatableData: AnimatablePair<Double, Double> { get { AnimatablePair(anguloInicial.radians, anguloFinal.radians) } set { anguloInicial = Angle(radians: newValue.first) anguloFinal = Angle(radians: newValue.second) } } // 1/30 de segundo - Modo Economia de Bateria // 1/40 de segundo - Modo normal - iPad, iPhone // 1/60 de segundo - Modo normal - iPhone Pro // 1/120 de segundo - Modo normal - iPad Pro func path(in rect: CGRect) -> Path { let centro = rect.center let circunferencia = min(rect.width, rect.height) / 2 let pontoPartida = CGPoint( x: centro.x + circunferencia * cos(CGFloat(anguloInicial.radians)), y: centro.y + circunferencia * sin(CGFloat(anguloInicial.radians)) ) var caminho = Path() caminho.move(to: centro) caminho.addLine(to: pontoPartida) caminho.addArc(center: centro, radius: circunferencia, startAngle: anguloInicial, endAngle: anguloFinal, clockwise: sentidoHorario) caminho.addLine(to: centro) return caminho } } fileprivate extension CGRect { var center: CGPoint { CGPoint(x: self.midX, y: self.midY) } }
[ -1 ]
46158fcd7f478566d887802435b95b5ca5466c31
9fa0b09f644d9cf8d832d0ffe75c626ce0cd453c
/Sources/Get/Package.swift
8c33d578e24ee4f27ee6496bb914841b08fd809b
[ "Apache-2.0", "Swift-exception" ]
permissive
dkeilIOS/swift-package-manager
f5c668783fbca7ef3c7ce696ba95bc6b45824721
f57a8789d02935eb1c6879fe99cd071b7b555f92
refs/heads/master
2018-01-15T12:09:37.035838
2016-04-02T10:22:20
2016-04-02T10:22:20
55,294,977
2
0
null
2016-04-02T13:08:47
2016-04-02T13:08:47
null
UTF-8
Swift
false
false
1,561
swift
/* This source file is part of the Swift.org open source project Copyright 2015 - 2016 Apple Inc. and the Swift project authors Licensed under Apache License v2.0 with Runtime Library Exception See http://swift.org/LICENSE.txt for license information See http://swift.org/CONTRIBUTORS.txt for Swift project authors */ import struct PackageDescription.Version import PackageType import Utility extension Package { // FIXME we *always* have a manifest, don't reparse it static func make(repo repo: Git.Repo, manifestParser: (path: String, url: String) throws -> Manifest) throws -> Package? { guard let origin = repo.origin else { throw Error.NoOrigin(repo.path) } let manifest = try manifestParser(path: repo.path, url: origin) let pkg = Package(manifest: manifest, url: origin) guard Version(pkg.versionString) != nil else { return nil } return pkg } } extension Package: Fetchable { var children: [(String, Range<Version>)] { return manifest.package.dependencies.map{ ($0.url, $0.versionRange) } } private var versionString: String.CharacterView { return path.basename.characters.dropFirst(name.characters.count + 1) } var version: Version { return Version(versionString)! } func constrain(to versionRange: Range<Version>) -> Version? { return nil } var availableVersions: [Version] { return [version] } func setVersion(newValue: Version) throws { throw Get.Error.InvalidDependencyGraph(url) } }
[ -1 ]
984c65bb3014786fe455d166928804fb4977b101
8361a869a4ff882cafb755e3cab71aab0cd9c0db
/CaBuGmap/Model/GeocodedWaypoint.swift
03b2472b977e245afe94f6e84d1c6762f81b63ef
[]
no_license
ngoctamcb/CaBuGmap
62ee374bf1b2d665b4fa3e267970542feddfea67
c451faef5b08d00443e5372d7a82c5fdf09f1000
refs/heads/master
2021-05-07T08:00:09.400687
2017-11-14T02:12:12
2017-11-14T02:12:12
109,237,214
0
0
null
null
null
null
UTF-8
Swift
false
false
167
swift
// // GeocodedWaypoint.swift // CaBuGmap // // Created by Tran Ngoc Tam on 11/2/17. // Copyright © 2017 Tran Ngoc Tam. All rights reserved. // import Foundation
[ -1 ]
5df77287449c8a0498846a5c9922831376db3ebb
673e22b9ac9e6549d06e1520b91fe99efa931aa7
/iOS/View/HomeView.swift
6653a207030046fe7ce5248157c9700404933496
[]
no_license
justluffy/QinSwiftUI
c0d3fa03b27f5460775240572fddc35a90c742aa
7c3ee0aca0cb461f7e621f95fe8e3752d96e52a5
refs/heads/main
2023-08-30T14:46:19.092516
2021-11-17T17:44:16
2021-11-17T17:44:16
null
0
0
null
null
null
null
UTF-8
Swift
false
false
3,671
swift
// // HomeView.swift // Qin // // Created by 林少龙 on 2020/6/30. // Copyright © 2020 teenloong. All rights reserved. // import SwiftUI import NeumorphismSwiftUI struct HomeView: View { @EnvironmentObject private var store: Store @EnvironmentObject private var player: Player private var album: AppState.Album { store.appState.album } private var artist: AppState.Artist { store.appState.artist } private var playlist: AppState.Playlist { store.appState.playlist } private var user: User? { store.appState.settings.loginUser } var body: some View { NavigationView { ZStack { QinBackgroundView() if user != nil { VStack(spacing: 0) { HStack(spacing: 20.0) { Button(action: {}) { NavigationLink(destination: UserView()) { QinSFView(systemName: "person", size: .small) } } .buttonStyle(NEUDefaultButtonStyle(shape: Circle())) SearchBarView() Button(action: {}) { NavigationLink(destination: DiscoverPlaylistView(viewModel: .init(catalogue: store.appState.discoverPlaylist.catalogue))) { QinSFView(systemName: "square.grid.2x2", size: .small) } } .buttonStyle(NEUDefaultButtonStyle(shape: Circle())) } .padding([.leading, .bottom, .trailing]) Divider() if store.appState.initRequestingCount == 0 { ScrollView { VStack { RecommendPlaylistView(playlist: playlist.recommendPlaylist) .padding(.top, 10) CreatedPlaylistView(playlist: playlist.userPlaylist.filter({ $0.userId == user?.userId })) SubedPlaylistView(playlist: playlist.userPlaylist.filter({ $0.userId != user?.userId })) SubedAlbumsView(albums: album.albumSublist) ArtistSublistView(artists: artist.artistSublist) } .padding(.bottom, 100) } }else { Spacer() } } .overlay( VStack { Spacer() PlayerControlBarView() } ) .edgesIgnoringSafeArea(.bottom) }else { LoginView() } } .onTapGesture { self.hideKeyboard() } .navigationBarHidden(true) } .navigationViewStyle(StackNavigationViewStyle()) .accentColor(.orange) .alert(item: $store.appState.error) { error in Alert(title: Text(error.localizedDescription)) } } } #if DEBUG struct HomeView_Previews: PreviewProvider { static var previews: some View { HomeView() .environmentObject(Store.shared) .environmentObject(Player.shared) .environment(\.colorScheme, .light) } } #endif
[ -1 ]
62f06bdb82e2318fb0bf73ecec2399aa57d33fd4
fec41288fdd5aaea43efb0e4de644c97b1ba864d
/Airship/AirshipCore/Source/Icons.swift
c5b5cae072cb60fb3b38008d0a3de93a7c17a11c
[ "Apache-2.0" ]
permissive
modmed/ios-library
7f25dc8152cb9f792c6f7fdc3b67b4a3737ef877
61c8b72eafe6b939aa6a07a04bdcd28a315f06a4
refs/heads/master
2023-04-03T10:28:30.642883
2023-03-24T18:43:33
2023-03-24T18:43:33
197,646,516
0
0
null
2019-07-18T19:38:55
2019-07-18T19:38:55
null
UTF-8
Swift
false
false
955
swift
/* Copyright Airship and Contributors */ import Foundation import SwiftUI @available(iOS 13.0.0, tvOS 13.0, *) struct Icons { private static func createImage(icon: Icon) -> Image { switch(icon) { case .checkmark: return Image(systemName: "checkmark") case .close: return Image(systemName: "xmark") case .backArrow: return Image(systemName: "arrow.backward") case .forwardArrow: return Image(systemName: "arrow.forward") } } @ViewBuilder static func icon(model: IconModel, colorScheme: ColorScheme) -> some View { createImage(icon: model.icon) .resizable() .aspectRatio(contentMode: .fit) .foregroundColor(model.color.toColor(colorScheme)) .applyIf(model.scale != nil) { view in view.scaleEffect(model.scale ?? 1) } } }
[ -1 ]
c3e0caf534c4feaf6bbf4188307087e0304eaa5a
f9dbec0c4d633ac3f371ef35f309332a977c2b7d
/test/stdlib/AVFoundation_Swift3.swift
775faaa9c56a2243923c88b347806148e7e9444d
[ "Apache-2.0", "Swift-exception" ]
permissive
themaplelab/swift
641559703bbceb8f4a41f5267422f6cb96dba803
00dc16e7e4a0b28408308629e993b5d6e4fc3192
refs/heads/wala
2021-06-28T01:56:02.371056
2018-09-13T19:29:10
2018-09-13T19:29:10
91,512,969
2
2
Apache-2.0
2019-01-03T01:39:04
2017-05-16T23:23:11
C++
UTF-8
Swift
false
false
3,751
swift
// RUN: rm -rf %t && mkdir %t // RUN: %target-build-swift -swift-version 3 %s -o %t/a.out // RUN: %target-run %t/a.out // REQUIRES: objc_interop // REQUIRES: executable_test // CoreMedia is not present on watchOS. // UNSUPPORTED: OS=watchos import CoreMedia import AVFoundation import StdlibUnittest import StdlibUnittestFoundationExtras var coreMedia = TestSuite("CoreMedia") func equalCMTimeMappings(_ x: CMTimeMapping, _ y: CMTimeMapping) -> Bool { var xx = x, yy = y return memcmp(&xx, &yy, MemoryLayout<CMTimeMapping>.size) == 0 } coreMedia.test("NSValue bridging") { let time1 = CMTimeMake(181, 60) expectBridgeToNSValue(time1, nsValueInitializer: { NSValue(time: $0) }, nsValueGetter: { $0.timeValue }, equal: (==)) let time2 = CMTimeMake(242, 60) let timeRange1 = CMTimeRangeFromTimeToTime(time1, time2) expectBridgeToNSValue(timeRange1, nsValueInitializer: { NSValue(timeRange: $0) }, nsValueGetter: { $0.timeRangeValue }, equal: (==)) let time3 = CMTimeMake(303, 60) let timeRange2 = CMTimeRangeFromTimeToTime(time2, time3) let timeMapping = CMTimeMapping(source: timeRange1, target: timeRange2) expectBridgeToNSValue(timeMapping, nsValueInitializer: { NSValue(timeMapping: $0) }, nsValueGetter: { $0.timeMappingValue }, equal: equalCMTimeMappings) } var AVFoundationTests = TestSuite("AVFoundation_Swift3") let boxedPixelFormat = NSNumber(value: kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) #if os(macOS) || os(iOS) if #available(iOS 5, *) { AVFoundationTests.test("AVCaptureVideoDataOutput.availableVideoCVPixelFormatTypes") { func f(v: AVCaptureVideoDataOutput) -> Bool { return v.availableVideoCVPixelFormatTypes.contains(where: { e in if let e = e as? NSNumber, e == boxedPixelFormat { return true } else { return false } }) } } } #endif #if os(iOS) if #available(iOS 7, *) { AVFoundationTests.test("AVMetadataMachineReadableCodeObject.corners") { func f(m: AVMetadataMachineReadableCodeObject) -> [Any]! { return m.corners } } } if #available(iOS 10, *) { AVFoundationTests.test("AVCaptureDeviceFormat.supportedColorSpaces") { func f(df: AVCaptureDeviceFormat) -> Bool { return df.supportedColorSpaces.contains(NSNumber(value: AVCaptureColorSpace.sRGB.rawValue)) } } AVFoundationTests.test("AVCapturePhotoOutput.supportedFlashModes") { func f(p: AVCapturePhotoOutput) -> Bool { return p.supportedFlashModes.contains(NSNumber(value: AVCaptureFlashMode.off.rawValue)) } } AVFoundationTests.test("AVCapturePhotoOutput.availablePhotoPixelFormatTypes") { func f(p: AVCapturePhotoOutput) -> Bool { return p.availablePhotoPixelFormatTypes.contains(boxedPixelFormat) } } AVFoundationTests.test("AVCapturePhotoOutput.availableRawPhotoPixelFormatTypes") { func f(p: AVCapturePhotoOutput) -> Bool { return p.availableRawPhotoPixelFormatTypes.contains(boxedPixelFormat) } } AVFoundationTests.test("AVCapturePhotoSettings.availablePreviewPhotoPixelFormatTypes") { func f(p: AVCapturePhotoSettings) -> Bool { return p.availablePreviewPhotoPixelFormatTypes.contains(boxedPixelFormat) } } } if #available(iOS 11, *) { AVFoundationTests.test("AVCaptureSynchronizedDataCollection/iteration") { func f(c: AVCaptureSynchronizedDataCollection) { for element in c { var element = element expectType(AVCaptureSynchronizedData.self, &element) } } } } #endif runAllTests()
[ 72910 ]
8e5e929d701a4571c3248b5c265f10ec468e46f3
9f3dd268e665101c2032192544477bdd57a49dcb
/Antibuddies/CoreDataEntities/PracticeQuestion+CoreDataProperties.swift
051f9abc1709a4bd08228492692e70dea4136a1a
[ "MIT" ]
permissive
mackenziehampel/AntibuddiesXcodeProj
c388e7a7ab652178082a085dc70f7c95de7198c3
1496c48799c8aa06b554daff8cf75f5d65d308e0
refs/heads/master
2020-05-31T13:23:17.022024
2019-08-20T10:27:32
2019-08-20T10:27:32
190,300,197
0
0
MIT
2019-08-13T23:00:20
2019-06-05T00:43:50
Swift
UTF-8
Swift
false
false
1,766
swift
// // PracticeQuestion+CoreDataProperties.swift // Antibuddies // // Created by Ben Oliverson on 8/12/19. // Copyright © 2019 WeberStateUniversity. All rights reserved. // // import Foundation import CoreData extension PracticeQuestion { @nonobjc public class func fetchRequest() -> NSFetchRequest<PracticeQuestion> { return NSFetchRequest<PracticeQuestion>(entityName: "PracticeQuestion") } @NSManaged public var correctAnswer: Int16 @NSManaged public var correctDescription: String? @NSManaged public var difficulty: Int16 @NSManaged public var question: String? @NSManaged public var section: String? @NSManaged public var serverKey: Int32 @NSManaged public var answers: NSSet? @NSManaged public var courseItem: NSSet? @NSManaged public var questionScore: PracticeQuestionScore? } // MARK: Generated accessors for answers extension PracticeQuestion { @objc(addAnswersObject:) @NSManaged public func addToAnswers(_ value: PracticeQuestionAnswer) @objc(removeAnswersObject:) @NSManaged public func removeFromAnswers(_ value: PracticeQuestionAnswer) @objc(addAnswers:) @NSManaged public func addToAnswers(_ values: NSSet) @objc(removeAnswers:) @NSManaged public func removeFromAnswers(_ values: NSSet) } // MARK: Generated accessors for courseItem extension PracticeQuestion { @objc(addCourseItemObject:) @NSManaged public func addToCourseItem(_ value: CourseItem) @objc(removeCourseItemObject:) @NSManaged public func removeFromCourseItem(_ value: CourseItem) @objc(addCourseItem:) @NSManaged public func addToCourseItem(_ values: NSSet) @objc(removeCourseItem:) @NSManaged public func removeFromCourseItem(_ values: NSSet) }
[ -1 ]
5bf5bd3c00703d018d2ac8b494539657a0a6091a
c4a619dd41184828dbd6d72bb7e1f751ed908321
/flickfinder/AppDelegate.swift
8554f4e370dd97dc68554ec93d8168d223f820eb
[]
no_license
enwinn/FlickFinder
dc2499de229bee3650290bae803b63a6745a6dc8
0e62c6017beed758cabf9d17ec2c6bcea430a440
refs/heads/master
2020-06-05T05:51:12.386165
2015-06-19T17:49:46
2015-06-19T17:49:46
37,736,685
0
0
null
null
null
null
UTF-8
Swift
false
false
2,145
swift
// // AppDelegate.swift // flickfinder // // Created by Eric Winn on 6/1/15. // Copyright (c) 2015 Eric N. Winn. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 294924, 229388, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 352284, 229405, 278559, 229408, 278564, 294950, 229415, 229417, 237613, 229422, 229426, 237618, 229428, 286774, 204856, 229432, 286776, 319544, 286791, 237640, 278605, 286797, 311375, 237646, 163920, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 131192, 237693, 327814, 131209, 417930, 303241, 303244, 311436, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 319770, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 311601, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 311693, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 172550, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172609, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 189039, 189040, 352880, 295538, 172655, 189044, 287349, 172656, 172660, 287355, 287360, 295553, 287365, 311942, 295557, 303751, 352905, 279178, 311946, 287371, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 303773, 164509, 295583, 172702, 230045, 287390, 172705, 303780, 287394, 172707, 287398, 279208, 287400, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 328384, 287427, 312006, 107208, 172748, 287436, 107212, 172751, 287440, 295633, 303827, 172755, 279255, 172760, 279258, 287450, 213724, 303835, 189149, 303838, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 295685, 230154, 33548, 312077, 295695, 295701, 369433, 230169, 295707, 328476, 295710, 230175, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 303959, 279383, 230237, 279390, 230241, 279394, 303976, 336744, 303985, 303987, 328563, 279413, 303991, 303997, 295806, 295808, 304005, 295813, 213895, 320391, 304007, 304009, 304011, 230284, 304013, 279438, 213902, 295822, 189329, 295825, 304019, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 304063, 238528, 304065, 189378, 213954, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 197645, 295949, 230413, 320528, 140312, 295961, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 296044, 164973, 279661, 205934, 312432, 279669, 337018, 189562, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 238766, 165038, 230576, 304311, 230592, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 279788, 320748, 279790, 304370, 296189, 320771, 312585, 296202, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 214294, 304416, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 296255, 312639, 230718, 296259, 378181, 238919, 296264, 320840, 230727, 296267, 296271, 222545, 230739, 312663, 222556, 337244, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 279929, 304505, 304506, 181626, 181631, 312711, 296331, 288140, 288144, 230800, 304533, 337306, 288154, 288160, 173472, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 279985, 173488, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 280014, 312783, 288208, 230865, 370130, 288210, 288212, 280021, 288214, 222676, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 370146, 280034, 280036, 288226, 280038, 288230, 288229, 288232, 288234, 320998, 288236, 288238, 288240, 288242, 296435, 288244, 296439, 288250, 148990, 296446, 402942, 206336, 296450, 321022, 230916, 230919, 214535, 370187, 304651, 304653, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 288344, 280152, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 296622, 321200, 337585, 296626, 296634, 296637, 280260, 280264, 206536, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 288499, 288502, 280314, 288510, 124671, 67330, 280324, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 321316, 304932, 280363, 141101, 165678, 280375, 321336, 296767, 288576, 345921, 280388, 304968, 280393, 280402, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280458, 280464, 124817, 280468, 239510, 280473, 124827, 214940, 247709, 280487, 313258, 321458, 296883, 124853, 214966, 296890, 10170, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 313340, 288764, 239612, 239617, 313347, 288773, 313358, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 378941, 313406, 288831, 288836, 67654, 223303, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 223327, 149599, 149601, 280671, 149603, 321634, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 215154, 313464, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 288936, 100520, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 280819, 157940, 182517, 125171, 280823, 280825, 280827, 280830, 280831, 280833, 280835, 125187, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 305480, 239944, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 313705, 280940, 190832, 280946, 223606, 313720, 280956, 280959, 313731, 199051, 240011, 289166, 240017, 297363, 190868, 297365, 240021, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 240132, 223749, 305668, 281095, 223752, 150025, 338440, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 281163, 158283, 281179, 199262, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 281210, 297594, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 199367, 297671, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 281401, 289593, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 338823, 322440, 314249, 240519, 183184, 240535, 289687, 289694, 289696, 289700, 289712, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 281581, 183277, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 314433, 207937, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 388350, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 216376, 298306, 281923, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 314718, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 306555, 314747, 290174, 298365, 224641, 281987, 298372, 314756, 281990, 224647, 265604, 298377, 314763, 142733, 298381, 224657, 306581, 314779, 314785, 282025, 282027, 241068, 241070, 241072, 282034, 241077, 150966, 298424, 306618, 282044, 323015, 306635, 306640, 290263, 290270, 290275, 339431, 282089, 191985, 282098, 290291, 282101, 241142, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 298598, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 282261, 298651, 323229, 282269, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 282410, 241450, 306988, 306991, 315184, 323376, 315190, 241464, 282425, 159545, 298811, 307009, 413506, 241475, 307012, 148946, 315211, 282446, 307027, 315221, 282454, 323414, 241496, 315223, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 298860, 110445, 282478, 282481, 110450, 315249, 315251, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 241556, 44948, 298901, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 178273, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 315483, 217179, 192605, 233567, 200801, 217188, 299109, 307303, 315495, 356457, 307307, 45163, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 184503, 307385, 307386, 258235, 176316, 307388, 307390, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 282931, 307508, 315701, 307510, 332086, 151864, 176435, 168245, 307515, 282942, 307518, 151874, 282947, 282957, 323917, 110926, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 299391, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299440, 299444, 127413, 283062, 291254, 194660, 127417, 291260, 283069, 127421, 127424, 127429, 127431, 283080, 315856, 176592, 315860, 176597, 127447, 283095, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 127466, 176620, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 135689, 233994, 291341, 233998, 234003, 234006, 127511, 152087, 283161, 234010, 135707, 242202, 135710, 242206, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 299655, 373383, 135820, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 299726, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 381677, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 242436, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 348950, 234264, 201496, 234266, 234269, 283421, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 292433, 234313, 316233, 316235, 234316, 283468, 234319, 242511, 234321, 234324, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 291714, 291716, 234373, 226182, 234375, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 234393, 209818, 324504, 234396, 324508, 234398, 291742, 308123, 234401, 291747, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 291754, 226220, 324522, 234414, 324527, 291760, 234417, 201650, 324531, 291756, 226230, 234422, 275384, 324536, 234428, 291773, 226239, 234431, 242623, 234434, 324544, 324546, 226245, 234437, 234439, 324548, 234443, 291788, 275406, 234446, 193486, 234449, 193488, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 300069, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 234563, 316483, 308291, 234568, 234570, 316491, 234572, 300108, 234574, 300115, 234580, 234581, 275545, 234585, 242777, 234590, 234593, 234595, 234597, 300133, 234601, 300139, 234605, 234607, 160879, 275569, 234610, 300148, 234614, 398455, 234618, 275579, 144506, 234620, 234623, 226433, 234627, 275588, 234629, 275594, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 308373, 275608, 234647, 234648, 234650, 308379, 283805, 324757, 234653, 300189, 234657, 324766, 324768, 119967, 283813, 234661, 242852, 234664, 300197, 275626, 234667, 316596, 308414, 234687, 300226, 308418, 226500, 234692, 283844, 300229, 308420, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 275703, 316663, 300284, 275710, 300287, 283904, 292097, 300289, 300292, 300294, 275719, 300299, 177419, 242957, 275725, 283917, 177424, 300301, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 283963, 243003, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 218464, 316768, 292197, 316774, 243046, 218473, 284010, 136562, 324978, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 316814, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 284076, 144812, 144814, 284084, 144820, 284087, 292279, 144826, 144828, 144830, 144832, 144835, 284099, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 259567, 300527, 308720, 226802, 316917, 292343, 308727, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 194103, 284218, 226877, 284223, 284226, 243268, 284228, 226886, 284231, 128584, 292421, 284234, 276043, 317004, 366155, 284238, 226895, 284241, 194130, 284243, 276052, 276053, 284245, 284247, 300628, 235097, 243290, 284251, 284249, 284253, 300638, 284255, 317015, 243293, 284258, 292452, 292454, 284263, 177766, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 292470, 284278, 292473, 284283, 276093, 284286, 276095, 292479, 284288, 276098, 325250, 284290, 292485, 284292, 292481, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 276144, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 317138, 358098, 284370, 284372, 284377, 276187, 284379, 284381, 284384, 284386, 358116, 276197, 317158, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358128, 358126, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 317187, 358146, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 300828, 300830, 276255, 300832, 284449, 325408, 300834, 227109, 317221, 358183, 186151, 276268, 300845, 194351, 243504, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 300912, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 292784, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 178161, 227314, 276466, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 276539, 235579, 235581, 325692, 178238, 276544, 284739, 292934, 276553, 243785, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 194657, 227426, 276579, 309346, 309348, 227430, 276583, 350308, 309350, 276586, 309352, 350313, 350316, 276590, 301167, 227440, 350321, 284786, 276595, 301163, 350325, 350328, 292985, 301178, 292989, 301185, 317570, 350339, 292993, 317573, 350342, 227463, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 350366, 276638, 284837, 153765, 350375, 350379, 350381, 350383, 129200, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 301258, 309450, 276685, 276689, 309462, 301272, 276699, 309468, 194780, 309471, 301283, 317672, 276713, 317674, 325867, 243948, 194801, 227571, 309491, 276725, 309494, 243960, 276735, 227583, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 317729, 276775, 211241, 325937, 276789, 325943, 211260, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 285051, 211324, 227709, 285061, 317833, 178572, 285070, 178575, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 285098, 276907, 235955, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 301562, 317951, 309764, 301575, 121352, 236043, 317963, 342541, 55822, 113167, 277011, 309779, 309781, 317971, 55837, 227877, 227879, 293417, 227882, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 301636, 318020, 301639, 301643, 285265, 399955, 277080, 309849, 285277, 285282, 326244, 318055, 277100, 277106, 121458, 170618, 170619, 309885, 309888, 277122, 227975, 277128, 285320, 301706, 334476, 326285, 318094, 318092, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 137889, 383658, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 318132, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 293659, 326430, 228128, 285474, 293666, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 293696, 310080, 277314, 277317, 277322, 277329, 162643, 310100, 301911, 277337, 301913, 301921, 400236, 236397, 162671, 326514, 310134, 277368, 236408, 15224, 416639, 416640, 113538, 310147, 416648, 277385, 39817, 187274, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 121850, 302075, 244731, 293882, 293887, 277504, 277507, 277511, 277519, 293908, 277526, 293917, 293939, 318516, 277561, 277564, 7232, 310336, 293956, 277573, 228422, 293960, 277577, 310344, 277583, 203857, 293971, 310355, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 277608, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 392326, 285831, 253064, 302218, 285835, 294026, 384148, 162964, 187542, 302231, 285849, 302233, 285852, 302237, 285854, 285856, 285862, 277671, 302248, 64682, 277678, 294063, 228526, 294065, 302258, 277687, 294072, 318651, 294076, 277695, 318657, 244930, 302275, 130244, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 204023, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 277807, 285999, 113969, 277811, 318773, 277816, 318776, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 277832, 384328, 277836, 294221, 294223, 326991, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 310659, 294276, 351619, 277892, 327046, 253320, 277894, 318858, 277898, 310665, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 277923, 130468, 228776, 277928, 277932, 310703, 277937, 130486, 310710, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 302534, 163272, 245191, 310727, 277959, 292968, 302541, 277966, 302543, 277963, 310737, 277971, 277975, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 286188, 310764, 278000, 278003, 310772, 228851, 278006, 212472, 278009, 40440, 286203, 40443, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 294435, 40484, 286246, 294439, 286248, 278057, 294440, 294443, 40486, 294445, 40488, 40491, 310831, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 228944, 400976, 212560, 40533, 147032, 40537, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40552, 40554, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 278150, 310925, 286354, 278163, 302740, 122517, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 302793, 278227, 229076, 286420, 319187, 286425, 319194, 278235, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 278274, 302852, 278277, 302854, 294664, 311048, 352008, 319243, 311053, 302862, 294682, 278306, 188199, 294701, 278320, 319280, 319290, 229192, 302925, 188247, 237409, 294776, 360317, 294785, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 40865, 294817, 319394, 294821, 180142, 294831, 188340, 40886, 319419, 294844, 294847, 309354, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
d5f463955b45a1b603666c51d1d45b1ffcda9564
e005ead33ba39f1d98964e6d255661529d4ee764
/SaladBar/Group.swift
da61d9f6d31a99f7b752fb0c9b4bb5db1792a531
[ "BSD-3-Clause" ]
permissive
morganchen12/Salada
be2ebfe50be00519005e036c479ca28cd75986bc
0c35958c8896c0a54a66e97c66a7a819628e82aa
refs/heads/master
2021-01-21T18:59:02.987600
2017-05-20T05:17:14
2017-05-20T05:17:14
92,104,689
1
0
null
2017-05-22T22:24:51
2017-05-22T22:24:51
null
UTF-8
Swift
false
false
279
swift
// // Group.swift // Salada // // Created by 1amageek on 2016/08/17. // Copyright © 2016年 Stamp. All rights reserved. // import Foundation class Group: Salada.Object { typealias Element = Group dynamic var name: String? dynamic var users: Set<String> = [] }
[ -1 ]
9052639ae9282a16703109bcc14c3fb0979888c4
a0666b014f4782459267c2dc956c14d193881176
/UIView.swift
d954f0e09e8ddd9faa53e11784a50475693ba55b
[ "MIT" ]
permissive
carabina/EasyExtensions
fa36f04bf49464843b90dc072a5c0ca7e6bf7d68
95514fd5354e178cd355791d321e7443619bce36
refs/heads/master
2021-01-22T10:45:55.236451
2017-05-26T02:19:57
2017-05-26T02:19:57
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,133
swift
// // UIView.swift // Extensions // // Created by Natanel Niazoff. // Copyright © 2017 Natanel Niazoff. All rights reserved. // import UIKit extension UIView { public struct Shadow { let path: CGPath? let color: UIColor let offset: CGSize let radius: CGFloat let opacity: Float init(path: CGPath? = nil, color: UIColor = UIColor.black, offset: CGSize = CGSize(width: 0, height: -3.0), radius: CGFloat = 3.0, opacity: Float) { self.path = path self.color = color self.offset = offset self.radius = radius self.opacity = opacity } } public class func viewFor(imageName: String) -> UIView? { if let image = UIImage(named: imageName) { let imageView = UIImageView(image: image) imageView.contentMode = .center return imageView } return nil } public class func viewFor(text: String, size: CGFloat = 24, color: UIColor = UIColor.black) -> UIView { let labelView = UILabel() labelView.text = text labelView.font = UIFont.systemFont(ofSize: size) labelView.textColor = color labelView.sizeToFit() return labelView } public class func hairlineView(withColor color: UIColor = UIColor.lightGray, origin: CGPoint = CGPoint.zero, width: CGFloat) -> UIView { let view = UIView() view.frame.origin = origin view.frame.size = CGSize(width: width, height: 1/UIScreen.main.scale) view.backgroundColor = color return view } public func add(_ shadow: Shadow) { layer.masksToBounds = false layer.shadowPath = shadow.path layer.shadowColor = shadow.color.cgColor layer.shadowOffset = shadow.offset layer.shadowRadius = shadow.radius layer.shadowOpacity = shadow.opacity } public func expand(_ multiplier: CGFloat) -> Self { frame.size = CGSize(width: frame.size.width * multiplier, height: frame.size.height * multiplier) return self } }
[ -1 ]
9e98f7abdef4a2ccb2a30d8706d40b290e7ad352
a0bc74f04dd34eb0dae0495578775e0f92341d75
/HackerNews/Scenes/Hits/ShowOptions/HitOptionsTableViewControllerProtocol.swift
5c2be56b11f49b672a52ff34545950ca526e49ba
[]
no_license
hrool20/HackerNews
83dac0a1b695c98bf0ef8279bf07d13de2940715
a8ae328eb906df215533b2fbe4085c41dd4ba64c
refs/heads/master
2023-03-26T04:13:29.588634
2021-01-09T18:06:30
2021-01-09T18:06:30
327,398,400
0
0
null
2021-01-12T18:41:53
2021-01-06T18:33:42
Swift
UTF-8
Swift
false
false
400
swift
// // HitOptionsTableViewControllerProtocol.swift // HackerNews // // Created by Hugo Rosado on 1/6/21. // Copyright © 2021 Hugo Rosado. All rights reserved. // import UIKit protocol HitOptionsTableViewControllerProtocol: LoaderHandlerProtocol, PopupHandlerProtocol { func endRefreshControl() func updateNavigationBar(_ shouldShowRightItems: Bool) func updateHits(_ hits: [Hit]) }
[ -1 ]
1d86743bf2ea0a745c38ec76cb3c16f8dde72f40
568593a945f78bcad345208571fd45736df6a2b2
/GitAmend/GithubAPI/GithubAPIRef.swift
975f0334e02be395e3a67f98258b3ec35da469b9
[]
no_license
timothyandrew/GitAmend
22841b454203f951d098f802ef57e15f9e979133
e435582604f5ee2bf295d39b5b3520cc6bbbe374
refs/heads/master
2022-11-19T22:27:58.478710
2020-07-20T16:20:41
2020-07-20T16:20:47
280,894,404
0
0
null
null
null
null
UTF-8
Swift
false
false
304
swift
// // GithubAPIRef.swift // GitAmend // // Created by Timothy Andrew on 18/07/20. // Copyright © 2020 Timothy Andrew. All rights reserved. // import UIKit class GithubAPIRef: NSObject, Decodable { let object: Object class Object: NSObject, Decodable { let sha: String } }
[ -1 ]
2f194443ead6e43be076dcce82d70f891f91befd
d09030cdcf778baee1a3d555128c01ce73ecf9df
/Cosmostation/ProtoBuff/cosmos/cosmos_genutil_v1beta1_genesis.pb.swift
bd61da1e2a5d83df490ca787e1f74f00510b56c0
[ "MIT" ]
permissive
cosmostation/cosmostation-ios
fb9555104adb209b887f67c5c18bba13969a6956
44804dc57bca599714763498fefbecb352a7c6d8
refs/heads/master
2023-08-20T14:14:30.591945
2023-08-20T07:42:08
2023-08-20T07:42:08
423,346,509
30
25
MIT
2023-09-13T09:26:40
2021-11-01T05:21:00
Swift
UTF-8
Swift
false
false
2,920
swift
// DO NOT EDIT. // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: cosmos/genutil/v1beta1/genesis.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ import Foundation import SwiftProtobuf // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is // incompatible with the version of SwiftProtobuf to which you are linking. // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} typealias Version = _2 } /// GenesisState defines the raw genesis transaction in JSON. struct Cosmos_Genutil_V1beta1_GenesisState { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// gen_txs defines the genesis transactions. var genTxs: [Data] = [] var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } #if swift(>=5.5) && canImport(_Concurrency) extension Cosmos_Genutil_V1beta1_GenesisState: @unchecked Sendable {} #endif // swift(>=5.5) && canImport(_Concurrency) // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "cosmos.genutil.v1beta1" extension Cosmos_Genutil_V1beta1_GenesisState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GenesisState" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "gen_txs"), ] mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeRepeatedBytesField(value: &self.genTxs) }() default: break } } } func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { if !self.genTxs.isEmpty { try visitor.visitRepeatedBytesField(value: self.genTxs, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Cosmos_Genutil_V1beta1_GenesisState, rhs: Cosmos_Genutil_V1beta1_GenesisState) -> Bool { if lhs.genTxs != rhs.genTxs {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } }
[ 39062, 39054, 367374 ]
9e9b46bb26e55da07a159590191e2f7f6e248584
0d5e6b63fc427c8c7cd3036f42040d25b0a75b3d
/sampleRealm/AppDelegate.swift
60ea5d9c0eadd67680ed66e7b34784fefc4e14fd
[]
no_license
king-kazu39/sampleRealm
317f2a1f3045dc8a55e5d5a3527f8bb27735c38e
df806ec2439c1c6cc89cdca0e1fbbb2412e03a11
refs/heads/main
2023-02-16T14:08:32.177581
2021-01-17T14:23:08
2021-01-17T14:23:08
324,375,491
0
0
null
2021-01-17T14:23:09
2020-12-25T14:16:12
Swift
UTF-8
Swift
false
false
2,612
swift
// // AppDelegate.swift // sampleRealm // // Created by kazuya on 2020/12/10. // import UIKit import RealmSwift @main class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. let config = Realm.Configuration( // 新しいスキーマバージョンを設定します。以前のバージョンより大きくなければなりません。 // (スキーマバージョンを設定したことがなければ、最初は0が設定されています) schemaVersion: 3, // マイグレーション処理を記述します。古いスキーマバージョンのRealmを開こうとすると // 自動的にマイグレーションが実行されます。 migrationBlock: { migration, oldSchemaVersion in // 最初のマイグレーションの場合、`oldSchemaVersion`は0です if (oldSchemaVersion < 1) { // 何もする必要はありません! // Realmは自動的に新しく追加されたプロパティと、削除されたプロパティを認識します。 // そしてディスク上のスキーマを自動的にアップデートします。 } }) // デフォルトRealmに新しい設定を適用します Realm.Configuration.defaultConfiguration = config print(Realm.Configuration.defaultConfiguration.fileURL!) 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. } }
[ -1 ]
aa7cf352f36503aeaa8b59b8372cb2cfced691ad
ce998a0d6d48a1e9f87cf3b1bf3ef4d4b5348fdd
/NewSwift/Classes/Me/Models/RegionByUserIdModel.swift
35b7f13faf8079d418041504e58d2b181d7b105e
[]
no_license
heavy-metal/DrivingTraining
29d4e13ad261ea9c4b1226b5a9d917eff1714feb
7148fd8606f17946a9be5e3e7bcd058a066a0ebd
refs/heads/master
2022-08-29T17:15:39.749301
2020-05-22T07:18:36
2020-05-22T07:18:36
266,043,429
0
0
null
null
null
null
UTF-8
Swift
false
false
732
swift
// // RegionByUserIdModel.swift // NewSwift // // Created by gail on 2019/8/27. // Copyright © 2019 NewSwift. All rights reserved. // import UIKit import ObjectMapper class RegionByUserIdModel: Mappable { var array : [RegionIdModel]? var code = "" var message = "" required init?(map: Map){} func mapping(map: Map){ array <- map["Data"] code <- map["Code"] message <- map["Message"] } } class RegionIdModel: Mappable { var RegionId = "" var Name = "" var InsId = "" required init?(map: Map){} func mapping(map: Map){ RegionId <- map["RegionId"] Name <- map["Name"] InsId <- map["InsId"] } }
[ -1 ]
43a1d145d0d9e75495c65d36ed663a5e922a8092
94a28e36bb51df7edda249dd04a6391471b02a74
/iStoryKit/Sources/StoryClient/StoryClient.swift
beb534acf0f7fc5f2634436d04097585a16803a0
[]
no_license
roundfly/iStoryApp
1a94d9762606c99ab9cb6aa7311a76fd40a2ce72
b49d1d2c7c4ffb3c01932c0f3c8df957e580a38a
refs/heads/master
2023-06-23T03:47:46.913502
2021-07-24T13:18:15
2021-07-24T13:18:15
388,910,929
0
0
null
null
null
null
UTF-8
Swift
false
false
317
swift
// // StoryClient.swift // // // Created by Nikola Stojanovic on 21.7.21.. // import StoryClientAPI import PageClientAPI struct StoryClient: StoryClientService { var load: () -> Story { fatalError() } var save: (Story) -> Void { fatalError() } var pageClient: PageClientService { fatalError() } }
[ -1 ]
f551c0b1722441c394e591f9ea99b90585d387b3
e9e1116b70f48f7dac149b2bee7fe271768e5bce
/SwiftVideoCompressor/SwiftVideoCompressor/SceneDelegate.swift
1af946a34ad25188bb1d32aee2cc84b04bd73831
[]
no_license
iamitmishra/SwiftVideoCompressor
fcaf938a5ae7ee65e0e57131a7b76d9b060434db
c4b06d914c8688f9ef5a23b8064f9c449b6c6884
refs/heads/master
2022-09-23T10:36:49.426073
2020-06-06T08:03:59
2020-06-06T08:03:59
269,911,337
0
0
null
null
null
null
UTF-8
Swift
false
false
2,257
swift
// // SceneDelegate.swift // SwiftVideoCompressor import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let _ = (scene as? UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 163849, 393228, 393231, 393251, 352294, 344103, 393260, 393269, 213049, 376890, 385082, 16444, 393277, 376906, 327757, 254032, 286804, 368728, 254045, 368736, 180322, 376932, 286833, 286845, 286851, 417925, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 180418, 377030, 377037, 180432, 377047, 418008, 385243, 418012, 377063, 327915, 205037, 393457, 393461, 393466, 418044, 336124, 385281, 336129, 262405, 180491, 336140, 164107, 262417, 368913, 262423, 377118, 377121, 262437, 254253, 336181, 262455, 393539, 262473, 344404, 213333, 418135, 270687, 262497, 418145, 262501, 213354, 246124, 262508, 262512, 213374, 385420, 262551, 262553, 385441, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 344512, 262593, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 98819, 164362, 328207, 410129, 393748, 377372, 188959, 385571, 377384, 197160, 33322, 352822, 270905, 197178, 418364, 188990, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 336513, 377473, 336517, 344710, 385671, 148106, 377485, 352919, 98969, 336549, 344745, 361130, 336556, 434868, 164535, 336568, 164539, 328379, 328387, 352969, 418508, 385743, 385749, 189154, 369382, 361196, 344832, 336644, 344837, 344843, 328462, 361231, 394002, 336660, 418581, 418586, 434971, 369436, 262943, 369439, 418591, 418594, 336676, 418600, 418606, 271154, 328498, 369464, 361274, 328516, 336709, 328520, 336712, 361289, 328523, 336715, 361300, 213848, 426842, 361307, 197469, 361310, 254813, 361318, 344936, 361323, 361335, 328574, 369544, 222129, 345036, 115661, 386004, 345046, 386012, 386019, 386023, 328690, 435188, 328703, 328710, 418822, 377867, 328715, 361490, 386070, 271382, 336922, 345119, 377888, 328747, 214060, 345134, 345139, 361525, 361537, 377931, 197708, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 361594, 410746, 214150, 345224, 386187, 337048, 345247, 361645, 345268, 337076, 402615, 361657, 402636, 328925, 165086, 165092, 328933, 222438, 328942, 386286, 386292, 206084, 115973, 328967, 345377, 345380, 353572, 345383, 337207, 345400, 378170, 369979, 386366, 337224, 337230, 337235, 263509, 353634, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 353674, 181644, 361869, 181650, 181655, 230810, 181671, 181674, 181679, 181682, 337330, 181687, 370105, 181691, 181697, 361922, 337350, 181704, 337366, 271841, 329192, 361961, 329195, 116211, 337399, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 345626, 419357, 345631, 419360, 370208, 394787, 419363, 370214, 419369, 394796, 419377, 419386, 206397, 419401, 353868, 419404, 173648, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 403092, 345750, 419484, 345758, 345763, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 403139, 337607, 419528, 419531, 272083, 394967, 419543, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 337643, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 345888, 116512, 378664, 354107, 354112, 247618, 370504, 329545, 345932, 354124, 370510, 247639, 337751, 370520, 313181, 182110, 354143, 354157, 345965, 345968, 345971, 345975, 182136, 403321, 1914, 354173, 395148, 247692, 337809, 247701, 329625, 436127, 436133, 247720, 337834, 362414, 337845, 190393, 247760, 346064, 346069, 329699, 354275, 190440, 247790, 354314, 346140, 337980, 436290, 395340, 378956, 436307, 338005, 329816, 100454, 329833, 329853, 329857, 329868, 411806, 329886, 346273, 362661, 100525, 387250, 379067, 387261, 256193, 395467, 346317, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 346344, 395496, 338154, 387307, 346350, 338161, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 338212, 248112, 362823, 436556, 321880, 362844, 379234, 354674, 182642, 321911, 420237, 379279, 272787, 354728, 338353, 338363, 338382, 272849, 248279, 256474, 182755, 338404, 338411, 330225, 248309, 199165, 248332, 330254, 199182, 199189, 420377, 330268, 191012, 330320, 199250, 191069, 346722, 248427, 191085, 338544, 191093, 346743, 330384, 346769, 150184, 174775, 248505, 174778, 363198, 223936, 355025, 273109, 264919, 256735, 338661, 264942, 330479, 363252, 338680, 207620, 264965, 191240, 338701, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 330581, 330585, 387929, 355167, 265056, 265059, 355176, 355180, 355185, 330612, 330643, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 437219, 257009, 265208, 330750, 199681, 338951, 330761, 330769, 330775, 248863, 158759, 396329, 347178, 404526, 396337, 330803, 396340, 339002, 388155, 339010, 347208, 248905, 330827, 330830, 248915, 183384, 339037, 412765, 257121, 322660, 265321, 330869, 248952, 420985, 330886, 347288, 248986, 44199, 380071, 339118, 249018, 339133, 126148, 322763, 330959, 330966, 265433, 265438, 388320, 363757, 339199, 396552, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 175416, 396601, 208189, 437567, 175425, 437571, 437576, 437584, 331089, 396634, 175451, 437596, 429408, 175458, 208228, 175461, 175464, 265581, 331124, 175478, 249210, 175484, 175487, 249215, 175491, 249219, 249225, 249228, 249235, 175514, 175517, 396703, 396706, 175523, 355749, 396723, 388543, 380353, 216518, 339401, 380364, 339406, 372177, 339414, 249303, 413143, 339418, 339421, 249310, 339425, 249313, 339429, 339435, 249329, 69114, 372229, 339464, 249355, 208399, 380433, 175637, 134689, 339504, 265779, 421442, 413251, 265796, 265806, 224854, 224858, 339553, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 372354, 126597, 421509, 224905, 11919, 224911, 224914, 126611, 224917, 224920, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224939, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 224976, 257745, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 339711, 257791, 225027, 257796, 339722, 257802, 257805, 225039, 257808, 249617, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 397089, 257825, 225059, 339748, 225068, 257837, 413485, 225071, 225074, 257843, 225077, 257846, 225080, 397113, 225083, 397116, 257853, 225088, 225094, 225097, 323404, 257869, 257872, 225105, 339795, 397140, 225109, 225113, 257881, 257884, 257887, 225120, 257891, 413539, 225128, 257897, 225138, 339827, 257909, 225142, 372598, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 372698, 372704, 372707, 356336, 380919, 393215, 372739, 405534, 266295, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 266351, 356467, 266365, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 250012, 225439, 135328, 192674, 225442, 438434, 225445, 438438, 225448, 438441, 225451, 258223, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 430275, 389322, 225485, 225488, 225491, 266454, 225494, 225497, 225500, 225503, 225506, 356580, 225511, 217319, 225515, 225519, 381177, 397572, 389381, 356631, 356638, 356641, 356644, 356647, 266537, 389417, 356650, 356656, 332081, 307507, 340276, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 332107, 151884, 430422, 348503, 332118, 250201, 250203, 332130, 250211, 340328, 250217, 348523, 348528, 332153, 356734, 389503, 332158, 438657, 250239, 332162, 348548, 356741, 332175, 160152, 373146, 373149, 70048, 356783, 266688, 324032, 201158, 340452, 127473, 217590, 340473, 324095, 324100, 324103, 324112, 340501, 324118, 324122, 340512, 332325, 324134, 381483, 356908, 324141, 324143, 356917, 324150, 324156, 168509, 348734, 324161, 324165, 356935, 348745, 381513, 324171, 324174, 324177, 389724, 332381, 373344, 340580, 348777, 381546, 119432, 340628, 184983, 373399, 340639, 258723, 332455, 332460, 389806, 332464, 332473, 381626, 332484, 332487, 332494, 357070, 357074, 332512, 332521, 340724, 332534, 373499, 348926, 389927, 348979, 152371, 398141, 127815, 357202, 389971, 357208, 136024, 389979, 430940, 357212, 357215, 201580, 201583, 349041, 340850, 201589, 381815, 430967, 324473, 398202, 119675, 340859, 324476, 430973, 324479, 340863, 324482, 324485, 324488, 185226, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 324514, 201638, 373672, 324525, 5040, 111539, 324534, 5047, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 340958, 431073, 398307, 340964, 209896, 201712, 209904, 349173, 381947, 201724, 349181, 431100, 431107, 349203, 209944, 209948, 250915, 250917, 169002, 357419, 209966, 209969, 209973, 209976, 209980, 209988, 209991, 431180, 209996, 349268, 177238, 250968, 210011, 373853, 341094, 210026, 210028, 210032, 349296, 210037, 210042, 210045, 349309, 152704, 349313, 160896, 210053, 210056, 349320, 259217, 373905, 210068, 210072, 210078, 210081, 210085, 210089, 210096, 210100, 324792, 210108, 357571, 210116, 210128, 333010, 210132, 333016, 210139, 210144, 218355, 251123, 218361, 275709, 128254, 275713, 242947, 275717, 275723, 333075, 349460, 333079, 251161, 349486, 349492, 415034, 251211, 210261, 365912, 259423, 374113, 251236, 374118, 234867, 390518, 357756, 374161, 112021, 349591, 357793, 333222, 210357, 259516, 415168, 366035, 415187, 366039, 415192, 415194, 415197, 415200, 333285, 415208, 366057, 366064, 415217, 415225, 423424, 415258, 415264, 366118, 415271, 382503, 349739, 144940, 415279, 415282, 415286, 210488, 415291, 415295, 333387, 333396, 333400, 366173, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 267929, 333472, 333512, 259789, 358100, 366301, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 333566, 268042, 210700, 366349, 210707, 399129, 333593, 333595, 210720, 366384, 358192, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 358235, 341852, 350046, 399200, 399208, 268144, 358256, 358260, 399222, 325494, 186233, 333690, 243584, 325505, 333699, 399244, 333709, 333725, 333737, 382891, 382898, 333767, 358348, 333777, 219094, 358372, 350190, 350194, 333819, 350204, 350207, 325633, 325637, 350214, 268299, 333838, 350225, 350232, 350238, 350241, 374819, 350245, 350249, 350252, 178221, 350257, 350260, 350272, 243782, 350281, 350286, 374865, 252021, 342134, 374904, 268435, 333989, 333998, 334012, 260299, 350411, 350417, 350423, 350426, 334047, 350449, 375027, 358645, 350454, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 350491, 350494, 325920, 350500, 350505, 358701, 391469, 350510, 358705, 358714, 358717, 383307, 358738, 334162, 383331, 383334, 391531, 383342, 334204, 268669, 194942, 391564, 366991, 334224, 342431, 375209, 326059, 375220, 342453, 334263, 326087, 358857, 195041, 334312, 104940, 375279, 350724, 186898, 342546, 350740, 342551, 334359, 342555, 334364, 416294, 350762, 252463, 358962, 334386, 334397, 252483, 219719, 399957, 244309, 334425, 326240, 375401, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 244410, 260798, 334530, 260802, 350918, 154318, 342737, 391895, 154329, 416476, 64231, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 375569, 375572, 375575, 375580, 162592, 334633, 326444, 383794, 326452, 326455, 375613, 244542, 260925, 375616, 326468, 244552, 342857, 326474, 326479, 326486, 416599, 342875, 244572, 326494, 326503, 433001, 326508, 400238, 326511, 211826, 211832, 392061, 351102, 252801, 260993, 400260, 211846, 342921, 342931, 252823, 400279, 392092, 400286, 359335, 211885, 400307, 351169, 359362, 351172, 170950, 187335, 326599, 359367, 359383, 359389, 383968, 343018, 359411, 261109, 261112, 244728, 383999, 261130, 261148, 359452, 211999, 261155, 261160, 261166, 359471, 375868, 384099, 384102, 384108, 367724, 326764, 187503, 343155, 384115, 212095, 384136, 384140, 384144, 384152, 384158, 384161, 351399, 384169, 367795, 244917, 384182, 384189, 384192, 351424, 343232, 244934, 367817, 244938, 384202, 253132, 326858, 343246, 384209, 146644, 351450, 384225, 359650, 343272, 351467, 359660, 384247, 351480, 384250, 351483, 351492, 343307, 384270, 359695, 261391, 253202, 261395, 384276, 384284, 245021, 384290, 253218, 245032, 171304, 384299, 351535, 245042, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 343399, 367981, 343410, 155000, 327035, 245121, 245128, 253321, 155021, 384398, 245137, 245143, 245146, 245149, 343453, 245152, 245155, 155045, 245158, 40358, 245163, 114093, 327090, 343478, 359867, 384444, 146878, 327108, 327112, 384457, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 359948, 359951, 245295, 359984, 400977, 400982, 179803, 155241, 138865, 155255, 155274, 368289, 245410, 425639, 245415, 425652, 425663, 155328, 245463, 155352, 155356, 212700, 155364, 245477, 155372, 245487, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 417596, 384829, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 155488, 376672, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 147319, 262009, 327542, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 327590, 155560, 155563, 155566, 327613, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 393204, 360439, 253944, 393209, 155647 ]
c1701decd1574168855572fb8c09687410d5a31a
923ead3f241bfa1342643c038717b73aefeac0f0
/Landmarks/Model/Hike.swift
eea9baa4b578256539242a20766a8272311c1d69
[ "MIT" ]
permissive
dinhnhat0401/TrySwiftUI
66e0855a1a513007a4afa437c01cdd8fe3af6e30
92b981553beba90e8efee34609e04b6c7f960c08
refs/heads/master
2021-06-25T08:01:51.569892
2021-02-09T13:58:51
2021-02-09T13:58:51
195,950,516
1
0
null
null
null
null
UTF-8
Swift
false
false
642
swift
// // Hike.swift // Landmarks // // Created by Dinh Van Nhat on 2021/02/09. // import Foundation struct Hike: Codable, Hashable, Identifiable { var id: Int var name: String var distance: Double var difficulty: Int var observations: [Observation] static var formatter = LengthFormatter() var distanceText: String { return Hike.formatter .string(fromValue: distance, unit: .kilometer) } struct Observation: Codable, Hashable { var distanceFromStart: Double var elevation: Range<Double> var pace: Range<Double> var heartRate: Range<Double> } }
[ 372922, 377507, 363412, 372893 ]
76be414cb3216b030dcf74146654d15ee8df6abf
4ebc337a6335c77673b091138285b1c6c0755b95
/StyleShaker/DetailProductViewController.swift
86329a853fe4bccc99c647bfe9d51294ae42f7fe
[]
no_license
vchaillou/iOS-StyleShaker
8b3ca8e3fc1fe5dc1f2668ff305dbeb0b6c410af
a365dd465bc66368789ae009a71fca21e63c7ae6
refs/heads/master
2021-01-17T19:30:29.375318
2016-07-18T14:36:52
2016-07-18T14:36:52
60,626,451
0
0
null
null
null
null
UTF-8
Swift
false
false
2,482
swift
// // DetailProductViewController.swift // StyleShaker // // Created by Etudiant on 15/07/2016. // Copyright © 2016 ESGI. All rights reserved. // import UIKit private let DETAIL_CELL_ELEMENT_IDENTIFIER = "CollectionCell" private let SEGUE_DETAIL_TO_SHOPPING="DetailToShopping" class DetailProductViewController: UIViewController,UICollectionViewDataSource { @IBOutlet weak var titleProduct: UILabel! @IBOutlet weak var descriptionProduct: UITextView! @IBOutlet weak var imgProduct: UIImageView! @IBOutlet weak var tagProduct: UICollectionView! internal var product:Product? // Mis à jour par le segue override func viewDidLoad() { super.viewDidLoad() titleProduct.text = product!.title descriptionProduct.text = product!.descriptionProduct tagProduct.dataSource = self } // On diffère l'affichage de l'image override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) let url = NSURL(string : product!.urlImage); let data = NSData(contentsOfURL: url!) if data != nil { imgProduct.image = UIImage(data:data!) } } // MARK: - Navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Seulement pour le segue qui mène à la vue Shopping // Pas pour celui qui mène aux informations if (segue.identifier == SEGUE_DETAIL_TO_SHOPPING) { let controller: GoogleShoppingViewController = segue.destinationViewController as! GoogleShoppingViewController controller.champs = product?.title } } // MARK: - Collection view data source func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { return 1 } func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return (product?.tags.count)! } func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCellWithReuseIdentifier(DETAIL_CELL_ELEMENT_IDENTIFIER, forIndexPath: indexPath) as! ProductTagCell cell.setCellTag((product?.tags[indexPath.row])!) return cell } }
[ -1 ]
e2ecb720b47d26b0d2ba115d0b80b6fc63491ad2
dc56d25ad8a01afe75a6a11db0fa54ee41426ba6
/PartyRockApp/PartyRockApp/MainVC.swift
8ebbbbbfff7082ac52ed701dabfa915b816c0e01
[]
no_license
igo0r/ios-playgrounds
0990a0eff96a9b79fde8a95660a189309c58c8cf
ffe6e4ec5d13a3988284f42c9644e284299b066c
refs/heads/master
2020-04-05T10:16:48.121135
2017-09-30T15:25:09
2017-09-30T15:25:09
81,588,229
0
0
null
null
null
null
UTF-8
Swift
false
false
4,673
swift
// // ViewController.swift // PartyRockApp // // Created by Igor Lantushenko on 07/02/2017. // Copyright © 2017 Igor Lantushenko. All rights reserved. // import UIKit class MainVC: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var tableView: UITableView! var partyRockData = [PartyRock]() override func viewDidLoad() { super.viewDidLoad() self.tableView.delegate = self self.tableView.dataSource = self let partyRock = PartyRock(imageUrl: "https://tproger2.azureedge.net/wp-content/uploads/2015/03/1.jpg", videoUrl: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dsA-Ib9H-YQ\" frameborder=\"0\" allowfullscreen></iframe>", videoTitle: "VLOG GRINYA #13 - автосервис DPRO, готовимся ко второму этапу WinterDrift") let partyRock1 = PartyRock(imageUrl: "https://tproger2.azureedge.net/wp-content/uploads/2015/03/1.jpg", videoUrl: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dsA-Ib9H-YQ\" frameborder=\"0\" allowfullscreen></iframe>", videoTitle: "VLOG GRINYA #13 - автосервис DPRO, готовимся ко второму этапу WinterDrift") let partyRock2 = PartyRock(imageUrl: "https://tproger2.azureedge.net/wp-content/uploads/2015/03/1.jpg", videoUrl: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dsA-Ib9H-YQ\" frameborder=\"0\" allowfullscreen></iframe>", videoTitle: "VLOG GRINYA #13 - автосервис DPRO, готовимся ко второму этапу WinterDrift") let partyRock3 = PartyRock(imageUrl: "https://tproger2.azureedge.net/wp-content/uploads/2015/03/1.jpg", videoUrl: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dsA-Ib9H-YQ\" frameborder=\"0\" allowfullscreen></iframe>", videoTitle: "VLOG GRINYA #13 - автосервис DPRO, готовимся ко второму этапу WinterDrift") let partyRock4 = PartyRock(imageUrl: "https://tproger2.azureedge.net/wp-content/uploads/2015/03/1.jpg", videoUrl: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dsA-Ib9H-YQ\" frameborder=\"0\" allowfullscreen></iframe>", videoTitle: "VLOG GRINYA #13 - автосервис DPRO, готовимся ко второму этапу WinterDrift") let partyRock5 = PartyRock(imageUrl: "https://tproger2.azureedge.net/wp-content/uploads/2015/03/1.jpg", videoUrl: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dsA-Ib9H-YQ\" frameborder=\"0\" allowfullscreen></iframe>", videoTitle: "VLOG GRINYA #13 - автосервис DPRO, готовимся ко второму этапу WinterDrift") let partyRock6 = PartyRock(imageUrl: "https://tproger2.azureedge.net/wp-content/uploads/2015/03/1.jpg", videoUrl: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dsA-Ib9H-YQ\" frameborder=\"0\" allowfullscreen></iframe>", videoTitle: "VLOG GRINYA #13 - автосервис DPRO, готовимся ко второму этапу WinterDrift") partyRockData.append(partyRock) partyRockData.append(partyRock1) partyRockData.append(partyRock2) partyRockData.append(partyRock3) partyRockData.append(partyRock4) partyRockData.append(partyRock5) partyRockData.append(partyRock6) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return partyRockData.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if let cell = tableView.dequeueReusableCell(withIdentifier: "videoView", for: indexPath) as? PartyVideoVC { let partyRock = partyRockData[indexPath.row] cell.updateView(partyRock: partyRock) return cell } return UITableViewCell() } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let party = partyRockData[indexPath.row] self.performSegue(withIdentifier: "videoDetail", sender: party) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if ((segue.destination as? VideoVC) != nil) { if (sender as? PartyRock) != nil { let destination = segue.destination as! VideoVC destination.partyRock = sender as! PartyRock } } } }
[ -1 ]
5572bc725a9b74d7eb3bb6eb61fd462151364b77
6cfd59ae67440cd6bd53a3554bcadd065bb9d984
/Sources/BasicCodableHelpers/protocols/BasicCodableHelperCaseIterable.swift
7cc05b30bb98b7fc94842c2c538b56a82c590738
[ "Apache-2.0" ]
permissive
TheAngryDarling/SwiftBasicCodableHelpers
749070e38de8b500ec4efb48bd768612cb7e3b43
d3eb11b822488b6d812b9b7ebf100ada56f75443
refs/heads/master
2022-10-23T17:49:43.102135
2022-10-17T00:34:49
2022-10-17T00:34:49
206,054,469
1
0
null
null
null
null
UTF-8
Swift
false
false
404
swift
// // BasicCodableHelperCaseIterable.swift // BasicCodableHelpers // // Created by Tyler Anger on 2019-08-29. // import Foundation #if swift(>=4.2) public typealias BasicCodableHelperCaseIterable = CaseIterable #else public protocol BasicCodableHelperCaseIterable { associatedtype AllCases : Collection where Self == Self.AllCases.Element static var allCases: Self.AllCases { get } } #endif
[ -1 ]
81cac737cd3c166809997ce0de218d49b00c59bc
edaee95acd5ebcf7f93b70a52400c7cf4fcc9c55
/Example/Tests/SQLiteTestCase.swift
001982864600f36ec51dac97a8b364a47bc36687
[ "MIT" ]
permissive
kingslay/KSJSONHelp
7f95036312a9cf22d9fa24f63c884a3c559786cc
d227cb7bae63c51f576f8e594c490e0651bd2031
refs/heads/master
2020-05-22T06:56:32.371392
2018-03-19T15:36:26
2018-03-19T15:36:26
41,632,919
6
1
null
null
null
null
UTF-8
Swift
false
false
357
swift
// // Tests.swift // Tests // // Created by king on 16/2/23. // Copyright © 2016年 king. All rights reserved. // import XCTest import KSJSONHelp class SQLiteTestCase: XCTestCase { override func setUp() { Database.driver = SQLiteDriver() let _ = try? FileManager.default.removeItem(atPath: NSHomeDirectory()+"/db.sqlite3") } }
[ -1 ]
c51eb6d75820c30683621b9e135596410b7ccee1
c3ad00033e56759b9aa89531655d1c63bde2e1e1
/Pass/CurrentLocationViewController.swift
06e4258bf9bdaf207ceb391523c100b5787ef372
[]
no_license
jl5211/Pass
74876f56b1771c5c8dccd0df023c1becbe878f30
6b3d953350c0fb96b40b13f22a0d857d3f6b7770
refs/heads/master
2020-05-21T22:40:13.367451
2016-09-25T22:48:11
2016-09-25T22:48:11
64,080,046
0
0
null
null
null
null
UTF-8
Swift
false
false
3,305
swift
// // CurrentLocationViewController.swift // Pass // // Created by Niela Sultana on 7/17/16. // Copyright © 2016 Jesus Leal. All rights reserved. // import UIKit import MapKit import CoreLocation import Alamofire class CurrentLocationViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate { @IBOutlet weak var mapView: MKMapView! let locationManager = CLLocationManager() var xcoor: CLLocationDegrees? var ycoor: CLLocationDegrees? override func viewDidLoad() { super.viewDidLoad() self.locationManager.delegate = self self.locationManager.desiredAccuracy = kCLLocationAccuracyBest self.locationManager.requestWhenInUseAuthorization() self.locationManager.startUpdatingLocation() self.mapView.showsUserLocation = true /*let studentn = 1 let parameters1 : [String: AnyObject] = [ "user_id": "abc123", "student" : studentn, "location_x" : xcoor!, "location_y": ycoor!, "session_cookie" : "1223", "friend_top" : 0, "chats_top" : 0, ] Alamofire.request(.POST, "http://www.passbyus.org/updateLocation.php", parameters: parameters1 ) .validate() .responseString{ response in print("Success: \(response.result.isSuccess)") print("Response String: \(response.result.value)") print(parameters1) //let JSON = response.result.value /* if let JSON = response.result.value { print(JSON) if (response.result.value is NSNull){} else { self.recieved = JSON as! [[String:AnyObject]]//[Dictionary<String,AnyObject>]} } }*/ } */ } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } // MARK: Location Delegate Methods func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { let location = locations.last let center = CLLocationCoordinate2D(latitude:location!.coordinate.latitude, longitude: location!.coordinate.longitude) let region = MKCoordinateRegion(center: center, span: MKCoordinateSpan(latitudeDelta: 0.004, longitudeDelta: 0.004)) self.mapView.setRegion(region, animated: true) self.xcoor = location?.coordinate.latitude self.ycoor = location?.coordinate.longitude } func locationManager(manager: CLLocationManager, didFailWithError error: NSError) { print("Errors: " + error.localizedDescription) } @IBAction func notificationButton(sender: AnyObject) { let notification = UILocalNotification() notification.fireDate = NSDate(timeIntervalSinceNow: 5) notification.alertBody = "Test Notification" notification.timeZone = NSTimeZone.defaultTimeZone() notification.applicationIconBadgeNumber = UIApplication.sharedApplication().applicationIconBadgeNumber + 1 UIApplication.sharedApplication().scheduleLocalNotification(notification) } }
[ -1 ]
1a86149e428ded864c9896d0855974116fc95b8d
ef815c5ce2b2c73e22650432d37b0b5e26b5c23d
/Todo/Controllers/CategoryViewController.swift
38cf26a1b59904ebb7392a9dfe256114e3af747f
[]
no_license
SeebaB/Todo
44e40d92a0476552b67b43def56d48478ba03aaf
a32b4e5470b0409dfc47a52c7c8246e16289b64e
refs/heads/master
2021-05-20T00:29:45.791173
2020-04-02T15:10:39
2020-04-02T15:10:39
252,107,672
0
0
null
null
null
null
UTF-8
Swift
false
false
3,149
swift
// // CategoryViewController.swift // Todo // // Created by Sebastian Buczek on 02/04/2020. // Copyright © 2020 Sebastian Buczek. All rights reserved. // import UIKit import CoreData class CategoryViewController: UITableViewController { var categoryArray = [Category]() let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext override func viewDidLoad() { super.viewDidLoad() loadCategories() } //MARK: - TableView Datasource Methods override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return categoryArray.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "CategoryCell", for: indexPath) cell.textLabel?.text = categoryArray[indexPath.row].name return cell } //MARK: - TableView Delegate Methods override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { performSegue(withIdentifier: "goToItems", sender: self) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { let destinationVC = segue.destination as! TodoViewController if let indexPath = tableView.indexPathForSelectedRow { destinationVC.selectedCategory = categoryArray[indexPath.row] } } //MARK: - Add New Categories @IBAction func addButtonPressed(_ sender: UIBarButtonItem) { var textField = UITextField() let alert = UIAlertController(title: "Add New Category", message: "", preferredStyle: .alert) let action = UIAlertAction(title: "Add Category", style: .default) { (action) in let newCategory = Category(context: self.context) newCategory.name = textField.text! self.categoryArray.append(newCategory) self.saveCategory() } alert.addAction(action) alert.addTextField { (alertTextField) in alertTextField.placeholder = "Create new Category" textField = alertTextField } present(alert, animated: true, completion: nil) } //MARK: - Data Manipulation Methods func saveCategory() { do { try context.save() } catch { print("Error saving category \(error)") } tableView.reloadData() } func loadCategories() { let request: NSFetchRequest<Category> = Category.fetchRequest() do { categoryArray = try context.fetch(request) } catch { print("Error fetching data from context \(error)") } tableView.reloadData() } }
[ 384179, 402638 ]
fb3343a8f1f7359dbb9a6027ba58ac0ddea5c403
c2c84afcdf6c4f92d470749c9b5ac78fc7f137f5
/ioasys-challengeTests/ViewModels/LoginViewModelTests.swift
3a6467251b95e860bfd9d31ecf894797a6154d64
[]
no_license
gabrielrf97/ioasys-challenge
19542b0001d148688b8f08f5bbb9ddb90f5903db
1fb7d06f92dbc4663498cf64b0cb8179ce34ce1a
refs/heads/master
2022-04-02T16:35:35.262085
2020-02-18T09:06:18
2020-02-18T09:06:18
240,555,296
0
0
null
null
null
null
UTF-8
Swift
false
false
1,854
swift
// // LoginViewModelTests.swift // ioasys-challengeTests // // Created by Gabriel on 18/02/20. // Copyright © 2020 Gabriel. All rights reserved. // import XCTest @testable import ioasys_challenge class LoginViewModelTests: XCTestCase { var suv: LoginViewModel! var success: Bool? var errors = [String]() var loginResponse: Bool? override func setUp() { let mockedServer = MockClientServer() suv = LoginViewModel(server: mockedServer) suv.viewDelegate = self success = false errors.removeAll() } override func tearDown() {} func testTryLogin() { let email = "[email protected]" let password = "12341234" suv.tryLogin(with: email, password: password) XCTAssert(loginResponse!, "Login should be successfull") } func testToginWithInvalidCredentials() { let email = "[email protected]" let password = "123412" suv.tryLogin(with: email, password: password) XCTAssert(!success!, "Login should be unsucessfull") XCTAssert(!errors.isEmpty, "There should be at least one error") } func testLoginWithInvalidFields() { let email = "testeapple" let password = "123" suv.tryLogin(with: email, password: password) XCTAssert(!success!, "Login should be unsucessfull") XCTAssert(!errors.isEmpty, "There should be at least one error") } } extension LoginViewModelTests: LoginViewDelegate { func performedLoginSucessfuly() { self.loginResponse = true } func loginAttemptFailed(with errorMessage: String) { self.success = false self.errors.append(errorMessage) } func fieldValidationFailed(errors: [String]) { self.success = false self.errors = errors } }
[ -1 ]
f250eb4550411422389e59e9ddf4c8a222ea3c04
efe78120d29088105aeb462d095542014fe9460b
/RustMath/WeaponClassFiles.swift
90474a2e705f859afcd89e20acc0dfe3579629a5
[]
no_license
SgtGirthquake/RustMath
251c257efdee696b2b44bad59e4a90d049d00228
748f3f3b0551963650ca1204d886d587934cfb3b
refs/heads/master
2020-12-03T09:15:51.165963
2017-06-28T00:34:49
2017-06-28T00:34:49
95,612,349
0
0
null
null
null
null
UTF-8
Swift
false
false
861
swift
// // WeaponClassFiles.swift // RustMath2 // // Created by Tyler Brenner on 6/23/17. // Copyright © 2017 Tritonal6. All rights reserved. // import Foundation //MARK: Big dick Super Classes class Tools { let durability = 100.00 } class Weapons { let durability = 100.00 } class MeleeWeapons { let durability = 100.00 } //End Big dick Super Classes //MARK: Tool Subclasses class Rock:MeleeWeapons { var itemImage = "Rock.png" } class Hammer:Tools { var itemImage = "Hammer.png" } class Torch:MeleeWeapons { var itemImage = "Torch.png" } class StonePickAxe:Tools { var itemImage = "Stone Pickaxe.png" } class StoneHatchet:Tools { } class PickAxe:Tools { } class Hatchet:Tools { } class SalvagedPickAxe:Tools { } class SalvagedAxe:Tools { } class SalvagedHammer:Tools { }
[ -1 ]
c61db54e7d68dcc66c145822eb22151e4cee7d91
3f990a4f1009421698c9e16f9a84ccbc7764b4eb
/Grid.swift
b0ec7db6b6e8dc2437a9a6bda64b541aec60515b
[]
no_license
jiminhuh/MemorizeSwift
14f992d46dfe8b43f608e5b2006a3f74fd038f70
976d40e8b6c54b8ff27d127e2411e97023aefe69
refs/heads/main
2023-01-04T00:36:14.507001
2020-10-26T01:39:53
2020-10-26T01:39:53
305,530,635
0
0
null
null
null
null
UTF-8
Swift
false
false
1,071
swift
// // Grid.swift // MemorizeSwift // // Created by Jimin Huh on 10/24/20. // Copyright © 2020 Jimin Huh. All rights reserved. // import SwiftUI struct Grid<Item, ItemView>: View where Item: Identifiable, ItemView: View { var items: [Item] var viewForItem: (Item) -> ItemView init(_ items: [Item], viewForItem: @escaping (Item) -> ItemView) { self.items = items self.viewForItem = viewForItem } var body: some View { GeometryReader {geometry in self.body(for: GridLayout(itemCount: self.items.count, in: geometry.size)) } } func body(for layout: GridLayout) -> some View { ForEach(items) { item in self.body(for: item, in: layout) } } func body(for item: Item, in layout: GridLayout) -> some View { let index = items.firstIndex(matching: item) return viewForItem(item) .frame(width: layout.itemSize.width, height: layout.itemSize.height) .position(layout.location(ofItemAt: index)) } }
[ 338673, 354127 ]
307fd48765d4e32e21faf91beaf228d2e85b349a
80f4e84f54f324c108dd2e5e14dccec84e6c1a92
/LiveTrainStatusTests/LiveTrainStatusTests.swift
49031aa84ee48176b8fcbdfa1dedb4c186a3943f
[]
no_license
SivaPrakashB/LiveTrainStatus
99ad78e47236461df5fc754f6e77710089f4cbd1
250a09c9343b51b69394c2f76692c0514b7424b3
refs/heads/master
2020-03-22T17:13:50.245779
2018-01-03T06:15:21
2018-01-03T06:15:21
140,382,495
0
0
null
null
null
null
UTF-8
Swift
false
false
984
swift
// // LiveTrainStatusTests.swift // LiveTrainStatusTests // // Created by mac on 1/2/18. // Copyright © 2018 mac. All rights reserved. // import XCTest @testable import LiveTrainStatus class LiveTrainStatusTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } }
[ 360462, 98333, 278558, 229413, 204840, 344107, 360491, 155694, 229424, 229430, 180280, 163896, 376894, 286788, 352326, 254027, 311372, 311374, 196691, 278615, 180311, 180312, 385116, 237663, 254048, 319591, 131178, 221290, 278638, 319598, 204916, 131189, 131191, 237689, 131198, 311435, 319629, 311438, 278677, 196760, 426138, 196773, 278704, 377009, 131256, 180408, 295098, 139479, 229597, 311519, 205035, 286958, 327929, 344313, 147717, 368905, 278797, 254226, 319763, 368916, 262421, 377114, 278810, 278816, 237856, 237857, 311597, 98610, 262450, 180535, 336183, 278842, 287041, 287043, 311621, 139589, 344401, 377169, 368981, 155990, 368984, 106847, 98657, 270701, 270706, 139640, 311685, 106888, 385417, 311691, 385422, 213403, 246178, 385454, 377264, 278961, 278965, 278970, 311738, 33211, 319930, 336320, 311745, 278978, 254406, 188871, 278989, 278993, 328152, 369116, 188894, 287198, 279008, 279013, 311786, 279018, 319981, 279022, 319987, 279029, 254456, 377338, 377343, 279039, 254465, 287241, 279050, 303631, 139792, 303636, 279062, 393751, 279065, 377376, 180771, 377386, 197167, 385588, 115270, 377418, 385615, 426576, 369235, 295519, 139872, 66150, 279146, 295536, 287346, 139892, 287352, 344696, 279164, 189057, 303746, 311941, 336518, 311945, 369289, 344715, 311949, 287374, 377489, 311954, 352917, 230040, 271000, 377497, 303771, 221852, 377500, 295576, 205471, 344738, 139939, 279206, 295599, 205487, 303793, 336564, 164533, 287417, 303803, 287422, 66242, 377539, 287433, 164560, 385747, 279252, 361176, 418520, 287452, 295652, 279269, 369385, 230125, 279280, 312052, 230134, 172792, 344827, 221948, 279294, 205568, 295682, 197386, 434957, 312079, 295697, 426774, 197399, 426775, 197411, 262951, 279336, 312108, 295724, 197422, 353070, 164656, 295729, 262962, 230199, 197431, 336702, 295744, 295746, 353109, 377686, 230234, 189275, 435039, 295776, 279392, 303972, 385893, 230248, 246641, 246643, 295798, 246648, 361337, 279417, 254850, 369538, 287622, 213894, 295824, 279456, 353195, 140204, 377772, 304051, 230332, 287677, 189374, 377790, 353215, 353216, 213957, 345033, 279498, 386006, 418776, 50143, 123881, 304110, 287731, 271350, 295927, 312314, 328700, 328706, 410627, 320516, 295942, 386056, 230410, 353290, 377869, 320527, 238610, 418837, 140310, 230423, 320536, 197657, 238623, 189474, 369701, 238639, 312373, 238651, 230463, 377926, 214086, 296019, 353367, 304222, 230499, 173166, 156785, 312434, 377972, 353397, 279672, 337017, 377983, 279685, 402565, 222343, 386189, 296086, 238743, 296092, 238765, 279728, 238769, 402613, 230588, 279747, 353479, 353481, 402634, 279760, 189652, 189653, 419029, 279765, 148696, 296153, 279774, 304351, 304356, 222440, 328940, 279792, 353523, 386294, 386301, 320770, 386306, 328971, 353551, 320796, 222494, 115998, 304421, 279854, 353584, 345396, 386359, 378172, 304456, 230729, 312648, 337225, 222541, 296270, 238927, 353616, 296273, 222559, 378209, 230756, 386412, 230765, 296303, 296307, 116084, 181625, 337281, 148867, 296329, 304524, 296335, 230799, 9619, 370071, 279974, 173491, 304564, 279989, 353719, 296375, 296387, 280004, 361927, 296392, 296391, 280013, 312782, 222675, 329173, 280032, 271843, 280041, 296425, 329200, 296433, 321009, 280055, 296448, 230913, 329225, 296461, 149007, 304656, 329232, 370197, 230943, 402985, 394794, 230959, 288309, 312889, 288318, 280130, 288326, 288327, 280147, 239198, 157281, 99938, 312940, 222832, 337534, 337535, 263809, 312965, 288392, 239250, 419478, 321199, 198324, 296628, 337591, 296632, 280251, 280257, 321219, 280267, 403148, 9936, 9937, 370388, 272085, 345814, 18138, 67292, 345821, 321247, 321249, 345833, 345834, 288491, 280300, 239341, 313065, 419569, 67315, 173814, 313081, 288512, 67332, 288516, 321295, 321302, 345879, 116505, 321310, 313120, 255776, 362283, 378668, 296755, 321337, 345919, 436031, 403267, 280390, 280392, 345929, 18262, 362327, 280410, 345951, 362337, 345955, 296806, 288619, 288620, 280430, 214895, 313199, 362352, 296814, 313203, 182144, 305026, 67463, 329622, 337815, 247712, 436131, 313254, 436137, 362417, 288697, 362431, 214977, 280514, 214984, 362443, 231375, 280541, 329695, 436191, 313319, 247785, 296941, 436205, 223218, 43014, 354316, 313357, 305179, 313375, 239650, 329765, 354343, 354345, 223274, 346162, 288828, 436285, 288833, 288834, 436292, 403525, 280649, 436301, 338001, 354385, 338003, 223316, 280661, 329814, 223318, 288857, 354393, 280675, 280677, 43110, 321637, 329829, 436329, 313447, 288879, 223350, 280694, 288889, 215164, 215166, 280712, 141450, 215178, 346271, 436383, 362659, 239793, 182456, 280762, 223419, 379071, 280768, 149703, 346314, 321745, 280795, 387296, 280802, 379106, 346346, 321772, 125169, 436470, 157944, 149760, 411906, 321800, 272658, 338197, 305440, 338218, 321840, 379186, 280887, 321860, 182597, 280902, 289110, 305495, 215385, 354655, 321894, 280939, 313713, 354676, 199029, 436608, 362881, 240002, 436611, 280961, 240016, 108944, 190871, 149916, 420253, 141728, 289189, 289194, 108972, 272813, 338356, 436661, 281037, 289232, 281040, 256477, 330218, 281072, 109042, 174593, 420369, 223767, 289304, 223769, 207393, 289332, 174648, 338489, 338490, 281166, 281171, 297560, 436832, 436834, 420463, 346737, 313971, 346740, 420471, 330379, 133774, 330387, 117396, 117397, 346772, 330388, 264856, 289434, 346779, 289462, 166582, 314040, 109241, 158394, 248517, 199366, 363211, 289502, 363230, 264928, 330474, 289518, 199414, 322313, 117517, 322319, 166676, 207640, 281377, 289576, 191283, 273207, 289598, 281408, 281427, 281433, 322395, 109409, 330609, 174963, 207732, 109428, 158593, 109447, 224145, 355217, 256922, 289690, 289698, 420773, 289703, 240552, 363438, 347055, 289722, 289727, 273344, 330689, 363458, 379844, 19399, 52172, 183248, 248796, 347103, 52200, 289774, 347123, 314355, 240630, 314362, 257024, 330754, 134150, 330763, 281625, 281626, 175132, 248872, 322612, 207938, 314448, 339030, 281697, 314467, 281700, 257125, 322663, 281706, 207979, 273515, 404593, 363641, 363644, 150657, 248961, 330888, 363669, 339100, 380061, 429214, 199839, 339102, 330913, 306338, 265379, 249002, 306346, 3246, 421048, 208058, 322749, 265412, 290000, 298208, 363744, 298212, 298213, 290022, 330984, 298221, 298228, 216315, 208124, 437505, 322824, 257305, 126237, 339234, 199971, 372009, 412971, 298291, 306494, 216386, 224586, 372043, 331090, 314709, 314710, 372054, 159066, 134491, 224606, 314720, 142689, 281957, 281962, 134506, 306542, 380271, 208244, 249204, 249205, 290169, 290173, 306559, 306560, 314751, 224640, 298374, 388487, 314758, 142729, 314760, 281992, 314766, 306579, 224661, 290207, 314783, 314789, 282022, 314791, 396711, 396712, 282024, 241066, 314798, 380337, 380338, 150965, 380357, 339398, 306631, 306639, 413137, 429542, 191981, 282096, 306677, 191990, 290300, 290301, 372227, 306692, 306693, 323080, 192010, 323087, 323089, 175639, 388632, 282136, 396827, 282141, 134686, 306723, 347694, 290358, 265798, 282183, 265804, 224847, 118353, 396882, 290390, 306776, 44635, 396895, 323172, 282213, 224883, 314998, 323196, 175741, 339584, 192131, 282246, 290443, 323217, 282259, 298654, 282271, 282273, 257699, 282276, 298661, 323236, 282280, 61101, 224946, 306874, 110268, 224958, 282303, 323264, 274115, 306890, 282318, 241361, 241365, 282327, 216795, 298720, 282339, 12010, 282348, 282355, 323316, 282358, 339715, 323331, 323332, 216839, 339720, 282378, 372496, 323346, 282391, 282400, 339745, 241441, 315171, 257830, 421672, 282409, 159533, 282417, 200498, 315202, 307011, 282434, 282438, 323406, 413521, 216918, 241495, 307031, 282474, 282480, 241528, 315264, 339841, 241540, 315273, 315274, 110480, 372626, 380821, 282518, 282519, 44952, 298909, 118685, 298920, 323507, 282549, 290745, 290746, 274371, 151497, 372701, 298980, 380908, 290811, 282633, 241692, 307231, 102437, 315432, 315434, 102445, 233517, 176175, 282672, 241716, 159807, 225351, 315465, 315476, 307289, 200794, 315487, 356447, 45153, 307299, 307301, 438377, 299121, 233589, 233590, 266357, 422019, 241808, 381073, 299174, 323762, 299187, 405687, 184505, 299198, 258239, 389313, 299203, 299209, 372941, 282831, 266449, 356576, 307435, 438511, 233715, 381172, 184570, 168188, 184575, 381208, 282909, 299293, 151839, 282913, 233762, 217380, 282919, 151847, 332083, 332085, 332089, 315706, 282939, 438596, 332101, 323913, 348492, 323920, 282960, 348500, 168281, 332123, 323935, 332127, 242023, 160110, 242033, 291192, 315773, 291198, 340357, 225670, 332167, 242058, 373134, 291224, 242078, 61857, 315810, 61859, 315811, 381347, 340398, 299441, 283064, 291265, 291267, 127427, 127428, 283075, 324039, 373197, 160225, 127465, 291311, 233978, 291333, 340490, 283153, 258581, 291358, 283182, 283184, 234036, 315960, 348732, 242237, 70209, 348742, 70215, 348749, 381517, 332378, 201308, 111208, 184940, 373358, 389745, 209530, 291454, 373375, 184962, 152195, 348806, 152203, 316049, 111253, 316053, 111258, 111259, 176808, 299699, 299700, 422596, 422599, 291530, 225995, 225997, 242386, 226004, 226007, 422617, 422626, 226019, 299746, 234217, 299759, 234234, 299776, 242433, 291585, 430849, 234241, 209670, 291592, 226058, 234250, 62220, 234253, 422673, 430865, 291604, 234263, 422680, 283419, 234268, 291612, 234277, 234283, 152365, 234286, 422703, 234289, 422709, 152374, 234294, 160571, 234301, 430910, 160575, 160580, 234311, 234312, 299849, 381773, 234317, 201551, 201549, 234323, 234326, 234331, 242529, 349026, 357218, 234340, 234343, 177001, 234346, 201577, 308076, 242541, 234355, 209783, 234360, 209785, 234361, 177019, 185211, 308092, 398206, 234366, 291712, 234367, 234372, 381829, 226181, 226184, 316298, 308107, 308112, 349072, 234386, 234387, 234392, 209817, 324507, 390045, 127902, 234400, 185250, 234404, 283558, 185254, 234409, 275371, 316333, 234419, 373687, 316343, 234425, 234427, 234430, 234436, 234438, 373706, 316364, 234444, 234445, 234451, 234454, 234457, 234463, 340961, 234466, 234472, 234473, 324586, 234477, 234482, 316405, 349175, 201720, 127992, 234498, 357379, 234500, 234506, 324625, 308243, 316437, 234531, 300068, 357414, 234534, 234542, 300084, 234548, 234555, 308287, 234560, 21569, 234565, 234569, 218186, 300111, 341073, 234577, 234583, 439384, 234584, 300135, 316520, 275565, 357486, 316526, 144496, 275571, 300150, 291959, 300151, 234616, 398457, 160891, 300158, 234622, 349316, 349318, 275591, 234632, 373903, 169104, 177296, 234642, 308372, 185493, 119962, 283802, 300187, 300188, 119963, 234656, 234659, 234663, 300201, 300202, 275625, 226481, 373945, 283840, 259268, 283847, 283852, 259280, 316627, 333011, 333022, 234733, 234742, 128251, 292091, 234755, 439562, 292107, 414990, 251153, 177428, 349462, 333090, 226608, 382258, 300343, 382269, 333117, 226624, 193859, 300359, 226632, 177484, 406861, 259406, 234831, 120148, 357719, 283991, 374109, 218462, 316765, 234850, 333160, 284014, 243056, 316787, 111993, 357762, 112017, 234898, 259475, 275859, 112018, 357786, 251298, 333220, 316842, 374191, 284089, 292283, 415171, 292292, 300487, 300489, 284107, 284116, 210390, 210391, 210393, 226781, 144867, 103909, 316902, 251378, 308723, 333300, 333303, 300536, 300542, 292356, 259599, 308756, 398869, 374296, 374299, 308764, 333343, 431649, 169518, 431663, 194110, 349763, 292423, 218696, 292425, 276040, 128587, 333388, 366154, 276045, 243274, 300630, 128599, 235095, 243292, 333408, 300644, 317032, 415338, 243307, 54893, 325231, 276085, 333430, 325245, 194180, 415375, 276120, 276126, 153251, 300714, 210603, 300728, 415420, 333503, 259781, 333509, 333517, 276173, 333520, 333521, 325346, 276195, 153319, 325352, 284401, 276210, 325371, 276219, 194303, 194304, 276238, 284431, 243472, 161554, 366360, 284442, 325404, 276253, 333610, 284459, 399147, 431916, 300848, 276282, 259899, 276283, 325439, 276287, 325445, 276294, 153415, 276298, 341836, 415567, 325457, 317269, 341847, 284507, 350044, 300894, 128862, 276327, 292712, 325484, 423789, 292720, 325492, 276341, 300918, 341879, 317304, 333688, 276344, 194429, 112509, 55167, 325503, 333701, 243591, 325515, 243597, 325518, 333722, 350109, 292771, 300963, 415655, 284587, 292782, 317360, 243637, 276408, 276421, 284619, 276430, 301008, 153554, 276444, 292836, 292837, 276454, 317415, 276459, 325619, 432116, 333817, 292858, 415741, 333828, 358410, 399373, 317467, 145435, 292902, 325674, 227370, 129076, 276534, 243767, 358456, 227417, 194656, 309345, 227428, 276582, 194666, 276589, 260207, 432240, 227439, 292988, 292992, 227460, 415881, 104587, 235662, 325776, 276627, 317587, 276632, 284826, 333991, 153776, 129203, 227513, 301251, 309444, 227524, 276682, 194782, 301279, 317664, 211193, 227578, 243962, 375039, 309503, 194820, 325905, 325912, 309529, 227616, 211235, 432421, 211238, 358703, 358709, 227654, 227658, 276813, 325968, 6481, 366930, 6482, 366929, 6489, 334171, 391520, 276835, 383332, 416104, 383336, 276847, 285040, 211326, 317831, 227725, 178578, 252308, 178582, 293274, 285084, 121245, 317852, 285090, 342450, 293303, 276920, 293306, 276925, 293310, 416197, 129483, 342476, 317901, 326100, 285150, 227809, 342498, 358882, 334309, 227813, 391655, 432618, 375276, 309744, 301571, 276998, 342536, 186893, 416286, 375333, 293419, 244269, 375343, 23092, 375351, 277048, 244281, 301638, 309830, 293448, 55881, 416341, 285271, 416351, 268899, 277094, 244327, 39530, 277101, 277111, 301689, 244347, 277133, 326287, 375440, 334481, 318106, 318107, 342682, 285353, 285361, 318130, 383667, 293556, 342706, 285371, 285372, 285373, 285374, 39614, 154316, 203477, 375526, 285415, 342762, 342763, 293612, 277227, 154359, 228088, 432893, 162561, 285444, 383754, 326414, 285458, 310036, 326429, 293664, 326433, 400166, 293672, 318252, 285487, 301871, 375609, 285497, 293693, 162621, 162626, 277316, 252741, 318278, 277325, 293711, 244568, 244570, 301918, 293730, 342887, 400239, 310131, 277366, 228215, 277370, 269178, 400252, 359298, 359299, 260996, 277381, 113542, 416646, 228233, 392074, 228234, 236428, 56208, 293781, 318364, 310176, 310178, 310182, 293800, 236461, 293806, 326581, 326587, 326601, 359381, 433115, 343005, 277479, 326635, 203757, 187374, 383983, 277492, 318461, 293886, 277509, 293893, 277510, 433165, 384016, 277523, 277524, 293910, 433174, 326685, 252958, 310317, 203830, 359478, 277563, 302139, 277597, 392290, 253029, 285798, 228458, 318572, 15471, 351344, 285814, 285820, 392318, 384131, 285828, 302213, 285830, 253063, 302216, 228491, 228493, 162961, 326804, 187544, 285851, 351390, 302240, 253099, 253100, 318639, 367799, 294074, 113850, 277690, 228540, 228542, 302274, 367810, 228563, 195808, 310497, 195811, 302325, 204022, 228600, 261377, 228609, 245019, 253216, 277792, 130338, 130343, 277800, 113966, 261425, 351537, 171317, 318775, 286013, 286018, 113987, 15686, 146762, 294218, 294219, 318805, 425304, 294243, 163175, 327024, 327025, 318848, 179587, 294275, 253317, 384393, 368011, 318864, 318868, 318875, 310692, 245161, 310701, 286129, 286132, 228795, 425405, 302531, 163269, 425418, 302540, 310732, 64975, 310736, 327121, 228827, 286172, 310757, 187878, 245223, 286202, 359930, 286205, 302590, 253451, 359950, 65041, 146964, 253463, 204313, 187938, 286244, 245287, 245292, 278060, 286254, 196164, 56902, 228943, 286288, 179801, 147036, 343647, 286306, 310889, 204397, 138863, 188016, 188031, 294529, 286343, 229001, 310923, 188048, 302739, 425626, 229020, 302754, 229029, 40614, 40613, 40615, 278191, 286388, 286391, 384695, 327358, 286399, 212685, 302797, 212688, 384720, 302802, 245457, 286423, 278233, 278234, 294622, 278240, 229088, 212716, 212717, 360177, 229113, 286459, 278272, 319233, 311042, 360195, 294678, 278299, 286494, 294700, 409394, 319292, 360252, 360264, 188251, 376669, 245599, 237408, 425825, 302946, 425833, 417654, 188292, 327557, 40853, 294807, 294809, 376732, 311199, 319392, 294823, 327596, 294843, 188348, 237504, 294850, 384964, 163781, 344013, 212942, 24532, 294886, 278512, 311281, 311282 ]
49c4b469c263e8967901f33799f1cf2a782bf7f1
769084172eab1b5737f46286dbfaf26d8f9388a5
/FlickrViewer/Views/MyImageView.swift
82fef6641dd0931ac27175a6c86f474636b46e53
[]
no_license
hanksudo/FlickrViewer
b22a95d52a2b926bf8f2f563e9a7525f787a3ea8
bea31766a5e647a9c118e453400d3c056cc2fcbf
refs/heads/master
2021-07-03T02:51:55.400714
2020-09-30T03:42:54
2020-09-30T03:42:54
132,238,256
1
1
null
null
null
null
UTF-8
Swift
false
false
1,429
swift
// // MyImageView.swift // FlickrViewer // // Created by Hank Wang on 2020/09/30. // Copyright © 2020 hanksudo. All rights reserved. // import UIKit class MyImageView: UIImageView { var task: URLSessionDataTask? func loadFromURL(_ urlString: String) { self.clearTask() if let cachedImage = imageCache.object(forKey: urlString as NSString) { DispatchQueue.main.async { self.image = cachedImage } return } guard let url = URL(string: urlString) else { return } task = URLSession.shared.dataTask(with: url, completionHandler: { (data, response, error) in guard let statusCode = (response as? HTTPURLResponse)?.statusCode, statusCode >= 200 && statusCode <= 299 else { return } guard (error == nil) else { return } let imageToCache = UIImage(data: data!) imageCache.setObject(imageToCache!, forKey: urlString as NSString) DispatchQueue.main.async { self.image = imageToCache self.clearTask() } }) task!.resume() } func clearTask() { if self.task != nil { self.task!.cancel() self.task = nil } } }
[ -1 ]
fd95ab02377e125c05ab8e90e77366433d9ffd71
d1ec1dc1f25fe19d431d20438d1bce4d2835bd3e
/SpiralPay/SpiralPay/Scenes/Signup/PhoneVerification/PhoneVerificationRouter.swift
d4973061b237ea7ecae33b1a89e0cf4daab1e0ad
[]
no_license
NavneetSinghGill/SpiralPay
43578905e224249f5a97c58dfead3668c496b716
b1cc265f3c11b383dff221a5c3ec8abf641dfd54
refs/heads/master
2021-01-02T15:16:56.686169
2018-07-03T07:50:18
2018-07-03T07:50:18
239,650,673
0
0
null
null
null
null
UTF-8
Swift
false
false
3,892
swift
// // PhoneVerificationRouter.swift // SpiralPay // // Created by Zoeb on 07/02/18. // Copyright (c) 2018 EnvisionWorld. All rights reserved. // // This file was generated by the Clean Swift Xcode Templates so // you can apply clean architecture to your iOS and Mac projects, // see http://clean-swift.com // import UIKit import GIDSDK @objc protocol PhoneVerificationRoutingLogic { func routeToEnterSmsPinScreen() func routeToSuccessFulVerificationScreen() func routeToFailedVerificationScreen() func routeToFirstPhoneVerificationScreen() func routeToConfirmDetailsScreen() func routeToChangeEmailScreen() } protocol PhoneVerificationDataPassing { var dataStore: PhoneVerificationDataStore? { get } } class PhoneVerificationRouter: NSObject, PhoneVerificationRoutingLogic, PhoneVerificationDataPassing { weak var viewController: PhoneVerificationViewController? var dataStore: PhoneVerificationDataStore? // MARK: Routing func routeToEnterSmsPinScreen() { let pvViewController: PhoneVerificationViewController = PhoneVerificationViewController.create() pvViewController.screenStatus = .EnterPin pvViewController.generatedCode = viewController?.generatedCode if let viewController = viewController { pvViewController.screenType = viewController.screenType } navigate(source: viewController!, destination: pvViewController) } func routeToSuccessFulVerificationScreen() { let pvViewController: PhoneVerificationViewController = PhoneVerificationViewController.create() pvViewController.screenStatus = .Success if let viewController = viewController { pvViewController.screenType = viewController.screenType } navigate(source: viewController!, destination: pvViewController) } func routeToFailedVerificationScreen() { let pvViewController: PhoneVerificationViewController = PhoneVerificationViewController.create() pvViewController.screenStatus = .Failed if let viewController = viewController { pvViewController.screenType = viewController.screenType } navigate(source: viewController!, destination: pvViewController) } func routeToFirstPhoneVerificationScreen() { var viewControllers: Array<UIViewController> = [] for vController in viewController!.navigationController!.viewControllers { guard let vc = vController as? PhoneVerificationViewController else { viewControllers.append(vController) continue } viewControllers.append(vc) break } viewController?.navigationController?.setViewControllers(viewControllers, animated: true) } func routeToChangeEmailScreen() { var viewControllers: Array<UIViewController> = [] for vController in viewController!.navigationController!.viewControllers { guard let vc = vController as? ChangeEmailViewController else { viewControllers.append(vController) continue } viewControllers.append(vc) break } viewController?.navigationController?.setViewControllers(viewControllers, animated: true) } func routeToConfirmDetailsScreen() { let confirmDetailsViewController: ConfirmDetailsViewController = ConfirmDetailsViewController.create() navigate(source: viewController!, destination: confirmDetailsViewController) } // MARK: Navigation func navigate(source: PhoneVerificationViewController, destination: UIViewController) { source.show(destination, sender: nil) } }
[ -1 ]
c714383f8cf7a497c68398f38ff3baf52c5b2826
eef9241e6b54aa028283bebb4cd0b84939ee0296
/Sources/Bow/Effects/AsyncContext.swift
73d8ff5d501646348e37283e185de7af43270a13
[]
no_license
ConradoMateu/bow
aec5929b891b787433672f7d5b520d58406d4d72
4a4a006675dec45b8f6dc2ce66481e9141871823
refs/heads/master
2020-03-07T01:03:14.699243
2018-04-04T17:20:16
2018-04-04T17:20:16
127,173,192
0
0
null
2018-03-28T17:10:33
2018-03-28T17:10:31
null
UTF-8
Swift
false
false
995
swift
// // AsyncContext.swift // Bow // // Created by Tomás Ruiz López on 29/11/17. // Copyright © 2017 Tomás Ruiz López. All rights reserved. // import Foundation public typealias Proc<A> = (Callback<A>) throws -> Unit public typealias Callback<A> = (Either<Error, A>) -> Unit public protocol AsyncContext : Typeclass { associatedtype F func runAsync<A>(_ fa : @escaping Proc<A>) -> HK<F, A> } public func runAsync<F, A, AsyncC>(_ asyncContext : AsyncC, _ f : @escaping () throws -> A) -> HK<F, A> where AsyncC : AsyncContext, AsyncC.F == F { return asyncContext.runAsync { callback in do { callback(Either<Error, A>.right(try f())) } catch { callback(Either<Error, A>.left(error)) } } } public func runAsyncUnsafe<F, A, AsyncC>(_ asyncContext : AsyncC, _ f : @escaping () -> Either<Error, A>) -> HK<F, A> where AsyncC : AsyncContext, AsyncC.F == F { return asyncContext.runAsync { callback in callback(f()) } }
[ -1 ]
45e92cdd63de8008d940fb1d15bf36745f277840
e440ae9d6d5f73e6874aca9d35d21b465ba1f9e7
/ImageOverlayTests/AnyViewAsOverlayTests.swift
3a5defc11f4e32db479cca68cb540645217d8ce1
[ "MIT" ]
permissive
toshi0383/ImageOverlay
31a163274f4000463d9afd6f9655758496df5eb2
1eb4f7ba4c59075abecdfbce9e66067d15686694
refs/heads/master
2021-09-09T13:30:32.536679
2018-03-16T14:14:05
2018-03-16T14:14:09
110,483,849
13
1
MIT
2018-03-16T13:52:59
2017-11-13T01:09:42
Swift
UTF-8
Swift
false
false
2,079
swift
// // AnyViewAsOverlayTests.swift // ImageOverlayTests // // Created by Toshihiro Suzuki on 2017/11/10. // Copyright © 2017 toshi0383. All rights reserved. // import XCTest @testable import ImageOverlay class AnyViewAsOverlayTests: XCTestCase { private var parent: UIView! private var layers: [CALayer] = [] override func setUp() { super.setUp() parent = UIView(frame: CGRect(x: 10, y: 10, width: 11, height: 11)) } private func validateParent() { guard let layer = layers.first else { XCTFail() return } if #available(tvOS 11.0, *) { XCTAssertEqual(layer.position, CGPoint(x: 15.5, y: 15.5)) XCTAssertEqual(layer.bounds, CGRect(x: 10, y: 10, width: 11, height: 11)) XCTAssertEqual(layer.frame, CGRect(x: 10, y: 10, width: 11, height: 11)) } else { XCTAssertEqual(layer.position, CGPoint(x: 15.5, y: 15.5)) XCTAssertEqual(layer.bounds, CGRect(x: 20, y: 20, width: 22, height: 22)) XCTAssertEqual(layer.frame, CGRect(x: 4.5, y: 4.5, width: 22, height: 22)) } } func testSingleView() { let view = UIView(frame: CGRect(x: 10, y: 10, width: 11, height: 11)) let o = AnyViewAsOverlay(view: view) layers = o.layers XCTAssertEqual(layers.count, 1) validateParent() } func testChildView() { let view = UIView(frame: CGRect(x: 10, y: 10, width: 11, height: 11)) let child = UIView(frame: CGRect(x: 2, y: 2, width: 7, height: 7)) view.addSubview(child) let o = AnyViewAsOverlay(view: view) layers = o.layers XCTAssertEqual(layers.count, 2) validateParent() guard let layer = layers.last else { XCTFail() return } if #available(tvOS 11.0, *) { XCTAssertEqual(layer.bounds, CGRect(x: 12, y: 12, width: 7, height: 7)) } else { XCTAssertEqual(layer.bounds, CGRect(x: 24, y: 24, width: 14, height: 14)) } } }
[ -1 ]
e9b8b3f442d0a4738bea706d228c62d846886175
d69d27e9c629c47824b32cfec42e510063da2c90
/SmurfViewer/SmurfViewer/App Lifecycle/AppDelegate.swift
6d3ad47955a47fb5d706c17c827425d720d61c29
[]
no_license
ArthurBlack18/iOSTechTest
11f6a3f28bfcda7bb0a9974cdf68b29d64c491f3
64b0d522a8f8f70a3d6f27413536d621ae828b08
refs/heads/master
2022-11-25T10:02:13.081811
2020-08-03T18:32:17
2020-08-03T18:32:17
284,638,519
1
0
null
2020-08-03T07:56:14
2020-08-03T07:56:13
null
UTF-8
Swift
false
false
621
swift
import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { //Setup our poor mans DI Injected.reset() let homeViewController = HomeViewController(nibName: nil, bundle: nil) window = UIWindow(frame: UIScreen.main.bounds) window!.rootViewController = UINavigationController(rootViewController: homeViewController) window!.makeKeyAndVisible() return true } }
[ 430912, 241665, 354980, 187653, 320517, 258732, 216333, 140397, 342445, 213969, 389525, 134229, 325433, 363772 ]
dc0cf1f06042ed2e87af49d29e1b2add78be4323
2bdbf3de09ca9b412d1104785bea8dc50aa8f3b7
/BetterPayBack/TabBar/TabBarController.swift
013fc2fda5065b53cf32cebce87fe78873c7220d
[]
no_license
Wen-Tam37/BetterPayBack
f157b1a4fa9d899407008fd5b653de01bf449d7e
45e75d41e40187294c0a3daac605b571920e7105
refs/heads/master
2021-01-07T04:25:35.322491
2020-02-26T02:49:08
2020-02-26T02:49:08
241,577,973
0
1
null
null
null
null
UTF-8
Swift
false
false
5,541
swift
// // TabBarController.swift // BetterPayBack // // Created by cmStudent on 2020/01/28. // Copyright © 2020 19cm0140. All rights reserved. // import UIKit class TabBarController: UITabBarController { //plusボタン let button = UIButton.init(type: .custom) //popupview var popupViewController = PopUpViewController() //test var item1 = UINavigationController() var item2 = UINavigationController() var item3 = UINavigationController() override func viewDidLoad() { super.viewDidLoad() //ipad (9.7) 768 1024 //MARK:sizeChange let width = view.frame.width //let height = view.frame.height if width > 414 { self.tabBar.frame = CGRect(x: 0, y: 924, width: 768, height: 100) self.tabBar.tintColor = UIColor.black self.tabBar.backgroundImage = UIImage(named: "homeIndicator3") //self.tabBar.backgroundImage = UIImage() self.tabBar.shadowImage = UIImage() self.tabBar.barTintColor = .clear //self.tabBar.items![0].image = UIImage(named: "home2") //self.tabBar.items![1].image = UIImage(named: "user") //self.tabBarItem.imageInsets = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0) //cover用View let lineView = UIView() lineView.frame = CGRect(x: 0, y: view.frame.height * 0.878, width: view.frame.width, height: 2) lineView.backgroundColor = UIColor(red: 240/255, green: 135/255, blue: 98/255, alpha: 1) //lineView.backgroundColor = UIColor.red self.view.addSubview(lineView) //self.view.sendSubviewToBack(lineView) }else{ self.tabBar.tintColor = UIColor.black self.tabBar.backgroundImage = UIImage(named: "homeIndicator2") //self.tabBar.backgroundImage = UIImage() self.tabBar.shadowImage = UIImage() self.tabBar.barTintColor = .clear //cover用View let lineView = UIView() lineView.frame = CGRect(x: 0, y: view.frame.height * 0.853, width: view.frame.width, height: 2) lineView.backgroundColor = UIColor(red: 240/255, green: 135/255, blue: 98/255, alpha: 1) //lineView.backgroundColor = UIColor.red self.view.addSubview(lineView) //self.view.sendSubviewToBack(lineView) } // self.tabBar.tintColor = UIColor.black // self.tabBar.backgroundImage = UIImage(named: "homeIndicator2") // //self.tabBar.backgroundImage = UIImage() // self.tabBar.shadowImage = UIImage() // // self.tabBar.barTintColor = .clear // //cover用View // let lineView = UIView() // lineView.frame = CGRect(x: 0, y: view.frame.height * 0.853, width: view.frame.width, height: 2) // lineView.backgroundColor = UIColor(red: 240/255, green: 135/255, blue: 98/255, alpha: 1) // //lineView.backgroundColor = UIColor.red // self.view.addSubview(lineView) // //self.view.sendSubviewToBack(lineView) //plusボタン設定 button.setImage(UIImage(named: "plus_main"), for: UIControl.State.normal) button.frame = CGRect.init(x: self.tabBar.center.x - 33, y: self.view.frame.height * 0.83, width: 70, height: 70) button.addTarget(self, action: #selector(self.popup(_:)), for: .touchUpInside) self.view.insertSubview(button, aboveSubview: self.tabBar) self.view.bringSubviewToFront(button) //set2() print("") // var insets = UIEdgeInsets() // insets.top = 5 // insets.bottom = 10 // self.tabBarItem.imageInsets = insets //self.navigationController?.tabBarItem.imageInsets = insets } func set2(){ let storyboard: UIStoryboard = self.storyboard! let profileViewController = storyboard.instantiateViewController(withIdentifier: "profile") as! ProfileViewController let homeViewController = storyboard.instantiateViewController(withIdentifier: "home") as! ViewController let countDownViewController = storyboard.instantiateViewController(withIdentifier: "countDown") as! CountDownViewController let vc1 = homeViewController //let vc1 = ViewController() //vc1.tabBarItem = UITabBarItem(tabBarSystemItem: .favorites, tag: 1) vc1.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "home2"), tag: 0) let vc2 = profileViewController vc2.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "user"), tag: 1) let vc3 = countDownViewController vc3.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "005-clock"), tag: 2) let vcs: [UIViewController] = [vc1, vc2] self.setViewControllers(vcs, animated: true) } // ボタンが押されたときにaddSubviewする @objc func popup(_ sender: Any) { view.addSubview(popupViewController.view) } } //extension UITabBar { // override open func sizeThatFits(_ size: CGSize) -> CGSize { // var size = super.sizeThatFits(size) // size.height = 100 // return size // } //}
[ -1 ]
474fa8396680e355b9781fa8314623af03d38625
e930f79c92d4c929af124d065dd95f565d623624
/SVSPGLearningApp/ViewController.swift
35347eb52ceb19a8c6a9ba5121531a6181b9105d
[]
no_license
lordbron/SVSPGLearningApp
7bea60b8c4fe98d15fa4aa1c900327fff801e780
231286572137a854887b6cc4e808813c7ae30763
refs/heads/master
2021-01-10T08:16:51.931407
2016-02-17T15:53:44
2016-02-17T15:53:44
51,934,051
1
2
null
null
null
null
UTF-8
Swift
false
false
545
swift
// // ViewController.swift // SVSPGLearningApp // // Created by Thomas Ortega II on 2/17/16. // Copyright © 2016 Silicon Valley Swift Programming Group. 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, 277508, 279046, 278543, 234511, 281107, 300057, 236057, 286234, 282145, 296487, 296489, 281142, 234551, 237624, 300089, 288827, 238653, 226878, 277057, 286786, 129604, 228932, 284740, 226887, 243786, 300107, 158285, 226896, 228945, 203858, 280146, 212561, 300116, 237655, 307288, 212573, 309347, 309349, 284261, 309351, 309353, 286314, 296042, 277612, 311913, 164974, 356460, 307311, 281202, 284275, 277108, 284277, 300149, 284279, 287350, 292478, 284289, 284298, 303242, 285837, 311437, 234641, 278675, 349332, 282262, 284315, 280219, 284317, 299165, 285855, 302235, 282275, 284323, 278693, 287399, 100521, 234665, 313007, 284336, 307379, 276150, 280760, 282301, 296638, 277696, 285377, 280770, 280772, 280775, 228551, 284361, 230604, 298189, 302286, 287437, 230608, 317137, 313550, 229585, 290004, 284373, 290006, 189655, 302295, 307410, 298202, 278749, 280797, 298206, 363743, 298211, 290020, 301284, 284391, 277224, 280808, 199402, 280810, 228585, 312049, 289524, 288501, 120054, 226038, 234232, 280826, 286462, 276736, 280832, 312586, 299786, 295696, 296216, 278298, 329499, 287004, 281373, 228127, 281380, 282917, 233767, 234279, 283433, 293682, 289596, 278845, 279360, 289600, 288579, 238920, 234829, 287055, 296272, 295766, 289112, 188253, 292701, 311645, 308064, 227688, 293742, 299374, 199024, 277364, 207738, 290175, 183173, 313733, 324491, 234380, 233869, 304015, 310673, 226196, 284570, 227740, 284574, 285087, 284577, 234402, 289187, 289190, 289191, 305577, 291755, 289196, 370093, 279982, 286126, 297903, 305582, 144811, 277935, 282548, 324528, 292277, 296374, 293816, 130487, 127418, 234423, 293308, 278973, 291774, 281530, 165832, 289224, 306633, 288205, 286158, 280015, 301012, 280030, 279011, 168936, 289771, 286189, 183278, 282095, 277487, 298989, 308721, 227315, 302580, 237556, 236022, 296436, 288251, 287231 ]
1344f5b1d655260793e37474094570f7216558c3
2a084e7ee8bc7b627eb6e2d54fa255ef788c0284
/BookFinder/Drivers/Extentions/UIImageView+.swift
7e29eb0922b2fc391ccfae79de86c100328559d8
[]
no_license
sweetptios/BookFinder
32772b23789a7d720eb3de33c975b5e26e4cb19b
bcb8ec7f7bdba1a2b3c97114e6064b3c1fcfe2d8
refs/heads/master
2022-04-08T12:46:04.590579
2020-03-21T01:39:12
2020-03-21T05:30:03
237,408,197
4
0
null
null
null
null
UTF-8
Swift
false
false
393
swift
// // UIImageView+.swift // BookFinder // // Created by GOOK HEE JUNG on 2020/02/06. // Copyright © 2020 sweetpt365. All rights reserved. // import Foundation import Kingfisher //MARK: - Download and Cache Images from the Web extension UIImageView { func loadingImage(with url: URL?, placeholder: UIImage? = nil ) { kf.setImage(with: url, placeholder: placeholder) } }
[ -1 ]
1057406008abcb503d66e6548281258617e060e2
b274b58d135313556d33f014366af42aa4b71553
/RaccoonWallet/Modules/Send/SendConfirmation/Presenter/SendConfirmationPresenter.swift
db597a907d9698afec593d966b9dab4e43ba39fd
[ "MIT" ]
permissive
githmn/raccoonwallet-ios
8c61d4614ff79b514dad457b149d7306b11138b2
53b323dac9aa7c7f68b2effdd54520dfa9ac87cb
refs/heads/master
2020-04-05T15:00:37.440583
2018-11-08T22:34:23
2018-11-08T22:34:23
null
0
0
null
null
null
null
UTF-8
Swift
false
false
5,009
swift
// // SendConfirmationPresenter.swift // RaccoonWallet // // Created by Taizo Kusuda on 2018/09/04. // Copyright © 2018年 T TECH, LIMITED LIABILITY CO. All rights reserved. // import Foundation import NemSwift class SendConfirmationPresenter: BasePresenter { weak var view: SendConfirmationView? var interactor: SendConfirmationUseCase! var router: SendConfirmationWireframe! var sendTransaction: SendTransaction! override func viewDidLoad() { super.viewDidLoad() view?.showAmounts(sendTransaction.mosaics.map {$0.amountDescription} ) let transaction = createDummyTransaction() view?.showFee(MosaicDetail.xem(transaction.fee).amountDescription) view?.showDestination(sendTransaction.address.prettyAddress()) view?.showMessage(sendTransaction.message ?? "") } override func viewDidAppear() { super.viewDidAppear() if ApplicationSetting.shared.showsSendCaution { view?.showCaution() } } private func createEncryptedMessage(_ keyPair: KeyPair) -> [UInt8]? { guard let publicKey = sendTransaction.publicKey else { return nil } guard let message = sendTransaction.message else { return nil } return try? MessageEncryption.encrypt( senderKeys: keyPair, receiverPublicKey: ConvertUtil.toByteArray(publicKey), message: Array(message.utf8)) } // create dummy transaction only for calculating fee private func createDummyTransaction() -> TransferTransactionHelper.Transaction { let account = Account.generateAccount(network: NemConfiguration.addressNetwork) return createTransaction(account.keyPair) } private func createTransaction(_ keyPair: KeyPair) -> TransferTransactionHelper.Transaction { var messageBytes: [UInt8]? = nil if let message = sendTransaction.message { if sendTransaction.messageType == .plain { messageBytes = Array(message.utf8) } else { if let encryptedMessage = createEncryptedMessage(keyPair) { messageBytes = encryptedMessage } else { view?.showError("Failed to encrypt message") } } } if sendTransaction.mosaics.count == 1 && sendTransaction.mosaics[0].isXem() { return TransferTransactionHelper.generateTransfer( publicKey: keyPair.publicKey, network: NemConfiguration.transactionNetwork, recipientAddress: sendTransaction.address, amount: sendTransaction.mosaics[0].quantity, messageType: sendTransaction.messageType, message: messageBytes ?? []) } else { return TransferTransactionHelper.generateMosaicTransfer( publicKey: keyPair.publicKey, network: NemConfiguration.transactionNetwork, recipientAddress: sendTransaction.address, mosaics: sendTransaction.mosaics.map { $0.asTransferMosaic }, messageType: sendTransaction.messageType, message: messageBytes ?? []) } } } extension SendConfirmationPresenter: PinDialogMixinPresentation { func didValidatePin(_ pin: String) { guard let wallet = WalletHelper.activeWallet else { view?.showError(R.string.localizable.wallet_not_select_message()) return } guard let account = try? WalletHelper.repairAccount(from: wallet, password: pin) else{ view?.showError(R.string.localizable.common_error_account_repair()) return } let transaction = createTransaction(account.keyPair).toByteArray() view?.showLoading() interactor.sendTransaction(transaction, account.keyPair) } } extension SendConfirmationPresenter: SendConfirmationPresentation { func didClickNeverRemind() { ApplicationSetting.shared.showsSendCaution = false } func didClickBottomPanel() { guard PinPreference.shared.saved else { view?.showError(R.string.localizable.common_error_pin_not_set()) return } view?.showPinDialog(presenter: self) } } extension SendConfirmationPresenter: SendConfirmationInteractorOutput { func transactionSent(_ result: NemAnnounceResult) { view?.hideLoading() if result.isSuccess { router.presentSendEnd() } else { if result.isInsufficientBalance { view?.showError(R.string.localizable.common_error_insufficient_balance()) } else{ view?.showError(result.message) } } } func transactionSendFailed(_ error: Error) { view?.hideLoading() view?.showError(error.localizedDescription) } }
[ -1 ]
8592b89e5dde50cd15d299d5b70bafc259c61883
3753b2f40d0bfc3c69af90e2e6b0a847beb0530d
/ContainerViewBehavior/ContainerViewBehavior/ViewControllerCodeContainerB.swift
cde015079bb4b9a2387e903e9f47f9dc2852d600
[]
no_license
sho-ito-1027/ContainerViewBehavior
2437e9aa29c83d6da99399b5aaa979b987e23627
574aac879765be1fd0e660ffe20cc94b8308682f
refs/heads/master
2021-09-08T01:18:47.001784
2018-03-05T02:14:13
2018-03-05T02:14:13
null
0
0
null
null
null
null
UTF-8
Swift
false
false
1,666
swift
// // ViewControllerCodeContainerB.swift // ContainerViewBehavior // // Created by Sho Ito on 2018/03/05. // Copyright © 2018年 aryzae. All rights reserved. // import UIKit class ViewControllerCodeContainerB: UIViewController { static func initiate() -> ViewControllerCodeContainerB { let storyboard = UIStoryboard.init(name: "ViewControllerCode", bundle: .main) let vc = storyboard.instantiateViewController(withIdentifier: "ViewControllerCodeContainerB") as! ViewControllerCodeContainerB return vc } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. print("\(type(of: self)) : \(#function)") } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) print("\(type(of: self)) : \(#function)") } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) print("\(type(of: self)) : \(#function)") } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) print("\(type(of: self)) : \(#function)") } override func viewDidDisappear(_ animated: Bool) { super.viewWillDisappear(animated) print("\(type(of: self)) : \(#function)") } public func removeContent() { willMove(toParentViewController: nil) view.removeFromSuperview() removeFromParentViewController() } }
[ -1 ]
14fab37560f3fd85081dd70552a699de63e7b2ca
b2b7a1f41d89d919cee77cbd5105fa16a0d9fcfd
/FlickrApiSearchApp/ImageOperation.swift
0768fbd916feb44184c6355ea5230fa92adc6b0a
[]
no_license
nitinauti/FlickrApiSearchApp
b2c1f349af10abef2cd6ea9269f90ec9c284c550
bbd3b2cc337b10f5148b5017305563ad6c7595bf
refs/heads/main
2023-07-12T16:46:23.606403
2021-08-12T18:56:55
2021-08-12T18:56:55
395,334,931
0
0
null
null
null
null
UTF-8
Swift
false
false
2,385
swift
// // ImageOperation.swift // FlickrApiSearchApp // // Created by Nitin Auti on 12/08/21. // import UIKit final class ImageOperation: Operation { var imageDownloadCompletionHandler: ((Result<UIImage, NetworkError>) -> Void)? public let imageURL: URL private var downloadTask: URLSessionDownloadTask? private let size: CGSize private let scale: CGFloat init(imageURL: URL, size: CGSize, scale: CGFloat) { self.imageURL = imageURL self.size = size self.scale = scale } private enum OperationState: String, Equatable { case ready = "isReady" case executing = "isExecuting" case finished = "isFinished" } private var _state = OperationState.ready { willSet { willChangeValue(forKey: newValue.rawValue) willChangeValue(forKey: _state.rawValue) } didSet { didChangeValue(forKey: oldValue.rawValue) didChangeValue(forKey: _state.rawValue) } } private var state: OperationState { get { return _state } set { _state = newValue } } // MARK: - Various `Operation` properties override var isReady: Bool { return state == .ready && super.isReady } override var isExecuting: Bool { return state == .executing } override var isFinished: Bool { return state == .finished } // MARK: - Start override func start() { if isCancelled { finish() return } if !isExecuting { state = .executing } main() } // MARK: - Finish func finish() { if isExecuting { state = .finished } } // MARK: - Cancel override func cancel() { downloadTask?.cancel() finish() super.cancel() } //MARK: - Main override func main() { downloadImage() } private func downloadImage() { downloadTask = NetworkManager.downloadRequest(imageURL, size: size, scale: UIScreen.main.scale, completion: { [weak self] (result: Result<UIImage, NetworkError>) in self?.imageDownloadCompletionHandler?(result) self?.finish() }) } }
[ -1 ]
ca3c3cfcce456b8e6441c2fb77b94e9e588276ec
1d700c418f8d2b4eb7ac6c76fcde534a15ad3689
/stopwatch/stopwatch/AppDelegate.swift
92d0dc0187c11423c58c5cd853982b1785640faa
[]
no_license
connect2krish/ios_swift
8f81485ae10664076663495574a10f09996a5c82
999689590693f7014990668c0eb95a4fe89a6232
refs/heads/master
2021-01-22T05:23:54.530148
2016-09-22T03:20:18
2016-09-22T03:20:18
40,064,336
0
0
null
null
null
null
UTF-8
Swift
false
false
2,147
swift
// // AppDelegate.swift // stopwatch // // Created by Krish Venkat on 7/24/15. // Copyright (c) 2015 Krish Venkat. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
[ 229380, 229383, 229385, 278539, 229388, 294924, 278542, 229391, 327695, 278545, 229394, 278548, 229397, 229399, 229402, 278556, 229405, 352284, 278559, 229408, 278564, 294950, 229415, 229417, 327722, 237613, 229422, 229426, 237618, 229428, 286774, 229432, 286776, 286778, 319544, 204856, 286791, 237640, 278605, 237646, 311375, 163920, 196692, 319573, 311383, 278623, 278626, 319590, 311400, 278635, 303212, 278639, 278648, 131192, 237693, 327814, 131209, 303241, 417930, 311436, 303244, 319633, 286873, 286876, 311460, 311469, 32944, 327862, 286906, 327866, 180413, 286910, 131264, 286916, 286922, 286924, 286926, 319694, 286928, 131281, 278743, 278747, 295133, 155872, 319716, 278760, 237807, 303345, 286962, 131314, 229622, 327930, 278781, 278783, 278785, 237826, 319751, 278792, 286987, 319757, 311569, 286999, 287003, 287006, 287009, 287012, 287014, 287016, 287019, 311598, 287023, 262448, 311601, 287032, 155966, 278849, 319809, 319810, 319814, 311623, 319818, 311628, 229709, 287054, 319822, 278865, 229717, 196963, 196969, 139638, 213367, 106872, 319872, 311683, 319879, 65943, 319898, 311719, 278952, 139689, 278957, 311728, 278967, 180668, 311741, 278975, 319938, 278980, 98756, 278983, 319945, 278986, 319947, 278990, 278994, 311767, 279003, 279006, 188895, 172512, 279010, 287202, 279015, 172520, 319978, 279020, 172526, 279023, 311791, 172529, 279027, 319989, 164343, 180727, 279035, 311804, 287230, 279040, 303617, 287234, 279045, 287238, 172550, 172552, 303623, 320007, 279051, 172558, 279055, 303632, 279058, 303637, 279063, 279067, 172572, 279072, 172577, 295459, 172581, 295461, 279082, 311850, 279084, 172591, 172598, 279095, 172607, 172612, 377413, 172614, 172618, 303690, 33357, 287309, 279124, 172634, 262752, 172644, 311911, 189034, 295533, 189039, 189040, 172655, 172656, 295538, 189044, 172660, 287349, 352880, 287355, 287360, 295553, 287365, 311942, 303751, 352905, 279178, 287371, 311946, 311951, 287377, 172691, 287381, 311957, 221850, 287386, 164509, 287390, 295583, 303773, 172702, 287394, 230045, 303780, 172705, 287398, 172707, 287400, 279208, 172714, 295595, 279212, 189102, 172721, 287409, 66227, 303797, 189114, 287419, 303804, 328381, 279231, 287423, 328384, 287427, 312006, 107212, 172748, 287436, 172751, 295633, 172755, 303827, 279255, 172760, 279258, 303835, 213724, 189149, 303838, 287450, 279267, 312035, 295654, 279272, 230128, 312048, 312050, 230131, 205564, 303871, 230146, 328453, 295685, 230154, 33548, 312077, 295695, 369433, 295707, 328476, 295710, 303914, 279340, 205613, 279353, 230202, 312124, 222018, 295755, 377676, 148302, 287569, 279383, 303959, 279390, 230241, 279394, 303976, 336744, 303985, 328563, 303987, 279413, 303991, 303997, 295806, 295808, 295813, 304005, 213895, 320391, 304007, 304009, 304011, 230284, 304013, 213902, 279438, 295822, 189329, 304019, 189331, 279445, 58262, 279452, 410526, 279461, 279462, 304042, 213931, 230327, 304055, 287675, 197564, 304063, 238528, 304065, 189378, 213954, 156612, 295873, 213963, 312272, 304084, 304090, 320481, 304106, 320490, 312302, 328687, 320496, 304114, 295928, 320505, 312321, 295945, 295949, 197645, 230413, 320528, 140312, 295961, 238620, 197663, 304164, 189479, 304170, 238641, 312374, 238652, 238655, 230465, 238658, 296004, 336964, 205895, 320584, 238666, 296021, 402518, 336987, 230497, 296036, 296040, 361576, 205931, 164973, 205934, 279661, 312432, 279669, 337018, 279679, 279683, 222340, 205968, 296084, 238745, 304285, 238756, 205991, 222377, 165035, 337067, 165038, 238766, 230576, 238770, 304311, 230592, 279750, 230600, 230607, 148690, 320727, 279769, 304348, 279777, 304354, 296163, 320740, 279781, 304360, 320748, 279788, 279790, 296189, 320771, 312585, 296205, 230674, 320786, 230677, 296213, 296215, 320792, 230681, 230689, 173350, 312622, 296243, 312630, 222522, 222525, 296253, 312639, 296255, 230718, 296259, 378181, 230727, 238919, 320840, 296264, 296267, 296271, 222545, 230739, 312663, 337244, 222556, 230752, 312676, 230760, 173418, 410987, 230763, 230768, 296305, 312692, 230773, 279929, 181626, 304506, 304505, 181631, 312711, 312712, 296331, 288140, 230800, 288144, 304533, 337306, 288154, 288160, 288162, 288164, 279975, 304555, 370092, 279983, 288176, 279985, 173488, 312755, 296373, 279991, 312759, 288185, 337335, 222652, 312766, 173507, 296389, 222665, 230860, 288208, 230865, 288210, 370130, 288212, 280021, 288214, 222676, 239064, 288217, 288218, 280027, 288220, 329177, 239070, 288224, 288226, 370146, 280036, 288229, 280038, 288230, 288232, 280034, 288234, 320998, 288236, 288238, 288240, 291754, 288242, 296435, 288244, 296439, 288250, 402942, 148990, 296446, 206336, 321022, 296450, 230916, 230919, 214535, 370187, 304651, 304653, 230940, 222752, 108066, 296486, 296488, 157229, 230961, 288320, 288325, 124489, 280140, 280145, 288338, 280149, 280152, 288344, 239194, 280158, 403039, 370272, 181854, 239202, 312938, 280183, 280185, 280188, 280191, 280194, 116354, 280208, 280211, 288408, 280218, 280222, 190118, 321195, 321200, 337585, 296626, 296634, 313027, 280260, 280264, 206536, 206539, 206541, 206543, 280276, 313044, 321239, 280283, 313052, 288478, 313055, 321252, 313066, 280302, 288494, 280304, 313073, 419570, 321266, 288499, 288502, 280314, 288510, 67330, 280324, 198405, 288519, 280331, 198416, 280337, 296723, 116503, 321304, 329498, 296731, 321311, 313121, 313123, 304932, 321316, 280363, 141101, 165678, 280375, 321336, 296767, 345921, 280388, 304968, 280393, 280402, 313176, 42842, 280419, 321381, 296812, 313201, 1920, 255873, 305028, 280454, 247688, 280458, 280464, 124817, 280468, 280473, 124827, 214940, 247709, 214944, 280487, 313258, 321458, 296883, 124853, 214966, 10170, 296890, 288700, 296894, 280515, 190403, 296900, 337862, 165831, 280521, 231379, 296921, 239586, 313320, 231404, 124913, 165876, 321528, 239612, 313340, 288764, 239617, 313347, 288773, 313358, 321560, 305176, 313371, 354338, 305191, 223273, 313386, 354348, 124978, 215090, 124980, 288824, 288826, 321595, 313406, 288831, 288836, 67654, 223303, 280651, 354382, 288848, 280658, 215123, 354390, 288855, 288859, 280669, 313438, 280671, 223327, 149599, 321634, 149601, 149603, 329830, 280681, 313451, 223341, 280687, 313458, 280691, 215154, 313464, 329850, 321659, 280702, 288895, 321670, 215175, 141446, 141455, 141459, 280725, 313498, 100520, 288936, 280747, 288940, 280755, 288947, 321717, 280759, 280764, 280769, 280771, 280774, 280776, 313548, 321740, 280783, 280786, 280788, 313557, 280793, 280796, 280798, 338147, 280804, 280807, 157930, 280811, 280817, 125171, 157940, 280819, 280823, 280825, 280827, 280830, 280831, 280833, 125187, 280835, 125191, 125207, 125209, 321817, 125218, 321842, 223539, 125239, 280888, 280891, 289087, 280897, 280900, 239944, 305480, 280906, 239947, 305485, 305489, 379218, 280919, 354653, 313700, 280937, 280940, 190832, 280946, 223606, 313720, 280956, 239997, 280959, 313731, 199051, 240011, 289166, 240017, 190868, 297365, 297368, 297372, 141725, 297377, 289186, 297391, 289201, 240052, 289207, 305594, 289210, 281024, 289218, 289221, 289227, 281045, 281047, 215526, 166378, 305647, 281075, 174580, 281084, 240124, 305662, 305664, 240129, 305666, 305668, 240132, 223749, 281095, 338440, 150025, 223752, 223757, 281102, 223763, 223765, 281113, 322074, 281116, 281121, 182819, 281127, 281135, 150066, 158262, 158266, 289342, 281154, 322115, 158283, 281163, 281179, 199262, 338528, 338532, 281190, 199273, 281196, 158317, 19053, 313973, 281210, 297594, 158347, 133776, 314003, 117398, 314007, 289436, 174754, 330404, 289448, 133801, 174764, 314029, 314033, 240309, 133817, 314045, 314047, 314051, 199364, 297671, 199367, 158409, 289493, 363234, 289513, 289522, 289525, 289532, 322303, 289537, 322310, 264969, 322314, 322318, 281361, 281372, 322341, 215850, 281388, 207661, 289593, 281401, 289601, 281410, 281413, 281414, 240458, 281420, 240468, 281430, 322393, 297818, 281435, 281438, 281442, 174955, 224110, 207733, 207737, 183172, 158596, 240519, 322440, 338823, 314249, 289687, 240535, 297883, 289694, 289696, 289700, 281529, 289724, 52163, 183260, 281567, 289762, 322534, 297961, 183277, 281581, 322550, 134142, 322563, 175134, 322599, 322610, 314421, 281654, 314427, 207937, 314433, 314441, 207949, 322642, 314456, 281691, 314461, 281702, 281704, 314474, 281708, 281711, 289912, 248995, 306341, 306344, 306347, 306354, 142531, 199877, 289991, 306377, 289997, 249045, 363742, 363745, 298216, 330988, 126190, 216303, 322801, 257302, 363802, 199976, 199978, 314671, 298292, 298294, 257334, 298306, 380226, 224584, 224587, 224594, 216404, 306517, 150870, 314714, 224603, 159068, 265568, 314723, 281960, 150890, 306539, 314732, 314736, 290161, 216436, 306549, 298358, 314743, 306552, 290171, 314747, 306555, 290174, 298365, 224641, 281987, 298372, 265604, 281990, 298377, 314763, 142733, 298381, 224657, 306581, 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, 191992, 290298, 151036, 290302, 282111, 290305, 175621, 192008, 323084, 257550, 282127, 290321, 282130, 323090, 282133, 290325, 241175, 290328, 282137, 290332, 241181, 282142, 282144, 290344, 306731, 290349, 290351, 290356, 282186, 224849, 282195, 282199, 282201, 306778, 159324, 159330, 314979, 323176, 224875, 241260, 323181, 257658, 315016, 282249, 290445, 324757, 282261, 298651, 282269, 323229, 298655, 323231, 61092, 282277, 306856, 282295, 282300, 323260, 323266, 282310, 323273, 282319, 306897, 241362, 282328, 298714, 52959, 216801, 282337, 241380, 216806, 323304, 282345, 12011, 282356, 323318, 282364, 282367, 306945, 241412, 323333, 282376, 216842, 323345, 282388, 323349, 282392, 184090, 315167, 315169, 282402, 315174, 323367, 241448, 315176, 241450, 282410, 306988, 306991, 315184, 323376, 315190, 241464, 159545, 282425, 307009, 241475, 307012, 148946, 315211, 282446, 307027, 315221, 282454, 315223, 241496, 323414, 241498, 307035, 307040, 282465, 110433, 241509, 110438, 298860, 110445, 282478, 282481, 110450, 315251, 315249, 315253, 315255, 339838, 282499, 315267, 315269, 241544, 282505, 241546, 241548, 298896, 282514, 298898, 44948, 298901, 241556, 282520, 241560, 241563, 241565, 241567, 241569, 282531, 241574, 282537, 298922, 36779, 241581, 282542, 241583, 323504, 241586, 282547, 241588, 290739, 241590, 241592, 241598, 290751, 241600, 241605, 151495, 241610, 298975, 241632, 298984, 241640, 241643, 298988, 241646, 241649, 241652, 323574, 290807, 241661, 299006, 282623, 315396, 241669, 315397, 282632, 282639, 290835, 282645, 241693, 282654, 241701, 102438, 217127, 282669, 323630, 282681, 290877, 282687, 159811, 315463, 315466, 192589, 307278, 192596, 176213, 307287, 315482, 217179, 315483, 192605, 233567, 200801, 299105, 217188, 299109, 307303, 315495, 356457, 45163, 307307, 315502, 192624, 307314, 323700, 299126, 233591, 299136, 307329, 307338, 233613, 241813, 307352, 299164, 184479, 299167, 184481, 315557, 184486, 307370, 307372, 184492, 307374, 307376, 323763, 176311, 299191, 307385, 307386, 258235, 176316, 307388, 307390, 184503, 299200, 184512, 307394, 307396, 299204, 184518, 307399, 323784, 307409, 307411, 176343, 299225, 233701, 307432, 184572, 282881, 184579, 282893, 291089, 282906, 291104, 233766, 282931, 307508, 315701, 307510, 332086, 151864, 307512, 176435, 307515, 168245, 282942, 307518, 151874, 282947, 323917, 110926, 282957, 233808, 323921, 315733, 323926, 233815, 315739, 323932, 299357, 242018, 242024, 299373, 315757, 250231, 242043, 315771, 299388, 291202, 299398, 242057, 291212, 299405, 291222, 283033, 291226, 242075, 315801, 291231, 61855, 283042, 291238, 291241, 127403, 127405, 291247, 127407, 299444, 127413, 283062, 291254, 127417, 291260, 283069, 127421, 127424, 299457, 127429, 283080, 176592, 315856, 315860, 176597, 283095, 127447, 299481, 176605, 242143, 291299, 127463, 242152, 291305, 176620, 127474, 291314, 291317, 135672, 233979, 291323, 291330, 283142, 127497, 233994, 135689, 291341, 233998, 234003, 234006, 152087, 127511, 283161, 242202, 234010, 135707, 242206, 135710, 242208, 291361, 242220, 291378, 234038, 152118, 234041, 70213, 242250, 111193, 242275, 299620, 242279, 168562, 184952, 135805, 291456, 135808, 373383, 299655, 316051, 225941, 316054, 299672, 135834, 373404, 299677, 225948, 135839, 299680, 225954, 299684, 242343, 209576, 242345, 373421, 135870, 135873, 135876, 135879, 299720, 299723, 225998, 299726, 226002, 226005, 119509, 226008, 242396, 299740, 201444, 299750, 283368, 234219, 283372, 381677, 226037, 283382, 234231, 316151, 234236, 226045, 234239, 242431, 209665, 234242, 299778, 242436, 226053, 234246, 226056, 234248, 291593, 242443, 234252, 242445, 234254, 291601, 234258, 242450, 242452, 234261, 201496, 234264, 234266, 283421, 234269, 234272, 234274, 152355, 234278, 299814, 283432, 234281, 234284, 234287, 283440, 185138, 242483, 234292, 234296, 234298, 283452, 160572, 234302, 234307, 242499, 234309, 234313, 316233, 316235, 234316, 283468, 242511, 234319, 234321, 234324, 185173, 201557, 234329, 234333, 308063, 234336, 234338, 242530, 349027, 234341, 234344, 234347, 177004, 234350, 324464, 234353, 152435, 177011, 234356, 234358, 234362, 226171, 234364, 291711, 234368, 234370, 201603, 291714, 234373, 226182, 234375, 291716, 226185, 308105, 234379, 234384, 234388, 234390, 226200, 324504, 234393, 209818, 308123, 324508, 234398, 234396, 291742, 234401, 291748, 234405, 291750, 234407, 324518, 324520, 234410, 324522, 226220, 291756, 234414, 324527, 291760, 234417, 201650, 324531, 234422, 226230, 275384, 324536, 234428, 291773, 234431, 242623, 324544, 324546, 226239, 324548, 226245, 234437, 234439, 234434, 234443, 291788, 193486, 234446, 193488, 275406, 234449, 316370, 234452, 234455, 234459, 234461, 234464, 234467, 234470, 168935, 5096, 324585, 234475, 234478, 316400, 234481, 316403, 234484, 234485, 324599, 234487, 234490, 234493, 234496, 316416, 234501, 275462, 308231, 234504, 234507, 234510, 234515, 300054, 234519, 316439, 234520, 234523, 234526, 234528, 300066, 234532, 234535, 234537, 234540, 144430, 234543, 234546, 275508, 234549, 300085, 300088, 234553, 234556, 234558, 316479, 234561, 316483, 234563, 234568, 234570, 316491, 300108, 234572, 234574, 300115, 234580, 234581, 242777, 234585, 275545, 234590, 234593, 234595, 300133, 234597, 234601, 300139, 234605, 160879, 234607, 275569, 234610, 300148, 234614, 398455, 144506, 234618, 275579, 234620, 234623, 226433, 234627, 275588, 234629, 242822, 234634, 234636, 177293, 234640, 275602, 234643, 226453, 275606, 234647, 275608, 308373, 234650, 234648, 308379, 283805, 234653, 324766, 119967, 234657, 300189, 324768, 242852, 283813, 234661, 300197, 234664, 275626, 234667, 316596, 234687, 316610, 300226, 226500, 234692, 300229, 308420, 283844, 283850, 300234, 300238, 300241, 316625, 300243, 300245, 316630, 300248, 300253, 300256, 300258, 300260, 234726, 300263, 300265, 161003, 300267, 300270, 300272, 120053, 300278, 316663, 275703, 300284, 275710, 300287, 283904, 300289, 292097, 300292, 300294, 275719, 300299, 177419, 283917, 300301, 242957, 177424, 275725, 349464, 283939, 259367, 283951, 292143, 300344, 226617, 243003, 283963, 226628, 283973, 300357, 177482, 283983, 316758, 357722, 316766, 292192, 316768, 218464, 292197, 316774, 243046, 218473, 284010, 136562, 275834, 333178, 275836, 275840, 316803, 316806, 226696, 316811, 226699, 226703, 300433, 234899, 226709, 357783, 316824, 316826, 144796, 300448, 144807, 144810, 144812, 284076, 144814, 144820, 284084, 284087, 292279, 144826, 144828, 144830, 144832, 284099, 144835, 144837, 38342, 144839, 144841, 144844, 144847, 144852, 144855, 103899, 300507, 333280, 226787, 218597, 292329, 300523, 259565, 259567, 300527, 226802, 316917, 308727, 292343, 300537, 316947, 308757, 308762, 284191, 284194, 284196, 235045, 284199, 284204, 284206, 284209, 284211, 284213, 194101, 284215, 194103, 284218, 226877, 284223, 284226, 243268, 292421, 226886, 284231, 128584, 284228, 284234, 366155, 276043, 317004, 284238, 226895, 284241, 194130, 284243, 276052, 284245, 276053, 284247, 317015, 284249, 243290, 284251, 300628, 284253, 235097, 284255, 243293, 300638, 284258, 292452, 177766, 284263, 292454, 284265, 292458, 284267, 292461, 284272, 284274, 276086, 284278, 292470, 292473, 284283, 276093, 284286, 276095, 284288, 292481, 284290, 325250, 284292, 276098, 292479, 292485, 284297, 317066, 284299, 317068, 276109, 284301, 284303, 276114, 284306, 284308, 284312, 284314, 284316, 276127, 284320, 284322, 284327, 276137, 284329, 284331, 317098, 284333, 284335, 284337, 284339, 300726, 284343, 284346, 284350, 276160, 358080, 284354, 358083, 276166, 284358, 358089, 276170, 284362, 276175, 284368, 276177, 284370, 317138, 284372, 358098, 284377, 276187, 284379, 284381, 284384, 284386, 358114, 358116, 276197, 358119, 284392, 325353, 284394, 358122, 284397, 276206, 284399, 358126, 358128, 358133, 358135, 276216, 358138, 300795, 358140, 284413, 358142, 284418, 358146, 317187, 317189, 317191, 284428, 300816, 300819, 317207, 284440, 186139, 300828, 300830, 276255, 325408, 284449, 300834, 300832, 317221, 227109, 358183, 186151, 276268, 194351, 243504, 284469, 276280, 325436, 358206, 276291, 366406, 276295, 300872, 153417, 284499, 276308, 284502, 317271, 178006, 276315, 292700, 284511, 227175, 292715, 284529, 292721, 300915, 284533, 292729, 317306, 284540, 292734, 325512, 169868, 276365, 284564, 358292, 284566, 350106, 284572, 276386, 284579, 276388, 358312, 284585, 317353, 276395, 292776, 276402, 358326, 161718, 276410, 276411, 358330, 276418, 276425, 301009, 301011, 301013, 292823, 301015, 301017, 358360, 292828, 276446, 153568, 276448, 276452, 276455, 292839, 292843, 276460, 276464, 276466, 227314, 276472, 325624, 317435, 276476, 276479, 276482, 276485, 317446, 276490, 292876, 276496, 317456, 317458, 243733, 243740, 317468, 317472, 325666, 243751, 292904, 276528, 243762, 309298, 325685, 325689, 235579, 276539, 235581, 325692, 178238, 276544, 284739, 243785, 276553, 350293, 350295, 194649, 227418, 309337, 194654, 227423, 350302, 178273, 227426, 194657, 194660, 276579, 227430, 276583, 309346, 309348, 309350, 309352, 309354, 350308, 276590, 350313, 227440, 350316, 284786, 350321, 276595, 301167, 350325, 350328, 292985, 301178, 292989, 292993, 301185, 350339, 317573, 350342, 227463, 350345, 350349, 301199, 317584, 325777, 350354, 350357, 350359, 350362, 276638, 350366, 284837, 153765, 350375, 350379, 350381, 350383, 350385, 350387, 350389, 350395, 350397, 350399, 227520, 350402, 227522, 301252, 350406, 227529, 309450, 301258, 276685, 276689, 309462, 301272, 276699, 309468, 194780, 301283, 317672, 276713, 317674, 243948, 194801, 227571, 276725, 309494, 243960, 227583, 276735, 227587, 276739, 211204, 276742, 227593, 227596, 325910, 309530, 342298, 276766, 211232, 276775, 211241, 325937, 276789, 325943, 260421, 276809, 285002, 276811, 235853, 276816, 235858, 276829, 276833, 391523, 276836, 276843, 293227, 276848, 293232, 186744, 285051, 211324, 227709, 285061, 317833, 178572, 285070, 285077, 178583, 227738, 317853, 276896, 317858, 342434, 285093, 317864, 285098, 276907, 276917, 293304, 293307, 293314, 309707, 293325, 317910, 293336, 235996, 317917, 293343, 358880, 276961, 227810, 293346, 276964, 293352, 236013, 293364, 317951, 309764, 121352, 236043, 317963, 342541, 55822, 113167, 317971, 309779, 309781, 55837, 227877, 227879, 293417, 227882, 309804, 293421, 105007, 236082, 285236, 23094, 277054, 244288, 129603, 318020, 301636, 301639, 301643, 277071, 285265, 309844, 277080, 309849, 285277, 285282, 326244, 277100, 121458, 277106, 170618, 170619, 309885, 309888, 277122, 227975, 285320, 277128, 301706, 318092, 326285, 318094, 334476, 277136, 277139, 227992, 285340, 318108, 227998, 318110, 383658, 285357, 318128, 277170, 342707, 154292, 277173, 293555, 285368, 277177, 277181, 318144, 277187, 277191, 277194, 277196, 277201, 137946, 113378, 203491, 228069, 277223, 342760, 285417, 56041, 56043, 277232, 228081, 56059, 310015, 285441, 310020, 285448, 310029, 228113, 285459, 277273, 326430, 228128, 228135, 318248, 277291, 293677, 318253, 285489, 293685, 285494, 301880, 285499, 301884, 310080, 293696, 277317, 277322, 277329, 162643, 310100, 301911, 301913, 277337, 301921, 400236, 236397, 162671, 326514, 310134, 277368, 15224, 236408, 416639, 416640, 113538, 310147, 416648, 39817, 187274, 277385, 301972, 424853, 277405, 277411, 310179, 293798, 293802, 236460, 277426, 293811, 293817, 293820, 203715, 326603, 276586, 293849, 293861, 228327, 228328, 228330, 318442, 228332, 277486, 326638, 318450, 293876, 293877, 285686, 302073, 285690, 244731, 121850, 302075, 293882, 293887, 277504, 277507, 277511, 277519, 293908, 293917, 293939, 318516, 277561, 277564, 310336, 7232, 293956, 277573, 228422, 310344, 277577, 293960, 277583, 203857, 310355, 293971, 310359, 236632, 277594, 138332, 277598, 285792, 277601, 203872, 310374, 203879, 310376, 228460, 318573, 203886, 187509, 285815, 285817, 367737, 285821, 302205, 285824, 392326, 285831, 302218, 285835, 294026, 384148, 162964, 187542, 302231, 302233, 285852, 302237, 285854, 285856, 285862, 277671, 302248, 64682, 277678, 228526, 294063, 294065, 302258, 277687, 294072, 318651, 277695, 318657, 244930, 302275, 302277, 228550, 302282, 310476, 302285, 302288, 310481, 302290, 203987, 302292, 302294, 302296, 384222, 310498, 285927, 318698, 302315, 195822, 228592, 294132, 138485, 204023, 228601, 204026, 228606, 204031, 64768, 310531, 285958, 228617, 138505, 318742, 204067, 277798, 130345, 277801, 113964, 285997, 277804, 285999, 277807, 113969, 277811, 318773, 318776, 277816, 286010, 277819, 294204, 417086, 277822, 286016, 294211, 302403, 277832, 277836, 294221, 326991, 294223, 277839, 277842, 277847, 277850, 179547, 277853, 146784, 277857, 302436, 277860, 294246, 327015, 310632, 327017, 351594, 277864, 277869, 277872, 351607, 310648, 277880, 310651, 277884, 277888, 310657, 351619, 294276, 310659, 277892, 277894, 253320, 310665, 318858, 277898, 327046, 277903, 310672, 351633, 277905, 277908, 277917, 310689, 277921, 277923, 130468, 228776, 277928, 277932, 310703, 277937, 310710, 130486, 310712, 277944, 310715, 277947, 302526, 228799, 277950, 277953, 64966, 245191, 163272, 302534, 310727, 277959, 292968, 277963, 277966, 302543, 310737, 277971, 277975, 286169, 228825, 163290, 277978, 310749, 277981, 277984, 310755, 277989, 277991, 187880, 277995, 310764, 286188, 278000, 278003, 310772, 228851, 278006, 40440, 278009, 212472, 40443, 286203, 40448, 228864, 286214, 228871, 302603, 65038, 302614, 286233, 302617, 302621, 286240, 146977, 187939, 294435, 40484, 286246, 294439, 286248, 278057, 294440, 294443, 40486, 294445, 40488, 310831, 40491, 212538, 40507, 40511, 40513, 228933, 40521, 286283, 40525, 40527, 212560, 228944, 400976, 40533, 147032, 40537, 40539, 278109, 40541, 40544, 40548, 40550, 286312, 286313, 40554, 40552, 310892, 40557, 40560, 188022, 122488, 294521, 343679, 310925, 286354, 278163, 302740, 278168, 327333, 229030, 212648, 278188, 302764, 278192, 319153, 278196, 302781, 319171, 302789, 294599, 278216, 294601, 343757, 212690, 278227, 286420, 319187, 229076, 286425, 319194, 278235, 301163, 229086, 278238, 286432, 294625, 294634, 302838, 319226, 286460, 171774, 278274, 302852, 278277, 302854, 294664, 311048, 319243, 311053, 302862, 294682, 278306, 294701, 278320, 319280, 319290, 229192, 302925, 237409, 360317, 327554, 40840, 40851, 294803, 188312, 294811, 319390, 294817, 319394, 40865, 294821, 311209, 180142, 188340, 40886, 319419, 294844, 294847, 393177, 294876, 294879, 294883, 294890, 311279, 278513, 237555, 278516, 311283, 278519, 237562 ]
027a7be1ac36d77a0f9b26980699e0cd3b1349a7
301b230e7cc070741bfc5d8ecf2d73a251c2b066
/Notes_iOS/Notes/noteTableViewController.swift
f01615f0c209c397ff77f936c5f9b15b2e18fe49
[]
no_license
billvunguyen/App_note_iOS
752cbdf8a0bc7fb0d4f7e9ee5f77e79b87547b4d
5fb377289b7af547df85b284afabbfc7e8fd350e
refs/heads/master
2023-07-19T15:04:02.268670
2021-09-29T14:34:46
2021-09-29T14:34:46
411,709,675
0
0
null
null
null
null
UTF-8
Swift
false
false
4,659
swift
// // noteCalculationViewController.swift // Notes // // Created by Bill on 11/18/20. // Copyright © 2020 Apple Developer. All rights reserved. // import UIKit import CoreData class noteTableViewController: UITableViewController { var notes = [Note]() var managedObjectContext: NSManagedObjectContext? { return (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext } @IBAction func refreshControlValueChanged(_ sender: UIRefreshControl) { retrieveNotes() sender.endRefreshing() } override func viewDidLoad() { super.viewDidLoad() retrieveNotes() // Styles self.tableView.backgroundColor = UIColor(red: 242.0/255.0, green: 242.0/255.0, blue: 242.0/255.0, alpha: 1.0) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(true) retrieveNotes() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return notes.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "noteTableViewCell", for: indexPath) as! noteTableViewCell let note: Note = notes[indexPath.row] cell.configureCell(note: note) cell.backgroundColor = UIColor.clear return cell } override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { return true } override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { } tableView.reloadData() } override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? { let delete = UITableViewRowAction(style: .destructive, title: "") { (action, indexPath) in let note = self.notes[indexPath.row] context.delete(note) (UIApplication.shared.delegate as! AppDelegate).saveContext() do { self.notes = try context.fetch(Note.fetchRequest()) } catch { print("Failed to delete note.") } tableView.deleteRows(at: [indexPath], with: .fade) tableView.reloadData() } delete.title = "Delete" return [delete] } // MARK: NSCoding func retrieveNotes() { managedObjectContext?.perform { self.fetchNotesFromCoreData { (notes) in if let notes = notes { self.notes = notes self.tableView.reloadData() } } } } func fetchNotesFromCoreData(completion: @escaping ([Note]?)->Void){ managedObjectContext?.perform { var notes = [Note]() let request: NSFetchRequest<Note> = Note.fetchRequest() do { notes = try self.managedObjectContext!.fetch(request) completion(notes) } catch { print("Could not fetch notes from CoreData:\(error.localizedDescription)") } } } // MARK: - Navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "showDetails" { if let indexPath = self.tableView.indexPathForSelectedRow { let noteDetailsViewController = segue.destination as! noteViewController let selectedNote: Note = notes[indexPath.row] noteDetailsViewController.indexPath = indexPath.row noteDetailsViewController.isExsisting = false noteDetailsViewController.note = selectedNote } } else if segue.identifier == "addItem" { print("User added a new note.") } } }
[ -1 ]
c231a275102f285ef74985b31d288a0d38e5258e
df6e5fc58bc997379fdc214f97c3ac54fa1bdec0
/AssessmentTask/MockRemote/MockDataSource.swift
0bd209729013499544ff5a5f24e40108ce66abe2
[]
no_license
umab6666/Assessment_Task
e56a5d67e7f06a55052bbff54e0121b5071cfeed
94250bedea47d8b8a413a3c677ff628fc6a643f5
refs/heads/master
2020-04-22T10:19:59.079068
2019-02-12T16:42:58
2019-02-12T16:42:58
170,301,481
0
0
null
null
null
null
UTF-8
Swift
false
false
526
swift
// // MockDataSource.swift // AssessmentTask // // Created by Uma B on 12/02/19. // Copyright © 2019 Uma B. All rights reserved. // import UIKit class MockDataSource: RemoteDataSourceProtocol { var responseForSuccess = true func getAllCategories(successHandler: @escaping ([Category], String) -> Void, failureHandler: @escaping (String?) -> Void) { if responseForSuccess { successHandler([Category](),"Title") }else { failureHandler("failed") } } }
[ -1 ]
7a2a92b8b7ecdbbde36fa97a066facba2910cbaf
9d267ebfcdc581d35374e1b3278972e9034e3084
/crashes/117-swift-declrefexpr-setgenericargs.swift
c992dd8b5728f0313476b67dc87505e3f6ec4693
[ "MIT" ]
permissive
juliaPetryshena/swift-compiler-crashes
23dc1c5bb10833eb15afd9fdc1c20217ed7dcb51
372435ae191b86cb91ef6980e8b5fa5e4b7d8993
refs/heads/master
2020-05-29T12:28:18.040213
2014-09-24T07:43:50
2014-09-24T07:43:50
null
0
0
null
null
null
null
UTF-8
Swift
false
false
952
swift
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing func a(b: Int = 0) { } le typealias E } struct B<T : A> { let h: T let i: T.E } protocol C { typealias F func g<T where T.E == F>(f: B<T>) } struct D : C { typealias F = Int func g<T where T.E == F>(f: B<T>) { } } protocol A { func c() -> String } class B { func d() -> String { return "" } } class C: B, A { override func d() -> String { return "" } func c() -> String { return "" } } func e<T where T: A, T: B>(t: T) { t.c() } b protocol c : b { func b func prefix(with: = { (x: Int, f: Int -> Int) -> Int in return f(x) }(x1, f1) let crashes: Int = { x, f in return f(x) }(x1, f1) func f() { ({}) } protocol A { typealias B } class C<D> [Int?] = [nil, 4, nil] println(some(xs))
[ -1 ]
149182ef06bcf5faf94ed3875fcccc013fe1b587
2f8de293965aac157feaeb31994dc0e6304ab3c2
/Taximeter360/NumberFormatter.swift
a327aa6b2ee59bf6769451830ac0b99c90382a55
[]
no_license
Badzyo/Taximeter360
eb0a583478c79de8172271033a2bba5da609d2af
ff63bd5131d4907d151504b61b1e4b72ff5c4e38
refs/heads/master
2021-01-23T05:34:58.568703
2015-08-21T08:50:41
2015-08-21T08:50:41
40,903,046
0
0
null
null
null
null
UTF-8
Swift
false
false
615
swift
// // NuberFormatter.swift // Taximeter360 // // Created by Denys Badzo on 02.08.15. // Copyright (c) 2015 Denys Badzo. All rights reserved. // import Foundation class DoubleFormatter: NSNumberFormatter { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } override init() { super.init() self.locale = NSLocale.currentLocale() self.maximumFractionDigits = 2 self.roundingMode = .RoundHalfUp self.groupingSeparator = " " self.numberStyle = .DecimalStyle } static let sharedInstance = DoubleFormatter() }
[ -1 ]
ddacca5ce41ded22f7f9c886a653801bc85b2795
32983387a997e8bc47fd46707d4cb8f1e4b864f5
/TapcartWeather/AppDelegate.swift
124accda2c8e7b9fc1f3280a11d5e71703515ba9
[]
no_license
llarrynguyen/TapWeatherApp
b3d9481787d530fe6c8a8423beb42634bfb9a195
9c57cce0ac4015be6fd7353579f57793e468940f
refs/heads/master
2022-03-17T21:14:41.690623
2019-11-29T21:02:53
2019-11-29T21:02:53
224,921,680
0
0
null
null
null
null
UTF-8
Swift
false
false
503
swift
// // AppDelegate.swift // TapcartWeather // // Created by Justin Hall on 1/30/19. // Copyright © 2019 jhall. 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 } }
[ 103936, 314370, 339203, 402946, 399243, 399115, 241551, 326801, 326418, 317202, 254846, 190873, 111260, 245023, 302624, 340648, 249004, 326962, 241596, 299452, 241602, 315207, 310217, 257610, 329165, 398930, 334300, 333544, 399083, 302448, 313470 ]
ac0f23f591cbd10103c25c7ae481c3dd9f50a95f
84abf0adca40e7d7f6c60c1045d7fac8b0cf6cc2
/MeMe/MeMe/Controllers/TabViewController.swift
9463ec4e6afd9abc404d41af8819f1cc058c0faa
[ "Apache-2.0" ]
permissive
drewdearing/MeMe-iOS
28c3a0801908708a8535c739002dea79ef4508be
6dec97b86297a84dabc673cca3147455a848bd97
refs/heads/master
2023-02-13T06:45:36.513554
2019-05-08T18:53:04
2019-05-08T18:53:04
332,067,441
0
0
null
null
null
null
UTF-8
Swift
false
false
321
swift
// // TabViewController.swift // MeMe // // Created by Drew Dearing on 4/3/19. // Copyright © 2019 meme. All rights reserved. // import UIKit class TabViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } func update(){ //override me } }
[ -1 ]
737144731b0b954010404f9c3078476ba7f32d27
1a990d08971f19bc468387375935b380d89ec4d1
/test/Serialization/basic_sil.swift
009d95471f18b05fa6c847b25e330da5d2b87d8c
[ "Apache-2.0", "Swift-exception" ]
permissive
mcstrassell09/swift
7332b4ea1fbc86dddb4d6176e379161cd6fe5979
f125d120bfe6c080d064e1682b7bb358ca6c0bab
refs/heads/master
2022-04-19T07:20:41.242426
2020-04-16T15:40:47
2020-04-16T15:40:47
256,269,981
2
0
Apache-2.0
2020-04-16T16:27:49
2020-04-16T16:27:48
null
UTF-8
Swift
false
false
776
swift
// RUN: %empty-directory(%t) // RUN: %target-build-swift -Xllvm -sil-disable-pass=MandatoryCombine -emit-module -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -Xfrontend -enable-objc-interop -o %t/def_basic.swiftmodule %S/Inputs/def_basic.sil // RUN: llvm-bcanalyzer %t/def_basic.swiftmodule | %FileCheck %s // RUN: %target-build-swift -emit-sil -I %t %s -o %t/basic_sil.sil // RUN: %target-sil-opt -I %t %t/basic_sil.sil -performance-linker | %FileCheck %S/Inputs/def_basic.sil // This test currently is written such that no optimizations are assumed. // REQUIRES: swift_test_mode_optimize_none // CHECK-NOT: UnknownCode // Inputs/def_basic.sil is based on basic.sil under test/SIL/Parser. import def_basic func test_all() { serialize_all() }
[ 81358 ]
8283b024d083940deb2a7fb6db265b109a101f21
a654918aea210f9fd399d28bb031be571b47d02f
/Shimmer-main/Shimmer/SceneDelegate.swift
43d227bf72e24152109090a7cb94bb8b4f97ca8d
[]
no_license
Satriauno/Shimmer
433400a6d6e48d7b74df26eaee79abb1498498b6
c4e1b499fd2e92f91ecf236f8cdb3b2a66b12462
refs/heads/main
2023-06-25T17:36:24.346844
2021-07-28T14:05:17
2021-07-28T14:05:17
390,371,921
0
0
null
null
null
null
UTF-8
Swift
false
false
2,489
swift
import UIKit import SwiftUI 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). // Create the SwiftUI view that provides the window contents. let contentView = ContentView() // Use a UIHostingController as window root view controller. if let windowScene = scene as? UIWindowScene { let window = UIWindow(windowScene: windowScene) window.rootViewController = UIHostingController(rootView: contentView) self.window = window window.makeKeyAndVisible() } } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } }
[ 393221, 393228, 393231, 393251, 352294, 344103, 393260, 163892, 393269, 213049, 385082, 376890, 16444, 393277, 254020, 376906, 327757, 254032, 286804, 368728, 180314, 254045, 368736, 376932, 286833, 368753, 286845, 286851, 262284, 360598, 286880, 286889, 377003, 377013, 164029, 327872, 377030, 377037, 180432, 368854, 377047, 377063, 205037, 393457, 393461, 336124, 418044, 336129, 385281, 262405, 180491, 262417, 368913, 262423, 377121, 262437, 254253, 336181, 262455, 262473, 344404, 418135, 262497, 418145, 262501, 213354, 262508, 262512, 213374, 385420, 393613, 262551, 262553, 385444, 262567, 385452, 262574, 393649, 385460, 262587, 262593, 336326, 360917, 369119, 328178, 328180, 328183, 328190, 254463, 328193, 164362, 328207, 410129, 393748, 262679, 377372, 188959, 385571, 377384, 33322, 352822, 270905, 197178, 418364, 369224, 385610, 270922, 352844, 385617, 352865, 262761, 352875, 344694, 352888, 377473, 336513, 336517, 385671, 213642, 148106, 352919, 344745, 271018, 361130, 385714, 434868, 164535, 336568, 164539, 328379, 328387, 344777, 418508, 385743, 385749, 139998, 189154, 369382, 418540, 361196, 418555, 344832, 344837, 344843, 328462, 361231, 394002, 418581, 418586, 434971, 369436, 418591, 369439, 262943, 418594, 336676, 418600, 336681, 418606, 328498, 369464, 361274, 328516, 328520, 361289, 328523, 213848, 361307, 197469, 254813, 361310, 361318, 344936, 361323, 361335, 369544, 361361, 222129, 345036, 386004, 345046, 386012, 386019, 386023, 435188, 418822, 328710, 328715, 377867, 361490, 386070, 336922, 345119, 345134, 361525, 386102, 361537, 377931, 197708, 345172, 189525, 156762, 402523, 361568, 148580, 345200, 361591, 386168, 410746, 361599, 214150, 345224, 386187, 337048, 345247, 361645, 337072, 337076, 345268, 402615, 361657, 337093, 402636, 165086, 66783, 328933, 222438, 386286, 328942, 386292, 206084, 115973, 345377, 345380, 353572, 345383, 263464, 337207, 378170, 369979, 386366, 337224, 337230, 337235, 353634, 197987, 337252, 402792, 345449, 99692, 271731, 378232, 337278, 271746, 181639, 181644, 361869, 181650, 230810, 263585, 181671, 181674, 181679, 337330, 181682, 181687, 370105, 181691, 181697, 361922, 337350, 181717, 271841, 329192, 116211, 402943, 337416, 329227, 419341, 419345, 329234, 419351, 419357, 345631, 370208, 419360, 394787, 419363, 370214, 419369, 419377, 419386, 206397, 214594, 419401, 353868, 419408, 214611, 419412, 403040, 345702, 222831, 370298, 353920, 403073, 403076, 345737, 198282, 403085, 345750, 419484, 345758, 419492, 345766, 419498, 419502, 370351, 419507, 337588, 419510, 419513, 337601, 403139, 337607, 419528, 419531, 272083, 419543, 394967, 419545, 345819, 419548, 181982, 419551, 345829, 419560, 419564, 337647, 370416, 141052, 337661, 337671, 362249, 362252, 395022, 362256, 321300, 116512, 345888, 362274, 378664, 354107, 345916, 354112, 247618, 329545, 354124, 345932, 370510, 337743, 354132, 247639, 370520, 337751, 313181, 354143, 345965, 354157, 345968, 345971, 345975, 403321, 354173, 247692, 337809, 247701, 337814, 329625, 436133, 362414, 337845, 190393, 346059, 247760, 346064, 346069, 419810, 354275, 329699, 190440, 247790, 354314, 436290, 378956, 395340, 436307, 100454, 329853, 329857, 329868, 411806, 346273, 362661, 379067, 387261, 346317, 411862, 411865, 411869, 411874, 379108, 411877, 387303, 395496, 338154, 387307, 346350, 387314, 436474, 321787, 379135, 411905, 411917, 43279, 379154, 395539, 387350, 387353, 338201, 182559, 395567, 248112, 264502, 362823, 436556, 190797, 321880, 362844, 379234, 182642, 354674, 420237, 379279, 354728, 338353, 338382, 272849, 338387, 248279, 256474, 182755, 338404, 330225, 248309, 199165, 199182, 199189, 420377, 191012, 330320, 199250, 346722, 248427, 191085, 346736, 338544, 191093, 346743, 330384, 346769, 150184, 363198, 223936, 355025, 273109, 355029, 264919, 183006, 338661, 338665, 264942, 330479, 363252, 338680, 207620, 191240, 338701, 338712, 363294, 199455, 396067, 346917, 396070, 215854, 355123, 355141, 355144, 338764, 355151, 330581, 387929, 330585, 355167, 265056, 355176, 355180, 355185, 330612, 330643, 412600, 207809, 379849, 347082, 396246, 330711, 248794, 248799, 437219, 338928, 257009, 265208, 330750, 265215, 199681, 158759, 396329, 347178, 404526, 396337, 396340, 339002, 388155, 339010, 347208, 412765, 339037, 257121, 322660, 265321, 248952, 420985, 330886, 248986, 44199, 380071, 339118, 249015, 339133, 322763, 388320, 363757, 388348, 339199, 175376, 175397, 208167, 273709, 372016, 437553, 347442, 199989, 44343, 175416, 396601, 208189, 437567, 175425, 372035, 437571, 126279, 437576, 437584, 331089, 437588, 331094, 396634, 175451, 437596, 429408, 175458, 208228, 175461, 175464, 249210, 175484, 175487, 249215, 175491, 249219, 249228, 249235, 175514, 175517, 396706, 175523, 355749, 396723, 388543, 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, 413251, 265796, 265806, 224854, 224858, 257636, 224871, 372328, 257647, 372338, 339572, 224885, 224888, 224891, 224895, 372354, 421509, 126597, 339593, 224905, 159375, 11919, 339602, 126611, 224917, 126618, 208539, 224923, 224927, 224930, 224933, 257705, 224943, 257713, 224949, 257717, 257721, 224954, 257725, 224960, 257733, 224966, 224970, 257740, 339664, 224976, 257745, 257748, 224982, 257752, 224987, 257762, 224996, 225000, 339696, 225013, 257788, 225021, 257791, 225027, 257796, 257802, 257805, 225039, 257808, 225044, 167701, 372500, 257815, 225049, 257820, 225054, 184096, 257825, 225059, 339748, 257837, 413485, 225071, 225074, 257843, 372533, 225077, 257846, 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, 225138, 339827, 257909, 372598, 225142, 257914, 257917, 225150, 257922, 380803, 225156, 339845, 257927, 225166, 397201, 225171, 380823, 225176, 225183, 184245, 372698, 372704, 372707, 356336, 372739, 266298, 217158, 421961, 200786, 356440, 217180, 430181, 356467, 266365, 192640, 266375, 381069, 225425, 250003, 225430, 250008, 356507, 225439, 225442, 438434, 225445, 225448, 356521, 438441, 225451, 225456, 430257, 225459, 225462, 225468, 389309, 225472, 372931, 225476, 389322, 225485, 225488, 225491, 225494, 266454, 225497, 225500, 225503, 225506, 356580, 217319, 225511, 225515, 225519, 381177, 397572, 389381, 381212, 258333, 356638, 356641, 356644, 356647, 389417, 356650, 356656, 332081, 307507, 356662, 397623, 332091, 225599, 332098, 201030, 348489, 151884, 430422, 348503, 250201, 332126, 258399, 332130, 250211, 340328, 250217, 348523, 332153, 356734, 250239, 389503, 438657, 332158, 389507, 348548, 356741, 332175, 160152, 373146, 340380, 373149, 373169, 266688, 201158, 127473, 217590, 340473, 266757, 340512, 381483, 356908, 356917, 348734, 356935, 348745, 381513, 389724, 332381, 373344, 381546, 119432, 340628, 184983, 373399, 340639, 332455, 389806, 381626, 373450, 357070, 357074, 332512, 332521, 340724, 332534, 155647, 348926, 389927, 152371, 348979, 348983, 340792, 398141, 127815, 357202, 389971, 136024, 357208, 389979, 357212, 430940, 357215, 439138, 201580, 201583, 349041, 340850, 201589, 430967, 324473, 398202, 119675, 324476, 340859, 324479, 324482, 373635, 324485, 324488, 381834, 324493, 324496, 324499, 430996, 324502, 324511, 422817, 373672, 324525, 111539, 324534, 324539, 324542, 398280, 349129, 340940, 340942, 209874, 431073, 398307, 340964, 209896, 201712, 209904, 381947, 201724, 431100, 431107, 349203, 250915, 357411, 250917, 357419, 209980, 209996, 431180, 341072, 349268, 250968, 210011, 373853, 341094, 210026, 210032, 349296, 210037, 349309, 152704, 349313, 160896, 210053, 210056, 259217, 373905, 210068, 251045, 210108, 333003, 333010, 210132, 333016, 210144, 218355, 218361, 275709, 275713, 242947, 275717, 349460, 333079, 251161, 349486, 349492, 251190, 415034, 251211, 357710, 210261, 365912, 259423, 374113, 365922, 374118, 333164, 234867, 390518, 357756, 136591, 374161, 349591, 333222, 210357, 259516, 415168, 415187, 415192, 415194, 415197, 415208, 366057, 366064, 423424, 415258, 415264, 366118, 382503, 415271, 349739, 144940, 415279, 415282, 349748, 415286, 210488, 415291, 415295, 349762, 333387, 333396, 374359, 366173, 333415, 423529, 423533, 333423, 210547, 415354, 333440, 267910, 333472, 333499, 333512, 210632, 259789, 358100, 366301, 153311, 333535, 366308, 366312, 431852, 399086, 366319, 210673, 366322, 399092, 366326, 268042, 210700, 366349, 210707, 399129, 210720, 366384, 358192, 210740, 366388, 358201, 399166, 325441, 366403, 325447, 341831, 341835, 341839, 341844, 415574, 341852, 350046, 399200, 399208, 358256, 268144, 341877, 399222, 325494, 243584, 325505, 333699, 399244, 333725, 382891, 382898, 333767, 350153, 358348, 333777, 399318, 358372, 350194, 333819, 350204, 350207, 350214, 219144, 268299, 350225, 186388, 350241, 374819, 350245, 350249, 350252, 178221, 350272, 243782, 350281, 374865, 342113, 342134, 374904, 268435, 333989, 350411, 350417, 350423, 350426, 334047, 350449, 375027, 358645, 350459, 350462, 350465, 350469, 325895, 268553, 194829, 350477, 268560, 350481, 432406, 350487, 325915, 350491, 325918, 350494, 325920, 350500, 194854, 350505, 391469, 350510, 358701, 358714, 358717, 383307, 334162, 358738, 383331, 383334, 391531, 383342, 268669, 194942, 391564, 383375, 366991, 268702, 416159, 342431, 375209, 326059, 375220, 342453, 334263, 358857, 195041, 334306, 104940, 375279, 162289, 416255, 350724, 350740, 334359, 342551, 342555, 334364, 416294, 350762, 252463, 334386, 358962, 358973, 334397, 252483, 219719, 244309, 399957, 334425, 326240, 375401, 268922, 334466, 334469, 162446, 326291, 342680, 342685, 260767, 342711, 260798, 260802, 350918, 342737, 391895, 154329, 416476, 113389, 342769, 203508, 375541, 342777, 391938, 391949, 326417, 375569, 375572, 375575, 375580, 162592, 326444, 383794, 326452, 326455, 375613, 244542, 326463, 326468, 326474, 326479, 326486, 342875, 326494, 326503, 375657, 433001, 326508, 400238, 326511, 211832, 392061, 359296, 351105, 252801, 260993, 400260, 211846, 342921, 236432, 342931, 400279, 392092, 400286, 252838, 359335, 252846, 400307, 351169, 359362, 170950, 187335, 359367, 359383, 359389, 383968, 359411, 261109, 261112, 244728, 383999, 261130, 326669, 261148, 359452, 211999, 261155, 261160, 359471, 375868, 343132, 384099, 384102, 326764, 367724, 384108, 326767, 187503, 343155, 384115, 212095, 351366, 384144, 351382, 351399, 367795, 367801, 351424, 244934, 367817, 326858, 244938, 253132, 343246, 351450, 343272, 351467, 351480, 351483, 351492, 343307, 261391, 359695, 253202, 261395, 253218, 171304, 384299, 376111, 326970, 384324, 343366, 212296, 212304, 367966, 343394, 343399, 367981, 343410, 155000, 327035, 253321, 155021, 384398, 245143, 343453, 155045, 40358, 245163, 114093, 343478, 359867, 384444, 146878, 327112, 384457, 327116, 327118, 359887, 359891, 343509, 368093, 155103, 343535, 343540, 368120, 343545, 409092, 253445, 359948, 359951, 245295, 359984, 343610, 400977, 400982, 343650, 327276, 245358, 138865, 155255, 155274, 368289, 425639, 425652, 155323, 425663, 155328, 155352, 212700, 155356, 155364, 245477, 155372, 212723, 245495, 409336, 155394, 155404, 245528, 155423, 360224, 155439, 204592, 155444, 155448, 384829, 384831, 360262, 155463, 155477, 376665, 155484, 261982, 425823, 376672, 155488, 155492, 327532, 261997, 376686, 262000, 262003, 425846, 262006, 327542, 262009, 147319, 262012, 155517, 155523, 155526, 360327, 376715, 155532, 262028, 262031, 262034, 262037, 262040, 262043, 155550, 253854, 262046, 262049, 262052, 155560, 155563, 155566, 393152, 311244, 212945, 393170, 155604, 155620, 253924, 155622, 253927, 327655, 360432, 204785, 393204, 360439, 253944, 393209, 393215 ]
2ca8f557d1fe5892e87572a5ed982504e5d07d98
af1d217fe7d51267937645c2acafe8c986f73103
/BookStore/Book.swift
7d0b05deaf6303dbd6df3f435778ce5a3042bb3a
[]
no_license
JaeryongChae/BookStore
c7a723888b93ec296bd47b9939fbb0e21145b010
cedfd8e011c1f090171cec38e2696ca2d881dd10
refs/heads/master
2021-01-20T20:03:03.324295
2016-06-03T07:30:42
2016-06-03T07:30:42
60,246,225
0
0
null
null
null
null
UTF-8
Swift
false
false
1,391
swift
// // Book.swift // BookStore // // Created by MF839-008 on 2016. 6. 1.. // Copyright © 2016년 JRChae. All rights reserved. // import Foundation class Book:NSObject, NSCoding { var title:String? var writer:String? var publisher:String? var date:String? var desc:String? var coverImage:String? var url:String? override init() { } required init(coder aDecoder:NSCoder) { self.title = aDecoder.decodeObjectForKey("title") as? String self.writer = aDecoder.decodeObjectForKey("writer") as? String self.publisher = aDecoder.decodeObjectForKey("publisher") as? String self.date = aDecoder.decodeObjectForKey("date") as? String self.desc = aDecoder.decodeObjectForKey("desc") as? String self.coverImage = aDecoder.decodeObjectForKey("coverImage") as? String self.url = aDecoder.decodeObjectForKey("url") as? String } func encodeWithCoder(aCoder: NSCoder) { aCoder.encodeObject(self.title,forKey:"title") aCoder.encodeObject(self.writer,forKey:"writer") aCoder.encodeObject(self.publisher,forKey:"publisher") aCoder.encodeObject(self.date,forKey:"date") aCoder.encodeObject(self.desc,forKey:"desc") aCoder.encodeObject(self.coverImage,forKey:"coverImage") aCoder.encodeObject(self.url,forKey:"url") } }
[ -1 ]
882bd4f6352069ca6c60eaad82cf407c9d1441dd
fb064f970f889bbe12a2d9c594d7073b4eaef0de
/Tests/LinuxMain.swift
5f8cb2645ce09fb4577896c16c4bacbdc1860983
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
carabina/caralho
2f6ce79cacfb4f216bb81512705476fe93f6d404
87ee0341f1e2970d482bbf61278b9ead879a814c
refs/heads/master
2021-07-17T09:58:50.837224
2017-10-24T19:51:48
2017-10-24T19:51:48
null
0
0
null
null
null
null
UTF-8
Swift
false
false
95
swift
import XCTest @testable import caralhoTests XCTMain([ testCase(caralhoTests.allTests), ])
[ -1 ]
4e1761ee61b0d5628b10457478e1be9cdf774a94
d3056a23d41e2f43a77121663179bc7eaf9eec34
/BOJ_Swift/boj7562.swift
51abb7cda96be8c0401663e7f8b5650c0a33854b
[]
no_license
eojine/algorithm
7e243e1993a16a3bcf33ea1920084846455dc93d
5ed225d0f9f15a2c7e92059630cc63fdb017ac0c
refs/heads/master
2021-06-24T08:18:45.804004
2020-12-31T07:45:23
2020-12-31T07:45:23
182,960,328
0
0
null
null
null
null
UTF-8
Swift
false
false
1,391
swift
import Foundation let dirs = [[-2, -1], [-1, -2], [-2, 1], [-1, 2], [1, 2], [2, 1], [2, -1], [1, -2]] let testCase = Int(readLine()!)! for _ in 0..<testCase { let l = Int(readLine()!)! let current = readLine()!.split(separator: " ").map{Int($0)!} let destination = readLine()!.split(separator: " ").map{Int($0)!} var map: [[Int]] = Array(repeating: Array(repeating: 0, count: l), count: l) var queue: [Point] = [] queue.append(Point(current[0], current[1], 0)) map[current[0]][current[1]] = 1 while !queue.isEmpty { let now = queue.removeFirst() if now.r == destination[0] && now.c == destination[1] { print(now.count) break } for i in 0..<dirs.count { let nextR = dirs[i][0] + now.r let nextC = dirs[i][1] + now.c if !inRange(r: nextR, c: nextC, len: l) { continue } if map[nextR][nextC] == 1 { continue } queue.append(Point(nextR, nextC, now.count + 1)) map[nextR][nextC] = 1 } } } func inRange(r: Int, c: Int, len: Int) -> Bool { return r >= 0 && c >= 0 && r < len && c < len } class Point { var r: Int var c: Int var count: Int init(_ r: Int,_ c: Int,_ count: Int) { self.r = r self.c = c self.count = count } }
[ -1 ]
87f152754bc1835cd0a61df40ef577067e19fe62
1f47cab8968e6c5428d33943a96828162a50b277
/Example/ProtocolOrientedNetworking/Presentation/Common/BaseViewController.swift
5563939f5714cd4d2bbaebb5161a1ffc5568712f
[ "MIT" ]
permissive
pmlbrito/ProtocolOrientedNetworking
b41715decd54346e0ff675ab8bccafe532317499
b819a45faed71e0ae6fd6a24eda66db606315c32
refs/heads/master
2020-04-12T17:10:06.374681
2020-03-18T14:43:31
2020-03-18T14:43:31
162,636,729
1
0
MIT
2020-03-18T14:43:32
2018-12-20T22:15:28
Swift
UTF-8
Swift
false
false
3,227
swift
// // BaseViewController.swift // ProtocolOrientedNetworking_Example // // Created by Pedro Brito on 21/12/2018. // Copyright © 2018 pmlbrito. All rights reserved. // import UIKit enum ViewControllerPresentationType: String { case pushStack, modal, replaceNavigation, replaceAtRoot } class BaseViewController: UIViewController { var loadingView: LoadingOverlay? var parentView: UIView? // MARK: Lifecycle override open func viewDidLoad() { super.viewDidLoad() } // MARK: - BaseViewController Implementation var appDelegate: AppDelegate { if let appDelegate = UIApplication.shared.delegate as? AppDelegate { return appDelegate } else { fatalError() } } // MARK: Loading Indicator public func showLoadingIndicator() { var parent: UIView? = UIApplication.shared.keyWindow if parent == nil { parent = self.view } var loading = self.loadingView if loading != nil { return } loading = LoadingOverlay(frame: parent!.bounds) parent!.addSubview(loading!) parent!.bringSubviewToFront(loading!) loading?.alpha = 0 self.loadingView = loading weak var load = loading UIView.animate(withDuration: 0.2, delay: 0.0, options: .curveEaseInOut, animations: { load?.alpha = 1.0 }, completion: { _ in }) } public func hideLoadingIndicator() { weak var load = self.loadingView self.loadingView = nil load?.alpha = 1.0 UIView.animate(withDuration: 0.1, delay: 0.0, options: .curveEaseInOut, animations: { load?.alpha = 0.0 }, completion: { _ in load?.removeFromSuperview() }) } // MARK: Base navigation actions func transtitionToNextViewController(fromViewController: UIViewController, destinationViewController: UIViewController?, transitionType: ViewControllerPresentationType?) { if transitionType != nil && destinationViewController != nil { switch transitionType! { case .pushStack: let navigationController = fromViewController.navigationController navigationController?.pushViewController(destinationViewController!, animated: true) case .modal: fromViewController.present(destinationViewController!, animated: true, completion: nil) case .replaceNavigation: let newNavigationController = UINavigationController(rootViewController: destinationViewController!) let appWindow = UIApplication.shared.delegate?.window! //animate swapping with nice transition UIView.transition(with: appWindow!, duration: 0.5, options: UIView.AnimationOptions.transitionCrossDissolve, animations: { () -> Void in appWindow!.rootViewController = newNavigationController }, completion: nil) case .replaceAtRoot: self.appDelegate.changeRootViewController(viewController: destinationViewController!) } } } }
[ -1 ]
1641d1fa2d693d491f62e46ef1fe06020906f670
9330c3f3d253715e3c5a36bca2f343e6fa69de31
/TableView_Alamofire/ViewController.swift
f129461f2265910b6a3413a45d766685d849bff2
[]
no_license
srinivasudadi9000/TableView_Alamofire
cc77faccc9424189c106f8ac3ddf2f4fcbb0b838
233afa573964a4d1550f8a0c4939a8c244b31c52
refs/heads/master
2021-05-11T06:24:02.064951
2018-01-18T13:36:00
2018-01-18T13:36:00
117,986,861
0
0
null
null
null
null
UTF-8
Swift
false
false
1,652
swift
// // ViewController.swift // TableView_Alamofire // // Created by srinivas on 18/01/18. // Copyright © 2018 srinivas. All rights reserved. // import UIKit import Alamofire class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { var countries = [Country]() @IBOutlet weak var tableview: UITableView! override func viewDidLoad() { super.viewDidLoad() getMycountries() } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { print("\(countries.count)") return countries.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableview.dequeueReusableCell(withIdentifier: "CustomCell") as! CustomTableViewCell cell.mylabel.text = self.countries[indexPath.row].name return cell } func getMycountries(){ let url = URL(string: "https://restcountries.eu/rest/v2/all") Alamofire.request(url!).responseJSON { (response) in let result = response.data do{ self.countries = try JSONDecoder().decode([Country].self, from: result!) // print(self.countries) self.tableview.delegate = self self.tableview.dataSource = self // for country in self.countries{ // print("\(country.name) , \(country.capital)") // } }catch{ print("error") } } } }
[ -1 ]
85a8bba97660aaa56712e0511b22b2bd800f9b90
6f535794092d6e6c025b2e0a7f0e87e814432161
/GetOnTrip/LoadingView.swift
8552257e91633845edab1ada82f3884ccafcbb36
[]
no_license
whu404/getontrip-ios
e597957ed50331eb164845fdd04c9372f4b3185a
0610dddd3d8ccca2ede36ca4a44ef090c3e0542a
refs/heads/master
2021-05-08T20:46:52.784163
2016-07-08T02:58:31
2016-07-08T02:58:31
null
0
0
null
null
null
null
UTF-8
Swift
false
false
2,204
swift
// // LoadingView.swift // GetOnTrip // // Created by 何俊华 on 15/11/11. // Copyright © 2015年 Joshua. All rights reserved. // import UIKit class LoadingView: UIView { //MASK: Properties /// 设置加载中颜色 var fontColor: UIColor? { didSet { if let fontColor = fontColor { messageLabel.textColor = fontColor } } } /// 设置背景颜色 var bgColor: UIColor? { didSet { if let bgColor = bgColor { backgroundColor = bgColor } } } var activityType: UIActivityIndicatorViewStyle? { didSet { if let type = activityType { activityView.activityIndicatorViewStyle = type } } } //默认字体不显示 var messageLabel: UILabel = UILabel(color: UIColor.clearColor(), title: "正在加载...", fontSize: 14) //默认大的灰色 var activityView = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.WhiteLarge) override init(frame: CGRect) { super.init(frame: frame) updateUI() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func layoutSubviews() { super.layoutSubviews() } // MARKS: 自定义方法 func updateUI() { backgroundColor = UIColor.clearColor() activityView.color = UIColor.grayColor() self.addSubview(activityView) self.addSubview(messageLabel) self.layer.cornerRadius = 3 activityView.ff_AlignInner(.TopCenter, referView: self, size: CGSizeMake(34.0, 34.0), offset: CGPointMake(0, 17)) messageLabel.ff_AlignInner(.BottomCenter, referView: self, size: CGSizeMake(70, 20), offset:CGPointMake(0, -6)) self.hidden = true } func getSize() -> CGSize { return CGSizeMake(86, 86) } func start() { self.hidden = false activityView.startAnimating() } func stop() { self.hidden = true activityView.stopAnimating() } }
[ -1 ]
8bf0cc3d56ac91cdfe526f08025b7761afc0a7e9
a43b327ecb587ffbb1a084b4a0233c8252958e4a
/GradientLayerSample/AppDelegate.swift
0e5d8ca78dd607a35fff547977379e983e64bb41
[]
no_license
fummicc1/GradientLayerSample
07bdc271604e481469828938caf6c78b97e1ae5e
92d27e0fc5b9d16d4469eb32b9aa7c29a321647f
refs/heads/master
2022-12-13T14:34:35.448990
2020-09-09T01:29:41
2020-09-09T01:29:41
293,969,018
0
0
null
null
null
null
UTF-8
Swift
false
false
1,433
swift
// // AppDelegate.swift // GradientLayerSample // // Created by Fumiya Tanaka on 2020/09/09. // Copyright © 2020 Fumiya Tanaka. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } }
[ 393222, 393224, 393230, 393250, 344102, 393261, 393266, 163891, 213048, 376889, 385081, 393275, 376905, 327756, 254030, 286800, 368727, 180313, 368735, 180320, 376931, 286831, 286844, 262283, 286879, 286888, 377012, 327871, 180416, 377036, 180431, 377046, 377060, 327914, 205036, 393456, 393460, 418043, 336123, 336128, 385280, 262404, 180490, 368911, 262416, 262422, 377117, 262436, 336180, 262454, 262472, 344403, 213332, 65880, 418144, 262496, 262499, 213352, 246123, 262507, 262510, 213372, 385419, 393612, 262550, 262552, 385440, 385443, 385451, 262573, 393647, 385458, 262586, 344511, 262592, 360916, 369118, 328177, 328179, 328182, 328189, 328192, 164361, 328206, 410128, 393747, 254490, 188958, 385570, 33316, 197159, 377383, 352821, 188987, 418363, 369223, 385609, 385616, 352856, 352864, 369253, 262760, 352874, 352887, 254587, 377472, 336512, 148105, 377484, 352918, 98968, 344744, 361129, 336555, 385713, 434867, 164534, 336567, 164538, 328378, 328386, 352968, 344776, 418507, 352971, 385742, 385748, 361179, 189153, 369381, 361195, 418553, 344831, 336643, 344835, 344841, 361230, 336659, 418580, 418585, 434970, 369435, 418589, 418593, 336675, 328484, 418598, 418605, 336696, 361273, 328515, 336708, 328519, 336711, 328522, 336714, 426841, 254812, 361309, 197468, 361315, 361322, 328573, 377729, 369542, 361360, 222128, 345035, 345043, 386003, 386011, 386018, 386022, 435187, 328702, 328714, 361489, 386069, 336921, 386073, 336925, 345118, 377887, 345133, 345138, 386101, 361536, 197707, 189520, 345169, 156761, 361567, 148578, 345199, 386167, 361593, 410745, 361598, 214149, 345222, 386186, 337047, 345246, 214175, 337071, 337075, 386258, 328924, 66782, 222437, 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, 181681, 337329, 181684, 181690, 361917, 181696, 337349, 181703, 337365, 271839, 329191, 361960, 329194, 116210, 337398, 337415, 329226, 419339, 419343, 419349, 345625, 419355, 370205, 419359, 394786, 419362, 370213, 419368, 419376, 206395, 214593, 419400, 419402, 353867, 419406, 419410, 345701, 394853, 222830, 370297, 403070, 403075, 198280, 345736, 345749, 345757, 345762, 419491, 345765, 419497, 419501, 370350, 419506, 419509, 419512, 337592, 337599, 419527, 419530, 419535, 272081, 419542, 394966, 419544, 181977, 345818, 419547, 419550, 419559, 337642, 419563, 337645, 337659, 141051, 337668, 362247, 395021, 362255, 321299, 116509, 345887, 378663, 345905, 354106, 354111, 247617, 354117, 370503, 329544, 345930, 370509, 354130, 247637, 337750, 370519, 313180, 354142, 345967, 345970, 345974, 403320, 354172, 247691, 337808, 247700, 329623, 436126, 436132, 337833, 362413, 337844, 346057, 247759, 346063, 329697, 354277, 190439, 247789, 354313, 346139, 436289, 378954, 395339, 338004, 100453, 329832, 329855, 329867, 329885, 411805, 346272, 362660, 100524, 387249, 379066, 387260, 256191, 346316, 411861, 411864, 411868, 411873, 379107, 411876, 387301, 346343, 338152, 387306, 387312, 346355, 436473, 321786, 379134, 411903, 379152, 387349, 338199, 387352, 182558, 338211, 395566, 248111, 362822, 436555, 190796, 321879, 354673, 321910, 248186, 420236, 379278, 354727, 338352, 330189, 338381, 338386, 338403, 338409, 248308, 199164, 330252, 199186, 420376, 330267, 354855, 10828, 199249, 174695, 248425, 191084, 338543, 191092, 346742, 330383, 354974, 150183, 174774, 248504, 174777, 223934, 355024, 273108, 355028, 264918, 183005, 256734, 338660, 338664, 264941, 363251, 207619, 264964, 338700, 256786, 199452, 363293, 396066, 346916, 215853, 355122, 355131, 355140, 355143, 338763, 355150, 330580, 355166, 265055, 355175, 387944, 355179, 330610, 330642, 355218, 412599, 207808, 379848, 248792, 248798, 347105, 257008, 183282, 265207, 330748, 330760, 330768, 248862, 396328, 158761, 199728, 330800, 339001, 388154, 388161, 347205, 248904, 330826, 248914, 183383, 339036, 412764, 257120, 248951, 420984, 330889, 347287, 248985, 339097, 44197, 380070, 339112, 249014, 126144, 330958, 330965, 265432, 388319, 388347, 175375, 159005, 175396, 208166, 273708, 372015, 347441, 372018, 199988, 175415, 396600, 437566, 175423, 437570, 437575, 437583, 331088, 437587, 331093, 396633, 175450, 437595, 175457, 208227, 175460, 175463, 265580, 437620, 175477, 249208, 175483, 175486, 249214, 175489, 249218, 249227, 249234, 175513, 175516, 396705, 175522, 355748, 380332, 396722, 388542, 372163, 216517, 380360, 216522, 339404, 372176, 208337, 339412, 413141, 339417, 249308, 339420, 339424, 339428, 339434, 249328, 69113, 372228, 339461, 208398, 380432, 175635, 339503, 265778, 265795, 396872, 265805, 224853, 224857, 257633, 224870, 372327, 257646, 372337, 224884, 224887, 224890, 224894, 224897, 372353, 216707, 126596, 339588, 421508, 224904, 224909, 11918, 159374, 224913, 126610, 339601, 224916, 224919, 126616, 224922, 208538, 224926, 224929, 224932, 224936, 257704, 224942, 257712, 224947, 257716, 257720, 224953, 257724, 224959, 257732, 224965, 224969, 339662, 224975, 257747, 224981, 224986, 257761, 224993, 257764, 224999, 339695, 225012, 257787, 225020, 339710, 257790, 225025, 339721, 257801, 257804, 225038, 257807, 225043, 372499, 167700, 225048, 257819, 225053, 184094, 225058, 339747, 339749, 257833, 225066, 257836, 413484, 225070, 225073, 372532, 257845, 225079, 397112, 225082, 397115, 225087, 225092, 225096, 323402, 257868, 225103, 257871, 397139, 225108, 225112, 257883, 257886, 225119, 257890, 339814, 225127, 257896, 274280, 257901, 225137, 339826, 257908, 225141, 257912, 225148, 257916, 257920, 225155, 339844, 225165, 225170, 380822, 225175, 225180, 118691, 184244, 372664, 372702, 372706, 356335, 380918, 405533, 430129, 217157, 421960, 356439, 430180, 421990, 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, 225496, 225499, 225502, 225505, 356578, 225510, 217318, 225514, 225518, 372976, 381176, 389380, 356637, 356640, 356643, 356646, 356649, 356655, 332080, 340275, 356660, 397622, 332090, 225597, 332097, 201028, 348488, 332106, 332117, 348502, 250199, 250202, 332125, 250210, 348525, 332152, 389502, 250238, 332161, 356740, 332172, 373145, 340379, 389550, 324030, 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, 332493, 357069, 357073, 332511, 332520, 340718, 332533, 348924, 389892, 373510, 389926, 152370, 348978, 340789, 348982, 398139, 127814, 357206, 389978, 430939, 357211, 357214, 201579, 201582, 349040, 340849, 201588, 430965, 381813, 324472, 398201, 119674, 340858, 324475, 430972, 340861, 324478, 324481, 373634, 398211, 324484, 324487, 381833, 324492, 324495, 324498, 430995, 324501, 324510, 422816, 324513, 201637, 398245, 324524, 340909, 324533, 5046, 324538, 324541, 398279, 340939, 340941, 340957, 431072, 398306, 340963, 209895, 201711, 349172, 381946, 349180, 439294, 431106, 209943, 209946, 250914, 357410, 185380, 357418, 209965, 209968, 209971, 209975, 209979, 209987, 209990, 341071, 349267, 250967, 210010, 341091, 210025, 210027, 210030, 210039, 341113, 349308, 210044, 349311, 152703, 160895, 210052, 349319, 210055, 210067, 210071, 210077, 210080, 251044, 210084, 185511, 210088, 210095, 210098, 210107, 210115, 332997, 333009, 210131, 333014, 210138, 218354, 218360, 251128, 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, 423392, 333284, 366056, 366061, 210420, 423423, 366117, 144939, 210487, 349761, 415300, 333386, 333399, 366172, 333413, 423528, 423532, 210544, 415353, 333439, 415361, 267909, 333498, 210631, 333511, 358099, 153302, 333534, 366307, 366311, 431851, 366318, 210672, 366321, 366325, 210695, 210698, 366348, 210706, 399128, 333594, 210719, 358191, 366387, 399159, 358200, 325440, 366401, 341829, 325446, 46920, 341834, 341838, 341843, 415573, 358234, 341851, 350045, 399199, 259938, 399206, 268143, 358255, 399215, 358259, 341876, 333689, 243579, 325504, 333698, 333708, 333724, 382890, 350146, 358339, 333774, 358371, 350189, 350193, 333818, 350202, 350206, 350213, 268298, 350224, 350231, 333850, 350237, 350240, 350244, 350248, 178218, 350251, 350256, 350259, 350271, 243781, 350285, 374864, 342111, 342133, 374902, 432271, 333997, 334011, 260289, 260298, 350410, 350416, 350422, 211160, 350425, 268507, 334045, 350445, 375026, 358644, 350458, 350461, 350464, 325891, 350467, 350475, 350480, 432405, 350486, 350490, 325914, 325917, 350493, 350498, 350504, 358700, 350509, 391468, 358704, 358713, 358716, 383306, 334161, 383321, 383330, 383333, 391530, 383341, 334203, 268668, 194941, 391563, 366990, 416157, 342430, 268701, 375208, 326058, 375216, 334262, 334275, 326084, 358856, 334304, 334311, 375277, 334321, 350723, 186897, 342545, 334358, 342550, 342554, 334363, 350761, 252461, 334384, 383536, 358961, 334394, 252482, 219718, 334407, 334420, 350822, 375400, 334465, 334468, 162445, 326290, 342679, 342683, 260766, 342710, 244409, 260797, 334528, 260801, 350917, 154317, 391894, 154328, 416473, 64230, 113388, 342766, 375535, 203506, 342776, 391937, 391948, 375568, 326416, 375571, 375574, 162591, 326441, 326451, 326454, 326460, 244540, 260924, 375612, 326467, 244551, 326473, 326477, 326485, 416597, 326490, 342874, 326502, 375656, 433000, 326507, 326510, 211825, 211831, 351097, 392060, 359295, 351104, 400259, 342915, 236430, 342930, 252822, 392091, 400285, 252836, 359334, 211884, 400306, 351168, 359361, 326598, 359366, 359382, 359388, 383967, 343015, 359407, 261108, 244726, 261111, 383997, 261129, 359451, 261147, 211998, 261153, 261159, 359470, 359476, 343131, 384098, 384101, 384107, 367723, 187502, 343154, 384114, 212094, 351364, 384135, 384139, 384143, 351381, 384151, 384160, 384168, 367794, 244916, 384181, 384188, 384191, 351423, 326855, 244937, 384201, 343244, 384208, 146642, 384224, 359649, 343270, 351466, 384246, 351479, 343306, 261389, 359694, 261393, 384275, 384283, 245020, 384288, 245029, 171302, 351534, 376110, 245040, 425276, 384323, 212291, 343365, 212303, 367965, 343393, 343398, 367980, 343409, 253303, 154999, 343417, 327034, 245127, 384397, 245136, 245142, 245145, 343450, 245148, 245151, 245154, 245157, 245162, 327084, 359865, 384443, 146876, 327107, 384453, 327110, 327115, 327117, 359886, 359890, 343507, 368092, 343534, 343539, 368119, 343544, 368122, 409091, 359947, 359955, 359983, 343630, 327275, 245357, 138864, 155254, 155273, 245409, 425638, 425649, 155322, 425662, 155327, 253943, 245460, 155351, 155354, 212699, 245475, 155363, 245483, 155371, 409335, 155393, 155403, 245525, 155422, 360223, 155438, 155442, 155447, 155461, 360261, 376663, 155482, 261981, 425822, 155487, 376671, 155490, 155491, 327531, 261996, 376685, 261999, 262002, 327539, 262005, 147317, 425845, 262008, 262011, 155516, 155521, 155525, 360326, 376714, 155531, 262027, 262030, 262033, 262036, 262039, 262042, 155549, 262045, 262048, 262051, 327589, 155559, 155562, 155565, 393150, 384977, 393169, 155611, 155619, 253923, 155621, 253926, 327654, 393203, 360438, 393206, 393212, 155646 ]
9e636069ab578aada4b221b2d0cb330d1456dcf2
2869808c9f4fdb820281a8521a62208766a0aa43
/StudyLeetcodeProject/StudyLeetcodeProject/Finished/NSum/16.最接近的三数之和.swift
0337aab36f0bbb044aac11e7502192600848686a
[]
no_license
BaoziSwifter/MyPythonLeetCode
03dcfa0705ad87a1b727fe2f924fabb7184c4ca1
0e8f0d902a379c07c386aedc6d10d7a2aa6d1b4a
refs/heads/master
2023-01-09T08:15:23.154464
2022-12-25T02:35:16
2022-12-25T02:35:16
220,202,819
1
0
null
null
null
null
UTF-8
Swift
false
false
1,134
swift
// // 16.-最接近的三数之和.swift // StudyLeetcodeProject // // Created by beliefduan on 2022/9/13. // import Foundation class Solution16 { func threeSumClosest(_ nums: [Int], _ target: Int) -> Int { if nums.count < 3 { return 0 } var delta = Int.max let nums = nums.sorted() for i in 0..<(nums.count - 2) { // 固定起始的i let closethreeSum = twoSunCloseset(nums, target - nums[i], i+1) + nums[i] if abs(delta) > abs(closethreeSum - target) { delta = target - closethreeSum } } return target - delta } func twoSunCloseset(_ nums: [Int], _ target: Int, _ start: Int) -> Int { var l = start, r = nums.count - 1 var delta = Int.max while l < r { let tempSum = nums[l] + nums[r] if abs(tempSum - target) < abs(delta) { delta = target - tempSum } if tempSum < target { l += 1 } else { r -= 1 } } return target - delta } }
[ -1 ]
b10cfdb970e6922a2e2f3b3a84c1e493b376b044
7c35dab958497ab9e76af691dc986f13a6b512b3
/iOS/UI/Components/TopChartView+DailyChart.swift
e9769a29161b153c6a3dfeba5ee911cfc6e6d032
[]
no_license
wangchou/Shadowing
4c1078402df3cb90c78998c7d29c918a88b872fb
a0f730540c0808ed1d548a2f9e8935fb028b86d9
refs/heads/master
2021-12-24T22:10:45.172973
2020-12-23T21:30:55
2020-12-23T23:32:41
126,162,254
7
3
null
2021-09-01T04:07:16
2018-03-21T10:29:52
Swift
UTF-8
Swift
false
false
6,308
swift
// // TopChartView+DailyChart.swift // 今話したい // // Created by Wangchou Lu on 12/23/30 H. // Copyright © 30 Heisei Lu, WangChou. All rights reserved. // import Foundation import UIKit private let context = GameContext.shared // MARK: Daily Goal Mode extension TopChartView { func renderDailyGoalMode() { gridCount = 48 removeAllSubviews() updateDailyViewBGColor() circleFrame = getFrame(11, 3, 24, 24) circleFrame = circleFrame.padding(5) let backCircle = CircleView(frame: circleFrame) backCircle.lineWidth = step * 1.3 backCircle.lineColor = rgb(155, 155, 155) addSubview(backCircle) frontCircle = CircleView(frame: circleFrame) frontCircle!.lineWidth = step * 1.3 frontCircle!.percent = percent.c addSubview(frontCircle!) percentLabel = addText(x: 14, y: 6, w: 30, h: 9, text: percent >= 0 ? percentageText : "0%", font: MyFont.bold(ofSize: getFontSize(h: 8)), color: .black) percentLabel?.textAlignment = .center percentLabel?.centerIn(circleFrame) let goalLabel = addText(x: 14, y: 28, w: 30, h: 4, text: i18n.goalText, font: MyFont.bold(ofSize: getFontSize(h: 4))) goalLabel.textAlignment = .center goalLabel.centerX(circleFrame) addDailySideBar() addFreeVersionButton() } func animateProgress() { guard context.gameSetting.icTopViewMode == .dailyGoal, percent > 0, percent < 1.0 else { return } // background layer.removeAllAnimations() let animation = CABasicAnimation(keyPath: "backgroundColor") animation.duration = 0.5 animation.fromValue = longTermGoalColor.withSaturation(0).cgColor animation.toValue = longTermGoalColor.withSaturation(percent.c).cgColor animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear) layer.backgroundColor = longTermGoalColor.withSaturation(percent.c).cgColor layer.add(animation, forKey: "animateBackground") // percentLabel guard let percentLabel = percentLabel else { return } var repeatCount = 0 let targetCount = 25 timer?.invalidate() timer = Timer.scheduledTimer(withTimeInterval: 0.02, repeats: true) { [weak self] _ in guard repeatCount <= 25 else { self?.timer?.invalidate() return } guard let self = self else { return } let currentPercent = self.percent * repeatCount.f / targetCount.f percentLabel.text = String(format: "%.1f", currentPercent * 100) + "%" percentLabel.centerIn(self.circleFrame) repeatCount += 1 } // circle guard let circleView = frontCircle else { return } circleView.percent = percent.c circleView.animate(duration: 0.5) } func updateDailyViewBGColor() { // 0% = rgb(238, 238, 238) // 100% = rgb(255, 204, 0) guard percent < 1.0 else { backgroundColor = longTermGoalColor.withSaturation(1.0) return } guard percent > 0 else { backgroundColor = rgb(238, 238, 238) return } backgroundColor = longTermGoalColor.withSaturation(0) } func addDailySideBar() { let topRect = addRect(x: 38, y: 3, w: 8, h: 20, color: .white) topRect.roundBorder(radius: step) let xFrame = topRect.frame addDailySideBarText(sprintText, y: 4, boundFrame: xFrame, color: .darkGray) addDailySideBarText(continuesText, y: 8, isBold: true, boundFrame: xFrame) addDailySideBarText(dayText, y: 11, boundFrame: topRect.frame, color: .darkGray) addDailySideBarText(sentencesCountText, y: 16, isBold: true, boundFrame: xFrame) addDailySideBarText(sentenceText, y: 19, boundFrame: xFrame, color: .darkGray) let bottomRect = addRect(x: 38, y: 24, w: 8, h: 8, color: .white) bottomRect.roundBorder(radius: step) addDailySideBarText(bestText, y: 25, boundFrame: xFrame, color: .darkGray) addDailySideBarText(bestCountText, y: 28, isBold: true, boundFrame: xFrame) addDailySideBarSeparateLine(y: 7, boundFrame: getFrame(38, 3, 8, 9)) addDailySideBarSeparateLine(y: 15, boundFrame: getFrame(38, 14, 8, 2)) } func addDailySideBarText(_ text: String, y: Int, isBold: Bool = false, boundFrame: CGRect, color: UIColor = .black) { let font = isBold ? MyFont.bold(ofSize: getFontSize(h: 3)) : MyFont.regular(ofSize: getFontSize(h: 3)) let sprintLabel = addText(x: 14, y: y, w: 8, h: 3, text: text, font: font, color: color) sprintLabel.textAlignment = .center sprintLabel.centerX(boundFrame) } func addDailySideBarSeparateLine(y: Int, boundFrame: CGRect) { let separateLine = UIView() layout(0, y, 6, 1, separateLine) separateLine.frame.size.height = 0.5 separateLine.backgroundColor = rgb(200, 200, 200) addSubview(separateLine) separateLine.centerIn(boundFrame) } func addFreeVersionButton() { guard isFreeVersion() else { return } let freeRect = addRect(x: 2, y: 27, w: 8, h: 5, color: .clear) freeRect.roundBorder(width: 1.5, radius: step, color: .white) let freeLabel = addText(x: 14, y: 26, w: 8, h: 3, text: i18n.freeVersion, font: MyFont.bold(ofSize: getFontSize(h: 3)), color: .white) freeLabel.textAlignment = .center freeLabel.centerIn(freeRect.frame) freeRect.addTapGestureRecognizer { IAPHelper.shared.showPurchaseView(isChallenge: false) } } }
[ -1 ]
f9df9651452b3a9526bcd1088f54fdc068723eec
c2364e6253520a7e39ac9b6582548cc765fc9e66
/Projects/Projects/Utilities/Logging.swift
b280210cb539a86dce35072ae188cc80ee68ca1b
[]
no_license
Dario-Gasquez/teamwork-test
28b2c7530f2e221a90648116f29fe1b499854791
71cbb58e2b372e45141cc479d888dc950b5022cd
refs/heads/develop
2021-01-24T12:20:47.930612
2018-03-01T20:42:08
2018-03-01T20:42:08
123,132,880
0
0
null
2018-03-01T20:45:08
2018-02-27T13:27:42
Swift
UTF-8
Swift
false
false
2,341
swift
// // Logging.swift // Trophy Hunter // // Created by Dario on 1/25/18. // Copyright © 2018 Dario. All rights reserved. // import Foundation enum LogLevel : String, CustomStringConvertible { case Info case Warning case Error var description : String { return self.rawValue } var shouldLog : Bool { #if DEBUG return true #else return self == .Error || self == .Warning #endif } var shouldBreak : Bool { #if DEBUG if self != .Error { return false } /* "How do I determine if I'm being run under the debugger?" https://developer.apple.com/library/ios/qa/qa1361/_index.html */ var info = kinfo_proc() var mib : [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()] var size = MemoryLayout.stride(ofValue: info) sysctl(&mib, UInt32(mib.count), &info, &size, nil, 0) return (info.kp_proc.p_flag & P_TRACED) != 0 #else return false #endif } } /// Logs a message to the console (if the `level` parameter allows it) and will break into the debugger if `level` is `.Error` and a debugger is attached (only in Release builds) func logMessage(_ level: LogLevel, _ items: String, file: StaticString = #file, line: UInt = #line, function: String = #function) { if level.shouldLog { // NSLog goes to the device console when a debugger is not attached, but `print` does not. NSLog("\n\(level): <\(sourceFileName(filePath: file)).\(function):\(line)> : \(items)") if level.shouldBreak { // raise(SIGSTOP) will break into the debugger, and you can continue executing. But it will break the main thread, so let's make sure we're there before breaking. if Thread.isMainThread { raise(SIGSTOP) } else { _ = DispatchQueue.main.sync { raise(SIGSTOP) } } } } } fileprivate func sourceFileName(filePath: StaticString) -> String { let components = String(describing: filePath).components(separatedBy: "/") return components.isEmpty ? "" : components.last! }
[ -1 ]
ae7c613c86998c8ca23bd67e4af81a6294de13d8
546a5f0dd92ae931aaeeea3844501902e67e83da
/Shared/Components/MapView.swift
18ff9be67a00f52c4844fe30caa08e9fbc13f7e0
[]
no_license
tunogya/telepole
272c4114b2cba8c357755167c2783c0067bb461d
3a2d94e03760302c223c0056444d236907904296
refs/heads/main
2023-05-05T23:37:23.465836
2021-05-26T07:09:25
2021-05-26T07:09:25
null
0
0
null
null
null
null
UTF-8
Swift
false
false
3,460
swift
// // MapView.swift // Telepole // // Created by 丁涯 on 2021/2/16. // import SwiftUI import MapKit import Foundation struct MapView: View { @State private var mapRegion = MKCoordinateRegion() @State private var trackingMode = MapUserTrackingMode.none @EnvironmentObject private var model: TelepoleModel func getOpacity(timeInterval: Double) -> Double { let diff = (Date().timeIntervalSince1970 - timeInterval) / 864000 return 1 - 2 * atan(diff) / Double.pi } var wakandaSlogan: some View { HStack { Text("Telepole") .font(.body) .fontWeight(.bold) Text("@Wakanda") .font(.caption) .foregroundColor(Color(#colorLiteral(red: 0.5759999752, green: 0.5839999914, blue: 0.5920000076, alpha: 1))) .padding(.leading, 4) } .padding(4) } var annotation: [Geo] { model.myGeos + model.friendGeos } var body: some View { ZStack{ Map(coordinateRegion: $mapRegion, interactionModes: .all, showsUserLocation: true, userTrackingMode: $trackingMode, annotationItems: annotation) { geo in MapAnnotation( coordinate: CLLocationCoordinate2D(latitude: geo.latitude, longitude: geo.longitude), anchorPoint: CGPoint(x: 0.5, y: 0.5) ) { VStack(spacing: 4){ Text(geo.pet.name + ", " + updateTimeToCurrennTime(timeStamp: geo._createTime) + (geo.pet.protected ? "": ", 丢失")) .font(Font.custom("Herculanum", size: 10)) .fontWeight(.heavy) .padding(6) .background(VisualEffectBlur(blurStyle: .systemChromeMaterial)) .cornerRadius(8) Image("foot") .resizable() .frame(width: 16, height: 16, alignment: .center) .padding(4) .background(VisualEffectBlur(blurStyle: .systemChromeMaterial)) .clipShape(Circle()) } .opacity(getOpacity(timeInterval: geo._createTime)) } } .onAppear(perform: { self.trackingMode = MapUserTrackingMode.follow }) VStack(alignment: .leading) { wakandaSlogan Spacer() HStack(alignment: .bottom){ Spacer() Button(action: { self.trackingMode = MapUserTrackingMode.follow }, label: { Image(systemName: "scope") .font(.body) .padding(8) .foregroundColor(Color(#colorLiteral(red: 0.1490196078, green: 0.07058823529, blue: 0.3098039216, alpha: 1))) .background(Color.white) .clipShape(Circle()) }) } .padding() } } .cornerRadius(24) .frame(height: SCREENHEIGHT*0.5) } } struct MapView_Previews: PreviewProvider { static var previews: some View { MapView() } }
[ -1 ]
ee2c30735d86e503b078210960643aff099297a9
90d79a47fb1a1d1051a17d3af455959865b8244c
/AviatrixApp/AviatrixData.swift
27504c7a1ceb27b3a8d2860ca704fa1a8327a667
[]
no_license
FionaDupraw/aviatrix_swift_master
6ab1039a8ea3b71496ba206cda0a6b9008f0f130
887e921c9c2aa1a21e0ae8e4ed3c22ceb68a1971
refs/heads/master
2020-06-18T09:40:52.300260
2019-07-11T16:14:40
2019-07-11T16:14:40
196,256,894
0
0
null
null
null
null
UTF-8
Swift
false
false
1,157
swift
// // AviatrixData.swift // AviatrixApp // // Created by Amy Holt on 6/10/18. // Copyright © 2018 Amy Holt. All rights reserved. // import Foundation class AviatrixData { //Dictionary with strings and doubles var fuelPrices = [ "St. Louis" : 1.79, "Phoenix" : 1.84, "Denver" : 1.65, "SLC" : 1.95 ] //miles are Int, destinations are String //Dictionary in a dictionary //Example: key of st. louis has a value of a dictionary var knownDistances = [ "St. Louis" : [ "St. Louis" : 0, "Phoenix" : 1260, "Denver" : 768, "SLC" : 1150 ], "Phoenix" : [ "St. Louis" : 1260, "Phoenix" : 0, "Denver" : 601, "SLC" : 508 ], "Denver" : [ "St. Louis" : 768, "Phoenix" : 601, "Denver" : 0, "SLC" : 390 ], "SLC" : [ "St. Louis" : 1150, "Phoenix" : 508, "Denver" : 390, "SLC" : 0 ] ] }
[ -1 ]
da6ea5028c7fd83feb51a75dda8097f0b12479ae
93d58cff0dd8353892317a0c25ff0e95a0614603
/VKclient_Kirillov_Anton/NewsFeed/Content/AudioPlayer.swift
30ad4d02d7d78bf50562dd92145c8605d1f52f5b
[]
no_license
Barpost/VKClient_Kirillov_Anton
e8ccb5725820f45bf87e3a223bae7c23acd1144a
3bec16e6cc7b7fa9de82e765c7ddc27a7efda303
refs/heads/master
2021-08-29T08:19:50.935706
2017-12-13T14:26:41
2017-12-13T14:26:41
114,129,924
0
0
null
null
null
null
UTF-8
Swift
false
false
702
swift
// // AudioPlayer.swift // VKclient_Kirillov_Anton // // Created by Антон Кириллов on 13.12.2017. // Copyright © 2017 Barpost. All rights reserved. // import Foundation import WebKit class AudioPlayerController: UIViewController { @IBOutlet weak var webView: UIWebView! override func viewDidLoad() { super.viewDidLoad() let url = URL(string: userDefaults.string(forKey: "audioURL")!) let request = URLRequest(url: url!) webView.loadRequest(request) } override var prefersStatusBarHidden: Bool{ return true } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } }
[ -1 ]