Search results for

column

2,051 results found

Post

Replies

Boosts

Views

Activity

NSImageView appears ghostly inside view-based NSTableView.
I have a custom render CGImage, being put in an NSImage, put in an NSImageView, which is a subview of a custom NSView subclass returned for the column's view for a view-based NSTableView. When I use the visual debug inspector (not the view debugger), I get the image I expect when I preview the cgimage, the ns image, the nsimageview, but when I preview the cell I get a ghosted image. The dark blacks appear as medium grays, the saturated colors are pastels. I have checked the alphas and looked for secret over-lapping subviews, double checked my columns are not zero-width, and ensured my layout constraints made my image views the full size of my cell. What am I missing that could be causing the image to become faded out like that?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
537
Jun ’18
Reply to NSOpenPanel -> system freeze (10.14, Xcode 10)
You should submit a bug report, of course, but there is a chance this is not about NSOpenPanel itself. There's always been a pitfall, if the dialog is shown in a view style that shows file previews (e.g. columns view) that it's the preview that freezes up, not the dialog itself. It's worth taking a couple of minutes to make it start at a different file, and see if that makes the problem go away.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’18
Custom Instruments - Using Duration In Expressions?
I have a custom Instrument that is using signpost data from my app, and it wants to compute velocity from each of the tasks.To borrow from the WWDC example - Say I have a signpost that measures image downloads, and I have a custom instrument wrapping it. I then want to compute the download speed. I have the image size, and the duration, but I can't figure out how to create a column for image size / duration. Duration doesn't seem to be a valid identifier for the CLIPS expression, and trips up the compiler pretty quick.My end goal is to have an aggregation view with an average download speed column, so if there is another way there that is easier than creating a new column in my schema, that is ok too.(Image download connection speed is not my exact situation, but without getting into ugly domain specifics, it's the same concept.)
2
0
2.1k
Jun ’18
How to improve MPSMatrixMultiplication performance?
Matrix multiplication with Metal Performance Shaders work poorly with large data sizes. Performance on GPU is very sensitive to exact matrix dimensions, decreases on matrices with sizes larger than 2000*2000 (and crashes macOS on sizes larger than 10000*10000). Even at best settings Radeon Pro 580 GPU is only 1.5x faster than a quad-core i7-7700k, a very disappointing result.Any suggestions for improving the performance? Maybe a better memory management, or memory alignment?Results that I get on square matrix multiplication, single precision (Float):512*512 size - 123 GFlop724*724 size - 72 GFlop1024*1024 size - 709 GFlop1448*1448 size - 551 GFlop2048*2048 size - 189 GFlop2896*2896 size - 190 GFlop4096*4096 size - 147 GFlopCode (can run in Playgrounds):import Foundation import MetalPerformanceShaders func gflops(time: Double, size: Int) -> Double { let ops = 2.0 * pow(Double(size), 3) return ops / time / 1E9 } func foo(_ N: Int) -> Double { // Prepare some data let rowsA = N let columnsA = N let a = Uns
3
0
3.3k
Jul ’18
Reply to How to improve MPSMatrixMultiplication performance?
Found a solution:1. Multiplication must run with private or managed buffer (.storageModePrivate or .storageModeManaged)2. Matrix size must be divisible by 8 (otherwise perfromance drops up to 5 times)So data is loaded into GPU with a managed buffer initialized from the data array, computational results are written to an empty managed buffer, and results are copied back explicitly. There seem to be memory overhead involved in copying, computations fail if both buffers occupy more than half of GPU memory.Results on Radeon Pro 580 (square matrix multiplication by itself; single precision; include memory copy overheads):512 * 512 - 40 GFlops1024 * 1024 - 185 GFlops2048 * 2048 - 880 GFlops4096 * 4096 - 1812 GFlops20,000 * 20,000 - 2591 GFlops, does not crashSame results, but we encode 10 matrix multiplications (repeat 10 times the matmul.encode(...) line):512 * 512 - 188 GFlops1024 * 1024 - 876 GFlops2048 * 2048 - 2168 GFlops4096 * 4096 - 2869 GFlopsCode for the solution:import Foundation import MetalPerformanceSh
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’18
How to control layout-qualifier
Hi,I'm writing a custom instrument that uses signpost intervals and plot-template to separate the intervals into different categories/lanes, in my case based on the thread the signpost came from, and then plot them. In my use case, more than one interval can be live per thread (nested inside the parent interval). I am trying to enforce that all intervals start at layout-qualifier 0 and increase based on the number of live intervals in that thread, so that each plot plots intervals starting at the top and stacking downward. If you don't do this, then the layout-qualifier is apparently based on the number of in-flight intervals process-wide at the time that inverval began, which results in each interval being drawn at a random Y offset within the plot, producing a lot of black space and doesn't reflect the hierarchical nature. Note that this behaviour is actually visible in the Trailblazer sample used in the WWDC Custom Instruments talk, i.e. you can see some plots are 2-wide with the intervals swapping between
1
0
1.2k
Jul ’18
Reply to Named Objects vs Objects created "on the fly"
Assuming world a collection of Gems (likely a matrix given the context of your question), and that the world provides a get method to retrieve the object located at index(column 2, row 5), that is the reference that would be used. It's really no different than the first statement. The gem is a (constant) variable that references the object created by the Gem() constructor. The world.get(atColumn: 5 row: 2), if it exists, returns the same kind of reference to the Gem() object create by world.place(Gem(), atColumn: 5 row: 2.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’18
crash after loginwindow
just installed beta 4 (first beta running on the system) on a mid-2012 macbook pro (og mbp retina) and starting in either normal or safe mode gets me as far as the login window. after that the desktop appears and items start filling in the menubar and then it bails to the console looking screen, and shows a thin column of text (in that awesome 2 point size the retina display shows during verbose boot as well) for about 3 seconds then the login window reappears. i am hoping the system is available for ssh connections and if possible am going to create a new user, just to confirm there isn't something in my startup items causing this crash. additionally, if i can get into the system i will be able to review the log and have some clue as to the messages it is displaying so briefly. does this sound familar to anyone? looks like i may be moonwalking back to high sierra fairly soon if i can't get this resolved.
1
0
1.9k
Jul ’18
UICollectionView FlowLayout in iOS 10 (only)
I have a problem in iOS 10 (only) with my UICollectionView. My VC has a UICollectionView about 1/3 down from the top. The UICollectionView shows two rows of buttons in six columns. The layout works perfect in iOS 11. But in iOS 10 only one row of buttons show. I've inspected the frame that I am assigning to the UICollectionView and, of course, it's the same in both iOS 10 and iOS 11. There's exactly enough space to fit the two rows. The problem happens in both the simulator and device. I'm using Xcode 9.4.1 and Swift 4.1.Here's the method that prepares the layout.private var theLayout: UICollectionViewFlowLayout { return (buttonsView.collectionViewLayout as? UICollectionViewFlowLayout)! }func prepareLayout(for frame: CGRect, and numberOfColumns: Int, animated: Bool = false) { let size = CGSize(width: frame.size.width / (CGFloat(6), height: frame.size.height / CGFloat(2)) // Continue only if a change is detected. guard buttonsView.frame != frame, theLayout.itemSize != size else { return } // Closure t
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
1.7k
Jul ’18
Reply to UICollectionView FlowLayout in iOS 10 (only)
Yes, I've tried all that. I've even commented out the guard as it's only there to prevent unnecesary updates.I reduced the height of the itemSize because my issue appear to be height related; meaning, my columns are fine its the number of rows that isn't correct which should be determined by the height.For an iPad, frame is:▿ (0.0, 284.0, 768.0, 132.142857142857) ▿ origin : (0.0, 284.0) - x : 0.0 - y : 284.0 ▿ size : (768.0, 132.142857142857) - width : 768.0 - height : 132.142857142857and itemSize:▿ (124.0, 62.0714285714286) - width : 124.0 - height : 62.0714285714286All the spacing and inset are = 0.0.Open to suggestions.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’18
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 Workout app first screen
https://www.wareable.com/media/images/2017/11/orkout-2-1510074891-4n4v-column-width-inline.jpgh ttps://www.wareable.com/media/images/2017/11/orkout-2-1510074891-4n4v-column-width-inline.jpgThe first screen.Maybe it is some kind of card layout but i cannot implement.
Topic: App & System Services SubTopic: General Tags:
Jul ’18
Reply to Can i tracking in app purchases?
Unfortunately Search Ads does not track in-app purchase conversions.The solution that I think would work would be to follow the instructions here: https://searchads.apple.com/advanced/help/measure-results/#attribution-api to firstly track if a user has installed the app through Search Ads. Then what you can do is store this in a table in Firebase for example. This would be your first column and would say whether the app download originated from Search Ads. Then, in a second column (In-App Purchase Made), when a user makes an in-app purchase, you could update this to show True and then using that information you'd be able to see in a table which of your users originated from Search Ads and then which of those went on to buy an in-app purchase.Obviously this isn't an official method and does take a bit of work but if it is a requirement, I see this as the only solution. Shame Apple doesn't support it officially.
Topic: App & System Services SubTopic: General Tags:
Aug ’18