Saturday, January 27, 2007

Ingesting Hand Sanitizer


This story tells of a child that ingested some hand sanitizer and had to be taken to the hospital. She was OK in the end, but this woman is warning all her friends about the problems that can happen if your kid drinks hand sanitizer. That's all fine and dandy, but what part about "keep out of reach of children" doesn't she understand? If your kid drinks Clorox would you be sending a warning to all your friends? And please tell me why the heck they decided to use hand sanitizer instead of soap only for convenience? Soap removes the dirt and germs (they wash way and down the drain), where hand sanitizer only kills the germs - it doesn't remove anything. If you have a sink then use it. Hand sanitizer is for use at your desk at work or while traveling and you don't have immediate access to a sink.

This woman is warning her friends that this common household product, used by so many families and children, can be dangerous. That's great, but people should read the label and understand that leaving any product like this in reach of a 2 year old kid is a bad thing.

Monday, January 22, 2007

ASP.NET Master Pages "Header" Access

ASP.NET Master Pages were a great addition to the .NET Framerowk 2. When using them I discovered I wanted to do something simple like change the robots meta tag on certain pages of the website. I may also want to insert a refresh HttpEquiv into some pages too (like my 404 error page). Since you put all your "header" info in the master page it I had to figure out how to change it in one of the child pages. After a little searching I found the HtmlHead and HtmlMeta classes that will handle these tasks. So I put a couple simple methods in my MasterPage.cs file and call them from my child web pages. You can use this technique to do other things with the header as well.

Changing the robots meta tag
I created a SetRobots() method to change the robots tag. It assumes that the tag already exists in the MasterPage and simply changes it to the supplied text.

public void SetRobots(string content)
{
// Get a reference to the page header element.
HtmlHead CurrentHeader = this.Page.Header;
// Find the robots meta tag and change it.
foreach ( Control HC in CurrentHeader.Controls )
{
if ( HC is HtmlMeta )
{
if ( ((HtmlMeta)HC).Name.ToLower() == "robots" )
{
((HtmlMeta)HC).Content = content;
break;
}
}
}
}


Use the following syntax to call this method from the child page, typically in the page's page_load event:
((MasterPage)this.Master).SetRobots( "noindex,follow" );


Inserting a redirect
I created a SetRefreshHeader() method to insert a redirect into the HTML header.

public void SetRefreshHeader( int seconds, Uri url )
{
// Get a reference to the page header element.
HtmlHead CurrentHeader = this.Page.Header;
// Add the redirect tag to the header.
HtmlMeta HM1 = new HtmlMeta();
HM1.HttpEquiv = "Refresh";
HM1.Content = string.Format("{0}; URL={1}", seconds, url.ToString());
CurrentHeader.Controls.Add( HM1 );
}

Use the following syntax to call this method from the child page:
((MasterPage)this.Master).SetRefreshHeader( 5, new Uri( "http://www.mydomain.com/" ) );

Sunday, January 21, 2007

Private Islands

According to this article on TorrentFreak, Sealand is not going to sell to the Pirate Bay, so they're going to have to go to plan "B" and find an island.

I was poking around and found this really cool site - Private Islands Online. This is so cool. Some of these islands are only $4 million. I don't have $4 million to buy an island, but you would think that your own island would cost so much more than that. Consider that Sealand is only a pile of rust and concrete but they want $750 million. You can also rent a private island, some as cheap as $3,000 a week. I've spend more than that in a hotel room before.

Sunday, January 14, 2007

Daylight Savings Time in the US

Many people don't know this, but in August 2005 the schedule for daylight savings time in the United States changed. The change was part of The Energy Policy Act of 2005 and it extends daylight savings time by 4 weeks over the previous schedule.

The folks over at timetemperature.com have some more info on this. You can also check out The Official U.S. Time website if you're confused about what time it is right now.

If you have a computer running Microsoft Windows, you will want to apply this update to make your computer understand this change.

Saturday, January 13, 2007

Sealand is For Sale


This is funny stuff. Sealand is a an abandoned World War II anti-aircraft platform seven miles (11 km) off the English coast. Since 1967 the owner, a guy named Paddy Roy Bates, has claimed that this is an independent country. On September 2, 1976 he declared independence and named his little piece of the world the "Principality of Sealand."

