Check Everymac for your model:
OWC will have appropriate RAM:
Check Everymac for your model:
OWC will have appropriate RAM:
//adapted via: https://www.hackingwithswift.com/books/ios-swiftui/dynamically-filtering-fetchrequest-with-swiftui | |
import SwiftUI | |
import CoreData | |
struct EntityIterator<Entity: NSManagedObject, Content: View>: View { | |
var fetchRequest: FetchRequest<Entity> | |
var results: FetchedResults<Entity> { fetchRequest.wrappedValue } |
import SwiftUI | |
struct SliderView: View { | |
@State var height: CGFloat = .infinity | |
@State var sliderOpacity: Double = 0 | |
let action: (() -> Void) | |
var slide: some Gesture { |
struct ColorPicker: View { | |
enum Option: Int, CaseIterable { | |
case none, | |
red, | |
orange, | |
yellow, | |
green, | |
teal, | |
blue, |
struct DecimalTextField: View { | |
@Binding var decimalValue: Decimal | |
@State var clearValue: Decimal = 1 | |
var clearValueString: String { | |
return String("\(clearValue)") | |
} | |
@State private var lastValidInput: String? |
struct MarkdownFile: ExpressibleByStringLiteral { | |
let bundleName: String | |
let rawMarkdown: String? | |
init(stringLiteral: String) { | |
bundleName = stringLiteral | |
var loadedMarkdown: String? = nil |
extension WKWebView { | |
//via https://stackoverflow.com/a/53706678 | |
//and https://stackoverflow.com/a/53141055 | |
func applyStylesheet() { | |
guard | |
let path = Bundle.main.path(forResource: "style", ofType: "css"), //load style.css from your app bundle | |
let cssString = try? String(contentsOfFile: path).components(separatedBy: .newlines).joined() | |
else { |
/************************************************************************************************************************************ | |
Fade in LED's one by one using ShiftPWM with one shift register | |
************************************************************************************************************************************/ | |
// You can choose the latch pin yourself. | |
const int ShiftPWM_latchPin=8; | |
#define SHIFTPWM_NOSPI | |
const int ShiftPWM_dataPin = 11; | |
const int ShiftPWM_clockPin = 12; |
@IBAction func handlePuppySwitch(_ sender: UISwitch) { | |
let updateIndexPaths = [IndexPath(row: 0, section: TableSections.dynamicSection.rawValue)] | |
if (sender.isOn) { | |
puppyLabel.text = "Puppy Enabled" | |
dynamicContent.insert("Puppy is on!", at: 0) | |
tableView.insertRows(at: updateIndexPaths, with: .bottom) | |
} else { |
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
if (section == TableSections.dynamicSection.rawValue) { | |
return dynamicContent.count | |
} else { | |
return staticCells.count | |
} | |
} |