Friday, October 30, 2009

Tech: Set Gmail to handle MailTo links in Opera

For some reason unknown to me, Opera does not come with the ability to select Gmail as the default mail provider.  However you can fix this with a small configuration file change.  After installing Opera open up C:\Program Files (x86)\Opera\defaults\webmailproviders.ini (if you are not running a 64 bit system the (x86) wont be present).  Open the file and add the following text to the end:

[Gmail]
ID=8
URL=http://mail.google.com/mail/?extsrc=mailto&url=%s
ICON=http://mail.google.com/favicon.ico

Restart Opera after saving the file.

If you’ve already set up a different handler for MailTo links you’ll need to go to Tools > Preferences > Advanced > Programs.  Then click the mailto protocol and click edit.  Click the “Use Web mail service” radio button and Gmail should be present in the drop down list.

If you haven’t set up a mailto handler, just click on any mailto link and Opera will bring up a dialog box allowing you to choose Gmail.

Wednesday, October 28, 2009

Tech: Off Site Backup Using Windows Live Sync

First off let me say that if you currently have no backup in place for your files, you will regret it.  I keep all of my files on a separate physical drive than my OS and Programs.  My previous method of backup was to just copy all of the files on that drive to a large external hard drive and put it in a fire proof safe.  Not an optimal method for multiple reasons:
1.  Content on there was very rarely up to date because taking the drive out of the safe and copying files was a pain. 
2.  I’m putting a lot of trust that the safe is actually fire proof, and that it still wont get hot enough to run the drive in the case of a fire.

However I came up with a new plan the other day that uses Windows Live Sync.  I created 4 root folders on my “Files” drive: Documents, My Music, My Pictures, My Videos.  And all content is stored in their respective folder.  I then set up Windows Live Sync on my desktop with profiles for each of those folders.  Next I brought my external hard drive to work and set up sync profiles for those folders to the external hard drive.  So my system basically acts like DropBox, without the space limitations (but also without the online storage).This has been a great choice so far because:
1.  My files are automatically synced to an off site location with no space limitations (except my own hard drive space).
2.  ANY file I update or create at work or at home is automatically synced.
3.  Completely Free! (not counting the cost of the hard drives which I already had).

You might be wondering why I created 4 profiles if I’m backing everything up.  The reason is that I am also syncing “My Pictures” to my notebook computer.  My wife uses our notebook much more frequently than the desktop, and Windows Live Sync plays well with Windows Live Photo, so she can put photos from the camera onto the notebook and everywhere else is updated automatically.

One thing to note is that I have about 400 gigs of content so before bringing my external hard drive to work I manually copied the files via the usb connection so that it wouldn’t take forever to get all of the files.

Tech: Cool Desktop Backgrounds

Windows 7 has a nice feature that will change your desktop background every 30 minutes (configurable).  When setting up a new Windows 7 computer my first item of business is to select a theme.  Right click and select “Personalization” to choose a theme.  Then on the Personalization window you can click “Desktop Background on the bottom and it will show you the pictures that are a part of the theme.  From here you can choose the pictures that show up as part of the theme and tell windows where to look for more pictures.  I’ve been putting new photos directly in the United States them folder at C:\Windows\Globalization\MCT\MCT-US\Wallpaper.  The best site I’ve found for getting desktop images is www.caedes.net.  Caedes is sort of a YouTube for desktop background (all user created content).  Recently I’ve discovered another nice site at http://www.shiftedreality.com/, this is all one person’s work, some photography, some rendered, all very nice.

Friday, October 9, 2009

Code: Open Video Player Smooth Streaming ag_e_unable_to_play

If you are receiving the ag_e_unable_to_play or ag_e_network_error while attempting to do smooth streaming using the Silverlight Open Video Player (OVP) you may need to download AdaptiveEdge.xap.  This file does NOT come with the OVP download in the plugins directory.  I'm not sure why this is, especially since their own example.html references it!  I was able to view the source of http://www.smoothhd.com/ and download the file from http://www.smoothhd.com/plugins/AdaptiveEdge.xap

Wednesday, October 7, 2009

Home: Store Bread in your Refrigerator

We used to store our bread in a breadbox on the counter.  However we never seemed to be able to finish a loaf before it got moldy.  We've now moved the bread into the refrigerator and it seems to keep good much longer (3x longer or more).  Not that bread is expensive to replace, but it is much more of a convenience to actually have bread around when you want a sandwich.

Code: Develop Code in Unit Test Classes

I've never been good at getting myself to write unit tests, its just not fun to write code to test code.  However I've realized today that usually I end up writing console applications to test my business objects as I develop them, why not start with this code in a unit test?  That way if you don't come back later to more fully create your tests, at least you have something there.

Monday, October 5, 2009

Code: C# Escaping Curly Braces in String.Format

With the Format() method of String in C#, you use numbered braces to denote replacement positions.  If you want to display braces in your formatted text you need to escape them by entering the brace twice:

String.Format("{{ Go to {0} for help}}", "http://www.google.com");

Thursday, October 1, 2009

Code: Silverlight Video Player Not Displaying In Firefox

I ran into an issue today where the Silverlight video player on my web page would display in IE and Opera but not Firefox or Chrome.  The issue is with how the browsers handle the height and width specifications on the object tag.  If the html item that contains the object tag does not have a height specified in pixels, then the object tag must.

So changing my code from

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" 
width="100%" height="100%" id="slp">

to:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" 
width="400px" height="400px" id="slp">



resolved the issue.