<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;D0IBQ3c_cSp7ImA9WhBbGEw.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219</id><updated>2013-05-17T13:32:32.949-05:00</updated><category term="Code" /><category term="NotCode" /><title>Adam Miller's blog</title><subtitle type="html">Tips on Asp.Net and C# development</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.milrr.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>83</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/CodeAndNotCode" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="codeandnotcode" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUMDSH8-cSp7ImA9WhBQF00.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-3299078856974177939</id><published>2013-03-19T10:37:00.000-05:00</published><updated>2013-03-19T10:37:59.159-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-19T10:37:59.159-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: C# when not to use var</title><content type="html">&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
I ran into a bug today that might have been avoided if we weren’t using &lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;var&lt;/span&gt;. &amp;nbsp;Both old/new methods return a byte array but the second method is incorrect as the ToUnixTime() in the new method returns an int. &amp;nbsp;Some might say better unit testing would have caught the issue, and that's true, but it's pretty hard to deny that using var introduced a bug. &amp;nbsp;As a general rule I try to use specific types instead of var for native types (int, long, string, datetime), the word var only saves me a few characters, and as shown below the return type is important.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
Old method:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;private&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;static&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;byte&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;[] GenTimeStamp(&lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;DateTime&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; currentTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;long&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; FileTime =
currentTime.ToFileTime();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;// convert to milliseconds since Jan 1,
1601 00:00 UTC&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;// and subtract milliseconds between Jan
1, 1601 &amp;amp; Jan 1, 1970&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;Int64&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;
HostUnixTime = ((&lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;Int64&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;)FileTime / 10000) - WINDOWS_TO_UNIX_MAGIC_NUMBER;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;Int64&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;
NetUnixTime = &lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;IPAddress&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;.HostToNetworkOrder(HostUnixTime);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;return&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;BitConverter&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;.GetBytes(NetUnixTime);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
New/refactored method (data type is int instead of long):&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;private&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;static&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;byte&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;[] GenTimeStamp(&lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;DateTime&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; currentTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;var&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; hostUnixTime =
currentTime.ToUnixTime();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;var&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; netUnixTime = &lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;IPAddress&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;.HostToNetworkOrder(hostUnixTime);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;return&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"&gt;BitConverter&lt;/span&gt;&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;.GetBytes(netUnixTime);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/3299078856974177939/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2013/03/code-c-when-not-to-use-var.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/3299078856974177939?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/3299078856974177939?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2013/03/code-c-when-not-to-use-var.html" title="Code: C# when not to use var" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0QFQH04cCp7ImA9WhBTE0g.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-4787860114674109785</id><published>2013-02-08T15:35:00.002-06:00</published><updated>2013-02-08T15:35:11.338-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-08T15:35:11.338-06:00</app:edited><title>Code as Craft</title><content type="html">The team over at &lt;a href="http://www.etsy.com/"&gt;Etsy&lt;/a&gt; creates some pretty interesting &lt;a href="https://github.com/etsy"&gt;software&lt;/a&gt;&amp;nbsp;and they have a really interesting &lt;a href="http://codeascraft.etsy.com/"&gt;blog&lt;/a&gt;. &amp;nbsp;If you are a software developer its worth your time to read it.</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/4787860114674109785/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2013/02/code-as-craft.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/4787860114674109785?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/4787860114674109785?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2013/02/code-as-craft.html" title="Code as Craft" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0cMR3o9eSp7ImA9WhNQE0g.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-3709382131439892818</id><published>2012-11-19T13:58:00.000-06:00</published><updated>2012-11-19T13:58:06.461-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-19T13:58:06.461-06:00</app:edited><title>VS2012 Active Line Highlight color</title><content type="html">&lt;div&gt;
Dark theme in VS2012 a little too dark? &amp;nbsp;Here is how to change it:&lt;/div&gt;
Install the &amp;nbsp;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05/view/Reviews/5"&gt;Visual Studio 2012 color theme editor&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;div&gt;
Tools - Customize Colors&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-rJT9GCkubyE/UKqOGy7SOII/AAAAAAAAB8c/iH3GAOc-CfU/s1600/1.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="251" src="http://1.bp.blogspot.com/-rJT9GCkubyE/UKqOGy7SOII/AAAAAAAAB8c/iH3GAOc-CfU/s400/1.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Active line with default dark theme.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-peEvMkVpxRA/UKqOM1-soSI/AAAAAAAAB8k/F6ALm-5cOos/s1600/2.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="40" src="http://3.bp.blogspot.com/-peEvMkVpxRA/UKqOM1-soSI/AAAAAAAAB8k/F6ALm-5cOos/s400/2.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Change these values&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Z1Qeg_D_GrU/UKqORgNACII/AAAAAAAAB8s/VmsGUdh8rnw/s1600/3.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="257" src="http://3.bp.blogspot.com/-Z1Qeg_D_GrU/UKqORgNACII/AAAAAAAAB8s/VmsGUdh8rnw/s400/3.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;New active line highlighting&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/3709382131439892818/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2012/11/vs2012-active-line-highlight-color.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/3709382131439892818?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/3709382131439892818?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2012/11/vs2012-active-line-highlight-color.html" title="VS2012 Active Line Highlight color" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-rJT9GCkubyE/UKqOGy7SOII/AAAAAAAAB8c/iH3GAOc-CfU/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0MAR3w6eCp7ImA9WhBbGEw.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-512521806658256785</id><published>2012-09-01T07:00:00.003-05:00</published><updated>2013-05-17T13:30:46.210-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-17T13:30:46.210-05:00</app:edited><title>How To Replace Rear Speakers in a Honda Accord</title><content type="html">Replacing the rear speakers in my 2008 Honda Accord went pretty smoothly. &amp;nbsp;Overall install time was about 1 hour. &amp;nbsp;I replaced with the Polk db651.&lt;br /&gt;
&lt;br /&gt;
--Update: Turns out that the&amp;nbsp;Honda&amp;nbsp;head unit will decrease the bass level as volume is turned up, so even though these speakers are better, the&amp;nbsp;Honda&amp;nbsp;stereo is still taking measures to prevent blowing the cheap factory speakers, which leads to only a marginally better sound out of the speakers.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
Start by prying off the speaker cover from the outside corner. &amp;nbsp;Where the screwdriver is in the picture. &amp;nbsp;Don't try to pry from the inside as the tabs on the inside go underneath the deck.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-58voe4iBAZE/UEFMmx3BAsI/AAAAAAAABUw/dN3GznvvRTQ/s1600/IMAG0256.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="380" src="http://4.bp.blogspot.com/-58voe4iBAZE/UEFMmx3BAsI/AAAAAAAABUw/dN3GznvvRTQ/s640/IMAG0256.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
This is passenger side speaker grill&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-uu_Lt3so7Qg/UEFMBIDM2KI/AAAAAAAABXw/7JFQeepPQCg/s1600/IMAG0254.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="380" src="http://3.bp.blogspot.com/-uu_Lt3so7Qg/UEFMBIDM2KI/AAAAAAAABXw/7JFQeepPQCg/s640/IMAG0254.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
There is one bolt on the top of the factory speaker, remove it with a&amp;nbsp;Philips&amp;nbsp;screwdriver&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-IC09scTUcxM/UEFMznC0O3I/AAAAAAAABU4/k4IgSelXfxc/s1600/IMAG0257.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://4.bp.blogspot.com/-IC09scTUcxM/UEFMznC0O3I/AAAAAAAABU4/k4IgSelXfxc/s640/IMAG0257.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Now go inside the trunk and unclip the wiring harness&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-8Gp8HJSpmng/UEFNTqtnn8I/AAAAAAAABVI/IKL5Uw57Fx4/s1600/IMAG0259.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://3.bp.blogspot.com/-8Gp8HJSpmng/UEFNTqtnn8I/AAAAAAAABVI/IKL5Uw57Fx4/s640/IMAG0259.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
The gasket might be a little sticky, but the speaker will now pop right out. &amp;nbsp;Notice the little clip in the top left in the picture below. &amp;nbsp;That is the nut for the bolt that you removed previously. &amp;nbsp;Pop that clip out.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-jpIhCRoWsFs/UEFNbao8bII/AAAAAAAABVQ/kGU8vWnfcVg/s1600/IMAG0260.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://2.bp.blogspot.com/-jpIhCRoWsFs/UEFNbao8bII/AAAAAAAABVQ/kGU8vWnfcVg/s640/IMAG0260.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
I replaced with the Polk DB651. &amp;nbsp;Much larger magnet and is&amp;nbsp;noticeably&amp;nbsp;heavier.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-jplL3t4bvf4/UEFN90_ljnI/AAAAAAAABVg/H8YqJ0j91rE/s1600/IMAG0262.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://4.bp.blogspot.com/-jplL3t4bvf4/UEFN90_ljnI/AAAAAAAABVg/H8YqJ0j91rE/s640/IMAG0262.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-hC7qGQRHZX8/UEFONcmtX6I/AAAAAAAABVo/jXdvyV8JiQs/s1600/IMAG0263.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://3.bp.blogspot.com/-hC7qGQRHZX8/UEFONcmtX6I/AAAAAAAABVo/jXdvyV8JiQs/s640/IMAG0263.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Now take the mounting bracket that came with your speaker and mark holes for drilling from the underside of the rear deck. &amp;nbsp;The mounting bracket for the Polks was NOT symmetrical, so be sure that you are looking at the bottom of the bracket when marking holes. &amp;nbsp;I'm actually doing it wrong in this picture and had to re-mark and re-drill. &amp;nbsp;I used a 1/8" bit so that the screws included with the new speakers would anchor in to the rear deck. &amp;nbsp;I used a cobalt metal drill bit and had no problems going through the metal.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-c15K1FSIrQ0/UEFOWCDYJTI/AAAAAAAABVw/4u2lu5X9t0I/s1600/IMAG0264.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://1.bp.blogspot.com/-c15K1FSIrQ0/UEFOWCDYJTI/AAAAAAAABVw/4u2lu5X9t0I/s640/IMAG0264.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
Now screw in the mounting bracket. &amp;nbsp;Be sure to get all screws started before tightening.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Hqwzhzutb2A/UEFPxmJ8R6I/AAAAAAAABWI/3Cbp8V-gFJ4/s1600/IMAG0267.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://3.bp.blogspot.com/-Hqwzhzutb2A/UEFPxmJ8R6I/AAAAAAAABWI/3Cbp8V-gFJ4/s640/IMAG0267.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
Drop in the new speaker and screw it to the bracket.
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-PzziOI3fTnE/UEFLPL1qzGI/AAAAAAAABX4/bDPNd2lirJs/s1600/IMAG0251.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-PzziOI3fTnE/UEFLPL1qzGI/AAAAAAAABX4/bDPNd2lirJs/s640/IMAG0251.jpg" width="587" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Get back in the trunk and connect the wiring. &amp;nbsp;I left the factory harness in place and just bent the end of the connecting wire a few times and slid it in. &amp;nbsp;It didn't seem like it mattered which wire was positive or negative.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-J1jH66A6UeQ/UEFLtdY9jwI/AAAAAAAABUY/7t0fjrgW5JQ/s1600/IMAG0253.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://2.bp.blogspot.com/-J1jH66A6UeQ/UEFLtdY9jwI/AAAAAAAABUY/7t0fjrgW5JQ/s640/IMAG0253.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
Now just replace the speaker cover and enjoy!&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
Here are the tools I used&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-cgwgD9L5vjQ/UEFMXnEFsuI/AAAAAAAABUo/lWXvaIHRGTQ/s1600/IMAG0255.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://4.bp.blogspot.com/-cgwgD9L5vjQ/UEFMXnEFsuI/AAAAAAAABUo/lWXvaIHRGTQ/s640/IMAG0255.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/512521806658256785/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2012/09/how-to-replace-rear-speakers-in-honda.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/512521806658256785?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/512521806658256785?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2012/09/how-to-replace-rear-speakers-in-honda.html" title="How To Replace Rear Speakers in a Honda Accord" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-58voe4iBAZE/UEFMmx3BAsI/AAAAAAAABUw/dN3GznvvRTQ/s72-c/IMAG0256.jpg" height="72" width="72" /><thr:total>7</thr:total></entry><entry gd:etag="W/&quot;DkMMRHwyeSp7ImA9WhVbFE0.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-2476186620252474421</id><published>2012-05-30T14:01:00.001-05:00</published><updated>2012-05-30T14:01:25.291-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-30T14:01:25.291-05:00</app:edited><title>Code: How to Change AppFabric Cache Size on a Host</title><content type="html">By default AppFabric will allocate 50% of the RAM on a machine for the cache. &amp;nbsp;If you want to change the available amount of memory for AppFabric cache on a host you'll need to stop the cluster and then run Set-CacheHostConfig&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;PS F:\&amp;gt; stop-cachecluster

HostName : CachePort      Service Name            Service Status Version Info
--------------------      ------------            -------------- ------------
MACHINE1:22233            AppFabricCachingService DOWN           1 [1,1][1,1]
MACHINE2:22233            AppFabricCachingService DOWN           1 [1,1][1,1]


PS F:\&amp;gt; set-cachehostconfig -HostName MACHINE1 -CachePort 22233 -CacheSize 2048


HostName        : MACHINE1
ClusterPort     : 22234
CachePort       : 22233
ArbitrationPort : 22235
ReplicationPort : 22236
Size            : 2048 MB
ServiceName     : AppFabricCachingService
HighWatermark   : 90%
LowWatermark    : 70%
IsLeadHost      : False



PS F:\&amp;gt; start-cachecluster

HostName : CachePort      Service Name            Service Status Version Info
--------------------      ------------            -------------- ------------
MACHINE1:22233            AppFabricCachingService UP             1 [1,1][1,1]
MACHINE2:22233            AppFabricCachingService UP             1 [1,1][1,1]
&lt;/pre&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/2476186620252474421/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2012/05/code-how-to-change-appfabric-cache-size.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2476186620252474421?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2476186620252474421?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2012/05/code-how-to-change-appfabric-cache-size.html" title="Code: How to Change AppFabric Cache Size on a Host" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DUMNRXY9eyp7ImA9WhBQF00.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-6784159821612748344</id><published>2012-05-30T12:16:00.001-05:00</published><updated>2013-03-19T10:38:14.863-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-19T10:38:14.863-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: AppFabric Diagnostic Powershell Commands</title><content type="html">Below are some powershell commands I found useful in testing AppFabric Cache Clusters. &amp;nbsp;You'll want to import the following modules:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Import-Module DistributedCacheConfiguration
Import-Module DistributedCacheAdministration
&lt;/pre&gt;
&lt;h4&gt;










use-cachecluster
&lt;/h4&gt;
&lt;pre&gt;use-cachecluster -Provider "System.Data.SqlClient" -ConnectionString "Data Source=dbmachine\instance;Initial Catalog=DatabaseName;Integrated Security=true"
&lt;/pre&gt;
&lt;h4&gt;








get-cachestatistics&lt;/h4&gt;
&lt;pre&gt;get-cachestatistics -cachename YourCacheName

Size         : 212661
ItemCount    : 14
RegionCount  : 30
RequestCount : 2267
MissCount    : 288
&lt;/pre&gt;
&lt;h4&gt;










get-cacheclusterinfo
&lt;/h4&gt;
&lt;pre&gt;get-cacheclusterinfo -Provider "System.Data.SqlClient" -ConnectionString "Data Source=dbmachine\instance;Initial Catalog=DatabaseName;Integrated Security=true"

                IsInitialized Size                          Provider                      ConnectionString
                ------------- ----                          --------                      ----------------
                         True Small                         System.Data.SqlClient         Data Source=odcsgwinsql11....
&lt;/pre&gt;
&lt;h4&gt;





get-cachehost&lt;/h4&gt;
&lt;pre&gt;get-cachehost

HostName : CachePort      Service Name            Service Status Version Info
--------------------      ------------            -------------- ------------
MACHINE1:22233          AppFabricCachingService UP             1 [1,1][1,1]
HOSTNUMBER2:22233       AppFabricCachingService UP             1 [1,1][1,1]
&lt;/pre&gt;
&lt;h4&gt;








get-cacheclusterhealth
&lt;/h4&gt;
&lt;pre&gt;get-cacheclusterhealth

Cluster health statistics
=========================

HostName = HOSTMACHINENAME
-------------------------

    NamedCache = default
        Healthy              = 33.33
        UnderReconfiguration = 0.00
        NotPrimary           = 0.00
        NoWriteQuorum        = 0.00
        Throttled            = 0.00

    NamedCache = MYCAHCE1
        Healthy              = 33.33
        UnderReconfiguration = 0.00
        NotPrimary           = 0.00
        NoWriteQuorum        = 0.00
        Throttled            = 0.00

    NamedCache = MYOTHERCACHE
        Healthy              = 33.33
        UnderReconfiguration = 0.00
        NotPrimary           = 0.00
        NoWriteQuorum        = 0.00
        Throttled            = 0.00
&lt;/pre&gt;
&lt;h4&gt;
Get-CacheHostConfig&lt;/h4&gt;
&lt;pre&gt;PS F:\&amp;gt; Get-CacheHostConfig -HostName YourComputerName -CachePort 22233


HostName        : YourComputerName 
ClusterPort     : 22234
CachePort       : 22233
ArbitrationPort : 22235
ReplicationPort : 22236
Size            : 4036 MB
ServiceName     : AppFabricCachingService
HighWatermark   : 90%
LowWatermark    : 70%
IsLeadHost      : False
&lt;/pre&gt;
&lt;h4&gt;
get-cacheconfig&lt;/h4&gt;
&lt;pre&gt;PS F:\&amp;gt; get-cacheconfig -cachename FrameworkUnitTest

CacheName            : FrameworkUnitTest
TimeToLive           : 10 mins
CacheType            : Partitioned
Secondaries          : 0
IsExpirable          : True
EvictionType         : LRU
NotificationsEnabled : False
&lt;/pre&gt;
</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/6784159821612748344/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2012/05/code-appfabric-diagnostic-powershell.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6784159821612748344?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6784159821612748344?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2012/05/code-appfabric-diagnostic-powershell.html" title="Code: AppFabric Diagnostic Powershell Commands" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;AkICQ3o-eip7ImA9WhRbF04.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-59707916355773492</id><published>2012-01-13T14:10:00.000-06:00</published><updated>2012-02-08T16:02:42.452-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-08T16:02:42.452-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: Convert Enum to MVC SelectList</title><content type="html">&lt;br /&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;EnumHelper&lt;/span&gt;
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="background-color: white; color: blue;"&gt;public&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; color: blue;"&gt;static&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; color: #2b91af;"&gt;List&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-color: white; color: #2b91af;"&gt;SelectListItem&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;gt;&amp;nbsp;GetSelectList&amp;lt;TEnum&amp;gt;(&lt;/span&gt;&lt;span style="background-color: white; color: blue;"&gt;params&lt;/span&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;TEnum[]&amp;nbsp;ignoreList)&lt;/span&gt;&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;SelectListItem&lt;/span&gt;&amp;gt;&amp;nbsp;enumList&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;SelectListItem&lt;/span&gt;&amp;gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt;&amp;nbsp;(TEnum&amp;nbsp;data&amp;nbsp;&lt;span style="color: blue;"&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Enum&lt;/span&gt;.GetValues(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(TEnum)))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;if&lt;/span&gt;&amp;nbsp;(!ignoreList.Contains(data))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;enumList.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;SelectListItem&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Text&amp;nbsp;=&amp;nbsp;data.ToString().Replace(&lt;span style="color: #a31515;"&gt;"_"&lt;/span&gt;,&amp;nbsp;&lt;span style="color: #a31515;"&gt;"&amp;nbsp;"&lt;/span&gt;),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Value&amp;nbsp;=&amp;nbsp;((&lt;span style="color: blue;"&gt;int&lt;/span&gt;)&lt;span style="color: #2b91af;"&gt;Enum&lt;/span&gt;.Parse(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(TEnum),&amp;nbsp;data.ToString())).ToString()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;return&lt;/span&gt;&amp;nbsp;enumList;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/pre&gt;
}&lt;/pre&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;"&gt;&lt;/pre&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;"&gt;&lt;/pre&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;"&gt;&lt;/pre&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-size: 13px;"&gt;&lt;/pre&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-size: 13px;"&gt;&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Consolas;"&gt;CommunicationList&amp;nbsp;=&amp;nbsp;&lt;span style="color: #2b91af;"&gt;EnumHelper&lt;/span&gt;.GetEnumSelectList&amp;lt;&lt;span style="color: #2b91af;"&gt;CommunicationTypes&lt;/span&gt;&amp;gt;();
&lt;/pre&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial;"&gt;&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Consolas;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;"&gt;@&lt;/span&gt;Html.DropDownList(&lt;span style="color: #a31515;"&gt;"CommunicationType"&lt;/span&gt;,&amp;nbsp;Model.CommunicationList)&lt;/pre&gt;
&lt;/pre&gt;
&lt;/pre&gt;
You'll notice my method replaces underscores with a space.  Since Enums cant have spaces this allows you to have nicely formatted text in your UI without extra work. &amp;nbsp;I chose to return a List of SelectListItem instead of a SelectList so that my ViewModels can modify the list if necessary.</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/59707916355773492/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2012/01/code-convert-enum-to-mvc-selectlist.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/59707916355773492?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/59707916355773492?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2012/01/code-convert-enum-to-mvc-selectlist.html" title="Code: Convert Enum to MVC SelectList" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;D0MARn44cSp7ImA9WhRVFEU.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-5614497726649157300</id><published>2011-12-14T09:41:00.002-06:00</published><updated>2012-01-13T14:10:47.039-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-13T14:10:47.039-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>ASP.net load an image from embedded resource</title><content type="html">Below is a simple method that I couldn't find anywhere else online that loads a .gif image from an embedded resource and returns the image as the web page response&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;void&lt;/span&gt;&amp;nbsp;WriteGifImageToResponse(&lt;span style="color: #2b91af;"&gt;HttpContext&lt;/span&gt;&amp;nbsp;context,&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;resourcePath)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;HttpResponse&lt;/span&gt;&amp;nbsp;response&amp;nbsp;=&amp;nbsp;context.Response;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.ContentType&amp;nbsp;=&amp;nbsp;&lt;span style="color: #a31515;"&gt;"image/gif"&lt;/span&gt;;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Assembly&lt;/span&gt;&amp;nbsp;asm&amp;nbsp;=&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Assembly&lt;/span&gt;.GetExecutingAssembly();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;using&lt;/span&gt;&amp;nbsp;(&lt;span style="color: #2b91af;"&gt;Stream&lt;/span&gt;&amp;nbsp;imageStream&amp;nbsp;=&amp;nbsp;asm.GetManifestResourceStream(resourcePath))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;using&lt;/span&gt;&amp;nbsp;(&lt;span style="color: #2b91af;"&gt;Image&lt;/span&gt;&amp;nbsp;theImage&amp;nbsp;=&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Image&lt;/span&gt;.FromStream(imageStream))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;theImage.Save(context.Response.OutputStream,&amp;nbsp;&lt;span style="color: #2b91af;"&gt;ImageFormat&lt;/span&gt;.Gif);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/5614497726649157300/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/12/aspnet-load-image-from-embedded.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5614497726649157300?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5614497726649157300?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/12/aspnet-load-image-from-embedded.html" title="ASP.net load an image from embedded resource" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;D0QAR3g4fCp7ImA9WhRQGEo.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-1239341379114165037</id><published>2011-12-14T09:09:00.001-06:00</published><updated>2011-12-14T09:09:06.634-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-14T09:09:06.634-06:00</app:edited><title>Deploying console apps</title><content type="html">You can check out my blog post on deploying console apps on the Dont Panic Labs Blog&lt;br /&gt;
&lt;a href="http://blog.dontpaniclabs.com/post/2011/12/14/Deploying-Console-Apps-via-MSBuild.aspx"&gt;http://blog.dontpaniclabs.com/post/2011/12/14/Deploying-Console-Apps-via-MSBuild.aspx&lt;/a&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/1239341379114165037/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/12/deploying-console-apps.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/1239341379114165037?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/1239341379114165037?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/12/deploying-console-apps.html" title="Deploying console apps" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkYBR3o5eyp7ImA9WhdVEk0.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-3337231199106153342</id><published>2011-09-16T15:15:00.002-05:00</published><updated>2011-09-16T15:15:56.423-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-16T15:15:56.423-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Calling MSScript.ocx on a 64 bit Machine</title><content type="html">I struggled for a while today with a 3rd party .Net app our company uses to print documents. &amp;nbsp;We recently moved our production environment from 32 bit Windows Server to 64 bit. &amp;nbsp;It was seamless for the most part except for the previously mentioned app.&lt;br /&gt;
&lt;br /&gt;
The error message we saw:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Retrieving the COM class factory for component with CLSID {0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC} failed due to the following error: 80040154.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
As far as useless error messages go, this is one ranks up pretty high on my list. &amp;nbsp;However it wasn't totally useless, turns out that CLSID was unique and a quick Google search led me to realize it was associated with the MSScriptControl. &amp;nbsp;Turns out this app was targeted for "Any CPU" and the script control is a 32 bit resource. &amp;nbsp;Since we weren't the developers of the code we couldn't just go in and re-build the app, luckily we were able to force the app to run in 32 bit using &lt;a href="http://msdn.microsoft.com/en-us/library/ms164699(v=vs.80).aspx"&gt;corflags&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
After installing the &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=15354#Overview"&gt;Windows SDK for .Net&lt;/a&gt;&amp;nbsp;you can find corflags.exe in&amp;nbsp;C:\Program Files\Microsoft.NET\SDK\v2.0 64bit\Bin&lt;br /&gt;
&lt;br /&gt;
Open up a command prompt in that directory and you can execute&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;CorFlags "C:\pathtoyour.exe" /32BIT+&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
And voila your app will now lunch as a 32 bit app and will load the 32 bit .dlls.</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/3337231199106153342/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/09/calling-msscriptocx-on-64-bit-machine.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/3337231199106153342?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/3337231199106153342?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/09/calling-msscriptocx-on-64-bit-machine.html" title="Calling MSScript.ocx on a 64 bit Machine" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0UESHs9fyp7ImA9WhdTFUU.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-1490605176210318415</id><published>2011-07-13T15:32:00.001-05:00</published><updated>2011-07-13T15:33:29.567-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-13T15:33:29.567-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NotCode" /><title>Tech: Change Your Phone's Camera Resolution</title><content type="html">Chances are that if you have a smartphone, you like to share the pictures you take with it. &amp;nbsp;Take a moment to take a look at the resolution your camera is set at. &amp;nbsp;My Droid Incredible goes up to 8 MegaPixel (3264x1952). &amp;nbsp;Because of the small lens, the pictures are pretty noisy, even in daylight. &amp;nbsp;So I'd never print anything larger than a 4x6. &amp;nbsp;Realistically I'd probably print a 3x4. &amp;nbsp;Most photo printers recommend a resolution of 300 dots per inch. &amp;nbsp;So a photo printed at 4 inches by 6 inches would need a resolution of 1800 x 1200. &amp;nbsp;On my phone this resolution is just below my 3 megapixel setting. &amp;nbsp;So at 3x4 I'd only need to use my 1 megapixel setting. &amp;nbsp;This also makes emailing and uploading my photos to Facebook MUCH faster! &amp;nbsp;Furthermore it uses less disk space on my memory card.</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/1490605176210318415/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/07/tech-change-your-phones-camera.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/1490605176210318415?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/1490605176210318415?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/07/tech-change-your-phones-camera.html" title="Tech: Change Your Phone's Camera Resolution" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DEYNR3YzeCp7ImA9WhZaGEo.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-9044037886575810867</id><published>2011-07-05T09:29:00.000-05:00</published><updated>2011-07-05T09:29:56.880-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-05T09:29:56.880-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: EF Code First Column Name Mapping</title><content type="html">When using Entity Framework Code First there are a couple of ways to map your classes to your database, below is a code snippet of what made the most sense to me. &amp;nbsp;It maps property names to column names, denotes the table name to use for the class, and specifies the primary key. &amp;nbsp;There are also a handful of different properties on this class, but because they have the same name as the column in the database they don't need to be explicitly set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background: white; color: black; font-family: Consolas; font-size: 13;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;LocateDB&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style="color: #2b91af;"&gt;DbContext&lt;/span&gt;
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;LocateDB()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:&amp;nbsp;&lt;span style="color: blue;"&gt;base&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"LocateDB"&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Database&lt;/span&gt;.SetInitializer&amp;lt;&lt;span style="color: #2b91af;"&gt;LocateDB&lt;/span&gt;&amp;gt;(&lt;span style="color: blue;"&gt;null&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;DbSet&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;LocateAccount&lt;/span&gt;&amp;gt;&amp;nbsp;LocateAccounts&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;;&amp;nbsp;&lt;span style="color: blue;"&gt;set&lt;/span&gt;;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;override&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;void&lt;/span&gt;&amp;nbsp;OnModelCreating(&lt;span style="color: #2b91af;"&gt;DbModelBuilder&lt;/span&gt;&amp;nbsp;modelBuilder)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;entity&amp;nbsp;=&amp;nbsp;modelBuilder.Entity&amp;lt;&lt;span style="color: #2b91af;"&gt;LocateAccount&lt;/span&gt;&amp;gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;entity.Property(x&amp;nbsp;=&amp;gt;&amp;nbsp;x.PR_Fax).HasColumnName(&lt;span style="color: #a31515;"&gt;"PR_Fax#"&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;entity.Property(x&amp;nbsp;=&amp;gt;&amp;nbsp;x.PRATT_Fax).HasColumnName(&lt;span style="color: #a31515;"&gt;"PRATT_Fax#"&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;entity.HasKey(x&amp;nbsp;=&amp;gt;&amp;nbsp;x.LocateId);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;entity.ToTable(&lt;span style="color: #a31515;"&gt;"Locate"&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&lt;/pre&gt;&lt;pre style="background: white; color: black; font-family: Consolas; font-size: 13;"&gt;}&lt;/pre&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/9044037886575810867/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/07/code-ef-code-first-column-name-mapping.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/9044037886575810867?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/9044037886575810867?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/07/code-ef-code-first-column-name-mapping.html" title="Code: EF Code First Column Name Mapping" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkAERH86eCp7ImA9WhZWF0g.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-6864679411529679125</id><published>2011-05-18T15:31:00.000-05:00</published><updated>2011-05-18T15:31:45.110-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-18T15:31:45.110-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: How to draw a Line that follows a path in WPF</title><content type="html">I couldn't find a code snippet online that did exactly this, so I thought I'd share. &amp;nbsp;The following code draws a line on a path that ends up being 3 straight lines:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background: white; color: black; font-family: Consolas; font-size: 13;"&gt;&lt;span style="color: green;"&gt;//line&amp;nbsp;looks&amp;nbsp;somethine&amp;nbsp;like:&lt;/span&gt;
&lt;span style="color: green;"&gt;//&lt;/span&gt;
&lt;span style="color: green;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|&lt;/span&gt;
&lt;span style="color: green;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;\&lt;/span&gt;
&lt;span style="color: green;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;\&lt;/span&gt;
&lt;span style="color: green;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|&lt;/span&gt;
&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;&amp;nbsp;p1&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;(GetAdjustXPositionForIntrusion(model.LengthInInches,&amp;nbsp;item.LocationInInches),&amp;nbsp;canvasHeight&amp;nbsp;-&amp;nbsp;padding&amp;nbsp;-&amp;nbsp;2);
&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;&amp;nbsp;p2&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;(p1.X,&amp;nbsp;p1.Y&amp;nbsp;-&amp;nbsp;intrusionHeight);
&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;&amp;nbsp;p3&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;(textCanvasLeft&amp;nbsp;+&amp;nbsp;4,&amp;nbsp;intrusionTextBottom&amp;nbsp;+&amp;nbsp;intrusionHeight);
&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;&amp;nbsp;p4&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Point&lt;/span&gt;(p3.X,&amp;nbsp;intrusionTextBottom);
 
&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;PathSegment&lt;/span&gt;&amp;gt;&amp;nbsp;segments&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;PathSegment&lt;/span&gt;&amp;gt;();
segments.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;LineSegment&lt;/span&gt;(p2,&amp;nbsp;&lt;span style="color: blue;"&gt;true&lt;/span&gt;));
segments.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;LineSegment&lt;/span&gt;(p3,&amp;nbsp;&lt;span style="color: blue;"&gt;true&lt;/span&gt;));
segments.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;LineSegment&lt;/span&gt;(p4,&amp;nbsp;&lt;span style="color: blue;"&gt;true&lt;/span&gt;));
 
&lt;span style="color: #2b91af;"&gt;PathFigure&lt;/span&gt;&amp;nbsp;pf&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;PathFigure&lt;/span&gt;(p1,&amp;nbsp;segments,&amp;nbsp;&lt;span style="color: blue;"&gt;false&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style="color: #2b91af;"&gt;PathGeometry&lt;/span&gt;&amp;nbsp;pg&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;PathGeometry&lt;/span&gt;();
pg.Figures.Add(pf);
 
&lt;span style="color: #2b91af;"&gt;Path&lt;/span&gt;&amp;nbsp;p&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Path&lt;/span&gt;();
p.Data&amp;nbsp;=&amp;nbsp;pg;
p.Stroke&amp;nbsp;=&amp;nbsp;GetBrushForIntrusionType(item.IntrusionType);
p.StrokeThickness&amp;nbsp;=&amp;nbsp;1;
canvas.Children.Add(p)&lt;/pre&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/6864679411529679125/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/05/code-how-to-draw-line-that-follows-path.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6864679411529679125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6864679411529679125?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/05/code-how-to-draw-line-that-follows-path.html" title="Code: How to draw a Line that follows a path in WPF" /><author><name>Adam Miller</name><uri>https://plus.google.com/110185420189967809269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-CFO3jTJlFQ4/AAAAAAAAAAI/AAAAAAAAC-g/ZRCQU36cn8Y/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEYCQXo4eCp7ImA9WhZWFks.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-9038608982011150333</id><published>2011-05-17T14:56:00.000-05:00</published><updated>2011-05-17T14:56:00.430-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-17T14:56:00.430-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NotCode" /><title>Sync Outlook and Google Calendar</title><content type="html">Just learned today that google has an app that will quickly and easily sync your outlook and google calendars.&amp;nbsp; Just a little app to download here: http://www.google.com/support/calendar/bin/answer.py?answer=89955&lt;br /&gt;
Once installed just enter your gmail username and password and voila!</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/9038608982011150333/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/05/sync-outlook-and-google-calendar.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/9038608982011150333?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/9038608982011150333?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/05/sync-outlook-and-google-calendar.html" title="Sync Outlook and Google Calendar" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0UARnw5cSp7ImA9WhZRFEk.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-5982730168489227849</id><published>2011-04-10T09:20:00.001-05:00</published><updated>2011-04-10T09:20:47.229-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-10T09:20:47.229-05:00</app:edited><title>Code: Nebraska Code Camp Windows Phone 7 Presentation</title><content type="html">&lt;p&gt;I did a little presentation on developing for Windows Phone 7 at Nebraska Code Camp yesterday.&amp;#160; The presentation was based on an &lt;a href="http://msdn.microsoft.com/en-us/magazine/gg490347.aspx"&gt;MSDN article&lt;/a&gt; I wrote a while back.&lt;/p&gt;  &lt;p&gt;Click &lt;a href="https://docs.google.com/a/milrr.com/viewer?a=v&amp;amp;pid=sites&amp;amp;srcid=bWlscnIuY29tfHd3d3xneDo0YmQxYzM0OTdmZmUyMDdh"&gt;here&lt;/a&gt; for the slides.&amp;#160; And &lt;a href="https://sites.google.com/a/milrr.com/www/home/files/SudukoArticle.zip?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt; for the app.&amp;#160; Thanks to those who attended!&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/5982730168489227849/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2011/04/code-nebraska-code-camp-windows-phone-7.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5982730168489227849?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5982730168489227849?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2011/04/code-nebraska-code-camp-windows-phone-7.html" title="Code: Nebraska Code Camp Windows Phone 7 Presentation" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CkIARno5fip7ImA9Wx9SE0o.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-6384262208823165083</id><published>2010-12-03T04:02:00.001-06:00</published><updated>2010-12-03T04:02:27.426-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-03T04:02:27.426-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NotCode" /><title>Android: My Android Non-Phone</title><content type="html">&lt;p&gt;I recently purchased a Samsung Epic 4G on eBay to use as a personal media device.&amp;#160; It is not activated on any carrier’s voice or data plan, I use it like an iPod Touch.&amp;#160; I was able to get it for a pretty reasonable price because it has a bad ESN, meaning Sprint&amp;#160; will no longer activate this phone on their network due to a non-paying user.&amp;#160; Verizon also does this, so you can get phones for their network cheaply also.&lt;/p&gt;  &lt;p&gt;Its nice to be able to check for new emails at glance, and I also have the Google Voice app installed so I can text from it and listen to voicemails.&amp;#160; Keep in mind that this only works when I’m on a wifi network, but for me that is home and work which covers 80% of my day.&lt;/p&gt;  &lt;p&gt;I also use Google Listen to download podcasts for listening during my daily commute.&amp;#160; Unfortunately there is a bug in the current version which required me to associate my gMail account when previously I had only had it associated with my Google Apps for Domain account.&lt;/p&gt;  &lt;p&gt;The GPS is functional, although Google maps downloads data in real time, so you have to download a different map application that is built for offline usage if you want to see maps in your car.&lt;/p&gt;  &lt;p&gt;You can install Skype, but unfortunately Skype for Android is not fully implemented due to the fact that it would compete with the carrier’s service, so you can only use to chat and make Skype to Skype calls.&amp;#160; I did however get calling functional following a lifehacker article (which I’m unable to find now).&amp;#160; It involved getting a SipGate.com number and installing SipDroid and Google Voice Callback apps.&amp;#160; However there was about a 2 second audio delay during one test call, and less delay, but much more static on a second text call.&amp;#160; My cell phone contract expires in 6 months, so I’ll probably re-evaluate a calling solution then.&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/6384262208823165083/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/12/android-my-android-non-phone.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6384262208823165083?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6384262208823165083?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/12/android-my-android-non-phone.html" title="Android: My Android Non-Phone" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0cGR344fyp7ImA9Wx9SE0s.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-8600242121538951190</id><published>2010-12-03T03:37:00.001-06:00</published><updated>2010-12-03T03:37:06.037-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-03T03:37:06.037-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NotCode" /><title>Android: Can’t establish a reliable data connection to the server</title><content type="html">&lt;p&gt;I have a Samsung Epic 4G and received the following error when attempting to add a 2nd Google account to my phone: “Can’t establish a reliable data connection to the server”.&amp;#160; Apparently this is a bug in Android.&amp;#160; The work around for me was to open the YouTube application and log in with my desired Google account.&amp;#160; After logging in to YouTube my account showed up in settings and I was able to use the account.&amp;#160; This does not seem to work for all users, some apparently have to do a hard reset.&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/8600242121538951190/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/12/android-cant-establish-reliable-data.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/8600242121538951190?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/8600242121538951190?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/12/android-cant-establish-reliable-data.html" title="Android: Can’t establish a reliable data connection to the server" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A04MSHw-cCp7ImA9Wx9TFUU.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-2713687670257153215</id><published>2010-11-24T03:13:00.001-06:00</published><updated>2010-11-24T03:13:09.258-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-24T03:13:09.258-06:00</app:edited><title>Phone: Transfer Your Google Voice Number to a Google Apps Account</title><content type="html">&lt;p&gt;I have a &lt;a href="http://www.google.com/apps/intl/en/group/index.html"&gt;Google Apps&lt;/a&gt; account and a regular ‘ol gMail account, but now that Google Apps offers Google’s full line of product offerings, I’m trying to phase out and move my old data.&amp;#160; Part of this is moving my Google Voice number to my Google Apps account.&amp;#160; Turns out you can move it by filling out &lt;a href="http://spreadsheets.google.com/viewform?formkey=cjlWRDFTWERkZEIxUzVjSmNsN0ExU1E6MA"&gt;this form&lt;/a&gt;.&amp;#160; Took them about a week to complete the move.&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/2713687670257153215/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/11/phone-transfer-your-google-voice-number.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2713687670257153215?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2713687670257153215?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/11/phone-transfer-your-google-voice-number.html" title="Phone: Transfer Your Google Voice Number to a Google Apps Account" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;A0UAQno9fCp7ImA9Wx5aFUo.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-5891071117351196574</id><published>2010-11-12T10:27:00.001-06:00</published><updated>2010-11-12T10:27:23.464-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-12T10:27:23.464-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: Silverlight Media Element Relative Urls</title><content type="html">&lt;p&gt;The best way I’ve found to use relative urls for media items in Silverlight is to place the media files (mp3, wmv, mp4, etc) in the ClientBin folder of the website (same directly as the .xap file)&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_FKaDXWj9WmQ/TN1q6IDdUcI/AAAAAAAACfs/7pVGJTUGoAI/image%5B12%5D.png?imgmax=800" width="258" height="345" /&gt;&lt;/p&gt;  &lt;p&gt;Ensure that the Build Action is set to Content and Copy To Ouput Directory is set to Copy if Newer:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_FKaDXWj9WmQ/TN1q6kefI4I/AAAAAAAACfw/xQ7c43OZ_5Y/image%5B13%5D.png?imgmax=800" width="363" height="237" /&gt;&lt;/p&gt;  &lt;p&gt;Then you can reference the files with a single forward slash then the file name:&lt;/p&gt;  &lt;pre&gt;&amp;lt;MediaElement x:Name=&amp;quot;DangerZoneTune&amp;quot; Source=&amp;quot;/DangerZoneTune.mp3&amp;quot;&amp;gt;&amp;lt;/MediaElement&amp;gt;&lt;br /&gt;&lt;/pre&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/5891071117351196574/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/11/code-silverlight-media-element-relative.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5891071117351196574?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5891071117351196574?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/11/code-silverlight-media-element-relative.html" title="Code: Silverlight Media Element Relative Urls" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_FKaDXWj9WmQ/TN1q6IDdUcI/AAAAAAAACfs/7pVGJTUGoAI/s72-c/image%5B12%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUEERXY6fyp7ImA9Wx5VGE8.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-5170099692399228756</id><published>2010-10-11T15:06:00.001-05:00</published><updated>2010-10-11T15:06:44.817-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-11T15:06:44.817-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: jQuery AJAX and Templates</title><content type="html">&lt;p&gt;The jQuery Templating plugin &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/10/04/jquery-templates-data-link-and-globalization-accepted-as-official-jquery-plugins.aspx" target="_blank"&gt;Microsoft’s web team&lt;/a&gt; has been working on has been accepted by the jQuery team check out the code below for usage with an AJAX web service.&lt;/p&gt;  &lt;p&gt;1.&amp;#160; Reference jQuery 1.4.2 or later, and the &lt;a href="http://api.jquery.com/category/plugins/templates/" target="_blank"&gt;template .js&lt;/a&gt; file (Templates will be an included part of jQuery 1.5)&lt;/p&gt;  &lt;pre class="code"&gt;    &lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;text/javascript&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;src&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;text/javascript&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;src&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;/Scripts/jquery.tmpl.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;2.&amp;#160; create the template that will be applied to each item in your result set, notice the ${} syntax&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;clientTemplate&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;text/html&amp;quot;&amp;gt;&lt;br /&gt;&lt;/span&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;Detail.aspx?q=${Id}&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;${Description}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;3.&amp;#160; Give the DOM element that will house the template an ID&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;ul &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;MatchingQuestions&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;ul&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;4.&amp;#160; Create the AJAX Call to your web service.&amp;#160; Notice that it is binding to the “d” element of the resulting msg object.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;function &lt;/span&gt;SearchQuestions(text) {&lt;br /&gt;    $.ajax({&lt;br /&gt;        type: &lt;span style="color: maroon"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;,&lt;br /&gt;        url: &lt;span style="color: maroon"&gt;&amp;quot;/NotifierWS.asmx/SearchQuestions&amp;quot;&lt;/span&gt;,&lt;br /&gt;        data: &lt;span style="color: maroon"&gt;&amp;quot;{'searchText': '&amp;quot; &lt;/span&gt;+ text + &lt;span style="color: maroon"&gt;&amp;quot;'}&amp;quot;&lt;/span&gt;,&lt;br /&gt;        contentType: &lt;span style="color: maroon"&gt;&amp;quot;application/json; charset=utf-8&amp;quot;&lt;/span&gt;,&lt;br /&gt;        dataType: &lt;span style="color: maroon"&gt;&amp;quot;json&amp;quot;&lt;/span&gt;,&lt;br /&gt;        success: &lt;span style="color: blue"&gt;function &lt;/span&gt;(msg) {&lt;br /&gt;            $(&lt;span style="color: maroon"&gt;&amp;quot;#clientTemplate&amp;quot;&lt;/span&gt;).tmpl(msg.d).appendTo(&lt;span style="color: maroon"&gt;&amp;quot;#MatchingQuestions&amp;quot;&lt;/span&gt;);&lt;br /&gt;        },&lt;br /&gt;        error: &lt;span style="color: blue"&gt;function &lt;/span&gt;(xhr, ajaxOptions, thrownError) {&lt;br /&gt;            alert(xhr.statusText);&lt;br /&gt;        }&lt;br /&gt;    });&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;font face="Georgia"&gt;5. Create a web service method (the service class will also need to have the ScriptService attribute)&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;WebMethod&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QuestionItem&lt;/span&gt;[] SearchQuestions(&lt;span style="color: blue"&gt;string &lt;/span&gt;searchText)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;QuestionItem&lt;/span&gt;&amp;gt; result = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;QuestionItem&lt;/span&gt;&amp;gt;();&lt;br /&gt;    &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(Business.&lt;span style="color: #2b91af"&gt;Question &lt;/span&gt;q &lt;span style="color: blue"&gt;in &lt;/span&gt;Business.&lt;span style="color: #2b91af"&gt;Question&lt;/span&gt;.SearchQuestions(searchText, 5))&lt;br /&gt;    {&lt;br /&gt;        result.Add(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QuestionItem&lt;/span&gt;(){ Id = q.Id, Description = q.Title});&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: blue"&gt;return &lt;/span&gt;result.ToArray();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;QuestionItem&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public long &lt;/span&gt;Id { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;    &lt;span style="color: blue"&gt;public string &lt;/span&gt;Description { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;}&lt;/pre&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/5170099692399228756/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/10/code-jquery-ajax-and-templates.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5170099692399228756?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/5170099692399228756?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/10/code-jquery-ajax-and-templates.html" title="Code: jQuery AJAX and Templates" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0MARH8zeyp7ImA9Wx5WE0g.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-2030297030245676495</id><published>2010-09-24T14:08:00.003-05:00</published><updated>2010-09-24T14:10:45.183-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-24T14:10:45.183-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NotCode" /><title>Audiobook: Call of The Wild by Jack London</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;I have a 35 minute drive to work, and lately I've been listening to some free audiobooks from Librivox. &amp;nbsp;I recently finished &lt;a href="http://librivox.org/call-of-the-wild-by-jack-london/"&gt;Call of the Wild&lt;/a&gt; by Jack London. &amp;nbsp;It was a great book and the readers do a good job as well. &amp;nbsp;I wish the first reader would have done the entire book, but the rest of the readers do a pretty good job.&lt;/span&gt;&lt;/span&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/2030297030245676495/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/09/audiobook-call-of-wild-by-jack-london.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2030297030245676495?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2030297030245676495?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/09/audiobook-call-of-wild-by-jack-london.html" title="Audiobook: Call of The Wild by Jack London" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0ECRH89eSp7ImA9Wx5QGUQ.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-7778767292991553973</id><published>2010-09-08T21:34:00.000-05:00</published><updated>2010-09-08T21:34:25.161-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-08T21:34:25.161-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NotCode" /><title>Computer: How to Replace a Key on a Dell Studio Laptop</title><content type="html">My cute as a button daughter pulled the caps lock key off my Dell Studio Notebook the other day and it took me a while to figure out how to put it back on. &amp;nbsp;The keys on this keyboard have 3 pieces. &amp;nbsp;The black part your fingers touch, a metal U shaped&amp;nbsp;paper clip&amp;nbsp;looking piece, and a white scissor piece of plastic. &amp;nbsp;The trick to reinstall is to carefully pull the white scissor off of the key and attach it standalone to the notebook. &amp;nbsp;Then make sure the metal piece is attached to the black caps lock key, slide the metal piece into its holder on the keyboard and press the caps lock key firmly down. &amp;nbsp;The white scissor piece then clicks into place and its attached.</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/7778767292991553973/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/09/computer-how-to-replace-key-on-dell.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/7778767292991553973?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/7778767292991553973?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/09/computer-how-to-replace-key-on-dell.html" title="Computer: How to Replace a Key on a Dell Studio Laptop" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;D0MCQ38yeip7ImA9Wx5WE0g.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-496950850937176270</id><published>2010-09-07T10:28:00.001-05:00</published><updated>2010-09-24T14:11:02.192-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-24T14:11:02.192-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: No source control? Use DropBox</title><content type="html">Recently I was working on a small development project that was only semi-work related. &amp;nbsp;I didn't want to use my work's source control since it was non-work and I didn't need versioning, just backup. &amp;nbsp;I created the project in my &lt;a href="http://www.dropbox.com/"&gt;Dropbox&lt;/a&gt; folder and it worked really well to backup and keep the project&amp;nbsp;synced&amp;nbsp;across machines.</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/496950850937176270/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/09/code-no-source-control-use-dropbox.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/496950850937176270?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/496950850937176270?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/09/code-no-source-control-use-dropbox.html" title="Code: No source control? Use DropBox" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEUFRX06eSp7ImA9Wx5RF0o.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-2902882915261511415</id><published>2010-08-25T16:09:00.002-05:00</published><updated>2010-08-25T16:36:54.311-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-25T16:36:54.311-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: FullText Search in SQL Server 2008 Express</title><content type="html">In order to do full text search in SQL Server 2008 Express (Original or R2) you have to install the "Advanced Services".  You can find the download for original &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B5D1B8C3-FDA5-4508-B0D0-1311D670E336&amp;amp;displaylang=en"&gt;here&lt;/a&gt;&amp;nbsp;or R2 &lt;a href="http://www.microsoft.com/express/Database/InstallOptions.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_FKaDXWj9WmQ/THWM2EwMz0I/AAAAAAAACfU/KKiwo0nb9qU/s1600/installer3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_FKaDXWj9WmQ/THWM2EwMz0I/AAAAAAAACfU/KKiwo0nb9qU/s320/installer3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_FKaDXWj9WmQ/THWM6w8EiZI/AAAAAAAACfc/4TP8ANdUZys/s1600/installer4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_FKaDXWj9WmQ/THWM6w8EiZI/AAAAAAAACfc/4TP8ANdUZys/s320/installer4.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
After upgrading your current instance (or installing the new instance) you also need to make sure the Full Text service is enabled&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_FKaDXWj9WmQ/THWFRUczw_I/AAAAAAAACfE/FNRlj-vAAPE/s1600/services.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_FKaDXWj9WmQ/THWFRUczw_I/AAAAAAAACfE/FNRlj-vAAPE/s640/services.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can then follow &lt;a href="http://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-catalog-and-index/"&gt;this guide&lt;/a&gt; to add a full text catalog and index.&lt;br /&gt;
&lt;br /&gt;
If you are using SSMS and want the full text index scripts to be generated when you generate the create script for a table, you'll need to modify a setting. &amp;nbsp;Go to &amp;nbsp;Tools | Options - Scripting page and then scroll down to table options and select "Script full-text indexes". This will script the full-text indexes with the table definition.&lt;br /&gt;
&lt;br /&gt;
If you are using the scripts then in a Visual Studio Database project, don't forget to set the Build Action property of the file to "Build", otherwise it will drop the indexes when it deploys&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_FKaDXWj9WmQ/THWGQYBqVuI/AAAAAAAACfM/zrPQiWcEegw/s1600/VS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_FKaDXWj9WmQ/THWGQYBqVuI/AAAAAAAACfM/zrPQiWcEegw/s400/VS.png" /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/2902882915261511415/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/08/code-fulltext-search-in-sql-server-2008.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2902882915261511415?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/2902882915261511415?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/08/code-fulltext-search-in-sql-server-2008.html" title="Code: FullText Search in SQL Server 2008 Express" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_FKaDXWj9WmQ/THWM2EwMz0I/AAAAAAAACfU/KKiwo0nb9qU/s72-c/installer3.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkUAR38-cSp7ImA9Wx5REEo.&quot;"><id>tag:blogger.com,1999:blog-7031122032372652219.post-6471361735944752495</id><published>2010-08-17T13:37:00.000-05:00</published><updated>2010-08-17T13:37:26.159-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-17T13:37:26.159-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Code: Silverlight Navigation from a UserControl</title><content type="html">For some reason Silverlight does not provide the ability to access a page's NavigationService from a user control, so in order to navigate correctly you have to manually walk the control tree.  See the method below to use as a helper class.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public static class NavigationHelper
    {
        public static void Navigate(Uri url, UserControl control)
        {
            Page pg = GetDependencyObjectFromVisualTree(control, typeof(Page)) as Page;
            pg.NavigationService.Navigate(url);
        }

        private static DependencyObject GetDependencyObjectFromVisualTree(DependencyObject startObject, Type type)
        {
            //Walk the visual tree to get the parent(ItemsControl)
            //of this control
            DependencyObject parent = startObject;
            while (parent != null)
            {
                if (type.IsInstanceOfType(parent))
                    break;
                else
                    parent = VisualTreeHelper.GetParent(parent);
            }
            return parent;
        }
    }
&lt;/pre&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.milrr.com/feeds/6471361735944752495/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.milrr.com/2010/08/code-silverlight-navigation-from.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6471361735944752495?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7031122032372652219/posts/default/6471361735944752495?v=2" /><link rel="alternate" type="text/html" href="http://blog.milrr.com/2010/08/code-silverlight-navigation-from.html" title="Code: Silverlight Navigation from a UserControl" /><author><name>Adam</name><uri>http://www.blogger.com/profile/11001121734533056226</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry></feed>
