Converting hex string into Color (Windows Phone)
Windows Phone has no ColorTranslator.FromHtml, so here is a regex-based method that parses #aabbcc, #ffaabbcc and friends into a Color object.
The journal
149 articles on building software and understanding how it works.
Windows Phone has no ColorTranslator.FromHtml, so here is a regex-based method that parses #aabbcc, #ffaabbcc and friends into a Color object.
TaskCompletionSource turns any old-style async callback into an awaitable Task. Demonstrated with the WP7 camera, applicable everywhere.
I rented a Battlefield Heroes server and discovered the admin tooling wanted an app running 24/7 on my PC — so I wrote a .NET library for the Rcon protocol instead. Protocol details and source inside.
Windows can mount WebDAV shares as drives, but refuses basic auth by default — and getting Apache to serve digest auth that Windows accepts took some troubleshooting. The working setup, documented.
There are plenty of C# web servers already, but I wanted to play with TPL and async/await — so here is a minimal HTTP server built around them. Downloadable code included.
How well does Dictionary<int,int> actually perform? I measured speed and memory with random data and random access on real hardware — with numbers, graphs and a few surprises about what hides behind O(1).
ShadowCopy means web apps run their .dlls from a temp directory, so "the directory of my assembly" is a trap. Static helpers that resolve the real application path for web, console, WinForms and WPF alike.
A .dll shared between web and desktop apps can't assume where app.config or web.config lives. A small cached method that resolves the correct config file wherever the assembly is running, with Nini example.
For DSP debugging I want to draw FFT data fast: kernel32-allocated memory, unsafe pointers, and InteropBitmap so WPF renders straight from the buffer. Vacation-time code, constantly improving.
NTFS symlinks are well-known to *nix users and unknown to most Windows users. Combine them with Dropbox and your IE favorites (or any folder) silently sync between machines.
I just wanna do the right thing — like Tedd would have done. (Video embedded.)
I have worked over RDP since around 2000, and bandwidth is usually the bottleneck. Concrete tweaks for RDP on Windows 7 SP1 with RemoteFX to squeeze a smoother desktop out of a slow line.
OpenCV's haar cascades finding faces on the Kinect RGB camera in real time. Source coming after some major refactoring.
SURF object recognition through EmguCV — detecting objects even when tilted and rotated, as part of my Kinect starter kit.
"Yes!" and "No, never!" — both answers are right. SSDs don't care about fragmented reads, but NTFS does interesting things when free space gets fragmented. What actually matters, and what to do about it.