Part of the development of one of my pet projects, the UML Designer, requires some type of custom canvas to display the UML graphs. Sounds easy, especially since I’ve done similar things in Java. Unfortunately reality proves me wrong every time.
I started out by creating a custom component, which inherits from the Panel. This would give me pretty much a blank object that could be added to the GUI. The painting part on its own is not that difficult either. Done that hundreds of times. The problem is in adding the various objects to paint on top of the panel to the panel before drawing commences.
Ok, I’ll try to explain a little better. I keep track of what to draw in an array inside the custom panel. This because these objects contain more information then just how to draw. But they are not part of the component list of the panel. I need to add them dynamically just before drawing and remove them again after drawing. But I’ve yet to find the correct way of doing this.
Tried adding them in the onPaint method, but this doesn’t trigger them to be painted. So I’ll probably have to intercept the WM_PAINT message sent to the panel and attach the
Sometimes I just have the worst luck possible. Yesterday was one of those days. I recently had some issues with my HHD in my work laptop. So I thought why not install Ubuntu on a spare partition I never use.
So far for the good idea, but when Ubuntu asked me what partition to delete I wasn’t sure which was the spare one and which one contained all the source code of all applications and websites I developed. And you probably guessed it, I erased the wrong one.
Gone is a couple of days of work. Serves me right for not checking it in every day
I love my HTPC, which I build over 5 years ago. Much to my surprise it is still very capable of playing full HD and to some extend even 3D movies. But alas it is time to start thinking about a new smaller setup. Right now I have the Antec Fusion case with a mATX board in it. Which served well over the years.
Unfortunately the design of the mATX in combination with my ATX does not allow me to use the SATA ports properly (they are sorta sticking out to the side and into the case). So the hunt is on again for a new HTPC setup. Well not everything has to be brand new, I have a working digital tuner card as well as a relatively new graphics card for hardware acceleration. So this was my current setup, which I loved:
So I’m not looking for anything fancy any more. I will be moving at least the FloppyDTV an LG Blu-ray player over to the new case. And preferably the graphics card unless I can find an onboard one with equal performance and HD decoding skills. So what are my new requirements:
I’m sorta already stuck, and I’m only looking for a new case so far. Am I the only one looking for a small case for a HTPC that is at least a bit stylish, that does not need to have a display.
In most bigger companies, and for some commercial websites, you have to create what they like to call a strong password. Normally this will mean your password has to be at least 5 characters long and contain at least one number. Nothing wrong with that, and I can usually make a password that I can remember.
However lately I believe companies are pushing us to reach new levels of our brain or something. I’ve been seeing more policies where you have to have numbers, letters, special characters and capitalized letters in it. Oh and to top it of it can’t be a password you had in the past, or a incremental version of that (eg: test1 to test10).
Now lets examine how usefull such a policy is. I used to have pretty strong passwords, hard to guess and difficult to crack. Now that my passwords have to be so complicated I’m resorting to putting post-its on my screen with the passwords again. Very insecure and very easy to hack.
So I recently encountered a weird problem with printing in Internet Explorer. To ease the usability of a website we opened a new window that had a frame-set in it with 2 frames. The first frame contained a button to close the pop up and the second frame a clone of the page to be printed. This was done to apply a slightly different lay-out to the print version.
For some reason some of our customers reported that the print-out font size was bigger then it was supposed to be. And in some cases the tables didn’t even fit the page anymore. Surprisingly everything worked normally in Firefox, and only the customers using IE7 and above reported the issue.
After a couple of hours debugging it turned out that IE jumped into some weird rendering mode that caused the content not to fit a normal A4 page anymore. Appearantly adding the DOCTYPE definition to set it to compatability mode helped solving the problem. So I included the below to fix the issue:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">