SceneView:
import SceneKit
import SwiftUI
...
SceneView(
scene: /* a scene in SCNScene or other formats (I remember you can use .obj, etc.) */,
options: [
.allowsCameraControl,
.autoenablesDefaultLighting
.someOtherOption
]
...
)
Post
Replies
Boosts
Views
Activity
Use form:
Form {
Section("If you have a title add here") {
Button {
} label: {
Label("Test", systemImage: "circle.fill")
}
Section {
Button(role: .destructive) {
} label: {
Label("Test", systemImage: "trash.fill")
}
}
}
Thanks I'm submitting a FB
50 GB ???? *
I've also found that swiftUI's refreshing had gone wrong somehow
if I do this:
List($someSortOfADynamicList) { $item in
TextField("Placeholder...", text: $item.someSortOfAStringVariable)
}
it'll act very weird. Every time a value is changed, the current textfield focused defocused. And if you use a NavigationView, the current NavigationLink gets unfocused, that is, no view displayed in the destination page.
OK I've already find out all about CPU, Storage, Battery, thermal state in github
I also found out that you can use airport to find out the current WiFi connected and its password.
How to get package recieved/sent from the device?
Now how can I get the GPU's parameters? Using Metal?
> watchdog 1
Your computer ran itself too hard?
PS. use codeblock or your > will look like a quotation block.
try python3 on zsh
Hardware: Apple silicon
Watched +1
Try PD and it's working, but after the trail...
Hi when I'm deleting blank lines from copy-and pasted code from xcode, I accidently deleted some of thfunc fireEnergyBallsection... and not realize it😂🫠
JSON:
[
{
"text": "sun",
"label": "RED"
},
{
"text": "",
"label": "RED"
},
{
"text": "citrus",
"label": "ORG"
},
{
"text": "warm",
"label": "ORG"
},
{
"text": "sunlight",
"label": "YLW"
},
{
"text": "cheese",
"label": "YLW"
},
{
"text": "foliage",
"label": "GRN"
},
{
"text": "organic",
"label": "GRN"
},
{
"text": "mint",
"label": "MNT"
},
{
"text": "freshness",
"label": "MNT"
},
{
"text": "sky",
"label": "BLU"
},
{
"text": "sea",
"label": "BLU"
},
{
"text": "magic",
"label": "VLT"
},
{
"text": "jealousy",
"label": "VLT"
}
]
And I updated my code to @ebhanson 's suggestion:
var body: some View { // view
TextField("Text...", text: $text).padding().background(color).onReceive(timer) { _ in
color = predict(for: text)?.color
print(color)
}.task {
do {
model = try ChromaClassifier(configuration: .init()).model
} catch {
print("NIL MDL")
model = nil
}
if let model = model {
predictor = try? NLModel(mlModel: model)
} else {
predictor = nil
}
}
var model: MLModel? = nil
var predictor: NLModel? = nil
func predict(for string: String) -> SingleColor? { // function
if let predictor = predictor {
let colorKeys = predictor.predictedLabelHypotheses(for: string, maximumCount: 1) // 1..7
print(colorKeys)
var color: SingleColor = .init(red: 0, green: 0, blue: 0)
for i in colorKeys {
color.morphing((ColorKeys.init(rawValue: i.key) ?? .white).toColor().percentage(of: i.value))
print(color)
}
return color
} else {
return nil
}
}
I'm a dev and I can tell you there's nothing you can do except to take it to apple support and flush your drive. I did that.
I'm trying
In addition to @SpaceMan 's answer you can import some sort of database:
You can export a CSV file and have something sort of like this.
Aloe Vera, skin healer, Cut from middle, once every three days, cut the leave and use the gel inside for your rash
Almond, skin healer, cut the young leaves, daily, soak in water overnight rinse and blend
......
and then that's easy.
struct Plant: Identifiable {
var id: UUID {
get {
return .init()
}
}
var plantName: String
var mdedicalProperties: String
var harvestInstructions: String
var waterRequirements: String
var recipe: String
}
// load your file with your way, I'll use file as a variable for the string contents of the database
var plantModel = [Plant]
let plantLines = file.split(separator: "\n")
let plantArray2D: Array<Array<String>> = []
for i in plantLines {
let modified = i.replacingOccurrences(of: " ", with: "")
plantArray2D.append(i.split(separator: ","))
}
for i in plantArray2D {
plantModel.append(Plant(plantName: i[0], medicicalProperties: i[1], harvestInstructions: i[2], waterRequirements: i[3], recipe: i[4]))
}