RE: Help with SHA class

2009-06-04 Thread Karan, Cem (Civ, ARL/CISD)
On Thu, 4 Jun 2009 09:29:43 -0400 Ken Tozier wrote > > I wrote a SHA class using the algorithm at > http://en.wikipedia.org/wiki/SHA1#SHA-1_pseudocode <> When in doubt, go to the source! http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf It's pretty easy to implement from t

RE: [OT] Anyone have the a DIRECT phone number for a real person at Apple Legal???

2009-05-20 Thread Karan, Cem (Civ, ARL/CISD)
2009 6:03 PM > To: Karan, Cem (Civ, ARL/CISD) > Cc: cocoa-dev@lists.apple.com > Subject: Re: [OT] Anyone have the a DIRECT phone number for a > real person at Apple Legal??? > > Have you tried applefede...@apple.com ? Got that from here: > http://www.apple.com/busine

RE: [OT] Anyone have the a DIRECT phone number for a real person at Apple Legal???

2009-05-20 Thread Karan, Cem (Civ, ARL/CISD)
If I could get a real contact, then I wouldn't have done this. Thanks, Cem Karan I. Savant wrote on Tuesday, May 19, 2009 4:42 PM: > On Tue, May 19, 2009 at 4:27 PM, Karan, Cem (Civ, ARL/CISD) > wrote: > > Various people here at work have been trying to get in > contac

[OT] Anyone have the a DIRECT phone number for a real person at Apple Legal???

2009-05-19 Thread Karan, Cem (Civ, ARL/CISD)
Various people here at work have been trying to get in contact with someone at Apple on the Legal team about the iPhone Enterprise agreement paperwork, but we've just been getting the run around. Does anyone have a DIRECT number (not just the info at http://www.apple.com/legal/contacts.html I m

RE: singletons and autoreleased objects

2009-05-15 Thread Karan, Cem (Civ, ARL/CISD)
> On May 13, 2009, at 8:30 , Karan, Cem (Civ, ARL/CISD) wrote: > > > I have an object that I've turned into a singleton via the > techniques > > described at: > > > > > http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaFundame

singletons and autoreleased objects

2009-05-13 Thread Karan, Cem (Civ, ARL/CISD)
I have an object that I've turned into a singleton via the techniques described at: http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32 This works great, but I've started debugging, and discovered that

Re: Best way to pass large objects between tasks?

2009-04-14 Thread Karan, Cem (Civ, ARL/CISD)
> >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

RE: -finstrument-functions and program startup

2009-01-29 Thread Karan, Cem (Civ, ARL/CISD)
Shawn Erickson wrote on Thursday, January 29, 2009 11:56 AM: > DTrace is probe based. If a probe exists and is enabled it > will fire and allow you to collect information. > > For example try the following in terminal... > > sudo dtrace -n 'syscall:::entry' > > With that said you need a provid

RE: -finstrument-functions and program startup

2009-01-29 Thread Karan, Cem (Civ, ARL/CISD)
Greg Parker wrote on Wednesday, January 28, 2009 4:22 PM > On Jan 28, 2009, at 10:33 AM, Karan, Cem (Civ, ARL/CISD) wrote: > > First off, I know this question is going to the wrong list, > but I have > > NO idea which list would be best. If anyone wants to jump > in and

-finstrument-functions and program startup

2009-01-28 Thread Karan, Cem (Civ, ARL/CISD)
First off, I know this question is going to the wrong list, but I have NO idea which list would be best. If anyone wants to jump in and tell me a better list, I'll gladly move there. Background: I have an application that is working very, very hard to drive me insane. It is multithreaded, laz

NSOperation and NSOperationQueue cancellation and ordering questions

2009-01-09 Thread Karan, Cem (Civ, ARL/CISD)
I am currently using NSOperation (actually, NSInvocationOperation) and NSOperationQueue to decouple my GUI from some long running operations. Some operations are dependent on one another, in a purely linear fashion, so I've been treating them in the same way I'd treat a singly linked list, keep

RE: Binary search on sorted NSArray in Cocoa?

2009-01-07 Thread Karan, Cem (Civ, ARL/CISD)
Ken Thomases wrote on Tuesday, January 06, 2009 11:24 PM: > On Jan 6, 2009, at 10:42 AM, Karan, Cem (Civ, ARL/CISD) wrote: > > > I know I'm being pedantic, but just to make sure, will the > following > > code work? > > > > // mySortedArray is an NSA

RE: Binary search on sorted NSArray in Cocoa?

