Welcome to Marlon's place!


Message of the day


"I don't mind what people say,
gonna shed my skin and walk away"


(D-Note)

How do I create a zip file?

posted: January 26, 2010

Creating a zip file is a task that can easily be accomplished by using the classes ZipOutputStream and ZipEntry in the java.util.zip package.

Logger - a simple way to log Java applications

posted: January 23, 2010

In this article I'd like to describe a small Java class that will enable you to log what your application is doing. Before I continue, I'd like to point out that this is a very simple, basic logger - if you need a serious logging framework for your application I suggest that you check out Log4J.

Opening a full-screen window

posted: January 17, 2010

Normally, an application does not take up all available screen estate to display its information. Even in its maximized form, room is still left for a taskbar, for instance. However, there are certain circumstances in which it is more convenient for a user to open a window that fills the entire screen - most notably in games, where the entire screen becomes the center of attention for the player. Other examples may include such software as kiosk applications or presentation software.

Since Java 1.4, support for this full-screen mode has been built into the JDK and can be used by the developers as such. The following example will show you how to open a JWindow, and allow it to take up all available screen estate.

Happy New Year everybody!

posted: January 9, 2010

I'd like to wish all of you the very best for 2010 - I hope 2010 will be a wonderful year for everybody!

Having said that, I haven't been able to update my website for quite some time now. Back in October, I was the victim of a rather nasty car crash, as a result of which I haven't been able to do much since then. Fortunately for me, I've almost fully recovered and I've even been able to resume working this past week.

Judgement Day in Sydney

posted: September 23, 2009

Wednesday morning, the entire city of Sydney, Australia, appeared to be basking in an orange glow. This phenomenon, caused by a gigantic dust cloud, lead to the following pictures: beautiful, yet strange and eerie at the same time.

Can't Live In A Living Room

posted: September 22, 2009

Picture of Red Zebra sleeve for the song Can't Live In A Living Room Every morning my alarm clock sounds at seven o'clock precise, which gives me just enough time to catch the highlights on the news, and snooze through one-song-and-a-half before it's really time to get out of bed.

Today I was awoken by a pleasant surprise: Can't Live In A Living Room by Red Zebra, one of my all time favourite tracks. One of the greatest Belgian punk/new-wave songs of it's time, and once it's stuck inside your head, very hard to get rid off. Not that that's a bad thing, mind you :)

How to save the HTML source from a website

posted: September 18, 2009

Whether you need to programmatically check the source code from a website for data scraping purposes or otherwise, it is a very easy process - all you need is the following piece of code.

N'oubliez Pas Les Paroles!

posted: September 10, 2009

Thumbnail of Caroline, contestant on N'oubliez Pas Les Paroles While I was watching Ax-Men the other day, one-too-many commercial came on so I decided to switch channels to find something else to watch. It was then that I suddenly stumbled upon a program called "N'oubliez pas les paroles" (the literal counterpart of Don't forget the lyrics") on France 2.

I had never heard of this game show, but basically the object of the game is to sing a song, and add the correct lyrics once the music stops. Each time you get the words right, you get a certain amount of money, which increases with each level or song you need to sing. The maximum amount of money one can win, is a total of 100.000 euros - nice!!

A small rant about code snippets

posted: August 28, 2009

Normally, I'm not the person to rant about subjects, nor am I one to look a gift horse in the mouth. However, there's something that's been bothering me for a while...

Using inclusion guards

posted: August 19, 2009

One of the things that struck me as really odd, ever since I first started learning C++, was the fact that it wasn't (and still isn't) allowed to include the same header file more than once. Luckily though, there is a very easy solution for this, which I'd like to show you today.

Optimization for the sake of optimization...

posted: August 5, 2009

I haven't had the time to post anything new lately, mostly because I've been very busy on an old project that regained my interest. I've also had a two week vacation, during which I have started to revive my C++ knowledge, also in light of the same project (more about it later).

While doing some small C++ exercises and examples to get my feeling for the language back, I fell for an age-old trap: over-optimization...

Brundle fly!

posted: July 24, 2009

Even though I've had numerous opportunities to do so, I've never seen the movie "The Fly". Nor did I ever see its successor "The Fly II", but after seeing both of them this week I wished I had seen them earlier.

Not that the storyline or the acting were that great, but it would have cleared something up for me a long time ago.

How to create a borderless JButton

posted: July 7, 2009

Sometimes you want to use a JButton that does not look like a button. The most common example is probably the link to the company homepage, to be embedded somewhere in your application.

We've all seen them: a button that does not resemble a traditional button, but looks more like a hyperlink you encounter on the internet.

It's a nice-to-have feature, and it's easily achieved by using the JButton class which is already present in Java.

A visit from Steve

posted: June 22, 2009

Thumbnail of Steve the frog A few days ago I noticed we had a new resident in our backyard: a little frog, sitting on the edge of our modest pond.

When I noticed him again, yesterday, I ran back into the house to get my digital camera and I snapped a few pictures of him - enjoy!

A letter to the Bonny Eagle High School

posted: June 17, 2009

When I wanted to check my Yahoo! email account this evening, one of the headlines on the frontpage caught my eye: "A kiss costs student diploma". Wow, must've been some kiss.

As curiosity got the better of me, I opened the link and read the article. Apparently some superintendent of the Bonny Eagle High School denied a student his diploma, because he "walked on the stage and blew a kiss to his family".