Monthly Archives: February 2011

Video content is readily available online for you to download, but the download process isn’t always as simple and automated clicking a button on a TiVO or DVR. Fortunately, with a little set up and some help from a few great tools and BitTorrent or Usenet, you can turn your computer into a TiVo-like downloader. Here’s how to set them up. More »

We’ve been fans of Gmail’s Priority Inbox feature ever since it launched, but it was sometimes hard to tell why Gmail marked a message as important. It turns out, you don’t even need to leave the inbox view to find out. More »

Skin diving is a great underwater activity and a viable alternatie to scuba diving especially if you haven’t applied for a license. However, skin diving is just as risky and dangerous as scuba diving. Here are some tips for a more safe and enjoyable skin diving experience.

For starters, make sure that you are a good swimmer. Practice on your community pool or nearby beach if you have to.

Learn to equalize the pressure in your ears. This will prove very useful since pressure levels are different as you go deeper into the water.

Have a medical check up if you wish to pursue skin diving as a regular sport. Do not attempt to dive if you have any ear, nose or throat sickness.

Always have at least one companion with you. Follow the one-up-one-down buddy system. Make sure that someone is watching the other as he dives deep into the water.

Avoid wearing goggles and ear plugs. Ear plugs can cause damage to your ear drums while goggles can injure your eyes as the water pushes them against your eyes.

Avoid stagnant or polluted water to prevent yourself from acwuiring skin, ear, eye or gastrointestinal infection.

Yes, many "online jobs" promising quick riches and little effort are really scams. While the tasks below won't make you rich, they can earn you a little pocket money on the side—and these days that can make a big difference. More »

If you have ever had a project where you custom designed a circuit, you know how useful it would have been to develop a PCB (Printed Circuit Board) based on your design. Doing it commercially can get expensive fast, so why not do this at home? More »

Using Categories to enhance models, and get rid of those pesky compiler warnings

Overview When using Core Data, our model classes are always generated. What happens if we wanted to add a couple utility functions to one of these generated classes? Yep, they would be discarded the next time we auto-generated our model classes. As we discussed in our previous categories post (icodeblog.com), adding a category on one of these generated classes would enable us to add those utility functions in without them being erased when we generate the core data models.

For example: Say we created a Model object called Person, and added two NSString attributes called firstName and lastName. If we had populated our Core Data base with several Person objects, and then went to retrieve them, we would have an unsorted array. What if we wanted them to be sorted based on their names? One of the ways to accomplish this could be to implement a function called compareByName: that will return an NSOrderedResult. We can use this utility function to sort that array of Person’s.

Given a Core Data generated class from a model object called Person, we are given a file and it’s header of the form

To add our category, we create an NSObject file of the name Person+Sorting.m, making sure that you check the create header file option. As in the previous tutorial, change the files to actually be a category, and add in our new sorting function.

There are of course other ways to get back sorted results from core data, but this is just one of the ways.

Getting rid of some compiler warnings Another use of categories is to get rid of those pesky compiler warnings, when you call a function that is in the same file, however it is just lower down in the file. The following code does not cause a compiler warning because the function we are calling comes first:

However if for some reason, like you want certain functions clumped together at one spot in a file, and you have viewDidLoad at the beginning, then something like the following would give a compiler warning.

To get rid of that compiler warning you can create a category on the current class in which you declare all the functions that are giving you warnings. You can do this at the beginning of the .m file after all the #imports, and before the actual @implementation of your class. The reason to do this is because you don’t want other classes calling these private classes, so you don’t want them in the header file, but you do want to get rid of the warnings. The following code snippet shows an example of fixing the warnings in the above class.

We’ve taken a look at the Hipmunk webapp before and found it to be one of the most usable and agony-free flight searches on the web. Today they’ve brought that same search to iOS with some smart features. More »

All Browsers: Say you’re reading an article, tweet or review of a movie online and want to add it to your Netflix queue. With CueThat, all you need to do is select the movie title and hit the bookmarklet or extension. More »

Whether you want to look at two PDF pages side-by-side or you want two Twitter accounts open at once, sometimes OS X requires a separate instance of an application to be open. Here’s how to do it with a simple Terminal command. More »

Mac OS X: iTunes backs up your iOS device’s settings each time you sync, but it doesn’t even come close to backing up the device in its entirety. If you want a complete backup of your device, you can do it easily with an application called PhoneDisk and the wonderful command-line utility rsync. More »

Test pilot wanted

Looking for people who is interested in auto sport to become a TestFlight pilot for up-coming new release of AR1 iPhone APP.
During the TestFlight you will have access to the latest auto news and content from iPhone.