This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BLEPeripheral.swift | |
// BLEPublishTest | |
// | |
// Created by Paul Wilkinson on 22/4/20. | |
// Copyright © 2020 Paul Wilkinson. All rights reserved. | |
// | |
import Foundation | |
import CoreBluetooth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let passedEarnings = [ | |
[ | |
"actual":"<null>", | |
"code" : "AUTO.US", | |
"date" : "2019-12-31", | |
"difference" : "<null>", | |
"estimate" : "-0.12", | |
"percent" : "<null>", | |
"report_date" : "2020-03-27"], | |
[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController { | |
@IBOutlet weak var tableview: UITableView! | |
@IBOutlet weak var segmentedControl: UISegmentedControl! | |
var followers = [String]() | |
var following = [String]() | |
var tableData = [String]() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BackgroundJobCreator: JobCreator { | |
func create(type: String, params: [String : Any]?)->Job { | |
return SendTweetJob(params:[:]) | |
} | |
} | |
class SendTweetJob: Job { | |
// Type to know which Job to return in job creator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.swift | |
// UDPTest | |
// | |
// Created by Paul Wilkinson on 22/10/19. | |
// Copyright © 2019 Paul Wilkinson. All rights reserved. | |
// | |
import Cocoa | |
import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func startUpdatingLocation() { | |
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest | |
self.locationManager.activityType = .fitness | |
self.locationManager.startUpdatingLocation() | |
} | |
extension ViewController: CLLocationManagerDelegate { | |
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { | |
if status == .authorizedWhenInUse { | |
self.startUpdatingLocation() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mageView.leadingAnchor.constraint(equalToSystemSpacingAfter: contentView.leadingAnchor, multiplier: 1.0).isActive = true | |
imageView.widthAnchor.constraint(equalToConstant: 35.0).isActive = true | |
imageView.heightAnchor.constraint(equalToConstant: 35.0).isActive = true | |
textLabel.leadingAnchor.constraint(equalToSystemSpacingAfter: imageView.trailingAnchor, multiplier: 1.0).isActive = true | |
likeButton.leadingAnchor.constraint(equalToSystemSpacingAfter: textLabel.trailingAnchor, multiplier: 1.0).isActive = true | |
likeButton.widthAnchor.constraint(equalToConstant: 50.0).isActive = true | |
contentView.trailingAnchor.constraint(equalTo: likeButton.trailingAnchor, constant: -2.0).isActive = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BLEManager.swift | |
// BLEQuestion | |
// | |
// Created by Paul Wilkinson on 30/3/19. | |
// Copyright © 2019 Paul Wilkinson. All rights reserved. | |
// | |
import Foundation | |
import CoreBluetooth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
#import <Network/Network.h> | |
@interface ViewController () | |
@property (strong,nonatomic) nw_path_monitor_t pathMonitor; | |
@end | |
@implementation ViewController | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Revisionable { | |
} | |
class RealType: Revisionable { | |
} | |