<?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>Tue, 02 Apr 2013 06:07:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Birdemic: The Memoir</title>
		<link>http://blog.justinstolle.com/birdemic-the-memoir/</link>
		<comments>http://blog.justinstolle.com/birdemic-the-memoir/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 06:05:47 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[Observations]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[movies]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=231</guid>
		<description><![CDATA[Following the so-called &#8220;World Tour 2010&#8243; of &#8220;Birdemic: Shock and Terror&#8221;, director James Nguyen put pen to paper to write several rough paragraphs and called it &#8220;a memoir&#8221;. [..]]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.justinstolle.com/wp-content/uploads/2013/04/IMG_2422.jpg"><img class="alignleft size-medium wp-image-232" alt="Birdemic Memoir" src="http://blog.justinstolle.com/wp-content/uploads/2013/04/IMG_2422-300x200.jpg" width="300" height="200" /></a>Following the so-called &#8220;World Tour 2010&#8243; of &#8220;Birdemic: Shock and Terror&#8221;, director James Nguyen put pen to paper to write several rough paragraphs and called it &#8220;a memoir&#8221;. His bio claims that he is known as the &#8220;Master of Romantic Thrillers™&#8221; (trademark!)</p>
<p>This &#8220;memoir&#8221; consists of only about 240 sentences. There are more pages of photos than text in what is more accurately called a pamphlet than a book. Despite the small amount of words, the movie&#8217;s title is mentioned a whopping 83 times! Nguyen promises a Birdemic sequel in 3D, a Broadway musical where electronic eagles and vultures will fly like Spiderman, and an online game.</p>
<p>Nguyen mentions Hitchcock and Hollywood over and over as if he has any connection to either. He tells us that his eagles and vultures became &#8220;mutant, toxic and flammable&#8221; due to global warming. He needlessly explains how he had very little money to make his most famous movie. And he never comes to terms with the fact that people like to watch his movie ironically.<span id="more-231"></span></p>
<p>There are moments of boasting.</p>
<p>&#8220;I have a history of discovering beautiful and talented actress. After seeing at least 1,000 headshots and hundreds of auditions, I discovered Whitney Moore. Whitney is a beautiful, gifted and talented actress. I would not be surprised if Whitney is casted in a Hollywood movie and the next hot blond actress!&#8221;</p>
<p>There are moments of child-like praise.</p>
<p>&#8220;Alan Bagh did a great job as Rod in Birdemic. [...] Alan is my friend.&#8221;<br />
Whitney Moore &#8220;&#8230;did a fantastic job as Nathalie in Birdemic.&#8221;<br />
&#8220;Colton Osborne did a great job as Tony.&#8221;<br />
&#8220;Patsy van Ettinger was awesome as Nathalie’s mother! [...] Patsy is my friend.&#8221;<br />
&#8220;Damien Carter [...] did a fantastic job in playing himself in Birdemic.&#8221;<br />
&#8220;Rick Camp does a superb job as Dr. Jones. [...] Rick is my friend.&#8221;<br />
The rest of the cast &#8220;&#8230; did a terrific job.&#8221;</p>
<p>However, he also chastises hopeful actors wishing to make it big in Hollywood.</p>
<p>&#8220;A lot of them are not willing to pay their due. Some are infatuated by the movie business. Some are fakers. Some will not make the sacrifice and dedication in order to have a chance at that elusive Hollywood movie break. Personally, I believe that most of them will quit and go home because of money.&#8221;</p>
<p>Though his delusion is on full display throughout, it is made most clear when he describes how environmentally friendly the movie has made him.</p>
<p>&#8220;Birdemic has inspired me to live a green lifestyle. So I made a serious effort to reduce my carbon footprint. Now, I drive a hybrid car. I will buy an electric car. I have gone solar in that I have installed a solar power system at my house and I use solar battery chargers to recharge my cellular phone &amp; laptop computer. Some of the lights in my garden and front yard have solar panel on them.&#8221;<br />
&#8220;[M]y clothes are made from bamboo material. I have a computer mouse and keyboard that are made from bamboo which acts as a carbon sponge that absorbs excess carbon dioxide; this helps to reduce global warming.&#8221;</p>
<p>Oh, Mr. Nguyen, you are truly an inspiration!</p>
<p>To get your own copy of this picture book, I mean, memoir, it retails at only $19.99.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/birdemic-the-memoir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kill the Password</title>
		<link>http://blog.justinstolle.com/kill-the-password/</link>
		<comments>http://blog.justinstolle.com/kill-the-password/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 20:58:48 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Observations]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.justinstolle.com/?p=221</guid>
		<description><![CDATA[While Wired&#8216;s cover story about the failure of passwords (&#8220;Kill the Password: Why a String of Characters Can’t Protect Us Anymore&#8221;) is now a couple of months old, [..]]]></description>
				<content:encoded><![CDATA[<div id="attachment_222" class="wp-caption alignleft" style="width: 210px"><a href="http://www.wired.com/gadgetlab/2012/11/ff-mat-honan-password-hacker/all/"><img class="size-full wp-image-222" alt="Kill the Password" src="http://blog.justinstolle.com/wp-content/uploads/2013/02/2012-bugtop.jpg" width="200" height="268" /></a><p class="wp-caption-text">Wired Magazine: Kill the Password</p></div>
<p>While <em>Wired</em>&#8216;s cover story about the failure of passwords (&#8220;<a href="http://www.wired.com/gadgetlab/2012/11/ff-mat-honan-password-hacker/all/">Kill the Password</a>: Why a String of Characters Can’t Protect Us Anymore&#8221;) is now a couple of months old, it is still very relevant. It is certainly a worthwhile read for all people in our digital age. It provides a good overview of the compromising positions that passwords can put us in, no matter how diligent we are at creating and keeping &#8220;good&#8221; passwords.</p>
<p>Bored teens and highly motivated criminals are both part of the threat to your personal information. Additionally, overly helpful customer service personnel can be persuaded to relinquish control of your account to a persistent hacker. Information discovered about you through simple searches can be used against you.</p>
<p>There are steps you can take to make it more difficult for a would-be hacker. But eventually, the password may be just one of several authentication methods of keeping your information secure. Below, I&#8217;ve reproduced the article&#8217;s tips for what you should and should not do. <span id="more-221"></span></p>
<fieldset>
<h2><span style="color: #ff0000;"><strong>DON’T</strong></span></h2>
<ul>
<li><strong>Reuse passwords.</strong> If you do, a hacker who gets just one of your accounts will own them all.</li>
<li><strong>Use a dictionary word as your password.</strong> If you must, then string several together into a pass phrase.</li>
<li><strong>Use standard number substitutions.</strong> Think “P455w0rd” is a good password? N0p3! Cracking tools now have those built in.</li>
<li><strong>Use a short password</strong>—no matter how weird. Today’s processing speeds mean that even passwords like “h6!r$q” are quickly crackable. Your best defense is the longest possible password.</li>
</ul>
<hr />
<h2><span style="color: #ff0000;"><strong>DO</strong></span></h2>
<ul>
<li><strong>Enable two-factor authentication when offered.</strong> When you log in from a strange location, a system like this will send you a text message with a code to confirm. Yes, that can be cracked, but it’s better than nothing.</li>
<li><strong>Give bogus answers to security questions.</strong> Think of them as a secondary password. Just keep your answers memorable. My first car? Why, it was a “Camper Van Beethoven Freaking Rules.”</li>
<li><strong>Scrub your online presence.</strong> One of the easiest ways to hack into an account is through your email and billing address information. Sites like Spokeo and WhitePages.com offer opt-out mechanisms to get your information removed from their databases.</li>
<li><strong>Use a unique, secure email address for password recoveries.</strong> If a hacker knows where your password reset goes, that’s a line of attack. So create a special account you never use for communications. And make sure to choose a username that isn’t tied to your name—like m****n@wired.com—so it can’t be easily guessed.</li>
</ul>
</fieldset>
]]></content:encoded>
			<wfw:commentRss>http://blog.justinstolle.com/kill-the-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
		<category><![CDATA[computing]]></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>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[security]]></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" /></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" /></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" /></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" /></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" /></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" /></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" /></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" /></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>
	</channel>
</rss>
