Faster approach to load data in NSTableView from a file? - objective-c

In my application I am reading data from a text file and displaying it in NSTableView. There are 6 columns in my tableview. My problem is when the records in file are more it takes too long to read and display the data. e.g. It takes around 1 min to read and display 70,000 records from the file. I am using NSArrayController to update my NSTableView. Please suggest some solution to make my application faster. Should I read and display only that much data that is visible to the user (like in iphone but i dont know how is it done OSX?) and update my view on scrolling?
Thanks & Regards
Abhijeet

I strongly recommend you use the CoreData framework. Reading in the entire array with 70,000 records is nuts.
Start here: Core Data Programming Guide.

Related

Conveniently randomize image via button from folder/slide?

I often spend hours bringing pictures into PowerPoint templates one by one and trying to customize the way a presentation whose behavior is very different.
If there were a way to randomly select an image from all of the images on a different slide or excel file or folder and have them appear based on the probable weight assigned to them, it would be a huge time saver.
I've seen various methods of having a random object appear, and some of them don't even require a macro, but importing the images is always very time consuming. If anyone knows of a better/faster way to link a folder with a group of images or something along these lines to an object that is randomized, please help.
Importantly, showing a random image from a batch group without customizing the way each image is brought in is the hard part. Adding weight helps, but it could be done by duplicating important images repeatedly.

Windows Form, image gridlines

Currently I want to create an application.multiscreen transitionstrong text
But I have a problem I do not know how to do these lines that divide the image into several parts. I want to cut the image into several parts and these parts you can handle, please at least some ideas.
If you want to split images up programmatically you are first going to have to choose a file format to support. I suggest PNG to begin with because their encoding is fairly simple to understand (see HERE) and c# has a class to decode it (see HERE.)
You'll want to think of the PNG file as a matrix of RGB values that you can split up and store into separate new smaller PNG files.
If you want to support other image file types you will have to do some research into their encoding formats and handle them differently.
Well I did. Of course other method as I create a WPF application. show image
This program is intended to control 3, 6 and 9 monitors connected by Raspberry Pi. As you can see in the image I want to first grid to have 2 buttons. The first button to set the image resolution of first grid. The second button can send images from the first grid to the first monitor and so on all grids.
Thank you very much for your help. Wait a few suggestions.

Photoshop Actions - Is this possible?

Okay, here's what's going on..
I have a folder that has 200 images in it.
They're all named - p001.png, p002.png, p003.png... all the way up to p200.png
I need to create an Action that pulls in 2 images at a time, in ascending order.
After Resizing & Positioning the images, I need to add text above each image that says "Image #X"
(in place of 'X', would be the number of the corresponding image)
Once it finishes with the 1st two images, it saves it in a specified folder; and pulls in the next 2 images.
And just repeats the process until it goes through all 200 images.
Here's my 2 questions:
1 - Is it possible to pull in 2 images at a time in ascending order, from a specified folder, via an Action?
2 - Is it possible to replace 'X' with the image's number, as it moves up in ascending order?
Any kind of help with this would be Greatly appreciated.
Thanks in advance!
p.s. I'm using PhotoShop cs5.5 if that makes a difference
First checkout the Contact Sheet functionality, perhaps you can achieve your tasks this way.
In terms of scripting, there are indeed functions available to :
load a file into the document
create a text layer
set the text of the text layer
Check out the Photoshop CS5 JavaScript Language Reference for more details.
Additionally, you should have Extend Script Toolkit installed as well.
Run Extend Script Toolkit then give this a quick go:
#target photoshop
alert("Hello World!");
Using the Object Model Viewer (available under the Help menu) you should be able to select the Photoshop Type Library and view useful available objects such as Application,Document,Layer, etc. and see their properties and methods.
Additionally the Data Browser panel and autocomplete should help.

Custom cell for Objective C

I am new to coding in Objective C. Originally I was bringing in a string of data into my tableView and I was having a really tough time with spacing out everything row by row. So I just need some guidance as to whether or not I am headed in the right direction. I have decided to make a custom cell with multiple views within it. So if I feed each piece of the data separately into each view, would that do the trick of having each row align with one another? Do I need to have anything else within each view i.e. labels? Also how should I think about this code logically? I'm not sure how to send data to each separate view?
As you are new to Obj-C coding, go through this sample app.
This sample code demonstrates getting data from server in xml format, parsing the xml response, and displaying in a table, it also uses custom cell to display parsed data.

Populating table cells from a external list file in Objective C

If I were to use the split table view controller (for iPad) rather than hard code the contents of the table to populate the view, can I import the information (including pictures) to populate the cells? Leading to an easy way to update the information held in the table?
thanks.
Look at Apple code samples, like this one, especially the ones regarding UITableViewDataSource to understand how to fill a table.
A simple property list file should fit your needs. They are easy to create/edit with Xcode and easy to read with code, like [NSArray arrayWithContentsOfFile:path]...