Hardcode
Making it happen
Making it happen
Mar 11th
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.
Mar 11th
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 …
Mar 4th
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);
Feb 24th
If Dynamic Data is the best framework Microsoft has come with in a loooong time, then BusinessLogicDataSource is the best shit ever. Too bad they (currently) don’t work together, there’s still no easy way to do dynamic data with user roles & rights.
Feb 20th
Ok IE 8 may not be the best browser in the world (I didn’t have the change to play with the RC as I have Windows 7), however it’s javascript debugger is much more friendly than Firebug’s and definitely more lite than the fully-fledged Visual Studio JS debugger.
Feb 10th
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
This bizarre error seems to be caused by custom HttpResponse filters (when using static html pages on IIS 7).
Feb 5th
Download the samples from here. If you add the JSONP* classes to your App_Code folder you may wonder what assembly to add in web.config for JsonpBindingExtension:
Jan 27th
Having tested all the visual html editors for .NET, the best one is definitely this one.
Jan 26th
You may find an unexplainable Timeout error happening after two usages of HttpWebRequest, even so the destination URL reponds in a timely fashion. If everything you have googled did not fix it, try to use Close on each HttpWebResponse.
Jan 23rd
The famous session state error:
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the
\ \ section in the application configuration.
can be fixed most of the time by using the well-known 3 steps, found here. If that *still* does not fix it, I found that the IIS7 setting runAllManagedModulesForAllRequests=”true” on system.webServer / modules makes the error go away.