<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Brett's Software Development Blog</title>
	
	<link>http://brett.batie.com</link>
	<description>Thoughts of a Software Engineer.</description>
	<lastBuildDate>Tue, 09 Mar 2010 18:37:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/brettbatie" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="brettbatie" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">brettbatie</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://feeds.feedburner.com/brettbatie" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.yourminis.com/subscribe.aspx?u=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.yourminis.com/images/addtoyourminisbadge.gif">Subscribe with Yourminis.com</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://hub.netomat.net/account/account.autoSubscribe.jspa?urls=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.netomat.net/blogger/images/icon_netomat_feedbutton.gif">Subscribe with netomat Hub</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fbrettbatie" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>Update .htaccess with Dynamic DNS IP Address to Prevent Password Protection</title>
		<link>http://brett.batie.com/software-development/update-htaccess-with-dynamic-dns-ip-address-to-prevent-password-protection/</link>
		<comments>http://brett.batie.com/software-development/update-htaccess-with-dynamic-dns-ip-address-to-prevent-password-protection/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 18:37:00 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://brett.batie.com/software-development/update-htaccess-with-dynamic-dns-ip-address-to-prevent-password-protection/</guid>
		<description><![CDATA[I was working on a password protected site that needed to allow one specific user access without requiring a login/password to access it. The site was already using .htaccess to password protect the entire site so the quickest solution was to use the following type of setup in the htaccess file:
Order deny,allow
Deny from all
AuthGroupFile /dev/null
AuthName [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a password protected site that needed to allow one specific user access without requiring a login/password to access it. The site was already using .htaccess to password protect the entire site so the quickest solution was to use the following type of setup in the htaccess file:</p>
<pre class="brush: shell; highlight: 8">Order deny,allow
Deny from all
AuthGroupFile /dev/null
AuthName &quot;A Blog&quot;
AuthType Basic
AuthUserFile /home/admin/domains/domain.com/.htpasswd/public_html/.htpasswd
require valid-user
Allow from person.getmyip.com
Satisfy Any</pre>
<p>The main addition that I added to the password protection is line 8 &quot;Allow from&quot;. This line allows a specific IP address or host to have access without requiring password protection.</p>
<p>However, the host that needed to be used was a <a href="dyndns.com/">Dynamic DNS</a> hostname. This creates a problem as Apache takes the following steps when the user requests access.</p>
<ol>
<li>Grab IP from user requesting access </li>
<li>Do a reverse DNS lookup </li>
<li>Compare the results to the host in the Allow from line (person.getmyip.com) </li>
</ol>
<p>In this case when a reverse DNS lookup is completed on the users IP address it will not find the <a href="dyndns.com/">Dynamic DNS</a> hostname. Instead, it will find the hostname that is associated with your ISP which might look something like this 8.sub-79-231-223.myvzw.com.</p>
<p>There are a number of ways to get around this issue. In my case I wanted to use a small script to dynamically populate the .htaccess file with the correct IP address.</p>
<p>Below is the following PHP script that handles updating .htaccess with the latest IP address. The main requirement is that there is a comment &quot;# Allow from person.getmyip.com&quot; somewhere in the .htaccess file. This line tells the script where to insert the IP address on the very next line.</p>
<pre class="brush: php;">&lt;?php
// Rewrites the entire htaccess file. When a line starts with '# Allow from brett.getmyip.com' the
// very next line will be replaced with the actual ip associated with brett.getmyip.com
$htaccessFile = &quot;/home/admin/domains/batie.com/public_html/.htaccess&quot;;
$handle = fopen($htaccessFile, &quot;r&quot;);
if ($handle) {
	$previous_line = $content = '';
	while (!feof($handle)) {
		$current_line = fgets($handle);

		if(stripos($previous_line,'# Allow from person.getmyip.com') !== FALSE)
		{
			$output = shell_exec('host person.getmyip.com');
			if(preg_match('#([0-9]{1,3}\.){3}[0-9]{1,3}#',$output,$matches))
			{
				$content .= 'Allow from '.$matches[0].&quot;\n&quot;;
			}
		}else{
			$content .= $current_line;
		}
		$previous_line = $current_line;
	}
	fclose($handle);

	$tempFile = tempnam('/tmp','allow_');
	$fp = fopen($tempFile, 'w');
	fwrite($fp, $content);
	fclose($fp);
	rename($tempFile,$htaccessFile);
}
?&gt;</pre>
<p>I quickly wrote this script and realize that there is room for improvement. However, this meet the need and solved the problem. </p>
<p>After the script was completed adding a simple line to the crontab (crontab -e) file got it running on a regular basis to automatically update the file with the current IP.</p>
<pre class="brush: shell;"># Script to update ip access for dynamic dns host - it allows person.getmyip.com
*/5 * * * * /usr/local/bin/php /home/admin/scripts/allow_person.php &gt;/dev/null 2&gt;&amp;1</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/jDxXI62aWH6MPk3xMqWZ78-i7tg/0/da"><img src="http://feedads.g.doubleclick.net/~a/jDxXI62aWH6MPk3xMqWZ78-i7tg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jDxXI62aWH6MPk3xMqWZ78-i7tg/1/da"><img src="http://feedads.g.doubleclick.net/~a/jDxXI62aWH6MPk3xMqWZ78-i7tg/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/software-development/update-htaccess-with-dynamic-dns-ip-address-to-prevent-password-protection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paste Code – Live Writer Plugin To Paste HTML/Code</title>
		<link>http://brett.batie.com/software-development/live-writer-plugin-to-paste-html-code/</link>
		<comments>http://brett.batie.com/software-development/live-writer-plugin-to-paste-html-code/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 20:34:11 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Paste Code]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Windows Live Writer]]></category>

		<guid isPermaLink="false">http://brett.batie.com/private/cwd/live-writer-plugin-to-paste-htmlcode/</guid>
		<description><![CDATA[I recently started using Windows Live Writer and I believe it is currently the best application out there for quickly posting to a blog. However, I found one issue where I could not easily paste HTML and other code and decided to develop a plugin to address it.
If your in a hurry here is the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started using Windows Live Writer and I believe it is currently the best application out there for quickly posting to a blog. However, I found one issue where I could not easily paste HTML and other code and decided to develop a plugin to address it.</p>
<p>If your in a hurry here is the download link:</p>
<a href=http://brett.batie.com/download/InstallPasteCode.msi><img src=http://brett.batie.com/wp-content/plugins/download-monitor/img/downloads-icon.gif style="vertical-align: middle;">DOWNLOAD: Paste Code For Windows Live Writer</a>
<p><strong>The Issue</strong></p>
<p>Below is an example of some code I would like to paste into Live Writer.</p>
<pre class="brush: html;">&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Hello World&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
	Hello World
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>When I try to paste the above code in the &quot;Edit&quot; window. It appears correctly on the screen but in reality Live Writer added content to my code. When I view the source I receive the following:</p>
<pre class="brush: html;">&amp;lt;html&amp;gt;
  &lt;br /&gt;&amp;lt;head&amp;gt;

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;

  &lt;br /&gt;&amp;lt;/head&amp;gt;

  &lt;br /&gt;&amp;lt;body&amp;gt;

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Hello World

  &lt;br /&gt;&amp;lt;/body&amp;gt;

  &lt;br /&gt;&amp;lt;/html&amp;gt;</pre>
<p>This is very close to how I desire to have the code formatted. However, the major problem is it inserted a bunch of &lt;br /&gt; characters. It does make sense that it inserted these &lt;br /&gt;&#8217;s since in most cases we want line returns to have breaks but this is not the case when pasting source code. </p>
<p>Next, if I paste the code in the &quot;Source&quot; window the problem is the code is taken as actual source. This means that the code will not be seen on the screen but instead will be interpreted by the browser. If I then swap back and forth between the &quot;Edit&quot; and &quot;Source&quot; windows my code gets reformatted to be the following:</p>
<pre class="brush: html;">Hello World</pre>
<p>Which is obviously not what I wanted.</p>
<p><strong>Solution: A Plugin</strong></p>
<p>To address the issues stated above I put together a plugin that will allow pasting code in either the &quot;Edit&quot; or &quot;Source&quot; windows. It will replace special characters so that the code will be viewable and will not insert extra HTML (like &lt;br /&gt;&#8217;s).</p>
<p>Below is a screenshot of the plugin in action:</p>
<p><a href="http://brett.batie.com/wp-content/uploads/LiveWriterPluginToPasteHTML_AF6F/sshot201003063.png"  rel="lightbox" rel="lightbox[roadtrip]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sshot-2010-03-06-[3]" border="0" alt="sshot-2010-03-06-[3]" src="http://brett.batie.com/wp-content/uploads/LiveWriterPluginToPasteHTML_AF6F/sshot201003063_thumb.png" width="296" height="320" /></a> </p>
<p>This plugin will automatically take the code that exists on the clipboard and display it in the &quot;Code Snippet&quot; section and give the ability to edit the code before pasting it.</p>
<p>It also has the &quot;Before Code Snippet&quot; and &quot;After Code Snippet&quot; text areas. These two text areas allow defining code to wrap around your code snippet. By default the two box&#8217;s will have &lt;pre&gt; and &lt;/pre&gt;. Using either a &lt;pre&gt; or a &lt;textarea&gt; is required in order to have the formatting display correctly. If the content of &quot;Before Code Snippet&quot; and &quot;After Code Snippet&quot; is changed it will be remembered the next time the plugin is used.</p>
<p>Once insert is clicked in the plugin the code will be added to your post in Windows Live Writer and will be formatted correctly.</p>
<a href=http://brett.batie.com/download/InstallPasteCode.msi><img src=http://brett.batie.com/wp-content/plugins/download-monitor/img/downloads-icon.gif style="vertical-align: middle;">DOWNLOAD: Paste Code For Windows Live Writer</a>
<p><strong>Icing On Top</strong></p>
<p>With this plugin in place we can easily paste code and not worry about the formatting. However, it is very beneficial to have the source code displayed on your blog with syntax highlighting. I do know that there are a few plugins for Windows Live Writer that will apply syntax highlighting to code. However, I do not love this for the following reasons:</p>
<ol>
<li>Will not work when writing an article from blog&#8217;s admin page. </li>
<li>Will not easily allow changing the Syntax Highlighting to a different algorithm. There are a ton of different Syntax Highlighting plugins for blogs and every once in a while I like to upgrade to the the latest and greatest. </li>
<li>Will not work if I decide I want to move away from Windows Live Writer (that will never happen, right?). </li>
</ol>
<p>For my blog I am using the <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">syntax highlighter developed by Alex Gorbachev</a>. There is also a nice plugin that quickly installs this <a href="http://blog.burlock.org/wordpress/88-easy-google-syntax-highlighter-for-wordpress">syntax highlighting in a wordpress blog</a>. With the paste code plugin for Windows Live Writer in combination with syntax highlighting I can quickly paste code and achieve the following results:</p>
<p><a href="http://brett.batie.com/wp-content/uploads/LiveWriterPluginToPasteHTML_AF6F/sshot201003064.png"  rel="lightbox" rel="lightbox[roadtrip]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sshot-2010-03-06-[4]" border="0" alt="sshot-2010-03-06-[4]" src="http://brett.batie.com/wp-content/uploads/LiveWriterPluginToPasteHTML_AF6F/sshot201003064_thumb.png" width="446" height="130" /></a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/wykvV-Lo8oUWUK_OhET2iQM3CzI/0/da"><img src="http://feedads.g.doubleclick.net/~a/wykvV-Lo8oUWUK_OhET2iQM3CzI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wykvV-Lo8oUWUK_OhET2iQM3CzI/1/da"><img src="http://feedads.g.doubleclick.net/~a/wykvV-Lo8oUWUK_OhET2iQM3CzI/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/software-development/live-writer-plugin-to-paste-html-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to: Watch Netflix in Chrome</title>
		<link>http://brett.batie.com/htmlcss/how-to-watch-netflix-in-chrome/</link>
		<comments>http://brett.batie.com/htmlcss/how-to-watch-netflix-in-chrome/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 19:03:25 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=197</guid>
		<description><![CDATA[I just recently started playing with Chrome and after a bit of investigation I think I am going to make the switch from my current browser Maxthon. One problem I noticed when using Chrome was I could no longer watch instant movies in Netflix. Now, I could do what they recommend and use Internet Explorer [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_198" class="wp-caption alignright" style="width: 160px"><a href="http://brett.batie.com/wp-content/uploads/sshot-2009-03-13-4.png"  rel="lightbox[roadtrip]"><img src="http://brett.batie.com/wp-content/uploads/sshot-2009-03-13-4-150x150.png" alt="Screenshot of netflix loading in Chrome" title="Netflix in Chrome" width="150" height="150" class="size-thumbnail wp-image-198" /></a><p class="wp-caption-text">Screenshot of Netflix loading in Chrome</p></div>I just recently started playing with <a href="http://www.google.com/chrome" alt="Google Chrome">Chrome</a> and after a bit of investigation I think I am going to make the switch from my current browser <a href="http://www.maxthon.com">Maxthon</a>. One problem I noticed when using Chrome was I could no longer watch instant movies in <a href="http://www.netflix.com">Netflix</a>. Now, I could do what they recommend and use Internet Explorer (or Maxthon) to view a movie but I&#8217;m stubborn and wanted to view it in Chrome so I found a way.</p>
<p>When Netflix loads a video it is using Microsoft Silverlight which is something that Chrome supports and gave me my first clue that there is no reason why Chrome shouldn&#8217;t be able to view a Netflix video. The solution was actually rather simple, tell Netflix that I&#8217;m not actually using Chrome but using Safari on the Mac. In order to do this you just have to add the following parameter when starting Chrome.</p>
<pre class="brush:text"> --user-agent="Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_3; en-us) AppleWebKit/525.19 (KHTML, like Gecko) Version/3.2.1 Safari/525.19"</pre>
<p><div id="attachment_201" class="wp-caption alignright" style="width: 160px"><a href="http://brett.batie.com/wp-content/uploads/sshot-2009-03-13-2.png"  rel="lightbox[roadtrip]"><img src="http://brett.batie.com/wp-content/uploads/sshot-2009-03-13-2-150x150.png" alt="Add Parameter to Google Chrome Startup" title="Google Chrome Properties" width="150" height="150" class="size-thumbnail wp-image-201" /></a><p class="wp-caption-text">Add Parameter to Google Chrome Startup</p></div>To add this parameter right click the Google Chrome shortcut and go down to <strong>Properties</strong>. Then after chrome.exe in the <strong>Target:</strong> box paste the above text (make sure you include a space after chrome.exe).</p>
<p>I also tried changing the user agent to make Chrome appear like it is Internet Explorer. After applying that change Netflix gave me a activeX not supported error (image below). Since the problem was solved with the Safari user-agent text above I wasn&#8217;t too worried about it.</p>
<p><div id="attachment_200" class="wp-caption aligncenter" style="width: 160px"><a href="http://brett.batie.com/wp-content/uploads/sshot-2009-03-13-1.png"  rel="lightbox[roadtrip]"><img src="http://brett.batie.com/wp-content/uploads/sshot-2009-03-13-1-150x150.png" alt="ActiveX is disabled" title="ActiveX is disabled" width="150" height="150" class="size-thumbnail wp-image-200" /></a><p class="wp-caption-text">ActiveX is disabled</p></div>

<p><a href="http://feedads.g.doubleclick.net/~a/gAn0iNTIaeSg9l31qekYiACALao/0/da"><img src="http://feedads.g.doubleclick.net/~a/gAn0iNTIaeSg9l31qekYiACALao/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/gAn0iNTIaeSg9l31qekYiACALao/1/da"><img src="http://feedads.g.doubleclick.net/~a/gAn0iNTIaeSg9l31qekYiACALao/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/htmlcss/how-to-watch-netflix-in-chrome/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>How to Modify a Program’s Icon</title>
		<link>http://brett.batie.com/software-development/how-to-modify-a-programs-icon/</link>
		<comments>http://brett.batie.com/software-development/how-to-modify-a-programs-icon/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 01:29:18 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=179</guid>
		<description><![CDATA[It is possible to change just about any icon that comes with an application.  There are a few different applications that will help make this job easy and my favorite is resource hacker.  The reason that I can think of that someone would want to change a programs icon are the following:

Two programs have icons [...]]]></description>
			<content:encoded><![CDATA[<p>It is possible to change just about any icon that comes with an application.  There are a few different applications that will help make this job easy and my favorite is resource hacker.  The reason that I can think of that someone would want to change a programs icon are the following:</p>
<ul>
<li>Two programs have icons that look too similar</li>
<li>The program comes with an icon that does not give a good representation of what the program does</li>
<li>To have the coolest icons on the block</li>
</ul>
<div id="attachment_180" class="wp-caption alignright" style="width: 160px"><a href="http://brett.batie.com/wp-content/uploads/sshot-2009-03-09-1.png"  rel="lightbox[roadtrip]"><img class="size-thumbnail wp-image-180" title="Resource Hacker" src="http://brett.batie.com/wp-content/uploads/sshot-2009-03-09-1-150x150.png" alt="Resource Hacker Replace Icon" width="150" height="150" /></a><p class="wp-caption-text">Resource Hacker <br /> Replace Icon</p></div>
<p>The steps to replace an icon for a program are fairly simple. Just follow the below steps to modify the icons for any of your applications.   </p>
<ol>
<li>Download <a href="http://delphi.icm.edu.pl/ftp/tools/ResHack.zip">Resource Hacker</a></li>
<li><strong>Unzip</strong> the file and <strong>run</strong> ResHacker.exe</li>
<li><strong>Open the program</strong> that contains an icon you would like to change (like C:\Program Files\Brett Batie\Excel on Multiple Monitors\runExcel.exe)</li>
<li>Click <strong>Actions→Replace Icon</strong> in the Menu Bar</li>
<li>Click the &#8220;<strong>Open file with new icon&#8230;</strong>&#8221; button</li>
<li>Select the new icon (like C:\Program Files\Microsoft Office\Office12\EXCEL.exe)</li>
<li>Click the &#8220;<strong>Replace</strong>&#8221; button</li>
<li>Click<strong> File→Save</strong> in the Menu Bar</li>
<li><strong>Close</strong> Resource Hacker All Done</li>
</ol>

<p><a href="http://feedads.g.doubleclick.net/~a/QJCvKsbYg99eWQstYHsU1HozgqE/0/da"><img src="http://feedads.g.doubleclick.net/~a/QJCvKsbYg99eWQstYHsU1HozgqE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QJCvKsbYg99eWQstYHsU1HozgqE/1/da"><img src="http://feedads.g.doubleclick.net/~a/QJCvKsbYg99eWQstYHsU1HozgqE/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/software-development/how-to-modify-a-programs-icon/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Turn off resize textarea in Chrome &amp; Safari</title>
		<link>http://brett.batie.com/htmlcss/no-resize-textarea-in-chrome-safari/</link>
		<comments>http://brett.batie.com/htmlcss/no-resize-textarea-in-chrome-safari/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 17:35:13 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=170</guid>
		<description><![CDATA[There is a new feature in both Safari and Chrome that allows a textarea to be resized by the user. In both browsers the feature is seen by a little icon that is in the bottom right corner of the textarea. This feature gives the user the ability to choose how much space they need [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_153" class="wp-caption alignright" style="width: 107px"><a href="http://None"><img src="http://brett.batie.com/wp-content/uploads/textarea-chrome.png"  alt="Chrome Textarea" title="textarea-chrome" width="97" height="90" class="size-full wp-image-153" / rel="lightbox[roadtrip]"></a><p class="wp-caption-text">Chrome Textarea</p></div>
<p>There is a new feature in both Safari and Chrome that allows a textarea to be resized by the user. In both browsers the feature is seen by a little icon that is in the bottom right corner of the textarea. This feature gives the user the ability to choose how much space they need for whatever it is they are writing.</p>
<p>For some websites this new feature may not be desired as resizing the textarea could break the layout of the website. I can think of a few ways to prevent the layout from breaking.</p>
<ol>
<li>Design the page with a liquid layout</li>
<li>Turn off the users ability to resize the textarea</li>
<li>Give the textarea a max size</li>
</ol>
<p><P>Redesigning the site with a liquid layout can be a lot of work and may not be optimal for the look &#038; feel for the site. Many designers prefer to lock the site at a certain width to guarantee that everyone will see a website that looks exactly the same.</p>
<p>It is very easy to turn off the users ability to resize the textarea. Turning this feature off may be necessary due to the design of certain sites or to make it harder for the user to write a 100 page document in a small comment box. The following CSS can be used to remove the users ability to resize the textarea:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">textarea<span style="color: #00AA00;">&#123;</span>resize<span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Place that code in your css file to remove the users ability to resize any textarea on the site. You could also remove it from 1 textarea on a page with inline css.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;myTextarea&quot;</span> <span style="color: #000066;">rows</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">cols</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;resize: none;&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;</span></pre></div></div>

<p>The third option of giving the textarea a max size has a similar solution of using css. The two properties that can be used are max-width and max-height. This will give the user the ability to resize the textarea but limit them to a certain max size. The css would look something like the following.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">textarea<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">max-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Of course you may only want to use one of the above properties to allow the user to grow the height to any size but not resize the width or vice versa.</p>
<p>An example of a site that could use one of the above steps is whitehouse.gov. There are two screen shots below that show the before and after of the user resizing the textarea.</p>
<p>Browsers giving the user the ability to resize a textarea is a great feature but it creates one more item that designers and developers need to be aware of when adding a textarea to a page.</p>
<p><div id="attachment_171" class="wp-caption alignleft" style="width: 310px"><a href="http://brett.batie.com/wp-content/uploads/sshot-2009-02-23-2.png"  rel="lightbox[roadtrip]"><img src="http://brett.batie.com/wp-content/uploads/sshot-2009-02-23-2-300x198.png" alt="Before" title="whitehouse textarea normal size" width="300" height="198" class="size-medium wp-image-171" /></a><p class="wp-caption-text">Before</p></div>[caption id="attachment_173" align="alignleft" width="300" caption="After"]<a href="http://brett.batie.com/wp-content/uploads/sshot-2009-02-23-31.png"  rel="lightbox[roadtrip]"><img src="http://brett.batie.com/wp-content/uploads/sshot-2009-02-23-31-300x200.png" alt="After" title="whitehouse textarea resized" width="300" height="200" class="size-medium wp-image-173" /></a>[/caption]

<p><a href="http://feedads.g.doubleclick.net/~a/dDQ3BUx3Btfx4CX-rC5qrRN7fAA/0/da"><img src="http://feedads.g.doubleclick.net/~a/dDQ3BUx3Btfx4CX-rC5qrRN7fAA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/dDQ3BUx3Btfx4CX-rC5qrRN7fAA/1/da"><img src="http://feedads.g.doubleclick.net/~a/dDQ3BUx3Btfx4CX-rC5qrRN7fAA/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/htmlcss/no-resize-textarea-in-chrome-safari/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Dynamically Resize a Textarea</title>
		<link>http://brett.batie.com/htmlcss/dynamically-resize-a-textarea/</link>
		<comments>http://brett.batie.com/htmlcss/dynamically-resize-a-textarea/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 19:01:52 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=149</guid>
		<description><![CDATA[The other day I was looking for a solution to allow a user to dynamically resize a textbox. I first saw this feature in wordpress and wanted something similar for a site I was designing. Since wordpress is open source I had considered looking at their code to figure out how it was done. After [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was looking for a solution to allow a user to dynamically resize a textbox. I first saw this feature in wordpress and wanted something similar for a site I was designing. Since wordpress is open source I had considered looking at their code to figure out how it was done. After searching google for a few minutes I came across <a title="Resize a Textbox" href="http://www.switchonthecode.com/tutorials/javascript-controls-resizeable-textbox-part-tres" target="_blank">a site</a> that had put together some functions to make the job of implementing this feature very easy.</p>
<p>When the textbox is displayed on a site it looks like the following:</p>
<link rel="stylesheet" href="/include/resize-textbox/style.css" type="text/css" media="screen" />
<script src="/include/resize-textbox/resize-textbox.js" type="text/javascript"></script></p>
<div id="rtContainer" style="border: 1px solid black; width: 480px; height: 250px;"><script type="text/javascript"><!--
var rt = new ResizeableTextbox('myRT');
rt.SetText("Dynamically resize this textarea");
rt.SetMaxWidth(470);
rt.SetMaxHeight(235);
// --></script></div>
<p>In order to place the texbox on your site you just need to download <a title="Resize a Textbox" href="http://www.switchonthecode.com/tutorials/javascript-controls-resizeable-textbox-part-tres" target="_blank">the source code</a> and put something like the following on a webpage.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/include/resize-textbox/style.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/include/resize-textbox/resize-textbox.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;rtContainer&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;border: 1px solid black; width: 480px; height: 250px;&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
    <span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">    var rt = new ResizeableTextbox('myRT');</span>
<span style="color: #808080; font-style: italic;">    rt.SetText(&quot;I Am Some Text&quot;);</span>
<span style="color: #808080; font-style: italic;">    // --&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Doesn&#8217;t get much easier!</p>
<p>Now to critique the code a little. I wish the javascript functions were encapsulated in a class so I would not have to worry that another function might conflict with the functions for resizing the textarea. This is a fairly easy feature to add so it does not bother me to much.</p>
<p><div id="attachment_153" class="wp-caption alignright" style="width: 107px"><img src="http://brett.batie.com/wp-content/uploads/textarea-chrome.png" alt="Chrome Textarea" title="textarea-chrome" width="97" height="90" class="size-full wp-image-153" /><p class="wp-caption-text">Chrome Textarea</p></div>In testing this code I found out that both <a href="http://www.google.com/chrome">Chrome</a> (Google&#8217;s browser) and <a href="http://www.apple.com/safari/">Safari</a> already have the ability to dynamically resize a textarea built into the browser. Both browser&#8217;s implemented the feature by adding a little icon in the bottom right of the textarea. This is a nice feature and hopefully the other browsers will also add this feature to their future versions.</p>
<p>Now, if you are implementing the code on this page to give all browsers the ability to dynamically resize the textarea. You may want to disable the built in resize feature of both Chrome and Safari. This can easily be done with the following css.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#myRT</span><span style="color: #00AA00;">&#123;</span>resize<span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>


<p><a href="http://feedads.g.doubleclick.net/~a/BWLdo93XWwKPlub23r2ti8Tr65g/0/da"><img src="http://feedads.g.doubleclick.net/~a/BWLdo93XWwKPlub23r2ti8Tr65g/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BWLdo93XWwKPlub23r2ti8Tr65g/1/da"><img src="http://feedads.g.doubleclick.net/~a/BWLdo93XWwKPlub23r2ti8Tr65g/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/htmlcss/dynamically-resize-a-textarea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Water Bottle for Computer Geeks</title>
		<link>http://brett.batie.com/reviews/best-water-bottle-for-computer-geeks/</link>
		<comments>http://brett.batie.com/reviews/best-water-bottle-for-computer-geeks/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 16:52:45 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=133</guid>
		<description><![CDATA[Everyone will probably laugh at me for this one but I just have to say it. I have found the ultimate water bottle to have at my desk. There is always the standard coffee mug and I have seen other engineers use these. The problem with the mug is it is too small. When I [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_135" class="wp-caption alignright" style="width: 118px"><img class="size-medium wp-image-135  " title="11-oz-coated-mug" src="http://brett.batie.com/wp-content/uploads/11-oz-coated-mug-300x300.jpg" alt="Standard Mug" width="108" height="108" /><p class="wp-caption-text">Standard Mug</p></div>
<p>Everyone will probably laugh at me for this one but I just have to say it. I have found the ultimate water bottle to have at my desk. There is always the standard coffee mug and I have seen other engineers use these. The problem with the mug is it is too small. When I am writting code I don&#8217;t like to stop to get more water and will often forget about the water because I&#8217;m more focused on the programming than anything else.</p>
<p>My prefered water container needs to hold a good amount of water since I should be drinking somewhere around 10 cups of water a day. Most water bottles contain around half of that amount which means only one (maybe two) trip to refill per day.  This makes a water bottle a good solution to have near the computer.</p>
<p>Now the problem with most water bottles is that they are easy to spill. Some have caps that you unscrew and then drink the water. As soon as I unscrew the cap there is a high chance that I won&#8217;t bother to put the cap back on. When developing software I am often shuffling books, papers, pens on my desk. With all of the shuffling my chance of nocking over the water bottle is pretty good. Considering I have a fairly expensive computer under my desk that would be a very bad thing! I just need to find a water bottle that is easy to use and won&#8217;t spill.</p>
<div style="float: left;"><a href="http://www.amazon.com/gp/product/B0019DCD7U?ie=UTF8&amp;tag=claswebdeve-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0019DCD7U"><img src="http://brett.batie.com/wp-content/uploads/31sjb3-2ggl__sl160_.jpg"  border="0" alt="" / rel="lightbox[roadtrip]"></a><img style="text-align: left; border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=claswebdeve-20&amp;l=as2&amp;o=1&amp;a=B0019DCD7U" border="0" alt="" width="1" height="1" /></div>
<p>After a bit of searching I found the perfect water bottle to have at my desk it is called a <a href="http://www.amazon.com/gp/product/B0019DCD7U?ie=UTF8&amp;tag=claswebdeve-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0019DCD7U">CAMELBAK</a>.<img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=claswebdeve-20&amp;l=as2&amp;o=1&amp;a=B0019DCD7U" border="0" alt="" width="1" height="1" /> This water bottle has a great design. You can drink from it and no longer worry about spilling water on your important documents, books, or computer equipment. You can hold it upside down and no water comes out. Then when you want to drink from it you bite the nipple and suck (was there a better way to say that?). The bottle comes in different sizes ranging from .5 Liter to 1 Liter and a wide variety of colors. I bought the black 1 Liter and have been very happy with it.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/3tqbDOx0Uvoo55i29x5s5DHrWz0/0/da"><img src="http://feedads.g.doubleclick.net/~a/3tqbDOx0Uvoo55i29x5s5DHrWz0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/3tqbDOx0Uvoo55i29x5s5DHrWz0/1/da"><img src="http://feedads.g.doubleclick.net/~a/3tqbDOx0Uvoo55i29x5s5DHrWz0/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/reviews/best-water-bottle-for-computer-geeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Excel in Multiple Windows</title>
		<link>http://brett.batie.com/microsoft/open-excel-in-multiple-windows/</link>
		<comments>http://brett.batie.com/microsoft/open-excel-in-multiple-windows/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 20:08:39 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=121</guid>
		<description><![CDATA[In my previous post I mentioned that there was a way to create a bat file to force Excel to open each file in a new window. Opening Excel in multiple windows makes it easier to use Excel across multiple monitors and gives back the standard alt+tab to flip between Excel Spreadsheets. The problem with [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post I mentioned that there was a way to create a bat file to <a href="/dosshell/open-excel-in-two-windows-excel-2007-vista/">force Excel to open each file in a new window</a>. Opening Excel in multiple windows makes it easier to use Excel across multiple monitors and gives back the standard alt+tab to flip between Excel Spreadsheets. The problem with my previous solution was that the Excel files loose their icons. Unfortunately because the solution uses a bat file the icon cannot be changed. So I took the previous solution and enhanced it a little bit.</p>
<div id="attachment_124" class="wp-caption alignright" style="width: 138px"><img class="size-full wp-image-124" title="OpenOffice Icon" src="http://brett.batie.com/wp-content/uploads/galaxy_ooo3_calc-app_128.png" alt="OpenOffice Icon" width="128" height="128" /><p class="wp-caption-text">OpenOffice Icon</p></div>
<p>This solution uses the same principle but installs a program instead of using a bat file. This program has an icon so all the associated Excel files will also use that icon. I was originally hoping to use the Microsoft Icon for this program but after looking at their <a title="Icon Terms of Use" href="http://www.microsoft.com/about/legal/permissions/default.mspx#EDE" target="_blank">Terms of Use</a> a decided to use the Open Office Icon.</p>
<p>Without further ado the directions to get Excel running on multiple monitors is below:</p>
<p><strong>1. Download the following file and run the installer.</strong></p>
<a href=http://brett.batie.com/download/Install_runExcel.msi><img src=http://brett.batie.com/wp-content/plugins/download-monitor/img/downloads-icon.gif style="vertical-align: middle;">DOWNLOAD: Open Excel in Multiple Windows</a>
<div class="caption">
If you cannot install this application because you need admin privileges you can download the following file. Then follow the directions below and make sure you browse to the location of where you stored this download (in the 2nd step).<br />
<a href=http://brett.batie.com/download/run-excel-standalone.zip><img src=http://brett.batie.com/wp-content/plugins/download-monitor/img/downloads-icon.gif style="vertical-align: middle;">DOWNLOAD: Standalone - Open Excel in Multiple Windows</a>
</div>
<p><strong>2. Update the file association for each Excel File.</strong></p>
<p>Right click the excel file and select “Open With…” and then in the window that opens click “Browse…”</p>
<p style="text-align: center;"><a href="http://brett.batie.com/wp-content/uploads/open-with.png"  rel="lightbox[roadtrip]"><img class="size-medium wp-image-88 aligncenter" title="open-with" src="http://brett.batie.com/wp-content/uploads/open-with-300x247.png" alt="Open With" width="300" height="247" /></a></p>
<p>Then select the program that you just installed. By default it will be installed at C:Program FilesBrett BatieExcel on Multiple MonitorsrunExcel.exe. Make sure that “Always use the selected program to open this kind of file” is checked in the “Open With” dialog.</p>
<p>Now anytime you open an Excel file it will open a new copy of Excel.</p>
<p><strong>changelog:</strong><br />
<code><br />
1.1 - Fixed a problem where filenames with spaces would not open.<br />
</code></p>

<p><a href="http://feedads.g.doubleclick.net/~a/0P0Q7Oh2AmMSWCX0SnegVNR8sBo/0/da"><img src="http://feedads.g.doubleclick.net/~a/0P0Q7Oh2AmMSWCX0SnegVNR8sBo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0P0Q7Oh2AmMSWCX0SnegVNR8sBo/1/da"><img src="http://feedads.g.doubleclick.net/~a/0P0Q7Oh2AmMSWCX0SnegVNR8sBo/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/microsoft/open-excel-in-multiple-windows/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Selecting Overflowing Text in IE</title>
		<link>http://brett.batie.com/htmlcss/selecting-overflowing-text-in-ie/</link>
		<comments>http://brett.batie.com/htmlcss/selecting-overflowing-text-in-ie/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 17:54:57 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=98</guid>
		<description><![CDATA[I noticed a problem with how IE supports overflowing text today. The problem is that the text can not be easily selected (with a mouse) when using overflow: auto; and white-space: nowrap. Here is an example to demonstrate this problem.
This text is not easy to select in IE because it will not automatically scroll to [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed a problem with how IE supports overflowing text today. The problem is that the text can not be easily selected (with a mouse) when using overflow: auto; and white-space: nowrap. Here is an example to demonstrate this problem.</p>
<pre style="border: 1px solid black; overflow: auto; width: 250px; white-space: nowrap; height: 40px;">This text is not easy to select in IE because it will not automatically scroll to the right when the user is selecting it</pre>
<p>The HTML for this example is below:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">pre</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;border: 1px solid black; overflow: auto; width: 250px; white-space: nowrap; height: 40px;&quot;</span>&gt;</span>;This text is not easy to select in IE because it will not automatically scroll to the right when the user is selecting it<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">pre</span> &gt;</span></pre></div></div>

<p>I was able to solve this problem by changing overflow: auto; to overflow: scroll; as can be seen below.</p>
<pre style="border: 1px solid black; overflow: scroll; width: 250px; white-space: nowrap; height: 40px;">This text is not easy to select in IE because it will not automatically scroll to the right when the user is selecting it</pre>
<p>The HTML for this example is below:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">pre</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;border: 1px solid black; overflow: scroll; width: 250px; white-space: nowrap; height: 40px;&quot;</span>&gt;</span>;This text IS easy to select in IE because it will not automatically scroll to the right when the user is selecting it<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">pre</span> &gt;</span></pre></div></div>

<p>I do not love this solution as it will always show the scroll bars even when they are not needed. Until someone finds a better solution or IE handles this better I will have to put up with it.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/WpmMHqZJUGA2sQ3FHSzrNyat-Zc/0/da"><img src="http://feedads.g.doubleclick.net/~a/WpmMHqZJUGA2sQ3FHSzrNyat-Zc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/WpmMHqZJUGA2sQ3FHSzrNyat-Zc/1/da"><img src="http://feedads.g.doubleclick.net/~a/WpmMHqZJUGA2sQ3FHSzrNyat-Zc/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/htmlcss/selecting-overflowing-text-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Excel in Two Windows (Microsoft Excel 2007 / Windows Vista)</title>
		<link>http://brett.batie.com/dosshell/open-excel-in-two-windows-excel-2007-vista/</link>
		<comments>http://brett.batie.com/dosshell/open-excel-in-two-windows-excel-2007-vista/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 21:12:49 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[DOS/Shell]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://brett.batie.com/?p=85</guid>
		<description><![CDATA[There is a flaw with the below solution it causes the associated Excel files to loose their icons. I posted a follow-up article for opening Excel in Multiple Windows that provides the same solution while associating a new icon with the Excel Files.
When you open an Excel file in Windows Vista, it will only open [...]]]></description>
			<content:encoded><![CDATA[<div class="caption">There is a flaw with the below solution it causes the associated Excel files to loose their icons. I posted a follow-up article for <a href="/microsoft/open-excel-in-multiple-windows/">opening Excel in Multiple Windows</a> that provides the same solution while associating a new icon with the Excel Files.</div>
<p>When you open an Excel file in Windows Vista, it will only open 1 instance of Excel and force you to tile the windows in order to see both at the same time. I find this annoying especially when I want the Excel files to display on multiple monitors.</p>
<p>I looked around for some solutions and found the following:</p>
<ul>
<li><a title="Open Excel twice" href="http://www.pcmag.com/article2/0,2817,1847177,00.asp" target="_blank">Open Excel two times from the start menu.</a></li>
<li><a title="Turn off DDE" href="http://www.drewery.net/blog/2006/08/29/utilising-dual-monitors-with-microsoft-excel-2003/">Turn off DDE and modify shortcut</a> (I couldn&#8217;t get this to work on Windows Vista)</li>
</ul>
<p>I didn&#8217;t like using the start menu option as I like to use Windows Explorer to open my Excel files and I couldn&#8217;t get the DDE option to work. So, I took a minute and developed my own fairly simple solution.</p>
<p>1. Put the following line of text in a bat file and save it at as c:\Program Files\runExcel.bat</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">start &quot;Excel&quot; &quot;c:\Program Files\Microsoft Office\Office12\EXCEL.EXE&quot; /e <span style="color: #33cc33;">%</span><span style="color: #448888;">1</span></pre></div></div>

<p><!-- adman --></p>
<p>2. Modify the shortcut for the .xls extension</p>
<p>Right click the excel file and select &#8220;Open With&#8230;&#8221; and then in the window that opens click &#8220;Browse&#8230;&#8221;</p>
<p style="text-align: center;"><a href="http://brett.batie.com/wp-content/uploads/open-with.png"  rel="lightbox[roadtrip]"><img class="size-medium wp-image-88 aligncenter" title="open-with" src="http://brett.batie.com/wp-content/uploads/open-with-300x247.png" alt="Open With" width="300" height="247" /></a></p>
<p>Then select the bat file you created in the first step by browsing to c:\program files and selecting runExcel.bat. Make sure that &#8220;Always use the selected program to open this kind of file&#8221; is checked in the &#8220;Open With&#8221; dialog.</p>
<p>Now anytime you double click on an Excel file it will always open it in a new window &#8211; the way I think it should be.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/h9M-Q-8UrnrzDz2x0-wi_ScVc1c/0/da"><img src="http://feedads.g.doubleclick.net/~a/h9M-Q-8UrnrzDz2x0-wi_ScVc1c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/h9M-Q-8UrnrzDz2x0-wi_ScVc1c/1/da"><img src="http://feedads.g.doubleclick.net/~a/h9M-Q-8UrnrzDz2x0-wi_ScVc1c/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://brett.batie.com/dosshell/open-excel-in-two-windows-excel-2007-vista/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
