WWDC:
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 SwiftUI | |
| struct BottomSheetDesign: View { | |
| @State var showSheet: Bool? = nil | |
| var body: some View { | |
| Button(action: { showSheet = 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
| // | |
| // DebugDevice.swift | |
| // | |
| // Copyright 2022 • Sidetrack Tech Limited | |
| // | |
| import Foundation | |
| // This must be called on the main-thread. | |
| var isDebugProfileInstalled: Bool { |
TL;DR: Still open - see below.
This morning I woke up to some not-so-nice surprise - my 2018 MPB 13" would be kind of totally unusable. The accountsd process was stable at 400%, battery was going like ice-cream in the Sahara, and opening up LibreOffice was like a major achievement.
I did check the logs (that were growing at like 500 lines per second) and I saw a lot of lines at FAULT level:
fault 07:54:04.271342+0200 accountsd Unentitled access by client 'CallHistoryPlugi' (selector: accountsWithAccountType:handler:)
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 Foundation | |
| extension Date { | |
| func toString(format: String = "yyyy-MM-dd") -> String { | |
| let formatter = DateFormatter() | |
| formatter.dateStyle = .short | |
| formatter.dateFormat = format | |
| return formatter.string(from: self) | |
| } |
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 ExcelFormulas { | |
| class func pmt(rate : Double, nper : Double, pv : Double, fv : Double = 0, type : Double = 0) -> Double { | |
| return ((-pv * pvif(rate, nper: nper) - fv) / ((1.0 + rate * type) * fvifa(rate, nper: nper))) | |
| } | |
| class func pow1pm1(x : Double, y : Double) -> Double { | |
| return (x <= -1) ? pow((1 + x), y) - 1 : exp(y * log(1.0 + x)) - 1 | |
| } | |
| class func pow1p(x : Double, y : Double) -> Double { |