Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to The new tensorflow-macos and tensorflow-metal incapacitate training
Ok, a bit of work to get the older and more stable versions up and running. First and foremost, you'll need homebrew Then you'll need to use the version of python supported for the targeted release. The table for how to match up archival versions of tensorflow-macos and tensorflow-metal is near the bottom of this page. You can then use brew to install the legacy python brew install python@3.9 And then use that to create a virtual environment. Code follows for my install, though double check the location of your homebrew. /opt/homebrew/opt/python@3.9/bin/python3.9 -m venv ~/tensorflow source ~/tensorflow/bin/activate With the virtual environment created, you then need to get the urls for the old pip installs. Apple prohibits the linking of external urls on this forum, but you can look up tensorflow-macos and tensoflow-metal at pypi dot org and find their release history on the left side column. Then right click/command click the release. pip install is an acceptable way to install packages. Take care
Topic: Machine Learning & AI SubTopic: General Tags:
Jan ’23
3D interactive software - which documentation should I look at first?
Thinking of trying to code a 3d engineering design software. I know it won't be easy to code. The basic idea is the user is given an interactive 3d interface, and the user can move through the 3d space, drag and drop columns beams etc, select deselect dragged or created items, assign values to it, dimensions etc. The user should be able to change sizes of elements (like when user type 10 width, the beam should change it's size to the typed value etc), get fixed to other elements etc. Any idea which documentation should I look at for xcode, swiftui to get an idea or first few steps into interactive 3d etc?
2
0
1k
Jan ’23
Reply to Displaying Core Data entity in Table (iOS 16)
You can bind the table to the fetch request's sort descriptors there is no need to have additional state, e.g. Table(stats, sortOrder: $stats.sortDescriptors) { When the users clicks on a table column the fetch and the table will update automatically. Unfortunately there is an issue where if the View containing the FetchRequest is re-init then the sortDescriptors get reset to their default. I'm not sure if that is a design flaw in @FetchRequest or we are supposed to make our own @State for the sort in the view above and pass it in as a binding and use the value in the @FetchRequest and using the binding to the binding in the Table, e.g. @Binding var sortDescriptors: [SortDescriptor] init(sd: Binding<[SortDescriptor]>) { _items = FetchRequest(sortDescriptors: sd.wrappedValue) _sortDescriptors = sd } ... Table(stats, sortOrder: $sortDescriptors) {
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23
Swift UI Table - Problems removing selection from row
Hi,i have been trying out SwiftUI Table and wanted to present a details view when click on Table Row occurs, but I couldn't figure out how to deselect row once its been selected, while it may not be what Table was intended for, but I still think this code should be valid. (iPadOS) struct Person: Identifiable { let givenName: String let familyName: String let emailAddress: String let id = UUID() } private var people = [ Person(givenName: Juan, familyName: Chavez, emailAddress: juanchavez@icloud.com), Person(givenName: Mei, familyName: Chen, emailAddress: meichen@icloud.com), Person(givenName: Tom, familyName: Clark, emailAddress: tomclark@icloud.com), Person(givenName: Gita, familyName: Kumar, emailAddress: gitakumar@icloud.com) ] @State private var selectedPeople: Person.ID? @State private var detailsViewPresented: Bool = false var body: some View { Table(people, selection: $selectedPeople) { TableColumn(Given Name, value: .givenName) TableColumn(Family Name, value: .familyName) TableColumn(E-Mail Address, va
1
0
1.6k
Jan ’23
Reply to NavigationSplitView
For column one I setup an enum enum Nav: String, Hashable, CaseIterable and the cases are the different Entity names. And then use a list to display them. For column two I'd need a way to show the ListView() for whatever Entity name was selected from column one. And then the third column you show the DetailView() of the selected ListView() item. I guess is my sudo way of thinking about how it should work. But maybe that's not a great way of how you'd go about it?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23
NavigationSplitView
I need help with this topic please. I'm interested in the three column layout version. Column one I want my list of Core Data Entities, Column two I want a list of my Core Data Entity's ListView items, and for Column three I want the detail view of the selected list view item. Any help on figuring out the best way to accomplish this would be much appreciated. Thanks
2
0
1.1k
Jan ’23
Can't run app on iPhone after registered UDID
The device UDID was registered to the developer account 40 hours ago, the STATUS column was processing in the first 24 hours, then turned to empty. But I still can't run my app (with distribution method development), when I try to run it after download it through my OTA URL, it prompts “the app cannot be installed because its integrity could not be verified” but everything runs good on a iPhone which was registered a month ago. What should I do now? keep waiting?
3
0
800
Jan ’23
Wired spacing between rows when using LazyVGrid
My code is import SwiftUI struct ContentView: View { var emojis = [🚂, 🤡, 🚀, 🚁, 🚕, 😅, ✅, 👍, 🥳, 🎃] @State var emojiCount = 6 var body: some View { VStack { ScrollView { LazyVGrid(columns: [GridItem(.adaptive(minimum: 65))]) { ForEach(emojis[0.. 1 { emojiCount -= 1 } }, label: { Image(systemName: minus.circle) }) } var add: some View { Button { if emojiCount < emojis.count { emojiCount += 1 } } label: { Image(systemName: plus.circle) } } } struct CardView: View { var content: String @State var isFaceUp: Bool = true var body: some View { ZStack { let shape = RoundedRectangle(cornerRadius: 20) if isFaceUp { shape.fill().foregroundColor(.white) shape.strokeBorder(lineWidth: 3) Text(content) .font(.largeTitle) } else { shape.fill() } } .onTapGesture { isFaceUp = !isFaceUp } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() .preferredColorScheme(.light) ContentView() .preferredColorScheme(.dark) } } Then I get Actually, the spacing between rows is t
1
0
841
Jan ’23
UISplitViewController.presentsWithGesture doesn't work when style != Unspecified
I tried to update the UISplitViewController in my old iOS project to use the newer column-based API, but noticed that when setting the Style to Double Column in IB from the currently selected Unspecified (Discouraged), the swipe gesture doesn't show and hide the master view controller anymore, even if the option Presents Primary With Gesture is selected. This also happens with a fresh project where I dragged the standard split view controller into the IB canvas as the initial view controller. Is this expected or am I missing something?
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
468
Jan ’23
Async task cancelled in Refreshable Modifier on Scrollview on iOS 16
I'm trying to use the refreshable modifier on a Scrollview in an app that targets iOS 16. But the asynchronus task gets cancelled during the pull to refresh gesture. It was tested on a physical device. Here is some code that demonstrates the problem and an image with the error printed: ExploreViewModel.swift class ExploreViewModel: ObservableObject { @Published var randomQuotes: [Quote] = [] init() { Task { await loadQuotes() } } @MainActor func loadQuotes() async { let quotesURL = URL(string: https://type.fit/api/quotes)! do { let (data, urlResponse) = try await URLSession.shared.data(from: quotesURL) guard let response = urlResponse as? HTTPURLResponse else { print(no response); return} if response.statusCode == 200 { let quotes = try JSONDecoder().decode([Quote].self, from: data) randomQuotes.append(contentsOf: quotes) } } catch { debugPrint(error) debugPrint(error.localizedDescription) } } func clearQuotes() { randomQuotes.removeAll() } } Content.swift import SwiftUI struct ContentView: View { @StateObjec
2
0
2.2k
Jan ’23
Reply to Save DataFrames as CSVs
I don’t think there’s a way to do that but, if you know that the names are unique, you can rename the columns after the join. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Parser Json with Single Quote
Hi. I am having issues with json parsing. all my source data use double quote except for one. here is the sample do { let json = [['16772', 'Cebu', 'Philippines']] if let jsonArray = try JSONSerialization.jsonObject(with: Data(json.utf8), options: []) as? [[Any]] { print(Hello World) } } catch { print(error) } if the json string is let json = [[16772, Cebu, Philippines]] it works ok. but if it is single quote, then it gives out the error message Error Domain=NSCocoaErrorDomain Code=3840 Invalid value around line 1, column 2. UserInfo={NSDebugDescription=Invalid value around line 1, column 2., NSJSONSerializationErrorIndex=2} What am i missing to enable parsing single quote normally? Thoughts?
2
0
1.9k
Dec ’22
Deleting all items in an array causes issues with the ForEach used to render the arrays items
I use Core Data with two entities: Set and Link. Both entities contain a UUID id. Sets can contain 1 or more Links and this is represented in a 1-many relationship When the user wants to delete ALL links, this code is called for link in learningSet.webLinksArray.reversed(){ container.viewContext.delete(link) } do{ try container.viewContext.save() } catch let error { print(Failure deleting all links } Here is the view code that renders link if !learningSet.webLinksArray.isEmpty{ LazyVGrid(columns: columns, alignment: .center, spacing: 16, pinnedViews: []) { ForEach(learningSet.webLinksArray, id: .id) { link in RichWebLinkView(webLink: link) } } } It all works, but I get the following error/warning in the console ForEach, _FlexFrameLayout>>: the ID nil occurs multiple times within the collection, this will give undefined results! LazyVGridLayout: the ID nil is used by multiple child views, this will give undefined results! It's unclear why the LazyVGrid is even being re-rendered when the
1
0
975
Dec ’22
Reply to CSV to SwiftUI
I must have been imprecise, my problems are: I don’t know how to read the two different columns per row of a csv into two seperate lists I want to have one vstack containing a scrollable list of all the company names in the corresponding color. E.g. with the csv file: Apple,#FFFFFF Adobe,#FF0000 I want a white text element reading “Apple” and a red text with “Adobe underneath
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’22