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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9546098323615784f8d87f8ed7a8f1f91e1df9cc
|
0cfff16d375c53b8f3a46f026548e9b8237346ee
|
/Sources/png-fuzzy-compare/main.swift
|
ab2a94f3eb27c85eab2bb0454a6bca4a4b690e60
|
[
"Apache-2.0"
] |
permissive
|
Daniil-F/cggen
|
5ecb2208faf5cdf064d69d85dc6a893ae3d592fc
|
a04a2fa7de992676678fe2277ab22980af0dcd5e
|
refs/heads/main
| 2023-05-09T21:44:54.103201 | 2021-04-09T07:46:01 | 2021-04-09T07:46:01 | 352,212,844 | 0 | 0 |
NOASSERTION
| 2021-03-28T01:04:23 | 2021-03-28T01:04:22 | null |
UTF-8
|
Swift
| false | false | 2,640 |
swift
|
import ArgumentParser
import Foundation
import Base
struct Main: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "png-fuzzy-compare",
abstract: "Tool for generationg CoreGraphics code from vector images in pdf format",
version: "0.1"
)
@Option var firstImage: String
@Option var secondImage: String
@Option var outputImageDiff: String?
@Option var outputAsciiDiff: String?
func run() throws {
let img1 = try! readImage(filePath: firstImage)
let img2 = try! readImage(filePath: secondImage)
if let diffOutputImage = outputImageDiff {
let url = URL(fileURLWithPath: diffOutputImage) as CFURL
try! CGImage.diff(lhs: img1, rhs: img2).write(fileURL: url)
}
let buffer1 = RGBABuffer(image: img1)
let buffer2 = RGBABuffer(image: img2)
if let diffOutputAscii = outputAsciiDiff {
let url = URL(fileURLWithPath: diffOutputAscii)
try! asciiDiff(buffer1: buffer1, buffer2: buffer2)
.data(using: .utf8)!
.write(to: url)
}
let rw1 = buffer1.pixels
.flatMap { $0 }
.flatMap { $0.normComponents }
let rw2 = buffer2.pixels
.flatMap { $0 }
.flatMap { $0.normComponents }
let ziped = zip(rw1, rw2).lazy.map(-)
print(ziped.rootMeanSquare())
}
}
enum ReadImageError: Error {
case failedToCreateDataProvider
case failedToCreateImage
}
func readImage(filePath: String) throws -> CGImage {
let url = URL(fileURLWithPath: filePath) as CFURL
guard let dataProvider = CGDataProvider(url: url)
else { throw ReadImageError.failedToCreateDataProvider }
guard let img = CGImage(
pngDataProviderSource: dataProvider,
decode: nil,
shouldInterpolate: true,
intent: .defaultIntent
)
else { throw ReadImageError.failedToCreateImage }
return img
}
func symbolForRelativeDeviation(_ deviation: Double) -> String {
precondition(0...1 ~= deviation)
switch deviation {
case ..<0.001:
return " "
case ..<0.01:
return "·"
case ..<0.1:
return "•"
case ..<0.2:
return "✜"
case ..<0.3:
return "✖"
default:
return "@"
}
}
extension RGBAPixel {
var normComponents: [Double] {
norm().components
}
}
func asciiDiff(buffer1: RGBABuffer, buffer2: RGBABuffer) -> String {
zip(buffer1.pixels, buffer2.pixels)
.concurrentMap { l1, l2 in zip(l1, l2)
.map { p1, p2 in
let deviation = zip(p1.normComponents, p2.normComponents)
.map(-)
.rootMeanSquare()
return symbolForRelativeDeviation(deviation)
}
.joined()
}
.joined(separator: "\n")
}
Main.main()
|
[
-1
] |
43043c8e5887ef5fb849cb9832db8acd2892caff
|
a49f41d480203c61e727e999a40dc89c91cb5821
|
/wild-birds/ViewController/GameViewController.swift
|
7e05ab9d3a0093e49aba3468b85c1ded5d43073d
|
[] |
no_license
|
rogerprz/wild-birds
|
82b2f84560b362969bcc978ffd3f1fa1a4d9c083
|
5a22432ff6e5044319181016c7988abe8d6e0acc
|
refs/heads/master
| 2023-01-03T16:48:11.233463 | 2020-10-27T04:30:31 | 2020-10-27T04:30:31 | 290,125,361 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,380 |
swift
|
//
// GameViewController.swift
// wild-birds
//
// Created by Roger Perez on 8/24/20.
// Copyright © 2020 CodeRoger. All rights reserved.
//
import UIKit
import SpriteKit
import GameplayKit
protocol SceneManagerDelegate {
func presentMenuScene()
func presentLevelScene()
func presentGameSceneFor(level: Int)
}
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
presentMenuScene()
}
}
extension GameViewController: SceneManagerDelegate {
func presentMenuScene() {
let menuScene = MenuScene()
menuScene.sceneManagerDelegate = self
present(scene: menuScene)
}
func presentLevelScene() {
let levelScene = LevelScene()
levelScene.sceneManagerDelegate = self
present(scene: levelScene)
}
func presentGameSceneFor(level: Int) {
let sceneName = "GameScene_\(level)"
if let gameScene = SKScene(fileNamed: sceneName) as? GameScene {
gameScene.sceneManagerDelegate = self
gameScene.level = level
present(scene: gameScene)
}
}
func present(scene: SKScene) {
if let view = self.view as! SKView? {
scene.scaleMode = .resizeFill
view.presentScene(scene)
view.ignoresSiblingOrder = true
}
}
}
|
[
-1
] |
33790df3fa79e268b7d8b9bb2824a18d86adf0c8
|
6b171d099aaed36208ccee48b45a7f5083ac98b5
|
/AtomHacks2017/ListItemViewController.swift
|
f87248a10fccb435eb6c0216ab3138479f50893d
|
[] |
no_license
|
meydany/BuyingAndSelling
|
d7fc6e6aea47cb4db7c1eceb39e666915f6d632e
|
366b9f661f3629a373b693fa50fcfc803d614ee5
|
refs/heads/master
| 2021-03-27T01:05:02.325378 | 2017-05-13T23:12:34 | 2017-05-13T23:12:34 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,230 |
swift
|
//
// SellViewController.swift
// FirebaseTest
//
// Created by Admin on 5/13/17.
// Copyright © 2017 Admin. All rights reserved.
//
import UIKit
import FirebaseDatabase
import Eureka
import FirebaseStorage
class ListItemViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
form +++ Section("Your info")
<<< NameRow(){ row in
row.title = "Seller's Name"
}
<<< NameRow(){ row in
row.title = "Object's Name"
}
<<< IntRow(){ row in
row.title = "Price"
}
<<< ImageRow(){ row in
row.title = "Picture"
row.sourceTypes = [.PhotoLibrary, .Camera]
row.clearAction = .yes(style: UIAlertActionStyle.destructive)
}
.cellUpdate { cell, row in
cell.accessoryView?.layer.cornerRadius = 17
cell.accessoryView?.frame = CGRect(x: 0, y: 0, width: 34, height: 34)
}
<<< TextAreaRow(){row in
row.placeholder = "Description"
}
+++ Section("Section2")
<<< ButtonRow(){
$0.title = "Submit"
}.onCellSelection({ row in
let pic = (self.form.allRows[3] as! ImageRow).value
//self.present(TestVC(pic: pic!), animated: true, completion: nil)
print("submitting")
let rows = self.form.allRows
let storage = FIRStorage.storage()
let picRef = "images/\((rows[1] as! NameRow).value!).png"
let storageRef = storage.reference().child(picRef)
let uploadTask = storageRef.put(UIImagePNGRepresentation(pic!)!, metadata: nil) { metadata, error in
if let error = error {
// Uh-oh, an error occurred!
} else {
// Metadata contains file metadata such as size, content-type, and download URL.
let downloadURL = metadata!.downloadURL()
}
}
var userID = "asdads"
let ref = FIRDatabase.database().reference()
let info = [
"PersonName": (rows[0] as! NameRow).value,
"ObjectName": (rows[1] as! NameRow).value,
"Price": String(describing: (rows[2] as! IntRow).value!),
"picRef": picRef,
"Description": String(describing: (rows[4] as! TextAreaRow).value!),
"UserID": userID
]
CELL_COUNT+=1
ref.child("Listings").child("Object\(CELL_COUNT-1)").setValue(info)
})
}
}
|
[
-1
] |
a4f9b1557f742364588968ee545eb620b22dbefd
|
a88125af7a661d324d70f8de27ad2eb5d0beb85b
|
/Optional.playground/Contents.swift
|
ac544494a7d98af1e39a223cab18961103be0c33
|
[] |
no_license
|
tanutkho/BasicSwift2Jun18
|
689aaa311157c12c1905dd2354a6217a02dff169
|
ea54b7e1e54752b4abbe946a360ab47999b28b5f
|
refs/heads/master
| 2020-03-19T03:58:43.777599 | 2018-06-03T04:15:56 | 2018-06-03T04:15:56 | 135,782,219 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 374 |
swift
|
//: Playground - noun: a place where people can play
import UIKit
var number1Int: Int?
//print("number1 ==> \(number1Int)")
var numberString: String = "five"
// var numberInt: Int = Int(numberString)!
//
// print("My Number ==> \(numberInt)")
if var testNumberInt = Int(numberString) {
print("Work! = \(testNumberInt)")
}
else {
print("Cannot work!")
}
|
[
-1
] |
1b99143e8e5d6e0e841fa2496afb554f653a00e3
|
256bf9324aef9bd9ca87815641e3eb7a6cf60e29
|
/EMUICTProject/Objects/CompanyReport.swift
|
a31506e4e4b15d95a3080366c02da90ef0f2a9f3
|
[] |
no_license
|
lynnsir/EMUICTProject
|
76f9c9d0443b1e4844371a474f652fc92841ee18
|
04f325661995590d58f8aa7f9dd09f7f2be0f753
|
refs/heads/master
| 2021-01-25T13:12:04.953314 | 2018-05-10T04:33:45 | 2018-05-10T04:33:45 | 117,443,445 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 353 |
swift
|
//
// CompanyReport.swift
// EMUICTProject
//
// Created by Lynn on 2/19/2561 BE.
// Copyright © 2561 Sirinda. All rights reserved.
//
import UIKit
class CompanyReport: NSObject {
var companyName : String!
var companyDes: String!
var email : String!
var phone: String!
var imageProfile : String!
var uid: String!
}
|
[
-1
] |
1cc35c9f389b22f89b30d2ce197a6fc02d4d5427
|
9e90e3e0ed3af3003b46d4638721920e6649ec3a
|
/TextureBase/TextureBase/Classes/Sections/Select/SelectViewController.swift
|
8388f3184852bb73f0e31926fd43fb9d2589f976
|
[
"MIT"
] |
permissive
|
JQHee/TextureBase
|
877b8f9ca3972e073b997beb2b91ebb6484ca5f8
|
2cb561d0748b9b1a025e0791b57982b58ecf3c5a
|
refs/heads/master
| 2020-04-10T20:13:24.798175 | 2019-06-10T03:52:22 | 2019-06-10T03:52:22 | 161,260,652 | 0 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 9,985 |
swift
|
//
// SelectViewController.swift
// TextureBase
//
// Created by HJQ on 2018/12/14.
// Copyright © 2018 ml. All rights reserved.
//
import UIKit
import AsyncDisplayKit
// MARK: - 精选
class SelectViewController: ASViewController<ASDisplayNode> {
// MARK: - Life cycle
init() {
super.init(node: ASDisplayNode())
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
title = "精选"
#warning("tabbar挡住列表内容")
self.edgesForExtendedLayout = UIRectEdge.init(rawValue: 0)
self.automaticallyAdjustsScrollViewInsets = false
setupUI()
loadData()
viewBindEvents()
}
deinit {
self.collectionNode.delegate = nil
self.collectionNode.dataSource = nil
}
// MARK: - Private methods
private func setupUI() {
node.addSubnode(collectionNode)
collectionNode.view.snp.makeConstraints { (make) in
if #available(iOS 11.0, *) {
make.edges.equalTo(self.view.safeAreaInsets)
} else {
make.edges.equalToSuperview()
}
}
}
private func loadData() {
requestTopData()
requestListData()
}
func viewBindEvents() {
collectionNode.view.setupRefresh(isNeedFooterRefresh: false, headerCallback: { [weak self] in
guard let `self` = self else {
return
}
self.loadData()
}, footerCallBack: nil)
}
// 请求列表数据
private func requestTopData() {
let request = SelectTopRequest()
selectVM.loadTopData(r: request, successBlock: { [weak self] in
guard let `self` = self else {
return
}
self.handleRequestResult(section: 1)
}) { [weak self] in
guard let `self` = self else {
return
}
self.handleRequestResult(section: 1)
}
}
// 请求广告数据
private func requestListData() {
let request = SelectRequest()
selectVM.loadListData(r: request, successBlock: { [weak self] in
guard let `self` = self else {
return
}
self.handleRequestResult(section: 0)
}) { [weak self] in
guard let `self` = self else {
return
}
self.handleRequestResult(section: 0)
}
}
private func handleRequestResult(section: Int) {
// self.collectionNode.performBatchUpdates({
//
// }) { (finish) in
//
// }
if self.collectionNode.view.mj_header.isRefreshing {
print("123")
self.collectionNode.view.mj_header.endRefreshing()
}
// 不需要自带的刷新动画
UIView.performWithoutAnimation {
collectionNode.cn_reloadIndexPaths = collectionNode.indexPathsForVisibleItems
self.collectionNode.reloadSections(IndexSet.init(integer: section))
}
// self.collectionNode.reloadData()
}
// MARK: - Lazy load
lazy var collectionNode: ASCollectionNode = { [weak self] in
let layout = UICollectionViewFlowLayout()
let clv = ASCollectionNode.init(collectionViewLayout: layout)
clv.delegate = self
clv.dataSource = self
clv.backgroundColor = .white
clv.alwaysBounceVertical = true
clv.leadingScreensForBatching = 1.0
// 使用section
clv.registerSupplementaryNode(ofKind: UICollectionView.elementKindSectionFooter)
return clv
}()
lazy var selectVM = SelectViewModel()
}
// MARK: - ASCollectionDataSource
extension SelectViewController: ASCollectionDataSource {
func numberOfSections(in collectionNode: ASCollectionNode) -> Int {
return 2
}
func collectionNode(_ collectionNode: ASCollectionNode, numberOfItemsInSection section: Int) -> Int {
switch section {
case 0:
return 1
case 1:
return selectVM.listInfos.count
default:
return 0
}
}
// 返回的大小
func collectionNode(_ collectionNode: ASCollectionNode, constrainedSizeForItemAt indexPath: IndexPath) -> ASSizeRange {
if indexPath.section == 0 {
let minSize = CGSize.init(width: node.bounds.width, height: 113)
let maxSize = CGSize.init(width: node.bounds.width, height: 113)
return ASSizeRangeMake(minSize, maxSize)
} else {
let minAndMaxSize = CGSize.init(width: (node.bounds.width - 40) / 3.0, height: 102)
return ASSizeRangeMake(minAndMaxSize, minAndMaxSize)
}
}
func collectionNode(_ collectionNode: ASCollectionNode, nodeBlockForItemAt indexPath: IndexPath) -> ASCellNodeBlock {
if indexPath.section == 0 {
let cellBlock = { [weak self]() -> ASCellNode in
guard let `self` = self else {
return SelectPagerCellNode()
}
let cellNode = SelectPagerCellNode()
cellNode.imageInfos = self.selectVM.infos
cellNode.selectFinishBlock = { (tempModel) in
// 查看广告详情
let VC = BFWebBrowserController.init(urlString: tempModel.address, navigationBarTitle: tempModel.title)
self.navigationController?.pushViewController(VC, animated: true)
}
if ((collectionNode.cn_reloadIndexPaths ?? []).contains(indexPath)) {
cellNode.neverShowPlaceholders = true
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.5, execute: {
cellNode.neverShowPlaceholders = false
})
} else {
cellNode.neverShowPlaceholders = false
}
return cellNode
}
return cellBlock
} else {
let model = selectVM.listInfos[indexPath.row]
let cellBlock = { () -> ASCellNode in
let cellNode = SelectItemCellNode()
cellNode.item = model
if ((collectionNode.cn_reloadIndexPaths ?? []).contains(indexPath)) {
cellNode.neverShowPlaceholders = true
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.5, execute: {
cellNode.neverShowPlaceholders = false
})
} else {
cellNode.neverShowPlaceholders = false
}
return cellNode
}
return cellBlock
}
}
}
// MARK: - ASCollectionDelegate
extension SelectViewController: ASCollectionDelegate {
func collectionNode(_ collectionNode: ASCollectionNode, didSelectItemAt indexPath: IndexPath) {
if indexPath.section > 0 {
let model = selectVM.listInfos[indexPath.row]
print(model.id)
let VC = InfomationListViewController()
VC.topId = String(model.topicId)
VC.sourceType = model.sourceType
VC.title = model.topicName
self.navigationController?.pushViewController(VC, animated: true)
}
}
// footer
func collectionNode(_ collectionNode: ASCollectionNode, nodeForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> ASCellNode {
if indexPath.section == 0 && kind == UICollectionView.elementKindSectionFooter {
let cellNode = ASCellNode()
cellNode.backgroundColor = UIColor.init(red: 241/255.0, green: 241/255.0, blue: 241/255.0, alpha: 1.0)
cellNode.style.preferredSize = CGSize.init(width: view.bounds.width, height: 6.0)
return cellNode
}
return ASCellNode()
}
}
// MARK: - ASCollectionDelegate
extension SelectViewController: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize {
if section == 0 {
return CGSize.init(width: view.bounds.width, height: 6)
}
return .zero
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
if section == 0 {
return UIEdgeInsets.init(top: 15, left: 0, bottom: 15, right: 0)
} else if section == 1 {
return UIEdgeInsets.init(top: 20, left: 10, bottom: 20, right: 10)
}
return .zero
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
if section == 1 {
return 35
}
return 0
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 0
}
}
// MARK: - configData
extension SelectViewController {
// 这个方法返回一个 Bool 值,用于告诉 tableNode 是否需要批抓取 (添加一个hasNodata标识,滑动时会触发加载)
func shouldBatchFetch(for collectionNode: ASCollectionNode) -> Bool {
return false
}
func collectionNode(_ collectionNode: ASCollectionNode, willBeginBatchFetchWith context: ASBatchContext) {
context.beginBatchFetching()
#warning("需要放在主线程")
// [self.mainTableNode insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone];
context.completeBatchFetching(true)
}
}
|
[
-1
] |
4f0d071b3f244c02340e2bd67ce13d79c9d27354
|
08befe0be64014136e610eb9b0ae63a1efc2cb50
|
/profileApp/profileApp/AppDelegate.swift
|
af49515a3a08dd0ca5f1f86dcf2acea3f9438189
|
[] |
no_license
|
AVG-Apps/Profile-App
|
5252f36b53c87f62ca3688fea282292261348264
|
25371d5cfc73bf0235ac84248695975c66ac4508
|
refs/heads/master
| 2020-04-06T11:26:24.777123 | 2018-11-13T21:54:26 | 2018-11-13T21:54:26 | 157,417,131 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,130 |
swift
|
//
// AppDelegate.swift
// profileApp
//
// Created by Aron van Groningen on 13/11/2018.
// Copyright © 2018 Aron van Groningen. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
|
[
229380,
229383,
229385,
278539,
294924,
229388,
278542,
229391,
327695,
278545,
229394,
278548,
229397,
229399,
229402,
352284,
229405,
278556,
278559,
229408,
278564,
294950,
229415,
229417,
327722,
237613,
229422,
360496,
229426,
237618,
229428,
311349,
286774,
286776,
319544,
286778,
204856,
229432,
286791,
237640,
286797,
278605,
311375,
163920,
196692,
319573,
311383,
278623,
278626,
319590,
311400,
278635,
303212,
278639,
131192,
278648,
237693,
303230,
327814,
303241,
131209,
417930,
303244,
311436,
319633,
286873,
286876,
311460,
311469,
32944,
327862,
286906,
327866,
180413,
286910,
286916,
286922,
286924,
286926,
286928,
131281,
278743,
278747,
295133,
155872,
319716,
237807,
303345,
286962,
229622,
327930,
278781,
278783,
278785,
237826,
319751,
286987,
319757,
311569,
286999,
319770,
287003,
287006,
287009,
287012,
287014,
287016,
287019,
311598,
287023,
262448,
311601,
295220,
155966,
319809,
319810,
278849,
319814,
311623,
319818,
311628,
229709,
319822,
287054,
278865,
229717,
196963,
196969,
139638,
213367,
106872,
319872,
311683,
319879,
311693,
65943,
319898,
311719,
278952,
139689,
278957,
311728,
278967,
180668,
311741,
278975,
319938,
278980,
278983,
319945,
278986,
278990,
278994,
311767,
279003,
279006,
188895,
172512,
287202,
279010,
279015,
172520,
319978,
279020,
172526,
311791,
279023,
172529,
279027,
319989,
172534,
180727,
164343,
279035,
311804,
287230,
279040,
303617,
287234,
279045,
172550,
303623,
172552,
320007,
287238,
279051,
172558,
279055,
303632,
279058,
303637,
279063,
279067,
172572,
279072,
172577,
295459,
172581,
295461,
279082,
279084,
172591,
172598,
279095,
172607,
172609,
172612,
377413,
172614,
172618,
303690,
33357,
303696,
279124,
172634,
262752,
172644,
311911,
189034,
295533,
172655,
172656,
352880,
295538,
189039,
172660,
287349,
189040,
189044,
287355,
287360,
295553,
172675,
295557,
311942,
303751,
287365,
352905,
311946,
279178,
287371,
311951,
287377,
172691,
287381,
311957,
221850,
287386,
230045,
172702,
287390,
303773,
172705,
287394,
172707,
303780,
164509,
287398,
205479,
279208,
287400,
172714,
295595,
279212,
189102,
172721,
287409,
66227,
303797,
189114,
287419,
328381,
287423,
328384,
172737,
279231,
287427,
312005,
312006,
107208,
172748,
287436,
107212,
172751,
287440,
295633,
172755,
303827,
279255,
287450,
303835,
279258,
189149,
303838,
213724,
312035,
279267,
295654,
279272,
230128,
312048,
312050,
230131,
205564,
303871,
230146,
328453,
295685,
230154,
33548,
312077,
295695,
295701,
230169,
369433,
295707,
328476,
295710,
230175,
295720,
303914,
279340,
279353,
230202,
312124,
328508,
222018,
295755,
377676,
148302,
287569,
303959,
230237,
279390,
230241,
279394,
303976,
336744,
303985,
303987,
328563,
303991,
303997,
295806,
295808,
295813,
304005,
320391,
304007,
213895,
304009,
304011,
304013,
295822,
279438,
213902,
189329,
295825,
304019,
189331,
58262,
304023,
304027,
279452,
279461,
279462,
304042,
213931,
230327,
304055,
287675,
230334,
304063,
238528,
304065,
213954,
189378,
156612,
197580,
312272,
304084,
304090,
320481,
304106,
320490,
312302,
328687,
320496,
304114,
295928,
320505,
295945,
230413,
295949,
197645,
320528,
140312,
295961,
238620,
304164,
304170,
304175,
238641,
238652,
238655,
230465,
238658,
336964,
132165,
296004,
205895,
320584,
238666,
296021,
402518,
336987,
230497,
296036,
296040,
361576,
205931,
296044,
279661,
205934,
164973,
312432,
279669,
337018,
189562,
279679,
304258,
279683,
222340,
205968,
296084,
238745,
304285,
238756,
205991,
222377,
165035,
337067,
238766,
165038,
230576,
238770,
304311,
230592,
312518,
279750,
230600,
230607,
148690,
320727,
279769,
304348,
279777,
304354,
296163,
320740,
279781,
304360,
320748,
279788,
279790,
304370,
296189,
320771,
312585,
296202,
296205,
230674,
320786,
230677,
296213,
296215,
320792,
230681,
230679,
214294,
304416,
230689,
173350,
312622,
296243,
312630,
222522,
296253,
222525,
296255,
312639,
296259,
378181,
296262,
230727,
238919,
296264,
320840,
296267,
296271,
222545,
230739,
312663,
222556,
337244,
230752,
312676,
230760,
173418,
148843,
410987,
230763,
230768,
296305,
312692,
230773,
304505,
304506,
181626,
279929,
181631,
148865,
312711,
312712,
296331,
288140,
288144,
230800,
304533,
337306,
288154,
288160,
173472,
288162,
288164,
279975,
304555,
370092,
279983,
173488,
288176,
279985,
312755,
296373,
312759,
337335,
288185,
279991,
222652,
312766,
173507,
296389,
222665,
230860,
312783,
288208,
230865,
288210,
370130,
288212,
222676,
288214,
280021,
239064,
329177,
288217,
280027,
288220,
288218,
239070,
288224,
280034,
288226,
280036,
288229,
280038,
288230,
288232,
370146,
288234,
288236,
288238,
288240,
288242,
296435,
288244,
288250,
296446,
321022,
402942,
148990,
296450,
206336,
230916,
230919,
230923,
304651,
304653,
370187,
230940,
222752,
108066,
296486,
296488,
157229,
230961,
157236,
288320,
288325,
124489,
280145,
288338,
280149,
288344,
280152,
239194,
280158,
403039,
370272,
239202,
312938,
280183,
280185,
280188,
280191,
116354,
280194,
280208,
280211,
288408,
280218,
280222,
190118,
198310,
321195,
296622,
321200,
337585,
296626,
296634,
296637,
313027,
280260,
206536,
280264,
206539,
206541,
206543,
313044,
280276,
321239,
280283,
313052,
18140,
288478,
313055,
321252,
313066,
288494,
280302,
313073,
321266,
419570,
288499,
288502,
280314,
288510,
124671,
67330,
280324,
198405,
288519,
280331,
198416,
296723,
116503,
321304,
329498,
296731,
321311,
313121,
313123,
304932,
321316,
280363,
141101,
165678,
280375,
321336,
296767,
288576,
345921,
280388,
304968,
280393,
280402,
173907,
313171,
313176,
42842,
280419,
321381,
296809,
296812,
313201,
1920,
255873,
305028,
280454,
247688,
124817,
280468,
239510,
280473,
124827,
247709,
214944,
313258,
321458,
296883,
124853,
214966,
296890,
10170,
288700,
296894,
190403,
296900,
280515,
337862,
165831,
280521,
231379,
296921,
239586,
313320,
231404,
124913,
165876,
321528,
239612,
313340,
288764,
239617,
313347,
288773,
313358,
305176,
321560,
313371,
354338,
305191,
223273,
313386,
354348,
124978,
215090,
124980,
288824,
288826,
321595,
378941,
313406,
288831,
288836,
67654,
280651,
354382,
288848,
280658,
215123,
354390,
288855,
288859,
280669,
313438,
149599,
280671,
149601,
321634,
149603,
223327,
313451,
223341,
280687,
149618,
215154,
313458,
280691,
313464,
329850,
321659,
288895,
321670,
215175,
288909,
141455,
141459,
313498,
100520,
288936,
288940,
288947,
280755,
321717,
280759,
280764,
280769,
280771,
280774,
280776,
313548,
321740,
280783,
280786,
280788,
313557,
280793,
280796,
280798,
338147,
280804,
280807,
157930,
280811,
280817,
125171,
157940,
280819,
182517,
280823,
280825,
280827,
280830,
280831,
280833,
125187,
280835,
125191,
125207,
125209,
321817,
125218,
321842,
223539,
125239,
280888,
280891,
289087,
280897,
280900,
305480,
239944,
280906,
239947,
305485,
305489,
280919,
354653,
313700,
313705,
280937,
190832,
280946,
223606,
313720,
280956,
239997,
280959,
313731,
199051,
240011,
289166,
240017,
297363,
190868,
240021,
297365,
297368,
297372,
141725,
297377,
289186,
297391,
289201,
240052,
289207,
289210,
305594,
281024,
289218,
289221,
289227,
281047,
215526,
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,
338528,
338532,
281190,
199273,
281196,
19053,
158317,
313973,
297594,
281210,
158347,
133776,
314003,
117398,
314007,
289436,
174754,
330404,
289448,
133801,
174764,
314029,
314033,
240309,
133817,
314045,
314047,
314051,
199364,
297671,
158409,
289493,
363234,
289513,
289522,
289525,
289532,
322303,
289537,
322310,
264969,
322314,
322318,
281361,
281372,
322341,
215850,
281388,
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,
281581,
322550,
322563,
314372,
175134,
322599,
322610,
314421,
281654,
314427,
314433,
207937,
314441,
322642,
314456,
281691,
314461,
281702,
281704,
281711,
289912,
248995,
306341,
306344,
306347,
322734,
306354,
142531,
199877,
289991,
306377,
289997,
249045,
363742,
363745,
298216,
330988,
216303,
322801,
388350,
257302,
363802,
199976,
199978,
314671,
298292,
298294,
216376,
380226,
298306,
224587,
224594,
216404,
306517,
150870,
314714,
224603,
159068,
314718,
314723,
281960,
150890,
306539,
314732,
314736,
290161,
216436,
306549,
298358,
314743,
306552,
290171,
314747,
306555,
298365,
290174,
224641,
281987,
298372,
314756,
281990,
224647,
298377,
314763,
314768,
224657,
306581,
314773,
314779,
314785,
314793,
282025,
282027,
241068,
241070,
241072,
282034,
150966,
298424,
306618,
282044,
323015,
306635,
306640,
290263,
290270,
290275,
339431,
282089,
191985,
282098,
290291,
282101,
241142,
191992,
290298,
151036,
290302,
290305,
306694,
192008,
323084,
257550,
282127,
290321,
282130,
290325,
282133,
241175,
290328,
290332,
241181,
282142,
282144,
290344,
306731,
290349,
290351,
290356,
28219,
282186,
224849,
282195,
282201,
306778,
159324,
159330,
314979,
298598,
323176,
224875,
241260,
323181,
257658,
315016,
282249,
290445,
324757,
282261,
298651,
282269,
323229,
298655,
323231,
61092,
282277,
306856,
282295,
323260,
282300,
323266,
282310,
323273,
282319,
306897,
241362,
306904,
282328,
298714,
52959,
216801,
282337,
241380,
216806,
323304,
282345,
12011,
282356,
323318,
282364,
282367,
306945,
323330,
241412,
323333,
282376,
216842,
323345,
282388,
323349,
282392,
184090,
315167,
315169,
282402,
315174,
323367,
241448,
315176,
241450,
282410,
306988,
306991,
315184,
323376,
315190,
241464,
159545,
282425,
298811,
118593,
307009,
413506,
307012,
298822,
315211,
307027,
315221,
315223,
241496,
241498,
307035,
307040,
110433,
282465,
241509,
110438,
298860,
110445,
282478,
315249,
110450,
315251,
315253,
315255,
339838,
315267,
282499,
315269,
241544,
282505,
241546,
241548,
298896,
298898,
282514,
241556,
298901,
44948,
241560,
282520,
241563,
241565,
241567,
241569,
282531,
241574,
282537,
298922,
241581,
241583,
323504,
241586,
282547,
241588,
290739,
241590,
241592,
241598,
290751,
241600,
241605,
151495,
241610,
298975,
241632,
298984,
241643,
298988,
241646,
241649,
241652,
323574,
290807,
299003,
241661,
299006,
282623,
315396,
241669,
315397,
282632,
282639,
290835,
282645,
241693,
241701,
102438,
217127,
282669,
323630,
282681,
290877,
282687,
159811,
315463,
315466,
192589,
307278,
192596,
307287,
307290,
217179,
315482,
192605,
315483,
233567,
299105,
200801,
217188,
299109,
307303,
315495,
356457,
45163,
307307,
315502,
192624,
307314,
323700,
299126,
233591,
299136,
307329,
307338,
233613,
241813,
307352,
299164,
299167,
315552,
184479,
184481,
184486,
307370,
307372,
307374,
307376,
323763,
184503,
176311,
299191,
307386,
258235,
307388,
307385,
307390,
176316,
299200,
307394,
299204,
307396,
184518,
307399,
323784,
233679,
307409,
307411,
299225,
233701,
307432,
282881,
282893,
291089,
282906,
291104,
233766,
295583,
307508,
315701,
332086,
307510,
307512,
307515,
307518,
282942,
282947,
323917,
110926,
282957,
233808,
323921,
315733,
323926,
233815,
276052,
315739,
323932,
299357,
242018,
242024,
299373,
315757,
250231,
242043,
315771,
299391,
291202,
299398,
242057,
291212,
299405,
291222,
315801,
283033,
242075,
291226,
194654,
61855,
291231,
283042,
291238,
291241,
127403,
127405,
291247,
299440,
127407,
299444,
127413,
283062,
291254,
127417,
291260,
283069,
127421,
127424,
299457,
127429,
127431,
127434,
315856,
176592,
315860,
176597,
127447,
283095,
299481,
176605,
242143,
127457,
291299,
127463,
242152,
291305,
127466,
176620,
127469,
127474,
291314,
291317,
127480,
135672,
291323,
233979,
127485,
291330,
283142,
127494,
127497,
233994,
135689,
127500,
233998,
127506,
234003,
234006,
127511,
152087,
283161,
242202,
234010,
135707,
135710,
242206,
242208,
291361,
242220,
291378,
152118,
234038,
234041,
315961,
70213,
242250,
111193,
242275,
299620,
242279,
168562,
184952,
135805,
135808,
291456,
373383,
135820,
316051,
225941,
316054,
299672,
135834,
373404,
299677,
135839,
299680,
225954,
299684,
135844,
242343,
209576,
242345,
373421,
135870,
135873,
135876,
135879,
299720,
299723,
299726,
225998,
226002,
119509,
226005,
226008,
299740,
201444,
299750,
283368,
234219,
283372,
226037,
283382,
316151,
234231,
234236,
226045,
242431,
234239,
209665,
234242,
299778,
242436,
226053,
234246,
226056,
234248,
291593,
242443,
234252,
242445,
234254,
291601,
234258,
242450,
242452,
234261,
348950,
201496,
234264,
234266,
234269,
283421,
234272,
234274,
152355,
299814,
234278,
283432,
234281,
234284,
234287,
283440,
185138,
242483,
234292,
234296,
234298,
160572,
283452,
234302,
234307,
242499,
234309,
316233,
234313,
316235,
234316,
283468,
234319,
242511,
234321,
234324,
185173,
201557,
234329,
234333,
308063,
234336,
242530,
349027,
234338,
234341,
234344,
234347,
177004,
234350,
324464,
234353,
152435,
177011,
234356,
234358,
234362,
226171,
234364,
291711,
234368,
291714,
234370,
291716,
234373,
316294,
201603,
226182,
308105,
234375,
226185,
234379,
324490,
234384,
234388,
234390,
324504,
234393,
209818,
308123,
324508,
234396,
291742,
226200,
234398,
234401,
291747,
291748,
234405,
291750,
234407,
324520,
324518,
324522,
234410,
291756,
291754,
226220,
324527,
291760,
234417,
201650,
324531,
234414,
234422,
226230,
324536,
275384,
234428,
291773,
242623,
324544,
234431,
234434,
324546,
324548,
234437,
226245,
234439,
226239,
234443,
291788,
234446,
275406,
193486,
234449,
316370,
193488,
234452,
234455,
234459,
234461,
234464,
234467,
234470,
168935,
5096,
324585,
234475,
234478,
316400,
234481,
316403,
234484,
234485,
234487,
324599,
234490,
234493,
316416,
234496,
308226,
234501,
275462,
308231,
234504,
234507,
234510,
234515,
300054,
316439,
234520,
234519,
234523,
234526,
234528,
300066,
234532,
300069,
234535,
234537,
234540,
144430,
234543,
234546,
275508,
300085,
234549,
300088,
234553,
234556,
234558,
316479,
234561,
316483,
160835,
234563,
308291,
234568,
234570,
316491,
234572,
300108,
234574,
300115,
234580,
234581,
242777,
234585,
275545,
234590,
234593,
234595,
234597,
300133,
234601,
300139,
234605,
160879,
234607,
275569,
234610,
316530,
300148,
234614,
398455,
144506,
234618,
234620,
275579,
234623,
226433,
234627,
275588,
234629,
242822,
234634,
234636,
177293,
234640,
275602,
234643,
308373,
226453,
234647,
275606,
275608,
234650,
308379,
234648,
300189,
324766,
119967,
234653,
324768,
283805,
234657,
242852,
300197,
234661,
283813,
234664,
275626,
234667,
316596,
308414,
234687,
300223,
300226,
308418,
234692,
300229,
308420,
308422,
283844,
226500,
300234,
283850,
300238,
300241,
316625,
300243,
300245,
316630,
300248,
300253,
300256,
300258,
300260,
234726,
300263,
300265,
300267,
161003,
300270,
300272,
120053,
300278,
275703,
316663,
300284,
275710,
300287,
292097,
300289,
300292,
300294,
275719,
234760,
177419,
300299,
242957,
300301,
283917,
177424,
275725,
349464,
283939,
259367,
292143,
283951,
300344,
243003,
283963,
226628,
300357,
283973,
283983,
316758,
357722,
316766,
316768,
292192,
218464,
292197,
316774,
218473,
284010,
136562,
324978,
275834,
275836,
275840,
316803,
316806,
316811,
316814,
226703,
300433,
234899,
300436,
226709,
357783,
316824,
316826,
144796,
300448,
144807,
144810,
144812,
284076,
144814,
227426,
144820,
374196,
284084,
292279,
284087,
144826,
144828,
144830,
144832,
144835,
144837,
38342,
144839,
144841,
144844,
144847,
144852,
144855,
103899,
300507,
333280,
226787,
218597,
292329,
300523,
259565,
300527,
308720,
259567,
292338,
226802,
316917,
292343,
308727,
300537,
316933,
316947,
308757,
308762,
284191,
284194,
284196,
235045,
284199,
284204,
284206,
284209,
284211,
194101,
284213,
316983,
194103,
284215,
308790,
284218,
226877,
292414,
284223,
284226,
284228,
292421,
226886,
284231,
128584,
243268,
284234,
366155,
317004,
276043,
284238,
226895,
284241,
194130,
284243,
300628,
284245,
292433,
284247,
317015,
235097,
243290,
276053,
284249,
284251,
300638,
284253,
284255,
284258,
292452,
292454,
284263,
284265,
292458,
284267,
292461,
284272,
284274,
284278,
292470,
276086,
292473,
284283,
276093,
284286,
276095,
284288,
292481,
284290,
325250,
284292,
292485,
292479,
276098,
284297,
317066,
284299,
317068,
284301,
276109,
284303,
284306,
276114,
284308,
284312,
284314,
284316,
276127,
284320,
284322,
284327,
284329,
317098,
284331,
276137,
284333,
284335,
276144,
284337,
284339,
300726,
284343,
284346,
284350,
358080,
276160,
284354,
358083,
284358,
276166,
358089,
284362,
276170,
284365,
276175,
284368,
276177,
284370,
358098,
284372,
317138,
284377,
276187,
284379,
284381,
284384,
358114,
284386,
358116,
276197,
317158,
358119,
284392,
325353,
358122,
284394,
284397,
358126,
284399,
358128,
276206,
358133,
358135,
276216,
358138,
300795,
358140,
284413,
358142,
358146,
317187,
284418,
317189,
317191,
284428,
300816,
300819,
317207,
284440,
300828,
300830,
276255,
300832,
325408,
300834,
317221,
227109,
358183,
276268,
300845,
243504,
300850,
284469,
276280,
325436,
358206,
276291,
366406,
276295,
292681,
153417,
358224,
276308,
284502,
317271,
276315,
292700,
317279,
284511,
227175,
292715,
300912,
292721,
284529,
300915,
292729,
317306,
284540,
292734,
325512,
276365,
317332,
358292,
284564,
284566,
350106,
284572,
276386,
284579,
276388,
358312,
317353,
284585,
276395,
292784,
358326,
161718,
358330,
276410,
276411,
276418,
301009,
301011,
301013,
292823,
358360,
301017,
301015,
292828,
276446,
153568,
276448,
276452,
292839,
276455,
292843,
276460,
276464,
178161,
227314,
276466,
325624,
276472,
317435,
276476,
276479,
276482,
276485,
317446,
276490,
292876,
317456,
276496,
317458,
178195,
243733,
243740,
317468,
317472,
325666,
243751,
292904,
276528,
243762,
309298,
325685,
325689,
235579,
325692,
235581,
178238,
276539,
276544,
284739,
325700,
292934,
243785,
276553,
350293,
350295,
309337,
194649,
227418,
350302,
227423,
350304,
178273,
309346,
194657,
194660,
350308,
309350,
309348,
292968,
309352,
309354,
301163,
350313,
350316,
227430,
301167,
276583,
350321,
276590,
284786,
276595,
350325,
252022,
227440,
350328,
292985,
301178,
350332,
292989,
301185,
292993,
350339,
317570,
317573,
350342,
350345,
350349,
301199,
317584,
325777,
350354,
350357,
350359,
350362,
350366,
276638,
284837,
350375,
350379,
350381,
350383,
129200,
350385,
350387,
350389,
350395,
350397,
350399,
227520,
350402,
227522,
301252,
350406,
227529,
301258,
309450,
276685,
309455,
276689,
309462,
301272,
194780,
309468,
309471,
301283,
317672,
317674,
325867,
243948,
227571,
309491,
309494,
243960,
276735,
227583,
227587,
276739,
276742,
227593,
227596,
325910,
309530,
342298,
211232,
317729,
276775,
211241,
325937,
325943,
211260,
260421,
276809,
285002,
276811,
235853,
235858,
276829,
276833,
391523,
276836,
293227,
276843,
293232,
276848,
186744,
211324,
227709,
285061,
317833,
178572,
285070,
285077,
227738,
317853,
276896,
317858,
342434,
285093,
317864,
285098,
276907,
235955,
276917,
293304,
293307,
293314,
309707,
317910,
293336,
235996,
317917,
293343,
358880,
276961,
227810,
293346,
276964,
293352,
236013,
293364,
301562,
293370,
317951,
309764,
301575,
121352,
293387,
236043,
342541,
113167,
309779,
317971,
309781,
277011,
227877,
227879,
293417,
227882,
309804,
293421,
105007,
236082,
23094,
277054,
129603,
301636,
318020,
301639,
301643,
277071,
285265,
399955,
309844,
277080,
309849,
285277,
285282,
326244,
318055,
277100,
309871,
121458,
277106,
170619,
309885,
309888,
277122,
277128,
285320,
301706,
318092,
326285,
334476,
318094,
277136,
277139,
227992,
318108,
285340,
318110,
227998,
137889,
383658,
285357,
318128,
277170,
293555,
318132,
342707,
154292,
277173,
285368,
277177,
277181,
318144,
277187,
277191,
277194,
277196,
277201,
137946,
113378,
228069,
277223,
342760,
285417,
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,
301884,
310080,
293696,
277317,
277322,
162643,
310100,
301911,
301913,
277337,
301921,
400236,
236397,
162671,
326514,
310134,
236408,
15224,
277368,
416639,
416640,
113538,
310147,
416648,
39817,
187274,
277385,
301972,
424853,
277405,
277411,
310179,
293798,
293802,
236460,
277426,
276579,
293811,
293817,
293820,
203715,
326603,
276586,
293849,
293861,
228327,
228328,
318442,
228330,
228332,
326638,
277486,
318450,
293876,
293877,
285686,
302073,
121850,
293882,
302075,
285690,
244731,
293887,
277504,
277507,
277511,
293899,
277519,
293908,
302105,
293917,
293939,
318516,
277561,
277564,
310336,
293956,
277573,
228422,
293960,
310344,
277577,
277583,
203857,
293971,
310355,
310359,
236632,
277594,
138332,
277598,
203872,
277601,
285792,
310374,
203879,
310376,
228460,
318573,
203886,
187509,
285815,
367737,
285817,
302205,
285821,
392326,
285831,
253064,
294026,
302218,
285835,
162964,
384148,
187542,
302231,
285849,
302233,
285852,
302237,
285854,
285856,
302241,
285862,
277671,
302248,
64682,
277678,
294063,
294065,
302258,
277687,
294072,
318651,
294076,
277695,
318657,
244930,
302275,
130244,
302277,
228550,
302282,
310476,
302285,
302288,
310481,
302290,
203987,
302292,
302294,
310486,
302296,
384222,
310498,
285927,
318698,
302315,
195822,
228592,
294132,
138485,
228601,
204026,
228606,
64768,
310531,
285958,
138505,
228617,
318742,
277798,
130345,
113964,
285997,
285999,
113969,
318773,
318776,
286010,
417086,
286016,
302403,
294211,
384328,
294221,
294223,
326991,
179547,
146784,
302436,
294246,
327015,
310632,
327017,
351594,
351607,
310648,
310651,
310657,
351619,
294276,
310659,
327046,
253320,
310665,
318858,
310672,
351633,
310689,
130468,
228776,
277932,
310703,
310710,
130486,
310712,
310715,
302526,
228799,
302534,
310727,
245191,
64966,
163272,
302541,
302543,
310737,
228825,
163290,
310749,
310755,
187880,
310764,
286188,
310772,
40440,
212472,
40443,
286203,
310780,
40448,
228864,
286214,
228871,
302603,
65038,
302614,
302617,
286233,
302621,
286240,
146977,
187939,
40484,
294435,
40486,
286246,
294440,
40488,
294439,
294443,
40491,
294445,
278057,
310831,
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,
294521,
343679,
294537,
310925,
286354,
278163,
302740,
122517,
278168,
179870,
327333,
229030,
278188,
278192,
319153,
278196,
302781,
319171,
302789,
294599,
278216,
294601,
302793,
343757,
212690,
319187,
286420,
278227,
229076,
286425,
319194,
278235,
278238,
229086,
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,
294776,
294785,
327554,
40851,
294811,
237470,
319390,
40865,
319394,
294817,
294821,
311209,
180142,
343983,
294831,
188340,
40886,
294844,
294847,
237508,
393177,
294876,
294879,
294883,
294890,
311279,
278513,
237555,
311283,
278516,
278519,
237562
] |
5815d8b7f26cecd71db972eb99a106e17d186b0f
|
3e8c2ce6c2523cc41bcc40a000f19e71a90d34c3
|
/MediaFinder/Controller/Media/FavouriteVC.swift
|
c92226e268978e4862bc4e5b4a22db4e7bdfe8a5
|
[] |
no_license
|
MohamedTarekBar/MediaFinderWithBahnasy
|
01d05c70bdc80aca086d58f9d08151602ec082b8
|
373c1cefeea3a9f7be523dd2fa2640b26d56e201
|
refs/heads/main
| 2023-02-17T00:25:28.933512 | 2021-01-16T19:47:09 | 2021-01-16T19:47:09 | 330,243,214 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,164 |
swift
|
//
// FavouriteCV.swift
// ToDoList
//
// Created by MohamedTarek on 07/01/2021.
//
import UIKit
class FavouriteVC: UIViewController, UITabBarControllerDelegate {
@IBOutlet weak var collectionView: UICollectionView!
var media :[Media]?
let nib = UINib(nibName: "CollectionViewCell", bundle: nil)
let reuseIdentifier = "cell"
override func viewDidLoad() {
super.viewDidLoad()
setup()
getMediaFromHistory()
}
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
let tabBarIndex = tabBarController.selectedIndex
if tabBarIndex == 2 {
getMediaFromHistory()
}
}
func setup() {
self.tabBarController?.delegate = self
collectionView.delegate = self
collectionView.dataSource = self
collectionView.layoutIfNeeded()
collectionView.register(nib, forCellWithReuseIdentifier: reuseIdentifier)
let layout = UICollectionViewFlowLayout()
layout.itemSize = CGSize(width: 120, height: 120)
collectionView.collectionViewLayout = layout
}
func getMediaFromHistory() {
guard let email = DefaultManager.currentUser?.email else {return}
media = LocalStorage.shared.getArrOfMedia(email: email)
self.collectionView.reloadData()
}
override func viewWillAppear(_ animated: Bool) {
self.collectionView.reloadData()
}
}
extension FavouriteVC: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return media?.count ?? 0
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! CollectionViewCell
guard media != nil else {
return UICollectionViewCell()
}
cell.imageView.downladImage(urlString: media![indexPath.row].artworkUrl100)
cell.trackName.text = media![indexPath.row].trackName
cell.descriptionLabel.text = media![indexPath.row].longDescription
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let kind = media![indexPath.row].kind else {return}
guard let media = media else {return}
if kind == dataType.music.rawValue {
let playerVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(identifier: "PlayerVC") as! PlayerVC
playerVC.media = media[indexPath.row]
self.navigationController?.pushViewController(playerVC, animated: true)
}
if kind == dataType.movie.rawValue || kind == dataType.tv.rawValue {
mediaPlayer.media.playVideo(stringUrl: media[indexPath.row].previewUrl, self)
mediaPlayer.media.PlayMedia(type: .movie)
}
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: self.collectionView.frame.width/2-5, height: self.collectionView.frame.height/2-5)
}
}
@IBDesignable extension UIView {
@IBInspectable var borderColor:UIColor? {
set {
layer.borderColor = newValue!.cgColor
}
get {
if let color = layer.borderColor {
return UIColor(cgColor:color)
}
else {
return nil
}
}
}
@IBInspectable var borderWidth:CGFloat {
set {
layer.borderWidth = newValue
}
get {
return layer.borderWidth
}
}
@IBInspectable var cornerRadius:CGFloat {
set {
layer.cornerRadius = newValue
clipsToBounds = newValue > 0
}
get {
return layer.cornerRadius
}
}
}
|
[
-1
] |
6a603ae3f33b877c5fc8711bf5e9c73f6ecd5ad6
|
616f77f804a2197833f984161c682c338c185cd4
|
/Hitch/ContainerViewController.swift
|
325cb90348cf56c281e7b984b806129351a838e1
|
[] |
no_license
|
oronbz/Hitch
|
f83ccd5c855bb97ea31d94fb5e6ae7d26100b738
|
ae339484356881fd6394917aad4d3c92b0f2cb63
|
refs/heads/master
| 2021-07-03T00:09:39.603768 | 2017-09-25T16:22:07 | 2017-09-25T16:22:07 | 104,566,439 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 5,787 |
swift
|
//
// ContainerViewController.swift
// Hitch
//
// Created by Oron Ben Zvi on 9/23/17.
// Copyright © 2017 Oron Ben Zvi. All rights reserved.
//
import UIKit
import QuartzCore
enum SlideOutState {
case collapsed
case expanded
}
enum ShowViewController {
case home
}
private var showViewController: ShowViewController = .home
class ContainerViewController: UIViewController {
var home: HomeViewController!
var menu: MenuViewController!
var centerController: UIViewController!
var currentState: SlideOutState = .collapsed {
didSet {
let showShadow = currentState == .expanded
shouldShowShadow(showShadow)
}
}
var whiteCoverView: UIView?
var tap: UITapGestureRecognizer?
var isHidden = false
let centerPanelExpandedOffset: CGFloat = 254
override func viewDidLoad() {
super.viewDidLoad()
initCenter(screen: showViewController)
}
func initCenter(screen: ShowViewController) {
var presentingController: UIViewController
showViewController = screen
if home == nil {
home = UIStoryboard.homeViewController()
home.delegate = self
}
presentingController = home
if let controller = centerController {
controller.view.removeFromSuperview()
controller.removeFromParentViewController()
}
centerController = presentingController
view.addSubview(centerController.view)
addChildViewController(centerController)
centerController.didMove(toParentViewController: self)
}
override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation {
return UIStatusBarAnimation.slide
}
override var prefersStatusBarHidden: Bool {
return isHidden
}
}
extension ContainerViewController: CenterViewControllerDelegate {
func toggleLeftPanel() {
let notAlreadyExpanded = (currentState != .expanded)
if notAlreadyExpanded {
addLeftPanelViewController()
}
animateLeftPanel(shouldExpand: notAlreadyExpanded)
}
func addLeftPanelViewController() {
if menu == nil {
menu = UIStoryboard.menuViewController()
addChildSidePanelViewController(menu)
}
}
func addChildSidePanelViewController(_ sidePanelController: MenuViewController) {
view.insertSubview(sidePanelController.view, at: 0)
addChildViewController(sidePanelController)
sidePanelController.didMove(toParentViewController: self)
}
func animateLeftPanel(shouldExpand: Bool) {
isHidden = !isHidden
if shouldExpand {
animateStatusBar()
setupWhiteCoverView()
currentState = .expanded
animateCenterXPosition(targetPosition: centerPanelExpandedOffset)
} else {
animateStatusBar()
hideWhiteCoverView()
animateCenterXPosition(targetPosition: 0) { finished in
if finished {
self.currentState = .collapsed
self.menu = nil
}
}
}
}
func animateCenterXPosition(targetPosition: CGFloat, completion: ((Bool) -> Void)? = nil) {
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: .curveEaseInOut, animations: {
self.centerController.view.frame.origin.x = targetPosition
}, completion: completion)
}
func setupWhiteCoverView() {
let whiteCoverView = UIView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height))
whiteCoverView.alpha = 0.0
whiteCoverView.backgroundColor = UIColor.white
centerController.view.addSubview(whiteCoverView)
whiteCoverView.fadeTo(alpha: 0.75, withDuration: 0.2)
self.whiteCoverView = whiteCoverView
let tap = UITapGestureRecognizer(target: self, action: #selector(animateLeftPanel(shouldExpand:)))
tap.numberOfTapsRequired = 1
centerController.view.addGestureRecognizer(tap)
self.tap = tap
}
func hideWhiteCoverView() {
if let tap = tap {
centerController.view.removeGestureRecognizer(tap)
}
UIView.animate(withDuration: 0.2, animations: {
self.whiteCoverView?.alpha = 0.0
}, completion: { finished in
if finished {
self.whiteCoverView?.removeFromSuperview()
self.whiteCoverView = nil
}
})
}
func shouldShowShadow(_ show: Bool) {
if show {
centerController.view.layer.shadowOpacity = 0.6
} else {
centerController.view.layer.shadowOpacity = 0.0
}
}
func animateStatusBar() {
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: .curveEaseInOut, animations: {
self.setNeedsStatusBarAppearanceUpdate()
})
}
}
private extension UIStoryboard {
class func mainStoryboard() -> UIStoryboard {
return UIStoryboard(name: "Main", bundle: Bundle.main)
}
class func menuViewController() -> MenuViewController? {
return mainStoryboard().instantiateViewController(withIdentifier: "MenuViewController") as? MenuViewController
}
class func homeViewController() -> HomeViewController? {
return mainStoryboard().instantiateViewController(withIdentifier: "HomeViewController") as? HomeViewController
}
}
|
[
-1
] |
deafb9a0c15511f62ee02440bb8f5f552d79d564
|
44b2fba517c5f9666f85ed443b159c2a0482252e
|
/BilheteriaUITests/BilheteriaUITests.swift
|
ec26bade1c8261d8933614a02e14afb64f8bfc71
|
[] |
no_license
|
ronanthomsen/Bilheteria
|
c063b772a3e1f35c992c9d9493a87244617b699d
|
b1caf7d43b7ca04bca7b74918a0810dcd54cd818
|
refs/heads/master
| 2020-12-14T08:48:19.572858 | 2016-08-15T15:20:10 | 2016-08-15T15:20:10 | 65,742,255 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,241 |
swift
|
//
// BilheteriaUITests.swift
// BilheteriaUITests
//
// Created by Ronan on 8/12/16.
// Copyright © 2016 Ronan. All rights reserved.
//
import XCTest
class BilheteriaUITests: 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,
243720,
282634,
313356,
155665,
305173,
241695,
237599,
223269,
229414,
315431,
292901,
315433,
354342,
325675,
278571,
313388,
124974,
282671,
102446,
229425,
102441,
243763,
321589,
241717,
229431,
180279,
215095,
319543,
288829,
325695,
286787,
288835,
307269,
237638,
313415,
239689,
233548,
315468,
311373,
196687,
278607,
311377,
354386,
280660,
315477,
223317,
354394,
323678,
315488,
321632,
45154,
315489,
280676,
280674,
313446,
215144,
227432,
217194,
194667,
233578,
278637,
307306,
319599,
288878,
278642,
284789,
131190,
249976,
288890,
292987,
215165,
131199,
227459,
194692,
280708,
278669,
235661,
323730,
278676,
311447,
153752,
327834,
284827,
329884,
278684,
299166,
278690,
233635,
311459,
215204,
284840,
299176,
278698,
284843,
184489,
278703,
184498,
278707,
125108,
180409,
280761,
278713,
223418,
227517,
295099,
299197,
280767,
258233,
299202,
139459,
309443,
176325,
131270,
301255,
299208,
227525,
280779,
233678,
282832,
321744,
227536,
301270,
301271,
229591,
280792,
356575,
311520,
325857,
280803,
182503,
338151,
307431,
319719,
295147,
317676,
286957,
125166,
125170,
313595,
125180,
184574,
125184,
309504,
125192,
125197,
125200,
194832,
227601,
325904,
125204,
319764,
278805,
334104,
315674,
282908,
311582,
125215,
282912,
299294,
233761,
278817,
211239,
282920,
125225,
317738,
325930,
311596,
321839,
315698,
98611,
125236,
282938,
307514,
278843,
168251,
287040,
319812,
311622,
227655,
280903,
319816,
323914,
201037,
282959,
229716,
289109,
168280,
379224,
323934,
391521,
239973,
381286,
285031,
313703,
416103,
280938,
242027,
321901,
278895,
354672,
287089,
354671,
227702,
199030,
315768,
315769,
291193,
223611,
291194,
248188,
313726,
211327,
291200,
311679,
240003,
158087,
313736,
227721,
242059,
311692,
285074,
227730,
240020,
190870,
315798,
190872,
291225,
285083,
293275,
317851,
242079,
227743,
285089,
293281,
289185,
305572,
156069,
300490,
283039,
301482,
289195,
377265,
338359,
299449,
311739,
293309,
278974,
311744,
317889,
291266,
278979,
278988,
289229,
281038,
326093,
278992,
283089,
373196,
283088,
281039,
279000,
242138,
176602,
285152,
369121,
160224,
279009,
195044,
291297,
279014,
242150,
319976,
279017,
188899,
311787,
281071,
319986,
236020,
279030,
311800,
279033,
317949,
279042,
283138,
233987,
287237,
377352,
322057,
309770,
342537,
279053,
283154,
303635,
303634,
279061,
279060,
182802,
279066,
188954,
322077,
291359,
227881,
293420,
289328,
236080,
283185,
279092,
23093,
234037,
244279,
244280,
338491,
234044,
301635,
309831,
55880,
322119,
377419,
303693,
281165,
301647,
281170,
326229,
309847,
189016,
115287,
111197,
295518,
287327,
242274,
244326,
279143,
277095,
279150,
281200,
287345,
313970,
287348,
301688,
189054,
287359,
291455,
297600,
303743,
301702,
164487,
279176,
311944,
316044,
311948,
184974,
316048,
311953,
316050,
336531,
287379,
295575,
227991,
289435,
303772,
221853,
205469,
285348,
314020,
279207,
295591,
248494,
318127,
293552,
285360,
285362,
299698,
287412,
166581,
295598,
154295,
279215,
342705,
287418,
314043,
303802,
66243,
291529,
287434,
225996,
363212,
287438,
242385,
279249,
303826,
164561,
279253,
158424,
230105,
299737,
322269,
342757,
295653,
289511,
230120,
330473,
234216,
285419,
330476,
289517,
279278,
170735,
312046,
215790,
125683,
230133,
199415,
234233,
242428,
279293,
205566,
322302,
289534,
299777,
291584,
228099,
285443,
291591,
295688,
346889,
285450,
322312,
312076,
285457,
295698,
291605,
166677,
283418,
285467,
221980,
281378,
234276,
283431,
262952,
262953,
279337,
318247,
318251,
262957,
203560,
164655,
328495,
293673,
289580,
301872,
242481,
234290,
230198,
303921,
285496,
285493,
301883,
201534,
281407,
289599,
222017,
295745,
293702,
318279,
283466,
281426,
279379,
295769,
234330,
201562,
281434,
322396,
230238,
275294,
301919,
279393,
230239,
293729,
281444,
303973,
279398,
349025,
177002,
308075,
242540,
242542,
310132,
295797,
201590,
207735,
228214,
295799,
177018,
269179,
279418,
308093,
314240,
291713,
158594,
330627,
240517,
287623,
228232,
416649,
279434,
236427,
320394,
316299,
234382,
189327,
299912,
308113,
308111,
293780,
310166,
289691,
209820,
277404,
240543,
283551,
310177,
289699,
189349,
289704,
279465,
293801,
304050,
177074,
289720,
289723,
189373,
213956,
281541,
345030,
19398,
213961,
326602,
279499,
56270,
191445,
183254,
304086,
183258,
234469,
142309,
340967,
314343,
304104,
324587,
183276,
289773,
203758,
234476,
320492,
320495,
287730,
277493,
240631,
320504,
214009,
312313,
312317,
234499,
293894,
320520,
322571,
230411,
320526,
330766,
234513,
238611,
354346,
140311,
293911,
238617,
197658,
316441,
330789,
248871,
132140,
113710,
189487,
281647,
322609,
312372,
203829,
238646,
300087,
238650,
320571,
21567,
308288,
336962,
160834,
314437,
349254,
238663,
300109,
207954,
234578,
205911,
296023,
314458,
234588,
277600,
281698,
281699,
230500,
285795,
322664,
228457,
279659,
318571,
234606,
300145,
230514,
238706,
187508,
312435,
279666,
300147,
302202,
285819,
314493,
285823,
150656,
234626,
279686,
222344,
285833,
318602,
234635,
285834,
337037,
228492,
177297,
162962,
187539,
308375,
324761,
285850,
296091,
119965,
234655,
330912,
300192,
302239,
306339,
339106,
234662,
300200,
249003,
208044,
238764,
302251,
322733,
3243,
279729,
294069,
300215,
294075,
339131,
228541,
64699,
283841,
148674,
283846,
312519,
279752,
283849,
148687,
290001,
189651,
316628,
279766,
189656,
279775,
304352,
298209,
304353,
310496,
279780,
228587,
279789,
290030,
302319,
251124,
234741,
283894,
316661,
279803,
208123,
292092,
228608,
320769,
234756,
322826,
242955,
312588,
177420,
318732,
126229,
245018,
320795,
318746,
320802,
304422,
130342,
130344,
292145,
298290,
312628,
345398,
300342,
159033,
222523,
286012,
181568,
279872,
279874,
300355,
294210,
216387,
286019,
193858,
300354,
304457,
345418,
230730,
372039,
296269,
234830,
224591,
222542,
238928,
296274,
314708,
318804,
283990,
314711,
357720,
300378,
300379,
316764,
294236,
314721,
292194,
230757,
281958,
314727,
134504,
306541,
314734,
284015,
234864,
296304,
316786,
327023,
314740,
312688,
314742,
327030,
230772,
314745,
290170,
310650,
224637,
306558,
290176,
306561,
179586,
243073,
314752,
294278,
314759,
296328,
296330,
298378,
368012,
318860,
314765,
304523,
279955,
306580,
314771,
224662,
234902,
282008,
314776,
318876,
282013,
290206,
148899,
314788,
314790,
282023,
333224,
298406,
241067,
279980,
314797,
279979,
286128,
173492,
279988,
286133,
284086,
284090,
302523,
228796,
310714,
54719,
415170,
292291,
302530,
280003,
228804,
306630,
300488,
310725,
306634,
339403,
370122,
310731,
280011,
310735,
302539,
312785,
327122,
222674,
280020,
234957,
280025,
310747,
239069,
144862,
286176,
320997,
310758,
187877,
280042,
280043,
191980,
300526,
337391,
282097,
308722,
296434,
306678,
40439,
191991,
288248,
286201,
300539,
288252,
312830,
290304,
286208,
228868,
292359,
218632,
230922,
302602,
323083,
294413,
329231,
304655,
323088,
282132,
230933,
302613,
282135,
316951,
374297,
302620,
313338,
282147,
222754,
306730,
312879,
230960,
288305,
239159,
290359,
323132,
157246,
288319,
130622,
288322,
280131,
349764,
310853,
124486,
282182,
288328,
286281,
292426,
194118,
224848,
224852,
290391,
196184,
239192,
306777,
128600,
235096,
230999,
212574,
99937,
204386,
323171,
345697,
300643,
282214,
300645,
312937,
204394,
224874,
243306,
312941,
206447,
310896,
294517,
314997,
290425,
288377,
325246,
333438,
235136,
280193,
282244,
239238,
288391,
323208,
282248,
286344,
179853,
286351,
188049,
239251,
229011,
280217,
323226,
179868,
229021,
302751,
282272,
198304,
245413,
282279,
298664,
212649,
298666,
317102,
286387,
300725,
337590,
286392,
300729,
302778,
306875,
280252,
280253,
282302,
296636,
286400,
323265,
323262,
280259,
333508,
282309,
321220,
321217,
296649,
239305,
306891,
280266,
212684,
302798,
9935,
241360,
282321,
333522,
286419,
241366,
280279,
278232,
282330,
18139,
280285,
294621,
278237,
282336,
325345,
321250,
278241,
294629,
153318,
333543,
12009,
282347,
288492,
282349,
34547,
67316,
323315,
286457,
284410,
200444,
288508,
282366,
286463,
319232,
278273,
288515,
280326,
282375,
323335,
284425,
300810,
282379,
216844,
280333,
284430,
116491,
300812,
161553,
124691,
284436,
278292,
278294,
282390,
116502,
118549,
325403,
321308,
321309,
282399,
241440,
282401,
186148,
186149,
315172,
241447,
333609,
294699,
286507,
284460,
280367,
300849,
282418,
280373,
282424,
280377,
321338,
319289,
282428,
280381,
345918,
241471,
413500,
280386,
325444,
280391,
153416,
325449,
315209,
159563,
280396,
307024,
337746,
317268,
325460,
307030,
18263,
237397,
241494,
188250,
284508,
300893,
237411,
284515,
276326,
282471,
296807,
292713,
282476,
292719,
296815,
313200,
313204,
317305,
124795,
317308,
339840,
182145,
315265,
280451,
325508,
333700,
243590,
282503,
67464,
327556,
188293,
325514,
243592,
305032,
315272,
184207,
311183,
124816,
315275,
282517,
294806,
214936,
337816,
294808,
329627,
239515,
124826,
214943,
298912,
319393,
294820,
219046,
333734,
294824,
298921,
284584,
313257,
292783,
126896,
200628,
300983,
343993,
288698,
98240,
294849,
214978,
280517,
280518,
214983,
282572,
282573,
153553,
231382,
329696,
323554,
292835,
190437,
292838,
294887,
317416,
313322,
278507,
329707,
311277,
296942,
298987,
124912,
327666,
278515,
325620,
239610
] |
b169a51bec09e877e646f346bcb9cc401468bfe7
|
e5671ebc212579950acd857854bcca4c98f97be4
|
/Instagram/PostViewController.swift
|
84988904527737464d3036bd8b046ad2ceecb013
|
[] |
no_license
|
yusuke009/Instagram
|
403d565247febf9137e5444d67b62f0a37f31f0f
|
405254af47ef8b57300f049103f64503c3f33c2a
|
refs/heads/master
| 2023-02-24T23:20:07.390068 | 2021-01-31T05:40:36 | 2021-01-31T05:40:36 | 326,970,743 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,186 |
swift
|
//
// PostViewController.swift
// Instagram
//
// Created by 齋藤友祐 on 2020/12/27.
// Copyright © 2020 yusuke.saito. All rights reserved.
//
import UIKit
import Firebase
import SVProgressHUD
class PostViewController: UIViewController {
var image: UIImage!
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var textField: UITextField!
//投稿ボタンをタップした時に呼ばれるメソッド
@IBAction func handlePostButton(_ sender: Any) {
//画像をJPEGに変換する
let imageData = image.jpegData(compressionQuality: 0.75)
//画像と投稿データの保存場所を定義する
let postRef = Firestore.firestore().collection(Const.PostPath).document()
let imageRef = Storage.storage().reference().child(Const.ImagePath).child(postRef.documentID + ".jpg")
//HUDで投稿処理中の表示を開始
SVProgressHUD.show()
//Storageに画像をアップロード
let metadata = StorageMetadata()
metadata.contentType = "image/jpeg"
imageRef.putData(imageData!, metadata: metadata) { (metadata, error) in
if error != nil {
//画像のアップロード失敗
print (error!)
SVProgressHUD.showError(withStatus: "画像のアップロードに失敗しました。")
//投稿処理をキャンセルし、先頭画面に戻る
UIApplication.shared.windows.first{ $0.isKeyWindow }?.rootViewController?.dismiss(animated: true, completion: nil)
return
}
//FireStoreに投稿データを保存する
let name = Auth.auth().currentUser?.displayName
let postDic = ["name": name!, "caption": self.textField.text!, "date": FieldValue.serverTimestamp(),] as [String: Any]
postRef.setData(postDic)
//HUDで投稿完了を表示する
SVProgressHUD.showSuccess(withStatus: "投稿しました")
//投稿処理が完了したので先頭画面に戻る
UIApplication.shared.windows.first{ $0.isKeyWindow }?.rootViewController?.dismiss(animated: true, completion: nil)
}
}
//キャンセルボタンをタップした時に呼ばれるメソッド
@IBAction func handleCancelButton(_ sender: Any) {
//加工画面に戻る
self.dismiss(animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
//受け取った画像をImageViewに設定する
imageView.image = image
// Do any additional setup after loading the view.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
|
[
-1
] |
603a4cd901a2020095953bf4461f946c6a301c9c
|
d223eee6d8d57d365f8c022aacfbeed7201cedac
|
/UnitTests/FileDataSourceTest.swift
|
853ef1cd662044c79ee947996bc2095f5a0db5b6
|
[
"MIT"
] |
permissive
|
SpacyRicochet/Construct
|
9a3f69e54cd8455a123da9d5c451ec7560c02eb3
|
74a87bf76b6738faf5a3b8db3e30f375ec1a209e
|
refs/heads/main
| 2023-03-28T14:05:29.538906 | 2020-10-09T15:13:49 | 2020-10-09T15:13:49 | 302,940,776 | 0 | 0 |
MIT
| 2020-10-10T16:13:33 | 2020-10-10T16:13:32 | null |
UTF-8
|
Swift
| false | false | 651 |
swift
|
//
// FileDataSourceTest.swift
// UnitTests
//
// Created by Thomas Visser on 04/09/2019.
// Copyright © 2019 Thomas Visser. All rights reserved.
//
import Foundation
import XCTest
@testable import Construct
import Combine
class FileDataSourceTest: XCTestCase {
func test() {
let sut = FileDataSource(path: Bundle.main.path(forResource: "monsters", ofType: "json")!)
let e = expectation(description: "Data is read from file")
_ = sut.read().sink(receiveCompletion: { _ in }) { data in
XCTAssertNotNil(data)
e.fulfill()
}
waitForExpectations(timeout: 2, handler: nil)
}
}
|
[
-1
] |
40e3f630177176cf963e5ff883a6f85bc9208a37
|
9bbef4c1332d5efbbf9d6b4a7ec2aacfac48e106
|
/Workday/TrelloTaskViewController.swift
|
34ce95293e03e3bc6ea02872d8c46818076760da
|
[] |
no_license
|
baiIey/Workday
|
752d91b1968a342ee44d40eab02232ffbd34f7e6
|
be6accdd55a7187c13924f3ecbb9ac1c6ab006c3
|
refs/heads/master
| 2020-12-11T09:22:27.057304 | 2015-10-30T17:39:56 | 2015-10-30T17:39:56 | 45,175,660 | 0 | 0 | null | 2015-10-29T10:16:51 | 2015-10-29T10:16:51 | null |
UTF-8
|
Swift
| false | false | 7,552 |
swift
|
//
// TrelloTaskViewController.swift
// Workday
//
// Created by Bjørn Eivind Rostad on 10/26/14.
// Copyright (c) 2014 siddiqui. All rights reserved.
//
import UIKit
class TrelloTaskViewController: UIViewController, UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning {
var isPresenting: Bool = true
var taskTapped : UIImage!
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var taskImage: UIImageView!
@IBOutlet weak var navImageView: UIImageView!
@IBOutlet weak var actionBar: UIImageView!
@IBOutlet weak var smallClock: UIImageView!
var defaults = NSUserDefaults.standardUserDefaults()
override func viewDidLoad() {
super.viewDidLoad()
if taskTapped == UIImage(named: "trello - dashboard") {
print("dashboard wireframes")
taskImage.image = UIImage(named: "trello-card-task")
navImageView.image = UIImage(named: "trello-card-nav")
actionBar.image = UIImage(named: "trello-action")
taskImage.sizeToFit()
smallClock.hidden = true
let initalVal = defaults.integerForKey("task-moved")
if initalVal == 1 {
print("now show clock again")
smallClock.hidden = false
}
defaults.setInteger(1, forKey: "task-read")
defaults.synchronize()
print("Read One NSUserDefaults------------------ is \(initalVal)")
} else if taskTapped == UIImage(named: "pivotal - q4 roadmap") {
print("Q4 road map")
taskImage.image = UIImage(named: "pivotal-card-task")
navImageView.image = UIImage(named: "pivotal-nav-bar")
actionBar.image = UIImage(named: "pivotal-action")
taskImage.sizeToFit()
defaults.setInteger(2, forKey: "task-read")
defaults.synchronize()
let initalVal = defaults.integerForKey("task-read")
print("Read Two NSUserDefaults------------------ is \(initalVal)")
}
scrollView.contentSize = taskImage.image!.size
}
@IBAction func didTapBack(sender: UIButton) {
dismissViewControllerAnimated(true, completion: nil)
}
func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
isPresenting = true
return self
}
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
isPresenting = false
return self
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
let destinationVC = segue.destinationViewController as UIViewController
destinationVC.modalPresentationStyle = UIModalPresentationStyle.Custom
destinationVC.transitioningDelegate = self
}
func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
// The value here should be the duration of the animations scheduled in the animationTransition method
return 0.4
}
func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
print("animating transition")
let containerView = transitionContext.containerView()
let toViewController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)!
let fromViewController = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)!
if (isPresenting) {
print("animating Modal TO transition")
let vc = toViewController as! ModalFromDetailViewController
vc.imageModal.transform = CGAffineTransformMakeTranslation(0, 600)
vc.closeButton.alpha = 0
containerView!.addSubview(toViewController.view)
toViewController.view.alpha = 0
UIView.animateWithDuration(0.4, animations: { () -> Void in
toViewController.view.alpha = 1
}) { (finished: Bool) -> Void in
UIView.animateWithDuration(0.5, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0.7, options: [], animations: { () -> Void in
vc.imageModal.transform = CGAffineTransformMakeTranslation(0, 0)
}, completion: nil)
UIView.animateWithDuration(0.5, delay: 0.2, options: [], animations: { () -> Void in
vc.closeButton.alpha = 1
}, completion: nil)
transitionContext.completeTransition(true)
}
} else {
let vc = fromViewController as! ModalFromDetailViewController
print("animating Modal FROM transition")
UIView.animateWithDuration(0.4, delay: 0, options: [], animations: { () -> Void in
vc.closeButton.alpha = 0
}, completion: nil)
UIView.animateWithDuration(0.7, delay: 0.2, usingSpringWithDamping: 0.7, initialSpringVelocity: 0.3, options: [], animations: { () -> Void in
vc.imageModal.transform = CGAffineTransformMakeTranslation(0, 600)
}, completion: nil)
UIView.animateWithDuration(0.4, delay: 0.5, options: [], animations: { () -> Void in
fromViewController.view.alpha = 0
// self.tasktoSegue.alpha = 0
}, completion: { (finished: Bool) -> Void in
transitionContext.completeTransition(true)
fromViewController.view.removeFromSuperview()
let initalVal = self.defaults.integerForKey("task-moved")
if initalVal == 1 {
UIView.animateWithDuration(0.3, delay: 0, options: [], animations: { () -> Void in
self.smallClock.hidden = false
self.smallClock.transform = CGAffineTransformMakeScale(1.3, 1.3)
}) { (finished: Bool) -> Void in
UIView.animateWithDuration(0.3, animations: { () -> Void in
self.smallClock.transform = CGAffineTransformMakeScale(1, 1)
})
}
}
})
}
}
// last one
}
|
[
-1
] |
3c2e7cbb96635f07f55a9be466eeee062de59b74
|
09f18b910443b5683bb470bd488cd97df9be971b
|
/Project/PrivateVault App/Code/Model/UserSettings.swift
|
36b3435d7e3011f4a5e6751b078daaa040ead8d3
|
[
"MIT"
] |
permissive
|
elenamene/CapsulePrivateStorage
|
5656e600ffcabbd43cdf0f288c62048deb56f215
|
e1eda61b32f1514ea57a583ac006130f156ab63a
|
refs/heads/main
| 2023-08-22T02:18:19.130335 | 2021-09-25T11:14:23 | 2021-09-25T11:14:23 | 382,857,175 | 0 | 0 |
NOASSERTION
| 2021-09-25T11:14:24 | 2021-07-04T13:20:55 |
Swift
|
UTF-8
|
Swift
| false | false | 1,693 |
swift
|
//
// UserSettings.swift
// PrivateVault
//
// Created by Ian Manor on 20/02/21.
//
import SwiftUI
class UserSettings: ObservableObject {
@Published var maxAttempts = UserDefaults.standard.object(forKey: .maxAttempts) as? Int ?? 5 {
didSet { UserDefaults.standard.set(maxAttempts, forKey: .maxAttempts) }
}
@Published var biometrics = UserDefaults.standard.object(forKey: .biometrics) as? Bool ?? true {
didSet { UserDefaults.standard.set(biometrics, forKey: .biometrics) }
}
@Published var columns = UserDefaults.standard.object(forKey: .columns) as? Int ?? 3 {
didSet { UserDefaults.standard.set(columns, forKey: .columns) }
}
@Published var sort = SortMethod(rawValue: UserDefaults.standard.integer(forKey: .sort)) ?? .chronologicalDescending {
didSet { UserDefaults.standard.set(sort.rawValue, forKey: .sort) }
}
@Published var showDetails = UserDefaults.standard.bool(forKey: .showDetails) {
didSet { UserDefaults.standard.set(showDetails, forKey: .showDetails) }
}
@Published var sound = UserDefaults.standard.object(forKey: .sound) as? Bool ?? true {
didSet { UserDefaults.standard.set(sound, forKey: .sound) }
}
@Published var hapticFeedback = UserDefaults.standard.object(forKey: .hapticFeedback) as? Bool ?? true {
didSet { UserDefaults.standard.set(hapticFeedback, forKey: .hapticFeedback) }
}
// Ignored for now
@Published var contentMode: ContentMode = .fit
}
fileprivate extension String {
static let biometrics = "biometrics"
static let maxAttempts = "maxAttempts"
static let columns = "columns"
static let sort = "sort"
static let showDetails = "showDetails"
static let sound = "sound"
static let hapticFeedback = "hapticFeedback"
}
|
[
-1
] |
9ab5fb7c98b9710797f78adaeca440b767db1253
|
6564222ad9c324c4b1c08ee2cc875a8cca591d60
|
/PureCloudApi/Classes/Models/ININSubscriberResponse.swift
|
5fee7d695823b43783279b08e82a0296e33ca1c3
|
[
"MIT"
] |
permissive
|
atull/purecloud_api_sdk_ios
|
88eaeb0178cc8729643a49eaa831098b646daba3
|
e086556d0f7c47b9438e00a043f7e5bbac7bd685
|
refs/heads/master
| 2020-12-24T09:38:21.359249 | 2016-06-30T10:42:00 | 2016-06-30T10:42:00 | 73,276,924 | 0 | 0 | null | 2016-11-09T11:10:18 | 2016-11-09T11:10:18 | null |
UTF-8
|
Swift
| false | false | 676 |
swift
|
//
// ININSubscriberResponse.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public class ININSubscriberResponse: JSONEncodable {
public var messageReturned: [String]?
public var status: String?
public init() {}
// MARK: JSONEncodable
func encodeToJSON() -> AnyObject {
var nillableDictionary = [String:AnyObject?]()
nillableDictionary["messageReturned"] = self.messageReturned?.encodeToJSON()
nillableDictionary["status"] = self.status
let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}
}
|
[
-1
] |
b5477142f3e87160a789c78ab3a7fe83a7f83f66
|
488e152a055e631134d80aa58fa51101458f9a8d
|
/DesignPatternPractices/Builder Pattern/Builders.swift
|
3e54597eda13c2b8c57c050c142bbb72a8ee78ec
|
[] |
no_license
|
sophie-yang/DesignPatternPractices
|
5dd8b4593a46ba96dad7450fbd7732c7afb8ec88
|
aa807ef81b66c72fa21b49e22603267abdce3d8b
|
refs/heads/master
| 2020-07-22T07:27:02.994731 | 2020-01-06T16:29:56 | 2020-01-06T16:29:56 | 207,115,811 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,288 |
swift
|
import Foundation
import UIKit
// MARK: - Maze Builders
protocol MazeBuilder {
func buildMaze()
func buildRoom(_ roomNo: Int)
func buildDoor(roomFrom: Int, roomTo: Int)
func getMaze() -> Maze?
}
class StandardMazeBuilder: MazeBuilder {
private var currentMaze: Maze?
func buildMaze() {
currentMaze = Maze()
}
func buildRoom(_ roomNo: Int) {
guard let maze = currentMaze,
!maze.rooms.contains(where: { $0.roomNo == roomNo }) else { return }
let room = Room(roomNo)
maze.add(room)
Direction.allCases.forEach {
room.setSide(direction: $0, site: Wall())
}
}
func buildDoor(roomFrom: Int, roomTo: Int) {
guard let room1 = currentMaze?.getRoom(by: roomFrom),
let room2 = currentMaze?.getRoom(by: roomTo) else { return }
let door = Door(room1: room1, room2: room2)
room1.setSide(direction: commonWall(room1: room1, room2: room2), site: door)
room2.setSide(direction: commonWall(room1: room2, room2: room1), site: door)
}
func getMaze() -> Maze? {
return currentMaze
}
private func commonWall(room1: Room, room2: Room) -> Direction {
return Direction.allCases.randomElement()!
}
}
class CountingMazeBuilder: MazeBuilder {
private var doorsCount: Int = 0
private var roomsCount: Int = 0
func buildMaze() {}
func buildRoom(_ roomNo: Int) {
roomsCount += 1
}
func buildDoor(roomFrom: Int, roomTo: Int) {
doorsCount += 1
}
func getMaze() -> Maze? {
return nil
}
func addWall(forRoom: Int, direction: Direction) {}
func getCounts() -> (doorsCount: Int, roomsCount: Int) {
return (doorsCount, roomsCount)
}
}
// MARK: - Text Converters
protocol TextConverter {
func convertCharacter(_ character: Character)
func convertFontChange(_ font: UIFont)
func convertParagraph()
}
extension TextConverter {
func convertFontChange(_ font: UIFont) {}
func convertParagraph() {}
}
class ASCIIConverter: TextConverter {
private var asciiText = [String]()
func convertCharacter(_ character: Character) {
asciiText.append("ASCII: \(character)")
}
func getASCIIText() -> String {
return asciiText.joined(separator: ", ")
}
}
class TeXConverter: TextConverter {
private var texText = [String]()
func convertCharacter(_ character: Character) {
texText.append("TeX character: \(character)")
}
func convertFontChange(_ font: UIFont) {
texText.append("TeX font changed")
}
func convertParagraph() {
texText.append("TeX paragraph")
}
func getTeXText() -> String {
return texText.joined(separator: ", ")
}
}
class TextWidgetConverter: TextConverter {
private var textWidget = [String]()
func convertCharacter(_ character: Character) {
textWidget.append("TextWidget character: \(character)")
}
func convertFontChange(_ font: UIFont) {
textWidget.append("TextWidget font changed")
}
func convertParagraph() {
textWidget.append("TextWidget paragraph")
}
func getTextWidget() -> String {
return textWidget.joined(separator: ", ")
}
}
|
[
-1
] |
a9c59d3f41eec601b8a5f77e8e10f5cb0a5d49ff
|
b6bf115f1eb8fe815d50d1aae55694d1caea77c2
|
/TwitterApp/TwitterApp/HomeDatasource.swift
|
ad7a15dc4975446c200af5eac68ee7cedd99987b
|
[] |
no_license
|
pradeepmechu/swift
|
03259ba5f3a0fde81ba345708ed4a976b1dce7c4
|
936fb455c4051cb93c4a4bd9d5438838391619b4
|
refs/heads/master
| 2021-01-13T03:28:05.819044 | 2018-01-29T20:44:00 | 2018-01-29T20:44:00 | 77,540,977 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 783 |
swift
|
//
// HomeDatasource.swift
// TwitterApp
//
// Created by Pradeep Kumar on 01/02/2017.
// Copyright © 2017 Pradeep Kumar. All rights reserved.
//
import LBTAComponents
class HomeDatasource: Datasource {
let words = ["user1", "user2", "user3"]
override func headerClasses() -> [DatasourceCell.Type]? {
return [UserHeader.self]
}
override func footerClasses() -> [DatasourceCell.Type]? {
return [UserFooter.self]
}
override func numberOfItems(_ section: Int) -> Int {
return words.count
}
override func item(_ indexPath: IndexPath) -> Any? {
return words[indexPath.item]
}
override func cellClasses() -> [DatasourceCell.Type] {
return [UserCell.self]
}
}
|
[
-1
] |
bbb744722082213a3c1ad1bb8b1355080fb320c0
|
c259d546fa5c9c30a4660ae41b399b172284b4bd
|
/SAAC_iOS/AppDelegate.swift
|
2e94a413b3e8508c212c26e97b9c36f036684c6b
|
[] |
no_license
|
jatkins23/SAAC_iOS
|
d9d60606f749a88271aacfa949fb78b75f930dfb
|
9035ce07bbafe99e8aa0bb85afb851e3ed4bd35e
|
refs/heads/master
| 2021-01-10T08:56:21.393065 | 2016-04-29T18:01:11 | 2016-04-29T18:01:11 | 53,688,833 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 6,089 |
swift
|
//
// AppDelegate.swift
// SAAC_iOS
//
// Created by Jon Atkins on 3/11/16.
// Copyright © 2016 Tufts University. All rights reserved.
//
import UIKit
import CoreData
@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:.
// Saves changes in the application's managed object context before the application terminates.
self.saveContext()
}
// MARK: - Core Data stack
lazy var applicationDocumentsDirectory: NSURL = {
// The directory the application uses to store the Core Data store file. This code uses a directory named "Tufts.SAAC_iOS" in the application's documents Application Support directory.
let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)
return urls[urls.count-1]
}()
lazy var managedObjectModel: NSManagedObjectModel = {
// The managed object model for the application. This property is not optional. It is a fatal error for the application not to be able to find and load its model.
let modelURL = NSBundle.mainBundle().URLForResource("SAAC_iOS", withExtension: "momd")!
return NSManagedObjectModel(contentsOfURL: modelURL)!
}()
lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = {
// The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail.
// Create the coordinator and store
let coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("SingleViewCoreData.sqlite")
var failureReason = "There was an error creating or loading the application's saved data."
do {
try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil)
} catch {
// Report any error we got.
var dict = [String: AnyObject]()
dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data"
dict[NSLocalizedFailureReasonErrorKey] = failureReason
dict[NSUnderlyingErrorKey] = error as NSError
let wrappedError = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict)
// Replace this with code to handle the error appropriately.
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
NSLog("Unresolved error \(wrappedError), \(wrappedError.userInfo)")
abort()
}
return coordinator
}()
lazy var managedObjectContext: NSManagedObjectContext = {
// Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) This property is optional since there are legitimate error conditions that could cause the creation of the context to fail.
let coordinator = self.persistentStoreCoordinator
var managedObjectContext = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
managedObjectContext.persistentStoreCoordinator = coordinator
return managedObjectContext
}()
// MARK: - Core Data Saving support
func saveContext () {
if managedObjectContext.hasChanges {
do {
try managedObjectContext.save()
} catch {
// Replace this implementation with code to handle the error appropriately.
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
NSLog("Unresolved error \(nserror), \(nserror.userInfo)")
abort()
}
}
}
}
|
[
283144,
281635,
277030,
228396,
223280,
278577,
280132,
162394,
282203,
189025,
292450,
285796,
279148,
278125,
285296,
227455,
278656,
278665,
280205,
278674,
188050,
283803,
278687,
282274,
278692,
228009,
287402,
278700,
284845,
278705,
278711,
279223,
278718,
283838,
228544,
279753,
229068,
227533,
280273,
159477,
280312,
279304,
280335,
284432,
278289,
278801,
284434,
321296,
276751,
282910,
281379,
282915,
280370,
280382,
282433,
237382,
278877,
280415,
227687,
334185,
279405,
278896,
281972,
228220,
279422,
284557,
293773,
191374,
277395,
283028,
288147,
214934,
282016,
283554,
230320,
230322,
281011,
283058,
286130,
278971,
282558,
299970,
280007,
288200,
284617,
287689,
286157,
326096,
281041,
283091,
282585,
294390
] |
68093af361e6d064761e38cfe899dbac057eb86b
|
490eabd0b593990ffd92dc968d92c9fc1a9d2b53
|
/Gulps/ViewControllers/Support/CalendarViewController+Animations.swift
|
e046b7a21b0b837690c46ecc32b77621cf702a76
|
[
"MIT"
] |
permissive
|
aelzohry/gulps
|
e69b170041017e4af80faf7996e0a13675352f80
|
ec88c024e6473212cc3064f182c44c1aebd8fcb6
|
refs/heads/master
| 2021-01-17T21:27:29.329208 | 2016-08-15T08:37:14 | 2016-08-15T08:37:14 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,505 |
swift
|
import pop
typealias CalendarAnimation = CalendarViewController
extension CalendarAnimation {
func initAnimations() {
quantityLabelStartingConstant = Double(quantityLabelConstraint.constant)
quantityLabelConstraint.constant = view.frame.size.height
daysLabelStartingConstant = Double(daysLabelConstraint.constant)
daysLabelConstraint.constant = view.frame.size.height
shareButtonStartingConstant = Double(shareButtonConstraint.constant)
shareButtonConstraint.constant = view.frame.size.height
}
func animateShareView() {
if animating == true {
return
}
animating = true
if let button = self.navigationItem.rightBarButtonItem?.customView as? AnimatedShareButton {
button.showsMenu = !button.showsMenu
}
if (showingStats) {
let slideIn = POPSpringAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideIn.springBounciness = 5
slideIn.springSpeed = 8
slideIn.fromValue = calendarConstraint.constant
slideIn.toValue = 0
slideIn.removedOnCompletion = true
slideIn.beginTime = CACurrentMediaTime() + 0.35
calendarConstraint.pop_addAnimation(slideIn, forKey: "slideAway")
var slideAway = POPBasicAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideAway.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
slideAway.fromValue = shareButtonConstraint.constant
slideAway.toValue = view.frame.size.height
slideAway.removedOnCompletion = true
shareButtonConstraint.pop_addAnimation(slideAway, forKey: "slideInButton")
slideAway = POPBasicAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideAway.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
slideAway.fromValue = quantityLabelConstraint.constant
slideAway.toValue = view.frame.size.height
slideAway.removedOnCompletion = true
slideAway.beginTime = CACurrentMediaTime() + 0.20
quantityLabelConstraint.pop_addAnimation(slideAway, forKey: "slideInQuantity")
slideAway = POPBasicAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideAway.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
slideAway.fromValue = daysLabelConstraint.constant
slideAway.toValue = view.frame.size.height
slideAway.removedOnCompletion = true
slideAway.beginTime = CACurrentMediaTime() + 0.10
daysLabelConstraint.pop_addAnimation(slideAway, forKey: "slideInDays")
slideAway.completionBlock = { (_, _) in
self.showingStats = false
self.animating = false
}
} else {
let slideAway = POPBasicAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideAway.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
slideAway.fromValue = calendarConstraint.constant
slideAway.toValue = -view.frame.size.height
slideAway.removedOnCompletion = true
slideAway.duration = 0.6
calendarConstraint.pop_addAnimation(slideAway, forKey: "slideAway")
var slideIn = POPSpringAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideIn.springBounciness = 5
slideIn.springSpeed = 8
slideIn.fromValue = quantityLabelConstraint.constant
slideIn.toValue = quantityLabelStartingConstant
slideIn.removedOnCompletion = true
slideIn.beginTime = CACurrentMediaTime() + 0.35
quantityLabelConstraint.pop_addAnimation(slideIn, forKey: "slideInQuantity")
slideIn = POPSpringAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideIn.springBounciness = 5
slideIn.springSpeed = 8
slideIn.fromValue = daysLabelConstraint.constant
slideIn.toValue = daysLabelStartingConstant
slideIn.removedOnCompletion = true
slideIn.beginTime = CACurrentMediaTime() + 0.50
daysLabelConstraint.pop_addAnimation(slideIn, forKey: "slideInDays")
slideIn = POPSpringAnimation(propertyNamed: kPOPLayoutConstraintConstant)
slideIn.springBounciness = 5
slideIn.springSpeed = 8
slideIn.fromValue = shareButtonConstraint.constant
slideIn.toValue = shareButtonStartingConstant
slideIn.removedOnCompletion = true
slideIn.beginTime = CACurrentMediaTime() + 0.65
shareButtonConstraint.pop_addAnimation(slideIn, forKey: "slideInButton")
slideIn.completionBlock = { (_, _) in
self.showingStats = true
self.animating = false
}
}
}
}
|
[
-1
] |
51e2a6e6639e0962e56781160ca1da27aed75016
|
4639fd180b274970edba879e77acf65670c83d50
|
/Sources/App/Core/Extensions/SQLKit+union.swift
|
23523978867a233c71e731a2e14edf845ca1ff59
|
[
"MIT"
] |
permissive
|
at-syot/SwiftPackageIndex-Server
|
13869b052387368bc546f2c6c24437daa7dab6ba
|
8fc3d04597906cd266d08a80d5599a92b16b1195
|
refs/heads/main
| 2023-06-08T03:35:40.202069 | 2021-06-18T07:56:12 | 2021-06-18T07:56:12 | 376,627,566 | 1 | 0 |
MIT
| 2021-06-13T19:45:45 | 2021-06-13T19:45:45 | null |
UTF-8
|
Swift
| false | false | 1,196 |
swift
|
// TODO: remove this whole file once https://github.com/vapor/sql-kit/pull/133 has been merged
import SQLKit
public final class SQLUnionBuilder: SQLQueryBuilder {
public var query: SQLExpression {
return self.union
}
public var union: SQLUnion
public var database: SQLDatabase
public init(on database: SQLDatabase, _ args: [SQLSelectBuilder]) {
self.union = .init(args.map { $0.select })
self.database = database
}
}
extension SQLDatabase {
public func union(_ args: SQLSelectBuilder...) -> SQLUnionBuilder {
SQLUnionBuilder(on: self, args)
}
}
public struct SQLUnion: SQLExpression {
public let args: [SQLExpression]
public init(_ args: SQLExpression...) {
self.init(args)
}
public init(_ args: [SQLExpression]) {
self.args = args
}
public func serialize(to serializer: inout SQLSerializer) {
let args = args.map(SQLGroupExpression.init)
guard let first = args.first else { return }
first.serialize(to: &serializer)
for arg in args.dropFirst() {
serializer.write(" UNION ")
arg.serialize(to: &serializer)
}
}
}
|
[
-1
] |
bed305242e8ad7970bd40aad3b2b9661b404fff6
|
111f2ba21c7fe9dc8b5e8b6b12d1d1a03aee7b90
|
/RvWebserviceManager/RvWebserviceManager/Constants/ObjectConstant.swift
|
ff6c72102836e78aedf0b6343a1b8ee624e8cdb3
|
[
"MIT"
] |
permissive
|
rv928/RvWebserviceManager
|
0ea3917045f8eb6f3f9ab3ebb32d3a719fd827ed
|
4c4f6a618008cda525c7baf5bf28b63f533cecd2
|
refs/heads/master
| 2021-08-07T14:35:46.660212 | 2017-11-08T09:37:17 | 2017-11-08T09:37:17 | 109,955,307 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,864 |
swift
|
//
// ObjectConstant.swift
// RvWebserviceManager
//
// Created by Ravi Vora on 17/08/16.
// Copyright © 2016 Ravi Vora. All rights reserved.
//
import Foundation
class ObjectConstant {
// MARK: SpaceKeys
enum SpaceKeys :Int {
case keyspaceID,keyspaceName,keyfloorID,keyspaceCapacity,keyspaceTypeID,keyspaceSize,keyisBookable,keyisPrivate,keyspaceNotes,keyspaceImage,keyspaceAvailable,keyisMaintenance,keybuildingName,keyfloorName,keystatus,keycreated,keyupdated,keydeleted;
func toKey() -> String! {
switch self {
case .keyspaceID:
return "space_id"
case .keyspaceName:
return "space_name"
case .keyfloorID:
return "floor_id"
case .keyspaceCapacity:
return "space_capacity"
case .keyspaceTypeID:
return "space_type_id"
case .keyspaceSize:
return "space_size"
case .keyisBookable:
return "space_bookable"
case .keyisPrivate:
return "space_is_private"
case .keyspaceNotes:
return "space_notes"
case .keyspaceImage:
return "space_image"
case .keyspaceAvailable:
return "space_availability"
case .keyisMaintenance:
return "is_maintenance"
case .keybuildingName:
return "building_name"
case .keyfloorName:
return "floor_name"
case .keystatus:
return "status"
case .keycreated:
return "created_at"
case .keyupdated:
return "updated_at"
case .keydeleted:
return "deleted_at"
}
}
}
}
|
[
-1
] |
2e49577e9e754ffa7099139d96fb13aca80ee9c7
|
923911e00b60db97171a14857efd49c221300f24
|
/iBeaconTest/BeaconManager.swift
|
8745f5822adba2bb3faeb19e9cf8ed04003944c0
|
[] |
no_license
|
intelligentbee/iBeaconTest
|
9ebaaaf428e82edc55e69600e70f82aa3c1a261b
|
01351e1331bf2b7dbf8ea203f5268f42355b6e8f
|
refs/heads/master
| 2021-01-15T19:17:49.570575 | 2017-08-09T14:06:10 | 2017-08-09T14:06:10 | 99,816,552 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 530 |
swift
|
//
// BeaconManager.swift
// iBeaconTest
//
// Created by Cristi Sava on 08/08/2017.
// Copyright © 2017 Cristi Sava. All rights reserved.
//
import UIKit
enum MyBeacon: String {
case pink = "4045"
case magenta = "20372"
case yellow = "22270"
}
let BeaconsUUID: String = "B9407F30-F5F8-466E-AFF9-25556B57FE6D"
let RegionIdentifier: String = "IntelligentBee Office"
let BeaconsMajorID: UInt16 = 11111
class BeaconManager: ESTBeaconManager {
static let main : BeaconManager = BeaconManager()
}
|
[
-1
] |
6e2606bd8efd055657a8d6de7d00a69317ffd254
|
ed8fb9390d164e6bd7a54fd79ef9dc93da579b8f
|
/Magic 8 Ball/ViewController.swift
|
0a0e324b411ca8ff8fa62704db28669781f71269
|
[] |
no_license
|
kgolder92/Magic-8-Ball-iOS13
|
754263379e74c3342c01a0621f346cbf4769dc0a
|
c04c2c820002e21438ccd82d6857a5156a2ef413
|
refs/heads/master
| 2023-08-11T00:22:53.402085 | 2021-10-15T21:30:16 | 2021-10-15T21:30:16 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 619 |
swift
|
//
// ViewController.swift
// Magic 8 Ball
//
// Created by Angela Yu on 14/06/2019.
// Copyright © 2019 The App Brewery. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var eightBallView: UIImageView!
let ballArray = [#imageLiteral(resourceName: "ball1.png"),#imageLiteral(resourceName: "ball2.png"),#imageLiteral(resourceName: "ball3.png"),#imageLiteral(resourceName: "ball4.png"),#imageLiteral(resourceName: "ball5.png")]
@IBAction func askPressed(_ sender: UIButton) {
eightBallView.image = ballArray.randomElement()
}
}
|
[
384248,
265801,
332505,
249236
] |
1fb61b8167157897c4cebb943a3c886b53acf757
|
57ef87f7ec9533283a68d9a8a4e8ab768b56c23e
|
/StandfordClass/Calculator/CalculatorUITests/CalculatorUITests.swift
|
0666bc4a203c4a819951c2021a9dc196c4c450c3
|
[] |
no_license
|
NSVitus/PrivateRepositoryLibrary
|
d87b6474f4129127923a999eeb82e508dc139615
|
a2e989da69fec83ced5119ad9faea7d9e08d22b5
|
refs/heads/master
| 2021-01-10T15:51:57.792881 | 2016-03-09T14:37:20 | 2016-03-09T14:37:20 | 45,439,861 | 1 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,252 |
swift
|
//
// CalculatorUITests.swift
// CalculatorUITests
//
// Created by 陈志中 on 15/11/9.
// Copyright © 2015年 陈志中. All rights reserved.
//
import XCTest
class CalculatorUITests: 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.
}
}
|
[
243720,
282634,
313356,
155665,
305173,
237599,
241695,
223269,
354342,
229414,
102441,
315433,
278571,
354346,
325675,
102446,
282671,
313388,
229425,
124974,
243763,
321589,
229431,
180279,
319543,
213051,
288829,
325695,
288835,
286787,
307269,
237638,
313415,
239689,
315468,
311373,
333902,
196687,
278607,
311377,
354386,
233548,
329812,
315477,
223317,
200795,
323678,
315488,
315489,
45154,
321632,
280676,
313446,
215144,
307306,
194667,
233578,
278637,
288878,
319599,
278642,
284789,
131190,
284790,
288890,
292987,
215165,
131199,
194692,
235661,
278669,
241809,
323730,
278676,
311447,
153752,
327834,
284827,
278684,
329884,
299166,
278690,
311459,
215204,
233635,
299176,
284840,
278698,
284843,
184489,
278703,
323761,
184498,
278707,
125108,
258233,
278713,
280761,
223418,
295099,
227517,
280767,
299197,
180409,
299202,
139459,
309443,
227525,
131270,
301255,
176325,
280779,
233678,
282832,
321744,
227536,
301270,
229591,
280792,
301271,
311520,
325857,
334049,
280803,
307431,
182503,
338151,
319719,
295147,
317676,
286957,
125166,
125170,
313595,
125180,
184574,
309504,
125184,
217352,
125192,
194832,
227601,
325904,
319764,
278805,
125204,
315674,
282908,
311582,
299294,
282912,
278817,
233761,
211239,
282920,
125225,
317738,
311596,
321839,
315698,
98611,
332084,
282938,
168251,
278843,
307514,
287040,
319812,
332100,
311622,
227655,
280903,
319816,
323914,
201037,
229716,
289109,
168280,
379224,
323934,
332128,
391521,
239973,
381286,
285031,
416103,
313703,
280938,
242027,
242028,
321901,
354671,
278895,
287089,
199030,
227702,
315768,
315769,
291194,
223611,
248188,
291193,
313726,
211327,
291200,
311679,
139641,
240003,
158087,
313736,
227721,
242059,
311692,
227730,
285074,
240020,
190870,
315798,
190872,
291225,
317851,
293275,
285083,
283039,
227743,
289185,
293281,
285089,
305572,
300490,
242079,
156069,
301482,
311723,
289195,
377265,
338359,
299449,
311739,
319931,
293309,
278974,
311744,
317889,
291266,
278979,
326083,
278988,
289229,
281038,
281039,
278992,
283088,
283089,
326093,
279000,
242138,
176602,
160224,
279009,
369121,
188899,
195044,
291297,
279014,
285152,
319976,
279017,
242150,
311787,
281071,
319986,
236020,
279030,
311800,
279033,
317949,
279042,
283138,
233987,
287237,
377352,
322057,
309770,
342537,
279053,
182802,
283154,
303634,
303635,
279061,
279060,
279066,
188954,
322077,
291359,
227881,
293420,
236080,
283185,
289328,
279092,
23093,
234037,
244279,
244280,
338491,
234044,
301635,
309831,
55880,
322119,
377419,
303693,
281165,
301647,
281170,
309847,
115287,
189016,
287319,
332379,
111197,
295518,
287327,
242274,
244326,
279143,
279150,
281200,
287345,
287348,
301688,
244345,
189054,
287359,
297600,
303743,
291455,
301702,
164487,
311944,
279176,
334473,
316044,
311948,
311950,
184974,
316048,
311953,
316050,
326288,
287379,
227991,
295575,
289435,
303772,
205469,
221853,
285348,
314020,
279207,
295591,
295598,
248494,
279215,
293552,
299698,
318127,
164532,
166581,
342705,
154295,
285360,
285362,
287418,
314043,
303802,
287412,
66243,
291529,
287434,
225996,
363212,
287438,
242385,
303826,
279249,
279253,
158424,
230105,
299737,
322269,
342757,
295653,
289511,
230120,
330473,
234216,
285419,
330476,
289517,
312046,
170735,
279278,
215790,
125683,
230133,
199415,
234233,
242428,
279293,
289534,
205566,
322302,
299777,
291584,
228099,
285443,
322312,
285450,
264971,
312076,
326413,
322320,
285457,
295698,
166677,
283418,
285467,
326428,
221980,
281378,
234276,
283431,
318247,
279337,
293673,
318251,
289580,
262952,
262953,
164655,
301872,
303921,
234290,
328495,
262957,
285493,
230198,
285496,
301883,
201534,
281407,
289599,
295745,
342846,
222017,
293702,
318279,
283466,
281426,
279379,
244569,
201562,
281434,
322396,
295769,
230238,
230239,
275294,
279393,
293729,
349025,
281444,
303973,
279398,
351078,
301919,
177002,
308075,
242540,
310132,
295797,
201590,
228214,
295799,
207735,
279418,
177018,
269179,
308093,
314240,
291713,
158594,
240517,
287623,
228232,
299912,
416649,
279434,
316299,
252812,
320394,
308111,
234382,
308113,
189327,
293780,
310166,
289691,
209820,
283551,
240543,
310177,
289699,
189349,
289704,
293801,
279465,
326571,
177074,
304050,
326580,
289720,
326586,
289723,
189373,
213956,
281541,
19398,
345030,
213961,
279499,
56270,
191445,
183254,
304086,
234469,
314343,
304104,
324587,
320492,
183276,
234476,
320495,
289773,
203758,
287730,
240631,
320504,
214009,
312313,
312315,
312317,
328701,
328705,
234499,
293894,
320520,
230411,
322571,
320526,
330766,
234513,
238611,
140311,
293911,
238617,
197658,
316441,
113710,
281647,
189487,
322609,
312372,
203829,
238646,
300087,
238650,
320571,
21567,
308288,
160834,
336962,
314437,
349254,
238663,
300109,
234578,
207954,
205911,
296023,
314458,
156763,
281698,
285795,
214116,
281699,
230500,
322664,
228457,
279659,
318571,
234606,
300145,
238706,
279666,
312435,
187508,
300147,
230514,
302202,
285819,
314493,
285823,
150656,
234626,
279686,
222344,
285833,
318602,
285834,
228492,
337037,
234635,
177297,
162962,
187539,
326803,
308375,
324761,
285850,
296091,
119965,
302239,
300192,
330912,
339106,
306339,
234655,
234662,
300200,
249003,
208044,
238764,
322733,
302251,
3243,
294069,
300215,
64699,
294075,
228541,
283841,
148674,
283846,
312519,
279752,
283849,
148687,
290001,
189651,
316628,
279766,
189656,
279775,
304352,
298209,
310496,
304353,
279780,
228587,
279789,
290030,
302319,
251124,
234741,
316661,
283894,
208123,
292092,
279803,
228608,
320769,
234756,
322826,
242955,
177420,
312588,
318732,
126229,
245018,
320795,
318746,
239610,
320802,
130342,
304422,
130344,
292145,
298290,
312628,
300342,
159033,
333114,
333115,
286012,
222523,
279872,
181568,
193858,
216387,
279874,
300354,
300355,
372039,
294210,
304457,
230730,
294220,
296269,
234830,
224591,
238928,
222542,
296274,
314708,
318804,
283990,
314711,
357720,
300378,
300379,
294236,
234330,
314721,
292194,
230757,
281958,
314727,
134504,
306541,
284015,
296304,
312688,
327023,
234864,
314740,
230772,
327030,
316786,
314745,
310650,
290170,
224637,
306558,
290176,
243073,
179586,
306561,
294278,
314759,
296328,
296330,
304523,
368012,
298378,
318860,
314765,
292242,
112019,
306580,
279955,
224662,
234902,
282008,
314776,
318876,
282013,
290206,
148899,
314788,
298406,
314790,
245160,
333224,
282023,
241067,
279980,
314797,
279979,
286128,
279988,
286133,
173492,
284086,
310714,
302523,
228796,
284090,
54719,
302530,
292291,
228804,
415170,
310725,
306630,
280003,
300488,
370122,
302539,
339403,
306634,
280011,
310735,
329168,
312785,
222674,
327122,
280020,
329170,
234957,
280025,
310747,
239069,
144862,
286176,
187877,
320997,
310758,
280042,
280043,
191980,
329198,
337391,
282097,
296434,
308722,
306678,
40439,
191991,
288248,
286201,
300539,
288252,
312830,
290304,
245249,
228868,
292359,
218632,
323079,
230922,
302602,
323083,
294413,
304655,
329231,
282132,
230933,
302613,
282135,
316951,
374297,
302620,
222754,
282147,
306730,
245291,
312879,
230960,
288305,
290359,
323132,
235069,
157246,
288319,
288322,
280131,
349764,
310853,
282182,
194118,
288328,
286281,
292426,
124486,
333389,
224848,
224852,
290391,
128600,
196184,
235096,
306777,
239192,
212574,
345697,
204386,
300643,
300645,
282214,
312937,
204394,
224874,
243306,
312941,
206447,
310896,
314997,
294517,
288377,
290425,
325246,
235136,
280193,
282244,
239238,
288391,
282248,
286344,
323208,
179853,
286351,
188049,
229011,
239251,
280217,
323226,
179868,
229021,
302751,
198304,
282272,
282279,
298664,
212649,
298666,
317102,
286387,
300725,
337590,
286392,
300729,
302778,
306875,
280252,
280253,
282302,
323262,
286400,
321217,
296636,
280259,
321220,
333508,
282309,
323265,
239305,
280266,
296649,
306891,
212684,
302798,
9935,
241360,
282321,
313042,
286419,
241366,
280279,
282330,
18139,
280285,
294621,
282336,
321250,
294629,
153318,
333543,
181992,
337638,
12009,
282347,
288492,
282349,
323315,
67316,
34547,
286457,
284410,
288508,
200444,
282366,
286463,
319232,
288515,
280326,
323335,
282375,
284425,
300810,
116491,
216844,
280333,
300812,
282379,
284430,
161553,
124691,
284436,
278292,
118549,
116502,
278294,
282390,
325403,
321308,
321309,
282399,
241440,
282401,
325411,
315172,
186149,
186148,
241447,
333609,
286507,
294699,
284460,
280367,
300849,
282418,
280373,
282424,
321338,
282428,
280381,
345918,
413500,
241471,
280386,
280391,
153416,
315209,
325449,
159563,
280396,
307024,
317268,
237397,
241494,
18263,
307030,
188250,
284508,
300893,
307038,
237411,
284515,
276326,
282471,
296807,
292713,
282476,
292719,
296815,
325491,
313204,
333687,
317305,
124795,
317308,
339840,
315265,
280451,
188293,
243590,
282503,
67464,
305032,
315272,
315275,
243592,
325514,
311183,
184207,
279218,
124816,
282517,
294806,
337816,
294808,
214936,
239515,
124826,
214943,
298912,
319393,
333727,
294820,
333734,
219046,
284584,
294824,
313257,
298921,
310731,
292783,
126896,
200628,
300983,
343993,
288698,
98240,
294849,
214978,
280517,
280518,
214983,
282572,
282573,
153553,
24531,
231382,
329696,
292835,
6116,
190437,
292838,
294887,
317416,
313322,
329707,
298987,
278507,
296942,
311277,
124912,
327666,
278515,
325620,
313338
] |
ade87e37b1db7227089711508e24c105bfbbf109
|
61d87eed549c23420a4c8d62e098065b47f83d4d
|
/CustomPushTransition/CustomPushTransition/PopAnimation.swift
|
073b3b56d2aee773c53617b9dc7e97c766f9f305
|
[
"MIT"
] |
permissive
|
silence0201/Swift-Practice
|
9af90d31f3b4f0cc35979d7d0a3ea1b739a1dfe5
|
8fb14c4f773548ae558586027da2e4c0a3e221ea
|
refs/heads/master
| 2020-05-24T06:53:20.544271 | 2017-03-30T14:33:09 | 2017-03-30T14:33:09 | 84,832,486 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,363 |
swift
|
//
// PopAnimation.swift
// CustomPushTransition
//
// Created by 杨晴贺 on 2017/3/30.
// Copyright © 2017年 Silence. All rights reserved.
//
import UIKit
class PopAnimation: NSObject,UIViewControllerAnimatedTransitioning {
var transitionContext: UIViewControllerContextTransitioning?
//转场时间
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
return 2
}
//转场动画
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
//该参数包含了控制转场动画必要的信息
self.transitionContext = transitionContext
//目标VC
let toVC = transitionContext.viewController(forKey: .to)
//当前VC
let fromVC = transitionContext.viewController(forKey: .from)
//容器View,转场动画都是在该容器中进行的,导航控制的wrapper view就是改容器
let containerView = transitionContext.containerView
containerView.addSubview((toVC?.view)!)
containerView.addSubview((fromVC?.view)!)
let starPath = UIBezierPath(rect: CGRect(x: 0, y: SHeight*0.5-2, width: SWidth, height: 4))
let finalPath = UIBezierPath(rect: CGRect(x: 0, y: 0, width: SWidth, height: SHeight))
let maskLayer = CAShapeLayer()
maskLayer.path = finalPath.cgPath
fromVC?.view.layer.mask = maskLayer
let animation = CABasicAnimation(keyPath: "path")
animation.fromValue = finalPath.cgPath
animation.toValue = starPath.cgPath
animation.duration = transitionDuration(using: transitionContext)
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
animation.delegate = self
maskLayer.add(animation, forKey: "path")
}
}
extension PopAnimation: CAAnimationDelegate {
//动画结束
func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
//通知transition完成,该方法一定要调用
transitionContext?.completeTransition(!(transitionContext?.transitionWasCancelled)!)
//清除fromVC的mask
transitionContext?.viewController(forKey: .from)?.view.layer.mask = nil
transitionContext?.viewController(forKey: .to)?.view.layer.mask = nil
}
}
|
[
-1
] |
d250431be1953597e922d564dec95a9d3f622fda
|
2ffbb053975c40ffb62f2d9108dced4648250457
|
/LibraryTests/Helpers/Routers/BooksViewRouterSpy.swift
|
c048f531d8abb2c0930b6c910dd50acf36a5d9df
|
[
"MIT"
] |
permissive
|
Moamenzalabia/ios-mvp-clean-architecture
|
c4ebfffa98e5444c5841398d9eefe0e38e532e11
|
fab29555a5d95a06ccbc43b6e8fc8801a1ebcf2f
|
refs/heads/master
| 2020-12-26T20:48:24.966167 | 2019-10-23T17:58:08 | 2020-01-28T12:48:06 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,613 |
swift
|
//
// BooksViewRouterSpy.swift
// Library
//
// Created by Cosmin Stirbu on 2/27/17.
// MIT License
//
// Copyright (c) 2017 Fortech
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
import Foundation
@testable import Library
class BooksViewRouterSpy: BooksViewRouter {
var passedBook: Book?
var passedAddBookPresenterDelegate: AddBookPresenterDelegate?
func presentDetailsView(for book: Book) {
passedBook = book
}
func presentAddBook(addBookPresenterDelegate: AddBookPresenterDelegate) {
passedAddBookPresenterDelegate = addBookPresenterDelegate
}
}
|
[
194560,
395274,
395277,
395279,
395280,
395282,
395283,
98344,
98345,
98346,
98349,
329778,
124987,
174139,
229444,
229449,
174159,
174161,
174170,
174171,
284783,
125057,
125062,
319626,
125066,
229532,
215205,
129190,
215212,
241846,
241852,
241859,
241860,
241862,
241864,
241871,
241873,
241878,
262359,
262361,
224,
241904,
176370,
241907,
176373,
260342,
141569,
141572,
241926,
141586,
141588,
12565,
227607,
241944,
141593,
141595,
141597,
241952,
141601,
241954,
241955,
141606,
289068,
141622,
141627,
215356,
141629,
141632,
141634,
213319,
241992,
141641,
141642,
141646,
141652,
141654,
242006,
282967,
168285,
141664,
141665,
141670,
141674,
141676,
141681,
287090,
190836,
334196,
190842,
190844,
141696,
141701,
430475,
141708,
141711,
197018,
197021,
319972,
305638,
272931,
57893,
57896,
57899,
57900,
57903,
57904,
272944,
336446,
336450,
336451,
336464,
336465,
336466,
336467,
336469,
336470,
336471,
336473,
336479,
336481,
111202,
336482,
336487,
336488,
135861,
242361,
248524,
244430,
66261,
127702,
334562,
127727,
244469,
142078,
334590,
244480,
334604,
318238,
187174,
187176,
187180,
279366,
279367,
279369,
396117,
396118,
187223,
396121,
396122,
396126,
187260,
322430,
60304,
201617,
201619,
60308,
60319,
60324,
60327,
60328,
23469,
23473,
23474,
23475,
60337,
185267,
23487,
23490,
23492,
23494,
23499,
23502,
23508,
259036,
152560,
242675,
23559,
23560,
437258,
437261,
437262,
23574,
437273,
437277,
437297,
187442,
144435,
189491,
189492,
437302,
189496,
144441,
144440,
144442,
144444,
144445,
189502,
144447,
341054,
341058,
437314,
189508,
341060,
341068,
437338,
437340,
437345,
437349,
185446,
293990,
312423,
312427,
185452,
437356,
185451,
115820,
185453,
185457,
142450,
185455,
437364,
242807,
437369,
142463,
294016,
437384,
437392,
437396,
189590,
312473,
312474,
189595,
437402,
437404,
189598,
312478,
228512,
312479,
312481,
312483,
312476,
312480,
189608,
208041,
189610,
437416,
189612,
312493,
312492,
312497,
437426,
312499,
437428,
312501,
437431,
437433,
322751,
437440,
38081,
437443,
437445,
437446,
292041,
437453,
437458,
203990,
204000,
204003,
152821,
294138,
279818,
206103,
27943,
27944,
181544,
181553,
290113,
245058,
152909,
64865,
222563,
380266,
222573,
228717,
245102,
171377,
222577,
222579,
228721,
222587,
222590,
173441,
222600,
279944,
363913,
54678,
329120,
54692,
54700,
157151,
222693,
157158,
157159,
112111,
65016,
40453,
40454,
40458,
40460,
40466,
40469,
40471,
40477,
40482,
189593,
34359,
34362,
316993,
316996,
263751,
314987,
319085,
300662,
52882,
52887,
394912,
52897,
52896,
52900,
394925,
296660,
212694,
34531,
192229,
296679,
192231,
192232,
34538,
192234,
34537,
296685,
34540,
34541,
155377,
296699,
216829,
296706,
276230,
313099,
276236,
313111,
313113,
149280,
227116,
227119,
210755,
210756,
210758,
120655,
120656,
120657,
218960,
223064,
223069,
223076,
292709,
128873,
128874,
128876,
169837,
227180,
223087,
227183,
128881,
169843,
128883,
169856,
116622,
108431,
141220,
219045,
108460,
141246,
59348,
59349,
141272,
141284,
40934,
40940,
40941,
141292,
174063,
141297,
174067,
194558,
194559
] |
cd7c30856eb74a2e99b9c7f1ce13ca85623a93e9
|
41b8dc4a9fdc82730af06aa786104ef5fbe7f65e
|
/Tests/Person.swift
|
8876b5d7a66c667a96f13faff4070db8ebeeeb26
|
[
"MIT"
] |
permissive
|
carabina/CoreDataPlus
|
d99c253b3c60a73cbb10f89a70e4b527dff38899
|
cd3016cc46e5f6218249707bd3bfda71ca6185be
|
refs/heads/master
| 2021-05-07T20:01:22.177125 | 2017-10-30T18:33:08 | 2017-10-30T18:33:08 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,376 |
swift
|
//
// CoreDataPlus
//
// Copyright © 2016-2017 Tinrobots.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
import Foundation
import CoreData
import CoreDataPlus
@objc(Person)
final public class Person: NSManagedObject {
@NSManaged public var firstName: String
@NSManaged public var lastName: String
@NSManaged public var cars: Set<Car>?
}
|
[
194560,
395267,
196612,
395271,
395274,
108279,
395278,
395280,
395281,
395282,
395283,
407569,
108281,
395286,
395287,
23614,
395289,
395290,
363913,
407580,
196638,
395295,
395296,
196641,
98341,
61478,
98344,
98345,
98349,
23618,
23619,
174135,
354359,
124987,
174139,
354364,
229438,
124988,
229440,
229441,
395328,
354369,
174148,
229444,
395332,
327751,
174152,
395333,
395334,
229443,
378951,
229449,
174159,
229456,
112721,
112723,
106580,
106582,
106584,
106585,
106586,
106587,
112730,
174171,
284773,
213321,
125048,
229504,
125057,
125062,
125064,
125065,
235658,
125066,
229524,
229526,
303255,
303256,
229532,
125087,
215205,
215206,
215208,
215211,
215212,
215215,
241846,
241851,
241852,
241856,
241859,
241862,
317638,
241864,
317640,
241866,
241868,
241870,
262353,
241873,
241877,
241878,
97329,
262359,
241881,
106713,
241879,
241884,
106714,
262366,
227180,
106720,
241892,
106725,
241894,
241897,
241901,
241903,
241904,
176370,
241907,
241908,
176373,
241910,
260342,
106742,
106746,
176378,
241916,
141565,
141566,
141569,
241923,
241928,
141577,
141578,
241930,
141576,
241931,
241934,
141583,
241936,
241937,
141586,
141588,
12565,
227604,
227607,
241944,
227608,
12569,
141593,
141594,
141595,
141596,
141597,
241952,
141598,
241954,
141599,
141600,
141603,
241957,
141606,
141607,
141608,
241962,
289062,
289067,
141612,
289068,
141609,
12592,
241961,
289074,
241963,
97347,
289078,
141627,
141629,
141632,
141634,
241989,
227609,
213319,
141640,
141641,
141642,
227610,
141643,
213320,
241992,
241996,
241998,
241999,
242002,
141651,
262475,
227612,
242006,
141655,
215384,
282967,
227613,
141650,
141660,
168285,
282969,
141663,
141664,
227614,
141670,
172391,
141674,
141677,
141679,
141681,
287090,
375154,
190840,
190841,
430456,
190843,
190844,
430458,
375165,
190842,
375168,
375171,
141700,
375172,
141702,
430471,
141701,
141707,
430476,
430475,
141711,
430483,
217492,
217494,
197016,
197018,
197019,
197021,
295330,
295331,
197029,
430502,
168359,
303550,
160205,
160208,
381398,
319962,
305638,
408040,
272872,
223741,
61971,
191006,
191007,
272931,
57892,
57893,
272934,
57896,
328232,
420394,
57899,
57900,
295467,
57903,
57904,
57905,
57906,
158257,
336445,
336446,
336450,
336451,
336454,
336455,
336457,
336460,
336465,
55890,
336467,
336466,
336469,
336470,
336471,
336472,
336473,
336474,
55901,
336478,
336479,
336480,
336481,
336482,
336483,
111202,
272994,
336488,
336489,
273003,
273021,
273023,
437305,
297615,
297620,
437310,
297625,
297636,
437314,
135854,
135861,
242361,
242364,
244419,
244421,
66247,
244427,
248524,
127693,
244430,
66257,
66261,
127702,
127703,
62174,
334562,
127716,
334564,
62183,
127727,
127729,
244469,
244470,
318199,
318200,
142073,
164601,
316155,
142076,
228510,
334590,
318207,
244480,
334593,
334591,
334595,
316164,
334596,
142079,
142083,
334600,
142087,
334602,
318218,
318220,
334603,
334606,
318223,
334607,
142093,
334604,
142095,
318228,
318231,
318233,
318234,
318235,
316188,
318236,
318237,
316191,
203551,
318241,
316194,
318240,
318239,
187173,
318246,
187174,
187175,
187177,
187176,
187179,
187180,
187178,
187188,
314167,
316216,
396088,
396089,
396091,
396092,
314168,
396094,
148287,
316224,
241955,
396098,
314179,
396095,
279366,
279367,
396104,
396110,
187216,
396112,
396114,
187219,
396115,
187222,
396118,
396119,
396120,
396122,
396123,
396125,
396126,
396127,
396128,
396129,
396135,
299880,
396137,
162668,
299884,
187248,
396147,
396151,
248696,
396153,
187258,
187259,
322430,
437356,
60304,
201617,
201619,
60317,
60318,
60322,
60323,
185258,
185259,
60331,
23469,
185262,
23470,
23472,
60337,
23473,
23474,
23475,
23476,
185267,
23479,
23471,
287674,
23483,
23487,
185280,
242796,
281538,
281539,
23492,
23494,
185286,
23502,
228306,
23508,
23515,
23517,
259039,
40089,
23523,
23531,
203755,
23533,
341058,
152560,
23552,
171008,
437253,
40096,
23559,
23560,
23561,
23562,
437256,
437258,
437263,
40098,
23572,
437269,
23574,
23575,
23576,
437271,
23578,
437273,
23580,
23581,
40101,
23584,
23585,
437281,
23590,
23591,
23592,
23594,
23595,
23596,
23597,
23598,
23599,
189488,
97327,
187442,
144435,
189490,
187444,
189492,
189493,
187447,
144441,
144442,
189491,
23607,
144437,
144438,
144447,
97339,
23612,
144443,
144444,
23616,
144445,
222278,
341057,
341060,
341062,
341063,
341066,
341068,
23620,
23621,
23623,
23626,
437326,
23634,
40110,
23636,
285781,
203862,
285782,
189502,
285785,
23640,
185428,
312407,
115805,
115806,
115807,
293982,
115809,
115810,
312413,
437349,
185446,
312423,
115817,
242794,
185451,
115820,
185452,
185453,
115819,
185454,
185457,
142450,
115823,
185455,
115825,
115827,
242803,
115829,
242807,
189508,
437371,
437364,
294012,
294016,
205959,
213935,
437390,
437392,
437396,
189590,
40088,
312473,
189594,
208026,
40092,
208027,
189598,
40095,
208029,
208033,
27810,
228512,
228513,
312476,
312478,
189607,
312479,
189609,
189610,
312482,
189612,
312489,
312493,
437416,
437415,
189617,
312497,
189619,
312498,
189621,
312501,
189623,
437426,
437428,
189626,
437431,
437433,
312502,
312504,
322751,
437440,
437436,
38081,
437443,
437445,
292041,
292042,
437451,
38092,
437453,
128874,
181455,
292049,
437458,
128875,
152789,
437424,
203990,
203991,
152795,
204000,
204003,
339176,
339177,
152821,
208117,
152825,
294137,
294138,
321829,
279818,
206094,
279823,
206097,
206098,
294162,
206102,
206104,
206108,
206109,
181533,
425247,
294181,
27943,
181544,
294183,
181545,
40105,
27948,
181553,
181559,
173368,
206137,
206138,
290105,
151285,
173379,
312480,
152906,
152907,
152908,
152909,
152910,
290123,
290125,
290126,
290127,
290130,
290131,
312483,
3119,
290135,
290136,
245081,
290137,
290139,
378206,
378208,
222562,
222563,
222566,
228717,
222573,
228721,
222577,
222579,
222581,
222582,
222587,
222590,
222591,
54655,
222596,
222597,
177543,
279944,
222599,
222601,
222603,
222604,
54669,
222605,
222606,
222607,
54673,
54666,
40109,
54678,
54680,
279969,
54692,
152998,
54698,
54701,
54703,
153009,
298431,
189495,
212420,
370118,
153037,
153049,
153051,
189496,
157151,
222689,
222692,
157157,
222693,
112111,
112115,
112117,
112120,
280063,
40451,
112131,
40453,
280068,
40455,
280074,
40458,
40460,
40463,
112144,
112145,
40466,
40469,
40471,
40475,
40477,
40479,
40482,
362020,
362022,
116267,
282156,
173614,
173615,
173617,
173618,
173621,
173622,
173623,
34362,
316993,
173634,
173635,
316995,
316997,
173639,
312427,
106085,
319081,
319085,
319088,
319089,
300660,
300661,
300662,
300663,
319094,
319098,
319101,
319103,
175760,
394899,
52886,
52887,
394905,
394908,
394910,
394912,
52896,
52899,
52900,
339622,
147115,
147116,
151218,
394935,
321210,
296679,
292544,
108230,
108234,
296682,
341052,
108240,
296684,
108245,
212694,
34516,
341054,
296660,
34522,
341055,
34531,
192229,
192230,
34535,
192231,
34537,
192234,
34538,
192232,
296681,
34540,
34541,
216812,
216814,
216815,
216816,
216818,
216819,
296687,
216822,
296688,
296691,
296692,
216826,
296698,
216829,
216828,
296699,
296700,
216832,
216833,
276227,
216834,
296703,
216836,
216837,
216838,
296707,
296708,
296710,
296712,
296713,
313101,
296694,
313104,
276232,
313099,
276236,
313108,
313102,
313111,
313112,
149274,
149275,
159518,
149280,
159523,
296701,
227116,
296704,
321342,
210755,
210756,
210757,
210758,
321353,
218959,
218960,
120655,
120656,
218963,
218964,
218962,
223064,
223065,
180058,
229209,
218973,
223069,
229213,
169824,
229217,
169826,
292705,
223075,
237413,
169830,
292709,
223076,
128873,
180070,
169835,
128876,
169837,
128878,
223087,
223086,
128881,
128882,
128883,
227188,
128884,
227183,
219004,
141181,
327550,
219007,
108419,
141189,
108425,
141198,
108431,
108432,
141202,
108436,
141208,
219033,
108448,
219040,
141219,
219043,
219044,
141220,
141223,
141228,
141229,
108460,
108462,
229294,
229295,
141235,
194559,
319426,
173394,
141253,
319432,
141264,
141646,
23600,
59349,
23601,
141272,
141273,
23602,
23603,
40931,
40932,
141284,
23604,
23608,
141290,
141292,
40940,
40941,
174063,
141293,
141295,
231406,
174066,
174067,
237559,
174074,
395259,
23609
] |
d4c35be81e823b96d46643358741f82f6269b2d3
|
bae0bee042d7195da059f3756e330ac7561aef8c
|
/RecipeApp/Authentication/UserVC.swift
|
b54531e8829d29b9c63a834c6da97fda95ddb633
|
[] |
no_license
|
leonloon/recipe-app
|
95397c3d4e38c2646c1102ca97e28c05a2f887be
|
ee37527634da3f198e14e3c6c944eb4bff4c50f0
|
refs/heads/master
| 2023-01-31T16:26:24.969406 | 2020-12-12T08:45:44 | 2020-12-12T08:45:44 | 320,782,862 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,331 |
swift
|
//
// UserVC.swift
// RecipeApp
//
// Created by Leon Mah Kean Loon on 12/12/2020.
//
import UIKit
import SwiftKeychainWrapper
class UserVC: BaseViewController {
var user = UserSingleton.shared
lazy var rightBarButtonItem: UIBarButtonItem = {
let item = UIBarButtonItem(title: "Logout", style: .plain, target: self, action: #selector(tapLogout))
return item
}()
lazy var loggedInLabel: UILabel = {
let label = UILabel()
label.font = UIFont(name: bold, size: 28)
label.text = "Logged In!"
return label
}()
override func viewDidLoad() {
super.viewDidLoad()
title = user.name
self.navigationItem.rightBarButtonItem = rightBarButtonItem
view.addSubview(loggedInLabel)
loggedInLabel.snp.makeConstraints({ (make) in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
})
}
@objc func tapLogout() {
let removeUsername: Bool = KeychainWrapper.standard.removeObject(forKey: "username")
let removePassword: Bool = KeychainWrapper.standard.removeObject(forKey: "password")
if removeUsername && removePassword {
user.logout()
restartApplication()
}
}
}
|
[
-1
] |
2cb9b72608cff129541a27cf40a1cacf66420eca
|
130eba284cb82a4a1c34e1e06f050fc116576932
|
/DuckDuckGoTests/TrackerDataManagerTests.swift
|
919a261abb4915e83b10c7e924b150d3d62d6cc5
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
seanwallawalla-forks/iOS
|
7b955a4bacf7ef2b1302bced5b50a9d6c3032a2f
|
5c8ec8e7cb274f34a0271adccfab9a5e43c4eb02
|
refs/heads/main
| 2023-04-11T04:08:02.054833 | 2021-04-01T17:11:22 | 2021-04-01T17:11:22 | 356,064,923 | 1 | 0 |
Apache-2.0
| 2021-04-08T22:32:42 | 2021-04-08T22:32:42 | null |
UTF-8
|
Swift
| false | false | 6,222 |
swift
|
//
// TrackerDataManagerTests.swift
// Core
//
// Copyright © 2019 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import XCTest
import CommonCrypto
@testable import Core
class TrackerDataManagerTests: XCTestCase {
override func setUp() {
super.setUp()
try? FileManager.default.removeItem(at: FileStore().persistenceLocation(forConfiguration: .trackerDataSet))
}
func testWhenReloadCalledInitiallyThenDataSetIsEmbedded() {
XCTAssertEqual(TrackerDataManager.shared.reload(etag: nil), .embedded)
}
func testFindTrackerByUrl() {
let tracker = TrackerDataManager.shared.findTracker(forUrl: "http://googletagmanager.com")
XCTAssertNotNil(tracker)
XCTAssertEqual("Google", tracker?.owner?.displayName)
}
func testFindEntityByName() {
let entity = TrackerDataManager.shared.findEntity(byName: "Google LLC")
XCTAssertNotNil(entity)
XCTAssertEqual("Google", entity?.displayName)
}
func testFindEntityForHost() {
let entity = TrackerDataManager.shared.findEntity(forHost: "www.google.com")
XCTAssertNotNil(entity)
XCTAssertEqual("Google", entity?.displayName)
}
// swiftlint:disable function_body_length
func testWhenDownloadedDataAvailableThenReloadUsesIt() {
let update = """
{
"trackers": {
"notreal.io": {
"domain": "notreal.io",
"default": "block",
"owner": {
"name": "CleverDATA LLC",
"displayName": "CleverDATA",
"privacyPolicy": "https://hermann.ai/privacy-en",
"url": "http://hermann.ai"
},
"source": [
"DDG"
],
"prevalence": 0.002,
"fingerprinting": 0,
"cookies": 0.002,
"performance": {
"time": 1,
"size": 1,
"cpu": 1,
"cache": 3
},
"categories": [
"Ad Motivated Tracking",
"Advertising",
"Analytics",
"Third-Party Analytics Marketing"
]
}
},
"entities": {
"Not Real": {
"domains": [
"notreal.io"
],
"displayName": "Not Real",
"prevalence": 0.666
}
},
"domains": {
"notreal.io": "Not Real"
}
}
"""
XCTAssertTrue(FileStore().persist(update.data(using: .utf8), forConfiguration: .trackerDataSet))
XCTAssertEqual(TrackerDataManager.shared.etag, TrackerDataManager.Constants.embeddedDataSetETag)
XCTAssertEqual(TrackerDataManager.shared.reload(etag: "new etag"), .downloaded)
XCTAssertEqual(TrackerDataManager.shared.etag, "new etag")
XCTAssertNil(TrackerDataManager.shared.findEntity(byName: "Google LLC"))
XCTAssertNotNil(TrackerDataManager.shared.findEntity(byName: "Not Real"))
}
// swiftlint:enable function_body_length
func testWhenEmbeddedDataIsUpdatedThenUpdateSHAAndEtag() {
let hash = calculateHash(for: TrackerDataManager.embeddedUrl)
XCTAssertEqual(hash, TrackerDataManager.Constants.embeddedDataSetSHA, "Error: please update SHA and ETag when changing embedded TDS")
}
private func calculateHash(for fileURL: URL) -> String {
if let data = sha256(url: fileURL) {
return data.base64EncodedString()
}
XCTFail("Could not calculate TDS hash")
return ""
}
// Source:
// https://stackoverflow.com/questions/42934154/how-can-i-hash-a-file-on-ios-using-swift-3/49878022#49878022
func sha256(url: URL) -> Data? {
do {
let bufferSize = 1024 * 1024
// Open file for reading:
let file = try FileHandle(forReadingFrom: url)
defer {
file.closeFile()
}
// Create and initialize SHA256 context:
var context = CC_SHA256_CTX()
CC_SHA256_Init(&context)
// Read up to `bufferSize` bytes, until EOF is reached, and update SHA256 context:
while autoreleasepool(invoking: {
// Read up to `bufferSize` bytes
let data = file.readData(ofLength: bufferSize)
if data.count > 0 {
_ = data.withUnsafeBytes { bytesFromBuffer -> Int32 in
guard let rawBytes = bytesFromBuffer.bindMemory(to: UInt8.self).baseAddress else {
return Int32(kCCMemoryFailure)
}
return CC_SHA256_Update(&context, rawBytes, numericCast(data.count))
}
// Continue
return true
} else {
// End of file
return false
}
}) { }
// Compute the SHA256 digest:
var digestData = Data(count: Int(CC_SHA256_DIGEST_LENGTH))
_ = digestData.withUnsafeMutableBytes { bytesFromDigest -> Int32 in
guard let rawBytes = bytesFromDigest.bindMemory(to: UInt8.self).baseAddress else {
return Int32(kCCMemoryFailure)
}
return CC_SHA256_Final(rawBytes, &context)
}
return digestData
} catch {
print(error)
return nil
}
}
}
|
[
-1
] |
ed013f753c43424fc54d125e839839c06500cbe7
|
c987d2f61f9760300e9ed52e6dda15fde66b74bf
|
/GLO/LoginController.swift
|
841879ca39b1fe505bd06f7bb25038b1fd470ea7
|
[] |
no_license
|
BriaWoods/GLO-iOS
|
72cd402a9b7cf78839550f38cfcb4b0073c0e51b
|
307b7ab2a22c9b8fdc0ec224554c29d44cd9cb75
|
refs/heads/master
| 2020-04-06T06:55:13.192839 | 2016-08-24T09:35:39 | 2016-08-24T09:35:39 | 63,366,581 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,343 |
swift
|
//
// LoginController.swift
// GLO
//
// Created by Stephen Looney on 7/9/16.
// Copyright © 2016 SpaceBoat Development LLC. All rights reserved.
//
import Foundation
import UIKit
import QuartzCore
class LoginController: UIViewController {
@IBOutlet var usernameTextField: UITextField!
@IBOutlet var passwordTextField: UITextField!
@IBOutlet var loginButton: UIButton!
@IBOutlet var signUpButton: UIButton!
/*
init() {
super.init(nibName: nil, bundle: nil)
}
convenience required init?(coder aDecoder: NSCoder) {
self.init()
//fatalError("init(coder:) has not been implemented")
}
*/
override func viewDidLoad() {
super.viewDidLoad()
print("viewDidLoad")
}
override func viewWillAppear(animated: Bool) {
print("Login View Will Appear")
loginButton.layer.cornerRadius = 8.0
signUpButton.layer.cornerRadius = 8.0
}
@IBAction func loginButtonPressed(sender: AnyObject) {
print("Pressed Login Button")
}
@IBAction func forgotPasswordPressed(sender: AnyObject) {
}
@IBAction func dismissButtonPressed(sender: AnyObject) {
print("Login dismiss pressed")
self.dismissViewControllerAnimated(true, completion: nil)
}
}
|
[
-1
] |
e068729b4993ba371dfa79b2cf55ad66e9785ed6
|
6b1506f2ebe9fa8a9c87c75eb45ed6652aab2ed8
|
/Canvas/ViewController.swift
|
36a4facc2323d83efaa1f5daa3137aa42823065e
|
[] |
no_license
|
devarispbrown/Canvas
|
934dc83b68dcda420c332c7feb7882026dcbb72b
|
ede1895b630b2c1e8819d86d949936b866a2a7b5
|
refs/heads/master
| 2021-01-10T12:00:21.348311 | 2015-05-28T02:58:50 | 2015-05-28T02:58:50 | 36,411,068 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 506 |
swift
|
//
// ViewController.swift
// Canvas
//
// Created by DeVaris Brown on 5/27/15.
// Copyright (c) 2015 Furious One. 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,
277508,
279046,
215562,
275466,
278543,
282128,
234511,
277527,
236057,
286234,
279754,
282143,
282145,
317473,
295460,
284197,
296487,
286249,
237616,
360501,
286775,
279096,
234551,
237624,
288827,
300089,
238653,
226878,
277057,
286786,
129604,
284740,
159812,
226887,
293961,
243786,
300107,
158285,
278606,
226896,
212561,
284242,
228945,
300116,
284240,
276054,
237655,
307288,
292435,
282202,
212573,
277602,
309347,
276580,
284261,
281701,
309351,
281703,
309353,
311913,
356458,
277612,
356460,
164974,
307311,
306791,
312433,
281202,
284275,
277108,
276597,
287350,
276087,
300149,
284287,
284289,
276099,
279684,
276612,
285321,
253066,
303242,
284298,
285837,
311437,
226447,
234641,
278675,
349332,
282262,
117399,
280219,
284315,
284317,
282270,
299165,
228000,
285855,
302235,
225955,
282275,
278693,
326311,
287399,
209577,
100521,
234665,
280231,
284328,
284336,
277171,
307379,
276150,
300727,
280760,
286390,
282301,
283839,
277696,
285377,
280770,
228548,
302788,
280772,
276167,
277192,
282311,
228551,
284361,
230604,
287437,
313550,
280775,
230608,
229585,
282320,
307410,
284373,
302295,
189655,
226009,
286204,
280797,
363743,
278752,
282338,
298211,
284391,
277224,
228585,
282346,
280808,
199402,
312049,
289524,
288501,
120054,
226038,
234232,
286456,
204027,
282365,
286462,
300288,
282368,
276736,
230147,
280832,
278786,
286314,
226055,
358147,
299786,
312586,
295696,
300817,
282389,
296216,
278298,
329499,
369434,
281373,
228127,
276256,
278304,
315170,
281380,
304933,
282917,
234279,
277796,
283433,
315177,
282411,
312107,
293682,
282426,
289596,
278845,
307516,
279360,
288577,
289600,
288579,
300358,
238920,
234829,
287055,
296272,
279380,
276309,
295766,
307029,
279386,
188253,
323933,
308064,
313704,
227688,
313706,
303977,
313708,
306540,
293742,
299374,
199024,
276849,
278897,
277364,
310649,
207738,
275842,
224643,
311684,
313733,
313222,
324491,
234380,
304015,
370093,
310673,
306578,
226705,
227740,
285087,
234402,
283556,
288165,
284580,
284586,
144811,
277420,
291755,
276396,
285103,
277935,
324528,
305582,
230323,
282548,
292277,
277430,
296374,
337336,
277432,
278968,
130487,
276412,
278973,
234423,
281530,
295874,
165832,
289224,
306633,
288205,
286158,
301012,
163289,
280028,
276959,
286175,
276965,
168936,
294889,
286189,
183278,
277487,
282095,
281073,
298989,
227315,
237556,
302580,
281078,
236022,
310773,
308721,
296436,
288251,
237564,
287231
] |
1a73001b87fffa617b7ead2e30cfe57505ab102b
|
49f38e3056b1fc54240c6099c1c9c6d50a2037d1
|
/LocalizationUITests/LocalizationUITests.swift
|
08eaef7b1bf85d92c9796d9686ec170c13d24c2b
|
[] |
no_license
|
fishcharlie/LocalizationUITests
|
f7f84b06a1be1ce4f4eea95327bd8f9b00713ce1
|
7fb9d3dd74c3ae94a164f7b6cf559d2ffead08fe
|
refs/heads/master
| 2020-12-02T07:53:25.800502 | 2017-07-10T06:25:14 | 2017-07-10T06:25:14 | 96,742,796 | 0 | 0 | null | 2017-07-10T06:24:02 | 2017-07-10T06:24:02 | null |
UTF-8
|
Swift
| false | false | 1,695 |
swift
|
//
// LocalizationUITests.swift
// LocalizationUITests
//
// Created by Titouan van Belle on 10.07.17.
// Copyright © 2017 Tito. All rights reserved.
//
import XCTest
func localizedString(key:String) -> String {
let bundle = Bundle(for: LocalizationUITests.self)
let deviceLanguage = Locale.preferredLanguages[0]
let localizationBundle = Bundle(path: bundle.path(forResource: deviceLanguage, ofType: "lproj")!)
let result = NSLocalizedString(key, bundle:localizationBundle!, comment: "") //
return result
}
class LocalizationUITests: 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.
// 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.
let app = XCUIApplication()
setupSnapshot(app)
app.launch()
}
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() {
let greeting = localizedString(key: "Greetings.Hello")
XCTAssert(XCUIApplication().staticTexts[greeting].exists, "Expected \"\(greeting)\" label to exist")
snapshot("01Main")
}
}
|
[
-1
] |
13f8e907352ba188c1e95810ced3ee48d6d1b885
|
2743faa893c4bc566d440b4ea0af9e121ffe2160
|
/CleanUITestUITests/UITestCase.swift
|
feaf63c605ffd82f859951e0ab1750a301e8da5c
|
[] |
no_license
|
rddorado/CleanUITests
|
5ed092374a3a30e9e74d610031e845424c567dec
|
d72f13cd1a5588258d8f4d6e863e7bd27dd3c7de
|
refs/heads/master
| 2021-08-30T12:09:26.169397 | 2017-12-17T21:55:35 | 2017-12-17T21:55:35 | 113,030,216 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 220 |
swift
|
//
// UITestCase.swift
// ModularizedByFeaturesUITests
//
// Created by Ronaldo II Dorado on 20/10/17.
// Copyright © 2017 Ronaldo II Dorado. All rights reserved.
//
import XCTest
class UITestCase: XCTestCase {
}
|
[
-1
] |
ed4d60432f9badf5b7789bab3cf1d6a70bb13094
|
c7aa0720797799a0e7d759ee0cafb99a4408f94d
|
/Delegate/AppDelegate.swift
|
008593bbe7d56101d75a3013fa2347856c22d196
|
[] |
no_license
|
JeffHu318/Delegate-Practice
|
65f05272a8669f99d53b573a802b50108ca80006
|
05acbcc2e2016a1d986d1995cb58fec447362a80
|
refs/heads/master
| 2021-01-17T19:16:08.884952 | 2016-07-21T07:06:09 | 2016-07-21T07:06:09 | 63,845,617 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,137 |
swift
|
//
// AppDelegate.swift
// Delegate
//
// Created by WEI on 7/21/16.
// Copyright © 2016 WEI. 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 active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
|
[
229380,
229383,
229385,
278539,
229388,
294924,
278542,
229391,
327695,
278545,
229394,
278548,
229397,
229399,
229402,
278556,
229405,
352284,
278559,
229408,
278564,
294950,
229415,
229417,
237613,
229422,
237618,
229426,
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,
303230,
327814,
131209,
417930,
303241,
311436,
303244,
319633,
286873,
286876,
311460,
311469,
32944,
327862,
286906,
327866,
180413,
286910,
131264,
286916,
286922,
286924,
286926,
319694,
286928,
131281,
278743,
278747,
295133,
155872,
319716,
278760,
237807,
303345,
286962,
131314,
229622,
327930,
278781,
278783,
278785,
237826,
319751,
278792,
286987,
319757,
311569,
286999,
319770,
287003,
287006,
287009,
287012,
287014,
287016,
287019,
311598,
287023,
262448,
311601,
287032,
155966,
278849,
319809,
319810,
319814,
311623,
319818,
311628,
229709,
287054,
319822,
278865,
229717,
196963,
196969,
139638,
213367,
106872,
319872,
311683,
311693,
65943,
319898,
311719,
278952,
139689,
278957,
311728,
278967,
180668,
311741,
278975,
319938,
278980,
98756,
278983,
319945,
278986,
319947,
278990,
278994,
311767,
279003,
279006,
188895,
172512,
279010,
287202,
279015,
172520,
319978,
279020,
172526,
279023,
311791,
172529,
279027,
319989,
164343,
180727,
279035,
311804,
287230,
279040,
303617,
287234,
279045,
287238,
320007,
172550,
172552,
303623,
279051,
172558,
279055,
303632,
279058,
303637,
279063,
279067,
172572,
279072,
172577,
295459,
172581,
295461,
279082,
311850,
279084,
172591,
172598,
279095,
172607,
172609,
172612,
377413,
172614,
303690,
172618,
33357,
287309,
279124,
172634,
262752,
172644,
311911,
189034,
295533,
189039,
189040,
352880,
295538,
172655,
189044,
287349,
172656,
172660,
287355,
287360,
295553,
287365,
311942,
295557,
303751,
352905,
279178,
287371,
311946,
311951,
287377,
172691,
287381,
311957,
221850,
287386,
303773,
164509,
287390,
295583,
172702,
230045,
172705,
287394,
172707,
303780,
287398,
287400,
279208,
172714,
295595,
279212,
189102,
172721,
287409,
66227,
303797,
189114,
287419,
303804,
328381,
279231,
287423,
328384,
287427,
312006,
107208,
107212,
172748,
287436,
172751,
287440,
295633,
303827,
172755,
279255,
172760,
279258,
287450,
213724,
303835,
189149,
303838,
279267,
312035,
295654,
279272,
230128,
312048,
312050,
230131,
205564,
303871,
230146,
295685,
230154,
33548,
312077,
295695,
295701,
369433,
230169,
295707,
328476,
295710,
230175,
303914,
279340,
205613,
279353,
230202,
312124,
222018,
295755,
377676,
148302,
287569,
303959,
230237,
279390,
230241,
279394,
303976,
336744,
303985,
328563,
303987,
279413,
303991,
303997,
295806,
295808,
304005,
295813,
320391,
213895,
304007,
304009,
304011,
230284,
304013,
213902,
279438,
295822,
189329,
295825,
304019,
189331,
279445,
58262,
279452,
410526,
279461,
279462,
304042,
213931,
304055,
230327,
287675,
304063,
238528,
304065,
189378,
213954,
156612,
295873,
213963,
312272,
304084,
304090,
320481,
320490,
304106,
312302,
328687,
320496,
304114,
295928,
320505,
312321,
295945,
197645,
230413,
295949,
320528,
140312,
295961,
238620,
197663,
304164,
189479,
304170,
238641,
312374,
238652,
238655,
230465,
238658,
296004,
336964,
205895,
320584,
238666,
296021,
402518,
336987,
230497,
296036,
296040,
361576,
205931,
296044,
164973,
205934,
279661,
312432,
279669,
337018,
189562,
279679,
279683,
222340,
205968,
296084,
238745,
304285,
238756,
205991,
222377,
165035,
337067,
165038,
238766,
230576,
304311,
230592,
279750,
312518,
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,
296262,
238919,
296264,
320840,
230727,
296267,
296271,
222545,
230739,
312663,
222556,
337244,
230752,
312676,
230760,
173418,
410987,
230763,
230768,
296305,
312692,
230773,
279929,
181626,
304505,
304506,
181631,
312711,
296331,
288140,
230800,
288144,
304533,
337306,
288154,
288160,
173472,
288162,
288164,
279975,
304555,
370092,
279983,
288176,
279985,
173488,
312755,
296373,
279991,
312759,
288185,
337335,
222652,
312766,
173507,
296389,
222665,
230860,
312783,
288208,
230865,
288210,
370130,
222676,
288212,
280021,
288214,
239064,
329177,
288217,
280027,
288218,
288220,
239070,
288224,
288226,
370146,
280036,
288229,
280038,
288230,
288232,
280034,
288234,
320998,
288236,
288238,
288240,
288242,
296435,
288244,
288250,
148990,
296446,
402942,
206336,
296450,
321022,
230916,
230919,
214535,
370187,
304651,
304653,
230940,
222752,
108066,
296486,
296488,
157229,
230961,
288320,
288325,
124489,
280140,
280145,
288338,
280149,
288344,
280152,
239194,
280158,
403039,
370272,
181854,
239202,
312938,
280183,
280185,
280188,
280191,
280194,
116354,
280208,
280211,
288408,
280218,
280222,
190118,
321195,
296622,
321200,
337585,
296626,
296634,
296637,
280260,
280264,
206536,
206539,
206541,
206543,
280276,
313044,
321239,
280283,
288478,
313055,
321252,
313066,
280302,
288494,
280304,
313073,
419570,
288499,
288502,
280314,
288510,
124671,
67330,
280324,
280331,
198416,
280337,
296723,
116503,
321304,
329498,
296731,
321311,
313121,
313123,
321316,
304932,
280363,
141101,
165678,
280375,
321336,
296767,
288576,
345921,
280388,
304968,
280393,
280402,
313176,
42842,
280419,
321381,
296812,
313201,
1920,
255873,
305028,
280454,
247688,
280464,
124817,
280468,
239510,
280473,
124827,
214940,
247709,
280487,
313258,
321458,
296883,
124853,
214966,
296890,
10170,
288700,
296894,
280515,
190403,
296900,
337862,
165831,
280521,
231379,
296921,
239586,
313320,
231404,
124913,
165876,
321528,
313340,
288764,
239612,
239617,
313347,
288773,
313358,
305176,
313371,
354338,
305191,
223273,
313386,
354348,
124978,
215090,
124980,
288824,
288826,
321595,
378941,
313406,
288831,
288836,
67654,
280651,
354382,
288848,
280658,
215123,
354390,
288855,
288859,
280669,
313438,
280671,
223327,
149599,
149601,
149603,
321634,
329830,
280681,
313451,
223341,
280687,
313458,
280691,
215154,
313464,
321659,
280702,
288895,
321670,
215175,
141446,
141455,
141459,
280725,
313498,
288936,
100520,
280747,
288940,
280755,
288947,
321717,
280759,
280764,
280769,
280771,
280774,
280776,
313548,
321740,
280783,
280786,
280788,
313557,
280793,
280796,
280798,
338147,
280804,
280807,
157930,
280811,
280817,
280819,
157940,
182517,
125171,
280823,
280825,
280827,
280830,
280831,
280833,
280835,
125187,
125191,
125207,
125209,
321817,
125218,
321842,
223539,
125239,
280888,
280891,
289087,
280897,
280900,
305480,
239944,
280906,
239947,
305485,
305489,
379218,
280919,
354653,
313700,
280937,
313705,
190832,
280946,
223606,
313720,
280956,
280959,
313731,
199051,
240011,
289166,
240017,
297363,
190868,
297365,
240021,
297368,
297372,
141725,
297377,
289186,
297391,
289201,
240052,
289207,
305594,
289210,
281024,
289218,
289221,
289227,
281045,
281047,
215526,
166378,
305647,
281075,
174580,
281084,
240124,
305662,
305664,
240129,
305666,
240132,
223749,
305668,
281095,
223752,
150025,
338440,
223757,
281102,
223763,
223765,
281113,
322074,
281116,
281121,
182819,
281127,
281135,
150066,
158262,
158266,
289342,
281154,
322115,
158283,
281163,
281179,
199262,
338528,
338532,
281190,
199273,
281196,
158317,
19053,
313973,
281210,
297594,
158347,
133776,
182929,
314003,
117398,
314007,
289436,
174754,
330404,
289448,
133801,
174764,
314029,
314033,
240309,
133817,
314045,
314047,
314051,
199364,
297671,
158409,
289493,
363234,
289513,
289522,
289525,
289532,
322303,
289537,
322310,
264969,
322314,
322318,
281361,
281372,
322341,
215850,
281388,
207661,
289593,
281401,
289601,
281410,
281413,
281414,
240458,
281420,
240468,
281430,
322393,
297818,
281435,
281438,
281442,
174955,
224110,
207733,
207737,
183172,
158596,
338823,
322440,
314249,
240519,
183184,
240535,
289687,
289694,
289696,
289700,
289712,
281529,
289724,
52163,
183260,
281567,
289762,
322534,
297961,
281581,
183277,
322550,
134142,
322563,
175134,
322599,
322610,
314421,
281654,
314427,
207937,
314433,
314441,
207949,
322642,
314456,
281691,
314461,
281702,
281704,
314474,
281708,
281711,
289912,
248995,
306341,
306344,
306347,
306354,
142531,
199877,
289991,
306377,
289997,
249045,
363742,
363745,
298216,
330988,
126190,
216303,
322801,
388350,
257302,
363802,
199976,
199978,
314671,
298292,
298294,
257334,
216376,
298306,
380226,
224584,
224587,
224594,
216404,
306517,
150870,
314714,
224603,
159068,
314718,
265568,
314723,
281960,
150890,
306539,
314732,
314736,
290161,
216436,
306549,
298358,
314743,
306552,
290171,
306555,
314747,
290174,
298365,
224641,
281987,
298372,
314756,
281990,
224647,
265604,
298377,
314763,
142733,
298381,
224657,
306581,
314779,
314785,
282025,
282027,
241068,
241070,
241072,
282034,
241077,
150966,
298424,
306618,
282044,
323015,
306635,
306640,
290263,
290270,
290275,
339431,
282089,
191985,
282098,
290291,
282101,
241142,
191992,
290298,
151036,
290302,
282111,
290305,
175621,
192008,
323084,
257550,
282127,
290321,
282130,
323090,
282133,
290325,
241175,
290328,
282137,
290332,
241181,
282142,
282144,
290344,
306731,
290349,
290351,
290356,
282186,
224849,
282195,
282199,
282201,
306778,
159324,
159330,
314979,
298598,
323176,
224875,
241260,
323181,
257658,
315016,
282249,
290445,
282261,
298651,
323229,
282269,
298655,
323231,
61092,
282277,
306856,
282295,
282300,
323260,
323266,
282310,
323273,
282319,
306897,
241362,
282328,
306904,
298714,
52959,
216801,
282337,
241380,
216806,
323304,
282345,
12011,
282356,
323318,
282364,
282367,
306945,
241412,
323333,
282376,
216842,
323345,
282388,
323349,
282392,
184090,
315167,
315169,
282402,
315174,
323367,
241448,
315176,
282410,
241450,
306988,
306991,
315184,
323376,
315190,
241464,
282425,
159545,
298811,
307009,
413506,
241475,
307012,
148946,
315211,
282446,
307027,
315221,
282454,
323414,
241496,
315223,
241498,
307035,
307040,
282465,
110433,
241509,
110438,
298860,
110445,
282478,
282481,
110450,
315251,
315249,
315253,
315255,
339838,
282499,
315267,
315269,
241544,
282505,
241546,
241548,
298896,
282514,
298898,
241556,
298901,
282520,
241560,
241563,
241565,
241567,
241569,
282531,
241574,
282537,
298922,
178273,
36779,
241581,
282542,
241583,
323504,
241586,
282547,
241588,
290739,
241590,
241592,
241598,
290751,
241600,
241605,
151495,
241610,
298975,
241632,
298984,
241640,
241643,
298988,
241646,
241649,
241652,
323574,
290807,
299006,
282623,
315396,
241669,
315397,
282632,
282639,
290835,
282645,
241693,
282654,
102438,
217127,
282669,
323630,
282681,
290877,
282687,
159811,
315463,
315466,
192589,
307278,
192596,
176213,
307287,
315482,
315483,
217179,
192605,
233567,
200801,
217188,
299109,
307303,
315495,
356457,
307307,
45163,
315502,
192624,
307314,
323700,
299126,
233591,
299136,
307329,
307338,
233613,
241813,
307352,
299164,
184479,
299167,
184481,
315557,
184486,
307370,
307372,
184492,
307374,
307376,
323763,
176311,
184503,
307385,
307386,
258235,
176316,
307388,
307390,
299200,
184512,
307394,
299204,
307396,
184518,
307399,
323784,
307409,
307411,
176343,
299225,
233701,
307432,
184572,
282881,
184579,
282893,
291089,
282906,
291104,
233766,
176435,
307508,
315701,
307510,
332086,
151864,
307512,
168245,
307515,
282942,
307518,
151874,
282947,
282957,
323917,
110926,
233808,
323921,
315733,
323926,
233815,
315739,
323932,
299357,
242018,
242024,
299373,
315757,
250231,
315771,
242043,
299388,
299391,
291202,
299398,
242057,
291212,
299405,
291222,
283033,
291226,
242075,
291231,
61855,
283042,
291238,
291241,
127403,
127405,
291247,
127407,
299440,
299444,
127413,
291254,
283062,
194660,
127417,
291260,
283069,
127421,
127424,
127429,
127431,
176592,
315856,
315860,
176597,
283095,
127447,
299481,
176605,
242143,
291299,
127463,
242152,
291305,
127466,
176620,
291314,
291317,
135672,
233979,
291323,
291330,
283142,
127497,
233994,
135689,
291341,
233998,
234003,
234006,
127511,
152087,
283161,
234010,
135707,
242202,
135710,
242206,
242208,
291361,
242220,
291378,
152118,
234038,
234041,
70213,
111193,
242275,
299620,
242279,
168562,
184952,
135805,
291456,
135808,
299655,
373383,
135820,
316051,
225941,
316054,
299672,
135834,
373404,
299677,
225948,
135839,
299680,
225954,
299684,
242343,
209576,
242345,
373421,
135870,
135873,
135876,
135879,
299720,
299723,
225998,
299726,
226002,
226005,
119509,
226008,
242396,
299740,
201444,
299750,
283368,
234219,
283372,
226037,
283382,
234231,
316151,
234236,
226045,
234239,
242431,
209665,
299778,
234242,
242436,
234246,
226056,
234248,
291593,
242443,
234252,
242445,
234254,
291601,
234258,
242450,
242452,
234261,
348950,
234264,
201496,
234266,
283421,
234269,
234272,
234274,
152355,
234278,
299814,
283432,
234281,
234284,
234287,
283440,
185138,
242483,
234292,
234296,
234298,
283452,
160572,
234302,
234307,
242499,
234309,
292433,
234313,
316233,
316235,
234316,
283468,
234319,
242511,
234321,
234324,
201557,
234329,
234333,
308063,
234336,
234338,
242530,
349027,
234341,
234344,
234347,
177004,
234350,
324464,
234353,
152435,
177011,
234356,
234358,
234362,
226171,
291711,
234368,
234370,
291714,
291716,
234373,
226182,
234375,
226185,
308105,
234379,
234384,
234388,
234390,
226200,
234393,
209818,
324504,
234396,
324508,
234398,
291742,
308123,
234401,
291747,
291748,
234405,
324518,
234407,
324520,
291750,
234410,
291754,
226220,
324522,
234414,
324527,
291760,
234417,
201650,
324531,
291756,
226230,
234422,
324536,
275384,
234428,
291773,
226239,
234431,
242623,
234434,
324544,
324548,
226245,
324546,
234439,
234437,
234443,
291788,
193486,
275406,
193488,
234446,
234449,
234452,
234455,
234459,
234461,
234464,
234467,
234470,
168935,
5096,
324585,
234475,
234478,
316400,
234481,
316403,
234484,
234485,
234487,
324599,
234490,
234493,
234496,
316416,
234501,
275462,
308231,
234504,
234507,
234510,
234515,
300054,
234519,
316439,
234520,
234523,
234526,
234528,
300066,
234532,
300069,
234535,
234537,
234540,
234543,
234546,
275508,
300085,
234549,
300088,
234553,
234556,
234558,
316479,
234561,
308291,
234563,
316483,
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,
144506,
275579,
234618,
234620,
234623,
226433,
234627,
275588,
234629,
234634,
234636,
177293,
234640,
275602,
234643,
226453,
275606,
308373,
275608,
234647,
234648,
234650,
308379,
283805,
324757,
119967,
234653,
234657,
300189,
324766,
324768,
283813,
234661,
242852,
234664,
300197,
275626,
234667,
316596,
308414,
234687,
316610,
300226,
234692,
283844,
300229,
308420,
308418,
283850,
300234,
300238,
300241,
316625,
300243,
300245,
316630,
300248,
300253,
300256,
300258,
300260,
234726,
300263,
300265,
161003,
300267,
300270,
300272,
120053,
300278,
275703,
316663,
300284,
275710,
300287,
292097,
300289,
300292,
300294,
275719,
300299,
177419,
283917,
242957,
275725,
177424,
300301,
349464,
283939,
259367,
283951,
292143,
300344,
226617,
283963,
243003,
226628,
283973,
300357,
177482,
283983,
316758,
357722,
316766,
316768,
218464,
292197,
316774,
243046,
218473,
136562,
324978,
275834,
333178,
275836,
275840,
316803,
316806,
226696,
316811,
226699,
316814,
226703,
300433,
234899,
226709,
357783,
316824,
316826,
300448,
144807,
144810,
284076,
144812,
144814,
144820,
284084,
292279,
284087,
144826,
144828,
144830,
144832,
284099,
144835,
144837,
38342,
144839,
144841,
144844,
144847,
144852,
144855,
103899,
300507,
333280,
226787,
218597,
292329,
300523,
259565,
259567,
300527,
308720,
226802,
292338,
316917,
308727,
292343,
300537,
316947,
308757,
308762,
284191,
284194,
284196,
235045,
284199,
284204,
284206,
284209,
284211,
284213,
194101,
316983,
284215,
194103,
284218,
226877,
284223,
284226,
243268,
284228,
226886,
284231,
128584,
292421,
284234,
366155,
276043,
317004,
284238,
226895,
284241,
194130,
284243,
276052,
276053,
284245,
284247,
300628,
235097,
243290,
284251,
284249,
284253,
300638,
284255,
317015,
243293,
284258,
292452,
292454,
284263,
177766,
284265,
292458,
284267,
292461,
284272,
284274,
276086,
292470,
284278,
292473,
284283,
276093,
284286,
276095,
292479,
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,
317098,
284331,
284333,
284335,
276144,
284337,
284339,
300726,
284343,
284346,
284350,
276160,
358080,
284354,
358083,
276166,
284358,
358089,
276170,
284362,
276175,
284368,
276177,
317138,
358098,
284370,
284372,
284377,
276187,
284379,
284381,
284384,
284386,
358116,
276197,
317158,
284392,
325353,
284394,
358122,
284397,
276206,
284399,
358128,
358126,
358133,
358135,
276216,
358138,
300795,
358140,
284413,
358142,
284418,
317187,
358146,
317189,
317191,
284428,
300816,
300819,
317207,
284440,
186139,
300828,
300830,
276255,
300832,
284449,
300834,
325408,
227109,
317221,
358183,
186151,
276268,
300845,
194351,
243504,
284469,
276280,
325436,
358206,
276291,
366406,
276295,
300872,
153417,
284499,
276308,
284502,
317271,
178006,
276315,
292700,
284511,
227175,
292715,
300912,
284529,
292721,
300915,
284533,
292729,
317306,
284540,
292734,
325512,
169868,
276365,
284564,
358292,
284566,
350106,
284572,
276386,
284579,
276388,
358312,
284585,
317353,
276395,
292776,
292784,
276402,
358326,
161718,
276410,
358330,
276411,
276418,
276425,
301009,
301011,
301013,
292823,
358360,
301015,
301017,
292828,
276446,
153568,
276448,
276452,
276455,
292839,
292843,
276460,
276464,
178161,
276466,
227314,
276472,
325624,
317435,
276476,
276479,
276482,
276485,
276490,
292876,
276496,
317456,
317458,
243733,
243740,
317468,
317472,
325666,
243751,
292904,
276528,
243762,
309298,
325685,
325689,
276539,
235579,
235581,
325692,
178238,
276544,
284739,
292934,
276553,
243785,
350293,
350295,
309337,
227418,
194649,
194654,
227423,
350302,
194657,
227426,
276579,
309346,
309348,
227430,
276583,
350308,
309350,
276586,
309352,
350313,
350316,
276590,
301167,
227440,
350321,
284786,
276595,
301163,
350325,
350328,
292985,
301178,
292989,
301185,
317570,
350339,
292993,
317573,
350342,
350345,
350349,
301199,
317584,
325777,
350354,
350357,
350359,
350362,
276638,
350366,
153765,
284837,
350375,
350379,
350381,
350383,
129200,
350385,
350387,
350389,
350395,
350397,
350399,
227520,
350402,
227522,
301252,
350406,
227529,
301258,
309450,
276685,
276689,
309462,
301272,
276699,
309468,
194780,
309471,
301283,
317672,
276713,
317674,
325867,
243948,
194801,
227571,
309491,
309494,
243960,
227583,
276735,
227587,
276739,
211204,
276742,
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,
211324,
227709,
285061,
317833,
178572,
285070,
285077,
178583,
227738,
317853,
276896,
317858,
342434,
285093,
285098,
276907,
235955,
276917,
293304,
293307,
293314,
309707,
293325,
317910,
293336,
235996,
317917,
293343,
358880,
276961,
227810,
293346,
276964,
293352,
236013,
293364,
301562,
317951,
309764,
301575,
121352,
236043,
317963,
342541,
55822,
113167,
277011,
309779,
309781,
317971,
55837,
227877,
227879,
293417,
227882,
293421,
105007,
236082,
285236,
23094,
277054,
244288,
129603,
301636,
318020,
301639,
301643,
285265,
399955,
277080,
309849,
285277,
285282,
326244,
318055,
277100,
277106,
121458,
170618,
170619,
309885,
309888,
277122,
227975,
285320,
277128,
301706,
334476,
326285,
318094,
318092,
277136,
277139,
227992,
285340,
318108,
227998,
318110,
137889,
383658,
285357,
318128,
277170,
342707,
154292,
277173,
293555,
318132,
285368,
277177,
277181,
318144,
277187,
277191,
277194,
277196,
277201,
137946,
113378,
203491,
228069,
277223,
342760,
285417,
56041,
56043,
277232,
228081,
56059,
310015,
285441,
310020,
285448,
310029,
228113,
285459,
277273,
293659,
326430,
228128,
285474,
293666,
228135,
318248,
277291,
293677,
318253,
285489,
293685,
285494,
301880,
285499,
301884,
293696,
310080,
277317,
277322,
277329,
162643,
310100,
301911,
301913,
277337,
301921,
400236,
236397,
162671,
326514,
310134,
277368,
236408,
15224,
416639,
416640,
113538,
310147,
416648,
39817,
187274,
277385,
301972,
424853,
277405,
277411,
310179,
293798,
293802,
236460,
277426,
293811,
293817,
293820,
203715,
326603,
293849,
293861,
228327,
228328,
228330,
318442,
228332,
277486,
326638,
318450,
293876,
293877,
285686,
302073,
121850,
244731,
285690,
302075,
293882,
293887,
277504,
277507,
277511,
277519,
293908,
293917,
293939,
318516,
277561,
277564,
7232,
310336,
293956,
277573,
228422,
310344,
277577,
293960,
277583,
203857,
293971,
310355,
310359,
236632,
277594,
138332,
277598,
285792,
203872,
277601,
310374,
203879,
310376,
228460,
318573,
203886,
187509,
285815,
285817,
367737,
285821,
302205,
285824,
392326,
285831,
253064,
302218,
285835,
294026,
384148,
162964,
187542,
302231,
285849,
302233,
285852,
302237,
285854,
285856,
302241,
285862,
277671,
302248,
64682,
277678,
294063,
228526,
294065,
302258,
277687,
294072,
318651,
294076,
277695,
318657,
244930,
302275,
130244,
302277,
228550,
302282,
310476,
302285,
302288,
310481,
302290,
203987,
302292,
302294,
302296,
384222,
310498,
285927,
318698,
302315,
195822,
228592,
294132,
138485,
228601,
204026,
228606,
204031,
64768,
310531,
285958,
228617,
138505,
318742,
204067,
277798,
130345,
277801,
113964,
285997,
277804,
277807,
285999,
113969,
277811,
318773,
318776,
277816,
286010,
277819,
294204,
417086,
277822,
286016,
294211,
302403,
384328,
277832,
277836,
294221,
294223,
326991,
277839,
277842,
277847,
277850,
179547,
277853,
146784,
277857,
302436,
277860,
294246,
327015,
310632,
327017,
351594,
277864,
277869,
277872,
351607,
310648,
277880,
310651,
277884,
277888,
310657,
310659,
294276,
351619,
327046,
277892,
253320,
277894,
318858,
310665,
277898,
277903,
310672,
351633,
277905,
277908,
277917,
310689,
277921,
130468,
228776,
277928,
277932,
310703,
277937,
130486,
310710,
310712,
277944,
310715,
277947,
302526,
228799,
277950,
277953,
64966,
245191,
163272,
302534,
310727,
277959,
292968,
302541,
277963,
302543,
277966,
310737,
277971,
286169,
228825,
163290,
277978,
310749,
277981,
277984,
310755,
277989,
277991,
187880,
277995,
286188,
310764,
278000,
228851,
310772,
278003,
278006,
40440,
212472,
278009,
286203,
310780,
40443,
228864,
286214,
228871,
302603,
302614,
286233,
302617,
302621,
286240,
146977,
187939,
294435,
40484,
286246,
294439,
286248,
40488,
294440,
40491,
294443,
294445,
40486,
310831,
40499,
212538,
40507,
40511,
40513,
228933,
40521,
286283,
40525,
40527,
228944,
400976,
212560,
40533,
147032,
40537,
278109,
40541,
40544,
40548,
40550,
286312,
286313,
40552,
40554,
310892,
40557,
40560,
188022,
122488,
294521,
343679,
310925,
286354,
278163,
302740,
122517,
278168,
327333,
229030,
212648,
278188,
302764,
278192,
319153,
278196,
302781,
319171,
302789,
294599,
278216,
294601,
302793,
278227,
229076,
286420,
319187,
286425,
319194,
278235,
229086,
278238,
286432,
294625,
294634,
302838,
319226,
286460,
171774,
278274,
302852,
278277,
302854,
311048,
294664,
352008,
319243,
311053,
302862,
319251,
294682,
278306,
188199,
294701,
278320,
319280,
319290,
229192,
302925,
188247,
188252,
237409,
294776,
360317,
294785,
327554,
40840,
40851,
294803,
188312,
294811,
319390,
40865,
319394,
294817,
294821,
180142,
294831,
188340,
40886,
319419,
294844,
294847,
309354,
393177,
294876,
294879,
294883,
294890,
311279,
278513,
237555,
278516,
311283,
278519,
237562
] |
97744107c248606ca6cdc75a72aee0253f9a1431
|
5e28f949cfde7a7aea9857f22bf74f60fb2ab88a
|
/Pinterest3/AppDelegate.swift
|
a6facfcc8f529fa1f9a043324ca00eef8d1f43a1
|
[] |
no_license
|
OscarBM/Pinterest3
|
98f952b1e0a7237d099748b7d090337751abe3f5
|
4b24701df430794a80e6d20637215b32c860d8b6
|
refs/heads/master
| 2020-04-21T16:32:27.906127 | 2019-03-07T23:04:49 | 2019-03-07T23:04:49 | 169,705,185 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,454 |
swift
|
//
// AppDelegate.swift
// Pinterest
//
// Created by Juan Cabral on 1/31/19.
// Copyright © 2019 Juan Cabral. All rights reserved.
//
import UIKit
import Firebase
@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.
window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
window?.rootViewController = UINavigationController(rootViewController: ViewController())
FirebaseApp.configure()
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:.
}
}
|
[
294924,
327722,
237613,
286774,
286776,
319544,
286778,
286791,
237640,
286797,
237646,
311375,
196692,
319573,
311383,
303212,
131192,
303230,
327814,
303241,
303244,
319633,
286876,
311469,
327862,
286906,
327866,
180413,
286910,
286924,
286926,
131278,
131281,
131299,
319716,
229622,
327930,
237826,
319751,
319757,
311569,
286999,
319770,
287003,
287006,
287012,
287014,
287016,
287019,
311598,
287023,
270640,
319809,
319810,
319814,
311623,
311628,
319822,
229717,
139638,
213367,
311683,
311693,
65938,
319903,
311719,
139689,
311728,
311741,
319938,
311746,
319945,
319947,
188895,
172512,
287202,
172520,
319978,
172526,
311791,
172529,
319989,
172534,
180727,
287230,
303617,
172550,
303623,
172552,
320007,
172558,
303632,
303637,
172572,
172577,
295459,
172581,
311850,
172591,
172598,
172607,
172609,
172612,
172614,
213575,
172618,
303690,
33357,
303696,
172634,
311911,
172655,
172656,
352880,
295538,
172660,
287349,
172675,
295557,
352905,
287377,
172691,
287381,
221850,
287386,
230045,
172702,
172705,
287394,
172707,
303780,
287398,
172714,
295595,
189102,
172721,
287409,
66227,
189114,
287419,
303804,
328381,
328384,
172737,
172748,
287436,
107212,
172751,
287440,
295633,
172755,
303827,
287450,
303835,
418523,
189149,
303838,
312035,
295654,
230128,
312048,
312050,
230146,
328453,
312077,
295695,
230169,
295707,
295710,
295720,
303914,
230202,
312124,
328508,
222018,
287569,
303959,
230237,
230241,
303976,
336744,
295806,
295808,
295813,
320391,
304013,
295822,
189329,
295825,
304019,
279445,
304027,
140202,
213931,
230327,
304055,
287675,
230334,
304063,
304065,
295873,
156612,
197580,
312272,
304090,
320481,
304106,
320490,
312302,
328687,
320496,
312321,
295945,
230413,
320528,
140312,
295961,
197663,
304164,
304170,
304175,
238641,
312374,
238652,
238655,
238658,
336964,
320584,
238666,
296021,
402518,
336987,
230497,
296040,
361576,
205931,
296044,
304249,
337018,
205968,
296084,
238745,
304285,
238756,
238766,
230576,
238770,
304311,
230592,
312518,
230600,
230607,
148690,
320727,
304354,
296163,
320740,
320748,
304370,
320771,
312585,
296202,
230674,
320786,
230677,
320792,
230681,
230689,
173350,
312622,
279857,
296253,
230718,
296255,
312639,
230727,
238919,
296264,
320840,
296267,
296271,
230739,
312663,
222556,
337244,
312676,
230760,
148843,
230768,
312692,
230773,
304505,
304506,
181631,
312711,
296331,
288140,
288144,
304533,
173472,
304555,
173488,
288176,
312759,
288185,
222652,
312766,
173507,
222665,
230860,
312783,
329177,
239070,
296435,
288250,
296446,
321022,
402942,
296450,
230919,
230923,
304651,
304653,
222752,
296486,
157229,
230961,
157236,
288320,
288325,
124489,
288338,
239194,
312938,
116354,
198310,
321195,
296622,
321200,
337585,
296637,
313044,
313052,
288478,
313055,
321252,
288494,
321266,
288502,
288510,
124671,
198405,
313093,
198416,
321304,
313121,
313123,
304932,
321316,
321336,
296767,
288576,
345921,
304968,
280393,
173907,
313171,
313176,
321381,
296812,
313201,
305028,
124817,
239510,
124827,
214940,
214944,
313258,
321458,
124853,
214966,
296890,
288700,
296894,
190403,
296900,
337862,
165831,
411601,
296921,
239586,
124913,
165876,
239612,
313340,
288764,
239617,
313347,
288773,
313358,
305168,
305176,
321560,
313371,
305191,
223273,
124978,
215090,
124980,
288824,
288826,
321595,
313406,
288831,
288836,
215123,
288859,
149599,
149601,
321634,
149603,
329830,
280681,
149618,
215154,
313464,
329850,
321659,
288895,
321670,
215175,
280725,
313498,
100520,
280747,
288947,
321717,
313548,
313557,
338147,
125171,
182517,
125187,
125191,
125207,
125209,
321817,
125218,
321842,
223539,
125239,
289087,
305480,
305485,
305489,
354653,
313700,
313705,
280940,
190832,
313720,
239997,
313731,
199051,
240011,
289166,
240017,
240021,
297365,
297372,
297377,
289186,
240052,
289207,
289210,
305594,
166378,
305647,
174580,
240124,
305662,
305664,
240129,
305666,
305668,
223749,
223752,
150025,
338440,
223757,
322074,
150066,
289342,
322115,
338528,
199273,
19053,
158317,
313973,
297594,
158347,
314003,
117398,
289436,
174754,
330404,
174764,
314029,
314033,
240309,
314045,
314047,
314051,
297671,
158409,
289493,
289513,
289522,
289532,
322303,
322310,
322314,
322318,
322341,
215850,
207661,
289601,
240458,
240468,
322393,
207733,
207737,
158596,
183172,
240519,
314249,
183184,
289687,
289694,
289700,
289712,
289724,
289762,
183277,
322550,
134142,
314372,
322599,
322610,
314421,
314433,
322630,
314441,
322642,
314456,
314461,
248995,
306341,
306344,
306347,
322734,
306354,
289997,
290008,
363742,
330988,
216303,
322801,
306427,
257302,
363802,
199976,
199978,
298292,
298294,
216376,
380226,
224587,
216404,
306517,
150870,
314714,
314718,
314723,
150890,
306539,
314732,
314736,
314743,
306552,
290171,
314747,
298372,
314756,
265604,
224647,
314763,
298381,
314768,
224657,
306581,
314773,
314779,
314785,
314793,
241068,
241070,
306608,
150966,
306618,
323015,
306635,
306640,
290263,
290270,
339431,
191985,
290291,
241142,
191992,
290298,
290302,
290305,
306694,
323084,
323090,
290325,
241175,
282137,
290332,
241181,
290344,
306731,
290349,
290351,
290356,
224849,
306778,
314979,
323176,
224875,
241260,
323181,
298651,
282269,
323229,
298655,
323231,
306856,
323260,
323266,
306904,
52959,
241380,
323318,
241412,
323333,
323345,
323349,
315167,
315169,
315174,
323367,
241448,
315176,
241450,
306991,
315184,
323376,
315190,
241464,
159545,
298811,
118593,
307009,
413506,
307012,
298822,
315211,
307027,
315223,
241496,
241498,
307035,
110433,
241509,
110438,
315249,
315253,
315255,
339838,
241544,
241546,
241548,
241556,
241560,
241563,
241565,
241567,
241569,
241574,
241581,
241583,
323504,
241586,
241588,
241590,
241592,
241598,
290751,
241605,
241610,
298975,
241632,
298984,
241640,
241643,
298988,
241646,
241649,
241652,
323574,
299003,
241661,
299006,
315396,
241669,
315397,
290835,
241693,
241701,
102438,
290877,
315466,
192596,
176213,
307290,
217179,
315482,
192605,
233567,
299105,
217188,
299109,
307303,
356457,
45163,
307307,
315502,
192624,
307314,
299126,
233591,
299136,
307338,
241813,
307352,
299164,
241821,
299167,
315552,
315557,
184486,
307370,
307372,
307374,
307376,
299185,
184503,
307388,
307390,
307394,
299204,
184518,
307399,
323784,
233679,
307409,
307411,
299225,
233701,
307432,
291104,
315701,
332086,
151864,
307518,
151874,
323917,
233808,
323921,
315733,
323926,
315739,
299357,
242024,
299373,
250231,
242043,
315771,
299391,
291202,
242057,
291212,
299405,
315801,
242075,
61855,
291231,
291241,
291247,
299440,
291260,
127424,
299457,
291269,
127434,
315856,
315860,
299481,
176605,
160221,
242143,
127463,
127466,
127474,
291314,
291317,
127480,
291323,
127485,
291330,
233994,
127500,
233998,
127506,
234006,
127511,
152087,
291361,
242220,
291378,
70213,
111193,
242275,
299620,
242279,
299655,
135820,
316051,
316054,
373404,
299684,
242343,
242345,
373421,
299720,
299723,
299726,
299740,
201444,
234219,
316151,
242431,
234258,
242452,
201496,
234264,
234266,
234272,
152355,
299814,
185138,
234296,
160572,
316233,
234319,
185173,
201557,
185180,
308063,
234336,
242530,
349027,
234344,
324464,
152435,
177011,
234356,
291714,
291716,
234373,
209818,
308123,
291748,
234405,
291750,
324520,
324522,
291756,
324527,
201650,
324531,
291773,
242623,
324544,
234434,
324546,
291788,
234464,
168935,
324585,
316400,
234481,
316403,
234485,
234487,
316416,
308226,
308231,
300054,
316439,
234520,
234526,
300066,
300069,
234540,
234546,
300085,
234553,
316479,
316483,
160835,
234563,
308291,
316491,
234572,
300108,
234574,
300115,
234593,
234597,
300133,
300139,
234610,
316530,
234620,
275594,
177293,
234640,
308373,
324757,
234647,
234650,
300189,
324766,
119967,
300197,
234667,
308401,
308414,
234687,
300226,
308418,
234692,
300229,
308420,
308422,
316610,
234695,
300234,
300238,
283854,
300241,
316625,
300243,
300245,
316630,
300248,
300253,
300256,
300258,
300260,
234726,
300263,
300265,
300267,
300270,
300272,
300278,
275703,
316663,
300284,
275710,
292097,
300292,
234760,
177419,
300299,
242957,
300301,
349464,
300344,
243003,
300357,
316758,
357722,
316766,
316768,
292197,
316774,
243046,
218473,
136562,
316803,
316806,
316811,
316814,
300433,
234899,
300436,
357783,
316824,
316826,
300448,
144810,
144814,
144820,
374196,
292279,
144826,
144830,
144832,
144837,
144839,
144847,
144855,
103899,
300507,
333280,
218597,
292329,
300523,
300527,
308720,
292338,
316917,
300537,
300543,
316933,
316947,
308757,
308762,
316959,
284194,
284199,
235047,
284204,
284206,
284209,
284211,
194101,
284213,
316983,
194103,
284215,
308790,
284223,
284226,
284228,
243268,
284231,
284234,
317004,
284238,
284241,
194130,
284243,
300628,
284245,
284247,
292452,
292454,
292458,
292461,
284272,
284274,
284278,
292470,
292473,
284283,
284286,
284290,
325250,
284292,
292485,
284297,
317066,
284299,
284301,
284303,
284306,
284308,
284312,
276122,
284320,
284327,
284329,
317098,
284331,
300726,
284343,
284346,
284350,
284354,
358083,
284358,
284362,
284365,
284368,
284370,
358098,
284372,
358114,
358119,
325353,
358122,
358126,
358128,
358133,
358138,
300795,
358142,
358146,
317189,
317191,
300819,
317207,
300830,
300832,
325408,
317221,
300845,
243504,
300850,
325436,
358206,
366406,
292681,
358224,
178006,
317279,
292715,
292721,
300915,
284533,
292729,
292734,
325512,
317332,
358292,
358312,
317353,
292784,
317361,
358326,
358330,
301011,
301013,
358360,
301017,
292828,
292839,
292843,
178161,
325624,
317435,
317446,
317456,
178195,
243733,
243740,
317472,
325666,
243751,
243762,
309298,
325685,
325689,
235579,
325692,
178238,
325700,
292934,
350293,
350295,
309337,
350304,
178273,
309346,
194660,
350308,
309350,
309348,
292968,
309352,
301167,
350321,
350325,
252022,
350328,
292985,
292989,
301185,
350339,
317573,
350342,
333957,
350345,
350349,
317584,
325777,
350357,
350359,
350362,
350366,
153765,
350375,
350379,
350381,
350383,
350385,
350387,
350389,
350395,
350397,
350399,
350402,
350406,
301258,
309455,
309462,
301272,
194780,
309468,
309471,
317672,
317674,
325867,
243948,
309494,
325910,
309530,
342298,
276766,
317729,
211241,
325937,
325943,
211260,
235853,
235858,
293227,
293232,
186744,
211324,
317833,
293263,
178575,
317853,
317858,
342434,
317864,
235955,
293304,
293314,
309707,
317910,
293336,
235996,
317917,
293343,
358880,
293364,
301562,
293370,
317951,
301575,
293387,
113167,
309779,
317971,
309781,
236056,
227882,
309804,
236082,
285236,
23094,
301636,
318020,
301643,
309844,
309849,
326244,
318055,
121458,
309885,
309888,
318092,
326285,
334476,
318108,
318110,
137889,
383658,
318128,
293555,
318132,
342744,
137946,
113378,
342760,
56043,
56059,
310015,
310029,
293659,
326430,
285474,
318248,
318253,
301876,
293685,
375606,
301884,
162643,
301911,
301921,
400236,
236397,
162671,
326514,
236408,
416639,
416640,
113538,
310147,
416648,
293798,
293802,
293817,
293820,
203715,
326603,
318442,
326638,
318450,
293876,
302073,
121850,
293882,
302075,
56313,
293899,
293908,
293917,
293939,
318516,
310336,
293956,
293960,
293971,
310355,
310359,
236632,
138332,
310376,
277608,
318573,
367737,
302205,
294026,
162964,
384148,
187542,
302231,
285849,
302233,
285852,
302237,
285854,
285856,
302241,
302248,
294063,
318651,
318657,
244930,
130244,
302282,
310476,
302285,
302288,
310481,
302290,
302292,
302294,
310486,
302296,
310498,
318698,
302315,
294132,
138485,
204026,
204031,
64768,
285999,
318773,
261430,
318776,
286010,
294204,
417086,
302403,
294221,
294223,
326991,
294246,
327015,
310632,
327017,
351594,
310648,
351619,
294276,
318858,
130468,
310710,
302526,
302534,
310727,
302541,
302543,
310737,
286169,
310749,
310755,
310764,
310772,
327156,
40440,
212472,
40443,
40448,
286214,
302603,
302614,
302621,
286240,
187939,
40484,
40486,
286246,
294440,
40488,
294439,
294443,
40491,
294445,
286248,
310831,
40499,
40502,
212538,
40507,
40511,
40513,
327240,
40521,
40525,
40527,
212560,
400976,
40529,
40533,
40537,
40539,
40541,
40544,
40548,
40550,
40552,
40554,
40557,
40560,
343666,
188022,
294521,
343679,
302740,
179870,
327333,
319153,
319163,
302781,
294601,
302793,
343757,
212690,
319187,
286425,
319194,
294625,
294634,
302838,
319226,
286460,
302852,
302854,
294664,
311048,
319243,
311053,
302862,
319251,
294682,
188199,
294701,
319280,
319290,
229192,
302925,
188247,
237409,
294785,
237470,
319390,
40865,
319394,
294821,
311209,
163755,
343983,
294831,
294844,
294847,
24528,
294876,
294879,
237555,
237562
] |
d5893053a61fcd485ccf1a9a95857e8c2b64dda7
|
4caff8fe89156d945d976319f78ef6e82f7477c6
|
/UCLAPath/UCLAPath/AppDelegate.swift
|
b5eb46832142175d85b400baddfaf12543c3496f
|
[] |
no_license
|
willyjlee/Hack-on-the-Hill
|
e0f9e629ccabffb7c9aebbd4643be7d98de9a2f5
|
73a526c73f684fcdad3c8570d6f1722013735ba4
|
refs/heads/master
| 2021-05-03T09:37:54.626482 | 2016-10-29T18:43:42 | 2016-10-29T18:43:42 | 72,294,939 | 0 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,316 |
swift
|
//
// AppDelegate.swift
// UCLAPath
//
// Created by Yimin Yuan on 10/29/16.
// Copyright © 2016 UCLA. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let splitViewController = self.window!.rootViewController as! UISplitViewController
let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
splitViewController.delegate = self
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:.
}
// MARK: - Split view
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false }
guard let topAsDetailController = secondaryAsNavController.topViewController as? DetailViewController else { return false }
if topAsDetailController.detailItem == nil {
// Return true to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded.
return true
}
return false
}
}
|
[
416643,
279173,
276103,
227723,
292240,
311184,
227728,
226193,
300436,
283416,
129178,
209823,
298916,
279087,
239152,
208048,
279090,
278963,
290870,
228923,
176450,
284995,
287303,
300491,
281547,
280654,
229595,
226908,
187105,
277358,
228212,
279287,
276090
] |
457afe8ed62755194bccead717b23fb5ec082d33
|
3ccc550d164be2088f97b6e1f4b4e941737570ab
|
/Sources/Fugen/Models/Color.swift
|
7aee576f7913579cdb772b7f232b70451c671573
|
[
"MIT"
] |
permissive
|
almazrafi/Fugen
|
f7ea027169c1a0e3f408c0d82410c89b28a54560
|
52793dc31d910d219b3ec3f9fcce0fe865805bc3
|
refs/heads/master
| 2023-03-13T17:37:49.710477 | 2021-10-17T13:53:53 | 2021-10-17T13:53:53 | 216,640,899 | 82 | 13 |
MIT
| 2023-01-25T03:26:27 | 2019-10-21T18:44:33 |
Swift
|
UTF-8
|
Swift
| false | false | 177 |
swift
|
import Foundation
struct Color: Codable, Hashable {
// MARK: - Instance Properties
let red: Double
let green: Double
let blue: Double
let alpha: Double
}
|
[
-1
] |
114c5f4c317f8681da30561188586d571d3b8c1c
|
38d24d16ef3a9495da316c47ae892ccb96f8802f
|
/ShopListTests/ShopListTests.swift
|
84c8f2100c7e894e663e53cdfcfeda6ece61b044
|
[] |
no_license
|
GarenLiang/ShopList
|
3fb2bc50deb68c62b4b5842217ff75f5e31bd4b5
|
52826c31c7ef0bdce078fc00d7885bd40f229ed3
|
refs/heads/master
| 2020-12-02T22:44:20.462147 | 2017-07-18T23:49:36 | 2017-07-18T23:49:36 | 96,175,424 | 0 | 0 | null | 2017-07-18T23:49:37 | 2017-07-04T04:32:12 |
Swift
|
UTF-8
|
Swift
| false | false | 975 |
swift
|
//
// ShopListTests.swift
// ShopListTests
//
// Created by GarenLiang on 2017/7/3.
// Copyright © 2017年 GarenLiang. All rights reserved.
//
import XCTest
@testable import ShopList
class ShopListTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
|
[
360462,
98333,
278558,
16419,
229413,
204840,
278570,
344107,
155694,
253999,
229424,
237620,
229430,
319542,
180280,
163896,
352315,
376894,
286788,
352326,
311372,
196691,
278615,
385116,
237663,
254048,
319591,
221290,
278634,
278638,
319598,
352368,
204916,
131191,
237689,
131198,
278655,
311438,
278677,
196760,
426138,
278685,
311458,
278691,
49316,
32941,
278704,
377009,
278708,
131256,
295098,
139479,
254170,
229597,
311519,
205035,
286958,
327929,
344313,
147717,
368905,
278797,
180493,
254226,
368916,
262421,
377114,
278816,
237857,
237856,
311597,
98610,
180535,
336183,
278842,
287041,
287043,
139589,
311621,
319821,
254286,
344401,
377169,
368981,
155990,
368984,
106847,
98657,
270701,
246127,
270706,
139640,
246136,
106874,
246137,
311681,
311685,
106888,
385417,
385422,
213403,
385454,
377264,
278970,
311738,
33211,
319930,
336317,
336320,
311745,
278978,
254406,
188871,
278989,
278993,
278999,
328152,
369116,
287198,
188894,
279008,
279013,
311786,
279018,
319981,
279029,
254456,
279032,
377338,
377343,
279039,
254465,
287241,
279050,
303631,
139792,
279057,
303636,
279062,
393751,
254488,
279065,
377376,
180771,
377386,
197167,
385588,
352829,
115270,
377418,
385615,
426576,
369235,
287318,
295519,
139872,
66150,
344680,
279146,
295536,
287346,
139892,
344696,
287352,
279164,
189057,
311941,
336518,
369289,
311945,
344715,
279177,
311949,
287374,
377489,
311954,
352917,
230040,
377497,
271000,
303771,
221852,
377500,
205471,
344738,
139939,
279206,
295590,
279210,
287404,
295599,
205487,
303793,
336564,
164533,
230072,
287417,
303803,
287422,
66242,
377539,
287433,
164560,
385747,
279252,
361176,
418520,
287452,
295652,
279269,
369385,
230125,
312047,
279280,
312052,
230134,
172792,
344827,
221948,
205568,
295682,
197386,
434957,
426774,
197399,
426775,
336671,
344865,
197411,
262951,
279336,
295724,
353069,
312108,
197422,
353070,
164656,
262962,
295729,
328499,
353078,
230199,
353079,
197431,
336702,
295744,
295746,
353094,
353095,
353109,
377686,
230234,
189275,
435039,
295776,
279392,
303972,
385893,
246641,
246643,
295798,
246648,
361337,
279417,
254850,
369538,
287622,
295824,
189348,
279464,
353195,
140204,
353197,
377772,
304051,
230332,
189374,
377790,
353215,
353216,
213957,
213960,
345033,
279498,
386006,
418776,
50143,
123881,
320493,
320494,
304110,
287731,
271350,
295927,
312314,
304122,
328700,
320507,
328706,
410627,
320516,
295942,
386056,
230410,
353290,
377869,
320527,
238610,
418837,
140310,
230423,
197657,
336929,
189474,
369701,
345132,
238639,
312373,
238651,
377926,
238664,
353367,
156764,
156765,
304222,
230499,
279660,
173166,
312434,
377972,
353397,
279672,
377983,
279685,
402565,
222343,
386189,
296086,
238743,
296092,
238765,
279728,
238769,
402613,
279747,
353479,
353481,
353482,
402634,
189652,
189653,
419029,
279765,
148696,
296153,
279774,
304351,
304356,
222440,
328940,
279792,
353523,
386294,
386301,
320770,
386306,
279814,
328971,
312587,
353551,
320796,
222494,
353584,
345396,
386359,
116026,
378172,
222524,
279875,
304456,
230729,
312648,
337225,
222541,
296270,
238927,
353616,
296273,
222559,
378209,
230756,
386412,
230765,
296303,
279920,
312689,
296307,
116084,
181625,
337281,
148867,
378244,
296329,
296335,
9619,
370071,
279974,
173491,
304564,
353719,
361927,
296392,
370123,
148940,
280013,
312782,
222675,
353750,
239068,
280032,
271843,
280041,
361963,
296433,
321009,
280055,
288249,
296448,
230913,
230921,
329225,
296461,
304656,
329232,
370197,
402985,
394794,
230959,
288309,
312889,
288318,
280130,
124485,
288326,
288327,
239198,
99938,
312940,
222832,
247416,
288378,
337534,
337535,
263809,
288392,
239250,
419478,
345752,
255649,
337591,
321207,
296632,
280251,
321219,
280267,
403148,
9936,
9937,
370388,
272085,
345814,
280278,
280280,
18138,
67292,
345821,
321247,
321249,
345833,
345834,
288491,
280300,
239341,
67315,
173814,
313081,
124669,
288512,
67332,
288516,
280329,
321295,
321302,
345879,
116505,
321310,
313120,
255776,
247590,
362283,
378668,
280366,
296755,
280372,
280374,
321337,
280380,
345919,
436031,
403267,
280390,
345929,
255829,
18262,
362327,
280410,
370522,
345951,
362337,
345955,
296806,
288619,
288620,
280430,
214895,
313199,
362352,
313203,
124798,
182144,
305026,
67463,
329622,
337815,
124824,
214937,
239514,
214938,
436131,
354212,
436137,
362417,
124852,
288697,
362431,
214977,
280514,
280519,
214984,
362443,
247757,
346067,
280541,
329695,
436191,
313319,
337895,
247785,
296941,
436205,
329712,
362480,
313339,
43014,
354316,
313357,
182296,
223268,
354343,
354345,
223274,
124975,
346162,
124984,
288828,
436285,
288833,
288834,
436292,
403525,
436301,
338001,
354385,
338003,
223316,
280661,
329814,
338007,
354393,
280675,
280677,
43110,
321637,
313447,
436329,
288879,
223350,
280694,
215164,
313469,
215166,
280712,
215178,
346271,
436383,
362659,
239793,
125109,
182456,
280762,
223419,
379071,
280768,
149703,
338119,
346314,
280778,
321745,
280795,
387296,
280802,
379106,
338150,
346346,
321772,
125169,
338164,
436470,
125183,
149760,
411906,
125188,
313608,
125193,
125198,
272658,
125203,
125208,
305440,
125217,
338218,
321840,
379186,
125235,
280887,
125240,
321860,
280902,
182598,
289110,
305495,
215385,
379225,
272729,
321894,
280939,
313713,
354676,
199029,
313727,
436608,
362881,
240002,
436611,
248194,
395659,
395661,
240016,
108944,
190871,
149916,
420253,
141728,
289189,
108972,
272813,
338356,
436661,
281037,
289232,
281040,
256477,
281072,
174593,
420369,
289304,
207393,
182817,
289332,
174648,
338489,
338490,
322120,
281166,
281171,
297560,
354911,
436832,
436834,
191082,
313966,
420463,
281199,
346737,
313971,
346740,
420471,
330379,
330387,
117396,
117397,
346772,
330388,
264856,
314009,
289434,
346779,
338613,
289462,
166582,
314040,
158394,
363211,
363230,
289502,
264928,
338662,
330474,
346858,
289518,
125684,
199414,
35583,
363263,
322313,
322316,
117517,
322319,
166676,
207640,
289576,
191283,
273207,
289598,
281408,
420677,
355146,
355152,
355154,
281427,
281433,
355165,
355178,
330609,
174963,
207732,
158593,
240518,
224145,
355217,
256922,
289690,
420773,
289703,
363438,
347055,
289727,
273344,
330689,
363458,
379844,
19399,
183248,
338899,
330708,
248796,
248797,
207838,
347103,
314342,
289774,
347123,
240630,
314362,
257024,
330754,
330763,
281626,
175132,
330788,
248872,
322612,
314448,
339030,
281697,
314467,
281700,
257125,
322663,
281706,
207979,
273515,
404593,
363641,
363644,
150657,
248961,
330888,
363669,
339100,
380061,
339102,
199839,
429214,
330913,
265379,
249002,
306346,
3246,
421048,
339130,
208058,
265412,
290000,
298208,
298212,
298213,
290022,
330984,
298221,
298228,
216315,
208124,
388349,
363771,
437505,
322824,
257305,
126237,
339234,
109861,
372009,
412971,
298291,
306494,
216386,
224586,
372043,
331090,
314709,
314710,
372054,
159066,
314720,
281957,
314728,
306542,
380271,
314739,
208244,
314741,
249204,
290173,
306559,
306560,
314751,
224640,
298374,
388487,
314758,
142729,
314760,
314766,
306579,
224661,
282007,
290207,
314783,
314789,
282022,
314791,
396711,
396712,
282024,
241066,
380337,
380338,
150965,
380357,
339398,
306631,
306639,
413137,
429542,
191981,
282096,
306677,
290300,
290301,
282114,
372227,
306692,
306693,
323080,
323087,
282129,
175639,
388632,
282136,
396827,
282141,
134686,
282146,
306723,
347694,
290358,
265798,
282183,
265804,
396882,
290390,
306776,
44635,
396895,
323172,
282213,
323178,
224883,
314998,
323196,
175741,
339584,
282245,
282246,
224901,
290443,
323217,
282259,
298654,
282271,
282273,
282276,
298661,
323236,
282280,
298667,
224946,
306874,
110268,
224958,
282303,
274115,
306890,
241361,
282327,
298712,
298720,
282339,
12010,
282348,
282355,
323316,
282358,
175873,
339715,
323331,
323332,
216839,
339720,
282378,
372496,
323346,
282391,
249626,
282400,
339745,
241441,
315171,
241442,
257830,
421672,
282409,
282417,
200498,
282427,
282434,
315202,
307011,
282438,
216918,
241495,
282474,
282480,
241528,
339841,
282504,
315273,
315274,
110480,
184208,
372626,
380821,
282518,
282519,
298909,
118685,
298920,
323507,
290745,
290746,
274371,
151497,
372701,
298980,
380908,
290811,
282633,
241692,
102437,
315432,
102445,
233517,
176175,
282672,
241716,
225351,
315465,
315476,
307289,
200794,
315487,
356447,
45153,
438377,
315498,
299121,
233589,
233590,
266357,
422019,
241808,
381073,
323729,
233636,
299174,
299187,
405687,
184505,
299198,
258239,
389313,
299203,
299209,
372941,
282831,
266449,
356576,
176362,
307435,
438511,
381172,
184570,
184575,
381208,
282909,
299293,
151839,
282913,
233762,
217380,
151847,
282919,
332083,
332085,
332089,
315706,
282939,
241986,
438596,
332101,
323913,
348492,
323916,
323920,
250192,
348500,
168281,
332123,
332127,
323935,
242023,
242029,
160110,
242033,
291192,
340357,
225670,
332167,
242058,
373134,
291224,
242078,
283038,
61857,
315810,
315811,
61859,
381347,
340398,
61873,
61880,
283064,
291267,
127427,
283075,
127428,
324039,
373197,
176601,
242139,
160225,
242148,
291311,
233978,
291333,
340490,
283153,
258581,
291358,
283182,
283184,
234036,
234040,
315960,
348732,
242237,
70209,
348742,
70215,
348749,
340558,
381517,
332378,
201308,
242273,
111208,
184940,
373358,
389745,
209530,
373375,
152195,
348806,
152203,
184973,
316049,
316053,
111253,
111258,
111259,
176808,
299699,
299700,
422596,
422599,
291530,
225995,
242386,
422617,
422626,
234217,
299759,
234234,
299770,
299776,
242433,
291585,
430849,
291592,
62220,
422673,
430865,
291604,
422680,
234277,
283430,
152365,
422703,
422709,
152374,
242485,
160571,
430910,
160575,
160580,
299849,
283467,
381773,
201551,
242529,
349026,
357218,
275303,
308076,
242541,
209783,
209785,
177019,
185211,
308092,
398206,
291712,
381829,
316298,
308107,
308112,
349072,
209817,
324506,
324507,
390045,
185250,
324517,
283558,
185254,
316333,
316343,
373687,
349121,
373706,
316364,
340955,
340961,
234472,
234473,
324586,
340974,
316405,
349175,
201720,
127992,
357379,
234500,
324625,
234514,
308243,
316437,
201755,
300068,
357414,
300084,
324666,
308287,
21569,
218186,
300111,
341073,
439384,
234587,
250981,
300135,
316520,
300136,
316526,
357486,
144496,
234609,
300146,
300150,
291959,
300151,
160891,
341115,
300158,
234625,
349316,
349318,
234638,
373903,
169104,
177296,
308372,
185493,
283802,
119962,
300187,
300188,
234663,
300201,
300202,
373945,
283840,
259268,
283847,
62665,
283852,
283853,
259280,
316627,
333011,
357595,
234733,
292085,
234742,
128251,
316669,
234755,
439562,
292107,
242954,
414990,
251153,
177428,
349462,
382258,
300343,
382269,
193859,
177484,
406861,
259406,
234831,
251213,
120148,
357719,
283991,
374109,
292195,
333160,
284014,
243056,
316787,
357762,
112017,
234898,
259475,
275859,
112018,
357786,
251298,
333220,
316842,
374191,
210358,
284089,
292283,
415171,
292292,
300487,
300489,
366037,
210390,
210391,
210392,
210393,
144867,
316902,
54765,
251378,
308723,
300535,
300536,
300542,
210433,
366083,
259599,
316946,
308756,
398869,
374296,
374299,
308764,
349726,
431649,
349741,
169518,
431663,
194110,
235070,
349763,
218696,
292425,
243274,
128587,
333388,
333393,
349781,
300630,
128599,
235095,
333408,
374372,
300644,
415338,
243307,
54893,
325231,
366203,
325245,
194180,
415375,
153251,
300714,
210603,
415420,
333503,
218819,
259781,
333517,
333520,
333521,
333523,
325346,
153319,
325352,
284401,
300794,
325371,
194303,
300811,
284429,
284431,
243472,
366360,
284442,
325404,
325410,
341796,
284459,
399147,
431916,
317232,
300848,
259899,
325439,
153415,
341836,
415567,
325457,
317269,
341847,
284507,
350044,
300894,
128862,
284512,
284514,
276327,
292712,
325484,
423789,
292720,
325492,
276341,
300918,
341879,
317304,
333688,
194429,
112509,
55167,
325503,
333701,
243591,
350093,
325518,
243597,
333722,
350109,
292771,
300963,
333735,
415655,
284587,
292782,
317360,
243637,
301008,
153554,
219101,
292836,
292837,
317415,
325619,
432116,
333817,
292858,
415741,
333828,
358410,
399373,
317467,
145435,
292902,
325674,
309295,
129076,
243767,
358456,
325694,
309345,
227428,
194666,
260207,
432240,
284788,
333940,
292988,
292992,
333955,
227460,
415881,
104587,
235662,
325776,
317587,
284825,
284826,
333991,
333992,
284842,
153776,
227513,
301251,
227524,
309444,
227548,
194782,
301279,
317664,
227578,
243962,
375039,
309503,
375051,
325905,
325912,
211235,
432421,
211238,
358703,
358709,
260418,
227654,
6481,
366930,
366929,
6489,
391520,
383332,
416104,
383336,
285040,
211326,
317831,
227725,
252308,
293274,
39324,
121245,
285084,
317852,
285090,
375207,
342450,
334260,
293303,
293306,
293310,
416197,
129483,
342476,
317901,
326100,
285150,
342498,
358882,
334309,
195045,
391655,
432618,
375276,
309744,
301571,
342536,
342553,
416286,
375333,
293419,
244269,
375343,
236081,
23092,
375351,
244281,
301638,
309830,
293448,
55881,
416341,
309846,
285271,
244310,
416351,
268899,
39530,
301689,
244347,
326287,
375440,
334481,
227990,
318106,
318107,
342682,
285361,
318130,
383667,
293556,
342713,
285371,
285372,
285373,
285374,
39614,
154316,
318173,
375526,
285415,
342762,
342763,
293612,
154359,
228088,
432893,
162561,
285444,
383754,
310036,
326429,
293664,
326433,
400166,
293672,
318250,
318252,
285487,
375609,
285497,
293693,
342847,
252741,
318278,
293711,
244568,
244570,
301918,
293730,
351077,
342887,
310131,
211829,
269178,
211836,
400252,
359298,
359299,
260996,
113542,
416646,
228233,
392074,
228234,
56208,
293781,
400283,
318364,
310176,
310178,
310182,
293800,
236461,
293806,
252847,
326581,
326587,
326601,
359381,
433115,
343005,
130016,
64485,
326635,
203757,
187374,
383983,
277492,
318461,
293886,
277509,
293893,
433165,
384016,
146448,
277524,
293910,
433174,
326685,
252958,
252980,
203830,
359478,
302139,
359495,
277597,
113760,
302177,
392290,
253029,
228458,
15471,
351344,
187506,
285814,
285820,
392318,
187521,
384131,
285828,
302213,
285830,
302216,
228491,
228493,
285838,
162961,
326804,
187544,
285851,
351390,
302240,
343203,
253099,
253100,
318639,
294068,
367799,
294074,
113850,
64700,
228540,
228542,
302274,
367810,
343234,
244940,
228563,
195808,
310497,
228588,
253167,
302325,
228600,
261377,
228609,
245019,
253216,
130338,
130343,
261425,
351537,
286013,
286018,
113987,
146762,
294218,
294219,
318805,
425304,
294243,
163175,
327024,
327025,
327031,
318848,
179587,
294275,
253317,
384393,
368011,
318864,
318868,
318875,
310692,
245161,
310701,
286129,
286132,
228795,
425405,
302529,
302531,
163268,
425418,
302540,
310732,
64975,
310736,
327121,
228827,
286172,
310757,
187878,
343542,
343543,
286202,
359930,
286205,
302590,
294400,
228867,
253451,
253452,
359950,
146964,
253463,
302623,
286244,
245287,
245292,
286254,
425535,
196164,
56902,
286288,
179801,
196187,
343647,
286306,
310889,
204397,
138863,
188016,
294529,
229001,
310923,
188048,
425626,
229020,
302754,
245412,
229029,
40614,
40613,
40615,
286391,
384695,
319162,
327358,
286399,
212685,
302797,
212688,
384720,
302802,
245457,
286423,
278233,
278234,
294622,
278240,
212716,
212717,
360177,
229113,
286459,
278272,
319233,
311042,
360195,
278291,
278293,
294678,
286494,
409394,
319288,
319292,
360252,
360264,
188251,
376669,
245599,
237408,
425825,
425833,
417654,
188292,
253829,
294807,
294809,
376732,
311199,
319392,
294823,
327596,
294843,
188348,
237504,
294850,
384964,
163781,
344013,
212942,
212946,
24532,
294886,
253929,
327661,
311281,
311282
] |
3ad5f0d458927888bd44e878c77f9ca67c1bb0ed
|
421acbc29595100f302d2c8f7c615a74cfc9c3a3
|
/Carthage/Checkouts/WiFiQRCodeKit/WiFiQRCodeKitTests/MirrorDiffKit/Diffable+CustomStringConvertible.swift
|
caad188032a4e9f242fc14a3ffd783bc25a11046
|
[] |
no_license
|
Kuniwak/WiFiQRCodeKitExampleApp
|
08886d829099d7c58ee227112964f7895264b3ca
|
7d1a2ee62786ab369ac944b3b6d4374cf76a4bc8
|
refs/heads/master
| 2020-03-16T02:20:44.469706 | 2018-05-07T13:15:44 | 2018-05-07T13:15:44 | 132,462,879 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,611 |
swift
|
import Foundation
extension Diffable /*: CustomStringConvertible */ {
public var description: String {
switch self {
case .null:
return "NSNull()"
case .none:
return "nil"
case let .string(string):
return "\"\(string)\""
case let .number(number):
return number.description
case let .bool(bool):
return bool.description
case let .date(date):
return String(describing: date)
case let .url(url):
return url.absoluteString
case let .type(type):
return String(describing: type)
case let .tuple(entries):
let content = entries
.map { $0.description }
.joined(separator: ", ")
return "(" + content + ")"
case let .array(array):
let content = array
.map { value in value.description }
.joined(separator: ", ")
return "[" + content + "]"
case let .set(array):
let content = array
.map { value in value.description }
.joined(separator: ", ")
return "Set [" + content + "]"
case let .dictionary(diffables):
guard !diffables.isEmpty else { return "[:]" }
let content = diffables
.sorted { $0.key.description <= $1.key.description }
.map { (key, value) in "\(key.description): \(value.description)" }
.joined(separator: ", ")
return "[" + content + "]"
case let .anyEnum(type: type, caseName: caseName, associated: associated):
if associated.isEmpty {
return "\(type).\(caseName.description)"
}
// INPUT: one("value")
let tuplePart = associated
.map { $0.description }
.joined(separator: ", ")
return "\(type).\(caseName.description)(\(tuplePart))"
case let .anyStruct(type: type, entries: dictionary):
let array = entries(fromDictionary: dictionary)
guard !array.isEmpty else {
return "struct \(type) {}"
}
let content = array
.sorted { $0.key < $1.key }
.map { (key, value) in "\(key): \(value.description)" }
.joined(separator: ", ")
return "struct \(type) { \(content) }"
case let .anyClass(type: type, entries: dictionary):
let array = entries(fromDictionary: dictionary)
guard !array.isEmpty else {
return "class \(type) {}"
}
let content = array
.sorted { $0.key < $1.key }
.map { (key, value) in "\(key): \(value.description)" }
.joined(separator: ", ")
return "class \(type) { \(content) }"
case let .generic(type: type, entries: dictionary):
guard !dictionary.isEmpty else {
return "generic \(type) {}"
}
let content = entries(fromDictionary: dictionary)
.sorted { $0.key < $1.key }
.map { (key, value) in "\(key): \(value.description)" }
.joined(separator: ", ")
return "generic \(type) { (\(content)) }"
case let .notSupported(value: x):
return "notSupported<<value: \(x)>>"
case let .unrecognizable(debugInfo):
return "unrecognizable<<debugInfo: \(debugInfo)>>"
}
}
}
|
[
-1
] |
1fe723d7b0d38c9fb075fbe8b5c7ef9cca510067
|
75e2b41fb4d1ba33ae35a0ac3788caa3ca9548cf
|
/iOS/iOS Books (Swift & OC)/iOS Core Animation Advanced Techniques/8. Explicit Animations/KeyframeTest/KeyframeTest/AppDelegate.swift
|
cb7e409bc80475b2e53b914fcaa19c5a806e96e9
|
[] |
no_license
|
feiyunhao/DailyPractice
|
9c9b57732e30781e1b4625392fbe3a0363857d3c
|
a3a1be611ed015b9dd4392479de131e047876ae8
|
refs/heads/master
| 2020-04-06T07:02:22.741361 | 2016-08-19T14:41:49 | 2016-08-19T14:41:49 | 56,163,726 | 3 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,139 |
swift
|
//
// AppDelegate.swift
// KeyframeTest
//
// Created by feiyun on 16/7/2.
// Copyright © 2016年 feiyun. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
|
[
229380,
229383,
229385,
278539,
229388,
294924,
278542,
229391,
327695,
278545,
229394,
278548,
229397,
229399,
229402,
278556,
229405,
352284,
278559,
229408,
278564,
294950,
229415,
229417,
237613,
229422,
360496,
229426,
237618,
229428,
286774,
204856,
229432,
286776,
319544,
286791,
237640,
278605,
286797,
311375,
163920,
237646,
196692,
319573,
311383,
278623,
278626,
319590,
311400,
278635,
303212,
278639,
131192,
278648,
237693,
327814,
131209,
417930,
303241,
311436,
303244,
319633,
286873,
286876,
311460,
311469,
32944,
327862,
286906,
327866,
180413,
286910,
131264,
286916,
286922,
286924,
286926,
319694,
286928,
131281,
278743,
278747,
295133,
155872,
319716,
278760,
237807,
303345,
286962,
131314,
229622,
327930,
278781,
278783,
278785,
237826,
319751,
278792,
286987,
319757,
311569,
286999,
319770,
287003,
287006,
287009,
287012,
287014,
287016,
287019,
311598,
287023,
262448,
311601,
287032,
155966,
278849,
319809,
319810,
319814,
311623,
319818,
311628,
229709,
287054,
319822,
278865,
229717,
196963,
196969,
139638,
213367,
106872,
319872,
311683,
311693,
65943,
319898,
311719,
278952,
139689,
278957,
311728,
278967,
180668,
311741,
278975,
319938,
278980,
98756,
278983,
319945,
278986,
319947,
278990,
278994,
311767,
279003,
279006,
188895,
172512,
279010,
287202,
279015,
172520,
319978,
279020,
172526,
279023,
311791,
172529,
279027,
319989,
164343,
180727,
279035,
311804,
287230,
279040,
303617,
287234,
279045,
287238,
320007,
172550,
172552,
303623,
279051,
172558,
279055,
303632,
279058,
303637,
279063,
279067,
172572,
279072,
172577,
295459,
172581,
295461,
279082,
311850,
279084,
172591,
172598,
279095,
172607,
172609,
172612,
377413,
172614,
172618,
303690,
33357,
287309,
279124,
172634,
262752,
172644,
311911,
189034,
295533,
189039,
189040,
352880,
295538,
172655,
189044,
287349,
172656,
172660,
287355,
287360,
295553,
287365,
311942,
303751,
295557,
352905,
279178,
287371,
311946,
311951,
287377,
172691,
287381,
311957,
221850,
287386,
303773,
164509,
287390,
295583,
172702,
230045,
172705,
303780,
287394,
172707,
287398,
287400,
279208,
172714,
295595,
279212,
189102,
172721,
287409,
66227,
303797,
189114,
287419,
303804,
328381,
279231,
287423,
328384,
287427,
312006,
107208,
279241,
107212,
172748,
287436,
172751,
287440,
295633,
303827,
172755,
279255,
172760,
279258,
287450,
213724,
303835,
189149,
303838,
279267,
312035,
295654,
279272,
230128,
312048,
312050,
230131,
205564,
303871,
230146,
295685,
230154,
33548,
312077,
295695,
295701,
369433,
230169,
295707,
328476,
295710,
230175,
303914,
279340,
205613,
279353,
230202,
312124,
222018,
295755,
377676,
148302,
287569,
279383,
303959,
230237,
279390,
230241,
279394,
303976,
336744,
303985,
328563,
303987,
279413,
303991,
303997,
295806,
295808,
304005,
295813,
320391,
213895,
304007,
304009,
304011,
230284,
304013,
213902,
279438,
295822,
189329,
295825,
304019,
189331,
279445,
58262,
279452,
410526,
279461,
279462,
304042,
213931,
230327,
304055,
287675,
304063,
238528,
304065,
189378,
213954,
156612,
295873,
213963,
312272,
304084,
304090,
320481,
304106,
320490,
312302,
328687,
320496,
304114,
295928,
320505,
312321,
295945,
295949,
197645,
230413,
320528,
140312,
295961,
238620,
197663,
304164,
189479,
304170,
238641,
312374,
238652,
238655,
230465,
238658,
296004,
336964,
205895,
320584,
238666,
296021,
402518,
336987,
230497,
296036,
296040,
361576,
205931,
296044,
164973,
205934,
279661,
312432,
279669,
337018,
189562,
279679,
279683,
222340,
205968,
296084,
238745,
304285,
238756,
205991,
222377,
165035,
337067,
165038,
238766,
230576,
304311,
230592,
279750,
312518,
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,
230679,
214294,
304416,
230689,
173350,
312622,
296243,
312630,
222522,
222525,
296253,
296255,
312639,
230718,
296259,
378181,
238919,
296264,
320840,
230727,
296267,
296271,
222545,
230739,
312663,
222556,
337244,
230752,
312676,
230760,
173418,
410987,
230763,
230768,
296305,
312692,
230773,
279929,
181626,
304505,
304506,
181631,
312711,
296331,
288140,
230800,
288144,
304533,
337306,
288154,
288160,
173472,
288162,
288164,
279975,
304555,
370092,
279983,
288176,
279985,
173488,
312755,
296373,
279991,
312759,
288185,
337335,
222652,
312766,
173507,
296389,
222665,
230860,
280014,
312783,
288208,
230865,
288210,
370130,
288212,
280021,
288214,
222676,
239064,
288217,
288218,
280027,
288220,
329177,
239070,
288224,
288226,
370146,
280036,
288229,
280038,
288230,
288232,
280034,
288234,
320998,
288236,
288238,
288240,
288242,
296435,
288244,
288250,
148990,
296446,
402942,
206336,
296450,
321022,
230916,
230919,
214535,
370187,
304651,
304653,
230940,
222752,
108066,
296486,
296488,
157229,
230961,
288320,
288325,
124489,
280140,
280145,
288338,
280149,
288344,
280152,
239194,
280158,
403039,
370272,
181854,
239202,
312938,
280183,
280185,
280188,
280191,
280194,
116354,
280208,
280211,
288408,
280218,
280222,
190118,
321195,
296622,
321200,
337585,
296626,
296634,
296637,
280260,
280264,
206536,
206539,
206541,
206543,
280276,
313044,
321239,
280283,
288478,
313055,
321252,
313066,
280302,
288494,
280304,
313073,
419570,
288499,
288502,
280314,
288510,
124671,
67330,
280324,
280331,
198416,
280337,
296723,
116503,
321304,
329498,
296731,
321311,
313121,
313123,
321316,
304932,
280363,
141101,
165678,
280375,
321336,
296767,
288576,
345921,
280388,
304968,
280393,
280402,
313176,
42842,
280419,
321381,
296812,
313201,
1920,
255873,
305028,
280454,
247688,
280464,
124817,
280468,
239510,
280473,
124827,
214940,
247709,
280487,
313258,
321458,
296883,
124853,
214966,
296890,
10170,
288700,
296894,
280515,
190403,
296900,
337862,
165831,
280521,
231379,
296921,
239586,
313320,
231404,
124913,
165876,
321528,
313340,
288764,
239612,
239617,
313347,
288773,
313358,
305176,
313371,
354338,
305191,
223273,
313386,
354348,
124978,
215090,
124980,
288824,
288826,
321595,
378941,
313406,
288831,
288836,
67654,
280651,
354382,
288848,
280658,
215123,
354390,
288855,
288859,
280669,
313438,
280671,
223327,
149599,
149601,
149603,
321634,
329830,
280681,
313451,
223341,
280687,
313458,
280691,
215154,
313464,
321659,
280702,
288895,
321670,
215175,
141446,
141455,
275606,
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,
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,
199367,
297671,
158409,
289493,
363234,
289513,
289522,
289525,
289532,
322303,
289537,
322310,
264969,
322314,
322318,
281361,
281372,
322341,
215850,
281388,
207661,
289593,
281401,
289601,
281410,
281413,
281414,
240458,
281420,
240468,
281430,
322393,
297818,
281435,
281438,
281442,
174955,
224110,
207733,
207737,
183172,
158596,
338823,
322440,
314249,
240519,
183184,
240535,
289687,
289694,
289696,
289700,
289712,
281529,
289724,
52163,
183260,
281567,
289762,
322534,
297961,
281581,
183277,
322550,
134142,
322563,
175134,
322599,
322610,
314421,
281654,
314427,
207937,
314433,
314441,
207949,
322642,
314456,
281691,
314461,
281702,
281704,
314474,
281708,
281711,
289912,
248995,
306341,
306344,
306347,
306354,
142531,
199877,
289991,
306377,
289997,
249045,
363742,
363745,
298216,
330988,
126190,
216303,
322801,
388350,
257302,
363802,
199976,
199978,
314671,
298292,
298294,
257334,
216376,
298306,
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,
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,
241556,
44948,
298901,
282520,
241560,
241563,
241565,
241567,
241569,
282531,
241574,
282537,
298922,
36779,
241581,
282542,
241583,
323504,
241586,
282547,
241588,
290739,
241590,
241592,
241598,
290751,
241600,
241605,
151495,
241610,
298975,
241632,
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,
299105,
217188,
299109,
307303,
315495,
356457,
307307,
45163,
315502,
192624,
307314,
323700,
299126,
233591,
299136,
307329,
307338,
233613,
241813,
307352,
299164,
184479,
299167,
184481,
315557,
184486,
307370,
307372,
184492,
307374,
307376,
323763,
176311,
184503,
307385,
307386,
258235,
176316,
307388,
307390,
299200,
184512,
307394,
307396,
299204,
184518,
307399,
323784,
307409,
307411,
176343,
299225,
233701,
307432,
184572,
282881,
184579,
282893,
291089,
282906,
291104,
233766,
176435,
307508,
315701,
307510,
332086,
151864,
307512,
168245,
307515,
282942,
307518,
151874,
282947,
282957,
323917,
110926,
233808,
323921,
315733,
323926,
233815,
315739,
323932,
299357,
242018,
242024,
299373,
315757,
250231,
242043,
315771,
299388,
299391,
291202,
299398,
242057,
291212,
299405,
291222,
283033,
291226,
242075,
291231,
61855,
283042,
291238,
291241,
127403,
127405,
291247,
127407,
299440,
299444,
127413,
283062,
291254,
194660,
127417,
291260,
283069,
127421,
127424,
127429,
127431,
283080,
176592,
315856,
315860,
176597,
283095,
127447,
299481,
176605,
242143,
291299,
127463,
242152,
291305,
127466,
176620,
291314,
291317,
135672,
233979,
291323,
291330,
283142,
127497,
135689,
233994,
291341,
233998,
234003,
234006,
127511,
152087,
283161,
234010,
135707,
242202,
135710,
242206,
242208,
291361,
242220,
291378,
234038,
152118,
234041,
70213,
111193,
242275,
299620,
242279,
168562,
184952,
135805,
291456,
135808,
299655,
373383,
135820,
316051,
225941,
316054,
299672,
135834,
373404,
299677,
225948,
135839,
299680,
225954,
299684,
242343,
209576,
242345,
373421,
135870,
135873,
135876,
135879,
299720,
299723,
225998,
299726,
226002,
226005,
119509,
226008,
242396,
299740,
201444,
299750,
283368,
234219,
283372,
226037,
283382,
234231,
316151,
234236,
226045,
234239,
242431,
209665,
234242,
242436,
234246,
226056,
234248,
291593,
242443,
234252,
242445,
234254,
291601,
234258,
242450,
242452,
234261,
348950,
234264,
201496,
234266,
283421,
234269,
234272,
234274,
152355,
234278,
299814,
283432,
234281,
234284,
234287,
283440,
185138,
242483,
234292,
234296,
234298,
283452,
160572,
234302,
234307,
242499,
234309,
292433,
234313,
316233,
316235,
283468,
234316,
234319,
242511,
234321,
234324,
201557,
234329,
234333,
308063,
234336,
234338,
242530,
349027,
234341,
234344,
234347,
177004,
234350,
324464,
234353,
152435,
177011,
234356,
234358,
234362,
226171,
291711,
234368,
234370,
291714,
291716,
234373,
226182,
234375,
226185,
308105,
234379,
234384,
234388,
234390,
226200,
234393,
209818,
324504,
234396,
324508,
234398,
291742,
308123,
234401,
291747,
291748,
234405,
291750,
234407,
324518,
324520,
234410,
291754,
226220,
324522,
234414,
324527,
291760,
234417,
201650,
324531,
291756,
234422,
226230,
275384,
324536,
234428,
291773,
226239,
234431,
242623,
234434,
324544,
324546,
226245,
234437,
234439,
324548,
234443,
291788,
193486,
275406,
193488,
234446,
234449,
234452,
234455,
234459,
234461,
234464,
234467,
234470,
168935,
5096,
324585,
234475,
234478,
316400,
234481,
316403,
234484,
234485,
234487,
324599,
234490,
234493,
234496,
316416,
234501,
275462,
308231,
234504,
234507,
234510,
234515,
300054,
234519,
316439,
234520,
234523,
234526,
234528,
300066,
234532,
300069,
234535,
234537,
234540,
144430,
234543,
234546,
275508,
234549,
300085,
300088,
234553,
234556,
234558,
316479,
234561,
234563,
316483,
308291,
234568,
234570,
316491,
234572,
300108,
234574,
300115,
234580,
234581,
234585,
275545,
242777,
234590,
234593,
234595,
234597,
300133,
234601,
300139,
234605,
234607,
160879,
275569,
234610,
300148,
234614,
398455,
234618,
144506,
234620,
275579,
234623,
226433,
234627,
275588,
234629,
275594,
234634,
234636,
177293,
234640,
275602,
234643,
226453,
308373,
234647,
275608,
234648,
234650,
308379,
324757,
283805,
234653,
300189,
324766,
234657,
324768,
119967,
242852,
283813,
234661,
300197,
234664,
275626,
234667,
316596,
308414,
234687,
316610,
300226,
226500,
234692,
283844,
300229,
308420,
308418,
283850,
300234,
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,
283904,
292097,
300289,
300292,
300294,
275719,
300299,
177419,
283917,
242957,
275725,
177424,
300301,
349464,
283939,
259367,
283951,
292143,
300344,
226617,
283963,
243003,
226628,
283973,
300357,
177482,
283983,
316758,
357722,
316766,
218464,
316768,
292192,
292197,
316774,
243046,
218473,
284010,
136562,
324978,
275834,
333178,
275836,
275840,
316803,
316806,
226696,
316811,
226699,
316814,
226703,
300433,
234899,
226709,
357783,
316824,
316826,
144796,
300448,
144807,
144810,
144812,
284076,
144814,
284084,
144820,
284087,
292279,
144826,
144828,
144830,
144832,
284099,
144835,
144837,
38342,
144839,
144841,
144844,
144847,
144852,
144855,
103899,
300507,
333280,
226787,
218597,
292329,
300523,
259565,
259567,
300527,
308720,
226802,
316917,
308727,
292343,
300537,
316947,
308757,
308762,
284191,
284194,
284196,
235045,
284199,
284204,
284206,
284209,
284211,
284213,
194101,
284215,
194103,
284218,
226877,
284223,
284226,
243268,
284228,
226886,
284231,
128584,
292421,
284234,
366155,
276043,
317004,
284238,
226895,
284241,
194130,
284243,
276052,
276053,
284245,
284247,
300628,
235097,
243290,
284251,
284249,
284253,
317015,
284255,
300638,
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,
358080,
276160,
284354,
358083,
276166,
284358,
358089,
276170,
284362,
276175,
284368,
276177,
317138,
358098,
284370,
284372,
284377,
276187,
284379,
284381,
284384,
284386,
358116,
276197,
317158,
284392,
325353,
284394,
358122,
284397,
276206,
284399,
358128,
358126,
358133,
358135,
276216,
358138,
300795,
358140,
284413,
358142,
284418,
317187,
358146,
317189,
317191,
284428,
300816,
300819,
317207,
284440,
186139,
300828,
300830,
276255,
300832,
284449,
300834,
325408,
227109,
317221,
358183,
186151,
276268,
300845,
194351,
243504,
300850,
284469,
276280,
325436,
358206,
276291,
366406,
276295,
300872,
153417,
284499,
276308,
284502,
317271,
178006,
276315,
292700,
284511,
227175,
292715,
300912,
284529,
292721,
300915,
284533,
292729,
317306,
284540,
292734,
325512,
169868,
276365,
284564,
358292,
284566,
350106,
284572,
276386,
284579,
276388,
358312,
284585,
317353,
276395,
292776,
292784,
276402,
358326,
161718,
276410,
276411,
358330,
276418,
276425,
301009,
301011,
301013,
292823,
301015,
301017,
358360,
292828,
276446,
153568,
276448,
276452,
276455,
292839,
292843,
276460,
276464,
178161,
276466,
227314,
276472,
325624,
317435,
276476,
276479,
276482,
276485,
276490,
292876,
276496,
317456,
317458,
243733,
243740,
317468,
317472,
325666,
243751,
292904,
276528,
243762,
309298,
325685,
325689,
276539,
235579,
235581,
325692,
178238,
276544,
284739,
292934,
276553,
243785,
350293,
350295,
194649,
227418,
309337,
194654,
227423,
350302,
178273,
227426,
276579,
309346,
309348,
227430,
276583,
350308,
309350,
276586,
309352,
350313,
350316,
276590,
301167,
227440,
350321,
284786,
276595,
301163,
350325,
350328,
292985,
301178,
292989,
301185,
317570,
350339,
292993,
317573,
350342,
350345,
350349,
301199,
317584,
325777,
350354,
350357,
350359,
350362,
276638,
350366,
284837,
153765,
350375,
350379,
350381,
350383,
129200,
350385,
350387,
350389,
350395,
350397,
350399,
227520,
350402,
227522,
301252,
350406,
227529,
301258,
309450,
276685,
276689,
227540,
309462,
301272,
276699,
309468,
194780,
309471,
301283,
317672,
276713,
317674,
325867,
243948,
194801,
227571,
309491,
309494,
243960,
227583,
276735,
227587,
276739,
211204,
276742,
227593,
227596,
325910,
309530,
342298,
276766,
211232,
317729,
276775,
211241,
325937,
276789,
325943,
211260,
260421,
276809,
285002,
276811,
235853,
276816,
235858,
276829,
276833,
391523,
276836,
276843,
293227,
276848,
293232,
186744,
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,
309779,
277011,
317971,
309781,
55837,
227877,
227879,
293417,
227882,
293421,
105007,
236082,
285236,
23094,
277054,
244288,
129603,
301636,
318020,
301639,
301643,
277071,
285265,
399955,
309844,
277080,
309849,
285277,
285282,
326244,
318055,
277100,
277106,
121458,
170618,
170619,
309885,
309888,
277122,
227975,
285320,
277128,
301706,
334476,
326285,
318094,
318092,
277136,
277139,
227992,
285340,
318108,
227998,
318110,
137889,
383658,
285357,
318128,
277170,
342707,
154292,
277173,
293555,
318132,
285368,
277177,
277181,
318144,
277187,
277191,
277194,
277196,
277201,
137946,
113378,
203491,
228069,
277223,
342760,
285417,
56041,
56043,
277232,
228081,
56059,
310015,
285441,
310020,
285448,
310029,
285453,
228113,
285459,
277273,
293659,
326430,
228128,
293666,
285474,
228135,
318248,
277291,
293677,
318253,
285489,
293685,
285494,
301880,
285499,
301884,
293696,
310080,
277314,
277317,
277322,
277329,
162643,
310100,
301911,
301913,
277337,
301921,
400236,
236397,
162671,
326514,
310134,
277368,
236408,
15224,
416639,
416640,
113538,
310147,
416648,
39817,
187274,
277385,
301972,
424853,
277405,
277411,
310179,
293798,
293802,
236460,
277426,
293811,
293817,
293820,
203715,
326603,
293849,
293861,
228327,
228328,
228330,
318442,
228332,
277486,
326638,
318450,
293876,
293877,
285686,
302073,
285690,
244731,
121850,
302075,
293882,
293887,
277504,
277507,
277511,
277519,
293908,
277526,
293917,
293939,
318516,
277561,
277564,
7232,
310336,
293956,
277573,
228422,
310344,
277577,
293960,
277583,
203857,
293971,
310355,
310359,
236632,
277594,
138332,
277598,
285792,
277601,
203872,
310374,
203879,
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,
228526,
294063,
294065,
302258,
277687,
294072,
318651,
294076,
277695,
318657,
244930,
302275,
130244,
302277,
228550,
302282,
310476,
302285,
302288,
310481,
302290,
203987,
302292,
302294,
302296,
384222,
310498,
285927,
318698,
302315,
195822,
228592,
294132,
138485,
228601,
204026,
228606,
204031,
64768,
310531,
228617,
138505,
318742,
204067,
277798,
130345,
277801,
113964,
285997,
277804,
277807,
285999,
113969,
277811,
318773,
318776,
277816,
286010,
277819,
294204,
417086,
277822,
286016,
294211,
302403,
384328,
277832,
277836,
294221,
294223,
326991,
277839,
277842,
277847,
277850,
179547,
277853,
146784,
277857,
302436,
277860,
294246,
327015,
310632,
327017,
351594,
277864,
277869,
277872,
351607,
310648,
277880,
310651,
277884,
277888,
310657,
310659,
294276,
351619,
327046,
277892,
253320,
310665,
318858,
277894,
277898,
277903,
310672,
351633,
277905,
277908,
277917,
310689,
277921,
130468,
228776,
277928,
277932,
310703,
277937,
130486,
310710,
310712,
277944,
310715,
277947,
302526,
228799,
277950,
277953,
64966,
245191,
163272,
302534,
310727,
277959,
292968,
302541,
277963,
302543,
277966,
310737,
277971,
286169,
228825,
163290,
277978,
310749,
277981,
277984,
310755,
277989,
277991,
187880,
277995,
286188,
310764,
278000,
228851,
310772,
278003,
278006,
40440,
212472,
278009,
286203,
40443,
228864,
40448,
286214,
228871,
302603,
65038,
302614,
286233,
302617,
302621,
286240,
146977,
187939,
294435,
40484,
40486,
294439,
286248,
278057,
294440,
294443,
40488,
294445,
286246,
40491,
310831,
40499,
40502,
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,
171774,
278274,
302852,
278277,
302854,
294664,
311048,
352008,
319243,
311053,
302862,
319251,
294682,
278306,
188199,
294701,
278320,
319280,
319290,
229192,
302925,
188247,
237409,
294776,
360317,
294785,
327554,
40840,
40851,
294803,
188312,
294811,
319390,
294817,
40865,
319394,
294821,
180142,
294831,
188340,
40886,
319419,
294844,
294847,
309354,
393177,
294876,
294879,
294883,
294890,
311279,
278513,
237555,
278516,
311283,
278519,
237562
] |
b507bf1d14b81fe46a95dad521d1efb328c84848
|
32a58dcd5e70f0639180b77ad0fcd1b232ccc5e3
|
/tictactoe/AppDelegate.swift
|
624c2a0134e954a6dd359e89aa3c6fd825ca23bd
|
[] |
no_license
|
kilbergr/SwiftTicTacToe
|
df9e90327fdabadbf35d76f4bc68a3e45f401455
|
341a497906a3bc8e853b40602851a180712a8b97
|
refs/heads/master
| 2021-01-10T08:27:13.724737 | 2016-01-08T20:05:13 | 2016-01-08T20:05:13 | 49,094,126 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,145 |
swift
|
//
// AppDelegate.swift
// tictactoe
//
// Created by Rebecca Kilberg on 12/31/15.
// Copyright © 2015 Rebecca. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
|
[
229380,
229383,
229385,
278539,
229388,
294924,
278542,
229391,
327695,
278545,
229394,
278548,
229397,
229399,
229402,
278556,
229405,
352284,
278559,
229408,
278564,
294950,
229415,
229417,
237613,
229422,
360496,
229426,
237618,
229428,
286774,
204856,
229432,
286776,
319544,
286791,
237640,
278605,
237646,
311375,
163920,
319573,
311383,
278623,
278626,
319590,
311400,
278635,
303212,
278639,
131192,
278648,
237693,
327814,
131209,
417930,
303241,
311436,
303244,
319633,
286873,
286876,
311460,
311469,
32944,
327862,
286906,
327866,
180413,
286910,
131264,
286916,
286922,
286924,
286926,
319694,
286928,
131281,
278743,
278747,
295133,
155872,
319716,
278760,
237807,
303345,
286962,
131314,
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,
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,
279027,
319989,
164343,
180727,
279035,
311804,
287230,
279040,
303617,
287234,
279045,
287238,
320007,
172550,
172552,
303623,
279051,
172558,
279055,
303632,
279058,
303637,
279063,
279067,
172572,
279072,
172577,
295459,
172581,
295461,
279082,
311850,
279084,
172591,
172598,
279095,
172607,
172612,
377413,
172614,
172618,
303690,
33357,
287309,
279124,
172634,
262752,
172644,
311911,
189034,
295533,
189039,
189040,
352880,
295538,
172655,
189044,
287349,
172656,
172660,
287355,
287360,
295553,
287365,
311942,
303751,
352905,
279178,
287371,
311946,
311951,
287377,
172691,
287381,
311957,
221850,
287386,
303773,
164509,
287390,
295583,
172702,
230045,
172705,
303780,
287394,
172707,
287398,
287400,
279208,
172714,
295595,
279212,
189102,
172721,
287409,
303797,
189114,
287419,
303804,
328381,
279231,
287423,
328384,
287427,
312006,
279241,
107212,
172748,
287436,
172751,
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,
303914,
279340,
205613,
279353,
230202,
312124,
222018,
295755,
377676,
148302,
287569,
303959,
279383,
279390,
230241,
279394,
303976,
336744,
303985,
328563,
303987,
279413,
303991,
303997,
295806,
295808,
304005,
295813,
320391,
213895,
304007,
304009,
304011,
230284,
304013,
213902,
279438,
295822,
189329,
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,
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,
304311,
230592,
279750,
312518,
230600,
230607,
148690,
320727,
279769,
304348,
279777,
304354,
296163,
320740,
279781,
304360,
279788,
320748,
279790,
296189,
320771,
312585,
296205,
230674,
320786,
230677,
296213,
296215,
320792,
230681,
230679,
230689,
173350,
312622,
296243,
312630,
222522,
222525,
296253,
296255,
312639,
230718,
296259,
378181,
238919,
296264,
320840,
230727,
296267,
296271,
222545,
230739,
312663,
222556,
337244,
230752,
312676,
230760,
173418,
410987,
230763,
230768,
296305,
312692,
230773,
279929,
181626,
304505,
304506,
181631,
312711,
296331,
288140,
230800,
288144,
304533,
288154,
337306,
288160,
288162,
288164,
279975,
304555,
370092,
279983,
288176,
279985,
173488,
312755,
296373,
279991,
312759,
288185,
337335,
222652,
312766,
173507,
296389,
222665,
230860,
312783,
288208,
230865,
288210,
370130,
288212,
280021,
288214,
222676,
239064,
288217,
288218,
280027,
288220,
329177,
239070,
288224,
288226,
370146,
280036,
288229,
280038,
288230,
288232,
280034,
288234,
320998,
288236,
288238,
288240,
288242,
296435,
288244,
296439,
288250,
148990,
296446,
402942,
206336,
296450,
321022,
230916,
230919,
214535,
370187,
304651,
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,
67330,
280324,
280331,
198416,
280337,
296723,
116503,
321304,
329498,
296731,
321311,
313121,
313123,
321316,
304932,
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,
280487,
313258,
321458,
296883,
124853,
214966,
296890,
10170,
288700,
296894,
280515,
190403,
296900,
337862,
165831,
280521,
231379,
296921,
239586,
313320,
231404,
124913,
165876,
321528,
313340,
288764,
239612,
239617,
313347,
288773,
313358,
305176,
313371,
354338,
305191,
223273,
313386,
354348,
124978,
215090,
124980,
288824,
288826,
321595,
378941,
313406,
288831,
288836,
67654,
223303,
280651,
354382,
288848,
280658,
215123,
354390,
288855,
288859,
280669,
313438,
280671,
223327,
149599,
149601,
149603,
321634,
329830,
280681,
313451,
223341,
280687,
313458,
280691,
215154,
313464,
321659,
280702,
288895,
321670,
215175,
141446,
141455,
141459,
280725,
313498,
288936,
100520,
280747,
288940,
280755,
288947,
321717,
280759,
280764,
280769,
280771,
280774,
280776,
313548,
321740,
280783,
280786,
280788,
313557,
280793,
280796,
280798,
338147,
280804,
280807,
157930,
280811,
280817,
280819,
157940,
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,
280940,
190832,
280946,
223606,
313720,
280956,
280959,
313731,
199051,
240011,
289166,
240017,
190868,
297365,
297368,
297372,
141725,
297377,
289186,
297391,
289201,
240052,
289207,
305594,
289210,
281024,
289221,
289227,
281045,
281047,
215526,
166378,
305647,
281075,
174580,
281084,
240124,
305662,
305664,
240129,
305666,
240132,
223749,
305668,
281095,
223752,
150025,
338440,
223757,
281102,
223763,
223765,
281113,
322074,
281116,
281121,
182819,
281127,
281135,
150066,
158262,
158266,
289342,
281154,
322115,
158283,
281163,
281179,
199262,
338528,
338532,
281190,
199273,
281196,
158317,
19053,
313973,
281210,
297594,
158347,
133776,
314003,
117398,
314007,
289436,
174754,
330404,
289448,
174764,
314029,
314033,
240309,
133817,
314045,
314047,
314051,
199364,
297671,
199367,
158409,
289493,
363234,
289513,
289522,
289525,
289532,
322303,
289537,
322310,
264969,
322314,
322318,
281361,
281372,
322341,
215850,
281388,
207661,
289593,
281401,
289601,
281410,
281413,
281414,
240458,
281420,
240468,
281430,
322393,
297818,
281435,
281438,
281442,
174955,
224110,
207733,
207737,
183172,
158596,
338823,
322440,
314249,
240519,
240535,
289687,
289694,
289696,
289700,
281529,
289724,
52163,
183260,
281567,
289762,
322534,
297961,
281581,
183277,
322550,
134142,
322563,
175134,
322599,
322610,
314421,
281654,
314427,
207937,
314433,
314441,
207949,
322642,
314456,
281691,
314461,
281702,
281704,
314474,
281708,
281711,
289912,
248995,
306341,
306344,
306347,
306354,
142531,
199877,
289991,
306377,
289997,
249045,
363742,
363745,
298216,
330988,
126190,
216303,
322801,
257302,
363802,
199976,
199978,
314671,
298292,
298294,
257334,
298306,
224584,
224587,
224594,
216404,
306517,
150870,
224603,
159068,
265568,
281960,
150890,
306539,
314732,
314736,
290161,
216436,
306549,
298358,
306552,
290171,
306555,
314747,
290174,
298365,
224641,
281987,
298372,
265604,
281990,
298377,
142733,
298381,
224657,
306581,
314779,
282025,
282027,
241068,
241070,
241072,
282034,
241077,
150966,
298424,
306618,
282044,
323015,
306635,
306640,
290263,
290270,
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,
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,
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,
241556,
44948,
298901,
282520,
241560,
241563,
241565,
241567,
241569,
282531,
241574,
282537,
298922,
36779,
178273,
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,
299105,
217188,
299109,
307303,
315495,
356457,
307307,
45163,
315502,
192624,
307314,
323700,
299126,
233591,
299136,
307329,
307338,
233613,
307352,
299164,
184479,
299167,
184481,
315557,
184486,
307370,
307372,
184492,
307374,
307376,
323763,
176311,
184503,
307386,
258235,
176316,
307388,
307390,
299200,
184512,
307394,
307396,
299204,
184518,
307399,
323784,
307409,
176343,
299225,
233701,
307432,
184572,
282881,
184579,
282893,
291089,
282906,
291104,
233766,
282931,
176435,
315701,
307510,
332086,
151864,
307512,
168245,
307515,
282942,
307518,
151874,
282947,
282957,
323917,
110926,
233808,
323921,
315733,
233815,
315739,
323932,
299357,
242018,
242024,
299373,
315757,
250231,
242043,
315771,
299388,
299391,
299398,
242057,
291212,
299405,
291222,
283033,
291226,
242075,
291231,
61855,
283042,
291238,
291241,
127403,
127405,
291247,
127407,
283062,
291254,
194660,
127417,
291260,
283069,
127421,
127429,
283080,
176592,
315856,
315860,
176597,
283095,
127447,
299481,
176605,
242143,
291299,
127463,
242152,
291305,
176620,
291314,
291317,
135672,
233979,
291323,
291330,
283142,
127497,
135689,
233994,
291341,
233998,
234003,
234006,
127511,
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,
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,
234264,
201496,
234266,
283421,
234269,
234272,
234274,
152355,
234278,
299814,
283432,
234281,
234284,
234287,
283440,
185138,
242483,
234292,
234296,
234298,
283452,
160572,
234302,
234307,
242499,
234309,
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,
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,
193486,
275406,
193488,
234446,
234449,
234452,
234455,
234459,
234461,
234464,
234467,
234470,
168935,
5096,
324585,
234475,
234478,
316400,
234481,
316403,
234484,
234485,
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,
234563,
316483,
308291,
234568,
234570,
316491,
234572,
300108,
234574,
300115,
234580,
234581,
275545,
234585,
242777,
234590,
234593,
234595,
234597,
300133,
234601,
300139,
234605,
234607,
160879,
275569,
234610,
300148,
234614,
398455,
234618,
275579,
144506,
234620,
234623,
226433,
234627,
275588,
234629,
234634,
234636,
234640,
275602,
234643,
226453,
275606,
308373,
275608,
234647,
234648,
234650,
308379,
283805,
324757,
234653,
300189,
234657,
324766,
324768,
119967,
283813,
234661,
300197,
234664,
242852,
275626,
234667,
316596,
234687,
316610,
300226,
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,
283917,
242957,
275725,
177424,
349464,
283939,
259367,
283951,
292143,
300344,
226617,
283963,
243003,
226628,
283973,
300357,
177482,
283983,
316758,
357722,
316766,
316768,
218464,
292192,
292197,
316774,
243046,
218473,
284010,
136562,
324978,
275834,
333178,
275836,
275840,
316803,
316806,
226696,
316811,
226699,
226703,
300433,
234899,
226709,
357783,
316824,
316826,
144796,
300448,
144807,
144810,
284076,
144812,
144814,
284084,
144820,
284087,
292279,
144826,
144828,
144830,
144832,
284099,
144835,
144837,
38342,
144839,
144841,
144844,
144847,
144852,
144855,
103899,
300507,
333280,
226787,
218597,
292329,
300523,
259565,
259567,
300527,
308720,
226802,
316917,
308727,
292343,
300537,
316947,
308757,
308762,
284191,
284194,
284196,
235045,
284199,
284204,
284206,
284209,
284211,
284213,
194101,
284215,
194103,
284218,
226877,
284223,
284226,
243268,
284228,
226886,
284231,
128584,
292421,
284234,
366155,
276043,
317004,
284238,
226895,
284241,
194130,
284243,
276052,
276053,
284245,
284247,
300628,
235097,
243290,
284251,
284249,
284253,
317015,
284255,
300638,
243293,
284258,
292452,
177766,
284263,
292454,
284265,
292458,
284267,
292461,
284272,
284274,
276086,
292470,
284278,
292473,
284283,
276093,
284286,
276095,
292479,
284288,
276098,
325250,
284290,
292485,
284292,
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,
276166,
284358,
358089,
276170,
284362,
276175,
284368,
276177,
317138,
358098,
284370,
284372,
284377,
276187,
284379,
284381,
284384,
284386,
358116,
276197,
284392,
325353,
284394,
358122,
284397,
276206,
284399,
358126,
358128,
358133,
358135,
276216,
358138,
300795,
358140,
284413,
358142,
284418,
317187,
358146,
317189,
317191,
284428,
300816,
300819,
317207,
284440,
186139,
300828,
300830,
276255,
300832,
284449,
300834,
325408,
227109,
317221,
358183,
186151,
276268,
194351,
243504,
300850,
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,
358330,
276411,
276418,
276425,
301009,
301011,
301013,
292823,
301015,
301017,
358360,
292828,
276446,
153568,
276448,
276452,
276455,
292843,
276460,
276464,
276466,
227314,
276472,
325624,
317435,
276476,
276479,
276482,
276485,
276490,
292876,
276496,
317456,
317458,
243733,
243740,
317468,
317472,
325666,
243751,
292904,
276528,
243762,
309298,
325685,
325689,
276539,
235579,
235581,
325692,
178238,
276544,
284739,
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,
292993,
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,
301258,
309450,
276685,
276689,
227540,
301272,
276699,
194780,
309468,
301283,
317672,
276713,
317674,
325867,
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,
285002,
276811,
276816,
235858,
276829,
276833,
391523,
276836,
276843,
293227,
276848,
293232,
186744,
285051,
211324,
227709,
285061,
317833,
178572,
285070,
285077,
178583,
227738,
317853,
276896,
317858,
342434,
285093,
285098,
276907,
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,
277011,
309779,
317971,
309781,
55837,
227877,
227879,
293417,
227882,
293421,
105007,
236082,
285236,
23094,
277054,
244288,
129603,
301636,
318020,
301639,
301643,
277071,
285265,
309844,
277080,
309849,
285277,
285282,
326244,
277100,
277106,
121458,
170618,
170619,
309885,
309888,
277122,
227975,
285320,
277128,
301706,
334476,
326285,
318094,
318092,
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,
285453,
228113,
285459,
277273,
326430,
228128,
293666,
228135,
318248,
277291,
293677,
318253,
285489,
293685,
285494,
301880,
285499,
301884,
293696,
310080,
277314,
277317,
277322,
277329,
162643,
310100,
301911,
301913,
277337,
301921,
400236,
236397,
162671,
326514,
277368,
236408,
15224,
416639,
416640,
113538,
310147,
416648,
39817,
187274,
277385,
301972,
424853,
277405,
277411,
310179,
293798,
293802,
236460,
277426,
293811,
293817,
293820,
203715,
326603,
293849,
293861,
228327,
228328,
228330,
318442,
228332,
277486,
326638,
318450,
293876,
293877,
285686,
302073,
285690,
244731,
121850,
302075,
293882,
293887,
277504,
277507,
277511,
277519,
293908,
293917,
293939,
318516,
277561,
277564,
7232,
310336,
293956,
277573,
228422,
310344,
277577,
293960,
277583,
203857,
293971,
310355,
310359,
236632,
277594,
138332,
277598,
285792,
203872,
277601,
310374,
203879,
310376,
228460,
318573,
203886,
187509,
285815,
285817,
367737,
285821,
302205,
285824,
392326,
285831,
302218,
285835,
294026,
384148,
162964,
187542,
302231,
285849,
302233,
285852,
302237,
285854,
285856,
285862,
277671,
302248,
64682,
277678,
228526,
294063,
294065,
302258,
277687,
294072,
318651,
277695,
318657,
244930,
302275,
130244,
302277,
228550,
302282,
310476,
302285,
302288,
310481,
302290,
203987,
302292,
302294,
302296,
384222,
310498,
285927,
318698,
302315,
195822,
228592,
294132,
138485,
204023,
228601,
204026,
228606,
204031,
64768,
310531,
285958,
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,
384328,
277832,
277836,
294221,
294223,
326991,
277839,
277842,
277847,
277850,
179547,
277853,
146784,
277857,
302436,
277860,
294246,
327015,
310632,
327017,
277864,
351594,
277869,
277872,
351607,
310648,
277880,
310651,
277884,
277888,
310657,
310659,
294276,
351619,
277892,
277894,
253320,
310665,
318858,
277898,
327046,
277903,
310672,
351633,
277905,
277908,
277917,
310689,
277921,
277923,
130468,
228776,
277928,
277932,
310703,
277937,
130486,
310710,
310712,
277944,
277947,
310715,
302526,
277950,
277953,
64966,
245191,
163272,
302534,
310727,
277959,
292968,
302541,
277966,
302543,
277963,
310737,
277971,
277975,
286169,
228825,
163290,
277978,
310749,
277981,
277984,
310755,
277989,
277991,
187880,
277995,
286188,
310764,
278000,
278003,
310772,
228851,
278006,
40440,
278009,
212472,
286203,
40443,
228864,
40448,
286214,
228871,
302603,
65038,
302614,
286233,
302617,
302621,
286240,
146977,
187939,
294435,
40484,
40486,
294439,
286248,
294440,
40488,
294443,
286246,
294445,
278057,
40491,
310831,
40499,
40502,
212538,
40507,
40511,
40513,
228933,
40521,
286283,
40525,
40527,
228944,
400976,
212560,
40533,
147032,
40537,
278109,
40541,
40544,
40548,
40550,
286312,
286313,
40552,
40554,
310892,
40557,
40560,
188022,
122488,
294521,
343679,
310925,
286354,
278163,
302740,
122517,
278168,
327333,
229030,
212648,
278188,
302764,
278192,
319153,
278196,
302781,
319171,
302789,
294599,
278216,
294601,
278227,
229076,
286420,
319187,
286425,
319194,
278235,
229086,
278238,
286432,
294625,
294634,
302838,
319226,
286460,
171774,
278274,
302852,
278277,
302854,
294664,
311048,
319243,
311053,
302862,
319251,
294682,
278306,
294701,
278320,
319280,
319290,
229192,
302925,
188247,
237409,
360317,
327554,
40840,
40851,
294803,
188312,
294811,
319390,
294817,
40865,
319394,
294821,
180142,
188340,
40886,
319419,
294844,
294847,
309354,
393177,
294876,
294879,
294883,
294890,
311279,
278513,
237555,
278516,
311283,
278519,
237562
] |
4e772f5819e47e89c9e89af045276717d7c30377
|
21d1aa6df39b6ba34afc96a3d807b954be3a84f7
|
/TablePerformance/DrawRectController.swift
|
63ebf92ee68594c8fdc5a89b944ec3f1a11dc13e
|
[
"MIT"
] |
permissive
|
bradya/tableviewcell-performance
|
f9030e677c261f965330b5e0b6744c955f6bb759
|
4a92c7c9af130110284db11e6deb2a7a811341da
|
refs/heads/master
| 2016-09-10T11:45:11.358762 | 2015-08-25T07:45:31 | 2015-08-25T07:45:31 | 20,820,864 | 1 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,979 |
swift
|
//
// DrawRectController.swift
// TablePerformance
//
// Created by Brady Archambo on 6/13/14.
// Copyright (c) 2014 Tiny Speck. All rights reserved.
//
import UIKit
class DrawRectController: UITableViewController {
let ReuseIdentifier = "DrawRectIdentifier"
override init(style: UITableViewStyle) {
super.init(style: style)
self.title = "Draw Rect"
}
override init(nibName nibNameOrNil: String!, bundle nibBundleOrNil: NSBundle!) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
required init!(coder aDecoder: NSCoder!) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.registerClass(DrawRectCell.self, forCellReuseIdentifier: ReuseIdentifier)
}
// #pragma mark - Table view data source
override func numberOfSectionsInTableView(tableView: UITableView?) -> Int {
// Return the number of sections.
return TwoDimensionalArrayOfRandomStrings.count
}
override func tableView(tableView: UITableView?, numberOfRowsInSection section: Int) -> Int {
// Return the number of rows in the section.
return TwoDimensionalArrayOfRandomStrings[section].count
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell : DrawRectCell = tableView.dequeueReusableCellWithIdentifier(ReuseIdentifier, forIndexPath: indexPath) as! DrawRectCell
// Configure the cell...
cell.setTextString(TwoDimensionalArrayOfRandomStrings[indexPath.section][indexPath.row])
return cell
}
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return Text.getHeightForString(TwoDimensionalArrayOfRandomStrings[indexPath.section][indexPath.row])
}
}
|
[
-1
] |
d17b5debb80daf8a4761e364437726124b79e4ec
|
e6f1256b8eadffedb2ba3fcb352e435b987b252b
|
/NotifyMe/FirstViewController.swift
|
fa90c89b457f5cb247f56d01a9b2f6104bb877dd
|
[] |
no_license
|
siddhiak/NotifyMeApp
|
fdb69263a364e5c1e8a3e2e48944079d3c0ce1a1
|
e4673f75a01ec120eec30b21de0823fe4dfb2e48
|
refs/heads/master
| 2022-11-19T18:46:48.999319 | 2020-07-17T18:24:48 | 2020-07-17T18:24:48 | 279,951,685 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 349 |
swift
|
//
// FirstViewController.swift
// NotifyMe
//
// Created by Siddhi Kabadi on 7/15/20.
// Copyright © 2020 Siddhi Kabadi. All rights reserved.
//
import UIKit
class FirstViewController: UIViewController {
override func viewDidLoad()
{
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
|
[
125186,
125190,
243761,
125238,
125206
] |
5d77eb11af02cf2223ba0c140831fe480f707dd3
|
bd04463061c9c1ab45d44ce1856a3e82f4a73f18
|
/test/IRGen/conformance_resilience.swift
|
0411285b9ea2e7faff652aedff3845aeaa3068b4
|
[
"Apache-2.0",
"Swift-exception"
] |
permissive
|
swift-embedded/swift
|
633dc5302a3bb88c500d84dbc50ed31ec6e52092
|
385ee9dafe6431ebec9b871b81ef389c2ead5668
|
refs/heads/embedded-5.1
| 2022-05-07T11:57:23.429204 | 2020-01-12T23:14:25 | 2020-01-12T23:14:25 | 212,096,608 | 11 | 6 |
Apache-2.0
| 2022-11-26T23:19:49 | 2019-10-01T12:58:43 |
C++
|
UTF-8
|
Swift
| false | false | 2,438 |
swift
|
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift
// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize
// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s
import resilient_protocol
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s22conformance_resilience14useConformanceyyx18resilient_protocol22OtherResilientProtocolRzlF"(%swift.opaque* noalias nocapture, %swift.type* %T, i8** %T.OtherResilientProtocol)
public func useConformance<T : OtherResilientProtocol>(_: T) {}
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s22conformance_resilience14getConformanceyy18resilient_protocol7WrapperVyxGlF"(%swift.opaque* noalias nocapture, %swift.type* %T)
public func getConformance<T>(_ w: Wrapper<T>) {
// CHECK: [[RESPONSE:%.*]] = call swiftcc %swift.metadata_response @"$s18resilient_protocol7WrapperVMa"([[INT]] 0, %swift.type* %T)
// CHECK: [[META:%.*]] = extractvalue %swift.metadata_response [[RESPONSE]], 0
// CHECK: [[WTABLE:%.*]] = call i8** @swift_getWitnessTable(%swift.protocol_conformance_descriptor* @"$s18resilient_protocol7WrapperVyxGAA22OtherResilientProtocolAAMc", %swift.type* [[META]], i8*** undef)
// CHECK: call swiftcc void @"$s22conformance_resilience14useConformanceyyx18resilient_protocol22OtherResilientProtocolRzlF"(%swift.opaque* noalias nocapture %0, %swift.type* [[META]], i8** [[WTABLE]])
// CHECK: ret void
useConformance(w)
}
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @"$s22conformance_resilience14getConformanceyy18resilient_protocol15ConcreteWrapperVF"(%swift.opaque* noalias nocapture)
public func getConformance(_ w: ConcreteWrapper) {
// CHECK: [[RESPONSE:%.*]] = call swiftcc %swift.metadata_response @"$s18resilient_protocol15ConcreteWrapperVMa"([[INT]] 0)
// CHECK: [[META:%.*]] = extractvalue %swift.metadata_response [[RESPONSE]], 0
// CHECK: call swiftcc void @"$s22conformance_resilience14useConformanceyyx18resilient_protocol22OtherResilientProtocolRzlF"(%swift.opaque* noalias nocapture %0, %swift.type* [[META]], i8** @"$s18resilient_protocol15ConcreteWrapperVAA22OtherResilientProtocolAAWP")
// CHECK: ret void
useConformance(w)
}
|
[
83556
] |
c9c85b11ddc497c9f8ae3c0a5e18f8fd68d6c905
|
d001db74a231989bf84d28609156dff39a721374
|
/Bluetooth/BTLECentralViewController.swift
|
e2a947980a484d8babc7a2e047e2744c2ada6a18
|
[] |
no_license
|
fyname/Core-Bluetooth-Transfer-Demo
|
82fa497bed661f216d6674d83c64e30cc3907f4b
|
991478f186a60c6c2115c65a4ca718dca2ed7f50
|
refs/heads/master
| 2021-01-18T07:24:25.204047 | 2015-05-30T14:49:43 | 2015-05-30T14:49:43 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 10,241 |
swift
|
//
// SecondViewController.swift
// Bluetooth
//
// Created by Mick on 12/20/14.
// Copyright (c) 2014 MacCDevTeam LLC. All rights reserved.
//
import UIKit
import CoreBluetooth
class BTLECentralViewController: UIViewController, CBCentralManagerDelegate, CBPeripheralDelegate {
@IBOutlet private weak var textView: UITextView!
private var centralManager: CBCentralManager?
private var discoveredPeripheral: CBPeripheral?
// And somewhere to store the incoming data
private let data = NSMutableData()
override func viewDidLoad() {
super.viewDidLoad()
// Start up the CBCentralManager
centralManager = CBCentralManager(delegate: self, queue: nil)
}
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
println("Stopping scan")
centralManager?.stopScan()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/** centralManagerDidUpdateState is a required protocol method.
* Usually, you'd check for other states to make sure the current device supports LE, is powered on, etc.
* In this instance, we're just using it to wait for CBCentralManagerStatePoweredOn, which indicates
* the Central is ready to be used.
*/
func centralManagerDidUpdateState(central: CBCentralManager!) {
println("\(__LINE__) \(__FUNCTION__)")
if central.state != .PoweredOn {
// In a real app, you'd deal with all the states correctly
return
}
// The state must be CBCentralManagerStatePoweredOn...
// ... so start scanning
scan()
}
/** Scan for peripherals - specifically for our service's 128bit CBUUID
*/
func scan() {
centralManager?.scanForPeripheralsWithServices(
[transferServiceUUID], options: [
CBCentralManagerScanOptionAllowDuplicatesKey : NSNumber(bool: true)
]
)
println("Scanning started")
}
/** This callback comes whenever a peripheral that is advertising the TRANSFER_SERVICE_UUID is discovered.
* We check the RSSI, to make sure it's close enough that we're interested in it, and if it is,
* we start the connection process
*/
func centralManager(central: CBCentralManager!, didDiscoverPeripheral peripheral: CBPeripheral!, advertisementData: [NSObject : AnyObject]!, RSSI: NSNumber!) {
// Reject any where the value is above reasonable range
// Reject if the signal strength is too low to be close enough (Close is around -22dB)
// if RSSI.integerValue < -15 && RSSI.integerValue > -35 {
// println("Device not at correct range")
// return
// }
println("Discovered \(peripheral.name) at \(RSSI)")
// Ok, it's in range - have we already seen it?
if discoveredPeripheral != peripheral {
// Save a local copy of the peripheral, so CoreBluetooth doesn't get rid of it
discoveredPeripheral = peripheral
// And connect
println("Connecting to peripheral \(peripheral)")
centralManager?.connectPeripheral(peripheral, options: nil)
}
}
/** If the connection fails for whatever reason, we need to deal with it.
*/
func centralManager(central: CBCentralManager!, didFailToConnectPeripheral peripheral: CBPeripheral!, error: NSError!) {
println("Failed to connect to \(peripheral). (\(error.localizedDescription))")
cleanup()
}
/** We've connected to the peripheral, now we need to discover the services and characteristics to find the 'transfer' characteristic.
*/
func centralManager(central: CBCentralManager!, didConnectPeripheral peripheral: CBPeripheral!) {
println("Peripheral Connected")
// Stop scanning
centralManager?.stopScan()
println("Scanning stopped")
// Clear the data that we may already have
data.length = 0
// Make sure we get the discovery callbacks
peripheral.delegate = self
// Search only for services that match our UUID
peripheral.discoverServices([transferServiceUUID])
}
/** The Transfer Service was discovered
*/
func peripheral(peripheral: CBPeripheral!, didDiscoverServices error: NSError!) {
if let error = error {
println("Error discovering services: \(error.localizedDescription)")
cleanup()
return
}
// Discover the characteristic we want...
// Loop through the newly filled peripheral.services array, just in case there's more than one.
for service in peripheral.services as! [CBService] {
peripheral.discoverCharacteristics([transferCharacteristicUUID], forService: service)
}
}
/** The Transfer characteristic was discovered.
* Once this has been found, we want to subscribe to it, which lets the peripheral know we want the data it contains
*/
func peripheral(peripheral: CBPeripheral!, didDiscoverCharacteristicsForService service: CBService!, error: NSError!) {
// Deal with errors (if any)
if let error = error {
println("Error discovering services: \(error.localizedDescription)")
cleanup()
return
}
// Again, we loop through the array, just in case.
for characteristic in service.characteristics as! [CBCharacteristic] {
// And check if it's the right one
if characteristic.UUID.isEqual(transferCharacteristicUUID) {
// If it is, subscribe to it
peripheral.setNotifyValue(true, forCharacteristic: characteristic)
}
}
// Once this is complete, we just need to wait for the data to come in.
}
/** This callback lets us know more data has arrived via notification on the characteristic
*/
func peripheral(peripheral: CBPeripheral!, didUpdateValueForCharacteristic characteristic: CBCharacteristic!, error: NSError!) {
if let error = error {
println("Error discovering services: \(error.localizedDescription)")
return
}
// Have we got everything we need?
if let stringFromData = NSString(data: characteristic.value, encoding: NSUTF8StringEncoding) {
if stringFromData.isEqualToString("EOM") {
// We have, so show the data,
textView.text = NSString(data: (data.copy() as! NSData) as NSData, encoding: NSUTF8StringEncoding) as! String
// Cancel our subscription to the characteristic
peripheral.setNotifyValue(false, forCharacteristic: characteristic)
// and disconnect from the peripehral
centralManager?.cancelPeripheralConnection(peripheral)
}
// Otherwise, just add the data on to what we already have
data.appendData(characteristic.value)
// Log it
println("Received: \(stringFromData)")
} else {
println("Invalid data")
}
}
/** The peripheral letting us know whether our subscribe/unsubscribe happened or not
*/
func peripheral(peripheral: CBPeripheral!, didUpdateNotificationStateForCharacteristic characteristic: CBCharacteristic!, error: NSError!) {
println("Error changing notification state: \(error?.localizedDescription)")
// Exit if it's not the transfer characteristic
if !characteristic.UUID.isEqual(transferCharacteristicUUID) {
return
}
// Notification has started
if (characteristic.isNotifying) {
println("Notification began on \(characteristic)")
} else { // Notification has stopped
println("Notification stopped on (\(characteristic)) Disconnecting")
centralManager?.cancelPeripheralConnection(peripheral)
}
}
/** Once the disconnection happens, we need to clean up our local copy of the peripheral
*/
func centralManager(central: CBCentralManager!, didDisconnectPeripheral peripheral: CBPeripheral!, error: NSError!) {
println("Peripheral Disconnected")
discoveredPeripheral = nil
// We're disconnected, so start scanning again
scan()
}
/** Call this when things either go wrong, or you're done with the connection.
* This cancels any subscriptions if there are any, or straight disconnects if not.
* (didUpdateNotificationStateForCharacteristic will cancel the connection if a subscription is involved)
*/
private func cleanup() {
// Don't do anything if we're not connected
// self.discoveredPeripheral.isConnected is deprecated
if discoveredPeripheral?.state != CBPeripheralState.Connected { // explicit enum required to compile here?
return
}
// See if we are subscribed to a characteristic on the peripheral
if let services = discoveredPeripheral?.services as? [CBService] {
for service in services {
if let characteristics = service.characteristics as? [CBCharacteristic] {
for characteristic in characteristics {
if characteristic.UUID.isEqual(transferCharacteristicUUID) && characteristic.isNotifying {
discoveredPeripheral?.setNotifyValue(false, forCharacteristic: characteristic)
// And we're done.
return
}
}
}
}
}
// If we've got this far, we're connected, but we're not subscribed, so we just disconnect
centralManager?.cancelPeripheralConnection(discoveredPeripheral)
}
}
|
[
-1
] |
551a5ec79b21e4a8500b8f26fe0c7b89824f9425
|
8d9b55b5ad7a6977b7b69a2c61c1dec0a2dae1e7
|
/MoneyTransferTests/Treatment/View/TreatmentViewOutputSpy.swift
|
7087fc992c79fc69d6dee460ab5ba004f22dacb0
|
[] |
no_license
|
proksenon/MoneyTransfer
|
b0718db1a790f7a4b896717803f99396ca56e5f8
|
c0f276bf74e7aa27f6c768f63a187395124867ff
|
refs/heads/master
| 2022-12-18T12:29:21.512651 | 2020-10-02T11:30:04 | 2020-10-02T11:30:04 | 294,346,982 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 355 |
swift
|
//
// TreatmentViewOutputSpy.swift
// MoneyTransferTests
//
// Created by 18579132 on 17.09.2020.
// Copyright © 2020 18579132. All rights reserved.
//
import Foundation
@testable import MoneyTransfer
class TreatmentViewOutputSpy: TreatmentViewOutput {
var didConfigureView: Bool = false
func configureView() {
didConfigureView = true
}
}
|
[
-1
] |
650b21504332d4a3c0cc894a48df4b89f29b9085
|
b0f0a7e8107fb53348ba1bf78abbe1b14a40a68e
|
/ISO8601/ISO8601.swift
|
98ea446b0dda66ff0d32025dbb7d8c980387759c
|
[
"MIT"
] |
permissive
|
carabina/ISO8601Formatter
|
494e98cc0432ac946861d0b783c0c88b45c7d212
|
b4e342b8682019a08a1b58590e5f976014a6ef7c
|
refs/heads/master
| 2021-01-15T16:09:44.297790 | 2015-06-30T20:13:24 | 2015-06-30T20:13:24 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 13,063 |
swift
|
//
// main.swift
// ISO8601
//
// Created by Miroslav Perovic on 6/23/15.
// Copyright © 2015 Miroslav Perovic. All rights reserved.
//
import Foundation
final class ISO8601Formatter: NSFormatter {
enum ISO8601DateStyle: Int {
case CalendarLongStyle // Default (YYYY-MM-DD)
case CalendarShortStyle // (YYYYMMDD)
case OrdinalLongStyle // (YYYY-DDD)
case OrdinalShortStyle // (YYYYDDD)
case WeekLongStyle // (YYYY-Www-D)
case WeekShortStyle // (YYYYWwwD)
}
enum ISO8601TimeStyle: Int {
case None
case LongStyle // Default (hh:mm:ss)
case ShortStyle // (hhmmss)
}
enum ISO8601TimeZoneStyle: Int {
case None
case UTC // Default (Z)
case LongStyle // (±hh:mm)
case ShortStyle // (±hhmm)
}
enum ISO8601FractionSeparator: Int {
case Comma // Default (,)
case Dot // (.)
}
var dateStyle: ISO8601DateStyle
var timeStyle: ISO8601TimeStyle
var fractionSeparator: ISO8601FractionSeparator
var timeZoneStyle: ISO8601TimeZoneStyle
var fractionDigits: Int
let days365 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]
let days366 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]
convenience override init() {
self.init(
dateStyle: .CalendarLongStyle,
timeStyle: .LongStyle,
fractionSeparator: .Comma,
fractionDigits: 6,
timeZoneStyle: .UTC
)
}
init(dateStyle: ISO8601DateStyle, timeStyle: ISO8601TimeStyle, fractionSeparator: ISO8601FractionSeparator, fractionDigits: Int, timeZoneStyle: ISO8601TimeZoneStyle) {
self.dateStyle = dateStyle
self.timeStyle = timeStyle
self.fractionSeparator = fractionSeparator
self.fractionDigits = fractionDigits
self.timeZoneStyle = timeZoneStyle
super.init()
}
required convenience init?(coder aDecoder: NSCoder) {
self.init(
dateStyle: .CalendarLongStyle,
timeStyle: .LongStyle,
fractionSeparator: .Comma,
fractionDigits: 6,
timeZoneStyle: .UTC
)
}
func stringFromDate(date: NSDate) -> String? {
let gregorian = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)!
let dateComponents = gregorian.components(
[.Year, .Month, .Day, .WeekOfYear, .Hour, .Minute, .Second, .Weekday, .WeekdayOrdinal, .WeekOfYear, .YearForWeekOfYear, .TimeZone],
fromDate: date
)
var string: String
if dateComponents.year < 0 || dateComponents.year > 9999 {
return nil
}
string = String(format: "%04li", dateComponents.year)
if dateStyle == .WeekLongStyle || dateStyle == .WeekShortStyle {
// For weekOfYear calculation see more at: https://en.wikipedia.org/wiki/ISO_8601#Week_dates
if date.weekOfYear() == 53 {
string = String(format: "%04li", dateComponents.year - 1)
}
}
switch dateStyle {
case .CalendarLongStyle:
string = string + String(format: "-%02i-%02i", dateComponents.month, dateComponents.day)
case .CalendarShortStyle:
string = string + String(format: "%02i%02i", dateComponents.month, dateComponents.day)
case .OrdinalLongStyle:
string = string + String(format: "-%03i", date.dayOfYear())
case .OrdinalShortStyle:
string = string + String(format: "%03i", date.dayOfYear())
case .WeekLongStyle:
if dateComponents.weekday > 1 {
string = string + String(format: "-W%02i-%01i", date.weekOfYear(), dateComponents.weekday - 1)
} else {
string = string + String(format: "-W%02i-%01i", date.weekOfYear(), 7)
}
case .WeekShortStyle:
if dateComponents.weekday > 1 {
string = string + String(format: "W%02i%01i", dateComponents.weekOfYear, dateComponents.weekday - 1)
} else {
string = string + String(format: "W%02i%01i", dateComponents.weekOfYear, 7)
}
}
let timeString: String
switch timeStyle {
case .LongStyle:
timeString = String(format: "T%02i:%02i:%02i", dateComponents.hour, dateComponents.minute, dateComponents.second)
case .ShortStyle:
timeString = String(format: "T%02i:%02i:%02i", dateComponents.hour, dateComponents.minute, dateComponents.second)
case .None:
return string
}
string = string + timeString
if let timeZone = dateComponents.timeZone {
let timeZoneString: String
switch timeZoneStyle {
case .UTC:
timeZoneString = "Z"
case .LongStyle, .ShortStyle:
let hoursOffset = timeZone.secondsFromGMT / 3600
let secondsOffset = 0
let sign = hoursOffset >= 0 ? "+" : "-"
if timeZoneStyle == .LongStyle {
timeZoneString = String(format: "%@%02i:%02i", sign, hoursOffset, secondsOffset)
} else {
timeZoneString = String(format: "%@%02i%02i", sign, hoursOffset, secondsOffset)
}
case .None:
return string
}
string = string + timeZoneString
}
return string
}
func dateFromString(string: String) -> NSDate? {
let gregorian = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)!
gregorian.firstWeekday = 2 // Monday
let str = self.convertBasicToExtended(string)
let scanner = NSScanner(string: str)
scanner.charactersToBeSkipped = nil
let dateComponents = NSDateComponents()
// Year
var year = 0
guard scanner.scanInteger(&year) else {
return nil
}
guard year >= 0 && year <= 9999 else {
return nil
}
dateComponents.year = year
// Month or Week
guard scanner.scanString("-", intoString: nil) else {
return gregorian.dateFromComponents(dateComponents)
}
var month = 0
var ordinalDay = 0
switch dateStyle {
case .CalendarLongStyle, .CalendarShortStyle:
guard scanner.scanInteger(&month) else {
return gregorian.dateFromComponents(dateComponents)
}
dateComponents.month = month
case .OrdinalLongStyle, .OrdinalShortStyle:
guard scanner.scanInteger(&ordinalDay) else {
return gregorian.dateFromComponents(dateComponents)
}
let daysArray: [Int]
if ((year % 4) == 0 && (year % 100) != 0) || (year % 400) == 0 {
daysArray = days366
} else {
daysArray = days365
}
var theMonth = 0
for startDay in daysArray {
theMonth++
if startDay > ordinalDay {
month = theMonth - 1
break
}
}
dateComponents.month = month
case .WeekLongStyle, .WeekShortStyle:
guard scanner.scanString("W", intoString: nil) else {
return gregorian.dateFromComponents(dateComponents)
}
var week = 0
guard scanner.scanInteger(&week) else {
return gregorian.dateFromComponents(dateComponents)
}
if week < 0 || week > 53 {
return gregorian.dateFromComponents(dateComponents)
}
dateComponents.weekOfYear = week
}
// Day or DayOfWeek
var day = 0
switch dateStyle {
case .CalendarLongStyle, .CalendarShortStyle:
guard scanner.scanString("-", intoString: nil) else {
return gregorian.dateFromComponents(dateComponents)
}
guard scanner.scanInteger(&day) else {
return gregorian.dateFromComponents(dateComponents)
}
dateComponents.day = day
case .OrdinalLongStyle, .OrdinalShortStyle:
let daysArray: [Int]
if ((year % 4) == 0 && (year % 100) != 0) || (year % 400) == 0 {
daysArray = days366
} else {
daysArray = days365
}
var theDay = 0
var previousStartDay = 0
for startDay in daysArray {
if startDay > ordinalDay {
theDay = ordinalDay - previousStartDay
break
}
previousStartDay = startDay
}
dateComponents.day = theDay
case .WeekLongStyle, .WeekShortStyle:
guard scanner.scanString("-", intoString: nil) else {
return gregorian.dateFromComponents(dateComponents)
}
guard scanner.scanInteger(&day) else {
return gregorian.dateFromComponents(dateComponents)
}
if day < 0 || day > 7 {
return gregorian.dateFromComponents(dateComponents)
} else {
dateComponents.weekday = day
}
}
// Time
guard scanner.scanCharactersFromSet(NSCharacterSet(charactersInString: "T"), intoString: nil) else {
return gregorian.dateFromComponents(dateComponents)
}
// Hour
var hour = 0
guard scanner.scanInteger(&hour) else {
return gregorian.dateFromComponents(dateComponents)
}
if timeStyle != .None {
if hour < 0 || hour > 23 {
return gregorian.dateFromComponents(dateComponents)
} else {
dateComponents.hour = hour
}
}
// Minute
guard scanner.scanString(":", intoString: nil) else {
return gregorian.dateFromComponents(dateComponents)
}
var minute = 0
guard scanner.scanInteger(&minute) else {
return gregorian.dateFromComponents(dateComponents)
}
if timeStyle != .None {
if minute < 0 || minute > 59 {
return gregorian.dateFromComponents(dateComponents)
} else {
dateComponents.minute = minute
}
}
// Second
var scannerLocation = scanner.scanLocation
if scanner.scanString(":", intoString: nil) {
var second = 0
guard scanner.scanInteger(&second) else {
return gregorian.dateFromComponents(dateComponents)
}
if timeStyle != .None {
if second < 0 || second > 59 {
return gregorian.dateFromComponents(dateComponents)
} else {
dateComponents.second = second
}
}
} else {
scanner.scanLocation = scannerLocation
}
// Zulu
scannerLocation = scanner.scanLocation
scanner.scanUpToString("Z", intoString: nil)
if scanner.scanString("Z", intoString: nil) {
dateComponents.timeZone = NSTimeZone(forSecondsFromGMT: 0)
return gregorian.dateFromComponents(dateComponents)
}
// Move back to the end of time
scanner.scanLocation = scannerLocation
// Look for offset
let signs = NSCharacterSet(charactersInString: "+-")
scanner.scanUpToCharactersFromSet(signs, intoString: nil)
var sign: NSString?
guard scanner.scanCharactersFromSet(signs, intoString: &sign) else {
return gregorian.dateFromComponents(dateComponents)
}
// Offset hour
var timeZoneOffset = 0
var timeZoneOffsetHour = 0
var timeZoneOffsetMinute = 0
guard scanner.scanInteger(&timeZoneOffsetHour) else {
return gregorian.dateFromComponents(dateComponents)
}
// Check for colon
let colonExists = scanner.scanString(":", intoString: nil)
if !colonExists && timeZoneOffsetHour > 14 {
timeZoneOffsetMinute = timeZoneOffsetHour % 100
timeZoneOffsetHour = Int(floor(Double(timeZoneOffsetHour) / 100.0))
} else {
scanner.scanInteger(&timeZoneOffsetMinute)
}
timeZoneOffset = (timeZoneOffsetHour * 60 * 60) + (timeZoneOffsetMinute * 60)
dateComponents.timeZone = NSTimeZone(forSecondsFromGMT: timeZoneOffset * (sign == "-" ? -1 : 1))
return gregorian.dateFromComponents(dateComponents)
}
// Private methods
private func checkAndUpdateTimeZone(string: NSMutableString, insertAtIndex index: Int) -> NSMutableString {
if self.timeZoneStyle == .ShortStyle {
string.insertString(":", atIndex: index)
}
return string
}
private func convertBasicToExtended(string: String) -> String {
func checkAndUpdateTimeStyle(var string: NSMutableString, insertAtIndex index: Int) -> NSMutableString {
if (self.timeStyle == .LongStyle) {
string = self.checkAndUpdateTimeZone(string, insertAtIndex: index + 9)
} else if (self.timeStyle == .ShortStyle) {
string = self.checkAndUpdateTimeZone(string, insertAtIndex: index + 7)
string.insertString(":", atIndex: index + 2)
string.insertString(":", atIndex: index)
}
return string
}
var str: NSMutableString = NSMutableString(string: string)
switch self.dateStyle {
case .CalendarLongStyle:
str = checkAndUpdateTimeStyle(str, insertAtIndex: 13)
case .CalendarShortStyle:
str = checkAndUpdateTimeStyle(str, insertAtIndex: 11)
str.insertString("-", atIndex: 6)
str.insertString("-", atIndex: 4)
case .OrdinalLongStyle:
str = checkAndUpdateTimeStyle(str, insertAtIndex: 11)
case .OrdinalShortStyle:
str = checkAndUpdateTimeStyle(str, insertAtIndex: 10)
str.insertString("-", atIndex: 4)
case .WeekLongStyle:
str = checkAndUpdateTimeStyle(str, insertAtIndex: 13)
case .WeekShortStyle:
str = checkAndUpdateTimeStyle(str, insertAtIndex: 11)
str.insertString("-", atIndex: 7)
str.insertString("-", atIndex: 4)
}
return String(str)
}
}
extension NSDate {
func isLeapYear() -> Bool {
let dateComponents = NSCalendar.currentCalendar().components(
[.Year, .Month, .Day, .WeekOfYear, .Hour, .Minute, .Second, .Weekday, .WeekdayOrdinal, .WeekOfYear, .TimeZone],
fromDate: self
)
return ((dateComponents.year % 4) == 0 && (dateComponents.year % 100) != 0) || (dateComponents.year % 400) == 0 ? true : false
}
func dayOfYear() -> Int {
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "D"
return Int(dateFormatter.stringFromDate(self))!
}
func weekOfYear() -> Int {
let gregorian = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)!
gregorian.firstWeekday = 2 // Monday
gregorian.minimumDaysInFirstWeek = 4
let components = gregorian.components([.WeekOfYear, .YearForWeekOfYear], fromDate: self)
let week = components.weekOfYear
return week
}
}
|
[
-1
] |
7b1378586e59dd86b132eeefd2a4d156bc630c92
|
dc9a7b3ccb36330131e57cac768d874927e71547
|
/Core Data Demo/Core Data Demo/AppDelegate.swift
|
101f763958041b3f1503a096db1d2a8a10d236bc
|
[] |
no_license
|
optimistck/LearningSwift
|
c59501109a83761707f310b5ee61b20740ca1368
|
3c4d53346a9ff0b178cc4f43e5f34cf0aedf5124
|
refs/heads/master
| 2021-08-16T10:34:19.449267 | 2017-11-19T16:00:04 | 2017-11-19T16:00:04 | 111,310,166 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,602 |
swift
|
//
// AppDelegate.swift
// Core Data Demo
//
// Created by Constantin on 12/21/16.
// Copyright © 2016 Constantin. All rights reserved.
//
import UIKit
import CoreData
@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:.
// Saves changes in the application's managed object context before the application terminates.
self.saveContext()
}
// MARK: - Core Data stack
lazy var persistentContainer: NSPersistentContainer = {
/*
The persistent container for the application. This implementation
creates and returns a container, having loaded the store for the
application to it. This property is optional since there are legitimate
error conditions that could cause the creation of the store to fail.
*/
let container = NSPersistentContainer(name: "Core_Data_Demo")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
/*
Typical reasons for an error here include:
* The parent directory does not exist, cannot be created, or disallows writing.
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
* The device is out of space.
* The store could not be migrated to the current model version.
Check the error message to determine what the actual problem was.
*/
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
return container
}()
// MARK: - Core Data Saving support
func saveContext () {
let context = persistentContainer.viewContext
if context.hasChanges {
do {
try context.save()
} catch {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
}
}
}
}
|
[
294405,
243717,
163848,
313353,
320008,
320014,
313360,
288275,
322580,
289300,
290326,
329747,
139803,
103964,
322080,
306721,
229408,
296483,
322083,
229411,
306726,
309287,
308266,
292907,
217132,
322092,
40495,
316465,
288306,
322102,
324663,
164408,
308281,
322109,
286783,
315457,
313409,
313413,
349765,
320582,
309832,
288329,
242250,
215117,
196177,
241746,
344661,
231000,
212571,
300124,
287323,
309342,
325220,
306790,
290409,
310378,
296043,
311914,
152685,
334446,
239726,
307310,
322666,
292466,
314995,
307315,
314487,
291450,
314491,
222846,
288383,
318599,
312970,
239252,
311444,
294038,
311449,
323739,
300194,
298662,
233638,
233644,
286896,
295600,
300208,
286389,
294070,
125111,
234677,
321212,
309439,
235200,
284352,
296641,
242371,
302787,
284360,
321228,
319181,
298709,
284374,
189654,
182486,
320730,
241371,
311516,
357083,
179420,
322272,
317665,
298210,
165091,
311525,
288489,
290025,
229098,
307436,
304365,
323310,
125167,
313073,
286455,
306424,
322299,
319228,
302332,
319231,
184576,
309505,
241410,
311043,
366339,
309509,
318728,
125194,
234763,
321806,
125201,
296218,
313116,
237858,
326434,
295716,
313125,
300836,
289577,
125226,
133421,
317233,
241971,
316726,
318264,
201530,
313660,
159549,
287038,
292159,
218943,
182079,
288578,
301893,
234828,
292172,
379218,
300882,
321364,
243032,
201051,
230748,
258397,
294238,
298844,
300380,
291169,
199020,
293741,
266606,
319342,
292212,
313205,
244598,
316788,
124796,
196988,
305022,
317821,
243072,
314241,
303999,
313215,
242050,
325509,
293767,
316300,
306576,
322448,
308114,
319900,
298910,
313250,
308132,
316327,
306605,
316334,
324015,
324017,
200625,
300979,
316339,
322998,
67000,
316345,
296888,
300987,
319932,
310718,
292288,
317888,
323520,
312772,
214980,
298950,
306632,
310733,
289744,
310740,
235994,
286174,
315359,
240098,
323555,
236008,
319465,
248299,
311789,
326640,
188913,
203761,
320498,
314357,
288246,
309243,
300540,
310782
] |
43cfaf2e194af5b9ad323662d548351111e62078
|
021e62880d5785992a36b076fa531821a0373f23
|
/Everest_iOS/views/containers/ContainersPlaceholder.swift
|
4d186d14ab742e3eecf203da1241894e2305ff5b
|
[] |
no_license
|
Piyush-00/everest-ios
|
4c8e1369d90ba33b5b21c0d970b0bbd08e2b4796
|
8845b014882df62d6812a3dab6af54a3f7af4e20
|
refs/heads/master
| 2021-10-11T06:37:12.884452 | 2019-01-23T03:11:50 | 2019-01-23T03:11:50 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 175 |
swift
|
//
// ContainersPlaceholder.swift
// Everest_iOS
//
// Created by Sebastian Kolosa on 2016-10-05.
// Copyright © 2016 Everest. All rights reserved.
//
import Foundation
|
[
-1
] |
7f779716db40673e245899ef818914e4f3589a8b
|
b7715645113c7dcd8adce8928ed1225d9760964a
|
/Fuse/Classes/Fuse.swift
|
ca57d12c46254373a94313f5ce2c1c5f5eeeb094
|
[
"MIT"
] |
permissive
|
hanyuanye/fuse-swift
|
795887c0c219e9d3d29e725f0ef529ce6dbc8ab1
|
89645729189da21a4488c73d26dea80f0039d16a
|
refs/heads/master
| 2020-06-28T14:40:13.511704 | 2019-08-02T17:46:01 | 2019-08-02T17:46:01 | 200,258,091 | 1 | 0 | null | 2019-08-02T15:28:55 | 2019-08-02T15:28:54 | null |
UTF-8
|
Swift
| false | false | 25,054 |
swift
|
//
// Fuse.swift
// Pods
//
// Created by Kirollos Risk on 5/2/17.
//
//
import Foundation
public struct FuseProperty {
let name: String
let weight: Double
public init (name: String) {
self.init(name: name, weight: 1)
}
public init (name: String, weight: Double) {
self.name = name
self.weight = weight
}
}
public protocol Fuseable {
var properties: [FuseProperty] { get }
}
public class Fuse {
private var location: Int
private var distance: Int
private var threshold: Double
private var maxPatternLength: Int
private var isCaseSensitive: Bool
private var tokenize: Bool
public typealias Pattern = (text: String, len: Int, mask: Int, alphabet: [Character: Int])
public typealias SearchResult = (index: Int, score: Double, ranges: [CountableClosedRange<Int>])
public typealias FusableSearchResult = (
index: Int,
score: Double,
results: [(
key: String,
score: Double,
ranges: [CountableClosedRange<Int>]
)]
)
fileprivate lazy var searchQueue: DispatchQueue = { [unowned self] in
let label = "fuse.search.queue"
return DispatchQueue(label: label, attributes: .concurrent)
}()
/// Creates a new instance of `Fuse`
///
/// - Parameters:
/// - location: Approximately where in the text is the pattern expected to be found. Defaults to `0`
/// - distance: Determines how close the match must be to the fuzzy `location` (specified above). An exact letter match which is `distance` characters away from the fuzzy location would score as a complete mismatch. A distance of `0` requires the match be at the exact `location` specified, a `distance` of `1000` would require a perfect match to be within `800` characters of the fuzzy location to be found using a 0.8 threshold. Defaults to `100`
/// - threshold: At what point does the match algorithm give up. A threshold of `0.0` requires a perfect match (of both letters and location), a threshold of `1.0` would match anything. Defaults to `0.6`
/// - maxPatternLength: The maximum valid pattern length. The longer the pattern, the more intensive the search operation will be. If the pattern exceeds the `maxPatternLength`, the `search` operation will return `nil`. Why is this important? [Read this](https://en.wikipedia.org/wiki/Word_(computer_architecture)#Word_size_choice). Defaults to `32`
/// - isCaseSensitive: Indicates whether comparisons should be case sensitive. Defaults to `false`
/// - tokenize: When true, the search algorithm will search individual words **and** the full string, computing the final score as a function of both. Note that when `tokenize` is `true`, the `threshold`, `distance`, and `location` are inconsequential for individual tokens.
public init (location: Int = 0, distance: Int = 100, threshold: Double = 0.6, maxPatternLength: Int = 32, isCaseSensitive: Bool = false, tokenize: Bool = false) {
self.location = location
self.distance = distance
self.threshold = threshold
self.maxPatternLength = maxPatternLength
self.isCaseSensitive = isCaseSensitive
self.tokenize = tokenize
}
/// Creates a pattern tuple.
///
/// - Parameter aString: A string from which to create the pattern tuple
/// - Returns: A tuple containing pattern metadata
public func createPattern (from aString: String) -> Pattern? {
let pattern = self.isCaseSensitive ? aString : aString.lowercased()
let len = pattern.count
if len == 0 {
return nil
}
return (
text: pattern,
len: len,
mask: 1 << (len - 1),
alphabet: FuseUtilities.calculatePatternAlphabet(pattern)
)
}
/// Searches for a pattern in a given string.
///
/// let fuse = Fuse()
/// let pattern = fuse(from: "some text")
/// fuse(pattern, in: "some string")
///
/// - Parameters:
/// - pattern: The pattern to search for. This is created by calling `createPattern`
/// - aString: The string in which to search for the pattern
/// - Returns: A tuple containing a `score` between `0.0` (exact match) and `1` (not a match), and `ranges` of the matched characters. If no match is found will return nil.
public func search(_ pattern: Pattern?, in aString: String) -> (score: Double, ranges: [CountableClosedRange<Int>])? {
guard let pattern = pattern else {
return nil
}
//If tokenize is set we will split the pattern into individual words and take the average which should result in more accurate matches
if tokenize {
//Split this pattern by the space character
let wordPatterns = pattern.text.split(separator: " ").compactMap { createPattern(from: String($0)) }
//Get the result for testing the full pattern string. If 2 strings have equal individual word matches this will boost the full string that matches best overall to the top
let fullPatternResult = _search(pattern, in: aString)
//Reduce all the word pattern matches and the full pattern match into a totals tuple
let results = wordPatterns.reduce(into: fullPatternResult) { (totalResult, pattern) in
let result = _search(pattern, in: aString)
totalResult = (totalResult.score + result.score, totalResult.ranges + result.ranges)
}
//Average the total score by dividing the summed scores by the number of word searches + the full string search. Also remove any range duplicates since we are searching full string and words individually.
let averagedResult = (score: results.score / Double(wordPatterns.count + 1), ranges: Array<CountableClosedRange<Int>>(Set<CountableClosedRange<Int>>(results.ranges)))
//If the averaged score is 1 then there were no matches so return nil. Otherwise return the average result
return averagedResult.score == 1 ? nil : averagedResult
} else {
let result = _search(pattern, in: aString)
//If the averaged score is 1 then there were no matches so return nil. Otherwise return the average result
return result.score == 1 ? nil : result
}
}
//// Searches for a pattern in a given string.
///
/// _search(pattern, in: "some string")
///
/// - Parameters:
/// - pattern: The pattern to search for. This is created by calling `createPattern`
/// - aString: The string in which to search for the pattern
/// - Returns: A tuple containing a `score` between `0.0` (exact match) and `1` (not a match), and `ranges` of the matched characters. If no match is found will return a tuple with score of 1 and empty array of ranges.
private func _search(_ pattern: Pattern, in aString: String) -> (score: Double, ranges: [CountableClosedRange<Int>]) {
var text = aString
if !self.isCaseSensitive {
text = text.lowercased()
}
let textLength = text.count
// Exact match
if (pattern.text == text) {
return (0, [CountableClosedRange<Int>(0...textLength - 1)])
}
let location = self.location
let distance = self.distance
var threshold = self.threshold
var bestLocation: Int? = {
if let index = text.index(of: pattern.text, startingFrom: location) {
return text.distance(from: text.startIndex, to: index)
}
return nil
}()
// A mask of the matches. We'll use to determine all the ranges of the matches
var matchMaskArr = [Int](repeating: 0, count: textLength)
if let bestLoc = bestLocation {
threshold = min(threshold, FuseUtilities.calculateScore(pattern.text, e: 0, x: location, loc: bestLoc, distance: distance))
// What about in the other direction? (speed up)
bestLocation = {
if let index = text.lastIndexOf(pattern.text, position: location + pattern.len) {
return text.distance(from: text.startIndex, to: index)
}
return nil
}()
if let bestLocation = bestLocation {
threshold = min(threshold, FuseUtilities.calculateScore(pattern.text, e: 0, x: location, loc: bestLocation, distance: distance))
}
}
bestLocation = nil
var score = 1.0
var binMax: Int = pattern.len + textLength
var lastBitArr = [Int]()
// Magic begins now
for i in 0..<pattern.len {
// Scan for the best match; each iteration allows for one more error.
// Run a binary search to determine how far from the match location we can stray at this error level.
var binMin = 0
var binMid = binMax
while binMin < binMid {
if FuseUtilities.calculateScore(pattern.text, e: i, x: location, loc: location + binMid, distance: distance) <= threshold {
binMin = binMid
} else {
binMax = binMid
}
binMid = Int(floor((Double(binMax - binMin) / 2) + Double(binMin)))
}
// Use the result from this iteration as the maximum for the next.
binMax = binMid
var start = max(1, location - binMid + 1)
let finish = min(location + binMid, textLength) + pattern.len
// Initialize the bit array
var bitArr = [Int](repeating: 0, count: finish + 2)
bitArr[finish + 1] = (1 << i) - 1
if start > finish {
continue
}
for j in (start...finish).reversed() {
let currentLocation = j - 1
// Need to check for `nil` case, since `patternAlphabet` is a sparse hash
let charMatch: Int = {
if let char = text.char(at: currentLocation) {
if let result = pattern.alphabet[char] {
return result
}
}
return 0
}()
// A match is found
if charMatch != 0 {
matchMaskArr[currentLocation] = 1
}
// First pass: exact match
bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch
// Subsequent passes: fuzzy match
if i > 0 {
bitArr[j] |= (((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1) | lastBitArr[j + 1]
}
if (bitArr[j] & pattern.mask) != 0 {
score = FuseUtilities.calculateScore(pattern.text, e: i, x: location, loc: currentLocation, distance: distance)
// This match will almost certainly be better than any existing match. But check anyway.
if score <= threshold {
// Indeed it is
threshold = score
bestLocation = currentLocation
guard let bestLocation = bestLocation else {
break
}
if bestLocation > location {
// When passing `bestLocation`, don't exceed our current distance from the expected `location`.
start = max(1, 2 * location - bestLocation)
} else {
// Already passed `location`. No point in continuing.
break
}
}
}
}
// No hope for a better match at greater error levels
if FuseUtilities.calculateScore(pattern.text, e: i + 1, x: location, loc: location, distance: distance) > threshold {
break
}
lastBitArr = bitArr
}
return (score, FuseUtilities.findRanges(matchMaskArr))
}
}
extension Fuse {
/// Searches for a text pattern in a given string.
///
/// let fuse = Fuse()
/// fuse.search("some text", in: "some string")
///
/// **Note**: if the same text needs to be searched across many strings, consider creating the pattern once via `createPattern`, and then use the other `search` function. This will improve performance, as the pattern object would only be created once, and re-used across every search call:
///
/// let fuse = Fuse()
/// let pattern = fuse.createPattern(from: "some text")
/// fuse.search(pattern, in: "some string")
/// fuse.search(pattern, in: "another string")
/// fuse.search(pattern, in: "yet another string")
///
/// - Parameters:
/// - text: the text string to search for.
/// - aString: The string in which to search for the pattern
/// - Returns: A tuple containing a `score` between `0.0` (exact match) and `1` (not a match), and `ranges` of the matched characters.
public func search(_ text: String, in aString: String) -> (score: Double, ranges: [CountableClosedRange<Int>])? {
return self.search(self.createPattern(from: text), in: aString)
}
/// Searches for a text pattern in an array of srings
///
/// - Parameters:
/// - text: The pattern string to search for
/// - aList: The list of string in which to search
/// - Returns: A tuple containing the `item` in which the match is found, the `score`, and the `ranges` of the matched characters
public func search(_ text: String, in aList: [String]) -> [SearchResult] {
let pattern = self.createPattern(from: text)
var items = [SearchResult]()
for (index, item) in aList.enumerated() {
if let result = self.search(pattern, in: item) {
items.append((index, result.score, result.ranges))
}
}
return items.sorted { $0.score < $1.score }
}
/// Asynchronously searches for a text pattern in an array of srings.
///
/// - Parameters:
/// - text: The pattern string to search for
/// - aList: The list of string in which to search
/// - chunkSize: The size of a single chunk of the array. For example, if the array has `1000` items, it may be useful to split the work into 10 chunks of 100. This should ideally speed up the search logic. Defaults to `100`.
/// - completion: The handler which is executed upon completion
public func search(_ text: String, in aList: [String], chunkSize: Int = 100, completion: @escaping ([SearchResult]) -> Void) {
let pattern = self.createPattern(from: text)
var items = [SearchResult]()
let group = DispatchGroup()
let count = aList.count
stride(from: 0, to: count, by: chunkSize).forEach {
let chunk = Array(aList[$0..<min($0 + chunkSize, count)])
group.enter()
self.searchQueue.async {
for (index, item) in chunk.enumerated() {
if let result = self.search(pattern, in: item) {
items.append((index, result.score, result.ranges))
}
}
group.leave()
}
}
group.notify(queue: self.searchQueue) {
let sorted = items.sorted { $0.score < $1.score }
DispatchQueue.main.async {
completion(sorted)
}
}
}
/// Searches for a text pattern in an array of `Fuseable` objects.
///
/// Each `FuseSearchable` object contains a `properties` accessor which returns `FuseProperty` array. Each `FuseProperty` is a tuple containing a `key` (the name of the property whose values should be included in the search), and a `weight` (how much "weight" to assign to the score)
///
/// ## Example
///
/// Ensure the object conforms to `Fuseable`. The properties that are searchable need the `dynamic var` attribute in order for these properties to become accessible via reflection:
///
/// class Book: Fuseable {
/// dynamic var name: String
/// dynamic var author: String
///
/// var properties: [FuseProperty] {
/// return [
/// FuseProperty(name: "title", weight: 0.3),
/// FuseProperty(name: "author", weight: 0.7),
/// ]
/// }
/// }
///
/// Searching is straightforward:
///
/// let books: [Book] = [
/// Book(author: "John X", title: "Old Man's War fiction"),
/// Book(author: "P.D. Mans", title: "Right Ho Jeeves")
/// ]
///
/// let fuse = Fuse()
/// let results = fuse.search("Man", in: books)
///
/// - Parameters:
/// - text: The pattern string to search for
/// - aList: The list of `Fuseable` objects in which to search
/// - Returns: A list of `CollectionResult` objects
public func search(_ text: String, in aList: [Fuseable]) -> [FusableSearchResult] {
let pattern = self.createPattern(from: text)
var collectionResult = [FusableSearchResult]()
for (index, item) in aList.enumerated() {
var scores = [Double]()
var totalScore = 0.0
var propertyResults = [(key: String, score: Double, ranges: [CountableClosedRange<Int>])]()
let object = item as AnyObject
item.properties.forEach { property in
let selector = Selector(property.name)
if !object.responds(to: selector) {
return
}
let unretainedValue = object.perform(selector).takeUnretainedValue()
if let value = unretainedValue as? String,
let result = self.search(pattern, in: value) {
let weight = property.weight == 1 ? 1 : 1 - property.weight
let score = (result.score == 0 && weight == 1 ? 0.001 : result.score) * weight
totalScore += score
scores.append(score)
propertyResults.append((key: property.name, score: score, ranges: result.ranges))
}
else if let value = unretainedValue as? [String] {
let results = self.search(text, in: value)
let weight = property.weight == 1 ? 1 : 1 - property.weight
var score: Double = 0
results.forEach { result in
score += (result.score == 0 && weight == 1 ? 0.001 : result.score) * weight
}
totalScore += score
scores.append(score)
propertyResults.append((key: property.name, score: score, ranges: results.flatMap { $0.ranges }))
}
}
if scores.count == 0 {
continue
}
collectionResult.append((
index: index,
score: totalScore / Double(scores.count),
results: propertyResults
))
}
return collectionResult.sorted { $0.score < $1.score }
}
/// Asynchronously searches for a text pattern in an array of `Fuseable` objects.
///
/// Each `FuseSearchable` object contains a `properties` accessor which returns `FuseProperty` array. Each `FuseProperty` is a tuple containing a `key` (the name of the property whose values should be included in the search), and a `weight` (how much "weight" to assign to the score)
///
/// ## Example
///
/// Ensure the object conforms to `Fuseable`. The properties that are searchable need the `dynamic var` attribute in order for these properties to become accessible via reflection:
///
/// class Book: Fuseable {
/// dynamic var name: String
/// dynamic var author: String
///
/// var properties: [FuseProperty] {
/// return [
/// FuseProperty(name: "title", weight: 0.3),
/// FuseProperty(name: "author", weight: 0.7),
/// ]
/// }
/// }
///
/// Searching is straightforward:
///
/// let books: [Book] = [
/// Book(author: "John X", title: "Old Man's War fiction"),
/// Book(author: "P.D. Mans", title: "Right Ho Jeeves")
/// ]
///
/// let fuse = Fuse()
/// fuse.search("Man", in: books, completion: { results in
/// print(results)
/// })
///
/// - Parameters:
/// - text: The pattern string to search for
/// - aList: The list of `Fuseable` objects in which to search
/// - chunkSize: The size of a single chunk of the array. For example, if the array has `1000` items, it may be useful to split the work into 10 chunks of 100. This should ideally speed up the search logic. Defaults to `100`.
/// - completion: The handler which is executed upon completion
public func search(_ text: String, in aList: [Fuseable], chunkSize: Int = 100, completion: @escaping ([FusableSearchResult]) -> Void) {
let pattern = self.createPattern(from: text)
let group = DispatchGroup()
let count = aList.count
var collectionResult = [FusableSearchResult]()
stride(from: 0, to: count, by: chunkSize).forEach {
let chunk = Array(aList[$0..<min($0 + chunkSize, count)])
group.enter()
self.searchQueue.async {
for (index, item) in chunk.enumerated() {
var scores = [Double]()
var totalScore = 0.0
var propertyResults = [(key: String, score: Double, ranges: [CountableClosedRange<Int>])]()
let object = item as AnyObject
item.properties.forEach { property in
let selector = Selector(property.name)
if !object.responds(to: selector) {
return
}
guard let value = object.perform(selector).takeUnretainedValue() as? String else {
return
}
if let result = self.search(pattern, in: value) {
let weight = property.weight == 1 ? 1 : 1 - property.weight
let score = result.score * weight
totalScore += score
scores.append(score)
propertyResults.append((key: property.name, score: score, ranges: result.ranges))
}
}
if scores.count == 0 {
continue
}
collectionResult.append((
index: index,
score: totalScore / Double(scores.count),
results: propertyResults
))
}
group.leave()
}
}
group.notify(queue: self.searchQueue) {
let sorted = collectionResult.sorted { $0.score < $1.score }
DispatchQueue.main.async {
completion(sorted)
}
}
}
}
#if swift(>=4.2)
#else
extension CountableClosedRange: Hashable where Element: Hashable {
public var hashValue: Int { return String(describing: self).hashValue }
}
#endif
|
[
327058,
361483
] |
d225c6f816d339db534e0fe4332d1ae0f3f7b312
|
b676c6f337590facaa01f744069647fe0145c5ac
|
/HeadwayTest/Models/AppModels/ErrorModel.swift
|
68557d50ac3b3d7331021594fbb532c91119c98c
|
[] |
no_license
|
pkseniia/HeadwayTest
|
8d5fb26385b467b393bcacc42eb6d8c5c87c303a
|
25599ab3e677cf77ca5ae18dbef5ed7b146383c3
|
refs/heads/master
| 2023-01-23T17:07:44.309374 | 2020-11-12T15:37:45 | 2020-11-12T15:37:45 | 311,391,546 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 877 |
swift
|
//
// ErrorModel.swift
// HeadwayTest
//
// Created by Kseniia Poternak on 11.11.2020.
//
import Foundation
protocol ErrorCreatable {
init?(status: ErrorStatus, error: Error?)
}
enum ErrorStatus {
case login
case search
var message: String {
switch self {
case .login: return AppConstants.Errors.wrongCredentials
case .search: return AppConstants.Errors.mayBad
}
}
}
struct ErrorModel: Error {
var title: String = AppConstants.Errors.error
var message: String
}
extension ErrorModel: ErrorCreatable {
init?(status: ErrorStatus, error: Error? = nil) {
if let error = error as NSError? {
self.message = error.code == -1009 ?
AppConstants.Errors.noInternet : status.message
} else {
self.message = AppConstants.Errors.oops
}
}
}
|
[
-1
] |
eea0eefe4da2668da8fb615d8db09009ce14f508
|
bccf00f72f136ac6a723336f6e032dba98bb63c0
|
/tabbar/ViewController.swift
|
5af34a85c17232f0de5eb568c820780f13fa579e
|
[] |
no_license
|
brawman/ios_tutorial_tabbar
|
8d2a468b7fbab1198eb0b7937010b4a5f9fa8220
|
378f33e5d490a3955d97919e68f3a029c1e0feb0
|
refs/heads/master
| 2020-06-24T06:05:58.583834 | 2019-07-25T17:07:33 | 2019-07-25T17:07:33 | 198,872,887 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 334 |
swift
|
//
// ViewController.swift
// tabbar
//
// Created by Hue Woon Kim on 26/07/2019.
// Copyright © 2019 Hue Woon Kim. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
|
[
262528,
385282,
398203,
325510,
324104,
329869,
336142,
158612,
393749,
245530,
319899,
318109,
324512,
155424,
262561,
345378,
396707,
436128,
333223,
354729,
242346,
316331,
125227,
273710,
380334,
372017,
324018,
262453,
316346,
244411,
354108,
294845,
397117,
323268,
262471,
323016,
326600,
349130,
340943,
330960,
316626,
324564,
146645,
257750,
377048,
313182,
354654,
362847,
326241,
354144,
398308,
321253,
253928,
124914,
349174,
381179
] |
fcf617b66e8b99cf29f3771fc9aa99aa1dc10a13
|
6c8e527a7ee9449e02684de07e08f6eaaecfde28
|
/ToDoRedux/Views/MainViewController.swift
|
147a23e3f91080bff9b25fcb3b06bad488ce8b21
|
[] |
no_license
|
stasuwe/todo-redux
|
10c531e17e9163e9ea3869b9784bf66395f6558b
|
2cb1446864a90fe855a2db33e7620e1dfb9ec90b
|
refs/heads/master
| 2021-01-23T12:05:51.348100 | 2017-09-19T21:15:44 | 2017-09-19T21:15:44 | 102,646,326 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 5,958 |
swift
|
//
// MainViewController.swift
// ToDoRedux
//
// Created by Sarychev Stanislav on 06.09.17.
// Copyright © 2017 LLC «Globus Media». All rights reserved.
//
import UIKit
import ReSwift
class MainViewController: UITableViewController, StoreSubscriber {
private var todos: [ToDo] = []
private let cellIdentifier: String = "todoCell"
@IBOutlet var tableEmptyView: UIView!
private lazy var addTodoController: UIAlertController = {
let alertController = UIAlertController(title: "What do You want to do?", message: nil, preferredStyle: .alert)
alertController.addTextField {
$0.placeholder = "Enter text here"
}
let doneAction = UIAlertAction(title: "Add", style: .default) { _ in
guard let todoText = alertController.textFields?.first?.text,
!todoText.isEmpty else { return }
Redux.store.dispatch(TodoActionCreators.add(todo: ToDo(text: todoText)))
alertController.textFields?.first?.text = ""
}
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)
alertController.addAction(doneAction)
alertController.addAction(cancelAction)
return alertController
}()
private lazy var sortController: UIAlertController = {
let alertController = UIAlertController(title: "How should I sort todos?", message: nil, preferredStyle: .actionSheet)
let completed = UIAlertAction(title: "Completed", style: .default) { _ in
Redux.store.dispatch(SortingActions.ChangeSortingType(sortingType: .completed))
}
let uncompleted = UIAlertAction(title: "Uncompleted", style: .default) { _ in
Redux.store.dispatch(SortingActions.ChangeSortingType(sortingType: .uncompleted))
}
let date = UIAlertAction(title: "Date", style: .default) { _ in
Redux.store.dispatch(SortingActions.ChangeSortingType(sortingType: .date))
}
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)
alertController.addAction(completed)
alertController.addAction(uncompleted)
alertController.addAction(date)
alertController.addAction(cancelAction)
return alertController
}()
private func showError(with message: String) {
let alertController = UIAlertController(title: "Error!", message: message, preferredStyle: .alert)
let cancelAction = UIAlertAction(title: "Ok", style: .cancel)
alertController.addAction(cancelAction)
present(alertController, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 44
let refreshControl = UIRefreshControl()
refreshControl.addTarget(self, action: #selector(refresh(_:)), for: .valueChanged)
tableView.refreshControl = refreshControl
Redux.store.dispatch(TodoActionCreators.loadTodos())
}
func refresh(_ senfer: UIRefreshControl) {
Redux.store.dispatch(TodoActionCreators.loadTodos())
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
Redux.store.subscribe(self)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
Redux.store.unsubscribe(self)
}
func newState(state: ApplicationState) {
if let error = state.todosState.loadingError {
showError(with: error.localizedDescription)
} else {
todos = state.todosState.todos
.filter { !$0.isArchived }
.sorted(by: {
switch state.sortingState.sortingType {
case .completed:
return !$0.isCompleted
case .uncompleted:
return $0.isCompleted
case .date:
return $0.date > $1.date
}
})
DispatchQueue.main.async {
self.tableView.tableFooterView = self.todos.isEmpty ? self.tableEmptyView : UIView()
self.tableView.reloadData()
self.tableView.refreshControl?.endRefreshing()
}
}
}
@IBAction func addToDoButton(_ sender: UIBarButtonItem) {
present(addTodoController, animated: true)
}
@IBAction func sortButton(_ sender: UIBarButtonItem) {
present(sortController, animated: true)
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return todos.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath)
let todoItem = todos[indexPath.row]
let attributedText = NSMutableAttributedString(string: todoItem.text)
if todoItem.isCompleted {
attributedText.addAttribute(NSStrikethroughStyleAttributeName,
value: 2,
range: NSMakeRange(0, attributedText.length))
}
cell.textLabel?.attributedText = attributedText
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
cell.detailTextLabel?.text = dateFormatter.string(from: todoItem.date)
cell.detailTextLabel?.textColor = todoItem.isCompleted ? .gray : .black
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let selectedTodo = todos[indexPath.row]
Redux.store.dispatch(TodoActionCreators.toggleCompleted(todo: selectedTodo))
tableView.deselectRow(at: indexPath, animated: false)
}
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return todos[indexPath.row].isCompleted
}
override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
let archiveAction = UITableViewRowAction(style: .normal, title: "Archive") { _ , indexPath in
let todo = self.todos[indexPath.row]
Redux.store.dispatch(TodoActionCreators.archive(todo: todo))
}
return [archiveAction]
}
}
|
[
-1
] |
6f06b090d1a6b64a612787e60275936971e25460
|
8dbfb0d430569b6063810aca85f9fddd9bc18272
|
/validation-test/Evolution/test_class_change_stored_to_observed.swift
|
37cb2f047f86747df83c6f130c7162352c9fa9e6
|
[
"Apache-2.0",
"Swift-exception"
] |
permissive
|
ye-man/swift
|
008587e308f9490e638e27961194fece438824cc
|
9cb7ab18961b6f2c93feba4b71d3c12cfacbcbba
|
refs/heads/master
| 2020-05-26T14:30:12.275094 | 2019-05-23T15:38:33 | 2019-05-23T15:38:33 | 188,264,993 | 1 | 1 |
Apache-2.0
| 2019-05-23T15:54:11 | 2019-05-23T15:54:11 | null |
UTF-8
|
Swift
| false | false | 642 |
swift
|
// RUN: %target-resilience-test
// REQUIRES: executable_test
// Use swift-version 4.
// UNSUPPORTED: swift_test_mode_optimize_none_with_implicit_dynamic
import StdlibUnittest
import class_change_stored_to_observed
var ChangeStoredToObservedTest = TestSuite("ChangeStoredToObserved")
ChangeStoredToObservedTest.test("ChangeStoredToObserved") {
let t = ChangeStoredToObserved()
t.friend = "dog"
t.friend = "pony"
t.friend = "chicken"
if getVersion() == 0 {
expectEqual([], t.friends)
expectEqual(0, t.count)
} else {
expectEqual(["cat", "dog", "pony"], t.friends)
expectEqual(3, t.count)
}
}
runAllTests()
|
[
-1
] |
ce7cbd3d75ee6dd3f05fa60006be820c82abf4a9
|
db3320f6fbdda276f9dae445c127760ae3ace5cd
|
/Week4/ComparisonShopper/ComparisonShopper/AppDelegate.swift
|
77972108f2890932f871b2f95f4e0aeff9eb3fa2
|
[
"MIT"
] |
permissive
|
byaruhaf/RWiOSBootcamp
|
1a9d4265d56296b5ac536d9e00c9bf8482bb3690
|
2056a2f34128bdc5d15908257aa5a49a45baee80
|
refs/heads/main
| 2022-11-29T08:05:13.781627 | 2020-08-13T11:51:27 | 2020-08-13T11:51:27 | 266,933,174 | 7 | 2 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,719 |
swift
|
//
// AppDelegate.swift
// ComparisonShopper
//
// Created by Jay Strawn on 6/15/20.
// Copyright © 2020 Jay Strawn. All rights reserved.
//
import UIKit
import CoreData
@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.
}
// MARK: - Core Data stack
lazy var persistentContainer: NSPersistentContainer = {
/*
The persistent container for the application. This implementation
creates and returns a container, having loaded the store for the
application to it. This property is optional since there are legitimate
error conditions that could cause the creation of the store to fail.
*/
let container = NSPersistentContainer(name: "ComparisonShopper")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
/*
Typical reasons for an error here include:
* The parent directory does not exist, cannot be created, or disallows writing.
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
* The device is out of space.
* The store could not be migrated to the current model version.
Check the error message to determine what the actual problem was.
*/
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
return container
}()
// MARK: - Core Data Saving support
func saveContext () {
let context = persistentContainer.viewContext
if context.hasChanges {
do {
try context.save()
} catch {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
}
}
}
}
|
[
199680,
379906,
253443,
418820,
249351,
328199,
384007,
379914,
372747,
199180,
377866,
326668,
329233,
350738,
186387,
349202,
262677,
330774,
324121,
245274,
377371,
345630,
384032,
362529,
349738,
394795,
404523,
262701,
245293,
349744,
361524,
337975,
343609,
375867,
333373,
418366,
152127,
339009,
413250,
214087,
352840,
377930,
337994,
370253,
330319,
200784,
173647,
436306,
333395,
244308,
374358,
329815,
254042,
402522,
326239,
322658,
340579,
244329,
333422,
349295,
204400,
173169,
339571,
330868,
344693,
268921,
343167,
192639,
344707,
330884,
336516,
266374,
385670,
346768,
268434,
409236,
333988,
336548,
379048,
377001,
356520,
361644,
402614,
361655,
325308,
339132,
343231,
403138,
337092,
244933,
322758,
337606,
367816,
257738,
342736,
245460,
257751,
385242,
366300,
165085,
350433,
345826,
395495,
363755,
346348,
343276,
325358,
338158,
212722,
251122,
350453,
338679,
393465,
351482,
264961,
115972,
268552,
346890,
362251,
328460,
333074,
356628,
257814,
333592,
397084,
342813,
257824,
362272,
377120,
334631,
389416,
336680,
384298,
254252,
204589,
271150,
366383,
328497,
257842,
339768,
326969,
384828,
386365,
204606,
375615,
257852,
339792,
358737,
389970,
361299,
155476,
366931,
257880,
330584,
361305,
362843,
429406,
374112,
353633,
439137,
355184,
361333,
332156,
337277,
260992,
245120,
380802,
389506,
264583,
337290,
155020,
337813,
348565,
250262,
155044,
333221,
373671,
333736,
252845,
356781,
288174,
268210,
370610,
210356,
342452,
370102,
338362,
327612,
358335,
380352,
201157,
187334,
333766,
339400,
347081,
349128,
358347,
336325,
393670,
272848,
379856,
155603,
219091,
399317,
249302,
379863,
372697,
155102,
329182,
182754,
360429,
338927,
330224,
379895,
201723,
257020,
254461
] |
a28870d201e34703fc92c705ff1935cb90771fc6
|
adb4f20480b0319fb2247217e1f28763bccda252
|
/RestaurantApp/Screen/List/RestaurantTableViewController.swift
|
d1c9ff78a419c9d61a3b94ac504790f2e3b7f3f8
|
[] |
no_license
|
acherbert/FirstCoast-
|
305268cc753458bfda1d5780a9655575a2b6e5ad
|
95ab497df4a7ed84883701f437b17c3967dee515
|
refs/heads/master
| 2020-09-26T07:26:37.483603 | 2019-12-05T23:02:40 | 2019-12-05T23:02:40 | 226,203,440 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,512 |
swift
|
//Ashley Herbert 2019C capstone
import UIKit
protocol ListActions: class {
func didTapCell(_ viewController: UIViewController, viewModel: RestaurantListViewModel)
}
class RestaurantTableViewController: UITableViewController {
var viewModels = [RestaurantListViewModel]() {
didSet {
tableView.reloadData()
}
}
weak var delegete: ListActions?
override func viewDidLoad() {
super.viewDidLoad()
}
// MARK: - Table view data source
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return viewModels.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "RestaurantCell", for: indexPath) as! RestaurantTableViewCell
let vm = viewModels[indexPath.row]
cell.configure(with: vm)
return cell
}
// MARK: - Delegate
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
guard let detailsViewController = storyboard?.instantiateViewController(withIdentifier: "DetailsViewController") else { return }
navigationController?.pushViewController(detailsViewController, animated: true)
let vm = viewModels[indexPath.row]
delegete?.didTapCell(detailsViewController, viewModel: vm)
}
}
|
[
250928
] |
f42be5f8e7662869c9f1bec94b65f61370366785
|
f6525b9dfff2a1601ccaeb9890137542c4c4680e
|
/Wine Flight/Wine Flight/Controllers/ViewControllers/Store/WineCategoryViewController 2.swift
|
604665f17f769279c4b4d89caa481bcdcd4f908c
|
[] |
no_license
|
bloominstituteoftechnology/ios-pt7-bw4-team1
|
86fc4e11706b2e7eac28885c1db2fb01baf306d7
|
f328e9a623c6c08a6f8e03eee4a680b639e04317
|
refs/heads/main
| 2023-02-15T08:29:12.203797 | 2021-01-12T04:06:55 | 2021-01-12T04:09:18 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,388 |
swift
|
//
// WineCategoryViewController.swift
// Wine Flight
//
// Created by James McDougall on 1/7/21.
//
import UIKit
class WineCategoryViewController: UIViewController {
@IBOutlet weak var wineCategoryCollectionView: UICollectionView!
let wineCategoryCell = "WineCategoryCell"
var wineCategoryController = WineCategoryController()
var customUI = CustomUI()
override func viewDidLoad() {
super.viewDidLoad()
wineCategoryCollectionView.delegate = self
wineCategoryCollectionView.dataSource = self
}
}
extension WineCategoryViewController: UICollectionViewDelegate {
}
extension WineCategoryViewController: UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return wineCategoryController.wines.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
guard let wineCell = wineCategoryCollectionView.dequeueReusableCell(withReuseIdentifier: wineCategoryCell, for: indexPath) as? WineCategoryCollectionViewCell else { return UICollectionViewCell() }
let wineSelection = wineCategoryController.wines[indexPath.item]
wineCell.wineCategory = wineSelection
return wineCell
}
}
|
[
-1
] |
3f7b290d396d2e7538fcdd4e7b5aad9ab906f11d
|
24da5a02a8d15f9429154e2a12fbca8a126973f7
|
/PruebaIOSGrabity/ListaCellController.swift
|
4ac8c085ede60d1a335698dd71b8e9a40335ac9f
|
[] |
no_license
|
Lordviril/PruebaIOSGrabity
|
636060f910b025e8cdb61c0f6b02b7a9eb24a2de
|
dd855c516846bfb709c03c812134aa15f23aea5b
|
refs/heads/master
| 2021-01-10T16:56:23.553640 | 2015-12-01T16:13:10 | 2015-12-01T16:13:10 | 46,911,122 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,092 |
swift
|
//
// DomiciliosListaDeProductosCellController.swift
// VillavoIN
//
// Created by Pedro Alonso Daza Balaguera on 16/07/15.
// Copyright (c) 2015 Pedro Alonso Daza Balaguera. All rights reserved.
//
/*
import UIKit
class DomiciliosListaDeProductosCellController: UITableViewCell {
@IBOutlet weak var imProducto: UIImageView!
@IBOutlet weak var lbNombre: UILabel!
@IBOutlet weak var lbPrecio: UILabel!
func Productos(Nombre:String, Precio:String, Imagen:UIImage ) {
}
}*/
import UIKit
class ListaCellController: UITableViewCell {
@IBOutlet weak var lbNombreAplicacion: UILabel!
@IBOutlet weak var lbNombreDesarrollador: UILabel!
@IBOutlet weak var imAplicacion: UIImageView!
func Aplicacion(NombreAplicacion:String, NombreDesarrollador:String, Imagen:UIImage ) {
lbNombreAplicacion.text = NombreAplicacion
lbNombreDesarrollador.text = NombreDesarrollador
let data = Imagen //make sure your image in this url does exist, otherwise unwrap in a if let check
imAplicacion.image = data//UIImage(data: data)
}
}
|
[
-1
] |
088d0dbd08456ff93d78b74591ca46eb71551a9e
|
19984b0cb8e803b413230d6158f080bff0792374
|
/ImagePlacer/ImagePlacer/Cache/Cache.swift
|
e74e07a38678ac378543de1681892cc0ad2b7760
|
[
"MIT"
] |
permissive
|
vishnu-J/ImagePlacer
|
7eb7dc460ca96d6fe21a03bfcefb7779b4405aa5
|
aab19940852022ae089f1cba8e3c835c4a8f04cb
|
refs/heads/master
| 2020-11-23T18:52:18.917831 | 2020-01-07T11:15:06 | 2020-01-07T11:15:06 | 211,483,682 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,579 |
swift
|
//
// Cache.swift
// Image_Loading_Library
//
// Created by Vishnu on 30/09/19.
// Copyright © 2019 GreedyGame. All rights reserved.
//
import Foundation
import UIKit
class Cache : NSObject{
lazy var memorylevelCache = MemoryCache()
private static var instance : Cache?
public static func sharedInstance() -> Cache{
if instance == nil{
instance = Cache()
}
return instance!
}
private override init() {
super.init()
}
/*init(builder : Builder) {
cacheAction(builder: builder)
}*/
func cacheAction(cacheType:CacheType, url:String, image:UIImage){
switch cacheType {
case .Memory:
print("Cached in Memory")
self.memorylevelCache.set(url: url, for: image)
case .Disk:
print("Cached in Disk")
default:
print("No Cache")
}
}
/*public class Builder{
fileprivate var type : CacheType?
fileprivate var url : String?
fileprivate var image : UIImage?
func cacheType(type : CacheType) -> Builder{
self.type = type
return self
}
func cacheUrl(url:String) -> Builder {
self.url = url
return self
}
func cacheImage(image:UIImage) -> Builder {
self.image = image
return self
}
func build() -> Cache {
return Cache(builder: self)
}
}*/
}
|
[
-1
] |
db93eed7b714b8a9d2fc15631db4cceb9b04fd65
|
665a6887d3ad2e60ff6bedb34ecdcd9f40c92596
|
/Eventful/Eventful/Controllers/MainHomeFeed/MenuFeed/FinalCategoryEventCell.swift
|
961563a84718d0f399de002ed4e24fe22350ec2b
|
[] |
no_license
|
DivakarSwift/EventfulApp1
|
1b618956360c49ca51702b189befde835f0a6b77
|
e17eb126b9bab87bc80de58ef3b8393ba28eadb7
|
refs/heads/master
| 2020-04-03T17:50:40.033127 | 2018-10-13T14:19:12 | 2018-10-13T14:19:12 | 155,460,973 | 1 | 0 | null | 2018-10-30T21:51:43 | 2018-10-30T21:51:43 | null |
UTF-8
|
Swift
| false | false | 3,366 |
swift
|
//
// FinalCategoryEventCell.swift
// Eventful
//
// Created by Shawn Miller on 8/30/18.
// Copyright © 2018 Make School. All rights reserved.
//
import UIKit
class FinalCategoryEventCell: UICollectionViewCell {
var event: Event? {
didSet{
guard let currentEvent = event else {
return
}
guard URL(string: currentEvent.currentEventImage) != nil else { return }
backgroundImageView.loadImage(urlString: currentEvent.currentEventImage)
eventNameLabel.text = currentEvent.currentEventName.capitalized
let dateComponets = getDayAndMonthFromEvent(currentEvent)
eventDateLabel.text = dateComponets.0 + " "+dateComponets.1 + " "+dateComponets.2
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setupViews()
}
let eventNameLabel : UILabel = {
let eventNameLabel = UILabel()
eventNameLabel.font = UIFont(name:"NoirPro-Medium", size: 15.0)
eventNameLabel.textAlignment = .left
eventNameLabel.lineBreakMode = .byTruncatingTail
eventNameLabel.text = eventNameLabel.text?.uppercased()
return eventNameLabel
}()
let eventDateLabel : UILabel = {
let eventDateLabel = UILabel()
eventDateLabel.textColor = UIColor.rgb(red: 132, green: 132, blue: 132)
eventDateLabel.font = UIFont(name:"NoirPro-Regular", size: 13.0)
eventDateLabel.textAlignment = .left
eventDateLabel.adjustsFontSizeToFitWidth = true
eventDateLabel.text = eventDateLabel.text?.uppercased()
return eventDateLabel
}()
public var backgroundImageView: CustomImageView = {
let firstImage = CustomImageView()
firstImage.setupShadow2()
firstImage.contentMode = .scaleToFill
return firstImage
}()
@objc func setupViews(){
addSubview(backgroundImageView)
addSubview(eventDateLabel)
addSubview(eventNameLabel)
backgroundImageView.snp.makeConstraints { (make) in
make.top.equalTo(self.snp.top)
make.left.right.equalTo(self)
make.height.equalTo(180)
}
eventDateLabel.snp.makeConstraints { (make) in
make.top.equalTo(backgroundImageView.snp.bottom).offset(5)
make.left.right.equalTo(self)
make.height.equalTo(20)
}
eventNameLabel.snp.makeConstraints { (make) in
make.top.equalTo(eventDateLabel.snp.bottom).offset(5)
make.left.right.equalTo(self)
make.height.equalTo(20)
}
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
fileprivate func getDayAndMonthFromEvent(_ event:Event) -> (String, String, String) {
let apiDateFormat = "MM/dd/yyyy"
let df = DateFormatter()
df.dateFormat = apiDateFormat
let eventDate = df.date(from: event.currentEventDate!)!
df.dateFormat = "dd"
let dayElement = df.string(from: eventDate)
df.dateFormat = "MMM"
let monthElement = df.string(from: eventDate)
df.dateFormat = "yyyy"
let yearElement = df.string(from: eventDate)
return (dayElement, monthElement, yearElement)
}
}
|
[
-1
] |
9f84f985f7c742f7d136dee81550297b0e7bec90
|
78a40df48bb03908c00e53ce4286a4b85d37aeab
|
/ReactivePractice/ReactiveColors/SecondViewControllerViewModel.swift
|
43ae597dded02cac81ecd4bd84ced2ccec703dac
|
[] |
no_license
|
Marcel324/ReactivePractice
|
4c666ddc53a70baea43598e65f7142dfc323701b
|
c5e8ecabca0ae7a3e3430717f158eb9bf879eccb
|
refs/heads/master
| 2021-08-24T07:20:04.271372 | 2017-12-08T16:06:49 | 2017-12-08T16:06:49 | 113,591,248 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,063 |
swift
|
//
// SecondViewControllerViewModel.swift
// ReactivePractice
//
// Created by Marcel Chaucer on 12/7/17.
// Copyright © 2017 Marcel Chaucer. All rights reserved.
//
import Foundation
import ReactiveSwift
import Result
import ReactiveCocoa
class SecondViewControllerViewModel: NSObject {
var firstNameTextFieldText = MutableProperty<String?>("")
var lastNameTextFieldText = MutableProperty<String?>("")
var phoneNumberTextFieldText = MutableProperty<String?>("")
var emailTextFieldText = MutableProperty<String?>("")
var isEnabled = MutableProperty<Bool>(false)
override init() {
super.init()
buttonEnabled()
}
func buttonEnabled() {
self.isEnabled <~
SignalProducer.combineLatest(self.firstNameTextFieldText, self.lastNameTextFieldText, self.phoneNumberTextFieldText, self.emailTextFieldText).map { (firstName, lastName, phoneNumber, email) in
return !firstName!.isEmpty && !lastName!.isEmpty && !phoneNumber!.isEmpty && !email!.isEmpty
}
}
}
|
[
-1
] |
be7c92198ecfb3db72db5e153d7f2f30cfe5a123
|
3a54b5496adadf3eaad5d82bb000875b2f9bba56
|
/ShareAnIftar/ViewController.swift
|
36799f1b7bfbf18cad2576edecef4809e5bd1169
|
[] |
no_license
|
QBSSoftware123/ShareAnIftar_iOS
|
1b82e4686680d4f28e68da6e4354221d14942727
|
31e03710ec27e8631dd81dcd7adf097f198b2ec7
|
refs/heads/master
| 2021-01-18T20:45:10.966043 | 2018-05-24T05:23:38 | 2018-05-24T05:23:38 | 86,987,930 | 0 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 509 |
swift
|
//
// ViewController.swift
// ShareAnIftar
//
// Created by Tauqeer Ahmed Khan on 02/04/17.
// Copyright © 2017 QBS. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
|
[
307212,
278543,
317473,
292915,
286775,
237624,
288827,
290875,
286786,
284740,
159812,
243786,
286796,
278606,
237655,
307288,
200802,
309347,
309349,
309351,
309353,
356460,
307311,
292990,
278657,
276612,
280710,
303242,
311437,
278675,
307353,
299165,
278693,
100521,
307379,
280760,
184504,
280770,
227523,
280772,
280775,
313550,
276686,
229585,
307410,
278749,
280797,
301284,
280808,
280810,
286963,
280821,
286965,
280826,
280832,
276736,
309506,
278791,
287004,
287007,
282917,
233767,
176436,
307516,
278845,
289088,
311624,
287055,
289112,
233817,
311645,
289120,
289121,
227688,
313706,
299374,
199024,
276849,
280947,
313733,
233869,
283032,
283034,
283035,
283036,
227740,
285087,
289187,
289190,
289191,
305577,
289196,
305582,
285103,
278968,
127418,
293308,
278973,
289224,
279011,
281078,
236022,
233980,
287231,
279041,
279046,
215562,
281107,
279064,
236057,
281118,
289318,
293418,
309807,
281142,
279096,
234043,
277057,
129604,
301637,
158285,
311913,
281202,
277108,
287350,
117399,
228000,
295586,
287399,
277171,
299709,
285377,
285378,
199365,
287437,
299727,
226009,
277224,
199402,
234223,
312049,
289524,
226038,
234232,
230147,
226055,
299786,
295696,
295699,
281373,
228127,
281380,
152356,
234279,
283433,
293682,
285495,
289596,
283453,
279360,
289600,
293700,
283461,
295766,
308064,
293742,
162672,
277364,
207738,
291709,
303998,
183173,
304008,
324491,
304012,
234380,
304015,
226196,
277406,
289697,
234402,
291755,
297903,
324528,
230323,
234423,
230328,
277432,
293816,
281530,
291774,
295874,
299973,
234465,
168936,
289771,
183278,
277487,
293874,
293875,
293888,
277508,
277512,
275466,
234511,
300057,
197664,
304174,
300086,
234551,
300089,
238653,
293961,
300107,
203858,
300116,
281703,
296042,
277612,
164974,
312433,
300149,
189557,
234619,
285837,
226447,
234641,
349332,
302235,
285855,
234665,
283839,
277696,
228551,
279751,
279754,
230604,
298189,
302286,
230608,
290004,
290006,
189655,
302295,
298202,
298206,
363743,
298211,
290020,
228585,
304368,
120054,
292102,
177417,
312586,
296216,
130346,
300358,
238920,
234829,
296272,
230737,
230745,
306540,
300400,
333179,
290175,
275842,
224643,
298375,
300432,
226705,
310673,
304531,
304536,
304540,
288165,
304550,
304551,
144811,
370093,
286126,
277935,
279982,
282035,
292277,
296374,
130487,
144822,
292280,
306633,
288205,
286158,
280015,
310734,
286162,
163289,
280030,
280031,
286175,
286189,
282095,
308721,
302580,
310773,
296436,
290299,
288251,
290303,
296451,
294411,
290322,
290323,
286234,
284192,
294433,
282145,
284197,
296487,
286249,
296489,
226878,
288321,
228932,
226887,
284235,
284236,
288331,
284239,
284240,
226896,
284242,
292435,
212561,
300629,
276054,
228945,
280146,
212573,
40545,
284261,
306791,
286314,
284275,
314996,
284277,
294518,
276087,
284279,
292478,
284287,
284289,
284298,
278157,
282262,
280219,
284315,
284317,
282270,
282275,
284323,
284328,
198315,
313007,
284336,
302767,
284341,
286390,
300727,
276150,
282301,
296638,
302788,
282311,
294600,
284361,
239310,
282320,
317137,
239314,
284373,
282329,
282338,
284391,
282346,
358127,
282357,
288501,
358139,
282365,
286462,
282368,
358147,
282377,
300817,
282389,
282393,
278298,
329499,
276256,
315170,
282403,
304933,
282411,
159541,
282426,
288579,
307029,
241499,
188253,
292701,
296811,
315250,
284534,
292730,
284570,
294812,
284574,
284576,
284577,
284580,
284586,
276396,
282548,
296901,
165832,
301012,
301016,
292824,
294877,
294889,
298989,
231405,
227315,
237556
] |
06f02c191eba6f83bdcf1a7f4ffb7a60dde260aa
|
bd87e661c8b18bd8f9bc8408e7c01d0a34b0d8f6
|
/BasicCalculator/BasicCalculatorTests/BasicCalculatorTests.swift
|
52f179b2ae0761ebb6a2df755361022fbf86ecca
|
[] |
no_license
|
BrettFX/BasicCalculator-iOS
|
b82847387f93aa9178ab084c35b4405585cfbedf
|
32d26738037943d41de4adceaf2d69b1104c85c4
|
refs/heads/master
| 2021-01-01T17:36:06.541832 | 2017-08-15T22:13:39 | 2017-08-15T22:13:39 | 98,112,138 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,001 |
swift
|
//
// BasicCalculatorTests.swift
// BasicCalculatorTests
//
// Created by Brett Allen on 7/23/17.
// Copyright © 2017 Brett Allen. All rights reserved.
//
import XCTest
@testable import BasicCalculator
class BasicCalculatorTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
|
[
360462,
229413,
204840,
344107,
155694,
229424,
229430,
163896,
180280,
376894,
286788,
352326,
311372,
311374,
196691,
385116,
237663,
254048,
319591,
131178,
221290,
278638,
319598,
204916,
131191,
131198,
319629,
311438,
278677,
196760,
426138,
278691,
377009,
278708,
131256,
180408,
295098,
139479,
229597,
311519,
205035,
327929,
344313,
147717,
368905,
278797,
254226,
319763,
368916,
262421,
377114,
237856,
237857,
278816,
311597,
98610,
180535,
336183,
278842,
287041,
287043,
319813,
139589,
344401,
377169,
368981,
155990,
278869,
368984,
106847,
98657,
270701,
270706,
246136,
139640,
311681,
311685,
106888,
385417,
311691,
385422,
213403,
246178,
385454,
311727,
377264,
319930,
311738,
33211,
336320,
311745,
278978,
254406,
188871,
278989,
278993,
278999,
328152,
369116,
287198,
279008,
279013,
279018,
311786,
319981,
319987,
279029,
254456,
377338,
279039,
377343,
254465,
279050,
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,
311941,
336518,
279177,
311945,
369289,
344715,
311949,
287374,
377489,
311954,
352917,
230040,
271000,
377497,
303771,
377500,
295576,
205471,
344738,
139939,
279206,
287404,
295599,
205487,
303793,
336564,
164533,
230072,
287417,
287422,
377539,
287433,
287439,
164560,
385747,
279252,
361176,
418520,
287452,
295652,
279269,
246503,
369385,
230125,
312047,
312052,
230134,
172792,
344827,
221948,
279294,
205568,
295682,
197386,
434957,
312079,
295697,
426774,
197399,
426775,
197411,
279336,
295724,
312108,
197422,
353070,
164656,
295729,
230199,
197431,
336702,
295744,
279362,
295746,
353109,
377686,
230234,
189275,
435039,
295776,
303972,
385893,
279397,
230248,
246641,
246643,
295798,
246648,
361337,
254850,
369538,
58253,
295824,
189348,
353195,
140204,
377772,
304051,
230332,
377790,
353215,
213957,
213960,
345033,
279498,
386006,
304087,
418776,
50143,
123881,
320493,
287731,
271350,
295927,
312314,
328700,
328706,
410627,
320516,
295942,
386056,
353290,
377869,
320527,
238610,
418837,
140310,
197657,
369701,
238639,
312373,
238651,
377926,
214086,
238664,
296019,
353367,
304222,
230499,
173166,
312434,
377972,
353397,
337017,
377983,
402565,
386189,
296086,
238743,
296092,
238765,
238769,
402613,
230588,
353479,
353481,
402634,
189652,
189653,
419029,
279765,
148696,
296153,
279774,
304351,
304356,
222440,
328940,
279792,
353523,
386294,
386301,
320770,
386306,
312587,
328971,
353551,
320796,
222494,
115998,
279854,
353584,
345396,
386359,
378172,
279875,
312648,
337225,
304456,
230729,
238927,
353616,
296273,
222559,
378209,
386412,
230765,
296303,
279920,
296307,
116084,
181625,
337281,
148867,
296329,
304524,
296335,
9619,
370071,
173491,
304564,
279989,
353719,
280004,
361927,
296392,
280010,
280013,
312782,
222675,
239068,
280032,
271843,
329197,
329200,
296433,
321009,
280055,
288249,
296448,
230913,
230921,
329225,
296461,
304656,
329232,
370197,
402985,
394794,
230959,
312880,
288309,
312889,
288318,
280130,
288327,
280147,
239198,
157281,
99938,
312940,
222832,
288378,
337534,
337535,
263809,
312965,
288392,
239250,
419478,
206504,
321199,
337591,
296632,
280251,
321219,
280267,
403148,
9936,
313041,
9937,
370388,
272085,
345814,
280278,
280280,
18138,
345821,
321247,
321249,
345833,
345834,
288491,
280300,
239341,
67315,
173814,
288512,
288516,
280327,
280329,
321295,
321302,
345879,
116505,
321310,
255776,
313120,
362283,
378668,
296755,
280372,
321337,
280380,
345919,
436031,
403267,
280392,
345929,
304977,
18262,
362327,
280410,
345951,
362337,
345955,
296806,
288620,
280430,
214895,
313199,
362352,
296814,
182144,
305026,
67463,
329622,
337815,
214937,
214938,
436131,
313254,
436137,
362417,
362431,
214977,
280514,
214984,
362443,
231375,
329695,
436191,
313319,
296941,
436205,
329712,
223218,
43014,
354316,
313357,
239650,
329765,
354343,
354345,
223274,
346162,
288828,
436285,
288833,
288834,
436292,
403525,
313416,
436301,
354385,
338001,
338003,
280661,
329814,
354393,
280675,
280677,
43110,
321637,
329829,
436329,
288879,
223350,
280694,
288889,
215164,
313469,
215166,
280712,
346271,
436383,
362659,
239793,
182456,
280762,
223419,
379071,
280768,
149703,
346314,
321745,
280795,
387296,
280802,
379106,
346346,
321772,
125169,
436470,
149760,
411906,
313608,
321800,
272658,
338197,
305440,
338218,
321840,
379186,
321860,
182597,
280902,
289110,
215385,
354655,
321894,
313713,
354676,
199029,
436608,
362881,
248194,
240002,
436611,
240016,
108944,
190871,
149916,
420253,
141728,
289189,
108972,
272813,
338356,
436661,
281037,
289232,
281040,
256477,
330218,
281072,
109042,
174593,
420369,
289304,
207393,
289332,
174648,
338489,
338490,
281166,
297560,
436832,
436834,
313966,
420463,
346737,
313971,
346740,
420471,
330379,
330387,
117396,
346772,
330388,
264856,
289434,
346779,
166582,
289462,
314040,
109241,
158394,
248517,
363211,
289502,
363230,
264928,
330474,
289518,
125684,
199414,
191235,
322313,
322316,
117517,
322319,
166676,
207640,
281377,
289576,
191283,
273207,
289598,
281427,
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,
248796,
347103,
52200,
289774,
183279,
347123,
240630,
314362,
257024,
330754,
134150,
330763,
322582,
281626,
175132,
248872,
322612,
314448,
339030,
281697,
314467,
281700,
257125,
322663,
281706,
207979,
273515,
404593,
363641,
363644,
150657,
248961,
330888,
363669,
339100,
380061,
339102,
199839,
429214,
306338,
265379,
249002,
306346,
3246,
421048,
208058,
265412,
290000,
298208,
298212,
298213,
290022,
330984,
298221,
298228,
216315,
208124,
388349,
437505,
322824,
257305,
126237,
339234,
372009,
412971,
298291,
306494,
216386,
224586,
331090,
314709,
314710,
372054,
159066,
134491,
314720,
306542,
380271,
208244,
249204,
249205,
290169,
290173,
306559,
224640,
314751,
306560,
314758,
298374,
314760,
142729,
388487,
314766,
306579,
224661,
282007,
290207,
314783,
314789,
282022,
314791,
282024,
396711,
396712,
241066,
314798,
380337,
380338,
150965,
380357,
339398,
306631,
306639,
413137,
429542,
191981,
282096,
306673,
191990,
290301,
282114,
372227,
323080,
323087,
323089,
175639,
282136,
388632,
396827,
282141,
134686,
306723,
347694,
290358,
265798,
282183,
265804,
224847,
118353,
396882,
290390,
306776,
44635,
396895,
323172,
282213,
323178,
224883,
314998,
323196,
175741,
339584,
282245,
282246,
290443,
323217,
282259,
298654,
282271,
257699,
282276,
298661,
290471,
282280,
298667,
61101,
224946,
110268,
224958,
323263,
282303,
323264,
274115,
282312,
306890,
282318,
241361,
282327,
298712,
298720,
12010,
282348,
282355,
282358,
282369,
323331,
323332,
339715,
216839,
339720,
282378,
372496,
323346,
282391,
339745,
241441,
315171,
257830,
421672,
282409,
282417,
200498,
315202,
307011,
282438,
413521,
216918,
241495,
282480,
241528,
315264,
339841,
241540,
282504,
315273,
315274,
372626,
380821,
298909,
118685,
200627,
323507,
290745,
290746,
274371,
151497,
372701,
298980,
380908,
282612,
282633,
241692,
315432,
315434,
102445,
233517,
176175,
282672,
241716,
225351,
315465,
315476,
307289,
200794,
315487,
356447,
45153,
315497,
315498,
438377,
299121,
233589,
266357,
233590,
422019,
241808,
323729,
381073,
233636,
184484,
299174,
233642,
405687,
258239,
389313,
299203,
299209,
372941,
282831,
266449,
356576,
176362,
307435,
438511,
381172,
184575,
381208,
151839,
233762,
217380,
282919,
151847,
332083,
332085,
332089,
282939,
438596,
332101,
323913,
348492,
323920,
282960,
348500,
168281,
332123,
332127,
323935,
242023,
160110,
242033,
291192,
315773,
291198,
340357,
225670,
332167,
242058,
373134,
291224,
242078,
61857,
315810,
315811,
381347,
61859,
340398,
299441,
61880,
283064,
291265,
127427,
291267,
127428,
283075,
324039,
373197,
160225,
127465,
291311,
233978,
291333,
340490,
283153,
258581,
291358,
283182,
234036,
315960,
348732,
242237,
70209,
348742,
70215,
348749,
381517,
332378,
201308,
111208,
184940,
373358,
389745,
209530,
291454,
373375,
152195,
348806,
316049,
111253,
316053,
111258,
111259,
176808,
299699,
299700,
422596,
422599,
291530,
225995,
242386,
422617,
422626,
299746,
234217,
299759,
348920,
299776,
291585,
430849,
291592,
62220,
422673,
430865,
291604,
422680,
283419,
291612,
283430,
152365,
422703,
422709,
152374,
160571,
430910,
160575,
160580,
283467,
381773,
201549,
201551,
242529,
349026,
357218,
201577,
177001,
308076,
242541,
209783,
209785,
177019,
185211,
308092,
398206,
291712,
381829,
316298,
308112,
349072,
209817,
390045,
127902,
185250,
283558,
185254,
316333,
373687,
316343,
373706,
316364,
324586,
316405,
349175,
201720,
127992,
357379,
308243,
316437,
300068,
357414,
300084,
308287,
21569,
218186,
300111,
341073,
439384,
300135,
300136,
316520,
357486,
316526,
144496,
300150,
291959,
300151,
160891,
300158,
349316,
349318,
373903,
169104,
177296,
308372,
185493,
283802,
119962,
300188,
300187,
300201,
300202,
373945,
259268,
283852,
283853,
259280,
316627,
333011,
333022,
234733,
292085,
234742,
292091,
128251,
439562,
292107,
414990,
251153,
177428,
349462,
333090,
382258,
300343,
382269,
333117,
300359,
177484,
406861,
259406,
234831,
120148,
283991,
357719,
374109,
316765,
292195,
333160,
284014,
316787,
111993,
357762,
112017,
234898,
259475,
275859,
112018,
357786,
251298,
333220,
316842,
374191,
292283,
292292,
300487,
300489,
284107,
210390,
210391,
210393,
144867,
103909,
316902,
251378,
308723,
300536,
300542,
292356,
259599,
316946,
308756,
398869,
374296,
374299,
308764,
431649,
169518,
431663,
194110,
349763,
292423,
218696,
292425,
243274,
128587,
333388,
128599,
235095,
333408,
300644,
317032,
415338,
243307,
54893,
325231,
333430,
325245,
235135,
194180,
415375,
333470,
153251,
300714,
210603,
415420,
333503,
259781,
333509,
333517,
333520,
325346,
333542,
153319,
325352,
284401,
325371,
194303,
194304,
284431,
243472,
161554,
366360,
325404,
399147,
431916,
284459,
300848,
259899,
325439,
325445,
153415,
341836,
415567,
325457,
317269,
341847,
284507,
350044,
128862,
300894,
284512,
276327,
292712,
325484,
423789,
292720,
325492,
276341,
341879,
317304,
333688,
112509,
194429,
55167,
325503,
333701,
243591,
243597,
325518,
333722,
350109,
292771,
300963,
415655,
284587,
292782,
317360,
243637,
284619,
301008,
153554,
292836,
292837,
317415,
325619,
432116,
333817,
292858,
415741,
333828,
358410,
399373,
317467,
145435,
292902,
325674,
227370,
309295,
129076,
243767,
358456,
309345,
227428,
194666,
260207,
432240,
333940,
292988,
292992,
194691,
227460,
415881,
104587,
235662,
325776,
284826,
333991,
227513,
301251,
227524,
309444,
194782,
301279,
317664,
243962,
375039,
309503,
194820,
325905,
325912,
309529,
227616,
211235,
432421,
211238,
358703,
358709,
227654,
325968,
366929,
366930,
6481,
6489,
334171,
383332,
383336,
317820,
211326,
317831,
227725,
252308,
178582,
293274,
285084,
121245,
317852,
342450,
293303,
293306,
293310,
416197,
129483,
342476,
317901,
326100,
285150,
358882,
342498,
334309,
391655,
432618,
375276,
293367,
301571,
342536,
416286,
375333,
293419,
244269,
375343,
23092,
375351,
244281,
301638,
309830,
293448,
55881,
416341,
309846,
416351,
268899,
244327,
39530,
301689,
244347,
326287,
375440,
334481,
318106,
318107,
342682,
318130,
383667,
293556,
342706,
39614,
154316,
334547,
375526,
342762,
342763,
293612,
129773,
154359,
228088,
432893,
162561,
383754,
326414,
310036,
285466,
326429,
293664,
326433,
400166,
293672,
318250,
318252,
285487,
301871,
375609,
285497,
293693,
252741,
318278,
293711,
244568,
244570,
301918,
293730,
342887,
400239,
310131,
228215,
400252,
359298,
359299,
260996,
113542,
416646,
228233,
392074,
236428,
56208,
318364,
310176,
310178,
310182,
293800,
236461,
293806,
326581,
326587,
326601,
359381,
433115,
343005,
326635,
203757,
187374,
383983,
277492,
318461,
293886,
293893,
433165,
384016,
433174,
326685,
252958,
203830,
359478,
302139,
277597,
113760,
302177,
392290,
253029,
285798,
228458,
318572,
15471,
351344,
285814,
285820,
392318,
187521,
384131,
302213,
302216,
228491,
228493,
162961,
326804,
187544,
285851,
351390,
253099,
253100,
318639,
367799,
113850,
294074,
228540,
228542,
302274,
367810,
244940,
195808,
310497,
302325,
228600,
228609,
261377,
245019,
253216,
130338,
261425,
351537,
171317,
318775,
286013,
146762,
294218,
294219,
318805,
425304,
163175,
327024,
327025,
318848,
179587,
294275,
253317,
384393,
368011,
318864,
318868,
318875,
310692,
245161,
286129,
286132,
228795,
425405,
302531,
425418,
302540,
310732,
64975,
310736,
327121,
286172,
187878,
245223,
286202,
359930,
286205,
302590,
253451,
359950,
146964,
253463,
187938,
286244,
245287,
245292,
196164,
56902,
228943,
286288,
179801,
196187,
343647,
286306,
310889,
204397,
138863,
188016,
294529,
229001,
310923,
188048,
302739,
425626,
229020,
302754,
229029,
40614,
40613,
40615,
384695,
286391,
327358,
286399,
302797,
212685,
384720,
212688,
302802,
278233,
294622,
278240,
229088,
212716,
212717,
360177,
229113,
286459,
278272,
319233,
311042,
360195,
278293,
286494,
294700,
409394,
319292,
360252,
360264,
376669,
245599,
237408,
425825,
302946,
425833,
417654,
188292,
327557,
294807,
294809,
376732,
294814,
311199,
319392,
294823,
327596,
294843,
188348,
237504,
294850,
384964,
344013,
212942,
24532,
294886,
278512,
311281,
311282
] |
c6ac3ffd6bff93c1a31c6891c465ce6f9aaf93e0
|
b9af69b8d76d6d88125ae1e6fb433edc90cf4e08
|
/Sources/ElasticsearchResponse.swift
|
39c044741eb27cd6bc6247971b732dabcc269a2c
|
[] |
no_license
|
amorican/ElasticsearchClient
|
f4c53b08ced27e2560eae6de7d75819518a1eaa4
|
d06630f3205cddf152410d92015ca824de26e6ab
|
refs/heads/master
| 2020-12-30T16:41:30.977421 | 2017-07-15T00:40:09 | 2017-07-15T00:40:09 | 91,013,643 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,729 |
swift
|
//
// ElasticsearchResponse.swift
// ElasticsearchClient
//
// Created by Frank Le Grand on 5/11/17.
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import Foundation
import Gloss
public struct ElasticsearchResponse<T : Searchable> : Glossy {
private var json: JSON?
let shards: ElasticsearchShards?
let hits: ElasticsearchHits<T>?
let timedOut: Bool?
let took: Float?
public init?(json: JSON) {
self.json = json
self.shards = "Shards" <~~ json
self.hits = "hits" <~~ json
self.timedOut = "timedOut" <~~ json
self.took = "took" <~~ json
}
public func toJSON() -> JSON? {
return self.json
}
}
|
[
194560,
196636,
98341,
98346,
98347,
59445,
327749,
174152,
174159,
354400,
319625,
235658,
229532,
125086,
125087,
191,
262357,
262359,
106713,
106715,
106719,
35040,
106737,
176369,
176370,
106741,
260342,
106750,
141566,
141576,
141578,
141588,
12565,
141591,
141592,
227608,
227610,
141595,
141596,
141597,
141598,
141600,
141601,
141603,
289068,
289071,
289074,
141627,
141628,
141629,
141632,
141634,
141639,
141640,
141641,
141642,
241994,
241999,
141649,
141654,
141655,
141663,
215396,
141670,
375153,
287090,
375155,
334196,
375163,
375164,
375166,
375171,
141701,
375173,
375181,
197021,
213421,
303550,
305637,
305638,
223741,
125456,
57893,
328232,
57901,
336450,
336451,
336455,
336459,
336460,
55886,
336464,
336467,
336469,
336470,
336479,
336480,
336481,
297620,
135860,
299713,
66261,
334563,
334564,
172784,
244469,
111356,
66302,
142078,
244480,
142081,
142083,
142085,
142087,
334600,
142089,
334601,
318220,
318223,
142097,
318233,
318246,
187176,
396095,
396098,
279366,
299858,
396115,
396118,
396127,
396134,
299884,
248696,
297858,
60304,
60312,
60319,
60323,
23473,
60337,
60338,
23481,
23487,
23493,
23501,
23508,
259036,
23519,
23531,
203755,
433131,
23554,
23555,
437252,
23557,
23559,
23560,
23562,
437258,
437266,
437267,
23572,
23573,
23575,
437273,
23580,
437277,
23582,
437281,
3119,
189488,
187442,
189490,
187444,
187445,
189492,
187447,
144440,
189493,
437305,
144443,
341054,
341055,
341059,
341063,
341066,
23636,
437333,
285783,
23640,
285784,
437338,
285787,
312412,
437340,
312417,
437353,
185451,
437356,
185454,
437364,
437369,
437371,
142463,
294015,
294016,
437384,
437390,
248975,
437392,
312473,
312476,
189598,
40095,
228512,
312478,
40098,
312479,
437412,
437415,
437416,
437423,
437426,
312499,
312501,
312502,
437431,
437433,
437440,
437445,
437458,
203993,
204000,
204003,
281832,
152821,
294138,
206094,
206098,
206104,
206107,
206108,
206109,
27943,
27945,
27948,
173368,
290126,
290135,
171363,
222566,
228717,
222581,
222582,
222594,
363913,
279954,
54678,
173465,
54692,
298431,
157151,
222692,
112115,
65016,
112120,
40450,
206344,
40459,
355859,
40471,
40482,
34359,
34362,
316993,
173635,
173640,
173641,
263755,
106082,
106085,
319088,
52855,
52884,
394910,
52896,
394930,
108245,
212694,
192230,
296679,
34537,
155377,
296691,
296700,
276236,
311055,
227116,
210756,
120655,
218960,
120656,
120657,
180059,
292708,
292709,
223081,
227179,
227180,
116600,
169881,
290767,
141272,
141284,
174067,
237559,
194558,
194559
] |
bf60e149fe303a13102f71290b3073a28db8ecba
|
e463814442e92ed95a2a004e035c84dd0e76adba
|
/test5/test5/3Order/Order4.swift
|
3878103c1e867010ca952dd9b3d2e882cd8673fb
|
[] |
no_license
|
huy95/AllCenterTech
|
f1a19277318f08bdca6fb29504342c7c9b259f6a
|
a06c1af3ac909bccea56a7e2447fd5ab9e0f4496
|
refs/heads/master
| 2022-12-01T14:54:24.205736 | 2020-08-12T10:49:58 | 2020-08-12T10:49:58 | 286,429,716 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,330 |
swift
|
//
// Order4.swift
// test5
//
// Created by Huy on 3/18/20.
// Copyright © 2020 Huy. All rights reserved.
//
import UIKit
class Order4: UIViewController {
let mainview : UIView = {
let mainview = UIView()
mainview.translatesAutoresizingMaskIntoConstraints = false
mainview.backgroundColor = .white
return mainview
}()
let viewOver : UIView = {
let mainview1 = UIView()
mainview1.translatesAutoresizingMaskIntoConstraints = false
mainview1.backgroundColor = UIColor.init(named: "xanh")
return mainview1
}()
let labelOver : UILabel = {
let labelOver = UILabel()
labelOver.translatesAutoresizingMaskIntoConstraints = false
labelOver.text = "Đơn đặt phòng của tôi"
labelOver.textAlignment = .center
labelOver.font = .boldSystemFont(ofSize: 32)
labelOver.textColor = .white
return labelOver
}()
let segmentControl1 : UISegmentedControl = {
let segment = UISegmentedControl(items: ["Sắp tới", "Hoàn tất", "Đã huỷ"])
segment.translatesAutoresizingMaskIntoConstraints = false
segment.selectedSegmentIndex = 0
segment.selectedSegmentTintColor = UIColor.init(named: "xanh")
segment.backgroundColor = UIColor.white
return segment
}()
let image : UIImageView = {
let image = UIImageView()
image.translatesAutoresizingMaskIntoConstraints = false
image.image = UIImage.init(named: "playstore")
image.contentMode = .scaleToFill
return image
}()
override func viewDidLoad() {
super.viewDidLoad()
setupLayout()
}
func setupLayout(){
view.addSubview(mainview)
mainview.topAnchor.constraint(equalTo: view.topAnchor, constant: 0).isActive = true
mainview.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: 0).isActive = true
mainview.rightAnchor.constraint(equalTo: view.rightAnchor, constant: 0).isActive = true
mainview.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 0).isActive = true
view.addSubview(viewOver)
viewOver.topAnchor.constraint(equalTo: view.topAnchor, constant: 0).isActive = true
viewOver.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.15).isActive = true
viewOver.rightAnchor.constraint(equalTo: view.rightAnchor, constant: 0).isActive = true
viewOver.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 0).isActive = true
view.addSubview(labelOver)
labelOver.topAnchor.constraint(equalTo: view.topAnchor, constant: 20).isActive = true
labelOver.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.1).isActive = true
labelOver.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 1).isActive = true
labelOver.leftAnchor.constraint(equalTo: viewOver.leftAnchor, constant: 0).isActive = true
mainview.addSubview(segmentControl1)
segmentControl1.topAnchor.constraint(equalTo: viewOver.bottomAnchor, constant: 0).isActive = true
segmentControl1.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.08).isActive = true
segmentControl1.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 1).isActive = true
segmentControl1.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 0).isActive = true
view.addSubview(image)
image.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
image.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.4).isActive = true
image.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.5).isActive = true
image.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 30).isActive = true
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
|
[
-1
] |
e9c59617e2410e3f395737126a1530a0ea64fd40
|
a84b30d3d7032d1908bfb8e25912ee20e611b8a6
|
/HelloToTheUniverse/Greeting.swift
|
7e52f373207cc95519506f6012618074d762d941
|
[
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] |
permissive
|
shanetreynolds6/swift-HelloToTheUniverse-lab-swift-intro-000
|
6f66c40b507bd068cc1520af33dfcdd12fbf24f0
|
5a8b605bb1635a65c146480701a99ebb7001ef7d
|
refs/heads/master
| 2021-07-12T12:42:02.167453 | 2017-10-12T00:18:44 | 2017-10-12T00:18:44 | 106,062,479 | 0 | 0 | null | 2017-10-07T01:06:32 | 2017-10-07T01:06:32 | null |
UTF-8
|
Swift
| false | false | 423 |
swift
|
//
// Greeting.swift
// HelloToTheUniverse
//
// Created by James Campagno on 8/24/16.
// Copyright © 2016 Flatiron School. All rights reserved.
//
import Foundation
class Greeting {
// We created the function for you! Press command + u to run the tests.
func helloUniverse() -> String {
print("My name is Shane and I can fly!")
return "Hello Universe!"
}
}
|
[
-1
] |
22888b72aca9aece11ab9b2b1d2444726502408f
|
2cf796ddbedd63eccf6c51567e636645add0eaa8
|
/algorithm/algorithm/栈、队列/Queue.swift
|
52cfef1168706350c0b1216fe5386936518d552b
|
[] |
no_license
|
xiuyu/swift_notes
|
27fbbc06f4b19fec7b8ffdc5ae5b050630ea0bd1
|
555b7e067f72e45bdc99a6e00c6334390c0afd3e
|
refs/heads/master
| 2021-07-07T15:13:31.827552 | 2020-10-25T14:43:46 | 2020-10-25T14:43:46 | 190,309,762 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 771 |
swift
|
//
// Queue.swift
// algorithm
//
// Created by 丘秀玉 on 2019/8/15.
// Copyright © 2019 xiuyu. All rights reserved.
//
import Foundation
protocol Queue {
associatedtype Element
var isEmpty: Bool { get }
var peek: Element? { get }
mutating func enqueue(_ element: Element)
mutating func dequeue() -> Element?
}
struct IntQueue: Queue {
var isEmpty: Bool { return items.isEmpty }
var peek: Int? { return items.first }
var items = [Element]()
mutating func enqueue(_ element: Int) {
items.append(element)
}
mutating func dequeue() -> Int? {
if items.isEmpty {
return nil
} else {
return items.first
}
}
typealias Element = Int
}
|
[
-1
] |
1edf66e015da75d44186632227159d8b8b933403
|
44c30dd4d6e21216c9b86044211694baeb1fee46
|
/QuizTempatRestoran/QuizTempatRestoranUITests/QuizTempatRestoranUITests.swift
|
f51b5136235c4b9671d86da2f3c8846a3b232456
|
[] |
no_license
|
KukangSulap/QuizTempatRestoran
|
70cad7202d333995517f921e3b9616cddbdc36b4
|
88f31e0647044d7d0b2372724db52573d74fece4
|
refs/heads/master
| 2021-07-10T16:04:07.189535 | 2017-10-13T03:12:04 | 2017-10-13T03:12:04 | 106,772,463 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,268 |
swift
|
//
// QuizTempatRestoranUITests.swift
// QuizTempatRestoranUITests
//
// Created by Naufel on 13/10/17.
// Copyright © 2017 Naufel. All rights reserved.
//
import XCTest
class QuizTempatRestoranUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
XCUIApplication().launch()
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
}
|
[
333827,
182277,
243720,
282634,
313356,
155665,
305173,
241695,
237599,
223269,
354342,
315431,
292901,
102441,
315433,
325675,
313388,
354346,
278571,
282671,
102446,
124974,
229425,
243763,
241717,
321589,
180279,
215095,
229431,
319543,
213051,
288829,
325695,
286787,
288835,
307269,
237638,
313415,
239689,
233548,
311373,
315468,
196687,
278607,
311377,
354386,
223317,
315477,
368732,
180317,
323678,
321632,
315489,
45154,
280676,
313446,
215144,
233578,
194667,
307306,
278637,
288878,
319599,
278642,
284789,
131190,
288890,
292987,
215165,
131199,
235661,
278669,
333968,
241809,
323730,
278676,
311447,
153752,
327834,
284827,
329884,
278684,
299166,
278690,
311459,
215204,
233635,
333990,
299176,
184489,
278698,
284843,
284840,
278703,
323761,
184498,
278707,
180409,
223418,
295099,
258233,
299197,
227517,
278713,
280761,
280767,
299202,
139459,
309443,
176325,
131270,
338118,
299208,
227525,
301255,
280779,
233678,
227536,
282832,
301270,
229591,
301271,
280792,
147679,
147680,
311520,
325857,
280803,
356575,
307431,
338151,
182503,
319719,
295147,
317676,
286957,
125166,
125170,
395511,
313595,
184574,
309504,
125184,
217352,
125192,
125197,
194832,
227601,
125200,
319764,
278805,
338196,
125204,
334104,
315674,
282908,
311582,
299294,
282912,
233761,
278817,
125215,
211239,
282920,
334121,
317738,
325930,
311596,
338217,
125225,
321839,
336177,
315698,
98611,
125236,
282938,
278843,
127292,
168251,
307514,
287040,
319812,
311622,
227655,
280903,
319816,
323914,
201037,
383309,
282959,
229716,
289109,
250196,
168280,
379224,
323934,
391521,
239973,
381286,
416103,
313703,
285031,
280938,
242027,
242028,
321901,
354671,
278895,
287089,
250227,
199030,
227702,
315768,
139641,
291193,
223611,
291194,
313726,
211327,
291200,
311679,
240003,
158087,
313736,
227721,
242059,
311692,
106893,
285074,
227730,
240020,
190870,
315798,
190872,
291225,
285083,
317851,
293275,
227743,
242079,
285089,
289185,
283039,
305572,
156069,
293281,
301482,
289195,
375211,
311723,
377265,
334259,
338359,
299449,
319931,
311739,
293309,
278974,
336319,
311744,
317889,
291266,
336323,
278979,
129484,
278988,
281038,
281039,
278992,
289229,
326093,
283089,
283088,
279000,
176602,
242138,
285152,
291297,
369121,
160224,
279009,
188899,
279014,
195044,
319976,
279017,
279337,
311787,
334315,
281071,
319986,
236020,
279030,
293368,
279033,
311800,
317949,
322396,
279042,
233987,
324098,
287237,
334345,
309770,
340489,
342537,
279053,
322057,
283154,
303635,
279060,
279061,
182802,
303634,
279066,
188954,
322077,
291359,
342560,
227881,
293420,
289328,
283185,
236080,
279092,
234037,
23093,
244279,
244280,
340539,
234044,
338491,
301635,
309831,
322119,
55880,
377419,
303693,
281165,
301647,
281170,
326229,
115287,
189016,
244311,
309847,
332379,
111197,
295518,
287327,
242274,
244326,
279143,
279150,
281200,
287345,
313970,
301688,
189054,
287359,
291455,
297600,
303743,
301702,
164487,
311944,
334473,
344714,
279176,
316044,
311948,
311950,
184974,
326288,
311953,
316048,
287379,
336531,
295575,
227991,
289435,
303772,
221853,
205469,
285348,
340645,
314020,
295591,
279207,
176810,
295598,
248494,
279215,
293552,
279218,
285362,
164532,
166581,
342705,
285360,
299698,
154295,
287418,
303802,
314043,
287412,
66243,
291529,
287434,
225996,
363212,
287438,
135888,
242385,
279249,
303826,
369365,
369366,
279253,
158424,
230105,
299737,
322269,
338658,
295653,
342757,
289511,
230120,
234216,
330473,
285419,
330476,
289517,
215790,
312046,
279278,
170735,
125683,
199415,
342775,
234233,
242428,
279293,
289534,
205566,
35584,
299777,
322302,
228099,
285443,
375552,
291584,
291591,
295688,
322312,
346889,
285450,
312076,
326413,
285457,
295698,
166677,
291605,
207639,
283418,
285467,
221980,
281378,
234276,
336678,
318247,
262952,
293673,
262953,
318251,
289580,
262957,
283431,
164655,
328495,
301872,
234290,
303921,
285493,
230198,
285496,
301883,
342846,
289599,
201534,
222017,
295745,
281407,
293702,
318279,
283466,
281426,
279379,
295769,
244569,
234330,
281434,
201562,
230238,
275294,
301919,
279393,
293729,
357219,
281444,
303973,
279398,
351078,
349025,
243592,
177002,
308075,
242540,
310132,
295797,
201590,
295799,
228214,
177018,
279418,
269179,
336765,
308093,
314240,
291713,
158594,
330627,
340865,
240517,
287623,
228232,
299912,
320394,
316299,
252812,
279434,
234382,
308111,
189327,
308113,
416649,
293780,
310166,
289691,
209820,
240543,
283551,
310177,
289699,
189349,
289704,
293801,
279465,
326571,
177074,
304050,
326580,
289720,
326586,
289723,
189373,
213956,
359365,
19398,
345030,
281541,
127945,
211913,
279499,
213961,
56270,
191445,
183254,
207839,
340960,
234469,
314343,
123880,
340967,
304104,
324587,
183276,
234476,
203758,
248815,
320495,
320492,
287730,
289773,
240631,
320504,
312313,
214009,
312315,
201721,
312317,
234499,
418819,
293894,
330759,
320520,
230411,
330766,
320526,
234513,
238611,
293911,
140311,
316441,
197658,
326684,
336930,
132140,
113710,
281647,
189487,
322609,
318515,
312372,
203829,
238646,
300087,
238650,
320571,
21567,
308288,
336962,
160834,
314437,
349254,
238663,
300109,
207954,
234578,
250965,
296023,
205911,
339031,
314458,
156763,
281699,
230500,
285795,
250982,
322664,
228457,
279659,
318571,
234606,
300145,
230514,
238706,
187508,
279666,
300147,
312435,
302202,
285819,
314493,
285823,
234626,
279686,
222344,
285833,
285834,
234635,
228492,
318602,
337037,
177297,
162962,
187539,
347286,
308375,
324761,
285850,
296091,
119965,
234655,
302239,
300192,
339106,
306339,
234662,
300200,
3243,
208044,
302251,
322733,
238764,
249003,
294069,
324790,
300215,
294075,
64699,
228541,
339131,
343230,
229414,
283841,
148674,
283846,
312519,
283849,
148687,
290001,
189651,
316628,
279766,
189656,
339167,
310496,
298209,
304353,
279775,
279780,
304352,
228587,
279789,
290030,
302319,
234741,
316661,
230239,
283894,
208123,
279803,
292092,
228608,
234756,
322826,
242955,
177420,
312588,
318732,
126229,
318746,
320795,
320802,
130342,
304422,
130344,
130347,
292145,
298290,
208179,
312628,
345398,
300342,
159033,
222523,
286012,
181568,
279872,
294210,
193858,
279874,
216387,
300354,
372039,
300355,
304457,
230730,
345418,
337228,
296269,
234830,
222542,
238928,
294220,
296274,
331091,
150868,
314708,
283990,
224591,
357720,
318804,
300378,
300379,
314711,
294236,
316764,
314721,
292194,
230757,
281958,
314727,
134504,
306541,
327023,
234864,
296304,
312688,
316786,
230772,
314740,
327030,
284015,
314742,
310650,
290170,
224637,
306558,
337280,
243073,
179586,
290176,
314752,
306561,
294278,
296328,
296330,
298378,
318860,
314765,
368012,
304523,
9618,
112019,
279955,
306580,
234902,
292242,
282008,
224662,
314776,
314771,
318876,
282013,
290206,
343457,
148899,
314788,
298406,
282023,
245160,
241067,
279979,
314797,
279980,
286128,
173492,
286133,
284086,
279988,
259513,
310714,
284090,
228796,
302523,
54719,
302530,
292291,
228804,
310725,
306630,
280003,
300488,
415170,
300490,
306634,
310731,
234957,
339403,
337359,
329168,
312785,
222674,
329170,
302539,
310735,
280025,
310747,
239069,
144862,
286176,
187877,
310758,
320997,
280042,
280043,
191980,
300526,
329198,
337391,
282097,
296434,
308722,
40439,
191991,
286201,
300539,
288252,
210429,
359931,
312830,
290304,
245249,
228868,
323079,
218632,
292359,
230922,
323083,
302602,
294413,
359949,
304655,
323088,
329231,
282132,
230933,
302613,
316951,
175640,
374297,
282135,
302620,
222754,
313338,
306730,
312879,
230960,
288305,
290359,
239159,
323132,
235069,
157246,
288319,
288322,
280131,
349764,
282182,
194118,
292424,
288328,
292426,
286281,
124486,
333389,
224848,
349780,
224852,
290391,
128600,
196184,
235096,
306777,
239192,
230999,
212574,
345697,
204386,
300643,
300645,
282214,
312937,
204394,
224874,
243306,
312941,
138862,
206447,
310896,
294517,
314997,
290425,
288377,
339579,
337533,
325246,
333438,
235136,
280193,
282244,
239238,
288391,
282248,
286344,
323208,
286351,
188049,
239251,
229011,
280217,
323226,
229021,
302751,
198304,
282272,
245413,
282279,
298664,
212649,
298666,
317102,
286387,
300725,
286392,
302778,
306875,
296636,
280252,
280253,
282302,
323262,
286400,
321217,
280259,
323265,
282309,
296649,
239305,
280266,
212684,
9935,
241360,
282321,
313042,
286419,
333522,
241366,
280279,
282330,
18139,
294621,
280285,
282336,
325345,
321250,
294629,
337638,
333543,
181992,
153318,
12009,
282347,
288492,
282349,
323315,
67316,
34547,
286457,
284410,
313082,
200444,
288508,
282366,
286463,
319232,
288515,
249606,
282375,
323335,
284425,
116491,
216844,
282379,
284430,
300812,
280333,
161553,
124691,
278292,
118549,
116502,
282390,
284436,
278294,
325403,
321308,
321309,
341791,
241440,
282401,
339746,
282399,
186148,
186149,
216868,
241447,
315172,
333609,
280011,
294699,
284460,
286507,
280367,
300849,
282418,
280373,
282424,
319289,
280377,
321338,
282428,
280381,
345918,
413500,
241471,
280386,
325444,
280391,
153416,
315209,
325449,
159563,
280396,
307024,
325460,
237397,
341846,
317268,
241494,
188250,
284508,
300893,
307038,
370526,
237411,
276326,
296807,
282471,
292713,
282476,
292719,
313200,
296815,
325491,
313204,
317305,
317308,
339840,
315265,
280451,
325508,
327556,
333700,
188293,
67464,
305032,
325514,
350091,
350092,
282503,
315272,
311183,
315275,
184207,
282517,
294806,
350102,
294808,
337816,
214936,
239515,
333727,
298912,
319393,
214943,
294820,
118693,
219046,
333734,
284584,
313257,
294824,
292783,
126896,
300983,
343993,
288698,
98240,
294849,
214978,
280517,
280518,
214983,
282572,
282573,
153553,
24531,
231382,
323554,
292835,
190437,
292838,
294887,
317416,
174058,
298987,
313322,
278507,
296942,
311277,
124912,
327666,
278515,
325620,
239610
] |
e1ca2dfd53d944247d9c1ce885c3b16818479536
|
447fd8c68c6a54823a084ed96afd47cec25d9279
|
/icons/oar/src/oar.swift
|
b187f54f2c5545e4716dd397c6742d9d23cd2faf
|
[] |
no_license
|
friends-of-cocoa/material-design-icons
|
cf853a45d5936b16d0fddc88e970331379721431
|
d66613cf64e521e32a4cbb64dadd9cb20ea6199e
|
refs/heads/master
| 2022-07-29T15:51:13.647551 | 2020-09-16T12:15:32 | 2020-09-16T12:15:32 | 295,662,032 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 382 |
swift
|
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
// swiftlint:disable superfluous_disable_command identifier_name line_length nesting type_body_length type_name
public enum MDIIcons {
public static let oar24pt = MDIIcon(name: "oar_24pt").image
}
// swiftlint:enable superfluous_disable_command identifier_name line_length nesting type_body_length type_name
|
[
-1
] |
e831f4491b301f5f1b2e42706330dd6b7c4ff6c6
|
d5236e4fe3d85a37b984f74dea646457a9a3f391
|
/Content/Compiler Interpreter/Pascal Interpreter/Swift Version/pascal10/pascal10/Lexer.swift
|
8bb8c108f9dc0b57bb0cd90ce8ef2601929213c1
|
[
"MIT"
] |
permissive
|
xim9160/2018-Read-Record
|
b018df1cfa464f1b15e9d60f37d634face999114
|
6d5b03511f4a925a802a2a8b36d315a51be75cf1
|
refs/heads/master
| 2020-04-22T10:27:18.449075 | 2018-12-23T16:03:16 | 2018-12-23T16:03:16 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,549 |
swift
|
//
// Lexer.swift
// 12312
//
// Created by pmst on 2018/4/15.
// Copyright © 2018 pmst. All rights reserved.
//
import Foundation
// 分词器 吐出来的东西就是 Token 实例
class Lexer {
// 方式一:[Character]存储
// 方式二:String 存储 但是存取需要用index索引去拿
var text:[Character]
var pos:Int = 0
var current_char:Character?
init(sourceCode:String) {
self.text = Array(sourceCode)
self.pos = 0
self.current_char = self.text[self.pos]
}
// 只是看一下后面的字符并不会
func peek()->Character? {
let peek_pos = self.pos + 1;
if peek_pos >= self.text.count {
return nil
} else {
return self.text[peek_pos]
}
}
// 每次读取一个字符
func advance(){
self.pos += 1;
if self.pos >= self.text.count {
self.current_char = nil
} else {
self.current_char = self.text[self.pos]
}
}
func skip_whitespace() {
while self.current_char != nil && self.current_char!.isspace() {
self.advance()
}
}
func number() -> Token {
var result = ""
while self.current_char != nil && self.current_char!.isdigit() {
result += String(self.current_char!)
self.advance()
}
if self.current_char == "." {
result += String(self.current_char!)
self.advance()
while self.current_char != nil && self.current_char!.isdigit() {
result += String(self.current_char!)
self.advance()
}
return .real_const(Float(result)!)
}
return .integer_const(Int(result)!)
}
func id() -> Token {
var result = ""
while self.current_char != nil && self.current_char!.isalnum() {
result += String(self.current_char!)
self.advance()
}
return RESERVED_KEYWORDS[result] ?? .id(result)
}
func skip_comment() {
while self.current_char! != "}" {
self.advance()
}
// 越过最后 ”}“ 符号
self.advance()
}
// Core Method
func get_next_token()-> Token {
while self.current_char != nil {
// 空格
if self.current_char!.isspace() {
self.skip_whitespace()
continue;
}
// 去除 "{}" 注释
if self.current_char! == "{" {
self.advance()
self.skip_comment()
continue;
}
if self.current_char! == "," {
self.advance()
return .comma
}
if self.current_char!.isdigit() {
return self.number()
}
if self.current_char!.isalpha() {
return self.id()
}
if self.current_char! == ":" && self.peek() == "=" {
self.advance()
self.advance()
return .assign
}
if self.current_char! == ":" {
self.advance()
return .colon
}
if self.current_char! == ";"{
self.advance()
return .semi
}
if self.current_char! == "."{
self.advance()
return .dot
}
if self.current_char == "*" {
self.advance()
return .mul
}
if self.current_char == "/" {
self.advance()
return .float_div
}
if self.current_char == "+" {
self.advance()
return .plus
}
if self.current_char == "-" {
self.advance()
return .minus
}
if self.current_char == "(" {
self.advance()
return .lparen
}
if self.current_char == ")" {
self.advance()
return .rparen
}
print("error happened no expect value!!")
break
}
return .eof
}
}
|
[
-1
] |
6445e1fd63413f6f4f51c3fc34c7963935fddfc4
|
544547c828a3aab18642f0127dd9653f7c3ed8e0
|
/Sources/DistributedActorsGenerator/boot.swift
|
c2a8c0a2ffbd98ef5becafb5da927f1feb4058ef
|
[
"Apache-2.0"
] |
permissive
|
slashmo/swift-distributed-actors
|
7f8a90958c012df3f4a113cf5ba2333ff23af764
|
eb1201cbf6e93e76293ec2419ae33166dfc510af
|
refs/heads/main
| 2023-08-24T17:02:56.527248 | 2021-10-28T22:46:03 | 2021-10-28T22:46:03 | 422,490,523 | 1 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,694 |
swift
|
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Distributed Actors open source project
//
// Copyright (c) 2020-2021 Apple Inc. and the Swift Distributed Actors project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.md for the list of Swift Distributed Actors project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import ArgumentParser
import Foundation
import Logging
@main
public struct GenerateActorsCommand: ParsableCommand {
@Option(help: "Print verbose information while analyzing and generating sources")
var logLevel: String = ProcessInfo.processInfo.environment["SACT_GEN_LOGLEVEL"] ?? "info"
var logLevelValue: Logger.Level {
switch self.logLevel {
case "trace": return .trace
case "debug": return .debug
case "info": return .info
case "notice": return .notice
case "warning": return .warning
case "error": return .error
case "critical": return .critical
default: return .info
}
}
@Flag(name: .shortAndLong, help: "Print verbose all generated sources")
var printGenerated: Bool = false
@Option(help: "Source directory to scan")
var sourceDirectory: String
@Option(help: "Target directory to generate in")
var targetDirectory: String
@Option(help: "Number of buckets to generate")
var buckets: Int = 1
@Argument()
var targets: [String] = []
public init() {}
}
extension GenerateActorsCommand {
public func run() throws {
// Configure a logger that looks and feels more natural in the build log output
LoggingSystem.bootstrap(PluginLogHandler.init)
guard !self.sourceDirectory.isEmpty else {
fatalError("source directory is required")
}
guard !self.targetDirectory.isEmpty else {
fatalError("target directory is required")
}
let sourceDirectory = try Directory(path: self.sourceDirectory)
try FileManager.default.createDirectory(atPath: self.targetDirectory, withIntermediateDirectories: true)
let targetDirectory = try Directory(path: self.targetDirectory)
let generator = GenerateActors(basePath: sourceDirectory, logLevel: self.logLevelValue, printGenerated: self.printGenerated)
_ = try generator.run(
sourceDirectory: sourceDirectory,
targetDirectory: targetDirectory,
buckets: self.buckets,
targets: self.targets
)
}
}
|
[
-1
] |
a6480d6603e75879a3dc574a72f7949faf77c510
|
35841810afd7056767706afd7039f64f79071dba
|
/Carthage/Checkouts/SwiftiMobileDevice/SwiftiMobileDevice/DebugServer.swift
|
e24ccecd8e951ac259ff6e31ee54351868e5e8f9
|
[] |
permissive
|
k-ymmt/Korat
|
ba16152d703eb72a2b179ea62f1f41cfec0bb6a3
|
903c6d862a82f2f5fdca446ab720c54c3e82d914
|
refs/heads/master
| 2020-06-16T06:45:19.287367 | 2020-04-26T18:15:21 | 2020-04-26T18:15:21 | 168,907,432 | 0 | 0 |
Apache-2.0
| 2019-04-20T23:26:11 | 2019-02-03T04:00:20 |
Swift
|
UTF-8
|
Swift
| false | false | 9,649 |
swift
|
//
// DebugServer.swift
// SwiftyMobileDevice
//
// Created by Kazuki Yamamoto on 2019/12/25.
// Copyright © 2019 Kazuki Yamamoto. All rights reserved.
//
import Foundation
import MobileDevice
public enum DebugServerError: Int32, Error {
case invalidArgument = -1
case muxError = -2
case sslError = -3
case responseError = -4
case unknown = -256
case deallocatedClient = 100
case deallocatedCommand = 101
}
public struct DebugServerCommand {
var rawValue: debugserver_command_t?
init(rawValue: debugserver_command_t) {
self.rawValue = rawValue
}
init(name: String, arguments: [String]) throws {
let buffer = UnsafeMutableBufferPointer<UnsafeMutablePointer<Int8>?>.allocate(capacity: arguments.count + 1)
defer { buffer.deallocate() }
for (i, argument) in arguments.enumerated() {
buffer[i] = argument.unsafeMutablePointer()
}
buffer[arguments.count] = nil
let rawError = debugserver_command_new(name, Int32(arguments.count), buffer.baseAddress, &rawValue)
buffer.forEach { $0?.deallocate() }
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
guard rawValue == nil else {
throw DebugServerError.unknown
}
}
public mutating func free() {
guard let rawValue = self.rawValue else {
return
}
debugserver_command_free(rawValue)
self.rawValue = nil
}
}
public struct DebugServer {
static func start<T>(device: Device, label: String, body: (DebugServer) throws -> T) throws -> T {
guard let device = device.rawValue else {
throw MobileDeviceError.deallocatedDevice
}
return try label.withCString({ (label) -> T in
var pclient: debugserver_client_t? = nil
let rawError = debugserver_client_start_service(device, &pclient, label)
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
guard let client = pclient else {
throw DebugServerError.unknown
}
var server = DebugServer(rawValue: client)
defer { server.free() }
return try body(server)
})
}
public static func encodeString(buffer: String) -> Data {
buffer.withCString { (buffer) -> Data in
var pencodedBuffer: UnsafeMutablePointer<Int8>? = nil
var encodedLength: UInt32 = 0
debugserver_encode_string(buffer, &pencodedBuffer, &encodedLength)
guard let encodedBuffer = pencodedBuffer else {
return Data()
}
let bufferPointer = UnsafeBufferPointer<Int8>(start: encodedBuffer, count: Int(encodedLength))
defer { bufferPointer.deallocate() }
return Data(buffer: bufferPointer)
}
}
private var rawValue: debugserver_client_t?
init(rawValue: debugserver_client_t) {
self.rawValue = rawValue
}
init(device: Device, service: LockdownService) throws {
guard let device = device.rawValue else {
throw MobileDeviceError.deallocatedDevice
}
guard let service = service.rawValue else {
throw LockdownError.notStartService
}
var client: debugserver_client_t? = nil
let rawError = debugserver_client_new(device, service, &client)
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
guard client != nil else {
throw DebugServerError.unknown
}
self.rawValue = client
}
public func send(data: String, size: UInt32) throws -> UInt32 {
guard let rawValue = self.rawValue else {
throw DebugServerError.deallocatedClient
}
return try data.withCString { (data) -> UInt32 in
var sent: UInt32 = 0
let rawError = debugserver_client_send(rawValue, data, size, &sent)
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
return sent
}
}
public func receive(size: UInt32, timeout: UInt32? = nil) throws -> (Data, UInt32) {
guard let rawValue = self.rawValue else {
throw DebugServerError.deallocatedClient
}
let data = UnsafeMutablePointer<Int8>.allocate(capacity: 0)
defer { data.deallocate() }
var received: UInt32 = 0
let rawError: debugserver_error_t
if let timeout = timeout {
rawError = debugserver_client_receive_with_timeout(rawValue, data, size, &received, timeout)
} else {
rawError = debugserver_client_receive(rawValue, data, size, &received)
}
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
let buffer = UnsafeBufferPointer<Int8>(start: data, count: Int(received))
defer { buffer.deallocate() }
return (Data(buffer: buffer), received)
}
public func sendCommand(command: DebugServerCommand) throws -> Data {
guard let rawValue = self.rawValue else {
throw DebugServerError.deallocatedClient
}
guard let rawCommand = command.rawValue else {
throw DebugServerError.deallocatedCommand
}
var presponse: UnsafeMutablePointer<Int8>? = nil
var responseSize: Int = 0
let rawError = debugserver_client_send_command(rawValue, rawCommand, &presponse, &responseSize)
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
guard let response = presponse else {
throw DebugServerError.unknown
}
let buffer = UnsafeBufferPointer<Int8>(start: response, count: responseSize)
defer { buffer.deallocate() }
return Data(buffer: buffer)
}
public func receiveResponse() throws -> Data {
guard let rawValue = self.rawValue else {
throw DebugServerError.deallocatedClient
}
var presponse: UnsafeMutablePointer<Int8>? = nil
var responseSize: Int = 0
let rawError = debugserver_client_receive_response(rawValue, &presponse, &responseSize)
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
guard let response = presponse else {
throw DebugServerError.unknown
}
let buffer = UnsafeBufferPointer<Int8>(start: response, count: responseSize)
defer { buffer.deallocate() }
return Data(buffer: buffer)
}
public func setAckMode(enabled: Bool) throws {
guard let rawValue = self.rawValue else {
throw DebugServerError.deallocatedClient
}
let rawError = debugserver_client_set_ack_mode(rawValue, enabled ? 1 : 0)
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
}
public func setARGV(argv: [String]) throws -> String {
guard let rawValue = self.rawValue else {
throw DebugServerError.deallocatedClient
}
let argc = argv.count
let buffer = UnsafeMutableBufferPointer<UnsafeMutablePointer<Int8>?>.allocate(capacity: argc + 1)
defer { buffer.deallocate() }
for (i, argument) in argv.enumerated() {
buffer[i] = argument.unsafeMutablePointer()
}
buffer[argc] = nil
var presponse: UnsafeMutablePointer<Int8>? = nil
let rawError = debugserver_client_set_argv(rawValue, Int32(argc), buffer.baseAddress, &presponse)
buffer.forEach { $0?.deallocate() }
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
guard let response = presponse else {
throw DebugServerError.unknown
}
defer { response.deallocate() }
return String(cString: response)
}
public func setEnvironmentHexEncoded(env: String) throws -> String {
guard let rawValue = self.rawValue else {
throw DebugServerError.deallocatedClient
}
return try env.withCString { (env) -> String in
var presponse: UnsafeMutablePointer<Int8>? = nil
let rawError = debugserver_client_set_environment_hex_encoded(rawValue, env, &presponse)
if let error = DebugServerError(rawValue: rawError.rawValue) {
throw error
}
guard let response = presponse else {
throw DebugServerError.unknown
}
defer { response.deallocate() }
return String(cString: response)
}
}
public mutating func free() {
guard let rawValue = self.rawValue else {
return
}
debugserver_client_free(rawValue)
self.rawValue = nil
}
}
extension DebugServer {
func receiveAll(timeout: UInt32? = nil) throws -> Data {
let size: UInt32 = 131072
var buffer = Data()
while(true) {
let (data, received) = try receive(size: size, timeout: timeout)
buffer += data
if received == 0 {
break
}
}
return buffer
}
}
|
[
-1
] |
adeb02d9e01fdea8a8ef494212ccbcff1047be85
|
8ae5273aaf2127aa68cbc822a94a8ff40a234f7d
|
/NYTimesChallenge/model/UserModel.swift
|
3a60960826b9bec21d5ccde80efcf052b47cb8a3
|
[] |
no_license
|
briancmaci/book-junkie-ios
|
761df23d735baa4952a94460a0f1866e00690a33
|
a790633430ee35dd91c33d6077ec0fe8341a0f79
|
refs/heads/master
| 2021-01-19T13:04:32.940590 | 2017-02-28T15:23:20 | 2017-02-28T15:23:20 | 82,363,768 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,183 |
swift
|
//
// UserModel.swift
// NYTimesChallenge
//
// Created by Brian Maci on 2/17/17.
// Copyright © 2017 Brian Maci. All rights reserved.
//
import UIKit
// Awards Rank Variables
enum FinishedRank: Int{
case noob = 0, pageTurner, bookworm, bookJunkie
}
class UserModel: NSObject {
static let sharedInstance = UserModel()
var lists : [BestSellerListModel] = [BestSellerListModel]()
var overview : [OverviewBookModel] = [OverviewBookModel]()
var books : [String : BookModel] = [String : BookModel]()
let awardsRankThreshold : [Int] = [0, 5, 10, 15]
}
extension UserModel {
class func getReadBooksTotal() -> Int {
var total:Int = 0
for (_ , book) in sharedInstance.books {
if book.saveState == .finished {
total += 1
}
}
return total
}
class func getRatingsTotal() -> Int {
var total:Int = 0
for (_ , book) in sharedInstance.books {
if book.userRating > 0 {
total += 1
}
}
return total
}
//Enum incorporation is planned for future enhancements or possible model storage
class func getFinishedRank() -> String {
switch sharedInstance.rankFromThreshold() {
case .noob:
return K.StringFormat.RankNoob
case .pageTurner:
return K.StringFormat.RankPageTurner
case .bookworm:
return K.StringFormat.RankBookworm
case .bookJunkie:
return K.StringFormat.RankBookJunkie
}
}
private func rankFromThreshold() -> FinishedRank {
var currentIndex = 0
//edge case for 0
if UserModel.getReadBooksTotal() == 0 {
return FinishedRank(rawValue: currentIndex)!
}
while currentIndex < awardsRankThreshold.count && UserModel.getReadBooksTotal() > awardsRankThreshold[currentIndex] {
currentIndex += 1
}
return FinishedRank(rawValue: currentIndex - 1)!
}
}
|
[
-1
] |
91087d97b21bfdd428d0e22888bcebabfdcfe9ac
|
69a2bd563cc513e2e76bab58199e42de20a24542
|
/Journal/Views/Camera/RecordingView.swift
|
b21162b33240f9ac7e190a5cdc844d6826b7b033
|
[] |
no_license
|
Jkurbs/Journal
|
924dbf4959cfea6f59cc2c99a662e7b6b46754c8
|
085429ac165cd2a1b692449204ee4073da1526a6
|
refs/heads/master
| 2022-06-02T11:11:56.091297 | 2020-05-03T17:40:24 | 2020-05-03T17:40:24 | 259,418,785 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,572 |
swift
|
//
// RecordingView.swift
// Journal
//
// Created by Kerby Jean on 4/28/20.
// Copyright © 2020 Kerby Jean. All rights reserved.
//
import UIKit
class RecordingView: UIView {
// MARK: - Properties
let label = UILabel()
let dotView = UIView()
var timer: Timer!
// MARK: - View Lifecycle
override init(frame: CGRect) {
super.init(frame: frame)
setupViews()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func layoutSubviews() {
super.layoutSubviews()
setupConstraints()
}
// MARK: - Functions
private func setupViews() {
translatesAutoresizingMaskIntoConstraints = false
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.systemFont(ofSize: 17, weight: .medium)
label.textColor = .cloud
label.text = "Rec".capitalized
addSubview(label)
dotView.translatesAutoresizingMaskIntoConstraints = false
dotView.backgroundColor = .red
addSubview(dotView)
NotificationCenter.default.addObserver(self, selector: #selector(recordingStarted), name: .startRecordingNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(recordingStoped), name: .stopRecordingNotification, object: nil)
}
@objc func recordingStarted() {
timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { (timer) in
UIView.animate(withDuration: 1.0, animations: {
self.dotView.alpha = 0.2
}) { (finished) in
UIView.animate(withDuration: 1.0, animations: {
self.dotView.alpha = 1.0
})
}
}
}
@objc func recordingStoped() {
timer.invalidate()
}
private func setupConstraints() {
NSLayoutConstraint.activate([
label.leftAnchor.constraint(equalTo: leftAnchor, constant: 0),
label.centerYAnchor.constraint(equalTo: centerYAnchor),
dotView.centerYAnchor.constraint(equalTo: centerYAnchor, constant: 2),
dotView.leftAnchor.constraint(equalTo: label.rightAnchor, constant: 8.0),
dotView.heightAnchor.constraint(equalToConstant: 10),
dotView.widthAnchor.constraint(equalToConstant: 10)
])
dotView.layer.cornerRadius = dotView.bounds.size.width/2
}
}
|
[
-1
] |
aec0b0f7ceba1f5533ce73feea59084ce246d5d8
|
40fd7f9614d07bf4426f1a91371275a93e768b13
|
/sketch/Model/Line.swift
|
43ae9d96478d0dc7b5dc559e806b47d0a2456259
|
[] |
no_license
|
venkatmanavarthi/sketch
|
7908c7c03c1c637b8e776f836153740821b0e7f1
|
1bab357bd253cda1b26fce4469c4fe7c0af5f84e
|
refs/heads/master
| 2023-02-03T23:52:20.205183 | 2020-11-19T11:57:59 | 2020-11-19T11:57:59 | 290,654,127 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 273 |
swift
|
//
// Line.swift
// sketch
//
// Created by manavarthivenkat on 27/08/20.
// Copyright © 2020 manavarthi. All rights reserved.
//
import UIKit
struct Line {
let strokeColor : CGColor
let strokeWidth : Float
var point : [CGPoint]
let opacity : Float
}
|
[
-1
] |
9a00d5942834f5769ef2f84a3656149f4bad52f1
|
850587a3b3040eabf4125656cc1d49076f848c46
|
/IgvPeruApple/AppDelegate.swift
|
85da5b0c2664246f47e9a1c1295f540486592e12
|
[] |
no_license
|
doapps/IgvPeruApple
|
f802133b7a24d18348a96a80220467eec562facc
|
08de2c72fb32246446be0ee950c9d4953a963627
|
refs/heads/master
| 2020-04-09T18:36:45.125108 | 2016-03-04T16:35:43 | 2016-03-04T16:35:43 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 6,535 |
swift
|
//
// AppDelegate.swift
// IgvPeruApple
//
// Created by DoApps on 2/13/16.
// Copyright © 2016 DoApps. All rights reserved.
//
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
// Custom NavigationBar
/*let imageNav:UIImage = UIImage(named: "button_background")!
UINavigationBar.appearance().setBackgroundImage(imageNav, forBarMetrics: .Default)*/
/*UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().translucent = true*/
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:.
// Saves changes in the application's managed object context before the application terminates.
self.saveContext()
}
// MARK: - Core Data stack
lazy var applicationDocumentsDirectory: NSURL = {
// The directory the application uses to store the Core Data store file. This code uses a directory named "me.doapps.IgvPeruApple" in the application's documents Application Support directory.
let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)
return urls[urls.count-1]
}()
lazy var managedObjectModel: NSManagedObjectModel = {
// The managed object model for the application. This property is not optional. It is a fatal error for the application not to be able to find and load its model.
let modelURL = NSBundle.mainBundle().URLForResource("IgvPeruApple", withExtension: "momd")!
return NSManagedObjectModel(contentsOfURL: modelURL)!
}()
lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = {
// The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail.
// Create the coordinator and store
let coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("SingleViewCoreData.sqlite")
var failureReason = "There was an error creating or loading the application's saved data."
do {
try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil)
} catch {
// Report any error we got.
var dict = [String: AnyObject]()
dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data"
dict[NSLocalizedFailureReasonErrorKey] = failureReason
dict[NSUnderlyingErrorKey] = error as NSError
let wrappedError = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict)
// Replace this with code to handle the error appropriately.
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
NSLog("Unresolved error \(wrappedError), \(wrappedError.userInfo)")
abort()
}
return coordinator
}()
lazy var managedObjectContext: NSManagedObjectContext = {
// Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) This property is optional since there are legitimate error conditions that could cause the creation of the context to fail.
let coordinator = self.persistentStoreCoordinator
var managedObjectContext = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
managedObjectContext.persistentStoreCoordinator = coordinator
return managedObjectContext
}()
// MARK: - Core Data Saving support
func saveContext () {
if managedObjectContext.hasChanges {
do {
try managedObjectContext.save()
} catch {
// Replace this implementation with code to handle the error appropriately.
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
NSLog("Unresolved error \(nserror), \(nserror.userInfo)")
abort()
}
}
}
}
|
[
283144,
277514,
277003,
280085,
278042,
276510,
281635,
194085,
277030,
228396,
277038,
223280,
278577,
280132,
162394,
282203,
189025,
292450,
285796,
279148,
278125,
285296,
227455,
278656,
228481,
276611,
278665,
280205,
225934,
278674,
188050,
276629,
283803,
278687,
282274,
277154,
278692,
228009,
287402,
278700,
284845,
278705,
276149,
278711,
279223,
278718,
283838,
228544,
279753,
229068,
227533,
280273,
201439,
278751,
226031,
159477,
280312,
279304,
181516,
203532,
277262,
280335,
284432,
278289,
278801,
284434,
321296,
278287,
276755,
278808,
278297,
282910,
281379,
282915,
280370,
277306,
278844,
280382,
282433,
237382,
164166,
226634,
227667,
276313,
278877,
280415,
277344,
276321,
227687,
334185,
279405,
278896,
277363,
281972,
278902,
280439,
276347,
228220,
279422,
278916,
284557,
293773,
191374,
277395,
283028,
288147,
214934,
278943,
282016,
283554,
230320,
230322,
281011,
283058,
286130,
278971,
276923,
282558,
299970,
280007,
288200,
284617,
287689,
286157,
326096,
281041,
283091,
282585,
294390,
214010
] |
a8aa1a85eaaa6be46d3024deb1d4772eff22ab72
|
4b910d0dad20e98a16fc700c14284b2decc7b2d3
|
/NSURLSession/parBabcock.swift
|
5ab6b8625738a54cd3190167816d072494a12195
|
[] |
no_license
|
ajayjjain/UIUC-Laundry
|
03e9fbc1277dcd184fbbdf81c326d58e61e73e4b
|
c82c0b05a1303565fc1d26f2a0a36acb3de852ac
|
refs/heads/master
| 2020-12-20T15:35:31.121781 | 2016-08-22T03:09:16 | 2016-08-22T03:09:16 | 61,928,228 | 0 | 0 | null | 2016-08-22T03:09:16 | 2016-06-25T05:16:25 |
Swift
|
UTF-8
|
Swift
| false | false | 19,294 |
swift
|
//
// ViewController.swift
//
//
// Created by Ajay Jain on 6/20/2016
// Copyright © 2016 Ajay Jain. All rights reserved.
//
import UIKit
import AudioToolbox
class parBabcock: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let grayColor = UIColor(red: 222/255.0, green: 222/255.0, blue: 222/255.0, alpha: 1.0)
let illiniBlue = UIColor(red: 0/255.0, green: 32/255.0, blue: 91/255.0, alpha: 1.0)
let illiniOrange = UIColor(red: 232/255.0, green: 119/255.0, blue: 34/255.0, alpha: 1.0)
self.navigationController!.navigationBar.barTintColor = illiniBlue
self.view.backgroundColor = grayColor
self.navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: illiniOrange]
UINavigationBar.appearance().tintColor = UIColor.whiteColor()
self.navigationController!.navigationBar.tintColor = UIColor.whiteColor()
let navBgImage:UIImage = UIImage(named: "logo.jpeg")!
UINavigationBar.appearance().setBackgroundImage(navBgImage, forBarMetrics: .Default)
let image : UIImage = UIImage(named: "logo1.jpg")!
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 40, height: 40))
imageView.contentMode = .ScaleAspectFit
imageView.image = image
self.navigationItem.titleView = imageView
parse()
borderLabel.layer.borderColor = UIColor.orangeColor().CGColor
borderLabel.layer.borderWidth = 2.0;
/*let stringKey = NSUserDefaults.standardUserDefaults()
var bookmark = stringKey.stringForKey("bookmark")*/
let myTimer = NSTimer(timeInterval: 30.0, target: self, selector: "parse", userInfo: nil, repeats: true)
NSRunLoop.mainRunLoop().addTimer(myTimer, forMode: NSDefaultRunLoopMode)
let alarmTimer = NSTimer(timeInterval: 30.0, target: self, selector: "alarm", userInfo: nil, repeats: true)
NSRunLoop.mainRunLoop().addTimer(alarmTimer, forMode: NSDefaultRunLoopMode)
}
override func viewWillAppear(animated: Bool) {
let defaults = NSUserDefaults.standardUserDefaults()
if let name = defaults.stringForKey("dorm") {
if name == "parBabcock"{
self.myDormButton.setTitle("My Dorm", forState: .Normal)
}
else{
self.myDormButton.setTitle("Set As My Dorm", forState: .Normal)
}
}
}
/* @IBAction func setDorm(sender: AnyObject) {
let defaults = NSUserDefaults.standardUserDefaults()
defaults.setObject("parBlaisdell", forKey: "dorm")
}*/
@IBOutlet weak var machineOneStatusLabel: UILabel!
@IBOutlet weak var machineTwoStatusLabel: UILabel!
@IBOutlet weak var machineThreeStatusLabel: UILabel!
@IBOutlet weak var machineFourStatusLabel: UILabel!
@IBOutlet weak var machineFiveStatusLabel: UILabel!
@IBOutlet weak var borderLabel: UILabel!
@IBOutlet weak var oneTimeRemaining: UILabel!
@IBOutlet weak var twoTimeRemaining: UILabel!
@IBOutlet weak var threeTimeRemaining: UILabel!
@IBOutlet weak var fourTimeRemaining: UILabel!
@IBOutlet weak var fiveTimeRemaining: UILabel!
var machineOne = "n/a"
var machineTwo = "n/a"
var machineThree = "n/a"
var machineFour = "n/a"
var machineFive = "n/a"
var machineSix = "n/a"
var machineSeven = "n/a"
var machineEight = "n/a"
var machineNine = "n/a"
var machineOneStatus = ""
var machineTwoStatus = ""
var machineThreeStatus = ""
var machineFourStatus = ""
var machineFiveStatus = ""
var machineSixStatus = ""
var machineSevenStatus = ""
var machineEightStatus = ""
var machineNineStatus = ""
var machineOneAlarm = false
var machineTwoAlarm = false
var machineThreeAlarm = false
var machineFourAlarm = false
var machineFiveAlarm = false
var washersAvailable = ""
var dryersAvailable = ""
var peopleWaiting = ""
var array = [String]()
var elements = [String]()
@IBOutlet weak var washersAvailableLabel: UILabel!
@IBOutlet weak var dryersAvailableLabel: UILabel!
@IBOutlet weak var myDormButton: UIButton!
@IBAction func writeButton(sender: AnyObject) {
let defaults = NSUserDefaults.standardUserDefaults()
defaults.setObject("parBabcock", forKey: "dorm")
self.myDormButton.setTitle("My Dorm", forState: .Normal)
}
@IBAction func labelOnePress(sender: AnyObject) {
if self.machineOne != "Available" && machineOneStatus != "not updating status"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
let intString = machineOneStatus.componentsSeparatedByCharactersInSet(
NSCharacterSet
.decimalDigitCharacterSet()
.invertedSet)
.joinWithSeparator("")
var time = Double(intString)
time = time! * 60
// time = 5
let notification = UILocalNotification()
notification.alertBody = "Machine One at PAR Babcock is ready."
// You should set also the notification time zone otherwise the fire date is interpreted as an absolute GMT time
notification.timeZone = NSTimeZone.localTimeZone()
// you can simplify setting your fire date using dateByAddingTimeInterval
notification.fireDate = NSDate().dateByAddingTimeInterval(time!)
// set the notification property before scheduleLocalNotification
UIApplication.sharedApplication().scheduleLocalNotification(notification)
}
}
@IBAction func labelTwoPress(sender: AnyObject) {
if self.machineTwo != "Available" && machineTwoStatus != "not updating status"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
let intString = machineTwoStatus.componentsSeparatedByCharactersInSet(
NSCharacterSet
.decimalDigitCharacterSet()
.invertedSet)
.joinWithSeparator("")
var time = Double(intString)
time = time! * 60
print("ok")
let notification = UILocalNotification()
notification.alertBody = "Machine Two at PAR Babcock is ready."
// You should set also the notification time zone otherwise the fire date is interpreted as an absolute GMT time
notification.timeZone = NSTimeZone.localTimeZone()
// you can simplify setting your fire date using dateByAddingTimeInterval
notification.fireDate = NSDate().dateByAddingTimeInterval(time!)
// set the notification property before scheduleLocalNotification
UIApplication.sharedApplication().scheduleLocalNotification(notification)
}
}
@IBAction func labelThreePress(sender: AnyObject) {
if self.machineThree != "Available" && machineThreeStatus != "not updating status"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
let intString = machineThreeStatus.componentsSeparatedByCharactersInSet(
NSCharacterSet
.decimalDigitCharacterSet()
.invertedSet)
.joinWithSeparator("")
var time = Double(intString)
time = time! * 60
print("ok")
let notification = UILocalNotification()
notification.alertBody = "Machine Three at PAR Babcock is ready."
// You should set also the notification time zone otherwise the fire date is interpreted as an absolute GMT time
notification.timeZone = NSTimeZone.localTimeZone()
// you can simplify setting your fire date using dateByAddingTimeInterval
notification.fireDate = NSDate().dateByAddingTimeInterval(time!)
// set the notification property before scheduleLocalNotification
UIApplication.sharedApplication().scheduleLocalNotification(notification)
}
}
@IBAction func labelFourPress(sender: AnyObject) {
if self.machineFour != "Available" && machineFourStatus != "not updating status"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
let intString = machineFourStatus.componentsSeparatedByCharactersInSet(
NSCharacterSet
.decimalDigitCharacterSet()
.invertedSet)
.joinWithSeparator("")
var time = Double(intString)
time = time! * 60
print("ok")
let notification = UILocalNotification()
notification.alertBody = "Machine Four at PAR Babcock is ready."
// You should set also the notification time zone otherwise the fire date is interpreted as an absolute GMT time
notification.timeZone = NSTimeZone.localTimeZone()
// you can simplify setting your fire date using dateByAddingTimeInterval
notification.fireDate = NSDate().dateByAddingTimeInterval(time!)
// set the notification property before scheduleLocalNotification
UIApplication.sharedApplication().scheduleLocalNotification(notification)
}
}
@IBAction func labelFivePress(sender: AnyObject) {
if self.machineFive != "Available" && machineFiveStatus != "not updating status"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
let intString = machineFiveStatus.componentsSeparatedByCharactersInSet(
NSCharacterSet
.decimalDigitCharacterSet()
.invertedSet)
.joinWithSeparator("")
var time = Double(intString)
time = time! * 60
print("ok")
let notification = UILocalNotification()
notification.alertBody = "Machine Five at PAR Babcock is ready."
// You should set also the notification time zone otherwise the fire date is interpreted as an absolute GMT time
notification.timeZone = NSTimeZone.localTimeZone()
// you can simplify setting your fire date using dateByAddingTimeInterval
notification.fireDate = NSDate().dateByAddingTimeInterval(time!)
// set the notification property before scheduleLocalNotification
UIApplication.sharedApplication().scheduleLocalNotification(notification)
}
}
func parse() {
array = [String]()
elements = [String]()
let myURLAdress = "https://www.laundryalert.com/cgi-bin/urba7723/LMRoom?XallingPage=LMRoom&Halls=19&RoomPersistence=&MachinePersistenceA=022&MachinePersistenceB=020"
//let myURLAdress = "https://www.laundryalert.com/cgi-bin/urba7723/LMRoom?CallingPage=LMPage&Halls=5&PreviousHalls=&RoomPersistence=&MachinePersistenceA=&MachinePersistenceB="
let myURL = NSURL(string: myURLAdress)
let URLTask = NSURLSession.sharedSession().dataTaskWithURL(myURL!) {
myData, response, error in
guard error == nil else { return }
let myHTMLString = String(data: myData!, encoding: NSUTF8StringEncoding)
let html = myHTMLString
if let doc = HTML(html: html!, encoding: NSUTF8StringEncoding) {
for link in doc.css("font") { // font, face
if (link.text != nil){
var tempString = link.text!
var newString = tempString.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()
)
self.array.append(newString)
}
}
var n = 0
while n < self.array.count - 1{
if n != 0 && n != 8 && n != 10 && n != 12 && n != 14{
if self.array[n] == "In Use" && self.array[n-1] != "In Use"{
self.elements.append(self.array[n])
self.elements.append(self.array[n+2])
}
else if self.array[n] == "Available" && self.array[n-1] != "Available"{
self.elements.append(self.array[n])
self.elements.append("")
}
else if n == 7{
self.elements.append(self.array[n])
}
else if self.array[n] == self.array[n+1]{
self.elements.append(self.array[n])
}
}
n = n + 1
}
self.washersAvailable = self.elements[0]
self.dryersAvailable = self.elements[1]
self.peopleWaiting = self.elements[2]
self.machineOne = self.elements[5]
self.machineOneStatus = self.elements[6]
self.machineTwo = self.elements[9]
self.machineTwoStatus = self.elements[10]
self.machineThree = self.elements[13]
self.machineThreeStatus = self.elements[14]
self.machineFour = self.elements[17]
self.machineFourStatus = self.elements[18]
self.machineFive = self.elements[21]
self.machineFiveStatus = self.elements[22]
self.machineSix = self.elements[25]
self.machineSixStatus = self.elements[26]
self.machineSeven = self.elements[29]
self.machineSevenStatus = self.elements[30]
self.machineEight = self.elements[33]
self.machineEightStatus = self.elements[34]
self.machineNine = self.elements[37]
self.machineNineStatus = self.elements[38]
/*print(self.elements)
print(self.machineOneStatus)
print(self.elements[6])
print(self.machineTwo)
print(self.machineTwoStatus)*/
dispatch_async(dispatch_get_main_queue()) {
self.washersAvailableLabel.text = self.washersAvailable
self.dryersAvailableLabel.text = self.dryersAvailable
self.machineOneStatusLabel.text = self.machineOne
self.machineTwoStatusLabel.text = self.machineTwo
self.machineThreeStatusLabel.text = self.machineThree
self.machineFourStatusLabel.text = self.machineFour
self.machineFiveStatusLabel.text = self.machineFive
self.oneTimeRemaining.text = self.machineOneStatus
self.twoTimeRemaining.text = self.machineTwoStatus
self.threeTimeRemaining.text = self.machineThreeStatus
self.fourTimeRemaining.text = self.machineFourStatus
self.fiveTimeRemaining.text = self.machineFiveStatus
if self.machineOne == "Available"{
self.machineOneStatusLabel.textColor = UIColor.greenColor()
}
else{
self.machineOneStatusLabel.textColor = UIColor.redColor()
}
if self.machineTwo == "Available"{
self.machineTwoStatusLabel.textColor = UIColor.greenColor()
}
else{
self.machineTwoStatusLabel.textColor = UIColor.redColor()
}
if self.machineThree == "Available"{
self.machineThreeStatusLabel.textColor = UIColor.greenColor()
}
else{
self.machineThreeStatusLabel.textColor = UIColor.redColor()
}
if self.machineFour == "Available"{
self.machineFourStatusLabel.textColor = UIColor.greenColor()
}
else{
self.machineFourStatusLabel.textColor = UIColor.redColor()
}
if self.machineFive == "Available"{
self.machineFiveStatusLabel.textColor = UIColor.greenColor()
}
else{
self.machineFiveStatusLabel.textColor = UIColor.redColor()
}
}
}
}
URLTask.resume()
}
func alarm(){
let notification = UILocalNotification()
if machineOneAlarm == true{
if self.machineOne == "Available"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
notification.alertBody = "Machine One at Daniels North is ready"
UIApplication.sharedApplication().scheduleLocalNotification(notification)
machineOneAlarm = false
}
}
if machineTwoAlarm == true{
if self.machineTwo == "Available"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
notification.alertBody = "Machine Two at Daniels North is ready"
UIApplication.sharedApplication().scheduleLocalNotification(notification)
machineTwoAlarm = false
}
}
if machineThreeAlarm == true{
if self.machineThree == "Available"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
notification.alertBody = "Machine Three at Daniels North is ready"
UIApplication.sharedApplication().scheduleLocalNotification(notification)
machineThreeAlarm = false
}
}
if machineFourAlarm == true{
if self.machineFour == "Available"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
notification.alertBody = "Machine Four at Daniels North is ready"
UIApplication.sharedApplication().scheduleLocalNotification(notification)
machineFourAlarm = false
}
}
if machineFiveAlarm == true{
if self.machineFive == "Available"{
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
notification.alertBody = "Machine Five at Daniels North is ready"
UIApplication.sharedApplication().scheduleLocalNotification(notification)
machineFiveAlarm = false
}
}
}
}
|
[
-1
] |
5c7e88603be06bcbb6cad44a47edcc800f664c2d
|
3b16f2e47139bbd57be4f595996e23fa63d7a502
|
/ABSensorSDKDemo/ABSensorSDKDemo/SensorViewController.swift
|
ce47c224dad5d3cdeaee03221b30dde789c5a1bb
|
[
"MIT"
] |
permissive
|
AprilBrother/ABSensor-iOS-SDK
|
076a08460046f9b4fcd27c15dd1bad404de517e1
|
3bc6a6dc0f979f7b9476825773ac53ce01bc30fb
|
refs/heads/master
| 2021-05-04T09:25:57.894770 | 2016-10-11T06:14:23 | 2016-10-11T06:14:23 | 70,457,582 | 0 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,580 |
swift
|
//
// SensorViewController.swift
// ABSensorSDKDemo
//
// Created by liaojinhua on 2016/9/21.
// Copyright © 2016年 April Brother. All rights reserved.
//
import UIKit
import ABSensorSDK
class SensorViewController: UITableViewController {
private var sensorManager:ABSensorManager?
fileprivate var sensors = [ABSensor]()
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.estimatedRowHeight = 44
self.tableView.rowHeight = UITableViewAutomaticDimension
sensorManager = ABSensorManager.init(delegate: self)
sensorManager?.startMonitoringForIdentifier(identifier: nil)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
extension SensorViewController:ABSensorManagerDelegate {
func sensorManager(manager: ABSensorManager, didMonitoredSensor sensor: ABSensor) {
if !sensors.contains(sensor) {
sensors.append(sensor)
}
self.tableView.reloadData()
}
func sensorManager(manager: ABSensorManager, didMonitoredForIdentifier: String, sensor: ABSensor) {
}
}
extension SensorViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return sensors.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "SensorCell", for: indexPath)
let sensor = sensors[indexPath.row]
let name = sensor.name + "\n"
let info = "mac:\(sensor.macAddress) rssi:\(sensor.rssi) x:\(sensor.xAcceleration) y:\(sensor.yAcceleration) z:\(sensor.zAcceleration) battery:\(sensor.battery) isMotion:\(sensor.isMotion) currentMotionTime:\(sensor.currentMotionTime) lastMotionTime:\(sensor.lastMotionTime)"
let attributeString = NSMutableAttributedString()
var attributes = [NSFontAttributeName:UIFont.systemFont(ofSize: 15), NSForegroundColorAttributeName:UIColor.black]
attributeString.append(NSAttributedString.init(string: name, attributes: attributes))
attributes = [NSFontAttributeName:UIFont.systemFont(ofSize: 13), NSForegroundColorAttributeName:UIColor.darkGray]
attributeString.append(NSAttributedString.init(string: info, attributes: attributes))
cell.textLabel?.attributedText = attributeString
return cell
}
}
|
[
-1
] |
538f9591b4924d8ba052ee6bc0d823fb5a596fd3
|
32fa766388e1713e786c8baea2bbe6a6ef4730ca
|
/Reservation System : Hotel .playground/Contents.swift
|
23ab97de96e44658c2babf530111fd428fe12d87
|
[] |
no_license
|
AfafSaleh55/Reservation-System
|
62376f1df9c0cdf765dcf7484981c4b5800f03b6
|
3ac635c91e112847138a541be413844972a9bc08
|
refs/heads/main
| 2023-08-28T03:53:16.999050 | 2021-10-13T18:35:15 | 2021-10-13T18:35:15 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,851 |
swift
|
import UIKit
//Can user log in
let isLoggedIn:Bool = false
if isLoggedIn {
print("The system is logged in ✅ \n ----------------")
} else {
print("The password you entered is incorrect ❌")
}
enum Roomcondition {
case available
case Unavailable
}
var hotellocation: Set<String>
hotellocation = []
hotellocation.insert("Jeedh")
hotellocation.insert("Ryadh")
hotellocation.insert("Dammam")
print("Hotel Location 📍\n \(hotellocation) \n ----------------")
//Can user view type room
//Can user view room list and prices
struct Room {
var typeRoom: String = ""
var roomNum: Int = 0
var pricesroom: Double = 0
var options : [String] = []
var isAvailable: Roomcondition
func checkIfRoomAvailable() -> String? {
if isAvailable == .available {
return "available"
} else {
return "Unavailable"
}
}
}
class Hotel {
var rooms : [Room] = []
init(multipleRooms: Room) {
self.rooms = [multipleRooms]
}
func printAll() {
for we in rooms {
print("🔘Room List and Price💰\nTypes Room : \(we.typeRoom) \nRoom number : \(we.roomNum) \nRoom price : \(we.pricesroom)")
}
}
func AddRoom(AddROMS1 : Room){
rooms.append(AddROMS1)
print("Add Room")
}
func DeletRoom(index : Int){
rooms.remove(at : index)
print("Delet Room")
}
func updateRoom(index: Int, updateRoom: Room){
rooms[index] = updateRoom
print("Chenge Room")
}
}
var room1 = Room(typeRoom: "Master Room", roomNum: 101, pricesroom: 405.9, options: [], isAvailable: .Unavailable)
var room2 = Room(typeRoom: "Mini-Suit", roomNum: 209, pricesroom: 600.8, options: [], isAvailable: .available)
var room3 = Room.init(typeRoom: "Master room", roomNum: 608, pricesroom: 44.9, options: [], isAvailable: .Unavailable)
let myHotel = Hotel(multipleRooms: room1)
myHotel.AddRoom(AddROMS1: room2)
//myHotel.DeletRoom(index: 0)
//myHotel.updateRoom(index: 0, updateRoom: room2)
myHotel.printAll()
var MasterRoom = [String]()
MasterRoom.append("Break Fast")
MasterRoom.append("Swimming Pool")
MasterRoom.append("WiFi")
MasterRoom.append("Gym")
var PriceMR = [Int]()
PriceMR.append(200)
PriceMR.append(250)
PriceMR.append(150)
PriceMR.append(200)
PriceMR.sort()
print(" \(MasterRoom)\n \(PriceMR)")
//var RoomPrice: Dictionary<String,Int>
//RoomPrice = ["OK": 78,
// "Access forbidden": 76,
// "File not found": 876,
// "Internal server error": 98]
//print(RoomPrice)
//Can user reserve booking
//Can user cancellation of rooms
let bookingAndcancellation:Bool = false
if bookingAndcancellation {
print(" --------------\n Room is booked")}
else{
print(" --------------\n Room reservation has been cancelled")
}
|
[
-1
] |
4554368c7137229e334dd94d6cd08b74ebcec9b4
|
a63f336fd75635be857cefd9c1c405381f995fdb
|
/Pods/SwiftOverlays/SwiftOverlays/SwiftOverlays.swift
|
211542eb6eb95b0300a25c9173b4aed96043c7f5
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
playportal-studio/AirTime
|
05910a0b8704c65220273dfdba657fe89c416abb
|
478a02109284981a10d78320dd4a62c510784cd7
|
refs/heads/master
| 2021-07-10T03:03:29.745892 | 2020-06-22T17:20:37 | 2020-06-22T17:20:37 | 147,677,803 | 4 | 7 |
Apache-2.0
| 2020-06-19T16:42:24 | 2018-09-06T13:28:58 |
Objective-C
|
UTF-8
|
Swift
| false | false | 19,135 |
swift
|
//
// SwiftOverlays.swift
// SwiftTest
//
// Created by Peter Prokop on 15/10/14.
// Copyright (c) 2014 Peter Prokop. All rights reserved.
//
import Foundation
import UIKit
// For convenience methods
public extension UIViewController {
/**
Shows wait overlay with activity indicator, centered in the view controller's main view
Do not use this method for **UITableViewController** or **UICollectionViewController**
- returns: Created overlay
*/
@discardableResult
func showWaitOverlay() -> UIView {
return SwiftOverlays.showCenteredWaitOverlay(self.view)
}
/**
Shows wait overlay with activity indicator *and text*, centered in the view controller's main view
Do not use this method for **UITableViewController** or **UICollectionViewController**
- parameter text: Text to be shown on overlay
- returns: Created overlay
*/
@discardableResult
func showWaitOverlayWithText(_ text: String) -> UIView {
return SwiftOverlays.showCenteredWaitOverlayWithText(self.view, text: text)
}
/**
Shows *text-only* overlay, centered in the view controller's main view
Do not use this method for **UITableViewController** or **UICollectionViewController**
- parameter text: Text to be shown on overlay
- returns: Created overlay
*/
@discardableResult
func showTextOverlay(_ text: String) -> UIView {
return SwiftOverlays.showTextOverlay(self.view, text: text)
}
/**
Shows overlay with text and progress bar, centered in the view controller's main view
Do not use this method for **UITableViewController** or **UICollectionViewController**
- parameter text: Text to be shown on overlay
- returns: Created overlay
*/
@discardableResult
func showProgressOverlay(_ text: String) -> UIView {
return SwiftOverlays.showProgressOverlay(self.view, text: text)
}
/**
Shows overlay *with image and text*, centered in the view controller's main view
Do not use this method for **UITableViewController** or **UICollectionViewController**
- parameter image: Image to be added to overlay
- parameter text: Text to be shown on overlay
- returns: Created overlay
*/
@discardableResult
func showImageAndTextOverlay(_ image: UIImage, text: String) -> UIView {
return SwiftOverlays.showImageAndTextOverlay(self.view, image: image, text: text)
}
/**
Shows notification on top of the status bar, similar to native local or remote notifications
- parameter notificationView: View that will be shown as notification
- parameter duration: Amount of time until notification disappears
- parameter animated: Should appearing be animated
*/
class func showNotificationOnTopOfStatusBar(_ notificationView: UIView, duration: TimeInterval, animated: Bool = true) {
SwiftOverlays.showAnnoyingNotificationOnTopOfStatusBar(notificationView, duration: duration, animated: animated)
}
/**
Removes all overlays from view controller's main view
*/
func removeAllOverlays() {
SwiftOverlays.removeAllOverlaysFromView(self.view)
}
/**
Updates text on the current overlay.
Does nothing if no overlay is present.
- parameter text: Text to set
*/
func updateOverlayText(_ text: String) {
SwiftOverlays.updateOverlayText(self.view, text: text)
}
/**
Updates progress on the current overlay.
Does nothing if no overlay is present.
- parameter progress: Progress to set 0.0 .. 1.0
*/
func updateOverlayProgress(_ progress: Float) {
SwiftOverlays.updateOverlayProgress(self.view, progress: progress)
}
}
open class SwiftOverlays: NSObject {
// You can customize these values
// Some random number
static let containerViewTag = 456987123
static let cornerRadius = CGFloat(10)
static let padding = CGFloat(10)
static let backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.7)
static let textColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)
static let font = UIFont.systemFont(ofSize: 14)
// Annoying notifications on top of status bar
static let bannerDissapearAnimationDuration = 0.5
static var bannerWindow : UIWindow?
open class Utils {
/**
Adds autolayout constraints to innerView to center it in its superview and fix its size.
`innerView` should have a superview.
- parameter innerView: View to set constraints on
*/
public static func centerViewInSuperview(_ view: UIView) {
assert(view.superview != nil, "`view` should have a superview")
view.translatesAutoresizingMaskIntoConstraints = false
let constraintH = NSLayoutConstraint(item: view,
attribute: NSLayoutAttribute.centerX,
relatedBy: NSLayoutRelation.equal,
toItem: view.superview,
attribute: NSLayoutAttribute.centerX,
multiplier: 1,
constant: 0)
let constraintV = NSLayoutConstraint(item: view,
attribute: NSLayoutAttribute.centerY,
relatedBy: NSLayoutRelation.equal,
toItem: view.superview,
attribute: NSLayoutAttribute.centerY,
multiplier: 1,
constant: 0)
let constraintWidth = NSLayoutConstraint(item: view,
attribute: NSLayoutAttribute.width,
relatedBy: NSLayoutRelation.equal,
toItem: nil,
attribute: NSLayoutAttribute.notAnAttribute,
multiplier: 1,
constant: view.frame.size.width)
let constraintHeight = NSLayoutConstraint(item: view,
attribute: NSLayoutAttribute.height,
relatedBy: NSLayoutRelation.equal,
toItem: nil,
attribute: NSLayoutAttribute.notAnAttribute,
multiplier: 1,
constant: view.frame.size.height)
view.superview!.addConstraints([constraintV, constraintH, constraintWidth, constraintHeight])
}
}
// MARK: - Public class methods -
// MARK: Blocking
/**
Shows *blocking* wait overlay with activity indicator, centered in the app's main window
- returns: Created overlay
*/
@discardableResult
open class func showBlockingWaitOverlay() -> UIView {
let blocker = addMainWindowBlocker()
showCenteredWaitOverlay(blocker)
return blocker
}
/**
Shows wait overlay with activity indicator *and text*, centered in the app's main window
- parameter text: Text to be shown on overlay
- returns: Created overlay
*/
@discardableResult
open class func showBlockingWaitOverlayWithText(_ text: String) -> UIView {
let blocker = addMainWindowBlocker()
showCenteredWaitOverlayWithText(blocker, text: text)
return blocker
}
/**
Shows *blocking* overlay *with image and text*,, centered in the app's main window
- parameter image: Image to be added to overlay
- parameter text: Text to be shown on overlay
- returns: Created overlay
*/
open class func showBlockingImageAndTextOverlay(_ image: UIImage, text: String) -> UIView {
let blocker = addMainWindowBlocker()
showImageAndTextOverlay(blocker, image: image, text: text)
return blocker
}
/**
Shows *text-only* overlay, centered in the app's main window
- parameter text: Text to be shown on overlay
- returns: Created overlay
*/
open class func showBlockingTextOverlay(_ text: String) -> UIView {
let blocker = addMainWindowBlocker()
showTextOverlay(blocker, text: text)
return blocker
}
/**
Removes all *blocking* overlays from application's main window
*/
open class func removeAllBlockingOverlays() {
let window = UIApplication.shared.delegate!.window!!
removeAllOverlaysFromView(window)
}
// MARK: Non-blocking
@discardableResult
open class func showCenteredWaitOverlay(_ parentView: UIView) -> UIView {
let ai = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.whiteLarge)
ai.startAnimating()
let containerViewRect = CGRect(x: 0,
y: 0,
width: ai.frame.size.width * 2,
height: ai.frame.size.height * 2)
let containerView = UIView(frame: containerViewRect)
containerView.tag = containerViewTag
containerView.layer.cornerRadius = cornerRadius
containerView.backgroundColor = backgroundColor
containerView.center = CGPoint(x: parentView.bounds.size.width/2,
y: parentView.bounds.size.height/2);
ai.center = CGPoint(x: containerView.bounds.size.width/2,
y: containerView.bounds.size.height/2);
containerView.addSubview(ai)
parentView.addSubview(containerView)
Utils.centerViewInSuperview(containerView)
return containerView
}
@discardableResult
open class func showCenteredWaitOverlayWithText(_ parentView: UIView, text: String) -> UIView {
let ai = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.white)
ai.startAnimating()
return showGenericOverlay(parentView, text: text, accessoryView: ai)
}
@discardableResult
open class func showImageAndTextOverlay(_ parentView: UIView, image: UIImage, text: String) -> UIView {
let imageView = UIImageView(image: image)
return showGenericOverlay(parentView, text: text, accessoryView: imageView)
}
open class func showGenericOverlay(_ parentView: UIView, text: String, accessoryView: UIView, horizontalLayout: Bool = true) -> UIView {
let label = labelForText(text)
var actualSize = CGSize.zero
if horizontalLayout {
actualSize = CGSize(width: accessoryView.frame.size.width + label.frame.size.width + padding * 3,
height: max(label.frame.size.height, accessoryView.frame.size.height) + padding * 2)
label.frame = label.frame.offsetBy(dx: accessoryView.frame.size.width + padding * 2, dy: padding)
accessoryView.frame = accessoryView.frame.offsetBy(dx: padding, dy: (actualSize.height - accessoryView.frame.size.height)/2)
} else {
actualSize = CGSize(width: max(accessoryView.frame.size.width, label.frame.size.width) + padding * 2,
height: label.frame.size.height + accessoryView.frame.size.height + padding * 3)
label.frame = label.frame.offsetBy(dx: padding, dy: accessoryView.frame.size.height + padding * 2)
accessoryView.frame = accessoryView.frame.offsetBy(dx: (actualSize.width - accessoryView.frame.size.width)/2, dy: padding)
}
// Container view
let containerViewRect = CGRect(x: 0,
y: 0,
width: actualSize.width,
height: actualSize.height)
let containerView = UIView(frame: containerViewRect)
containerView.tag = containerViewTag
containerView.layer.cornerRadius = cornerRadius
containerView.backgroundColor = backgroundColor
containerView.center = CGPoint(x: parentView.bounds.size.width/2,
y: parentView.bounds.size.height/2)
containerView.addSubview(accessoryView)
containerView.addSubview(label)
parentView.addSubview(containerView)
Utils.centerViewInSuperview(containerView)
return containerView
}
@discardableResult
open class func showTextOverlay(_ parentView: UIView, text: String) -> UIView {
let label = labelForText(text)
label.frame = label.frame.offsetBy(dx: padding, dy: padding)
let actualSize = CGSize(width: label.frame.size.width + padding * 2,
height: label.frame.size.height + padding * 2)
// Container view
let containerViewRect = CGRect(x: 0,
y: 0,
width: actualSize.width,
height: actualSize.height)
let containerView = UIView(frame: containerViewRect)
containerView.tag = containerViewTag
containerView.layer.cornerRadius = cornerRadius
containerView.backgroundColor = backgroundColor
containerView.center = CGPoint(x: parentView.bounds.size.width/2,
y: parentView.bounds.size.height/2);
containerView.addSubview(label)
parentView.addSubview(containerView)
Utils.centerViewInSuperview(containerView)
return containerView
}
open class func showProgressOverlay(_ parentView: UIView, text: String) -> UIView {
let pv = UIProgressView(progressViewStyle: .default)
return showGenericOverlay(parentView, text: text, accessoryView: pv, horizontalLayout: false)
}
open class func removeAllOverlaysFromView(_ parentView: UIView) {
var overlay: UIView?
while true {
overlay = parentView.viewWithTag(containerViewTag)
if overlay == nil {
break
}
overlay!.removeFromSuperview()
}
}
open class func updateOverlayText(_ parentView: UIView, text: String) {
if let overlay = parentView.viewWithTag(containerViewTag) {
for subview in overlay.subviews {
if let label = subview as? UILabel {
label.text = text as String
break
}
}
}
}
open class func updateOverlayProgress(_ parentView: UIView, progress: Float) {
if let overlay = parentView.viewWithTag(containerViewTag) {
for subview in overlay.subviews {
if let pv = subview as? UIProgressView {
pv.progress = progress
break
}
}
}
}
// MARK: Status bar notification
open class func showAnnoyingNotificationOnTopOfStatusBar(_ notificationView: UIView, duration: TimeInterval, animated: Bool = true) {
if bannerWindow == nil {
bannerWindow = UIWindow()
bannerWindow!.windowLevel = UIWindowLevelStatusBar + 1
bannerWindow!.backgroundColor = UIColor.clear
}
bannerWindow!.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: notificationView.frame.size.height)
bannerWindow!.isHidden = false
let selector = #selector(closeAnnoyingNotificationOnTopOfStatusBar)
let gestureRecognizer = UITapGestureRecognizer(target: self, action: selector)
notificationView.addGestureRecognizer(gestureRecognizer)
bannerWindow!.addSubview(notificationView)
if animated {
let frame = notificationView.frame
let origin = CGPoint(x: 0, y: -frame.height)
notificationView.frame = CGRect(origin: origin, size: frame.size)
// Show appearing animation, schedule calling closing selector after completed
UIView.animate(withDuration: bannerDissapearAnimationDuration, animations: {
let frame = notificationView.frame
notificationView.frame = frame.offsetBy(dx: 0, dy: frame.height)
}, completion: { (finished) in
self.perform(selector, with: notificationView, afterDelay: duration)
})
} else {
// Schedule calling closing selector right away
self.perform(selector, with: notificationView, afterDelay: duration)
}
}
@objc open class func closeAnnoyingNotificationOnTopOfStatusBar(_ sender: AnyObject) {
NSObject.cancelPreviousPerformRequests(withTarget: self)
var notificationView: UIView?
if sender.isKind(of: UITapGestureRecognizer.self) {
notificationView = (sender as! UITapGestureRecognizer).view!
} else if sender.isKind(of: UIView.self) {
notificationView = (sender as! UIView)
}
UIView.animate(withDuration: bannerDissapearAnimationDuration,
animations: { () -> Void in
if let frame = notificationView?.frame {
notificationView?.frame = frame.offsetBy(dx: 0, dy: -frame.size.height)
}
},
completion: { (finished) -> Void in
notificationView?.removeFromSuperview()
bannerWindow?.isHidden = true
}
)
}
// MARK: - Private class methods -
fileprivate class func labelForText(_ text: String) -> UILabel {
let textSize = text.size(withAttributes: [NSAttributedStringKey.font: font])
let labelRect = CGRect(x: 0,
y: 0,
width: textSize.width,
height: textSize.height)
let label = UILabel(frame: labelRect)
label.font = font
label.textColor = textColor
label.text = text as String
label.numberOfLines = 0
return label;
}
fileprivate class func addMainWindowBlocker() -> UIView {
let window = UIApplication.shared.delegate!.window!!
let blocker = UIView(frame: window.bounds)
blocker.backgroundColor = backgroundColor
blocker.tag = containerViewTag
blocker.translatesAutoresizingMaskIntoConstraints = false
window.addSubview(blocker)
let viewsDictionary = ["blocker": blocker]
// Add constraints to handle orientation change
let constraintsV = NSLayoutConstraint.constraints(withVisualFormat: "V:|-0-[blocker]-0-|",
options: NSLayoutFormatOptions(rawValue: 0),
metrics: nil,
views: viewsDictionary)
let constraintsH = NSLayoutConstraint.constraints(withVisualFormat: "|-0-[blocker]-0-|",
options: NSLayoutFormatOptions(rawValue: 0),
metrics: nil,
views: viewsDictionary)
window.addConstraints(constraintsV + constraintsH)
return blocker
}
}
|
[
200572
] |
fe9a637f5a96d8168c72d2fea85716be94cba259
|
08250d84ece9c4cb1c5b2163168f75c56211435e
|
/fearless/Modules/Staking/StakingBalance/StakingBalanceInteractor.swift
|
e2f0eda4af2dc524a0ead381efeb15bdc12c421e
|
[
"Apache-2.0"
] |
permissive
|
DiamondNetwork/fearless-iOS
|
c20f302d3cc42c4c6daaa8e089eb17f41c7ea5bd
|
e625de6f60aedf3d9aa9fa74648e787fac5e1212
|
refs/heads/master
| 2023-09-06T07:19:57.048043 | 2021-09-23T12:59:00 | 2021-09-23T12:59:00 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,728 |
swift
|
import RobinHood
import IrohaCrypto
final class StakingBalanceInteractor: AccountFetching {
weak var presenter: StakingBalanceInteractorOutputProtocol!
let chain: Chain
let accountAddress: AccountAddress
let accountRepository: AnyDataProviderRepository<AccountItem>
let runtimeCodingService: RuntimeCodingServiceProtocol
let chainStorage: AnyDataProviderRepository<ChainStorageItem>
let localStorageRequestFactory: LocalStorageRequestFactoryProtocol
let operationManager: OperationManagerProtocol
let priceProvider: AnySingleValueProvider<PriceData>
let providerFactory: SingleValueProviderFactoryProtocol
let substrateProviderFactory: SubstrateDataProviderFactoryProtocol
let eraCountdownOperationFactory: EraCountdownOperationFactoryProtocol
var activeEraProvider: AnyDataProvider<DecodedActiveEra>?
var stashControllerProvider: StreamableProvider<StashItem>?
var ledgerProvider: AnyDataProvider<DecodedLedgerInfo>?
init(
chain: Chain,
accountAddress: AccountAddress,
accountRepository: AnyDataProviderRepository<AccountItem>,
runtimeCodingService: RuntimeCodingServiceProtocol,
chainStorage: AnyDataProviderRepository<ChainStorageItem>,
localStorageRequestFactory: LocalStorageRequestFactoryProtocol,
priceProvider: AnySingleValueProvider<PriceData>,
providerFactory: SingleValueProviderFactoryProtocol,
eraCountdownOperationFactory: EraCountdownOperationFactoryProtocol,
substrateProviderFactory: SubstrateDataProviderFactoryProtocol,
operationManager: OperationManagerProtocol
) {
self.chain = chain
self.accountAddress = accountAddress
self.accountRepository = accountRepository
self.runtimeCodingService = runtimeCodingService
self.chainStorage = chainStorage
self.localStorageRequestFactory = localStorageRequestFactory
self.priceProvider = priceProvider
self.providerFactory = providerFactory
self.eraCountdownOperationFactory = eraCountdownOperationFactory
self.substrateProviderFactory = substrateProviderFactory
self.operationManager = operationManager
}
func fetchAccounts(for stashItem: StashItem) {
fetchAccount(
for: stashItem.controller,
from: accountRepository,
operationManager: operationManager
) { [weak self] result in
self?.presenter.didReceive(controllerResult: result)
}
fetchAccount(
for: stashItem.stash,
from: accountRepository,
operationManager: operationManager
) { [weak self] result in
self?.presenter.didReceive(stashResult: result)
}
}
func fetchEraCompletionTime() {
let operationWrapper = eraCountdownOperationFactory.fetchCountdownOperationWrapper()
operationWrapper.targetOperation.completionBlock = { [weak self] in
DispatchQueue.main.async {
do {
let result = try operationWrapper.targetOperation.extractNoCancellableResultData()
self?.presenter.didReceive(eraCountdownResult: .success(result))
} catch {
self?.presenter.didReceive(eraCountdownResult: .failure(error))
}
}
}
operationManager.enqueue(operations: operationWrapper.allOperations, in: .transient)
}
}
extension StakingBalanceInteractor: StakingBalanceInteractorInputProtocol {
func setup() {
subscribeToPriceChanges()
subsribeToActiveEra()
subscribeToStashControllerProvider()
fetchEraCompletionTime()
}
}
|
[
-1
] |
09bcafbe53bb43224fea120b019e980198cef69b
|
1a64782a0e71045901e20287daeaa0910c010a91
|
/Swift & C/week_4/08:31/App Development Curriculum/10_QuestionBot/QuestionAnswerer.playground/Pages/Introduction.xcplaygroundpage/Contents.swift
|
75982ff5e0737bd66d419bd57bf8c887dfaa60a8
|
[] |
no_license
|
rsampdev/iOS-Bootcamp
|
9d082836263e0fd5589e4f8df8d1302d295915e3
|
f19259b81d9b3f6817d0509db8621bb48518208f
|
refs/heads/master
| 2020-09-08T06:53:54.611136 | 2019-11-11T17:59:22 | 2019-11-11T17:59:22 | 221,051,954 | 0 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 921 |
swift
|
/*:
## Answering Questions
In this exercise, you're going to work on a function to make QuestionBot answer questions.
You can build the brains of the app in a playground before adding it to the app. This lets you concentrate on the part you’re working on right now.
The “brain” of QuestionBot is the function `responseToQuestion(_:)`. You’re going to try out a few versions of that function.
Here’s an example:
*/
func responseToQuestion(question: String) -> String {
return "Sorry, what was that?"
}
//: Now we can ask questions. Look at the answers in the sidebar 👉
responseToQuestion("How are you?")
responseToQuestion("I said, how are you?")
responseToQuestion("Oh, never mind.")
/*:
This doesn’t make for great conversation. This function gives the same answer, whatever the question. There are more interesting examples coming up.
*/
//:page 1 of 7 | [Next: First Words](@next)
|
[
324247
] |
5ad301050e4c84b074a7e9270ae4f0c900d564dc
|
d2d1ff1484b75ea6225c515b31bff63b3bc8e356
|
/hiraafood/TestBaseTabular/TestBaseTabular.swift
|
202482ef802280c9ae93607f817f62ef6f0a7a63
|
[] |
no_license
|
ppoddar/xcode
|
03fe879e97d1d9e216efe509feb7c8412580888f
|
ac755158f704022fe2ffe43254bf07ba98f75aa4
|
refs/heads/master
| 2022-11-24T10:23:07.086616 | 2020-07-14T19:35:07 | 2020-07-14T19:35:07 | 275,262,223 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,615 |
swift
|
//
// TestBaseTabular.swift
// TestBaseTabular
//
// Created by Pinaki Poddar on 7/1/20.
// Copyright © 2020 Digital Artisan. All rights reserved.
//
import XCTest
@testable import hiraafood
class TestBaseTabular: XCTestCase {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testOrderIsIterable() {
}
func testOrderTotal() throws {
//let order:Order = TestDataFactory.getOrder()
//order.items()
let i1:Item = Item(sku: "101", name: "", category: "", price: 5.99, desc: "", rating: 4, image: "")
let i2:Item = Item(sku: "102", name: "", category: "", price: 6.99, desc: "", rating: 4, image: "")
let o1:OrderItem = OrderItem(item: i1, units: 4)
let o2:OrderItem = OrderItem(item: i2, units: 3)
let cart:Cart = Cart()
let order:Order = Order(id: "1234")
order.addElement(o1)
order.addElement(o2)
cart.addElement(o1)
cart.addElement(o2)
let expected = i1.price*4 + i2.price*3
var actual = order.total
assert(actual == expected,
"order actual \(actual) not equal to expected \(expected)")
actual = cart.total
assert(actual == expected,
"cart actual \(actual) not equal to expected \(expected)")
}
}
|
[
-1
] |
a2a5fcdf77090eb1c5f2921074977c005827299c
|
006a9611d515d6834689eb0f005b3bfe7519a174
|
/Form_Library/Validation/Validation.swift
|
950c3f25236670466590ea80fd14d85750270168
|
[] |
no_license
|
Maj0rPaine/Form_Library
|
410bb33159369ffda9f51b5a842b306b10756fb7
|
a374e09cdf9e888c51b9303ed7a0926766468a26
|
refs/heads/master
| 2020-03-26T12:33:31.933923 | 2019-05-22T20:53:27 | 2019-05-22T20:53:27 | 144,898,284 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,879 |
swift
|
//
// Validation.swift
// Form_Library
//
// Created by Chris Paine on 5/1/19.
// Copyright © 2019 Chris Paine. All rights reserved.
//
import UIKit
import SwiftValidator
enum Rules {
case required
case email
case password
case confirm(field: UITextField)
case date
case zip
case ssn
case phone
}
class FormValidation {
private var validator: Validator = Validator()
private(set) var registeredFields: [FormField] = []
var hasErrors: Bool {
let invalidErrorsNotEmpty = !registeredFields.filter { $0.notValid }.isEmpty
return invalidErrorsNotEmpty
}
var isValid: ((Bool) -> ())?
init() {}
private func build(_ rules: [Rules]) -> [Rule] {
var validationRules: [Rule] = []
for r in rules {
switch r {
case .required: validationRules.append(RequiredRule())
case .email: validationRules.append(EmailRule())
case .password: validationRules.append(PasswordRule())
case .confirm(let field): validationRules.append(ConfirmationRule(confirmField: field))
case .date: validationRules.append(DateRule())
case .zip: validationRules.append(ZipCodeRule())
case .ssn: validationRules.append(SSNRule())
case .phone: validationRules.append(PhoneRule())
}
}
return validationRules
}
// MARK: - Swift Validator methods
private func register(_ field: FormField) {
validator.registerField(field, rules: build(field.rules))
}
private func unregister(_ field: FormField) {
validator.unregisterField(field)
}
func validateForm(_ completion: (([String]?) -> ())? = nil) {
validator.validate { errors in
guard !errors.isEmpty else {
completion?(nil)
return
}
for (field, error) in errors {
if let field = field as? FormField {
field.setErrorMessage(error.errorMessage)
}
}
completion?(errors.map { $0.1.errorMessage })
}
}
func validateField(_ field: FormField) {
validator.validateField(field) { error in
field.setErrorMessage(error?.errorMessage ?? "")
updateValidationState()
}
}
// MARK: - Helper
func observe(_ field: FormField) {
register(field)
registeredFields.append(field)
}
func unobserve(_ field: FormField) {
unregister(field)
if let index = registeredFields.firstIndex(of: field) {
registeredFields.remove(at: index)
}
}
private func updateValidationState() {
isValid?(!hasErrors)
}
}
|
[
-1
] |
51e35c7aff22e1681e70c65b18ea4a4147492131
|
5e8de2094cb4fc4673d86495f3272f3f1f62f445
|
/Example/DualSlideMenu/ExampleViewController.swift
|
c344340ce5fe64a8b56c0899cf4d9850912e4851
|
[
"MIT"
] |
permissive
|
disrvptor/DualSlideMenu
|
f07f74861c01465aba9475342d5640b3d6db079f
|
a2e35ec90220a6a0fe1dc2f21f9d8a8b5c1c6337
|
refs/heads/master
| 2020-07-15T21:48:37.801379 | 2017-12-04T15:36:07 | 2017-12-04T15:36:07 | 73,957,990 | 0 | 0 | null | 2016-11-16T20:24:38 | 2016-11-16T20:24:38 | null |
UTF-8
|
Swift
| false | false | 394 |
swift
|
//
// ExampleViewController.swift
// DualSlideMenu
//
// Created by Vincent Le on 3/25/16.
// Copyright © 2016 CocoaPods. All rights reserved.
//
import UIKit
import DualSlideMenu
class ExampleViewController: UIViewController, DualSlideMenuViewControllerDelegate {
func onSwipe() {
print("did swipe")
}
func didChangeView() {
print("view did change")
}
}
|
[
-1
] |
e69ad0a1c751eb8d562e50b1d70cf85f599c47db
|
1fa006d637c19fbd950fc1bc955e54b021c6d52d
|
/SmartApp/NowPlaying/NowPlayingViewModel.swift
|
4c401011d8400b0e4a94051addfdbedec91b9da8
|
[] |
no_license
|
PatilAkshays/SmartAppDemo
|
cd9f26ae606aaf1cdbf582370de7eb8021938997
|
bd08f3eeb964106906afcaa857eae6619da07660
|
refs/heads/master
| 2022-10-27T22:35:24.504144 | 2020-06-11T12:48:55 | 2020-06-11T12:48:55 | 271,493,975 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,106 |
swift
|
//
// NowPlayingViewModel.swift
// SmartApp
//
// Created by Akshay Patil on 11/06/20.
// Copyright © 2020 Treel. All rights reserved.
//
import UIKit
class NowPlayingViewModel: NSObject {
@IBOutlet var apiClient: ApiClient!
var nowPlayingResponse : NowPlayingResponse?
func requestNowPlayingMovieList(completion: @escaping (NowPlayingResponse) -> Void) {
apiClient?.requestNowPlayingMovieList(completionHandler: { (response) in
DispatchQueue.main.async {
self.nowPlayingResponse = response
if self.isNowPlayingMovieSuccess(){
}else{
print(self.getNowPlayingMovieSuccessMsg())
}
completion(self.nowPlayingResponse!)
}
})
}
func isNowPlayingMovieSuccess() -> Bool {
return (nowPlayingResponse?.isSuccess ?? false)
}
func getNowPlayingMovieSuccessMsg() -> String {
return (nowPlayingResponse?.msg) ?? "Unknown Error"
}
}
|
[
-1
] |
935cef0bc69592ff4d2c3dd9557cd168350118f0
|
803b97d93ec88506d75488781c4eb3ffd5e3b2e9
|
/test/Modules/Transaction/TransactionPresenter.swift
|
cccec4d06e437441da067c1b949ce650b20176d9
|
[] |
no_license
|
daniel190392/BCPTest
|
83c7c10a07fc2ae5a33de5cef8534a265654de05
|
19fcf86770a0c0798e4d757c313de0c2acf3a548
|
refs/heads/master
| 2021-05-24T16:50:27.309309 | 2020-04-08T10:22:04 | 2020-04-08T10:22:04 | 253,663,222 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,480 |
swift
|
//
// TransactionPresenter.swift
// test
//
// Created by Daniel Salhuana on 4/6/20.
// Copyright (c) 2020 Daniel Salhuana. 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
protocol TransactionPresentationLogic {
func presentLoaded(response: Transaction.CurrencyLoad.Response)
func presentAccountChanged(response: Transaction.AmountChange.Response)
func presentErrorMessage(response: Transaction.Error.Response)
}
class TransactionPresenter: TransactionPresentationLogic {
weak var viewController: TransactionDisplayLogic?
func presentLoaded(response: Transaction.CurrencyLoad.Response) {
let source = response.source
let target = response.target
let sourceInput = InputViewModel(optionType: .source, currencyName: source.currencyName, symbol: source.symbol)
let targetInput = InputViewModel(optionType: .target, currencyName: target.currencyName, symbol: target.symbol)
let currentRate = "Compra: \(source.symbol) \(response.buyRate.getMoneyValue()) | Venta: \(source.symbol) \(response.sellRate.getMoneyValue())"
let transactionViewModel = TransactionViewModel(sourceInput: sourceInput, targetInput: targetInput, currentRate: currentRate)
let viewModel = Transaction.CurrencyLoad.ViewModel(transactionViewModel: transactionViewModel)
viewController?.displayCurrencyLoaded(viewModel: viewModel)
}
func presentAccountChanged(response: Transaction.AmountChange.Response) {
let viewModel = Transaction.AmountChange.ViewModel(amountChanged: response.amountChanged.getMoneyValue())
viewController?.displayAccountChanged(viewModel: viewModel)
}
func presentErrorMessage(response: Transaction.Error.Response) {
var message = ""
switch response.errorType {
case .notLoad:
message = "Sorry, we have problem with the currencies information, we are working to fix that"
case .emptyCurrency:
message = "Sorry, we don't have the information completed, you can try again?"
case .noLocalCurrency:
message = "Sorry for the problem, we are experimenting some issues"
}
let viewModel = Transaction.Error.ViewModel(message: message)
viewController?.displayErrorView(viewModel: viewModel)
}
}
|
[
-1
] |
91ba5a0d3c75e2b88b0b3f372aea3325ba4e2290
|
2eee6e1c6c1bde00a606ee76dd435afd4cf03125
|
/App/Judou/Judou/Scenes/Square/VC/SearchCenterViewController.swift
|
718867d24f287b4fc0cbf486a7a46d8614428141
|
[
"MIT"
] |
permissive
|
doubletcjs/Judou
|
ff5c7641fdd2f5e493ed8493f9f680b83e48833b
|
bf3951bfe6ccf8e1145539ae0ba8c50ec248a212
|
refs/heads/master
| 2020-04-16T12:35:09.178536 | 2019-03-07T04:09:02 | 2019-03-07T04:09:02 | 165,586,185 | 3 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 6,734 |
swift
|
//
// SearchCenterViewController.swift
// Judou
//
// Created by 4work on 2018/12/13.
// Copyright © 2018 Sam Cooper Studio. All rights reserved.
//
import UIKit
class SearchCenterViewController: BaseHideBarViewController, UITextFieldDelegate, SGPageTitleViewDelegate, SGPageContentScrollViewDelegate {
private var searchTextField: UITextField!
private var cancelButton: UIButton!
private var pageTitleView: SGPageTitleView!
private var pageContentScrollView: SGPageContentScrollView!
private var currentIndex: Int!
private var controllers: [SearchListViewController]! = []
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
searchTextField = UITextField.init(frame: CGRect.init(x: 20, y: kStatusBarHeight()+6, width: kScreenWidth()-100, height: 32)~)
searchTextField.layer.cornerRadius = searchTextField.frame.size.height/2
searchTextField.layer.masksToBounds = true
searchTextField.backgroundColor = kRGBColor(red: 243, green: 244, blue: 245, alpha: 1)
searchTextField.font = kBaseFont(16)
//searchTextField.setValue(kRGBColor(red: 209, green: 210, blue: 211, alpha: 1), forKey: "_placeholderLabel.textColor")
//searchTextField.placeholder = "搜索喜欢的内容"
let attrString = NSAttributedString.init(string: "搜索喜欢的内容", attributes: [
NSAttributedString.Key.foregroundColor : kRGBColor(red: 209,green: 210, blue: 211, alpha: 1),
NSAttributedString.Key.font: searchTextField.font ?? ""])
searchTextField.attributedPlaceholder = attrString
searchTextField.font = kBaseFont(15)
searchTextField.leftViewMode = .always
searchTextField.returnKeyType = .search
searchTextField.delegate = self
let imageView = UIImageView.init()
imageView.contentMode = .scaleAspectFit
imageView.frame = CGRect.init(x: 0, y: 0, width: 38, height: 26)~
imageView.image = UIImage.init(named: "icon_search")
searchTextField.leftView = imageView
self.view.addSubview(searchTextField)
cancelButton = UIButton.init(type: .system)
cancelButton.titleLabel?.font = kBaseFont(15)
cancelButton.setTitleColor(.black, for: .normal)
cancelButton.setTitle("取消", for: .normal)
cancelButton.contentHorizontalAlignment = .right
self.view.addSubview(cancelButton)
cancelButton.addTarget(self, action: #selector(self.cancelInput), for: .touchUpInside)
cancelButton.sizeToFit()
cancelButton.frame = CGRect.init(x: kScreenWidth()-20-cancelButton.frame.size.width, y: kStatusBarHeight(), width: cancelButton.frame.size.width, height: 44)~
searchTextField.frame = CGRect.init(x: 20, y: kStatusBarHeight()+6, width: cancelButton.frame.origin.x-20*2, height: 32)~
searchTextField.becomeFirstResponder()
//tab
let titleViewConfigure: SGPageTitleViewConfigure = SGPageTitleViewConfigure()
titleViewConfigure.bottomSeparatorColor = kRGBColor(red: 249, green: 249, blue: 249, alpha: 1)
titleViewConfigure.indicatorStyle = SGIndicatorStyleDefault
titleViewConfigure.indicatorColor = kRGBColor(red: 166, green: 146, blue: 91, alpha: 1)
titleViewConfigure.indicatorHeight = 2
titleViewConfigure.titleFont = kBaseFont(16)
titleViewConfigure.titleSelectedFont = kBaseFont(16)
titleViewConfigure.titleSelectedColor = kRGBColor(red: 188, green: 174, blue: 139, alpha: 1)
titleViewConfigure.titleColor = .black
let types: [String] = ["句子", "作者", "出处", "用户"]
pageTitleView = SGPageTitleView.init(frame: CGRect.init(x: 0, y: searchTextField.frame.maxY+6, width: kScreenWidth(), height: 40)~, delegate: self, titleNames: types, configure: titleViewConfigure)
self.view.addSubview(pageTitleView)
let controllerRect = CGRect.init(x: 0, y: pageTitleView.frame.maxY, width: kScreenWidth(), height: self.view.bounds.size.height-pageTitleView.frame.maxY)~
types.forEach { (type) in
let searchListVC = SearchListViewController()
searchListVC.searchType = type
searchListVC.superFrame = controllerRect
controllers.append(searchListVC)
}
pageContentScrollView = SGPageContentScrollView.init(frame: controllerRect, parentVC: self, childVCs: controllers)
pageContentScrollView.delegatePageContentScrollView = self
self.view.addSubview(pageContentScrollView)
}
// MARK: - SGPageTitleViewDelegate / SGPageContentScrollViewDelegate
func pageTitleView(_ pageTitleView: SGPageTitleView!, selectedIndex: Int) {
pageContentScrollView.setPageContentScrollViewCurrentIndex(selectedIndex)
currentIndex = selectedIndex
controllers[selectedIndex].pageRefreshData(searchTextField.text ?? "")
}
func pageContentScrollView(_ pageContentScrollView: SGPageContentScrollView!, progress: CGFloat, originalIndex: Int, targetIndex: Int) {
pageTitleView.setPageTitleViewWithProgress(progress, originalIndex: originalIndex, targetIndex: targetIndex)
if progress == 1 {
controllers[targetIndex].pageRefreshData(searchTextField.text ?? "")
currentIndex = targetIndex
}
}
// MARK: - 取消输入
@objc private func cancelInput() -> Void {
if cancelButton.currentTitle == "取消" {
searchTextField.resignFirstResponder()
} else {
self.navigationController?.popViewController(animated: true)
}
}
// MARK: - UITextFieldDelegate
func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
cancelButton.setTitle("取消", for: .normal)
return true
}
func textFieldShouldEndEditing(_ textField: UITextField) -> Bool {
cancelButton.setTitle("返回", for: .normal)
return true
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
controllers[currentIndex].pageRefreshData(searchTextField.text ?? "")
textField.resignFirstResponder()
return true
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
|
[
-1
] |
b016a459fe827da9367532d3c15a57db7ebd5a45
|
c6bc7f61f66b66fc78014fcdf4a51330dba1b972
|
/Tests/ParserTests/Expression/Primary/ParserImplicitMemberExpressionTests.swift
|
8cc914ca7b5b3971382c3471d6b51f913a32f8c3
|
[
"Apache-2.0"
] |
permissive
|
jameseunson/swift-ast
|
a9c7f48a73f89752b73cc0649b38e32264fbd9ae
|
8531785f615040a0cfb4302101b5b8bb81211458
|
refs/heads/master
| 2020-04-08T09:27:23.797298 | 2018-11-26T20:35:22 | 2018-11-26T20:35:22 | 159,224,821 | 0 | 0 |
Apache-2.0
| 2018-11-26T19:56:15 | 2018-11-26T19:56:15 | null |
UTF-8
|
Swift
| false | false | 1,783 |
swift
|
/*
Copyright 2016-2018 Ryuichi Laboratories and the Yanagiba project contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import XCTest
@testable import AST
class ParserImplicitMemberExpressionTests: XCTestCase {
func testImplicitMember() {
parseExpressionAndTest(".foo", ".foo", testClosure: { expr in
guard let implicitMemberExpr = expr as? ImplicitMemberExpression else {
XCTFail("Failed in getting an implicitMember expression")
return
}
ASTTextEqual(implicitMemberExpr.identifier, "foo")
})
}
func testSpacesBetweenDotAndIdentifier() {
parseExpressionAndTest(". bar", ".bar", testClosure: { expr in
guard let implicitMemberExpr = expr as? ImplicitMemberExpression else {
XCTFail("Failed in getting an implicitMember expression")
return
}
ASTTextEqual(implicitMemberExpr.identifier, "bar")
})
}
func testSourceRange() {
parseExpressionAndTest(".foo", ".foo", testClosure: { expr in
XCTAssertEqual(expr.sourceRange, getRange(1, 1, 1, 5))
})
}
static var allTests = [
("testImplicitMember", testImplicitMember),
("testSpacesBetweenDotAndIdentifier", testSpacesBetweenDotAndIdentifier),
("testSourceRange", testSourceRange),
]
}
|
[
-1
] |
7285d437c499387fcc0ec42e10555eef8b88da86
|
730f26bb6d3096e06dd46c0077fc40572f044a24
|
/Murmur/CustomView/RoundedButton.swift
|
0a949e6f173d8b11f0c00bedd8dd40716c7dd622
|
[] |
no_license
|
devxris/Murmur
|
f3a2928809309d7a99349369219d5ed681e163eb
|
6a2a23e1aaa073e37b5da1080ab2904a1bbcadf9
|
refs/heads/master
| 2021-05-15T10:54:44.551935 | 2017-10-27T05:47:50 | 2017-10-27T05:47:50 | 108,214,875 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 558 |
swift
|
//
// RoundedButton.swift
// Murmur
//
// Created by Chris Huang on 25/10/2017.
// Copyright © 2017 Chris Huang. All rights reserved.
//
import UIKit
@IBDesignable
class RoundedButton: UIButton {
@IBInspectable var cornerRadius: CGFloat = 3.0 { didSet { self.layer.cornerRadius = cornerRadius } }
override func awakeFromNib() {
super.awakeFromNib()
setupView()
}
override func prepareForInterfaceBuilder() {
super.prepareForInterfaceBuilder()
setupView()
}
private func setupView() {
self.layer.cornerRadius = cornerRadius
}
}
|
[
-1
] |
d4392f3c05c49db69a9c83dbab748add4b087818
|
d45a22a1c00c9bf6fbe4aee8427fdcacbcc87361
|
/Rooted MessagesExtension/Models/DataDashboardSection.swift
|
33b2c3417e256f6405902c3ab4e741cc9f5f7054
|
[] |
no_license
|
redroostertech/rooted
|
d6849954fd53e7c8644b11cf893eeb5de204fc09
|
678546bd127359ebe5a03ec5c920e3801a2c919a
|
refs/heads/master
| 2021-06-16T13:26:13.171801 | 2020-07-11T13:09:57 | 2020-07-11T13:09:57 | 179,491,548 | 0 | 0 | null | 2020-07-11T13:09:58 | 2019-04-04T12:18:47 |
Swift
|
UTF-8
|
Swift
| false | false | 1,130 |
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 dataDashboardSection = try? newJSONDecoder().decode(DataDashboardSection.self, from: jsonData)
//
// Hashable or Equatable:
// The compiler will not be able to synthesize the implementation of Hashable or Equatable
// for types that require the use of JSONAny, nor will the implementation of Hashable be
// synthesized for types that have collections (such as arrays or dictionaries).
import Foundation
import ObjectMapper
// MARK: - DataDashboardSection
public class DataDashboardSection: Mappable {
public var priority, id: Int?
public var headerTitle, headerDescription: String?
enum CodingKeys: String, CodingKey {
case priority, id
case headerTitle = "header_title"
case headerDescription = "header_description"
}
required public init?(map: Map) { }
public func mapping(map: Map) {
id <- map["id"]
priority <- map["priority"]
headerTitle <- map["header_title"]
headerDescription <- map["header_description"]
}
}
|
[
-1
] |
72571b6b5885b22eeba7b8dac370059a8ab71f29
|
24dc3281590aabf1ca94382b6cd876547d5e1a44
|
/eHealth/Features/Patients/Views/PatientTableViewCell.swift
|
03a5da17f73f102a71bb671c65567a7dd18e4332
|
[] |
no_license
|
gemavro/eHealth
|
58781f2703a135f68efbd3a99455b539217f31e7
|
386aeead2e5454edbf7cd778173f679ced772888
|
refs/heads/main
| 2023-01-09T18:05:50.407411 | 2020-11-11T00:16:11 | 2020-11-11T00:16:11 | 311,813,162 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,960 |
swift
|
//
// EpisodeTableViewCell.swift
// HBO
//
// Created by George Mavroidis on 2020-10-14.
/*
- Each item in the list should include:
- Image
- Season number
- Episode number
- Title
- Favorite button
*/
//
import Foundation
import UIKit
public final class PatientTableViewCell: UITableViewCell {
private let card = UIView()
private let profileImageView = UIImageView()
private let nameLabel = UILabel()
private let birthdayLabel = UILabel()
private let genderLabel = UILabel()
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setup()
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func set(_ model: PatientModel) {
nameLabel.text = model.name
birthdayLabel.text = model.birthday
genderLabel.text = model.gender
profileImageView.image = UIImage.init(named: "profile_image")
}
private func setup() {
addSubviews()
setupStyles()
setupLayouts()
}
private func addSubviews() {
addSubview(card)
card.addSubview(profileImageView)
card.addSubview(nameLabel)
card.addSubview(birthdayLabel)
card.addSubview(genderLabel)
}
private func setupStyles() {
Style.for(UIView.self)
.backgroundColor(.clear)
.apply(on: self)
Style.for(UIView.self)
.isUserInteractionEnabled(false)
.apply(on: self.contentView)
Style.for(UIView.self)
.translatesAutoresizingMaskIntoConstraints(false)
.backgroundColor(UIColor(red: 0.12, green: 0.16, blue: 0.20, alpha: 1.00))
.clipsToBounds(true)
.cornerRadius(20)
.apply(on: card)
Style.for(UIImageView.self)
.translatesAutoresizingMaskIntoConstraints(false)
.contentMode(.scaleAspectFit)
.clipsToBounds(true)
.backgroundColor(.lightGray)
.apply(on: profileImageView)
Style.for(UILabel.self)
.translatesAutoresizingMaskIntoConstraints(false)
.font(UIFont.boldSystemFont(ofSize: 17))
.textColor(.white)
.apply(on: nameLabel)
Style.for(UILabel.self)
.translatesAutoresizingMaskIntoConstraints(false)
.font(UIFont.boldSystemFont(ofSize: 13))
.textColor(.white)
.apply(on: birthdayLabel)
Style.for(UILabel.self)
.translatesAutoresizingMaskIntoConstraints(false)
.font(UIFont.boldSystemFont(ofSize: 13))
.textColor(.white)
.apply(on:genderLabel)
self.selectionStyle = .none
}
private func setupLayouts() {
let padding: CGFloat = 20
NSLayoutConstraint.activate([
card.leadingAnchor.constraint(equalTo: leadingAnchor, constant: padding),
card.topAnchor.constraint(equalTo: topAnchor, constant: padding/2),
card.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -padding/2),
card.widthAnchor.constraint(equalTo: widthAnchor, constant: -padding*2),
card.heightAnchor.constraint(equalToConstant: 100),
profileImageView.leadingAnchor.constraint(equalTo: card.leadingAnchor),
profileImageView.topAnchor.constraint(equalTo: card.topAnchor),
profileImageView.widthAnchor.constraint(equalToConstant: 100),
profileImageView.heightAnchor.constraint(equalToConstant: 100),
nameLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 150),
nameLabel.topAnchor.constraint(equalTo: card.topAnchor, constant: padding/2),
nameLabel.trailingAnchor.constraint(equalTo: card.trailingAnchor, constant: padding/2),
nameLabel.heightAnchor.constraint(equalToConstant: 20),
birthdayLabel.leadingAnchor.constraint(equalTo: nameLabel.leadingAnchor),
birthdayLabel.topAnchor.constraint(equalTo: nameLabel.bottomAnchor, constant: padding/2),
birthdayLabel.trailingAnchor.constraint(equalTo: card.trailingAnchor, constant: padding/2),
birthdayLabel.heightAnchor.constraint(equalToConstant: 20),
genderLabel.leadingAnchor.constraint(equalTo: nameLabel.leadingAnchor),
genderLabel.topAnchor.constraint(equalTo: birthdayLabel.bottomAnchor, constant: padding/2),
genderLabel.trailingAnchor.constraint(equalTo: card.trailingAnchor, constant: padding/2),
genderLabel.heightAnchor.constraint(equalToConstant: 20),
])
}
}
|
[
-1
] |
f74d20b5eb1d1d178dbb48a1f972592235878cfb
|
e1708070315cf5da6be92e09328601ceb0b6e7d2
|
/GHFollowers/Extensions/UITableView+Extension.swift
|
ece266597bc38dd912b0a25eba692781ff9bd089
|
[] |
no_license
|
qwer810520/GHFollowers
|
d358229728ff6a7ce9e9ffbf3727771dcffb0aa6
|
3e13c8fd604aa1feaa14047fa2f456698bfaa57a
|
refs/heads/master
| 2021-01-04T17:05:20.136340 | 2020-06-18T16:11:33 | 2020-06-18T16:11:33 | 240,652,322 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 346 |
swift
|
//
// UITableView+Extension.swift
// GHFollowers
//
// Created by Min on 2020/2/12.
// Copyright © 2020 Min. All rights reserved.
//
import UIKit
extension UITableView {
func reloadDateOnMainThread() {
DispatchQueue.main.async { self.reloadData() }
}
func removeExcessCells() {
tableFooterView = UIView(frame: .zero)
}
}
|
[
-1
] |
52bee413052c0c85a13a9842f774deade68c9f69
|
df19849e0a8e839c89ac53406e5cb5d570e993fb
|
/JSONTests/OriginalImageTests.swift
|
51d1b10c4c05c1c5eb0217346a3e56dde9b3c758
|
[] |
no_license
|
sphericalwave/Gyphy
|
23be0b981855e43d28bfd3a6f730f72a317230e8
|
630ed21d579f132a80ef10eaa2b9cae699510b8c
|
refs/heads/master
| 2022-04-13T00:11:20.021069 | 2020-02-24T13:16:52 | 2020-02-24T13:16:52 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,145 |
swift
|
//
// OriginalImageTests.swift
// JSONTests
//
// Created by Aaron Anthony on 2020-01-30.
// Copyright © 2020 SphericalWaveSoftware. All rights reserved.
//
import XCTest
@testable import Gyphs
class OriginalImageTests: XCTestCase
{
let decoder = JSONDecoder()
let encoder = JSONEncoder()
// let img = OriginalImage(height: "360", width: "480", size: "4313017",
// url: URL(string: "https://www.test.com")!,
// frames: "61", hash: "f4459874959cf081b1815f9551d50e2f",
// mp4: "https://sphericalwave.com", mp4Size: "383439",
// webp: "https://whatever.etc", webpSize: "624414")
let img = OriginalImage(url: URL(string: "https://www.test.com")!)
let jsonString = """
{
"frames": "61",
"hash": "f4459874959cf081b1815f9551d50e2f",
"height": "360",
"mp4": "https://sphericalwave.com",
"mp4_size": "383439",
"size": "4313017",
"url": "https://www.test.com",
"webp": "https://whatever.etc",
"webp_size": "624414",
"width": "480"
}
"""
override func setUp() {
//TODO: Not Neccessary in this case
encoder.keyEncodingStrategy = .convertToSnakeCase
decoder.keyDecodingStrategy = .convertFromSnakeCase
}
func testEncodeDecode() {
guard let data = try? encoder.encode(img) else { fatalError() }
XCTAssertNotNil(data)
do {
let anImg = try decoder.decode(OriginalImage.self, from: data)
XCTAssertEqual(anImg, img)
}
catch {
print(error.localizedDescription)
XCTFail()
}
}
func testSerialization() {
guard let jsonData = jsonString.data(using: .utf8) else { fatalError() }
do {
let anImg = try decoder.decode(OriginalImage.self, from: jsonData)
XCTAssertEqual(img, anImg)
}
catch {
print(error.localizedDescription)
XCTFail()
}
}
}
|
[
-1
] |
17476b4b1ce94248d2d481a03f23e8bec01a01c3
|
48d269a0cb427498ce3773f5b61d522eed221de2
|
/PokedexUI/Models/PokemonMove.swift
|
6854a11d1b3c08fbe31e8f129ab971eb3fad817d
|
[] |
no_license
|
Femkeo/PokedexUI
|
7cbc48e984627ff9473d20332665447def680797
|
75641473874e12b5c05a89cbf9cbe135f7777f4f
|
refs/heads/master
| 2020-08-08T19:57:23.249401 | 2019-10-03T09:50:16 | 2019-10-03T09:50:16 | 213,904,423 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 693 |
swift
|
//
// Move.swift
// PokedexUI
//
// Created by Femke Offringa on 19/09/2019.
// Copyright © 2019 Femke Offringa. All rights reserved.
//
import Foundation
struct PokemonMove: Identifiable, Codable, Hashable{
var id : UUID? = UUID()
var move : Move
var version_group_details : [MoveMeta]
}
struct Move: Identifiable, Codable, Hashable{
var id: UUID? = UUID()
var name: String
}
struct MoveMeta : Identifiable, Codable, Hashable{
var id : UUID? = UUID()
var level_learned_at : Int
var move_learn_method: MoveLearnMethod
}
struct MoveLearnMethod : Identifiable, Codable, Hashable{
var id : UUID? = UUID()
var name : String
var url : String
}
|
[
-1
] |
d1b409ae43bf5af4beff318214e874bed3f00125
|
1cb2c5498c4b6abe53fe9ef1821f6804bb454907
|
/DengLuYi/DEBUG.swift
|
e6fc60ea1a82a7dabcfdb9c25a30b755c38dbf9e
|
[] |
no_license
|
EgeTart/DengLuYi
|
582458c6923c996c19a4a37f340ec7f3b0134188
|
fb16a58be5c25574e49c6920f9b922811bad9483
|
refs/heads/develop
| 2021-01-23T01:45:36.809919 | 2017-04-03T02:41:39 | 2017-04-03T02:41:39 | 85,930,193 | 0 | 0 | null | 2017-03-30T14:16:42 | 2017-03-23T09:19:53 |
Objective-C
|
UTF-8
|
Swift
| false | false | 230 |
swift
|
//
// DEBUG.swift
// DengLuYi
//
// Created by Egetart on 2017/3/14.
// Copyright © 2017年 Egetart. All rights reserved.
//
import Foundation
func debugLog(method: String = #function) {
print("Run to here ", method)
}
|
[
-1
] |
10ab803e9db15d07e368df2c22f25912c50576ce
|
09da99f9e37dfa0d549fc71f2c8962e4e681302d
|
/Swift-Introduction-to-iOS-design-patterns-Flux-Refactor/Swift-Introduction-to-iOS-design-patterns-Flux-Refactor/Application/AppDelegate.swift
|
94b1335e411d4783f41ff6c2fa0ac53216c5fb86
|
[] |
no_license
|
kazuao/Swift-Introduction-to-iOS-design-patterns-Flux-Refactor
|
fe8c6c7189b11622a1ef0ddee0b2fb28f08eaa76
|
11548274f295bfcb5a2d8efbacbd8075f4d52432
|
refs/heads/main
| 2023-08-19T02:13:42.777358 | 2021-10-14T02:36:44 | 2021-10-14T02:36:44 | 416,610,800 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,658 |
swift
|
//
// AppDelegate.swift
// Swift-Introduction-to-iOS-design-patterns-Flux-Refactor
//
// Created by kazunori.aoki on 2021/10/13.
//
import UIKit
import RxSwift
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
private lazy var handler = _AppDelegate(window: window)
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
{
return handler.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
protocol ApplicationProtocol {}
extension UIApplication: ApplicationProtocol {}
final class _AppDelegate {
// MARK: Variable
private let window: UIWindow?
private let flux: Flux
// MARK: Initialize
init(window: UIWindow?, flux: Flux = .shared) {
self.window = window
self.flux = flux
}
private lazy var showRepositoryDetailDisposable: Disposable = {
return flux.selectedRepositoryStore.repository
.asObservable()
.flatMap { $0 == nil ? .empty() : Observable.just(()) }
.bind(to: Binder(self) { _self, _ in
guard let tabBarController = _self.window?.rootViewController as? UITabBarController,
let navigationController = tabBarController.selectedViewController as? UINavigationController
else { return }
let vc = RepositoryDetailViewController()
navigationController.pushViewController(vc, animated: true)
})
}()
func application(_ application: ApplicationProtocol,
didFinishLaunchingWithOptions launchOprions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
{
if let tabBarController = window?.rootViewController as? UITabBarController {
let values: [(UINavigationController, UITabBarItem.SystemItem)] = [
(UINavigationController(rootViewController: RepositorySearchViewController()), .search),
(UINavigationController(rootViewController: FavoritesViewController()), .favorites)
]
values.enumerated().forEach {
$0.element.0.tabBarItem = UITabBarItem(tabBarSystemItem: $0.element.1, tag: $0.offset)
}
tabBarController.setViewControllers(values.map { $0.0 }, animated: false)
_ = showRepositoryDetailDisposable
flux.favoriteRepositoryActionCreator.loadFavoriteRepositories()
}
return true
}
}
|
[
-1
] |
45a5ac9bb7716371814b484aa56b2bcba142ee1c
|
dd2b82f035903f49dc18d5a4e8d4b720db8bdb3c
|
/GreenGear/Networking/API.swift
|
cf2c64a199acbe4e024b6d6eff492f39d3718607
|
[] |
no_license
|
anikamorris/GreenGear
|
9dfbe84e800cae7c66d18c95ffc8b53877c47e72
|
2e9ddb6bd8920213d941ca6809417e3b4b60b2e6
|
refs/heads/master
| 2022-11-28T23:04:20.721420 | 2020-07-31T00:19:39 | 2020-07-31T00:19:39 | 275,295,835 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 5,231 |
swift
|
//
// API.swift
// GreenGear
//
// Created by Anika Morris on 7/1/20.
// Copyright © 2020 Anika Morris. All rights reserved.
//
import Foundation
class API {
func createUser(user: User, _ completion: @escaping (Result<Any>) -> ()) {
let session = URLSession.shared
let url = URL(string: "https://green-gear-ld.herokuapp.com/api/user/create/")
var request = URLRequest(url: url!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("application/json", forHTTPHeaderField: "Accept")
let jsonData = try! JSONEncoder().encode(user)
request.httpBody = jsonData
session.dataTask(with: request, completionHandler: { (data, response, error) -> Void in
if error != nil { print("POST Request: Communication error: \(error!)") }
// Response.handleResponse(for: response as! HTTPURLResponse)
if data != nil {
do {
let resultObject = try JSONSerialization.jsonObject(with: data!, options: []) as! [String: Any]
let result = resultObject["result"] as? [String: Any]
let id = result?["_id"]
DispatchQueue.main.async(execute: {
completion(Result.success(id as Any))
})
} catch {
DispatchQueue.main.async(execute: {
completion(Result.failure(NetworkError.couldNotParse))
})
}
} else {
DispatchQueue.main.async(execute: {
completion(Result.failure(NetworkError.noResponse))
})
}
}).resume()
}
// Saves new post to the database with user's username
func newPost(post: Post, _ completion: @escaping (Result<Any>) -> ()) {
let session = URLSession.shared
let url = URL(string: "https://green-gear-ld.herokuapp.com/api/post/create/")
var request = URLRequest(url: url!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("application/json", forHTTPHeaderField: "Accept")
let jsonData = try! JSONEncoder().encode(post)
request.httpBody = jsonData
session.dataTask(with: request) { data, response, error in
if error != nil { print("POST Request: Communication error: \(error!)") }
if data != nil {
do {
let resultObject = try JSONSerialization.jsonObject(with: data!, options: []) as! [String: Any]
DispatchQueue.main.async(execute: {
completion(Result.success(resultObject))
})
} catch {
DispatchQueue.main.async(execute: {
completion(Result.failure(NetworkError.couldNotParse))
})
}
} else {
DispatchQueue.main.async(execute: {
completion(Result.failure(NetworkError.noResponse))
})
}
}.resume()
}
// Returns all posts in the database
func getAllPosts(_ completion: @escaping (Result<Any>) -> ()) {
let session = URLSession.shared
let url = URL(string: "https://green-gear-ld.herokuapp.com/api/post/retrieve/")
let request = URLRequest(url: url!)
session.dataTask(with: request) { data, response, error in
if let error = error {
DispatchQueue.main.async {
completion(Result.failure(error))
}
return
}
let responseResult = Response.handleResponse(for: (response as! HTTPURLResponse))
switch responseResult {
case let .success(message):
print(message)
guard let data = data else {
DispatchQueue.main.async {
completion(Result.failure(NetworkError.noData))
}
return
}
let result = try? JSONDecoder().decode(PostAPIResponse.self, from: data)
guard result != nil else {
print("\n" + String(decoding: data, as: UTF8.self))
return
}
DispatchQueue.main.async {
completion(Result.success(result!))
}
case let .failure(error):
DispatchQueue.main.async {
completion(Result.failure(error))
}
}
}.resume()
}
// Returns all posts in a particular discussion group
func getPosts(for discussionGroup: String) {
}
// Returns single post with comments
func getPost(postId: Int) {
}
// Updates a specific post in the database by finding the post ID
func updatePost(postId: Int) {
}
func deletePost(postId: Int) {
}
}
|
[
-1
] |
d25b212bef58b8a2c17178d601039f51289bf6c8
|
ab62f4ddaa334f605b4193fbb49039fd70c0a6d2
|
/MVVM/UserViewModel/UserViewModel.swift
|
8cdd26f6f6c9ea1ec6860dfb02b8b75e93ea3a15
|
[] |
no_license
|
123Hitu/MVVM
|
f3a8106e957bb73df2dc4917bc7fa195f86f0c9f
|
2257e414de03b2599ad2d3a106477390ebb4ee70
|
refs/heads/master
| 2022-11-20T22:04:57.826646 | 2020-07-21T06:52:59 | 2020-07-21T06:52:59 | 271,963,138 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 993 |
swift
|
//
// UserViewModel.swift
// MVVM
//
// Created by Hitendra on 04/06/20.
// Copyright © 2020 Hitendra. All rights reserved.
//
import UIKit
class UserViewModel: NSObject {
weak var vc : ViewController?
var employeeModel = [EmployeModel]()
static let sharedInstance = UserViewModel()
func getUserData(){
WebServiceManager.sharedInstance.getServiceCall(url: "https://5ed9e42398b7f500160dbc69.mockapi.io/api/v1/users") {(empModel: [EmployeModel]?, error) in
if error == nil{
self.employeeModel = empModel!
self.vc!.tblUser.reloadData()
}
}
}
func updateEmployeImage(empId : String, imageDate : UIImage){
var result = employeeModel.first(where: {$0.userid == empId})
let index = employeeModel.firstIndex(where: {$0.userid == empId})
if result != nil{
result?.avatarImg = imageDate
employeeModel[index!] = result!
}
}
}
|
[
-1
] |
48a9a2807fe408de4588975e9db6f2e36bc644f2
|
4ae2c4d13332726ab9b3ac162ed7df19002bbe4b
|
/Project_iOS/Cite/HashTag.swift
|
b9056a87f47cc1f8afa65ec15ff6887060170dcf
|
[
"MIT"
] |
permissive
|
everlof/RestKit-n-Django-Sample
|
09886cae101e7229ef56ad831363826d1b6dc5a1
|
a4e040ea4306b43dacf7d639a51edd310a88d919
|
refs/heads/master
| 2021-01-17T17:10:10.332377 | 2016-08-12T08:46:21 | 2016-08-12T08:46:21 | 65,025,298 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,120 |
swift
|
//
// HashTag.swift
// Cite
//
// Created by David Everlöf on 06/08/16.
//
//
import Foundation
import CoreData
class HashTag: RemoteEntity {
static let mapping: RKEntityMapping = {
let mapping = RKEntityMapping(
forEntityForName: String(HashTag),
inManagedObjectStore: appDelegate().managedObjectStore)
mapping.identificationAttributes = [ "pk" ]
mapping.addAttributeMappingsFromDictionary([
"pk": "pk",
"tag": "name"
])
return mapping
}()
override class func rkSetupRouter() {
RKObjectManager.sharedManager().router.routeSet.addRoute(RKRoute(withClass: HashTag.self, pathPattern: "/hashtags/:pk/", method: .GET))
RKObjectManager.sharedManager().router.routeSet.addRoute(RKRoute(withClass: HashTag.self, pathPattern: "/hashtags/", method: .POST))
RKObjectManager.sharedManager().router.routeSet.addRoute(RKRoute(withClass: HashTag.self, pathPattern: "/hashtags/:pk/", method: .PUT))
RKObjectManager.sharedManager().router.routeSet.addRoute(RKRoute(withClass: HashTag.self, pathPattern: "/hashtags/:pk/", method: .DELETE))
}
}
|
[
-1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.