Category Archives: Programming

Algorithms, Snippets, Bugs, etc.

A tiny tiny CoreData revelation.

Following on from the previous discovery of all the useful debugging features, including the Build & Analyze feature and the Performance Tool stuff, the argument to debug core data has one problem. It doesn’t display your parameters. So change that … Continue reading

Posted in Programming | Comments Off on A tiny tiny CoreData revelation.

More Objective-C cocoa gotchas.

Firstly… when you’re chopping and changing lots of files in and out (and using the refactoring functions to rename classes by highlighting the name and hitting apple-option-j) you can get linking errors of all sorts afterwards and strange crashes saying … Continue reading

Posted in Programming | Comments Off on More Objective-C cocoa gotchas.

CoreData and to-many relationships.

I’ve had a problem with a category being able to reference many subjects but a subject only having one category. Kept getting a fault for the relationship. The error looked like this in the debugger: CoreData: annotation: to-many relationship fault … Continue reading

Posted in Programming | Comments Off on CoreData and to-many relationships.

Regular expression that checks for primes.

This via Noulakaz It might well be, but it’s a hack as it bombs at larger numbers: irb(main):001:0> def isp(n) irb(main):002:1> (“1” * n) !~ /^1?$|^(11+?)\1+$/ irb(main):003:1> end => nil irb(main):004:0> isp(55) => false irb(main):005:0> isp(57) => false irb(main):006:0> isp(101) … Continue reading

Posted in Programming | Comments Off on Regular expression that checks for primes.

How to populate CoreData at runtime from a remote source.

To me it seems that documentation on populating apple Core Data based stores is sorely lacking instructions on how to populate the database at runtime from remote sources. Most people electing to populate an SQL Lite database and then just … Continue reading

Posted in Programming | Tagged , , , , | 2 Comments

A little bit of this and that.

Quite a few things have vied for my attention this week. I ploughed through 2 books, namely The Girl who Played With Fire a book on Obj-C. I’m now reading The Girl who Kicked the Hornets Next and Living Next … Continue reading

Posted in Literature, Miscellany, Programming | Tagged , , , , | 6 Comments

A coding dilemma.

This happens quite a lot in programming I find. There’s the ideal way of doing something and the way you actually end up doing it, be it due to buggy libraries, quirks of code, time or inexperience. I found one … Continue reading

Posted in Programming | Tagged , , , | Comments Off on A coding dilemma.

Progress Report

Integrated the rather excellent IASKAppSettings which solves my problem of trying to design a settings tab that looks like the auto generated ones that appear in the Settings diovan generic.app.  I keep the data from that in a singleton which … Continue reading

Posted in Programming | Tagged , , | Comments Off on Progress Report

3 days learning and we have an iPhone App!

It didn’t take anywhere near as long as I thought.  I have two versions at the moment.  One which doesn’t work and crashes a lot but has pretty graphics/labels and one which implements OpenCV stuff but is still using place … Continue reading

Posted in Programming | Tagged , , | Comments Off on 3 days learning and we have an iPhone App!

Setting up OpenCV for Xcode + iPhone

** This post will be updated as I progress ** *** This will be updated when I’ve actually got an application to the point where OpenCV is necessary. It currently links and builds fine but I haven’t tested it so … Continue reading

Posted in Programming | Tagged , , , , | Comments Off on Setting up OpenCV for Xcode + iPhone