Welcome to Hardcode Sign in | Join | Help

March 2008 - Posts

Consider an img followed by a div, with borders for highlighting the issue:

Where does that 5px default bottom margin / padding / invisible border come from ?

After thorough investigation, you supposedly have to set vertical-align: bottom on imgs otherwise they will align with the baseline of the text thus leaving some bottom margin for letters with descenders below the baseline. Especially hard to spot when you have no text near the image! By the way you can also set the image as block.

According to Adrian, a fresh install needs no less than 7GB RAM to start ...

XNA has a great component system for adding rendering plugins, for example download this, add the BloomComponent to your Game class and, voila, you have HDR-like bloom applied in postprocessing. You also can do displacement mapping by using another sample.

I can bet Photoshop has better support for Japanese text than MS Word:

<mojiZume>0</mojiZume>

...

<enableWariChu>false</enableWariChu>
<wariChuCount>2</wariChuCount>
<wariChuLineGap>0</wariChuLineGap>
<wariChuScale>0.5</wariChuScale>
...

<leftAki>-1</leftAki>
<rightAki>-1</rightAki>
<jiDori>0</jiDori>

...

This seems promising - will give it a shot tomorrow.

Writing something like SELECT name FROM (SELECT * FROM Products) may look correct in SQL, however SQL Server throws an Incorrect syntax near ')' that's not user-friendly at all (Oracle though accepts this syntax). You can get it working in SQL Server also by naming the derived table i.e. change to the following: SELECT name FROM (SELECT * FROM Products) AS Products2

At last, something to fix the dreaded issue with "View Code" not appearing when right-clicking on markup in Visual Studio 2008 - get the hotfix here.

 One of the things that suck in C# as compared to C++ is that you always have to create a new structure when you want to update a value property:

    l.Bounds.X += 10; // this doesn't work as l.Bounds (property) returns a value type

What would be interesting to have:

class Item
{
	Rectangle bounds;
	public ref Rectangle GetBounds()
	{
		return bounds; // OK
}
	public ref Rectangle GetBounds2()
	{		
		Rectangle r = bounds; 
		return r; // illegal
}
	// or
	public virtual Rectangle Bounds
{
get ref { return bounds; }
set { bounds = value; }
}
}

ASP

It's been a long time since I've seen a website done in plain old ASP :))

Here's an excellent all-purpose library in C#, it simply rocks.

Cal Henderson from Flickr said yesterday they will to move their website to .NET and SQL Server - yay! another win for Microsoft, still there is only one huge website based on .NET and that is MySpace.

Flickr is currently written in a proprietary language intended some time ago for a game they were developing.

Do you know any Japanese software company / product ?

At last, something interesting from both Nokia and Microsoft - more here. I just hope they will have something backwards compatible with the existing S60 devices, I mean an installable Silverlight runtime.

That Microsoft's up-to-come web-based Office will run on Silverlight ?

How would you solve finding differences between two string lists i.e. find out which entries are new, which are updated and which are deleted ?

Take this as example:

Source list: 

a b

c d

Destination list:

b c

c d e 

Correct answer:

a b -> b c

f is newly inserted

c d -> c d e

After I thought a bit more, the problem is not be clearly defined without a string distance, however just use common sense for the results :)

Ok ... WTF? A telescope? Are you people nuts ?