<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Justin Stolle</title>
	<atom:link href="http://blog.justinstolle.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.justinstolle.com</link>
	<description>Programming, Life, and Humor</description>
	<lastBuildDate>Wed, 16 May 2012 22:14:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Click &#8220;Close&#8221; to Acknowledge</title>
		<link>http://blog.justinstolle.com/click-close-to-acknowledge/</link>
		<comments>http://blog.justinstolle.com/click-close-to-acknowledge/#comments</comments>
		<pubDate>Wed, 16 May 2012 22:13:53 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Observations]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=217</guid>
		<description><![CDATA[I&#8217;m not sure if this deserves to be complained about publicly, but it seems pretty strange to me that closing a dialog box equates to acknowledging receipt of [..]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.justinstolle.com/wp-content/uploads/2012/05/close-to-ack.png"><img src="http://blog.justinstolle.com/wp-content/uploads/2012/05/close-to-ack-300x181.png" alt="" title="close-to-ack" width="300" height="181" class="alignleft size-medium wp-image-218" /></a>I&#8217;m not sure if this deserves to be complained about publicly, but it seems pretty strange to me that closing a dialog box equates to acknowledging receipt of the Quicken privacy notice&#8211;and annoying when it is a modal dialog that appears when you start the program. How many will stop to read the notice when one just wants to open the books and complete a quick task? Would it be better if there was a &#8220;Confirm&#8221; and &#8220;Deny&#8221; button? I&#8217;m not sure, but this appears to say, &#8220;We know you&#8217;re not going to read it, but here&#8217;s the very minimum we can do to let you know it exists, and until you click Close, you won&#8217;t be able to do anything anyway.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/click-close-to-acknowledge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Better SelectList for ASP.Net MVC</title>
		<link>http://blog.justinstolle.com/a-better-selectlist-for-asp-net-mvc/</link>
		<comments>http://blog.justinstolle.com/a-better-selectlist-for-asp-net-mvc/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 09:30:27 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET-MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=199</guid>
		<description><![CDATA[The following is a more complete version of the code I posted as an answer to a Stack Overflow question. The purpose is to provide a strongly-typed method [..]]]></description>
			<content:encoded><![CDATA[<p>The following is a more complete version of the code I posted as an <a href="http://stackoverflow.com/a/5189036/92389" title="How can I get this ASP.NET MVC SelectList to work?">answer to a Stack Overflow question</a>. The purpose is to provide a strongly-typed method for creating a <code>SelectList</code>. If you work with ASP.NET MVC, you will have encountered these. This version of the code has more overloads to make it that much easier to set selected values, which is especially handy when using a multiple-selection drop-down box. You can specify a boolean to make all options selected or not, or pass a single value (string or int) or an array of values that correspond to the items you want selected.<br />
<span id="more-199"></span><br />
The benefit of making it strongly-typed is that you&#8217;ll catch errors at design-time that would have otherwise occurred at run-time. To create a <code>SelectList</code> previously required passing string values representing property names that could be incorrect or misspelled, which goes unnoticed by the compiler. An error would not occur until a user tried to view your page.</p>
<p>The complete <code>ToSelectList</code> method listings follow the usage examples because it is quite lengthy.</p>
<p><strong>Usage example in a controller action:</strong></p>
<pre class="brush: csharp; title: ; notranslate">
var myCompanies = new[] { &quot;ABC&quot;, &quot;XYZ&quot; };
ViewBag.CompanyList = db.Companies.ToSelectList(j =&gt; j.CompanyCode, j =&gt; j.CompanyName, myCompanies /*selectedValues*/);
ViewBag.JobList = db.Jobs.ToSelectList(j =&gt; j.JobCode, j =&gt; j.JobDesc, true /*selectAll*/);
</pre>
<p><strong>And subsequent usage in a view (razor syntax):</strong></p>
<pre class="brush: csharp; title: ; notranslate">
@Html.DropDownList(&quot;companies&quot;, ViewBag.CompanyList as IEnumerable&lt;SelectListItem&gt;, null, new { multiple = &quot;multiple&quot;, size = &quot;5&quot; })
@Html.DropDownList(&quot;jobs&quot;, ViewBag.JobList as IEnumerable&lt;SelectListItem&gt;, null, new { multiple = &quot;multiple&quot;, size = &quot;10&quot; })
</pre>
<p>This would result in two select elements allowing multiple selections. The first, Companies, would have companies with CompanyCodes &#8220;ABC&#8221; and &#8220;XYZ&#8221; selected. (If companies don&#8217;t exist for one or more of the given values, it is simply skipped and no error is thrown&#8211;a good thing.) The second, Jobs, would initially have all of the values in the list selected since we passed <code>true</code> for the <code>selectAll</code> parameter.</p>
<p><strong>ToSelectList.cs</strong> <em>with inline documentation for each overloaded method.</em></p>
<pre class="brush: csharp; title: ; notranslate">using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

public static partial class Helpers {

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value) {
    return enumerable.ToSelectList(value, value, false);
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValue&quot;&gt;The selected value.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, int selectedValue) {
    return enumerable.ToSelectList(value, value, new string[] { selectedValue.ToString() }.ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValue&quot;&gt;The selected value.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, string selectedValue) {
    return enumerable.ToSelectList(value, value, new string[] { selectedValue }.ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, int[] selectedValues) {
    if (selectedValues == null) {
      throw new ArgumentNullException(&quot;selectedValues&quot;);
    }
    return enumerable.ToSelectList(value, value, selectedValues.ToList().ConvertAll&lt;string&gt;(i =&gt; i.ToString()));
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, IList&lt;int&gt; selectedValues) {
    return enumerable.ToSelectList(value, value, selectedValues.Cast&lt;string&gt;().ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, string[] selectedValues) {
    return enumerable.ToSelectList(value, value, selectedValues.ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, IList&lt;string&gt; selectedValues) {
    return enumerable.ToSelectList(value, value, selectedValues);
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and the data text field.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text) {
    return enumerable.ToSelectList(value, text, false);
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field, the data text field, and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValue&quot;&gt;The selected value.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text, int selectedValue) {
    return enumerable.ToSelectList(value, text, new string[] { selectedValue.ToString() }.ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field, the data text field, and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValue&quot;&gt;The selected value.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text, string selectedValue) {
    return enumerable.ToSelectList(value, text, new string[] { selectedValue }.ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field, the data text field, and the selected values.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text, int[] selectedValues) {
    if (selectedValues == null) {
      throw new ArgumentNullException(&quot;selectedValues&quot;);
    }
    return enumerable.ToSelectList(value, text, selectedValues.ToList().ConvertAll&lt;string&gt;(i =&gt; i.ToString()));
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field, the data text field, and the selected values.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text, IList&lt;int&gt; selectedValues) {
    return enumerable.ToSelectList(value, text, selectedValues.Cast&lt;string&gt;().ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field, the data text field, and the selected values.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text, string[] selectedValues) {
    if (selectedValues == null) {
      throw new ArgumentNullException(&quot;selectedValues&quot;);
    }
    return enumerable.ToSelectList(value, text, selectedValues.ToList());
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field, the data text field, and the selected values.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  /// &lt;param name=&quot;selectedValues&quot;&gt;The selected values.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text, IList&lt;string&gt; selectedValues) {
    foreach (var f in enumerable) {
      yield return new SelectListItem() {
        Value = value(f),
        Text = text(f),
        Selected = selectedValues.Contains(value(f))
      };
    }
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field and a selected value.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;selectAll&quot;&gt;Whether all values are selected.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, bool selectAll) {
    return enumerable.ToSelectList(value, value, selectAll);
  }

  /// &lt;summary&gt;
  /// Returns an IEnumerable&amp;lt;SelectListItem&amp;gt; by using the specified checkboxes for data value field, the data text field, and the selected values.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;enumerable&quot;&gt;The checkboxes.&lt;/param&gt;
  /// &lt;param name=&quot;value&quot;&gt;The data value field.&lt;/param&gt;
  /// &lt;param name=&quot;text&quot;&gt;The data text field.&lt;/param&gt;
  /// &lt;param name=&quot;selectAll&quot;&gt;Whether all values are selected.&lt;/param&gt;
  public static IEnumerable&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(this IEnumerable&lt;T&gt; enumerable, Func&lt;T, string&gt; value, Func&lt;T, string&gt; text, bool selectAll) {
    foreach (var f in enumerable) {
      yield return new SelectListItem() {
        Value = value(f),
        Text = text(f),
        Selected = selectAll
      };
    }
  }

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/a-better-selectlist-for-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password limits. Why?</title>
		<link>http://blog.justinstolle.com/password-limits-why/</link>
		<comments>http://blog.justinstolle.com/password-limits-why/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 00:51:29 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Observations]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=177</guid>
		<description><![CDATA[I was creating an account for a web site today and hit this error: Seriously? Why is there a limit to the password length? If I want a [..]]]></description>
			<content:encoded><![CDATA[<p>I was creating an account for a web site today and hit this error:</p>
<p><a href="http://blog.justinstolle.com/wp-content/uploads/2011/03/lame-password-limit.png"><img class="alignnone size-medium wp-image-178" title="Lame Password Limit" src="http://blog.justinstolle.com/wp-content/uploads/2011/03/lame-password-limit-300x74.png" alt="" width="300" height="74" /></a></p>
<p>Seriously? Why is there a limit to the password length? If I want a complex and impossible-to-guess password, I should have that right. I know that it&#8217;s not going to burden your database to allow more characters, because you should be storing it as a hash anyway!!  Please get a grip and don&#8217;t put some arbitrary limit on data fields like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/password-limits-why/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Science Genius Girl</title>
		<link>http://blog.justinstolle.com/science-genius-girl/</link>
		<comments>http://blog.justinstolle.com/science-genius-girl/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 08:41:25 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Entertainment]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=173</guid>
		<description><![CDATA[I learned of the band Freezepop through the Rock Band games. I love their lyrics, mixing brainy terminology with humorous situations. The song &#8220;Science Genius Girl&#8221; popped up [..]]]></description>
			<content:encoded><![CDATA[<p>I learned of the band Freezepop through the Rock Band games. I love their lyrics, mixing brainy terminology with humorous situations. The song &#8220;Science Genius Girl&#8221; popped up on my iPod recently and I wanted to post the lyrics here because they&#8217;re very catchy. If any song should be used to encourage more women to join the scientific fields, it may as well be this one.</p>
<p><span id="more-173"></span><br />
<strong>&#8220;Science Genius Girl&#8221; by Freezepop</strong></p>
<p>I&#8217;m a science genius girl<br />
I won the science fair<br />
I wear a white lab coat<br />
DNA strands in my hair</p>
<p>When I clone a human being<br />
It will want to hold my hand<br />
When I clone a human being<br />
It will be a member of my band<br />
It will be a member of my band<br />
It will be a member of my band</p>
<p>Scientific method girl<br />
The theorems speak to me<br />
Microscope is in my hand<br />
x1, x2, x3</p>
<p>When I clone a human being<br />
It will want to hold my hand<br />
When I clone a human being<br />
It will be a member of my band<br />
It will be a member of my band<br />
It will be a member of my band</p>
<p>Measure out the chemicals<br />
Safety goggles on my eyes<br />
Turn the Bunsen burner on<br />
My creation comes alive</p>
<p>I have cloned a human being<br />
It is here and holds my hand<br />
I have cloned a human being<br />
It is now a member of my band<br />
It is now a member of my band<br />
It is now a member of my band</p>
<p>I have cloned a human being<br />
It is here and holds my hand<br />
I have cloned a human being<br />
It is now a member of my band</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/science-genius-girl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Laptop Waking Itself Up</title>
		<link>http://blog.justinstolle.com/laptop-waking-itself-up/</link>
		<comments>http://blog.justinstolle.com/laptop-waking-itself-up/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 22:32:41 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Observations]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[e6400]]></category>
		<category><![CDATA[hibernation]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=148</guid>
		<description><![CDATA[I&#8217;ve been using a Dell Latitude E6400 laptop for work recently. Each night, I typically hibernate my laptop so the next day I can resume where I&#8217;ve left [..]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using a <strong>Dell Latitude E6400</strong> laptop for work recently. Each night, I typically <a href="http://en.wikipedia.org/wiki/Hibernation_(computing)"><strong>hibernate</strong></a> my laptop so the next day I can resume where I&#8217;ve left off, avoiding the whole shutdown and subsequent power-on sequence. It has served me well in the past. However, lately I&#8217;ve found my laptop sometimes powered on in the morning and sitting at the unlock dialog as if I had pressed the power button to wake it up. <em>Strange, right?</em><span id="more-148"></span></p>
<p>I know about <a href="http://en.wikipedia.org/wiki/Wake-on-LAN">Wake-on-LAN</a>, but all of those types of settings in my <a href="http://en.wikipedia.org/wiki/BIOS">BIOS</a> are disabled, and surely I would have to intentionally have a device trying to wake the thing up even if those settings were enabled. So I did some searching. <a href="http://en.community.dell.com/support-forums/laptop/f/3518/t/19266900.aspx">Some people had complained</a> about a version of the BIOS causing the problem, specifically noticing that at midnight the laptop would turn itself back on. While my BIOS version was much newer than the one to which they referred, my problem wasn&#8217;t exactly the same, because it didn&#8217;t necessarily happen every night and it did sometimes happen during the day if I were to hibernate it in the afternoon.</p>
<p>More searching found <a href="http://www.geekyramblings.net/2009/07/25/wake-on-lan/">this post</a> which reveals the more likely culprit to be the settings on the Intel network adapter.</p>
<p><a href="http://blog.justinstolle.com/wp-content/uploads/2010/06/Intel_82567LM_Power_Management.png"><img class="size-medium wp-image-149 alignleft" style="margin: 0pt 10px 10px 0pt; border: 0pt none;" title="Intel(R) 82567LM Power Management Properties" src="http://blog.justinstolle.com/wp-content/uploads/2010/06/Intel_82567LM_Power_Management-256x300.png" alt="" width="256" height="300" /></a>Seen here, there are additional <strong>Wake-on-LAN</strong> settings in the Power Management tab (turned on by default?) of my network adapter&#8217;s device properties.  I don&#8217;t know how specific this is to my particular model of laptop, but if your machine also has an Intel 82567LM network adapter, this probably is relevant to you.</p>
<p>To get to it, go to <strong>Control Panel → System</strong><strong> → Hardware tab </strong><strong> → Device Manager button</strong><strong> → Network Adapters </strong><strong> → </strong><strong>Intel(R) 82567LM Gigabit Network Connection</strong>. You can see the familiar-sounding options, including &#8220;Wake on Directed Packet&#8221;.</p>
<blockquote><p><strong>Wake on Directed Packet</strong></p>
<p>Enables this device to bring the computer out of standby or hibernation when  a packet is sent directly to the adapter.</p>
<p>For example, any attempt to remotely access files stored on the computer will  wake it.</p></blockquote>
<p>I imagine this could mean any networked device, like a <strong>TiVo</strong>, scanning the local area network would trigger the laptop to turn back on. I don&#8217;t anticipate using this feature, so I definitely don&#8217;t want it turned on.  I <strong>turned off the three options</strong> there that also includes the &#8220;Wake on Magic Packet&#8221; options. I expect this to fix my automatic wake up problem and will know tomorrow if I need to revise my findings.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/laptop-waking-itself-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL: Turn a Date Range into a List of Dates</title>
		<link>http://blog.justinstolle.com/sql-turn-a-date-range-into-a-list-of-dates/</link>
		<comments>http://blog.justinstolle.com/sql-turn-a-date-range-into-a-list-of-dates/#comments</comments>
		<pubDate>Wed, 26 May 2010 01:14:24 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cte]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=128</guid>
		<description><![CDATA[I&#8217;m working on a project today that deals with date ranges being stored in SQL Server. Imagine a row in a table with a starting and an ending [..]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a project today that deals with date ranges being stored in SQL Server. Imagine a row in a table with a starting and an ending date. My desired output is to transform each single row into several, one for each date within the given date range.<br />
<span id="more-128"></span><br />
Since I couldn&#8217;t find an example exactly like what I needed, I felt I should share what I came up with. I&#8217;ll let the code speak for itself. It uses a recursive Common Table Expression (CTE).</p>
<p>The caveats are: you have to run this on <strong>SQL Server 2005</strong> or newer to use the <code>WITH</code> keyword, and if any individual date range is <strong>more than 100</strong> days, you&#8217;ll get an error by default [you can use <code>OPTION (MAXRECURSION value)</code> to increase that limit]. <strong>UPDATE:</strong> I&#8217;ve added a <code>WHERE</code> clause to prevent the error related to the default recursion limit. This change will leave out date ranges larger than 100 days, which is fine for me because anything larger than two weeks would be a data entry error in my situation.</p>
<pre class="brush: sql; title: ; notranslate">DECLARE @dateranges TABLE (range_id VARCHAR(2), date_begin DATETIME, date_end DATETIME)
INSERT @dateranges SELECT 'A', '2010-01-01', '2010-01-03'
INSERT @dateranges SELECT 'B', '2008-02-27', '2008-03-01'
INSERT @dateranges SELECT 'C', '2010-04-26', '2010-04-26'
INSERT @dateranges SELECT 'D', '2000-02-01', '2003-02-20'

;WITH cte (id, d)
     AS (SELECT tbl.range_id AS id
                ,tbl.date_begin AS d
           FROM @dateranges tbl
          WHERE DATEDIFF(DAY, tbl.date_begin, tbl.date_end) &lt;= 100
         UNION ALL
         SELECT tbl.range_id AS id
                ,DATEADD(DAY, 1, cte.d) AS d
           FROM cte
                INNER JOIN @dateranges tbl
                  ON cte.id = tbl.range_id
          WHERE cte.d &lt; tbl.date_end)
SELECT id AS range_id
       ,d AS date_within_range
  FROM cte
 ORDER BY id, d</pre>
<p>You start with this:</p>
<table>
<tbody>
<tr>
<th>range_id</th>
<th>date_begin</th>
<th>date_end</th>
</tr>
<tr>
<td>A</td>
<td>2010-01-01</td>
<td>2010-01-03</td>
</tr>
<tr>
<td>B</td>
<td>2008-02-27</td>
<td>2008-03-01</td>
</tr>
<tr>
<td>C</td>
<td>2010-04-26</td>
<td>2010-04-26</td>
</tr>
<tr>
<td>D</td>
<td>2000-02-01</td>
<td>2003-02-20</td>
</tr>
</tbody>
</table>
<p>and end up with this:</p>
<table>
<tbody>
<tr>
<th>range_id</th>
<th>date_within_range</th>
</tr>
<tr>
<td>A</td>
<td>2010-01-01</td>
</tr>
<tr>
<td>A</td>
<td>2010-01-02</td>
</tr>
<tr>
<td>A</td>
<td>2010-01-03</td>
</tr>
<tr>
<td>B</td>
<td>2008-02-27</td>
</tr>
<tr>
<td>B</td>
<td>2008-02-28</td>
</tr>
<tr>
<td>B</td>
<td>2008-02-29</td>
</tr>
<tr>
<td>B</td>
<td>2008-03-01</td>
</tr>
<tr>
<td>C</td>
<td>2010-04-26</td>
</tr>
</tbody>
</table>
<p>Notice that &#8220;D&#8221; is filtered out of these results.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/sql-turn-a-date-range-into-a-list-of-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pawn Star</title>
		<link>http://blog.justinstolle.com/pawn-star/</link>
		<comments>http://blog.justinstolle.com/pawn-star/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 07:02:55 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[pawn]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=105</guid>
		<description><![CDATA[Here are some photos from our recent trip to the Gold and Silver Pawn Shop in Las Vegas. I got to see Rick and meet The Old Man. [..]]]></description>
			<content:encoded><![CDATA[<p>Here are some photos from our recent trip to the <a href="http://www.gspawn.com">Gold and Silver Pawn Shop</a> in Las Vegas. I got to see Rick and meet The Old Man.  Big Hoss and Chumlee were not there.  It was amazing to see how small the shop was&#8211;the <a href="http://www.history.com/content/pawn-stars">TV show</a> makes the place look huge.  I was expecting it to be about twice the size, but then again, the place isn&#8217;t as crowded when they film it. At the time, Rick had a <a href="http://en.wikipedia.org/wiki/Anterior_cruciate_ligament_injury">torn ACL</a>, so he was limping around the shop and looked like he was trying to grin through the pain.<br />

<a href='http://blog.justinstolle.com/pawn-star/img_5027/' title='Gold and Silver Pawn Shop'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5027-150x150.jpg" class="attachment-thumbnail" alt="Gold and Silver Pawn Shop" title="Gold and Silver Pawn Shop" /></a>
<a href='http://blog.justinstolle.com/pawn-star/img_5009/' title='IMG_5009'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5009-150x150.jpg" class="attachment-thumbnail" alt="IMG_5009" title="IMG_5009" /></a>
<a href='http://blog.justinstolle.com/pawn-star/img_5011/' title='IMG_5011'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5011-150x150.jpg" class="attachment-thumbnail" alt="IMG_5011" title="IMG_5011" /></a>
<a href='http://blog.justinstolle.com/pawn-star/img_5012/' title='IMG_5012'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5012-150x150.jpg" class="attachment-thumbnail" alt="IMG_5012" title="IMG_5012" /></a>
<a href='http://blog.justinstolle.com/pawn-star/img_5018/' title='IMG_5018'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5018-150x150.jpg" class="attachment-thumbnail" alt="IMG_5018" title="IMG_5018" /></a>
<a href='http://blog.justinstolle.com/pawn-star/img_5019/' title='IMG_5019'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5019-150x150.jpg" class="attachment-thumbnail" alt="IMG_5019" title="IMG_5019" /></a>
<a href='http://blog.justinstolle.com/pawn-star/img_5023/' title='IMG_5023'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5023-150x150.jpg" class="attachment-thumbnail" alt="IMG_5023" title="IMG_5023" /></a>
<a href='http://blog.justinstolle.com/pawn-star/img_5025/' title='IMG_5025'><img width="150" height="150" src="http://blog.justinstolle.com/wp-content/uploads/2010/02/IMG_5025-150x150.jpg" class="attachment-thumbnail" alt="IMG_5025" title="IMG_5025" /></a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/pawn-star/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do you want to go for a walk?</title>
		<link>http://blog.justinstolle.com/do-you-want-to-go-for-a-walk/</link>
		<comments>http://blog.justinstolle.com/do-you-want-to-go-for-a-walk/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 06:09:32 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[pugs]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=101</guid>
		<description><![CDATA[I&#8217;ve been so busy with work the past couple of weeks, I have had to forego my typically daily walks with the pugs. I feel bad that all [..]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been so busy with work the past couple of weeks, I have had to forego my typically daily walks with the pugs.  I feel bad that all they do is sleep and eat.  They wait for any chance they can get to hop in the car or go outside if they see me getting up to go somewhere.  Usually a 30-minute walk will tire them out for the night.  Once I&#8217;m done with this project, I&#8217;ll try to get back on schedule with them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/do-you-want-to-go-for-a-walk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solid reporting?</title>
		<link>http://blog.justinstolle.com/solid-reporting/</link>
		<comments>http://blog.justinstolle.com/solid-reporting/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 22:41:36 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Observations]]></category>
		<category><![CDATA[California]]></category>
		<category><![CDATA[Kentucky]]></category>
		<category><![CDATA[newspaper]]></category>
		<category><![CDATA[Visalia]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=93</guid>
		<description><![CDATA[The lead story of today&#8217;s local paper was titled Terror suspect linked to Visalia. When you read the article, it talks about a guy in Sprinfield, Illinois who [..]]]></description>
			<content:encoded><![CDATA[<p>The lead story of today&#8217;s local paper was titled <a href="http://www.visaliatimesdelta.com/article/20090926/NEWS01/90925032/Terror+suspect+linked+to+Visalia">Terror suspect linked to Visalia</a>.  When you read the article, it talks about a guy in Sprinfield, Illinois who was plotting to blow up a building.  What is the link to my hometown in California?  His alleged MySpace profile in which he indicated a hometown of Visalia, CA according to the <a href="http://www.sj-r.com/news/x1128380368/Decatur-man-arrested-for-attempting-to-bomb-Springfield-federal-building">State Journal-Register</a> of Illinois.</p>
<p>There is, however another city of Visalia in the country&#8211;one that is much closer to Illinois&#8211;in Kentucky.  Since the MySpace profile has been removed, I can&#8217;t verify what it actually said for the hometown.  It&#8217;s not clear from the reports if it could have just said &#8220;Visalia&#8221; or if it explicitly listed the state. The same MySpace profile said the guy attended high school in Michigan.  The three states, Illinois, Michigan, and Kentucky are in close proximity to each other&#8211;much closer to Kentucky than California from Illinois or Michigan. I&#8217;m not saying the reporting is necessarily wrong, but it is a big jump to report that there is definitely a link to our city rather than another when there is no other evidence&#8211;school records or family members with the same last name&#8211;living in this city.  I think somebody might have jumped the gun when searching for Visalia and finding the California city rather than the one in Kentucky.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/solid-reporting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RiffTrax LIVE!</title>
		<link>http://blog.justinstolle.com/rifftrax-live/</link>
		<comments>http://blog.justinstolle.com/rifftrax-live/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 21:08:54 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Humor]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=70</guid>
		<description><![CDATA[Now you can watch the guys from Mystery Science Theater 3000 live on the big screen in Fresno.  Check out the details here: http://www.ncm.com/Fathom/Comedy/RiffTrax.aspx or add it to [..]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ncm.com/Fathom/Comedy/RiffTrax.aspx"><img class="size-full wp-image-71 alignright" title="rifftrax_live_plan_9" src="http://blog.justinstolle.com/wp-content/uploads/2009/07/rifftrax_live_plan_9.jpg" alt="rifftrax_live_plan_9" width="240" height="135" /></a>Now you can watch the guys from Mystery Science Theater 3000 live on the big screen in Fresno.  Check out the details here: <a href="http://www.ncm.com/Fathom/Comedy/RiffTrax.aspx">http://www.ncm.com/Fathom/Comedy/RiffTrax.aspx</a> or add it to your Google Calendar by clicking the button below.</p>
<p><a href="http://www.google.com/calendar/event?action=TEMPLATE&amp;tmeid=bXRuMGx2YXNnZW82NTNwcWJla2JmajFrcmsganN0b2xsZUBt&amp;tmsrc=anN0b2xsZUBnbWFpbC5jb20" target="_blank"><img style="border: 0pt none;" src="http://www.google.com/calendar/images/ext/gc_button1_en.gif" border="0" alt="" width="100" height="25" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/rifftrax-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

