Skip to content

Instantly share code, notes, and snippets.

//
// BLEPeripheral.swift
// BLEPublishTest
//
// Created by Paul Wilkinson on 22/4/20.
// Copyright © 2020 Paul Wilkinson. All rights reserved.
//
import Foundation
import CoreBluetooth
let passedEarnings = [
[
"actual":"<null>",
"code" : "AUTO.US",
"date" : "2019-12-31",
"difference" : "<null>",
"estimate" : "-0.12",
"percent" : "<null>",
"report_date" : "2020-03-27"],
[
class ViewController: UIViewController {
@IBOutlet weak var tableview: UITableView!
@IBOutlet weak var segmentedControl: UISegmentedControl!
var followers = [String]()
var following = [String]()
var tableData = [String]()
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
//
// AppDelegate.swift
// UDPTest
//
// Created by Paul Wilkinson on 22/10/19.
// Copyright © 2019 Paul Wilkinson. All rights reserved.
//
import Cocoa
import SwiftUI
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()
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
//
// BLEManager.swift
// BLEQuestion
//
// Created by Paul Wilkinson on 30/3/19.
// Copyright © 2019 Paul Wilkinson. All rights reserved.
//
import Foundation
import CoreBluetooth
#import "ViewController.h"
#import <Network/Network.h>
@interface ViewController ()
@property (strong,nonatomic) nw_path_monitor_t pathMonitor;
@end
@implementation ViewController
protocol Revisionable {
}
class RealType: Revisionable {
}