Putting a UIPickerView on a UIActionSheet

Basically there are no really god (and now working) guides on how to put a UIPickerView on a UIActionSheet. Mainly because some things changed with the latest firmware updates made by Apple. Well after some fiddling around, I got it working. Here is how: Step 1: Adding the right delegatesMake sure your current class (probably a ViewController) uses the following delegates:

  • UIActionSheetDelegate
  • UINavigationControllerDelegate
  • UIPickerViewDelegate
  • UIPickerViewDataSource

Read This Article

Using NLog in your web.config

I have been working on my YourRid.es project a bit lately and one of the things I wanted to put in place, was a good logging system. Most of the time I just use a custom build (read: my own shit) logger, but this time I found the time to browse the internet for some good loggers.

After comparing a bit, I came to NLog and tried integrating this in my project. My project being build in Visual Studio 2010 has support for those nice web.config’s that can be transformed/malformed/adjusted while publishing. This was very necessary because my debug (local) build uses a different SQL instance than my production build.

So I just wanted to show you how I configured NLog in my web.config. It might be obvious for some people, but for others it might not.
Read This Article

Queueing HTTP requests in objC

For WallPaper I download numerous thumbnails from my webserver at the same time. This is causing slowing speeds (to many threads at once), and too much memory usage (too much image data cached at once).

So I looked in queueing the downloads and tried (ofcourse) writing my own QueueHandler class. After I written and spend a couple of hours bughunting/testing my QueueuHandler, I came to the awesome idea to see what the iPhone SDK supplies for this kind of jobs :D (you DO read my sarcasm, dont you?).
Read This Article

Reading big XML file with C# XmlReader

Today I needed to parse a LARGE (1.9GB) XML file and extract some information from it. Loading it in a XmlDocument (my favorite .NET way of handling XML) wasn’t really a possibility, because that would cause Out of Memory errors the minute I would try it.

I am using a XmlReader for this and I noticed that there arent really many usable examples on the internet about this, so here is just a small example I created to show how you could read a RSS feed.

Sample after the break… Read This Article

Resizing an image in C#

For a project I am working on, I was looking for a good way to resize images in a few different ways. I have done image resizing before, but it really feels that I am re-inventing the wheel every time I do this. So now I decided to write a nice static method which can resize an Image to certain dimensions and outputs an Image object again.

The method requires 3 parameters:

1. An image object. I hope you know how to load a file in an Image object (hint: FromFile).
2. A Resolution object, being nothing more than a small class I created, which also contains the width and the height.
3. The mode you want to use for resizing the image. I explained the modes in the enum listed below.

It probably isnt the neatest code you’ve ever seen, so if you have any comments, please let me know. Code and more explanation after the break… Read This Article

Management of your pictures/videos etc.

I have (just as so many people probably) been struggling to keep my digital photo’s and home-made videos manageable. I tried so many photo/media management tools that I actually lost count and they never satisfied my needs. They always kept my library as messy as it now, which is a HUGE directory, with files which have names like ’2009_1225_183025.jpg’. Since a couple of weeks I also shoot HD movies with my camcorder and those files are already stacking up also.

I have been thinking about what could actually help me solve this problem and I think I came up with a solution to my (own) problem. I am currently making a tool with the project-name “Media-Manager”. The tool extracts all meta data from my media files and stores it nicely in a data source (e.g. SQL Server, XML files). In my tool I can specify events which happened on certain date’s (or a longer time-span) and it automatically filters the photo’s by those event. Read This Article

Using jQuery Dialog with ASP.NET

I have been playing around with jQuery a bit lately and I wanted to use the nice dialog boxes on my new project. The problem with the dialog boxes is, that they do not create a postback when one of the buttons is clicked. Also the values of any controls inside the dialog are always empty, when using the dialog box.

I just will be posting my code here, to let you see how I solved the problem. Read This Article

Mount network drive before starting an app

On my Mac Mini, I have SABNZBd+ installed. I wanted to make it download my usenet downloads straight to my NAS.

So I made my Mac automaticly mount a drive on the NAS on boot, and I also put SABNZBd+ in my login items. But that gave me a problem, sometimes SABNZBd started before my network drive was mounted. SABNZBd then created a directory called /Volumes/Media. After that, when my NAS was mounted, it mounted to /Volumes/Media-1. So that sucked. I could not find a way to change the order at which startup programs ran, so I decided to create an AppleScript application which first mounted a network drive and then runned SABNZBd.

Here it is:

set Media to "smb://myUsername:myPassword@192.168.1.1/Media"
tell application "Finder"
	activate
	mount volume Media
end tell
tell application "SABnzbd"
	activate
end tell

Replacing my HDX 1000 with a Mac Mini

For my HD movie playback I have been using an HDX 1000 the last couple of months. The HDX is connected via an ethernet connection with my file server, which is an Intel quadcore with over 4TB of storage and 12GB of memory. Since this isn’t the most energy efficient way to stream movies to my TV, I planned a complete reorganisation of PC equipment at home.

I am replacing my HDX 1000 with a Mac Mini (2.26GHz with 4GB of RAM), which will be connected to my TV with a mini-DVI to DVI to HDMI cable. The Mac Mini has an optical audio out, which will be connected to my Sony receiver, for optimal DTS/DD5.1 audio.

The Mac Mini will stream it’s movies from a multi TB NAS, which will be connected to a gigabit router. For software, I am currently expirimenting with XBMC, with the Aeon skin. The Mac Mini will also be connected to my 26″ IIyama monitor, so that it can be used as a desktop PC too, which gives my MacBook Pro a bit more breathing room. Also the switch to a Mac Mini will give me the ability to playback those anoying DVD’s the kids bring home sometimes.

I already ordered my Mac Mini and it will be delivered between the 8th and 11th of May.

So, what problems am I going to encounter?

  • I needed to find a mini-TOS to TOS cable, which wasn’t available in the Apple store somehow. Found one on eBay for under $5.
  • The remote control didn’t work at once with XBMC somehow. I installed a piece of software called “Sofa Control” which fixed this, but this software isn’t free.
  • I use usenet a lot, with my file server gone, I will no longer be able to use Newsleecher. What alternatives are there for Newsleecher for OSX?

As soon as my Mac Mini arrives, I will post a report about my progress, maybe with some pics.

You’ve been promoted!

It has been pretty silent the last month. I have been busy with work, holidays, iPhone apps and more stuff.

First off, there has been an interesting development at work. My boss announced him leaving the company and they needed one or more people to fill in his job. Just before I left for a week of fishing in Denmark I heard that they would let 2 colleagues and me take over his responsibilities! W00t! So from today on, I am trying to lead my colleagues to get things done!

Next up, I am working on a game for iPhone OS 3.0, which uses a couple of new features that aren’t available in 2.0 yet. Can’t talk about it too much yet, but everyone who played it, loved it! The game will be ready for release, when iPhone OS 3.0 and the new iPhone are released. A funny fact: I tried emailing a phone store in Belgium, to reserve a new iPhone, when it comes out. But it turns out, you can’t get yourself on the list, before the phone is announced…. :( .

I am also getting more active on StackOverflow. I must say, it’s getting a bit addictive and the reputation system works very good. If you don’t participate yet, make sure you check it out. I also love the way StackOverflow is now taking over Experts Exchange position in Google, because that site is just annoying.

I hope I will be updating my blog more often now.

PS: ReviewReader was denied by Apple. I tried arguing with them, but they do not respond to my emails :(