Search results for

“column”

2,085 results found

Post

Replies

Boosts

Views

Activity

Matrix - Buffer, row - column representation problem
Greeting,I represent my matrix buffer with the following data on the GPU:Address: Data:0x00 0 1 2 30x01 4 5 6 70x02 8 9 10 110x03 12 13 14 15With the following shading code:float4 (out) = float4x4 (m) * float4 (in)According to apple's documentationfloat3 u = m * v;is equivalent to:u = v.x * m[0];u += v.y * m[1];u += v.z * m[2];My question is does m[0] refer to <0, 1, 2, 3> or <0, 4, 8, 12>?As my experiment shows the GPU does compute the matrix as m[0] = <0, 1, 2, 3>But common sense tell us m[0] should be the column <0, 4, 8, 12> otherwise it's very hard to read and debugIf m[0] did refer to <0, 1, 2, 3>, is there any way to transpose a matrix in shading file?Or we have to work on transposed matrix all the time?Thanks!
3
0
2.4k
Nov ’15
Reply to Create array of arrays by two properties
That's pretty similar to what I was already doing. I ended up finalizing on this, which will be easier to understand in the future. var prevColumn = sorted[0].column var startIndex = 0 var byColumnAndRow: [[Match]] = [] for (index, match) in sorted.enumerate() { guard prevColumn != match.column else { continue } let column = Array(sorted[startIndex ..< index]) byColumnAndRow.append(column) startIndex = index prevColumn = match.column } // The previous enumeration won't grab the very last column worth of matches because the // loop ends before the column changes again. byColumnAndRow.append(Array(sorted[startIndex ..< sorted.count]))
Feb ’16
Random "duplicate column name" crashes using SwiftData
Hello everyone, I am experiencing a very weird issue. I have a simple relationship between 2 models, that occasionally starts crashing the app, with the following error: error: : Attempting recovery from error encountered during addPersistentStore: 0x282523c60 Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during persistent store migration. UserInfo={sourceURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, reason=Cannot migrate store in-place: I/O error for database at /private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application Support/default.store. SQLite error code:1, 'duplicate column name: Z1POSITIONS', destinationURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, NSUnderlyingError=0x2825c6700 {Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during
1
0
1.1k
Oct ’23
Reply to How to remove all columns from NSOutlineView?
For example it is useful if you like to build up the view from scratch (with different number of columns and different data in the columns). So, just remove all columns and start again. This is mostly easier than doing all the modifications to existing columns and add and remove individual columns.Here is the error message: *** NSOutlineView cannot remove outlineTableColumn with removeTableColumn:. Use setOutlineTableColumn: instead.
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’18
SwiftUI NavigationSplitView on macOS: unwanted vertical space in detail column
Hi, colleagues: I've spent days trying to understand this little SwiftUI layout problem, and I've made a minimal test app to explain it. It's based on a Content View of a fixed size. import SwiftUI @main struct TestApp: App { var body: some Scene { WindowGroup { ContentView() } .windowResizability(.contentSize) .windowToolbarStyle(.unified(showsTitle: false)) } } struct ContentView: View { let complaint = What's with the vertical space around me when I'm in a detail column? var body: some View { Text(complaint) .font(.title) .frame(width: 300, height: 300) .background(.blue) } } And here's the result. As expected, the Content View is hugged nicely by the window: My goal is to place a fixed-size view like this in the detail column of a Navigation Split View. So I update the scene's root view: import SwiftUI @main struct TestApp: App { var body: some Scene { WindowGroup { NavigationSplitView( sidebar: { }, detail: { ContentView() } ) } .windowResizability(.contentSize) .windowToolbarStyle(
3
0
2.5k
Feb ’24
Reply to ML model "Parse issue" expected ;
After looking at this some more this moring I found a work around. I went back to the table of data and removed the spaces from the column heading Day of Week (it was the first column in the CSV file) so that it was DayOfWeek and the code generated correctly. The funny thing is that the other column headings in the table have spaces and it inserts the underscore for them fine.I think it may be a bug with the automatic code generator. Either fix the generator to consistently insert the underscore in all column headers or change the documentation to indicate column headers should contain no spaces.Anyway the workaround worked and everything is now working now.Thanks for looking at this you got me thinking!
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Jul ’18
Reply to Tabular classification using Create ML Components
A tabular classifier will return both the classification probabilities and the most likely labels. If your target column name is target the predicted labels column is also going to be target while the probability distributions is going to be in targetProbabilities. You can always print the whole data frame with print(result) and see what the columns are. Hope this helps.
Apr ’23
Reply to Question About Swift
I'm still tweaking it but I was thinking something along these lines...printTable Function Initialize two variables: one to hold the character count of the column label and the other to hold the character count of each itemif the character count of item is greater than the character count in the column label set them equal to each otherfor the column labels, set paddingNeeded equal to the width of each column minus the character count in columnLabelfor the rows, set paddingNeeded equal to width of each column minus the character count of each item or might use a function to compute widths then implement in printTable functionWhat do you think?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’18
Reply to How SwiftUI Table sorting works ?
Still not completely clear to me. Lets say I click on Family name column, what happens next? Does the value of sortOrder variable change if I click on Family name column? If yes, what will be the new value? Also, how can I use custom Comparator for different columns?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23
Vertical or "column" pasting
The Xcode editor allows for vertical cutting using option-click-drag, why does it not support vertical pasting? This type of feature can be very handy at times.
Replies
1
Boosts
0
Views
607
Activity
Oct ’15
Matrix - Buffer, row - column representation problem
Greeting,I represent my matrix buffer with the following data on the GPU:Address: Data:0x00 0 1 2 30x01 4 5 6 70x02 8 9 10 110x03 12 13 14 15With the following shading code:float4 (out) = float4x4 (m) * float4 (in)According to apple's documentationfloat3 u = m * v;is equivalent to:u = v.x * m[0];u += v.y * m[1];u += v.z * m[2];My question is does m[0] refer to <0, 1, 2, 3> or <0, 4, 8, 12>?As my experiment shows the GPU does compute the matrix as m[0] = <0, 1, 2, 3>But common sense tell us m[0] should be the column <0, 4, 8, 12> otherwise it's very hard to read and debugIf m[0] did refer to <0, 1, 2, 3>, is there any way to transpose a matrix in shading file?Or we have to work on transposed matrix all the time?Thanks!
Replies
3
Boosts
0
Views
2.4k
Activity
Nov ’15
Reply to Create array of arrays by two properties
That's pretty similar to what I was already doing. I ended up finalizing on this, which will be easier to understand in the future. var prevColumn = sorted[0].column var startIndex = 0 var byColumnAndRow: [[Match]] = [] for (index, match) in sorted.enumerate() { guard prevColumn != match.column else { continue } let column = Array(sorted[startIndex ..< index]) byColumnAndRow.append(column) startIndex = index prevColumn = match.column } // The previous enumeration won't grab the very last column worth of matches because the // loop ends before the column changes again. byColumnAndRow.append(Array(sorted[startIndex ..< sorted.count]))
Replies
Boosts
Views
Activity
Feb ’16
Reply to Side-by-side sections in UICollectionViewCompositionalLayout?
Wish you can develop the subclass.I was just wondering about user interaction.When displayed in 2 columns, scrolling a column would scroll both of them. Is it the impression you want to give, or give impression of 2 columns that work in continuity.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’19
Random "duplicate column name" crashes using SwiftData
Hello everyone, I am experiencing a very weird issue. I have a simple relationship between 2 models, that occasionally starts crashing the app, with the following error: error: : Attempting recovery from error encountered during addPersistentStore: 0x282523c60 Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during persistent store migration. UserInfo={sourceURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, reason=Cannot migrate store in-place: I/O error for database at /private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application Support/default.store. SQLite error code:1, 'duplicate column name: Z1POSITIONS', destinationURL=file:///private/var/mobile/Containers/Shared/AppGroup/F8286D67-AC8C-4441-A151-13B5AAA509F3/Library/Application%20Support/default.store, NSUnderlyingError=0x2825c6700 {Error Domain=NSCocoaErrorDomain Code=134110 An error occurred during
Replies
1
Boosts
0
Views
1.1k
Activity
Oct ’23
Executable file column in info.plist?
[default- $(EXECUTABLE_NAME)]i got error when uploding app archive to app store:This bundle is invalid. The executable name, as reported by CFBundleExecutable in info.plist, may contain any of these characters: [ ] { } . + *
Replies
0
Boosts
0
Views
1.4k
Activity
Jun ’16
Reply to NavigationSplitView two and three column interfaces in the same app
Also worth noting that Apple does do two to three column transitions in the Music app on iPad. If you open Music in Landscape mode you see two columns. But if you tap Artists in the sidebar you see three columns. So I suggest filing Feedback asking for official support of this behaviour.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to How to remove all columns from NSOutlineView?
For example it is useful if you like to build up the view from scratch (with different number of columns and different data in the columns). So, just remove all columns and start again. This is mostly easier than doing all the modifications to existing columns and add and remove individual columns.Here is the error message: *** NSOutlineView cannot remove outlineTableColumn with removeTableColumn:. Use setOutlineTableColumn: instead.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Sep ’18
SwiftUI NavigationSplitView on macOS: unwanted vertical space in detail column
Hi, colleagues: I've spent days trying to understand this little SwiftUI layout problem, and I've made a minimal test app to explain it. It's based on a Content View of a fixed size. import SwiftUI @main struct TestApp: App { var body: some Scene { WindowGroup { ContentView() } .windowResizability(.contentSize) .windowToolbarStyle(.unified(showsTitle: false)) } } struct ContentView: View { let complaint = What's with the vertical space around me when I'm in a detail column? var body: some View { Text(complaint) .font(.title) .frame(width: 300, height: 300) .background(.blue) } } And here's the result. As expected, the Content View is hugged nicely by the window: My goal is to place a fixed-size view like this in the detail column of a Navigation Split View. So I update the scene's root view: import SwiftUI @main struct TestApp: App { var body: some Scene { WindowGroup { NavigationSplitView( sidebar: { }, detail: { ContentView() } ) } .windowResizability(.contentSize) .windowToolbarStyle(
Replies
3
Boosts
0
Views
2.5k
Activity
Feb ’24
Reply to ML model "Parse issue" expected ;
After looking at this some more this moring I found a work around. I went back to the table of data and removed the spaces from the column heading Day of Week (it was the first column in the CSV file) so that it was DayOfWeek and the code generated correctly. The funny thing is that the other column headings in the table have spaces and it inserts the underscore for them fine.I think it may be a bug with the automatic code generator. Either fix the generator to consistently insert the underscore in all column headers or change the documentation to indicate column headers should contain no spaces.Anyway the workaround worked and everything is now working now.Thanks for looking at this you got me thinking!
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jul ’18
Reply to (speculate (event-horizon ?end)) only firing for one defrule
Yes. (set-column-narrative <col> <format> <args>) you had forgotten the column name. There should be an error waiting for you in your modeler's console. Was it not there?
Replies
Boosts
Views
Activity
Jun ’19
Reply to Tabular classification using Create ML Components
A tabular classifier will return both the classification probabilities and the most likely labels. If your target column name is target the predicted labels column is also going to be target while the probability distributions is going to be in targetProbabilities. You can always print the whole data frame with print(result) and see what the columns are. Hope this helps.
Replies
Boosts
Views
Activity
Apr ’23
Reply to NSOutlineView more space before title
The easiest way is to insert another column before the outline column that has the required amount of extra space.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jul ’16
Reply to Question About Swift
I'm still tweaking it but I was thinking something along these lines...printTable Function Initialize two variables: one to hold the character count of the column label and the other to hold the character count of each itemif the character count of item is greater than the character count in the column label set them equal to each otherfor the column labels, set paddingNeeded equal to the width of each column minus the character count in columnLabelfor the rows, set paddingNeeded equal to width of each column minus the character count of each item or might use a function to compute widths then implement in printTable functionWhat do you think?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’18
Reply to How SwiftUI Table sorting works ?
Still not completely clear to me. Lets say I click on Family name column, what happens next? Does the value of sortOrder variable change if I click on Family name column? If yes, what will be the new value? Also, how can I use custom Comparator for different columns?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23