VB empty arrays

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.

Hot to avoid closing the property page

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.

Mac looks

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.

Insert binary data from SQL script

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.

Mac design

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.

Good programmers vs bad ones

Here’s a link to one of Joel Spolsky’s latest articles.

Phrack zine

The latest release of the Phrack zine is available here, and unfortunately is the final one. Contains lots of hacking-related stuff, very interesting.

Physics board

AGEIA build a device that accelerates physics computations, getting them off the CPU. An absolutely cool idea, I hope a standard will appear quickly (maybe in DirectX? what about DirectPhysics?) and also a software implementation (based on Havok for example), so that it will gain mass acceptance.

Hardware raytracing

These people have built a realtime raytracing chip. Supposing it has an OpenGL interface, the device is stunning (the pipeline is programmable also). When will ATI and nVidia switch to raytracing ? Ok, shaders are cool but I’d like a major switch in architecture like this one.

Disable the “Server busy” dialog

Here is the quickest way to disable that annoying dialog displayed in OLE client applications :

	// disable the "server busy" dialog
	AfxOleGetMessageFilter()->EnableBusyDialog(FALSE);
	AfxOleGetMessageFilter()->EnableNotRespondingDialog(FALSE);