2009-01-06 Thread Karan, Cem (Civ, ARL/CISD)
Adam R. Maxwell wrote on Tuesday, January 06, 2009 9:59 AM: > On Jan 6, 2009, at 8:16 AM, Karan, Cem (Civ, ARL/CISD) wrote: > > > My question is, does NSArray already have a binary search method > > defined on it in a category somewhere? If it does, I'd rather use &g

Binary search on sorted NSArray in Cocoa?

2009-01-06 Thread Karan, Cem (Civ, ARL/CISD)
I have an NSArray of unique NSString instances that I have sorted. I am looking for the neighbors of a specific string within the array, which basically means finding the string's index, and then looking at the objects ahead and behind the string. So far, so good; I can use indexOfObject to fi

encoding/decoding selectors?

2008-12-15 Thread Karan, Cem (Civ, ARL/CISD)
I need to encode/decode an object which has a selector as one of its instance variables. I know that NSCoder doesn't directly support this, so my current way of doing things is the following: - (void) encodeWithCoder:(NSCoder *) aCoder { [aCoder encodeObject:NSStringFromSelector(self.se

RE: Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-10 Thread Karan, Cem (Civ, ARL/CISD)
> > To lay the groundwork for this question, I'm going to state that I'm > > getting my definitions for MVC, MVP, and Passive View from the > > following: > > > > http://en.wikipedia.org/wiki/Model-view-controller > > http://en.wikipedia.org/wiki/Model_View_Presenter > > http://www.martinfowler.co

Best way to do hit testing on an image?

2008-12-09 Thread Karan, Cem (Civ, ARL/CISD)
I am in the process of creating a new interface for my program, which, for lack of any good comparison, can be thought of as a 2D scrolling game with a bunch of clickable sprites. I need to do hit testing to see if particular bitmaps have been clicked on. I have the following information avail

Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-09 Thread Karan, Cem (Civ, ARL/CISD)
To lay the groundwork for this question, I'm going to state that I'm getting my definitions for MVC, MVP, and Passive View from the following: http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model_View_Presenter http://www.martinfowler.com/eaaDev/PassiveScreen.html

RE: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Karan, Cem (Civ, ARL/CISD)
On Wednesday, November 19, 2008 9:04 AM Jean-Daniel Dupas wrote: > Do you need text editing capability, or just text drawing ? > > If this is text drawing, I don't see what NSTextView provide > that is not possible with NSAttributedString, and so, with > the GLString class that convert an attri

Re: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Karan, Cem (Civ, ARL/CISD)
On Tue, 18 Nov 2008 12:26:04 -0800 (PST) Erik Buck wrote: > Open GL has no built-in capability for drawing text. Open GL > provides lower level primitives like lines and curves and > meshes. Open GL also provides texture compositing. > > There are some free and some open text drawing/font so

OpenGL + NSTextView/NSTextContainer?

2008-11-18 Thread Karan, Cem (Civ, ARL/CISD)
I've recently been (mentally) exploring some potential user interfaces, and thought up one that I'd like to implement if it is possible. The problem is that I don't know much about OpenGL, or NSTextView/NSTextContainer, so I need to bounce my questions off of people with knowledge/experience.

