Back in the day, together with my good friend Alexander Lentjes we would spend many, many hours developing games that we hoped would take the world by storm. Unfortunately, we were both 12 and our skills were not nearly sufficient to develop anything good (actually, I’m speaking mostly for myself here). At the time, our great example was Space Quest III, and we desperately wanted to make a clone.
We had made several forays into developing a 3D-animated adventure game (called The Pirate Encounter – and it was actually conceived before The Secret of Monkey Island), but after piles of unfinished prototypes we decided to do a text adventure with static graphics, like the games that Level 9 used to produce at the time. Our company was (and still is) called Procurion 9.
The game was Awakening, and I have recently been able to decode its BSAVEd 4-colour CGA graphics. These were done by Alexander Lentjes, where he was limited to four (very ugly) CGA colours and had to use a self-written graphics package that only allowed him to plot one pixel at a time (there was no flood filler…). By the way – the application I wrote to load BSAVEd CGA images can be found here.
Websofia presents a couple of online tools that can be handy when you’re examining hacking scripts on your web server. Often, you’ll find that malicious code is encoded using either base64_encode or str_rot13, and possibly gzip-compressed. You could scan all the files on your web server looking for base64_decode, str_rot13 and gzinflate, but you’ll get a lot of false positives in the bargain. When you need to know what the encoded code actually looks like, run it through one of these tools to find out. Saves you having to write the scripts yourself.
I forgot my WordPress password. For the life of me, I couldn’t remember what it was, because it had always been stored in the browser cache and I never bothered to write it down anywhere. In order to reset it, I clicked the “Forgot password” link offered on the WordPress login page. However, apparently my server can’t send emails, since the password reset mail never arrived. What now?
Luckily, the server is under my control. I used PHPMyAdmin to access the WordPress database, and looked at the rows in the wp_users table. Shame – the passwords are encrypted (probably using MD5) so I couldn’t see what my original password was. Now I could just overwrite the password with a new one – properly MD5 encrypted – but I wasn’t quite sure what sort of encryption WordPress really uses. Read more
If you’re using GMap.NET to add maps to your .NET application, then the time may come when you want to calculate the area of a polygon on your map. In my case, I have an application that allows users to actually create polygons using a GMap.NET control, by placing and connecting markers to shape their polygon. Since the map system is used to indicate the limits of an area occupied by a rural community, it’s necessary to calculate how many hectares the delimited area occupies.
Google Maps actually provides a function in its API to calculate polygon areas:
Even so, unfortunately GMap.NET does not offer access to this API. Moreover, your GMap.NET control may be configured to work with a different map provider from Google Maps, like Bing. Consequently, you’ll have to implement your own polygon area calculation algorithms. Luckily, this is not all that complicated, and algorithms are available on the net. Read more