Welcome to Hardcode Sign in | Join | Help

August 2005 - Posts

I'm currently having a weird issue with 4-channel JPEGs in CMYK color space. The result of the decompression with libjpeg is different than the image as seen windows image viewer, MSPaint and Photoshop. Currently only Macromedia product display the bizarre jpeg file exactly like us. I suspect the whole point may be in the CMYK - RGB conversion.
Here [www.monzy.com]. Totally cool, although you must be a programmer to get all the references. Via [computergames.ro/forum].
Tonight is Google CodeJam qualification round, I'll be coding there with username "Pisoi". It is the first of the contests I will attent, the rest being ACM, CSIDC and Windows Embedded Challenge. My target is at least 3 out of 4 finals.
UPDATE: The contest is open from 7 PM tonight to 7 PM tommorrow. It lasts one hour since I start reading the first problem, and there are five problem sets.
Ok so in the last weeks I had some weird bugs involving drawing from an OLE server into the client-supplied DC. This DC had about 4000 logical points per device point, however a device point represented about 10 pixels on the screen. Because of the large logical points coordinates I found out that somewhere in FillRect they got truncated to the first word, so it didn't draw correctly at all.
Another issue: because of 10 pixels per 1 device point the dimensions returned by GetTextExtent were all rounded to a multiple of 10 (!).
But the weirdest issue that I gived up solving was that a DrawText with DT_CENTER using the entire client rectangle was not centering it at all but rather drawing at a random position every time it was called. Some really strange things happening there... well in the end I wrote a workaround but eventually when I will have some more spare time I may again take a look at this.
It was officially released under GPL and it's available here [ftp.demon.co.uk]. Didn't have time to look thoroughly at it but will do that next week.
I found out that VB doesn't support empty arrays, i.e. 0-length ones. So LBound will be always <= than UBound. The only workaround is to check for a "Nothing" array before its usage.
When the user has clicked OK but you would liek to stop the closing because there is invalid data entered. The straightforward solution is to override OnApply and check for a flag set by OnOK. Depending on its value return TRUE or FALSE.
Here's a program that makes OSX-like shadows on Windows XP's windows. In the same site I've also found a nice looking dock to replace Windows XP's taskbar.
This is a big problem in SQL server. So I need to generate a creation script that should also fill the tables with data. For the populate commands I couldn't find any program so I've written one quickly. Now, the problem was the image fields, although SQL server has support for binary constants (using 0x), the script lines are limited to 64k (in SQL Query Analyzer). Now this can be avoided theoretically by adding a part of the data and then constantly updating the data with + (so concatenating the existing contents with new data) until the whole data is added.
Unfortunately this doesn't work - I have to cast "image" to varbinary, and varbinary in the script is limited to 8000 bytes. So if anyone knows a method how to do it - please advise.
I found out this guy that has designed lots of Apple's products. Many of them are discontinued, so I have never seen them. They used to look very cool in the past, also.
Here's a link to one of Joel Spolsky's latest articles.
The latest release of the Phrack zine is available here, and unfortunately is the final one. Contains lots of hacking-related stuff, very interesting.