Now its up for sale. So you're saying to yourself, "whatever." But the really funny part is that a Swedish file-sharing website named Pirate Bay wants to buy it. Why? So they can get around copyright laws. They've even setup a forum to discuss the idea. The asking price is $2 billion, so I don't think it is likely they'll succeed. They say if they don't get Sealand then they're going to try to find their own island somewhere.

The Official Principality of Sealand website can be found here. More pictures of the independent country can be found here.

Thursday, January 11, 2007

DirecTV DVR Problems


DirecTV is great. We've had it for years and we like it. We have a Tivo and it works great. One nice thing about DTV is that you pay $5 a month for the DVR service and that covers all DVRs that are in the house - regardless whether you have one or ten you still pay just $5 a month extra. So we bought a second DVR last year. Tivo is not working with DTV anymore so we could only get the new R15 unit from DTV. If you poke around the forums you will see that this thing has some bugs. I get frustrated with it from time to time but it gets the job done. We actually bought a second R15 (that makes 3 DVRs in the house now) for my Son for Christmas. His has problems too.

For those of you having similar frustrations from this device you may be interested in this forum post with some FAQs and other good information on the R15.

Wednesday, January 10, 2007

How to make Yahoo! Mail your default mail program in Windows


Windows defaults to use Outlook Express (or sometimes Outlook) when you click on an email address link in a web page or elsewhere. This can be annoying when you use Yahoo! Mail as your mail program.

Well, here is the fix. This little IE Plug-in will configure Windows and IE to use Yahoo mail as your default mail program. Quick and painless installation too.

Read instructions here - http://email.about.com/od/yahoomailtips/qt/et_default_mail.htm

Tuesday, January 9, 2007

Browsers

Some time ago I mentioned that I had switched to using FireFox. I was a long time user of Internet Explorer. I was liking FF pretty well and getting along OK but mainly started using it only because the boss wanted us to use it at work and I really didn't want to use a different browser at home than at work. Well, since then I have switched back and I'm using IE 7 now. I like IE 7. The only FF feature that I miss is the password management. FF has a nice password manager feature that IE simply doesn't come close to. IE has page zoom, rss feeds, good printing (finally) and quick tabs (which is really cool). FF has really cool spell checking (it actively checks all text boxes on the page and underlines misspelled words) and that password manager.

We all love to hate Microsoft and IE 6 had its share of problems. But I think IE 7 is a good step forward and I like it.

Monday, January 8, 2007

Business Email

I helped a friend of mine setup his new domain and email accounts using Yahoo Small Business Email. We wanted a reliable and easy to use setup for 3 to 10 employees of this small business.

We looked at the Google Apps For Your Domain free offering which is pretty full featured... but its still in beta and there are some serious concerns about privacy with Google's GMail.

We looked at the Microsoft Live Custom Domains free offering... but it ties you into the Windows Live Mail Beta which is free, but still in beta, and they have far too few features compared to both Yahoo and Google. Microsoft is way behind in this race, although what they have so far looks really nice.

We selected Yahoo Small Business Email at $9.95 a month because: 1) its a real, fully released product, 2) familiar browser based interface (some of the employees are already using Yahoo), 3) because of its flexibility and the number of features was somewhere between the Microsoft and Google offerings.

We went ahead and used Yahoo for the domain too since they throw the domain in for free. You get full access to the DNS Zone records and a nice little control panel to manage the email addresses for your domain.

I've been looking at the Microsoft and Google offerings for hosting my personal domain for email, since they are free, but they both have drawbacks. So I've been using Yahoo Mail Plus with my personal email domain (using forwarding and Yahoo Mail Plus) and it works well.

Sunday, January 7, 2007

Blog Lost

I had my blog hosted at my own shared reseller account - using ColdFusion and MySQL. Things were working well until I made a small change to my hosting account yesterday and lost all my sites and email! I got everything back up online quickly, but some of my data was lost. I hadn't done a backup of the MySQL database for a while. So I decided to take the opportunity to go ahead and move everything over here to Blogger. Why host it myself when Google will do it for me for free?