You are here


'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' when using an ImageBrush as an opacity mask in WPF

You wouldn't know from the error message, but the problem was that the image file was set to be Content. It should be Resource.


MonoTouch: NSUnknownKeyException - This class is not key value coding-compliant for the key

This error can occur in the constructor of [geshifilter-code]AppDelegate[/geshifilter-code] (when it calls [geshifilter-code]base.ctor()[/geshifilter-code]).

This occured to me when I have specified the application's entry point in [geshifilter-code]Info.plist[/geshifilter-code] in the Main Interface setting.

A similar error will occur any time an outlet exists for a control that no longer exists in Interface Builder.

Websites that have sold my personal information or have been hacked and compromised

Whenever a website asks me to sign up or share personal information, I always use a unique, tracable e-mail address. These are those to which I now regularly receive spam.

Viewing SVG and other HTML5 content when debugging in Visual Studio


When working on modern web applications that use features that are recently supported by browsers such as SVG, you may find that images do not render correctly, or at all in the browser.


When most of use develop and test web applications locally, we use the built-in web server, called ASP.NET Development Server/ This works fine for testing, and most applications will eventually get deployed to a web server running IIS 7.0 or later.

The Problem

The ASP.NET Development Server is not aware that it should serve SVG with a MIME content-type of [geshifilter-code]image/svg[/geshifilter-code]. Instead it uses the generic [geshifilter-code]application/octet-stream[/geshifilter-code]. A modern web browser on the other hand will typically either request [geshifilter-code]image/*[/geshifilter-code] or explicitly request [geshifilter-code]image/svg+xml[/geshifilter-code]. If the response is [geshifilter-code]application/octet-stream[/geshifilter-code], it will ignore the response (tested in IE9, FF14).

The usual way of fixing this is to add this code block to web.config:

Unfortunately ASP.NET Development Server is unable to understand this directive.

To workaround this problem, install and use IIS 7.5 Express to serve the content locally. This will require instructing Visual Studio to use IIS instead.


Ports upgrade broke my mail server

A day or two ago I upgraded the ports in my jails. This stopped postfix from accepting mail. The problem was that postgrey, which listens for postfix on [geshifilter-code]tcp/10023[/geshifilter-code] stopped running. It produced an error about not being able to bind to [geshifilter-code]::1[/geshifilter-code]. I got it back running again by altering the flags in the startup script ([geshifilter-code]/usr/local/etc/rc.d/postfix[/geshifilter-code]) from:

[geshifilter-code]postgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} --inet=10023 -d --user=postgrey --group=postgrey --dbdir=/var/db/postgrey --x-greylist-header=${postgrey_greylist_header}"}[/geshifilter-code]


[geshifilter-code]postgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} --inet= -d --user=postgrey --group=postgrey --dbdir=/var/db/postgrey --x-greylist-header=${postgrey_greylist_header}"}[/geshifilter-code]

This forces binding to the IPv4 port only.

How freebsd-update broke my jails

I usually perform a binary update of my jails using

[geshifilter-code]#freebsd-update fetch install #freebsd-update -d /usr/jails/basejail fetch install[/geshifilter-code]

This has worked for years. After doing it yesterday I was unable to login to any of my jails and pretty much everything broke. For example logging in using [geshifilter-code]ssh[/geshifilter-code] gave logged the error: [geshifilter-code]/bin/sh permission denied[/geshifilter-code]

After spending the day on it I have discovered that the upgrade process changed permissions on [geshifilter-code]/usr/jails/basejail[/geshifilter-code] to [geshifilter-code]700[/geshifilter-code]. Changing it to [geshifilter-code]755[/geshifilter-code] fixed everything.

When your iPhone has hiccups…


My softball team thought it would be fun to play intro music for each person as they went up to bat, like some major-league teams. I welded together a portable sound system complete with pneumatic wheels, second-hand shelf speakers, an AGM battery, and a 40W head unit.

I recently purchased a refurbished iPhone 3GS from an online retailer. I needed one for testing an application that I've been hired to build. Since I had the iPhone anyway, I figured the touch interface would work well for our team's sound box.

The Problem

The first problem, I learned, is that the iPhone cannot play a single song, then stop. It always continues on to the next song unless it is the only song in a playlist. Luckily I wasn't the only person who found this extremely stupid, and before reaching for my compiler I checked the App Store and found Benjamin Pung's One track Mind app.

The next problem was that when I plugged in the cord from the headphone jack of the iPhone to the Line In jack of the head unit, there was an annoying beat, beat, beat sound.

For the benefit of those searching, it could also sound like: click, click click; thump, thump, thump; pop, pop, pop; beat, beat beat.

I considered loose connections, impediance mismatch, and EM interference, but I was able to rule those out. Oddly, rebooting the device would make it work normally until I fiddled with the jack (I still haven't figured this out).

It is noteworthy that this symptom is not present when listening with headphones (this is where, I believe, impediance plays a role).

The Solution

Many internet searches informed me that this was a very common problem without a solution.

I notice that pushing the plug into the jack forcefully and holding made the noise stop. I also noticed that when I did so, there was just a little end-play; maybe 0.2mm. I had a hunch.

I grabbed a toothpick and went digging. I scraped the tip of the toothpick against the bottom of the jack repeatedly, and was able to pull out several small pieces of what I'll call lint – probably a mixture of dust, fibres and oil.

I plugged it in to the stereo and ta da! No more noises. No more end-play.


Once again, the simplest solution (though not necessarily the most obvious one) usually is the correct one.

I'm posting this tip because many people have this problem, and most keywords like click, beat, and pop result in pages of results completely unrelated information (thanks Dr. Dre).


Simple Copyright Policy: If you want to reproduce anything on this site, get my permission first.