Also, consider dropping the table indexes before you start inserting. After the
you're done inserting, rebuild the indexes. This should give you an an
additional performance boost.
For even more speed, consider turning off the following setting:
Hello,
If memory serves well, CRC-32 is quite fast. How large are the BLOBs you're
trying to compare? If they're not too large, the following may work for you:
#include zlib.h
@implementation NSData (CRC32)
- (uint32_t)CRC32
{
uLong crc = crc32(0L, NULL, 0);
crc = crc32(crc, [self
What's premature about it?
-- Tito
On Sep 9, 2013, at 10:14 AM, Marcel Weiher marcel.wei...@gmail.com wrote:
Hi Jens,
Premature optimization is the root of all evil!
Er, I misspelled: “very cool, nice job!”
On Sep 9, 2013, at 18:11 , Jens Alfke j...@mooseyard.com wrote:
[..]
Let's not forget about PATCH:
http://tools.ietf.org/html/rfc5789
I'm not sure if it's been ratified already, but it could be around the corner.
It's already part of technologies like Node.js, for example.
-- Tito
On Jun 24, 2013, at 11:14, Jens Alfke j...@mooseyard.com wrote:
On Jun 23,
Hello,
I've hit a wall while experimenting with variadic functions and blocks. The
code works pretty well until the second block is executed. After that, it
crashes the next time va_arg() gets called. Here's the code:
#import Foundation/Foundation.h
typedef id (^fooBlock)(id result, NSError
4, 2012, at 4:43 PM, Fritz Anderson fri...@manoverboard.org wrote:
On 4 Jul 2012, at 6:30 PM, Tito Ciuro wrote:
void blockStep(fooBlock firstBlock, ...)
{
va_list args;
va_start(args, firstBlock);
id result = nil;
do {
result = firstBlock(result, nil);
NSLog
:40 PM, Charles Srstka cocoa...@charlessoft.com wrote:
On Jul 4, 2012, at 7:34 PM, Tito Ciuro wrote:
It makes total sense now. Out of the two options (NULL sentinel vs a number
to indicate the number of args), I would choose NULL because out of the two,
it's more foolproof
Hello,
Under non-ARC, an init method may be implemented like this:
- (id)init
{
self = [super init];
if (self) {
if (somecondition != good) {
[self release];
return nil;
}
// Initialize ivars here as usual...
}
return
Thanks Quincey!
On Jun 27, 2012, at 9:54 AM, Quincey Morris wrote:
On Jun 27, 2012, at 09:12 , Tito Ciuro wrote:
However, if something critical happens within the init method when ARC is
activated, what would be the proper way to exit? Would it look like this?:
- (id)init
{
self
Hello,
I would also profile it with the Core Animation instrument. Make sure you
select the Color Blended Layers checkbox in the Debug Options area. This will
apply a colored overlay to each view (green is opaque and red is transparent.)
-- Tito
On Apr 26, 2012, at 11:59 AM, Mikkel Islay
Hello,
FYI… CocoaNav doesn't seem to be working on Mac OS X Lion 10.7.3 (crashes in
RBApplicationMain)
-- Tito
On Apr 2, 2012, at 6:04 PM, jonat...@mugginsoft.com wrote:
http://inexdo.com/CocoaNav
___
Cocoa-dev mailing list
Thanks Ken. I appreciate it.
Regards,
-- Tito
On Oct 11, 2011, at 8:06 PM, Ken Thomases wrote:
On Oct 11, 2011, at 5:18 PM, Tito Ciuro wrote:
How would I determine which URI handlers are registered with the system? For
example, amzn://, fb://, etc.
Is there a way to determine
Hello,
How would I determine which URI handlers are registered with the system? For
example, amzn://, fb://, etc.
Is there a way to determine this type of information?
Thanks,
-- Tito
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please
I would also consider plcrashreporter (iPhone and Mac OS X):
http://code.google.com/p/plcrashreporter/
-- Tito
On Sep 28, 2011, at 5:07 PM, koko wrote:
When a user of my app experiences a crash (arrggh) I would like intercept the
Apple provided crash report window with the 'Send to Apple
Hello,
When my app launches, I'd like it to listen to port 80 or 443. To do that, I
believe I need to use Security Framework Authorization API to obtain extended
rights. A potential solution is to split the app's executable int two parts:
1) one executable, the main one that first gets
Hi Nick,
Thank so much for the heads up. Works fine!
Thanks for the help,
-- Tito
On Sep 18, 2011, at 10:13 AM, Nick Zitzmann wrote:
On Sep 18, 2011, at 10:05 AM, Tito Ciuro wrote:
Hello,
When my app launches, I'd like it to listen to port 80 or 443. To do that, I
believe I need
Sluder
(Sent from the road)
On Sep 18, 2011, at 9:05 AM, Tito Ciuro tci...@mac.com wrote:
Hello,
When my app launches, I'd like it to listen to port 80 or 443. To do that, I
believe I need to use Security Framework Authorization API to obtain
extended rights. A potential solution
case for launchd.
--Kyle Sluder
(Sent from the road)
On Sep 18, 2011, at 2:27 PM, Tito Ciuro tci...@mac.com wrote:
Hi Kyle,
This is exactly what I've done, except that I'm not using SMJobBless.
-- Tito
On Sep 18, 2011, at 2:08 PM, Kyle Sluder wrote:
The modern way to do
Hello,
In KVC, the setValue:forKeyPath: method is super handy to set values in deep
hierarchies. I was wondering if it would be possible to access array elements
using KVC. I haven't seen any reference about it in the docs, so I was
wondering if it's at all possible. Example:
NSDictionary
Hm. I missed that thread. Thanks Jens!
-- Tito
On Aug 16, 2011, at 12:52 PM, Jens Alfke wrote:
On Aug 16, 2011, at 11:03 AM, Tito Ciuro wrote:
In KVC, the setValue:forKeyPath: method is super handy to set values in deep
hierarchies. I was wondering if it would be possible to access
Hello,
More options:
A simple, extensible HTTP server in Cocoa
http://cocoawithlove.com/2009/07/simple-extensible-http-server-in-cocoa.html
How to Write a Cocoa Web Server
http://macdevcenter.com/pub/a/mac/2006/11/14/how-to-write-a-cocoa-web-server.html
A Simple HTTP Server
Hi Joseph,
If you type 'bt' in GDB, do you see something like this by any chance?:
#74 0x7fff8686f312 in -[NSIBObjectData initWithCoder:] ()
#75 0x7fff827fbe73 in _decodeObjectBinary ()
#76 0x7fff827fb2ed in _decodeObject ()
#77 0x7fff8686ea41 in loadNib ()
#78
Hello all,
I saw an interesting reply from Dr. Hipp posted today:
http://www.mail-archive.com/sqlite-users@sqlite.org/msg62618.html
This seems to explain why SQLite (and Core Data) might sometimes launch and
execute very slowly.
-- Tito
On Sep 3, 2009, at 5:00 PM, Ben Trumbull wrote:
On
Hello,
I have a question regarding WebKit. The redirect sent by the server works fine
(gets displayed properly) but the following method is never invoked:
- (void)webView:(WebView *)sender willPerformClientRedirectToURL:(NSURL *)URL
delay:(NSTimeInterval)seconds fireDate:(NSDate *)date
]);
}
I can now obtain the redirected URL, but I'm still wondering why
willPerformClientRedirectToURL is not being called...
-- Tito
On Jul 5, 2011, at 5:42 PM, Tito Ciuro wrote:
Hello,
I have a question regarding WebKit. The redirect sent by the server works
fine (gets displayed properly
Hello,
If you have access to the Developer Forums, check the very first entry in Core
OS named Five Reasons Why Synchronous Networking Is Bad, by Apple's Quinn
The Eskimo!:
https://devforums.apple.com/thread/9606?tstart=0
Cheers,
-- Tito
On Jun 26, 2011, at 9:51 PM, Jerry Krinock wrote:
Hi Bing,
Looks good. One comment though: I would return nil instead of an empty string
to differentiate an actual value (the empty string) vs. nothing was read.
-- Tito
On Jun 12, 2011, at 11:29 AM, Bing Li wrote:
Dear all,
Do you think the below method is a correct solution to manage
Hello,
I'm trying to display an NSOpenPanel that only allows to select plist files. I
have the following code in place:
NSOpenPanel *openPanel= [NSOpenPanel openPanel];
[openPanel setResolvesAliases:YES];
[openPanel setCanChooseDirectories:NO];
[openPanel
Hi Quincey,
On May 31, 2011, at 9:35 PM, Quincey Morris wrote:
On May 31, 2011, at 21:00, Tito Ciuro wrote:
[openPanel setAllowedFileTypes:[NSArray arrayWithObject:@plist]];
[openPanel beginSheetForDirectory:NSHomeDirectory() file:nil
modalForWindow:window modalDelegate:self
Hello,
I have a question about Cocoa API design. I think I can give a concrete example
to best explain what the goal is. Assume I have an Inventory service and I need
to write a client API that deals with it. Goals:
- The API should allow me to add, update, delete and search items
- These
Hi Seth,
I thought about adding blocks, but I would like to support older iPhones if
possible. Blocks were introduced in iOS 4, correct?
Thanks,
-- Tito
On May 24, 2011, at 10:30 AM, Seth Willits wrote:
On May 24, 2011, at 8:25 AM, Tito Ciuro wrote:
I have a question about Cocoa API
Hello,
I have a table view which contains a column that displays checkboxes. I would
like to disable and gray out some of the checkboxes, so I guess there are two
possible ways (perhaps there's another way?):
1) disable the control (i.e. gray out) so that the user cannot toggle it (in
one
Hi Kyle,
The method -tableView:willDisplayCell:forTableColumn:row: did the trick, thanks!
-- Tito
On May 21, 2011, at 10:02 AM, Kyle Sluder wrote:
On Sat, May 21, 2011 at 9:19 AM, Tito Ciuro tci...@mac.com wrote:
Hello,
I have a table view which contains a column that displays checkboxes
Hi Martin,
One way to do it is via flock():
http://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man2/flock.2.html
-- Tito
On May 11, 2011, at 6:04 PM, Dave DeLong wrote:
There are a bunch of ways to do this, but the general principle is that when
an instance of
Hello everyone,
Last year I announced NanoStore, a SQLite-based engine to store and retrieve
dictionaries while fully indexing its contents. NanoStore made some people
happy, but I quickly realized that it could be better as feedback poured in.
While NanoStore was simple and fairly efficient,
Take a look at this too. Lots of goodies:
http://brandonwalkin.com/bwtoolkit/
-- Tito
On Feb 20, 2011, at 2:51 AM, 23Labs wrote:
You can see the screenshot
herehttp://www.anxietyapp.com/popups/list-window.html
.
Anxiety app has a window title which can be clicked and then popups a menu
Hello,
Being curious about the performance implications of using NSInvocation vs
Objective-C message send vs IMP-cached message send, I was surprised to see how
much slower NSInvocation seems to be compared to the other two mechanisms (the
following data was last collected on Leopard, so these
Hi Ken,
On Jan 15, 2011, at 7:36 AM, Ken Ferry wrote:
I'm not sure this has been made clear: It is intentional that it is
difficult to determine whether a dictionary is mutable.
That's because you shouldn't do it. Whether a dictionary is mutable _to_you_
is a matter of what's in the
On Jan 15, 2011, at 1:04 PM, Ken Thomases wrote:
On Jan 15, 2011, at 5:38 AM, Tito Ciuro wrote:
On Jan 15, 2011, at 7:36 AM, Ken Ferry wrote:
I'm not sure this has been made clear: It is intentional that it is
difficult to determine whether a dictionary is mutable.
That's because
Hello,
Trying to determine whether an NSDictionary is mutable or not fails with these
two tests:
// Variable info could be NSDictionary or NSMutableDictionary. Assume it's an
NSDictionary.
BOOL isKindOfClass = [info isKindOfClass:[NSMutableDictionary class]];
BOOL respondsToSelector = [info
it to be immutable. (This is not inefficient as it
sounds because immutable objects implement -copy to do a -retain and return
self instead)
On 14 Jan 2011, at 10:48, Tito Ciuro wrote:
Hello,
Trying to determine whether an NSDictionary is mutable or not fails with
these two tests
Hi Jonathan,
On Jan 14, 2011, at 12:34 PM, jonat...@mugginsoft.com wrote:
On 14 Jan 2011, at 11:25, Tito Ciuro wrote:
Hi Mike,
Given that the caller can pass a NSDictionary or an NSMutableDictionary, I
wanted to test its mutability before calling setObject:forKey:. In order to
avoid
Hi Pablo,
On Jan 14, 2011, at 1:35 PM, Pablo Pons Bordes wrote:
Hello,
To determine if a dictionary is mutable or Inmutable you just need to use the
isKindOfClass method, instead of use respondsToSelector.
I did a test to reproduce your problem and couldn't reproduce your problem,
so
Thanks a lot everyone for the great feedback. I really appreciate it! :-)
Cheers,
-- Tito
On Jan 14, 2011, at 6:39 PM, Corbin Dunn wrote:
On Jan 14, 2011, at 4:44 AM, Tito Ciuro wrote:
Hi Pablo,
On Jan 14, 2011, at 1:35 PM, Pablo Pons Bordes wrote:
Hello,
To determine
Hello,
I have been writing a Framework which is tested by a few unit tests. While I
try to exercise the API as much as possible, I know for sure I'm not covering
everything. I also don't have a good idea where the performance bottlenecks
are. Therefore, I'd like to do two things: run gcov and
Hello,
I'm implementing a method and I'm not sure what the behavior should be when
detecting an anomaly.
Case in point: I have a method that iterates through an array of objects. As I
traverse the array, I'm, checking whether the object in the array conforms to a
custom protocol. If it does,
Hi Corbin,
On 15/10/2010, at 16:55, Corbin Dunn wrote:
If it is instead some array input that the user provided, and it is a user
error to provide the wrong input, then you should return a user-presentable
NSError and the caller should present the error on failure.
This sounds right to
Hi Martin,
On 15/10/2010, at 20:48, Martin Wierschin wrote:
Well, in a normal situation the array would contain conforming objects.
However, as it can happen once in a while, one can add an object to an array
thinking it's of one type when in fact it's another.
When you say one can add,
Hello,
I'm seeing a weird behavior in Xcode 3.2.4/GCC 4,2. The warning I'm getting is:
missing sentinel in function call
This is how I have defined the methods:
+ (NSFSomeClass*)someClassWithObjects:(NSArray *)someObjects
{
return [[[self alloc]initWithObjects:someObjects]autorelease];
Hi David,
On 14/10/2010, at 17:32, David Duncan wrote:
On Oct 14, 2010, at 1:30 PM, David Duncan wrote:
On Oct 14, 2010, at 1:25 PM, Tito Ciuro wrote:
return [[[self alloc]initWithObjects:someObjects]autorelease];
warning occurs here
-initWithObjects expects a list with a nil
Hi Greg,
On 14/10/2010, at 17:50, Greg Parker wrote:
There's already a method -[NSArray initWithObjects:], but it accepts a
nil-terminated list of objects. The compiler warns if you call [array
initWithObjects:a, b, c] and forget the nil terminator.
`[self alloc]` returns `id`, so the
Hello everyone,
Based on feedback from other developers, I have decided to move NanoStore, a
Cocoa wrapper for SQLite, to Google Code:
http://code.google.com/p/nanostore/
The Sourceforge repository is now considered obsolete and will be removed
shortly.
Regards,
-- Tito
Hi Thomas,
On 23/09/2010, at 02:15, Thomas Davie wrote:
On 23 Sep 2010, at 03:51, Tito Ciuro wrote:
Today, Webbo is pleased to announce the release of NanoStore:
http://sourceforge.net/projects/nanostore/
NanoStore is a Cocoa wrapper for SQLite, a C library that implements
Hi Thomas,
On 23/09/2010, at 04:19, Thomas Davie wrote:
On 23 Sep 2010, at 07:39, Tito Ciuro wrote:
Hm. That would be discussed better on a White Paper or similar. There are
countless tutorials and documents about Core Data already. What I can do
however is to provide a small example
Hi Chris,
On 23/09/2010, at 04:27, Chris Hanson wrote:
On Sep 22, 2010, at 11:39 PM, Tito Ciuro wrote:
I believe (please correct me if I'm wrong) that Core Data stores the data
atomically for both, XML and binary formats. That, if I'm not mistaken
requires the datafile to be read
?)
In addition, the NanoStore project includes:
- Unit tests
- An iOS plain-vanilla app to demonstrate how easy it is to embed NanoStore in
your project
Enjoy!
-- Tito
*
Tito Ciuro
RD Group, Webbo, L.L.C.
___
Cocoa-dev mailing list
Hello,
I have code that's part of a framework and I'd like to port it to iOS. I tried
isolating the code like so:
//
// RootViewController.m
// iPhoneTest
#import RootViewController.h
@implementation RootViewController
#pragma mark -
#pragma mark View lifecycle
-
Excellent!
Thanks Kyle!
-- Tito
On 27/08/2010, at 14:02, Kyle Sluder wrote:
Read this:
http://sealiesoftware.com/blog/archive/2010/8/16/TargetConditionalsh.html
--Kyle Sluder
(Sent from the road)
On Aug 27, 2010, at 1:47 PM, Tito Ciuro tci...@mac.com wrote:
Hello,
I have code
On 27/08/2010, at 14:05, David Duncan wrote:
On Aug 27, 2010, at 10:47 AM, Tito Ciuro wrote:
- (NSUInteger)systemPageSize
{
static NSUInteger __sSystemPageSize = NSNotFound;
#if TARGET_OS_MAC
if (NSNotFound == __sSystemPageSize) {
NSTask *task = [[NSTask alloc] init
Hello,
I have written a small app which gets launched when SuperDuper has finished
backing up my data. The problem is that since NSLog() writes to stderr,
SuperDuper treats this as an error. The advice I've been given is to redirect
NSLog() to stdout. One possible solution I can think of is
conflicts!)
Again, thanks for the help,
-- Tito
On 29 Jun 2010, at 18:01, A.M. age...@themactionfaction.com wrote:
On Jun 29, 2010, at 10:09 AM, Tito Ciuro wrote:
Hello,
I have written a small app which gets launched when SuperDuper has finished
backing up my data. The problem
Hello,
I'm having some trouble embedding a framework in my app. I've done that
countless times before in other projects and it worked fine, but for some
reason, it doesn't work this time around. I don't know what I'm missing and I
get the feeling I'm running in circles. The app launches (and
Hello,
I'm trying to incorporate zip-framework
(http://code.google.com/p/zip-framework/) in my project. When I compile the
sources in Xcode I see this error:
inflate, referenced from:
-readFromEntry:buffer:length: in ZipArchive.o
inflateInit2, referenced from: -entryNamed: in ZipArchive.o
Thanks a lot Roland!
-- Tito
On May 28, 2010, at 8:51 AM, Roland King wrote:
libz.dylib
it's the last thing listed in the list if I go 'add framework' - 'existing
frameworks'.
On 28-May-2010, at 2:40 PM, Tito Ciuro wrote:
Hello,
I'm trying to incorporate zip-framework
(http
Hello,
I'm trying to replace the following deprecated NSFileManager method:
/* attributesOfItemAtPath:error: returns an NSDictionary of key/value pairs
containing the attributes of the item (file, directory, symlink, etc.) at the
path in question. If this method returns 'nil', an NSError
Thanks Charles!
-- Tito
On May 28, 2010, at 5:17 PM, Charles Srstka wrote:
On May 28, 2010, at 10:01 AM, Tito Ciuro wrote:
The old statement traverses the link:
NSDictionary* attr = [[NSFileManager defaultManager]
fileAttributesAtPath:file traverseLink:YES];
The problem
How about this example? You can download the source as well:
http://www.devx.com/wireless/Article/42476/1763/page/3
-- Tito
On Apr 7, 2010, at 1:57 AM, Kiel Gillard wrote:
Can UIViewAnimationTransitionCurlUp/Down be of any use?
On 07/04/2010, at 2:10 AM, Alex Kac wrote:
Well they may
Ruotger,
Interestingly enough, I experienced this behavior in my latest app
which doesn't use Core Data. It uses SQLite directly instead. I
recalled I had experienced this a long time ago (years ago) and
someone (I don't remember who and where) mentioned a solution/
workaround/hack, which
On Aug 19, 2009, at 2:21 PM, M Pulis wrote:
The sqlite question was a reference to tito saying his experience
was years ago when the possibility of a non-native sqlite on an
intel machine was absolutely real and significantly less surprising.
You may know, but I have no idea what versions
On 2 Jul 2009, at 9:36 AM, Shawn Erickson wrote:
On Thu, Jul 2, 2009 at 8:37 AM, Michael Ashmichael@gmail.com
wrote:
On Thu, Jul 2, 2009 at 10:51 AM, Chris Carsoncucar...@yahoo.com
wrote:
Hello,
I've created a simple application with an NSTableView. I have
written a delegate for
On 2 Jul 2009, at 9:56 AM, I. Savant wrote:
On Jul 2, 2009, at 12:52 PM, Tito Ciuro wrote:
Not to mention that dragging the scroll thumb one pixel will result
in thousands of rows scrolled at once. Simply useless.
Well, yes, but the only real way to avoid that is to design your
On 2 Jul 2009, at 11:10 AM, Greg Guerin wrote:
Hold down the Option key and drag the thumb. It should micro
scroll for as long as Option remains down. This scroller gesture
modifier has been around for a while.
Wow. Never heard about this one before. I wonder how many people know
about
Hi Arun,
How about -[NSProcessInfo hostname]? Check the following document for
more info:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSProcessInfo_Class/Reference/Reference.html
Regards,
-- Tito
On Jun 11, 2009, at 11:58 PM, Graham Cox wrote:
On
Hi Jeshua,
Is the CGImageRelease(im) in the for loop really needed? I think
you're over-releasing the image in the array...
-- Tito
On Nov 1, 2008, at 10:26, Jeshua Lacock [EMAIL PROTECTED] wrote:
On Oct 31, 2008, at 12:13 PM, John Harper wrote:
I described how to do this using a
Hi James,
On Oct 13, 2008, at 6:23 PM, James Walker wrote:
I need to be notified when a row of an NSOutlineView was clicked,
and find out which row. Do I need to subclass it? Just thought I'd
ask, since I've read that new Cocoa programmers might tend to
subclass more than they ought.
Hi Brad,
I'm just curious... having NSURLConnection and friends working, is
there a specific reason you decided to switch to sockets? Is there
something in Cocoa that you think is missing?
Cheers,
-- Tito
On Sep 1, 2008, at 9:02, Brad Gibbs [EMAIL PROTECTED] wrote:
You might find the
Hi Sam,
It's autoreleased. Make sure you read this document, as it'll answer
many of your questions:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html
-- Tito
On 27 Jun 2008, at 5:56 AM, Sam Mo wrote:
Newbie here:
I am looking at
, it was never my intention to spread inaccuracies :-)
Cheers,
-- Tito
On 27 Jun 2008, at 6:30 AM, Uli Kusterer wrote:
Am 27.06.2008 um 15:15 schrieb Tito Ciuro:
It's autoreleased.
No, there's no guarantee that it's autoreleased. All that's
guaranteed is that you do not own it. This still means
Hello,
Although I prefer the safer accessors, there has been one case where I
had no choice but to return the main object pointer:
- (NSString *)foo
{
return foo;
}
In my app I had a method that was populating a custom cell with a few
elements. Depending on the data source, I had
Hi Kyle,
On 11 Apr 2008, at 4:50 PM, Kyle Sluder wrote:
Hey all,
Is there a way to get at the contacts available in Directory.app? The
disjunction between Directory.app and Address Book.app is infuriating,
to say the least. I really want to develop a quick-and-dirty in house
contact
80 matches
Mail list logo