Welcome to Hardcode Sign in | Join | Help

March 2009 - Posts

Wolfenstein 3D for iPhone is out, here are John Carmack's comments.

Yey both Coolio and Urbee won prizes at last night's Digi Cafe Awards, Urbee even won the big prize!

A really annoying thing if you use the DataSourceID databinding is that you can't identify the control that throws the exception, the only thing that you get is an ID-less stacktrace and the debugger doesn't break at all ...

HeYo and Redesignme. Good luck!

Don't forget about the first DigiCafe meeting, tonight @ Loggia, 18:30. Be there!

Or how do you remove an element from an associative array( an Object actually) - I really did not know, it's delete lastids[room].

I can't get it to work, the IIS server stops responding after a short number of connections that are in an open state. Also researching the safest way - writing a Windows Service for WCF hosting, the Comet server will run on port 81 though.

Did you see this device? It's just unbelievably cool:

I've found the paper, although it seems to be just an abstract and, guess what, the entire system runs on Windows! :)

The software for the WUW prototype is developed on a Microsoft Windows platform using C#, WPF and openCV.

The quick way to transform an ASP.NET WCF service into a Comet-style one, with long-polling:

- read this article and get the files

- replace your WCF calls with the ashx Comet handler, keeping the params in the querystring

- route the parameters to CometAsyncResult

- in CometAsyncResult have a dictionary cache from params to results

- when you need to push the result, compare the cached response with the newly-computed one, and *wait* (return null) if it's the same (long-polling here as the Comet handler will delay the response until timeout)

- use a random session key as an extra WCF parameter so the first response is always sent to the client

There's still some issues I'm investigating related to parallel normal WCF calls not being answered, to be continued ...

The standard code for having a transparent IE toolbar:

protected override void OnPaintBackground(PaintEventArgs e) 
{
IntPtr hdc = e.Graphics.GetHdc();
Rectangle rec = new Rectangle(e.ClipRectangle.Left, e.ClipRectangle.Top,
e.ClipRectangle.Width, e.ClipRectangle.Height);
DrawThemeParentBackground(this.Handle, hdc, ref rec);
e.Graphics.ReleaseHdc(hdc);
}
it's found everywhere, however it's just plain wrong. There are lots of redrawing issues when you are using controls with transparent background (that is, labels, buttons etc). Luckily you can easily fix them by having Rectangle rec = new Rectangle(0, 0, Bounds.Width, Bounds.Height);