RE: Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Karan, Cem (Civ, ARL/CISD)
I like this method the best; there is (potentially) a lot of output, and this is probably the cleanest method. Thanks! Thanks, Cem Karan > -Original Message- > From: Scott Ribe [mailto:[EMAIL PROTECTED] > Sent: Friday, November 14, 2008 11:23 AM > To: Karan, Cem (Civ, ARL/

Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Karan, Cem (Civ, ARL/CISD)
I'm using a library that has been ported over from Linux that uses fprintf() and a global variable to determine where to dump a bunch of logging information. I don't really have the option of converting all of this to syslog() or NSLog(), and I don't want to waste a bunch of time on this librar

RE: properties, threads, and KVO

2008-11-04 Thread Karan, Cem (Civ, ARL/CISD)
> -Original Message- > From: Chris Hanson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 04, 2008 10:49 AM > To: Karan, Cem (Civ, ARL/CISD) > Cc: cocoa-dev@lists.apple.com > Subject: Re: properties, threads, and KVO > > On Nov 4, 2008, at 7:20 AM, Karan, C

properties, threads, and KVO

2008-11-04 Thread Karan, Cem (Civ, ARL/CISD)
I'm running into a problem with my code that is most easily solved by splitting up everything into a client server model, where the client is the main thread of my application, and the server is a background thread that does networking type stuff. I want the client to update itself as soon as t

Re: Compare images in Cocoa

2008-10-31 Thread Karan, Cem (Civ, ARL/CISD)
On Thu, 30 Oct 2008 20:21:47 -0700, Pierce Freeman wrote: > Hi everyone. I am wondering if there is some way to compare > two images in Cocoa, and then somehow spit out a percent of > how similar they are. The only way I could think of is > comparing every pixel, but this seems like it would ta

RE: Can we ask iPhone questions yet?

2008-10-28 Thread Karan, Cem (Civ, ARL/CISD)
> Like the subject says, can we ask iPhone questions yet? I'm > stumped and I need help. > > Thanks, > Cem Karan Thanks to everyone that replied. I put my question up at http://discussions.apple.com/thread.jspa?threadID=1769333&stqc=true so if you want to reply to it, I'll keep an eye on it ov

Can we ask iPhone questions yet?

2008-10-27 Thread Karan, Cem (Civ, ARL/CISD)
Like the subject says, can we ask iPhone questions yet? I'm stumped and I need help. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: Appropriate use of bindings?

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
> -- > > Message: 16 > Date: Tue, 7 Oct 2008 19:19:27 +0100 > From: Citizen <[EMAIL PROTECTED]> > Subject: Re: Appropriate use of bindings? > To: Cocoa List > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > Th

Appropriate use of bindings?

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
I'm having a slight dilemma in deciding which I should use, notifications or bindings. Here is the background: I have a bunch of C++ code that uses something akin to delegates; you derive from a base class, pass that into an instance of a server class, and the server class calls the delegate

RE: [Disarmed] Re: NSNotificationQueue EXC_BAD_ACCESS problems

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
That was it! Thanks, I should have checked for that first. Thanks, Cem Karan > -Original Message- > From: Julien Jalon [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 07, 2008 10:39 AM > To: Karan, Cem (Civ, ARL/CISD) > Cc: cocoa-dev@lists.apple.com > Subj

NSNotificationQueue EXC_BAD_ACCESS problems

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
I'm having a great deal of trouble getting my notification queue to work correctly. It always causes a EXC_BAD_ACCESS whenever I post using NSPostASAP or NSPostWhenIdle, but it works when I post using NSPostNow. Here are the relevant lines of code: -(void) testMethod { NSNotification *tem

Re: -[NSScanner scanUpToString:stopString:NULL] - 10.3.9 Crash, due Xcode 3.1?

2008-10-02 Thread Karan, Cem (Civ, ARL/CISD)
>Yes, I see what you mean there. It looks suspicious without the rest >of the code. Here is the entire method (without the logging) > >- (BOOL)scanUpToAndThenLeapOverString:(NSString*)stopString >intoString:(NSString**)stringValue { > [self scanUpToString:stopStr

What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Karan, Cem (Civ, ARL/CISD)
I've got a class that acts like a super-lightweight server within my program. It listens for incoming packets of information, decodes them, and then tells the rest of my code that something changed. So far, this sounds like a job for NSNotificationCenter, except that I'm getting the packets by

RE: NSXMLParser bug?

2008-09-12 Thread Karan, Cem (Civ, ARL/CISD)
> > This is the usual pattern at init. Let's say a user calls a > > non-designated initializer. That may call other non-designated > > initializers, but at some point one of those will call self with > > something that is a designated init method of the leaf class. That > > method will call

RE: NSXMLParser bug?

2008-09-11 Thread Karan, Cem (Civ, ARL/CISD)
Yup, it does. I'll have to keep that in mind the future. Thanks for saving me from writing a useless bug report! Thanks, Cem Karan -Original Message- From: Graham Cox [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2008 9:10 AM To: Karan, Cem (Civ, ARL/CISD) Cc: coco

RE: NSXMLParser bug?

2008-09-11 Thread Karan, Cem (Civ, ARL/CISD)
: Karan, Cem (Civ, ARL/CISD) Cc: cocoa-dev@lists.apple.com Subject: Re: NSXMLParser bug? On 11 Sep 2008, at 9:57 pm, Karan, Cem (Civ, ARL/CISD) wrote: > Hi all, I wanted confirmation of this by someone else before I filed a > useless bug report. I'm using NSXMLParser in a slightly no

NSXMLParser bug?

2008-09-11 Thread Karan, Cem (Civ, ARL/CISD)
Hi all, I wanted confirmation of this by someone else before I filed a useless bug report. I'm using NSXMLParser in a slightly non-standard way, just so I can slog through my unit tests quickly. I instantiate it like this: NSXMLParser *dummyParser = [[NSXMLParser alloc] init]; Rather than use