Hi,
well if you look at the entire pipeline, it may well be something like this:
yuv->resize to 640x480->RGB->GL texture upload->lanczos filtering to
320->(either on screen, or bus reading for file writing)
You may have 2 resize ops and a GPU upload (and download?) which are all
expansive.
I can
Thanks, that worked great.
On 15 avr. 09, at 12:39, Jeremy W. Sherman wrote:
Hi Micha,
-[NSDictionary objectForKey:] has no such problems. You can use that
to grab the values of keys beginning with an at sign instead of
-valueForKey:.
—Jeremy
On Wed, Apr 15, 2009 at 12:19 AM, Micha Fuhrmann
Hi Richard,
You can't bind to the individual members of your struct.
You could create a pair of accessor methods for the object containing
the struct. These methods could return the values of the struct. For
example:
@interface MyManagedObject : NSManagedObject {
NSPoint origin;
}
I have a model object which is a subclass of NSManagedObject. This
object has a transformable property similar to NSPoint.
The frameworks automatically wrap and unwrap my NSPoint like struct in
an NSValue instance. I would like to bind the individual struct
members x and y to elements of th
Hi Micha,
-[NSDictionary objectForKey:] has no such problems. You can use that
to grab the values of keys beginning with an at sign instead of
-valueForKey:.
—Jeremy
On Wed, Apr 15, 2009 at 12:19 AM, Micha Fuhrmann wrote:
> Hi there,
>
> I'm bumping against KVC, indirectly. I've got a dictionar
On Apr 15, 2009, at 12:19 AM, Micha Fuhrmann wrote:
I'm bumping against KVC, indirectly. I've got a dictionary with
first character keys, each object of the key is an Array with
objects. So key "b" of my Dictionary is an array with file objects'
name starting with the letter "b".
The prob
Thanks for responding, no that does not cut it.
Michael
On 15 avr. 09, at 12:24, Jeffrey Oleander wrote:
--- On Tue, 4/14/09, Micha Fuhrmann wrote:
From: Micha Fuhrmann
Subject: KVC and "@" as key
To: "cocoa-dev Users"
Date: Tuesday, April 14, 2009, 11:19 PM
Hi there,
I'm bumping agai
Hi there,
I'm bumping against KVC, indirectly. I've got a dictionary with first
character keys, each object of the key is an Array with objects. So
key "b" of my Dictionary is an array with file objects' name starting
with the letter "b".
The problem comes up when users have file names st
On Tue, Apr 14, 2009 at 8:26 PM, Kyle Sluder wrote:
> On Tue, Apr 14, 2009 at 7:27 PM, Michael Ash wrote:
>> I should specify, it has no trouble reading a misaligned int pointer
>> *in x86-64 mode*. I did actually test it that way, although the first
>> time I ran the test I compiled it 32-bit an
"All you need then is a search function, which essentially traverses
the tree, concatenating keys and comparing them with the target word."
Actually, I just realized that that's pretty stupid. The efficient way
is to split the word into its characters and traverse the tree,
testing each suc
You know, Miles, I've been thinking about something else you asked
earlier, about storing the trie on disk and loading it that way,
rather than load the data first and build the trie afterwards.
A trie is a tree structure, and so is a plist, so I think you could
combine both and save time i
Yep, I used your dictionaries, not mine. I'm on a core 2 2.8Ghz macbook pro.
On Tue, Apr 14, 2009 at 6:15 PM, WT wrote:
> On Apr 15, 2009, at 2:48 AM, Miles wrote:
>
> Sorry, Wagner, I'm a little spaced -- I didn't realize your test included
>> getting the contents into an array! This is great
On Apr 15, 2009, at 2:48 AM, Miles wrote:
Sorry, Wagner, I'm a little spaced -- I didn't realize your test
included
getting the contents into an array! This is great.
No harm, no foul. :)
Here are some VERY interesting results. The simulator seems to be
faster
with bin and text, while the
Sorry, Wagner, I'm a little spaced -- I didn't realize your test included
getting the contents into an array! This is great.
Here are some VERY interesting results. The simulator seems to be faster
with bin and text, while the device is quite a bit slower with text, and
about even with bin and xml
Hell all,
Let's suppose I've got NSString @"C:omponent" , which represents the
name of a file. Is there a way to instruct NSString class not to treat
a leading single letter followed by a column as a path separator?
Namely, I need this one treated as only one path component
@"C:omponent",
On Apr 14, 2009, at 5:22 PM, Harry G wrote:
Hi, I'm currently writing an app for iphone that downloads large
tables of text and images , and my server outputs big endian.
How significant would the extra processing be to convert to small
endian on the iPhone?
I'm sure most of you would rec
On Tue, Apr 14, 2009 at 7:27 PM, Michael Ash wrote:
> I should specify, it has no trouble reading a misaligned int pointer
> *in x86-64 mode*. I did actually test it that way, although the first
> time I ran the test I compiled it 32-bit and then felt kind of
> stupid
You're right, I haven't
Hi, I'm currently writing an app for iphone that downloads large
tables of text and images , and my server outputs big endian.
How significant would the extra processing be to convert to small
endian on the iPhone?
I'm sure most of you would recommend doing the conversion on the
server si
On Apr 15, 2009, at 1:23 AM, Miles wrote:
There are a handful of games out there that are small in size, have
fast
loading times, and quick dictionary checking. If only I knew how
they did
it!
Have you considered contacting their authors directly and asking? You
might get lucky and find
On Apr 15, 2009, at 1:23 AM, Miles wrote:
*2)* Wagner, thanks for that test, that's great to know! I'll check
it out
in a bit, right now I'm focusing on saving time getting the data
into an
array or some other format to suit my needs.
Then you might want to look at what I did sooner rather
Hi,
i have a list with QTMovie objects which are supposed to be played
one after another. Now, to recognize when a movie has finished
playing i registered for the QTMovieDidEndNotification. For some
reason though this notification is sometimes posted several times
leading to a somewhat ra
On Tue, Apr 14, 2009 at 7:23 PM, Miles wrote:
> *1) *I've been trying Kyle's suggestion for a few hours and I can't get it
> working right. I broke it into this simple example, and it's not able to
> convert it to the 'word' struct.
At this point, better solutions that involve less hackery have b
Hello,
I use QTKit to grab an image from my webcam. Then i need to resize it into
a smaller image.
Going from My CIImage, i use two filter "CILanczosScaleTransform" and "CICrop"
to get my image at the correct size. (640x480 to 320x240+crop).
Doing only that, my CPU go up to 30% of usage while it
On Tue, Apr 14, 2009 at 7:34 PM, Kyle Sluder wrote:
> On Tue, Apr 14, 2009 at 7:26 PM, Michael Ash wrote:
>> That has to be the most confusing technical document I've ever seen.
>> I'm not certain, but after reading it about three times, I'm pretty
>> sure that it's discussing data alignment on I
On Tue, Apr 14, 2009 at 7:26 PM, Michael Ash wrote:
> That has to be the most confusing technical document I've ever seen.
> I'm not certain, but after reading it about three times, I'm pretty
> sure that it's discussing data alignment on IA-64 (Itanium), not
> x86-64. Microsoft certainly thinks t
Here's what I've been using for shuffling an array of ints. It appears
to work quite well and is very simple and fast.
/*
* shuffle
*
* This function is from http://www.stanford.edu/~blp/writings/clc/shuffle.html
* Copyright ¨© 2004 Ben Pfaff
*
* BDC made change to add argument to allow
On Tue, Apr 14, 2009 at 7:26 PM, Michael Ash wrote:
> And a quick test confirms that my Mac Pro, at least, has no trouble
> reading a misaligned int pointer.
I should specify, it has no trouble reading a misaligned int pointer
*in x86-64 mode*. I did actually test it that way, although the first
On Tue, Apr 14, 2009 at 7:18 PM, Kyle Sluder wrote:
> On Tue, Apr 14, 2009 at 7:09 PM, Michael Ash wrote:
>> This is not so. It's extremely rare to find a platform which
>> *requires* aligned access, and you certainly won't find one running OS
>> X. What's more common is finding a platform which
You guys are awesome!
*1) *I've been trying Kyle's suggestion for a few hours and I can't get it
working right. I broke it into this simple example, and it's not able to
convert it to the 'word' struct.
NSMutableData *data1;
NSString *myString = @"\\x06hello\\x00";
const char *utfMyString = [mySt
On Tue, Apr 14, 2009 at 7:09 PM, Michael Ash wrote:
> This is not so. It's extremely rare to find a platform which
> *requires* aligned access, and you certainly won't find one running OS
> X. What's more common is finding a platform which *prefers* aligned
> access, punishing misaligned access wi
On Tue, Apr 14, 2009 at 3:03 PM, Kyle Sluder wrote:
> 2) Pointer access needs to be 4-byte aligned (on PC, don't know about
> iPhone);
This is not so. It's extremely rare to find a platform which
*requires* aligned access, and you certainly won't find one running OS
X. What's more common is findi
On Tue, Apr 14, 2009 at 2:12 PM, Miles wrote:
> [This is sort of in continuation of the thread "Build Settings for Release:
> App/Library is bloated", which gradually changed topics.]
> I'm trying to find the best way to load in a 2MB text file of dictionary
> words and be able to do quick searche
Hi everyone,
I am using the Better Authorization Sample code from Apple in one of
my projects, and I'm seeing a weird behavior on Tiger. I could only
test so far on 10.4.11, so I can't say if it happens from 10.4.6
(minimum for BAS) all the way.
After a reboot, if I start either my app or
On Apr 14, 2009, at 11:45 PM, Graham Wheel wrote:
then iterate completely through the array, swapping each element
with a randomly chosen element.
As pointed out earlier, this is biased. The randomly chosen element
should be chosen from the "unexplored" section of the array to obtain
an u
On Apr 14, 2009, at 1:32 PM, Eric E. Dolecki wrote:
My apologies - what I meant to type was that I AM doing this:
int tmp = (arc4random()%10)+1;
while (tmp == activeTarget) {
tmp = (arc4random()%10)+1;
}
activeTarget = tmp;
This is for a game, so it's not very critical or anything. Som
Focusing just on the non-repeating aspect, Deitel & Deitel discuss an
algorithm to achieve this in C How To Program. Lets assume we are
talking about shuffling a deck of 52 cards. Assign each card to an
array element, then iterate completely through the array, swapping
each element with a
Hi Miles,
I wrote a little iPhone app to test loading the standard UNIX
dictionary (/usr/share/dict/web2, 234,936 words). If you'd like, you
can download the XCode 3.1.x project from here:
http://www.restlessbrain.com/DictTest.zip
I don't actually have an iPhone, so I only tested it on the
On Apr 14, 2009, at 1:32 PM, Eric E. Dolecki wrote:
My apologies - what I meant to type was that I AM doing this:
int tmp = (arc4random()%10)+1;
while (tmp == activeTarget) {
tmp = (arc4random()%10)+1;
}
activeTarget = tmp;
So, you are generating a random number between 1 and 10, inclus
On Apr 13, 2009, at 7:58 PM, Eric E. Dolecki wrote:
For an example I might want to generate numbers from 1 to 10 over
and over.
All I want to do is when I generate a new number is not allow it to
equal
the previously held value. I can imagine a few approaches but I just
wanted
to make sur
My apologies - what I meant to type was that I AM doing this:
int tmp = (arc4random()%10)+1;
while (tmp == activeTarget) {
tmp = (arc4random()%10)+1;
}
activeTarget = tmp;
This is for a game, so it's not very critical or anything. Someone told me
that I might want to avoid a while loop at
On 14 Apr 09, at 09:24, Eric E. Dolecki wrote:
to get back to my original question I'm not just doing this:
Then what are you doing? It'd really help to know what you're trying
to accomplish here.
___
Cocoa-dev mailing list (Cocoa-dev@lists.appl
On Apr 14, 2009, at 11:05 AM, Livio Isaia wrote:
Is it possible to connect a variable of an object I created to an
NSArrayController variable?
To be clear: bindings deal with properties, not variables. I don't
necessarily mean "declared properties" using @property, but properties
in the
On Tue, Apr 14, 2009 at 2:12 PM, Miles wrote:
> I'm not super concerned about the 2MB of disk space the txt file takes up,
> although I wouldn't be mad about decreasing it somehow. And once I get the
> whole dictionary in an array, the searches are basically fast enough for my
> purposes. I've sti
On Apr 13, 2009, at 9:18 AM, Luca C. wrote:
2009/4/13 Luca Ciciriello
I've created an application with a button "Exit" and I've connected
it with
the method:
- (IBAction)exitApp:(id)sender
{
// TODO
}
Now my question is: "Which call I have to do to quit my application
instead
of
Have you tried splitting the full dictionary into sub-dictionaries (as
an offline, pre-processing step) and then having your application load
them in sequence, one at a time? It might be that creating separate
arrays and then joining them is faster than creating one array for the
entire dic
[This is sort of in continuation of the thread "Build Settings for Release:
App/Library is bloated", which gradually changed topics.]
I'm trying to find the best way to load in a 2MB text file of dictionary
words and be able to do quick searches.
Simply loading the uncompressed txt file takes abou
On Apr 14, 2009, at 12:14 PM, Greg Robertson wrote:
I am using Core Data and have a two entity setup that in a simple form
could be modelled something like this:
Entity: Persons
- attribute: name
- attribute: birth
- relationship: cars (one to many with cars)
Entiry: Cars
- attribute: name
I
to get back to my original question I'm not just doing this:
int tmp = (arc4random()%10)+1;
while (tmp == activeTarget) {
tmp = (arc4random()%10)+1;
}
activeTarget = tmp;
On Tue, Apr 14, 2009 at 11:32 AM, Michael Ash wrote:
> On Tue, Apr 14, 2009 at 6:56 AM, Jean-Daniel Dupas
> wrote:
I am using Core Data and have a two entity setup that in a simple form
could be modelled something like this:
Entity: Persons
- attribute: name
- attribute: birth
- relationship: cars (one to many with cars)
Entiry: Cars
- attribute: name
I would like to search for all persons not born on th
Hi,
In objective C++, would it work to use Boehm's garbage collector for
my C++ objects ? Has anyone used it?
Fabrice
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Is it possible to connect a variable of an object I created to an
NSArrayController variable?
I mean:
I have a NSWindowController "MyWindowController" which is also the nib
file's owner type class.
In the nib file I created an NSArrayController "MyArrayController"
connected with a NSTableVie
On Apr 14, 2009, at 11:54 AM, Kyle Sluder wrote:
You want to make the text field "continuous". Be aware that this will
also cause your changes to be committed, not just validated,
continuously.
Do you mean the checkbox in IB labelled "continuously updates value"?
That's checked, and my va
You want to make the text field "continuous". Be aware that this will
also cause your changes to be committed, not just validated,
continuously.
--Kyle Sluder
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
Thanks.
Your idea of storing this kind of meta-data in the database is
interesting. Since I am a Cocoa and CD newbie, would you mind
elaborating on your method please? For example, in which callback do
you set the array controllers' selection? When do you save the current
selection? How d
I have a sheet. It's got a number of NSTextFields on it. They're
bound to an ObjectController, in entity mode, for the entity that the
sheet allows the user to create or edit. I've got validation methods
for the values. They work correctly. Except, if I coerce the value
to a valid one,
On Tue, Apr 14, 2009 at 9:23 AM, Karan, Cem (Civ, ARL/CISD)
wrote:
>> >I haven't tried either of the methods I mentioned so far
>> (because I'm
>> >lazy, sorry:), but what I have tried is I created NSData
>> from the large
>> >object by using NSKeyedArchiver. It has taken forever, so
>> that I had
Not sure about NSTableViews, but with NSOutlineViews, which I'd think
behave the same way, the secret sauce is to make sure that your items
have all of persistentObjectForItem, initWithPersistentObject, isEqual
and hash consistently implemented. Reason being that what is stored to
your pref
On Tue, Apr 14, 2009 at 6:56 AM, Jean-Daniel Dupas
wrote:
> reading /dev/random is currently the best way to generate random number on
> OS X.
>
> http://lists.apple.com/archives/apple-cdsa/2009/Mar/msg00077.html
Careful with these blanket pronouncements. The best way depends on
your goals, as is
On Apr 14, 2009, at 4:03 AM, Uli Kusterer wrote:
FWIW, I was having some strange issues with NSTask and setuid child
processes (...) My eventual solution was to roll my own version of
NSTask which gave me full control over the way the child process
was set up, (...) I was able to track down
From NSObjCRuntime.h (10.5SDK)
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
It appears that the documentation is incorrect (the comment is
correct: "... A 64-bit application tr
[again, sending to list]
According to Roland King:
> but not this. NSUInteger is just a typedef isn't it, so this is really
> unsigned int / int and I was expecting a warning. Have I missed a
> warning flag or is there some NSUInteger artifact I'm not aware of?
I've been puzzled by this, but
I have this definition using NSUInteger
-(id)initWithXExtent:(NSUInteger)xExtent yExtent:(NSUInteger)yExtent;
and I was stupidly calling it like this
GameBoard *gb = [ [ GameBoard alloc ] initWithXExtent:5 yExtent:-10 ];
and I didn't get a warning and spent 5 minutes trying to
When I did a little work in this area a few weeks ago, I found that
just adding a UTI to a document type caused -[NSDocumentController
defaultType] to return nil. I posted on this list but no one knew the
answer. It might be relevant to your issue...
http://www.cocoabuilder.com/archive/me
> >I haven't tried either of the methods I mentioned so far
> (because I'm
> >lazy, sorry:), but what I have tried is I created NSData
> from the large
> >object by using NSKeyedArchiver. It has taken forever, so
> that I had to
> >force-quit the process. That's why I am asking if the same th
On Mon, Apr 13, 2009 at 8:52 PM, Eric Slosser wrote:
> Nope. Since you seemed to be suggesting that was the problem, I added the
> following to Info.plist. But it didn't help. Am I missing something?
Why are you importing and exporting the same type? You should only be
exporting in this cas
On Tue, Apr 14, 2009 at 12:11 AM, Michael Ash wrote:
> Of course there is always the opportunity for bugs.
The reason I said "not necessarily" is because in this area there has
been a lot of functionality change in this area due to UTI adoption.
Some things that would previously ignore UTIs or as
Le 14 avr. 09 à 13:08, WT a écrit :
On Apr 14, 2009, at 12:56 PM, Jean-Daniel Dupas wrote:
reading /dev/random is currently the best way to generate random
number on OS X.
http://lists.apple.com/archives/apple-cdsa/2009/Mar/msg00077.html
Yes, and those are *true* random numbers, since th
On Apr 14, 2009, at 12:56 PM, Jean-Daniel Dupas wrote:
reading /dev/random is currently the best way to generate random
number on OS X.
http://lists.apple.com/archives/apple-cdsa/2009/Mar/msg00077.html
Yes, and those are *true* random numbers, since their source is
physical rather than al
On Apr 14, 2009, at 12:26 PM, Luca C. wrote:
Given a seed, rand() will create always the same sequences for that
seed.
The same sequence (singular), yes. Each seed generates only one
sequence.
But if the seeds changes all the time, you'll always get different
sequences, as it's obvious.
Le 14 avr. 09 à 12:26, Luca C. a écrit :
2009/4/14 Uli Kusterer
On 14.04.2009, at 01:44, Luca C. wrote:
You can put every (unsigned) value you want in there, though in
general it's used passing (unsigned)time(NULL) as parameter. This
way
you'll always get a different int.
No you wo
2009/4/14 Uli Kusterer
> On 14.04.2009, at 01:44, Luca C. wrote:
>
>> You can put every (unsigned) value you want in there, though in
>> general it's used passing (unsigned)time(NULL) as parameter. This way
>> you'll always get a different int.
>>
>
>
> No you won't. It's a *random* number gene
On 13 Apr 2009, at 22:52:15, Uli Kusterer wrote:
or the slightly shorter and a thoretically a tad more dangerous
similar call with NSApp in it are really the only option. (Well,
theoretically you could send yourself a "quit" Apple Event, but
that's only of academical interest...)
Why is
On 11.04.2009, at 20:50, Gwynne Raskind wrote:
FWIW, I was having some strange issues with NSTask and setuid child
processes (...) My eventual solution was to roll my own version of
NSTask which gave me full control over the way the child process was
set up, (...) I was able to track down th
On 14.04.2009, at 03:02, Michael Ash wrote:
On Mon, Apr 13, 2009 at 8:46 PM, Uli Kusterer
wrote:
On 14.04.2009, at 02:36, Michael Ash wrote:
Note that writing a
proper shuffling algorithm is harder than it sounds. More properly,
it's easy, but figuring out whether you got the correct one or
On 14.04.2009, at 08:42, Frederik Slijkerman wrote:
I understand, but forking the code will hurt a lot, too. :-)
I never said fork. I meant get it refactored in a way that the code
that does the unneeded buffering is in a Windows-only class, while the
rest stays available.
OK, thanks, I
75 matches
Mail list logo