Working with maps and geographic data is becoming more popular and important by the hour, much due to Google Maps extremely simple and powerful API. If you found this page through a search engine you’re probably facing the same problem I’ve faced multiple times in my work, you posses geographic data in one format and need to convert it to another format. Chances are you need to convert your coordinates in your own application/code in real time, not manually converting them on Lantmäteriets web site. Get the code »

The war on IE6 – 3 months update

21 May 2009 In: Ramblings

Three months ago I wrote a post about “the war” on IE6. We joined in with svenskfast.se and posted a warning to visitors with IE6 that they should upgrade their browser. Another big site who also did this was Aftonbladet, Sweden’s most visited tabloid/news site. I promised I would follow up with some statistics on whether the campaign was successful or not. Get the graphs and numbers »

iPhone accelerometer and device orientation

7 May 2009 In: Development, iPhone

So Apple released a new beta of iPhone OS 3.0 today. It’s the fifth beta and we’re getting closer to final release of 3.0. There were very few changes or additions to the API so it’s not likely we’ll see more changes at all. In February I published a quite lengthy solution  on how to rotate images without rotating the entire application where I use shouldAutorotateToInterfaceOrientation.  Recently I wrote a post about the changes made to shouldAutorotateToInterfaceOrientation which in my opinion breaks important functionality. As promised here’s how you can replace shouldAutorotateToInterfaceOrientation using the accelerometer.

*UPDATE*
Kyle was friendly enough to post a simple solution to how you can listed to the shouldAutorotateToInterfaceOrientation event. I’ve updated my previous post with his solution (or see his comment below): breaking changes to shouldAutorotateToInterfaceOrientation.

The application is called DeviceOrientation and is just a proof-of-concept, not a full replacement for shouldAutorotateToInterfaceOrientation. Unfortunately the accelerometer cannot be simulated in the simulator, you will have to compile and run it on your iPhone to test. Here’s a dirty clip I recorded with the iSight camera in my iMac, it’s harder than you think to record a clip sitting behind the device and the screen itself adds a nasty glare in the iPhone. At least it’s pretty short, enjoy:


Code example ahead »

xcodeiPhone OS 3.0 beta 3 has been available for a few weeks and it’s actually pretty stable. The most annoying bug in the standard functionality must be that quite often the last row of buttons in phone mode disappear. A reboot fix that until next time it happens, but it’s annoying.

Unfortunately I haven’t had the time to mess around much with the new APIs in 3.0. I’ve tested my Hitta Hem application and found a breaking change to the shouldAutorotateToInterfaceOrientation which I use to rotate images in an UIScrollView. I’ve explained and posted that code. Since beta 1 of iPhone OS 3.0 shouldAutorotateToInterfaceOrientation doesn’t behave like in 2.x, which is a problem. Read more about the changes »

Installing Windows 7 RC1 on a MacBook Pro

1 May 2009 In: Ramblings

windows7_rc1_boot_screenWindows 7 is the latest and greatest Windows version ever, it should be a child’s play to install? Probably, if you’re not installing it on a slightly outdated but still lovely Mac Book PRO. Read more about my experience »

Windows 7 RC, live. MSDN dead?

30 Apr 2009 In: Ramblings

Apparently I’m not the only one waiting for Windows 7, it has just gone live! But MSDN subscriber downloads is down:

msdn-down

Hopefully it will be back soon. Can’t wait to finally get rid Windows XP.

EPiServer CMS R2 SP1 and file caching

22 Apr 2009 In: EPiServer

A little while ago my collegue Thomas threw a tantrum over EPiServer CMS R2 SP1. When he made changes to files they weren’t reflected on his site so he had to recompile over and over again. I had the same “problem” on my first CMS R2 SP1 site and help him solve it. Apparently a couple of other guys around us had experienced the same problem and were happy to find out that there was a simple way to fix it. I thought I’d share it just in case you fellow EPiServer developers are upset about this new default activated feature too.

When installing EPiServer CMS R2 SP1 static file caching is enabled by default, and rightly so. But when you’re developing it sucks. This line in web.config exist by default

<staticFile expirationTime="12:0:0"/>

By simply changing the expiration time you solve the problem:

<staticFile expirationTime="-1.0:0:0"/>

Enjoy!

KB961884 – Optimize startup time in ASP.NET

13 Apr 2009 In: Development

ToolsPer Bjurström wrote about this fix on his EPiServer blog a little while ago. Microsoft has a hotfix to improve startup after you compile your ASP.NET project.

FIX: You experience very slow performance on an initial request to an ASP.NET Web site after you change the App_Code folder, the bin folder, or the Global.asax file

Link to the hotfix description kb961884. Read on and download the hotfix »

About this blog

With this blog I try to provide useful tips and solutions for programming .NET, Objective-C and more. My name is Björn Sållarp, and I love writing code.


All blogposts are written on a mac!  Avantime - Strategic IT solutions
Blogg listad på Bloggtoppen.se    Datorer bloggar    BlogRankers.com