Welcome to Hardcode Sign in | Join | Help

August 2008 - Posts

Everyone knows that c0 = cd*(1-a)+cs*a for color channels, but how do you compute the final alpha channel ? Using the same equation means a0=ad*(1-a)+a*a that may not be what you would expect, for example if you have full opaque destination you may end up with a translucent image a0 < 1.

By reverse engineering of Paint.NET (and Photoshop) I came with a0 = ad*(1-a)+1*a, that is an additive blending for alpha. While I have found no real explanation why to use this formula, I had to. Oh and BTW, ActionScript's BitmapData.copyPixels blends like crap, you'd better code your own alpha blending.

Update: Well, the correct alpha blending equations are: a0 = a+ad*(1-a) and c0 = (cd*ad*(1-a)+cs*a) / a0, from Wikipedia.

Nice idea, striking similar to how textures for 3d models are stored.

The paper is here.

via feeder

It seems to work nice but ... only on Sql Server 2008 connections! This really sucks :(
.

It's not a joke, I got my hands on one :). And, yes, it has a simple Win32 stub exe that checks for JVM and installs it if not found.

I could have bet on anything that SQL Server has atomic disk writes so no crash can possibly corrupt anything, well, after a power outage I had a database marked as (Suspect) by the recovery. The only way to actually get it back running was DBCC with REPAIR_ALLOW_DATA_LOSS that indeed has lost an entire table full of data along with some other fields around.

Using this provider http://code.msdn.microsoft.com/EFOracleProvider it's easy to change you model to use Oracle instead of SQL Server - only change the column types (for example from nvarchar to nvarchar2 :) etc). Unfortunately the provider then throws a bizarre error, you can see it in the comments.

 

to run circles around

I really did not know about it :) First heard in Romanian then in English.

e.GetType().InvokeMember("onmouseover", System.Reflection.BindingFlags.InvokeMethod, null, e, null);

where e is IHTMLElement.

The Yahoo Developer Network has some interesting articles on common patterns you may encounter in developing web applications.

Definitely a must-read.

I passed the qualification round but couldn't attend the next round and I was out of the country :( next year now. Congrats to Stefan as he did make it.

At last, Firefox 3 support this via an add-on, now it looks way cooler than IE7.