Here’s a code snippet that demonstrates how to use enum types in a switch-case block in combination with the ComboBox control. Just wanted to share ’cause I had to look it up on the web. Hope it helps somebody.
Using Enumeration types in switch-case block and ComboBox in C#
June 17th, 2009Jigsaw Puzzle
May 4th, 2009I created the very basic engine back in 2007. That was only to make the puzzle pieces from an image. But never really felt like completing the game (I’m too lazy)! Anyway, I decided to have a go at it and following is the result of my past couple of days’ work. There’s a lot to be done/ fixed though. The puzzle pieces are generated programmatically. There are no fixed/ static masks/ shapes. So there’s actually no limitation of the image size. And the images can be broken into any number of pieces. The larger the image and the more the puzzle pieces, the higher the pieces generation time. Currently I used a 400×400 image and broke it into 64 (8×8) pieces.
Of course, there are some scope of optimization in the code. But all I wanted is getting a playable demo ready in as little time as possible. And the end result is not quite bad I guess
Anyway, the to-dos are:
1. Allow uploading custom image
2. Logging player scores
(Click image to launch the demo)
Firefox memory usage: 1.7 GB!
April 23rd, 2009For the second time when I was getting into the mood of writing something on my blog I got bogged down with another nasty Firefox mess-up. This time around, it was using up almost all of my RAM (1.7 GB). My PC got awfully slow as soon as I started Firefox and instantly knew it was my favorite browser as I heard of such huge memory usage from other FF users. But the funniest part was after restarting, I was notified that update 3.0.9 is available!

Lost my Firefox profile
March 6th, 2009I can’t believe I have to start my real blogging career with this post. I’ve just lost my Firefox profile! And that in a strange way! I usually put my Firefox profile folder in a separate directory instead of the default location. I keep a primary folder in my non-OS D: drive which contains all the different profile folders. The structure looks like this: “D:\firefox_profiles\kayes\”.

‘kayes’ was the only profile I had at that time. Anyway, I was creating another profile and I mistakenly selected “D:\firefox_profiles\” as the location to save the profile files whereas I should have created a new folder under ‘firefox_profiles’ and selected that. As soon as I finished creating the profile, I noticed what I did wrong and wanted to start over. So I deleted the newly created profile ‘Default User’ and that’s when I made another, this time bigger, mistake.

I deleted the profile with all the contents and since the newly created profile files were to be saved under “D:\firefox_profiles\”, the whole ‘firefox_profiles’ folder got deleted with my regular profile ‘kayes’. It took me a moment to realize that and I just kept sitting like a dumb. All my bookmarks, saved passwords, plugins, opened tabs… all gone! But fortunately I could recover the bookmarks which I periodically took backup of as HTML files for another purpose. So all is not lost I guess. Happy blogging!
TestPost
August 6th, 2008This is another test post!
